Commit graph

95 commits

Author SHA1 Message Date
Kévin Commaille
784b8984f3
Generate ToC with Hugo rather than JavaScript (#1851)
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2024-06-11 22:24:23 +01:00
Kévin Commaille
acec09f567
Do not add empty arrays to examples (#1849) 2024-06-11 17:03:53 +01:00
Kévin Commaille
98d85cf421
Add support for rendering string formats (#1814)
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2024-05-07 20:50:36 -04:00
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.
2024-05-02 11:10:16 +01:00
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>
2024-04-30 18:05:03 +01:00
Kévin Commaille
85ad0c767c
Render response headers (#1809)
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2024-04-30 17:42:55 +01:00
Kévin Commaille
a0bc6e7f83
Add anchors in definition shortcode (#1802)
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2024-04-30 16:52:23 +01:00
Kévin Commaille
7201042894
Fix anchors for schemas under oneOf (#1799)
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2024-04-24 12:53:49 +01:00
Kévin Commaille
2edfb21d5d
Add support for pattern formats for patternProperties (#1796)
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2024-04-24 12:42:34 +01:00
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>
2024-04-23 16:30:21 +01:00
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>
2024-04-17 09:29:34 +01:00
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>
2024-04-16 18:25:33 +01:00
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>
2024-04-09 18:06:53 +01:00
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
2024-03-21 14:45:07 -06:00
Kévin Commaille
575c84d431
Fix event-group shortcode for changes in resolve-refs partial (#1754)
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2024-03-19 19:02:13 +00:00
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>
2024-03-19 14:50:49 +00:00
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>
2024-03-06 19:30:06 -05:00
Richard van der Hoff
976ebdca2f
Update HTML templates to link to object definitions (#1724) 2024-02-28 10:39:08 +00:00
Kévin Commaille
b136b357e0
Update docsy to v0.8.0 (#1699)
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2024-02-27 18:12:39 +00:00
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>
2023-09-27 12:42:14 +00:00
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>
2023-09-27 13:29:14 +01:00
Kévin Commaille
99e2ff4927
Replace all mentions of Swagger by OpenAPI (#1633)
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-09-19 18:26:07 +01: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
a6eb381ebb
Fix the sidebar in recent versions of Hugo (#1551)
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-06-27 22:24:22 +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
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
2023-05-30 13:22:30 +01:00
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.
2023-05-02 11:41:59 +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
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
2023-02-28 14:56:19 +00:00
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.
2022-12-21 16:24:11 +00:00
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.
2022-11-17 07:23:12 +00:00
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.
2022-11-15 23:26:55 +00:00
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.
2022-11-15 19:15:34 +00:00
Richard van der Hoff
b07fe504ed
Stop rendering CS modules and room version fragments as standalone pages (#1317)
This is actually doing two things:

 * creating `{fragments,modules}/index.md` turns the fragments and modules into
   page resources, rather than pages in their own right. We have to update the
   shortcodes to match.

 * adding `headless: true` means that we don't render the pages.

The net effect is that we don't render pages like
https://spec.matrix.org/v1.4/rooms/fragments/v1-auth-rules/ and
https://spec.matrix.org/v1.4/client-server-api/modules/account_data/.
2022-11-08 17:27:44 +00:00
Hubert Chathi
830f80f56a
Merge pull request #1271 from uhoreg/add_verification_request_msgtype
add in-room m.key.verification.request msgtype
2022-11-02 10:16:42 -04:00
Hubert Chathi
82d2dd4ab0
Merge pull request #1283 from uhoreg/fix_event_subtype
improve display of event subtypes
2022-11-02 10:15:56 -04:00
Hubert Chathi
d0d7bdb807 apply changes from code review 2022-11-01 11:39:15 -04:00
Hubert Chathi
60d9518a63 pass the desired example name to the template 2022-10-28 16:15:04 -04:00
Hubert Chathi
d6345f0df2 apply changes from code review 2022-10-26 16:33:41 -04:00
Hubert Chathi
99cd692ed0 improve display of event subtypes 2022-10-12 15:49:21 -04:00
Richard van der Hoff
c4505665e0
Various clarifications to auth rules text (#1270) 2022-10-05 16:54:34 +00:00
Hubert Chathi
191450ea73 add in-room m.key.verification.request msgtype 2022-10-04 17:49:36 -04:00
Travis Ralston
1cdfbd3cd8
v1.4 patch release cleanup (#1268)
* Add missing steps to patch release guidelines

* Update from v1.4 patch
2022-10-04 10:00:16 -06:00
Travis Ralston
7a591366c1 v1.4 changelog 2022-09-29 07:03:48 -06: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
Travis Ralston
afc0e6a026
Add CORP headers to media repo (#1197)
* Add CORP headers to media repo

MSC: https://github.com/matrix-org/matrix-spec-proposals/pull/3828

* Write weird CSS rules to make added-in work inline in the CS spec

Even though our content doesn't need 2 paragraphs, it's good to have the capability to render it in the future.

* Remove test paragraph

* Refine prose

* spelling is key
2022-08-09 10:44:51 -06:00