Commit Graph

109 Commits (3b8f3a09aa9cd8283eba035732a9169e8dbe48f9)

Author SHA1 Message Date
Kévin Commaille 1f5f2c4d83
Enforce consistent vertical spacing between paragraphs in endpoint definitions (#1969)
Use `p` elements to separate paragraphs instead of `br` and enforce single paragraphs to be wrapped in `p` for consistency.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
3 days ago
Johannes Marbach 285cd2bda2
Sort VoIP events semantically (#1967) 2 weeks ago
Kévin Commaille 69d7dbf703
Remove `span` element from `added-in` and `changed-in` shortcodes (#1972) 3 weeks ago
Kévin Commaille 48afe4faa5
Remove `withVersioning` parameter of `rver-fragment` shortcode. (#1971) 3 weeks ago
Kévin Commaille 1e47d7ec48
Remove `boxes/added-in-paragraph` shortcode (#1970) 3 weeks ago
Johannes Marbach c8ad740ba4
Use relative permalink to redirect to latest changelog (#1956) 1 month ago
Johannes Marbach 00af39ecca
Provide MD checklists for the changelog (#1937)
* Output changelog checklists

Fixes: #1682
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
1 month ago
Kévin Commaille e2cb3a739a
Fix ToC of spec proposals (#1885)
* Fix ToC of spec proposals

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>

* Add changelog

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>

---------

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
4 months ago
Kévin Commaille 3af77f0cb4
Fix the table of content for room versions (#1884)
* Fix ToC for room versions pages

Like for the cs-module shortcode, use .RenderShortcodes
instead of .Content for the rver-fragment shortcode,
so the headings are detected by Hugo.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>

* Change the way "this version" is detected in added-in and changed-in shortcodes

Now that we use .RenderShortcodes in the rver-fragment shortcode,
we cannot remove the output of these shortcodes dynamically
because they are replaced by a temporary placeholder due to Hugo's internals.

Instead, since the `this` parameter was only used for room version,
we always use the `v` parameter and compare with the version
provided in the page's front matter.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>

* Add changelog

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>

* Add version front matter for v11

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>

* Update changelogs/room_versions/newsfragments/1884.clarification

---------

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
Co-authored-by: Travis Ralston <travpc@gmail.com>
4 months ago
Kévin Commaille 18628dc5d7
Allow to specify a prefix for generated HTML IDs of API endpoints (#1882)
* Allow to specify a prefix for generated HTML IDs of API endpoints

Allows to deduplicate IDs of duplicate endpoints

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>

* Add changelog

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>

---------

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
4 months ago
Kévin Commaille bd20d946c4
Fix the rendering of the event format for room versions 1 and 2 (#1883)
* Fix rendering of array with items using anyOf

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>

* Use a single definition for Event Hash

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>

* Add changelog

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>

* Add ending newline

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>

---------

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
4 months ago
Kévin Commaille 094e25b6cd
Ensure more uniqueness for generated HTML IDs (#1881)
* Include method in all API endpoint children's IDs

Avoids duplicate IDs for object of endpoints
that use the same path but a different method.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>

* Differentiate API endpoints' request and response children's IDs

Ensures that the objects have a unique ID compared to other parts of the endpoint.
Mostly useful for the Error type that can be used for responses with different status codes.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>

* Differentiate the names of both SessionData formats

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>

* Add changelog

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>

---------

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
4 months ago
Johannes Marbach 27e71fff10
Render added/changed in info on request and response content types (#1876)
* Render added/changed in info on request and response content types

Fixes: #1774
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
Co-authored-by: Kévin Commaille <76261501+zecakeh@users.noreply.github.com>
4 months ago
Kévin Commaille 5fbfdd6821
Fix generated HTML (#1880)
* Add tr as child of thead in HTML tables

It is invalid HTML for th to be the direct children of thead

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>

* Remove unnecessary HTML code end tag

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>

* Avoid nesting p HTML elements

A p HTML element cannot contain other block elements,
so the "parent" element is closed when the first "child" one is opened.

We need to use Page.RenderString with options
to force Hugo to keep the wrapping p elements
even if the content contains a single paragraph.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>

* Add missing HTML details end tags

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>

* Replace HTML a self-closing tag with start and end tags

The a element start and end tags are mandatory.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>

* Replace obsolete HTML name attribute with id

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>

* Add changelog

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
4 months ago
Kévin Commaille 784b8984f3
Generate ToC with Hugo rather than JavaScript (#1851)
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
5 months ago
Kévin Commaille acec09f567
Do not add empty arrays to examples (#1849) 5 months ago
Kévin Commaille 98d85cf421
Add support for rendering string formats (#1814)
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
6 months ago
Richard van der Hoff 48f4c4954f
Include information about additionalProperties in object tables (#1798)
Currently, if we have an object which has additionalProperties in addition to properties, that information gets lost. This PR seeks to address that.
6 months ago
Kévin Commaille 1fc25d8d48
Do not use `title` for objects containing only `additionalProperties` or `patternProperties` (#1801)
Previously, titles would appear that do not link to a subchema definition.
It would also mean that named subschemas would appear without being clearly referenced.

Now, the type clearly shows the nesting of objects
and subschema definitions should be clearly referenced.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
6 months ago
Kévin Commaille 85ad0c767c
Render response headers (#1809)
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
6 months ago
Kévin Commaille a0bc6e7f83
Add anchors in `definition` shortcode (#1802)
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
6 months ago
Kévin Commaille 7201042894
Fix anchors for schemas under `oneOf` (#1799)
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
6 months ago
Kévin Commaille 2edfb21d5d
Add support for pattern formats for `patternProperties` (#1796)
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
6 months ago
Kévin Commaille 1095179374
Upgrade version of Hugo used to build the spec in CI (#1794)
* Upgrade version of Hugo used to build the spec in CI

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>

* Escape HTML manually in property-type partial

The behavior of `delimit` changed,
so Hugo doesn't recognize "safe" HTML passed to it anymore, so it escapes nested HTML links.

To fix that we escape the schema data manually
and consider the output of the partial as "safe".

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>

* Add changelog

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>

---------

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
6 months ago
Kévin Commaille e82829d4a2
Make resolve-allof partial recursive (#1787)
Makes it easier to use, like resolve-refs. It just needs to be called once.

Fixes an issue with m.call.* events not displaying the common fields

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
7 months ago
Kévin Commaille f4e7b2aa97
Fix property type resolution in render-object-table (#1789)
The split was not clear between property-type and type-or-title,
so it was not obvious which partial should be called for recursion.
That resulted in an error where type-or-title was only called for objects and array items, even if it also resolves
arrays of types.

This makes the split clearer. property-type must be called for any schema,
and object-type-or-title is only called for object schemas.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
7 months ago
Kévin Commaille 2678370f2c
Simplify uses of `resolve-refs` partial (#1773)
* Use the resolve-refs partial as soon as possible

Call it right after accessing the site.Data,
since it is recursing it will solve all references in the tree.
That way we don't need to wonder where to call it,
we trust the validators that the refs will be used in the right place.

* Enable strict $ref rule in OpenAPI validator

* Document use of $ref to compose examples

* Fix schema path in event-fields shortcode

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
7 months ago
Travis Ralston eb22fac5dc
Break out non-JSON request/response content types as tables (#1756)
* Break out non-JSON request/response content types as tables

Currently we display this as a table like "image/png|image/jpeg" and description on a single line, but we're using a table. This breaks the join out to individual rows.

* changelog
7 months ago
Kévin Commaille 575c84d431
Fix `event-group` shortcode for changes in `resolve-refs` partial (#1754)
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
8 months ago
Kévin Commaille 4d7e33ec26
Add support for `$ref` URIs containing fragments in OpenAPI definitions and JSON schemas (#1751)
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
8 months ago
Kévin Commaille 542a219623
Allow `/versions` to optionally accept authentication (#1728)
* Allow /versions to optionally accept authentication

According to MSC2046.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>

* Add changelog

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>

* Set "Requires Authentication: Optional"

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>

---------

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
8 months ago
Richard van der Hoff 976ebdca2f
Update HTML templates to link to object definitions (#1724) 8 months ago
Kévin Commaille b136b357e0
Update docsy to v0.8.0 (#1699)
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
8 months ago
Kévin Commaille e40d9ca186
Fix rendering of `m.receipt` event in Client-Server API (#1637)
... and other improvements

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
1 year ago
Kévin Commaille 5672bdbab7
Fix enum types in JSON schemas (#1634)
`type: enum` does not exist, as an enum can be of any type.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
1 year ago
Kévin Commaille 99e2ff4927
Replace all mentions of Swagger by OpenAPI (#1633)
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
1 year ago
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>
1 year ago
Kévin Commaille a6eb381ebb
Fix the sidebar in recent versions of Hugo (#1551)
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
1 year ago
Kévin Commaille 564444d43e
Render binary request and response bodies (#1579)
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
1 year ago
Kévin Commaille 49957be1e3
Allow `null` in `room_types` for `POST /publicRooms` endpoints (#1564)
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
1 year ago
Kévin Commaille 45b6aaf07a
Upgrade Swagger data to OpenAPI 3.1 (#1310)
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
1 year ago
David Robertson 48459dee9b
Only include titles in summaries (#1549)
I previously made this change for HTTP endpoints in #1446. It seems there are
other places where we have over-sized `<summary>` elements. I would like
to elimintate those too, as grumbled about in
https://github.com/matrix-org/matrix-spec/issues/1358#issuecomment-1325220859
and
https://github.com/matrix-org/matrix-spec/issues/1352#issuecomment-1439033334
1 year ago
Richard van der Hoff c662976fab
Fix generation of anchors for additional properties (#1488)
but objects defined under `additionalProperties` missed out on them. This fixes
that.
2 years ago
Richard van der Hoff cdbf44eef0
Fix rendering of properties with a list of types (#1487) 2 years ago
David Robertson f9ea0f9d9b
Only include endpoint path in `<summary>` (#1446) 2 years ago
Richard van der Hoff a9e9202e89
Load Inter CSS directly (#1444)
Move the load of the Inter font CSS from _variables_project.scss to head-end.html.

Empirically, this seems to fix #965
2 years ago
Richard van der Hoff 7bd48ca9c7
Stop autogenerating examples where we already have one (#1384)
If an object definition already has an example, we shouldn't try to extend that
definition by adding examples derived from the individual properties. Doing so
is confusing, and there is no way to inhibit it when it is not desired. It's
also not what the RapiDoc viewere does, so we end up with examples being
inconsistent.
2 years ago
Richard van der Hoff 1e393fbf92
Improve error messages emitted by `resolve-additional-types` (#1303)
I forgot to set the `items` on an array definition, and got an extremely
opaque error. Hopefully this will improve the lives of anyone who makes a
similar mistake in future.
2 years ago
Richard van der Hoff 08fde5f257
Generate unstable changelogs using towncrier (#1340)
Replace the current stack of hugo templates with a towncrier invocation. The main advantage of this is that it means that the "Changes since last release" section is consistent with the changelogs for the actual releases.

This also changes the release process so that the changelog is generated before tagging, which means that the thing tagged v1.5 is actually the v1.5 spec.

Fixes #908.
2 years ago
Richard van der Hoff bc15d4f9bc
Make definition anchors more unique (#1339)
Stick a `definition-` on the front of the autogenerated anchors for definition
blocks.

This solves a problem where, for example,
https://spec.matrix.org/unstable/application-service-api/#registration could
refer to either the "Registration" section or the `Registration` definition
therein.

(These anchors are relatively recent: they were added in #1191.
2 years ago