Use patternProperties in more places with supported formats (#1813)

Allows to have more places where the property name's type is better defined.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
This commit is contained in:
Kévin Commaille 2024-05-08 15:59:17 +02:00 committed by GitHub
parent df1e799c51
commit b0df8e7fb5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 489 additions and 407 deletions

View file

@ -9,10 +9,12 @@ description: |-
that user ID.
properties:
content:
additionalProperties:
type: array
items:
type: string
patternProperties:
"^@":
x-pattern-format: mx-user-id
type: array
items:
type: string
type: object
description: |-
The mapping of user ID to a list of room IDs of the 'direct' rooms for

View file

@ -67,8 +67,10 @@ properties:
by the `events` key. Defaults to 50 if unspecified.
type: integer
users:
additionalProperties:
type: integer
patternProperties:
"^@":
x-pattern-format: mx-user-id
type: integer
description: The power levels for specific users. This is a mapping from `user_id` to power level for that user.
title: User power levels
type: object