diff --git a/changelogs/client_server/newsfragments/1909.clarification b/changelogs/client_server/newsfragments/1909.clarification index fcd6629d..85cf15b6 100644 --- a/changelogs/client_server/newsfragments/1909.clarification +++ b/changelogs/client_server/newsfragments/1909.clarification @@ -1 +1 @@ -The `UserIdentifier` object in `POST /_matrix/client/v3/login` can contain additional properties. +The `UserIdentifier` object in `POST /_matrix/client/v3/login` contains additional properties that depend on the identification type. diff --git a/changelogs/internal/newsfragments/1909.clarification b/changelogs/internal/newsfragments/1909.clarification deleted file mode 100644 index a82cb9c5..00000000 --- a/changelogs/internal/newsfragments/1909.clarification +++ /dev/null @@ -1 +0,0 @@ -Enforce `additionalProperties: {}` instead of the equivalent `additionalProperties: true` for easier processing. diff --git a/data/api/client-server/definitions/user_identifier.yaml b/data/api/client-server/definitions/user_identifier.yaml index 4511f217..d2d88fe4 100644 --- a/data/api/client-server/definitions/user_identifier.yaml +++ b/data/api/client-server/definitions/user_identifier.yaml @@ -18,7 +18,10 @@ type: object properties: type: type: string - description: The type of identification. See [Identifier types](/client-server-api/#identifier-types) for supported values and additional property descriptions. + description: |- + The type of identification. See [Identifier types](/client-server-api/#identifier-types) + for supported values and additional property descriptions. required: - type -additionalProperties: {} +additionalProperties: + description: Keys dependent on the identification type diff --git a/layouts/partials/openapi/render-object-table.html b/layouts/partials/openapi/render-object-table.html index ae84bf99..778fdbc5 100644 --- a/layouts/partials/openapi/render-object-table.html +++ b/layouts/partials/openapi/render-object-table.html @@ -53,11 +53,6 @@ {{ end }} - {{/* Enforce `additionalProperties: {}` instead of the equivalent `additionalProperties: true` for easier processing */}} - {{ if eq .additionalProperties true }} - {{ errorf "Use `additionalProperties: {}` instead of `additionalProperties: true`" }} - {{ end }} - {{/* If the object has additional properties *as well as* regular properties, we add a special row to the table. @@ -72,6 +67,9 @@ TODO: support `patternProperties` here. */}} + {{ if eq .additionalProperties true }} + {{ errorf "`additionalProperties: true` is de facto the default for Matrix and doesn't provide any information" }} + {{ end }} {{ if reflect.IsMap .additionalProperties }}