Commit graph

21 commits

Author SHA1 Message Date
Kévin Commaille e719219a6c
Fix rendering of additional and pattern Properties at the root of an object
Fixes rendering of m.receipt and m.direct, and the body or response of a few endpoints

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-09-13 16:35:27 +02:00
Kévin Commaille 7838d32596
Support rendering of patternProperties
Currently the pattern is ignored as there is always only one
pattern in current definitions,
and the pattern is clear with the descriptions.
First step to render `m.receipt` event

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-09-13 16:19:50 +02:00
Kévin Commaille 4ca33aec90
Do not assume additionalProperties is an object
Also resolve allOf of additionalProperties.
Fixes names of objects refs and rendering of arrays

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-09-13 16:09:53 +02:00
Kévin Commaille 1d4682fac9
Display enums as strings
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-09-13 10:35:59 +02:00
Kévin Commaille 50fe89d74b
Fix definition of response of POST /_matrix/federation/v1/user/keys/claim (#1559)
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-07-18 10:55:03 +01:00
Kévin Commaille 564444d43e
Render binary request and response bodies (#1579)
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-06-20 18:33:06 +01:00
Kévin Commaille 49957be1e3
Allow null in room_types for POST /publicRooms endpoints (#1564)
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-06-13 15:12:25 +01:00
Kévin Commaille 45b6aaf07a
Upgrade Swagger data to OpenAPI 3.1 (#1310)
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-06-07 13:16:29 +01:00
Richard van der Hoff cdbf44eef0
Fix rendering of properties with a list of types (#1487) 2023-04-26 16:18:23 +01:00
David Robertson f9ea0f9d9b
Only include endpoint path in <summary> (#1446) 2023-03-02 16:58:04 +00:00
Patrick Cloke 1c0101ce4c Put commas between enum values. 2022-09-16 09:03:41 -04:00
David Robertson a6990ff27c
Fix spacing of mapping types (#1230)
* Fix spacing of mapping types

* Changelog
2022-09-06 10:21:51 -06:00
Richard van der Hoff ef384f1afd
Give rendered-data sections a background and some padding (#1195)
Gives definition sections for APIs, events, etc a background and a small indent, which I find very helpful to guide the eye.
2022-08-04 09:46:11 +00: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
Richard van der Hoff dfb1bf2a5d
Fix x-changedInMatrixVersion for API parameters (#1011) 2022-03-29 23:17:51 +01:00
Richard van der Hoff 783624d2cd
Fix rendering of responses with empty bodies (#3674) 2022-01-26 10:50:09 +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
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