Switch from additionalProperties: {} to using a description

This commit is contained in:
Johannes Marbach 2024-07-24 13:12:30 +02:00
parent 20c109c3a7
commit de615f5bd7
4 changed files with 9 additions and 9 deletions

View file

@ -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.

View file

@ -1 +0,0 @@
Enforce `additionalProperties: {}` instead of the equivalent `additionalProperties: true` for easier processing.

View file

@ -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

View file

@ -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 }}
<tr>