Commit graph

9 commits

Author SHA1 Message Date
David Robertson 7da039a241
Merge remote-tracking branch 'origin/main' into dmr/additional-properties 2022-07-21 17:38:47 +01:00
David Robertson 1d26b3637d
Only italicise the boilerplate text
I think this looks better, but what do I know?
2022-07-21 16:13:09 +01:00
David Robertson 3398cf0f63
Use phrasing "Notes on additional properties"
Ignore `true` values for additionalProperties. Error on `false` values.
2022-07-21 16:12:07 +01:00
Richard van der Hoff 5f3b34448d
Add HTML ids for object definitions in the formatted specification (#1174)
* Remove redundant call to resolve-allof

All of the callers to resolve-additional-types already call resolve-allof (or
if not, they should), so this is redundant.

* Update `resolve-additional-types` to take a dict

I want to add more params to this, so first make it take a dict.

* `render-object-table`: take a "title" rather than a "caption"

... which means we can use the result from resolve-additional-types directly.

* render-object-table: support adding an anchor to generated tables.

* resolve-additional-types: generate an id for each returned type

* render-event: pass an anchor_base into resolve-additional-types

This means that it will generate an anchor for each type, whihc will then be
passed into render-object-table and used as an `id` for the table.

* render-operation: pass an anchor_base into resolve-additional-types

* newsfiles
2022-07-19 13:25:30 -06:00
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 7f200c53e8
Move prev_content to unsigned (#3524) 2021-12-02 17:22:58 +00:00
Travis Ralston 5be0df02c5
Start annotating which version of the spec added a thing (#3425)
* Introduce a new "added-in" template and use it on endpoints

* Use "added-in" on schema properties too

* Annotate sections of the spec with their added versions

* Demo of "added-in" on a room version (to be fleshed out)

* Use clearer versioning semantics

* Update and fix validator for Swagger custom properties

* Fix docs
2021-10-14 13:23:04 -06:00
wbamberg 6fc1f52f2f 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