Commit graph

5 commits

Author SHA1 Message Date
David Robertson c69ac3bb68
Present OpenAPI additionalProperties field
When looking at the "Authentication Data" type used in e.g. the account
deactivation endpoint

    https://spec.matrix.org/v1.3/client-server-api/#post_matrixclientv3accountdeactivate

it was not clear to me that clients and servers should expect additional
fields in this structure (the semantics of which are implied by the
`type` of the authentication, or that of the previously established
`session`.)

In the OpenAPI spec, We occasionally mark some ojects as allowing
arbitrary additional properties (`additionalProperties: true`, or
`additionalProperties: { description: "..."}`). In other places we are
more strict and provide a schema that additional properties must satisfy.
In this PR we aim to make the first kind of additional
properties (non-strict) more visible in the rendered spec.
2022-07-04 21:24:56 +01:00
Richard van der Hoff c3b53d5ae6
comments on resolve-allof (#3657) 2022-01-26 10:50:48 +00:00
Richard van der Hoff 3be746c9d3
Fix rendering of response examples (#3584)
* Fix rendering of response examples

Fixes the autogeneration of JSON examples for array objects. This fixes a
number of "Specification error: Example invalid or not present" errors in the
rendered spec.

* Unbreak examples for non-objects/arrays

The previous change had broken auto-generated examples for everything that
wasn't an object or array; fix it up again.

* Remove conditions on $example

Everything should now have a generated example, so the condition is
redundant. Furthermore it was suppressing examples for APIs where the example
was an empty dict.
2022-01-04 16:47:58 +00:00
wbamberg 942f865f64 Fix typo in comment
Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
2021-08-27 19:16:42 +01:00
Will 5f45a897ef Add templates used to render data 2021-08-27 19:16:42 +01:00