Commit Graph

136 Commits (9882d957756d19c6afce0dec979bfea70b8c280d)

Author SHA1 Message Date
Kévin Commaille 9882d95775
Improve the quality of the rendered diagrams (#1999)
The first commit allows to lazy-load the diagrams, which should improve the loading time of the CS API on mobile. In the process it also improves the alt text of the images.

The second commit serves the diagrams as high-resolution WebPs. Encoding a high resolution diagram as WebP gives a file of approximately the same size as the lower resolution PNG. For maximum compatibility we also serve them as a lower resolution WebP and a fallback PNG. WebP was chosen because it is one of the export formats of draw.io/diagrams.net, and it is widely available in modern browsers.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
3 days ago
Kévin Commaille d5c56a4f17
Upgrade docsy to 0.11.0 and hugo to 0.139.0 (#1996)
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
3 days ago
Kévin Commaille bf8dee74eb
Fix relative URLs when serving the specification with a custom `baseURL` (#1984) 1 week ago
Kévin Commaille b1f66d1b71
Improve the JS script to highlight the current ToC entry (#1991)
The code relied on an IntersectionOberver, so the ToC was only updated when a heading was in the viewport.
It meant that if we jumped to a part of the text that has no heading, the ToC would still point to the old entry.

The new code looks for the correct heading when the view is scrolled so the correct entry is always selected.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
1 week ago
Kévin Commaille 1e0919ad12
Rename `custom-formats.yaml` to `string-formats.yaml` (#1977)
It does not contain only custom formats, so the name didn't fit anymore.
Update also the docs to reflect that.
3 weeks ago
Kévin Commaille 611d6c3e7e
Always use `%` delimiter for `added-in` and `changed-in` shortcodes (#1975)
The `<>` delimiters are not necessary for the shortcode to be rendered inline, and in some cases they break some expectations: a shortcode that is separated from other text to be in its own paragraph is not actually wrapped by a `p` element, breaking the spacing between paragraphs.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
3 weeks ago
Kévin Commaille 3b8f3a09aa
Remove CSS workaround for scroll-anchoring (#1976)
Docsy does not set the `height` anymore, but the `min-height`, which doesn't seem to affect scroll-anchoring.
See f22a70ec56

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
3 weeks ago
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 weeks ago
Kévin Commaille b1ebbb9a1c
Rename `.htmltest.yaml` to `.htmltest.yml` (#1985)
* Rename .htmltest.yaml to .htmltest.yml

This is almost nothing but htmltest expects this exact name by default, so when running the
binary locally, it avoids to have to bother with providing the name of the config file.

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 weeks ago
Johannes Marbach 285cd2bda2
Sort VoIP events semantically (#1967) 1 month ago
Kévin Commaille 69d7dbf703
Remove `span` element from `added-in` and `changed-in` shortcodes (#1972) 1 month ago
Kévin Commaille 48afe4faa5
Remove `withVersioning` parameter of `rver-fragment` shortcode. (#1971) 1 month ago
Kévin Commaille 1e47d7ec48
Remove `boxes/added-in-paragraph` shortcode (#1970) 1 month ago
Travis Ralston 9e6233d0dd v1.12 changelog 2 months ago
Travis Ralston 634c271654 Normalize changelog 2 months ago
Kévin Commaille 27b4cdcc9e
Add the `deprecated` field to OpenAPI definitions and JSON Schemas (#1940)
I did a quick search of the "deprecated" word in the data folder and set the
field where the description says that a property is deprecated.

This does not change the rendering of the spec because the
descriptions already talk about the deprecation,
but it can be used by tools that rely on the OpenAPI definitions and JSON Schemas.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2 months ago
Johannes Marbach c8ad740ba4
Use relative permalink to redirect to latest changelog (#1956) 2 months ago
Johannes Marbach 938022b1ff
Exclude checklists from alternate output formats (#1954) 2 months 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>
2 months ago
Johannes Marbach 215982abc2
Use dedicated fonts for better support of mathematical symbols (#1919) 3 months ago
Kim Brose dc017c2dd3
Document that the spec uses RFC 2119 (#1928)
Signed-off-by: HarHarLinks <2803622+HarHarLinks@users.noreply.github.com>
3 months ago
Josh Simmons 2017515ca9
update DCO, no legal name needed (#1914)
* update DCO, no legal name needed

* add a changelog entry, if needed

* add necessary fullstop for style guide

---------

Co-authored-by: Josh Simmons <git@josh.tel>
4 months ago
Johannes Marbach c8eb7f5526
Document the removal changelog category (#1907)
* Document the removal changelog category

Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>

* Add changelog

---------

Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
4 months ago
Tulir Asokan 2261c03bcd
Clarify "real name" in contributor requirements (#1886)
This updates the sign-off requirements to match what most other
matrix-org and element-hq repos already have. The change was first made
in synapse: https://github.com/matrix-org/synapse/pull/3467

Signed-off-by: Tulir Asokan <tulir@maunium.net>
5 months ago
Travis Ralston 1fc8f8856f Matrix 1.11 5 months 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>
5 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>
5 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>
5 months ago
Travis Ralston 8ef84d1cc7 More normalization 5 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>
5 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>
5 months ago
Travis Ralston 560f29cff3
Update release documentation (Q2 2024 edition) (#1759)
* Update release documentation (Q2 2024 edition)

* changelog

* Drop the ranges we don't follow

* Don't discourage maintenance

* Patch releases just aren't a good idea
5 months ago
Travis Ralston 9c46fa3f35 Normalize the changelog for Matrix 1.11 5 months ago
davidegirardi eb49b28ea9
Use environment variables in workflow (#1865)
* Use environment variables in workflow

* Add newsfragment
5 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
Travis Ralston 08bc8e8a1f
Fix YAML syntax in SCT release template (#1856)
* Fix YAML syntax in SCT release template

* changelog
6 months ago
Richard van der Hoff 722c2b1e9a
Clean up pull request template (#1831)
As far as I can tell, these header files only encourage people to create
badly-formatted PRs.

Also we only have one template so let's give it the default name.
6 months ago
Kévin Commaille 98d85cf421
Add support for rendering string formats (#1814)
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
7 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.
7 months ago
Kévin Commaille 2d18aac201
Use `OneTimeKeys` schema (#1800)
This was commented prior to the
port to OpenAPI 3.1 for technical reasons (#1127).
Now we can use it just fine.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
7 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>
7 months ago
Kévin Commaille 85ad0c767c
Render response headers (#1809)
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
7 months ago
Kévin Commaille ae70b5fcf3
Replace `set-output` with environment files in CI (#1806)
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
7 months ago
Kévin Commaille d3eca87389
Set python version for the Towncrier CI job (#1805)
Otherwise the version might change depending on the runner.
We just use the same version as other jobs.

This removes a GitHub warning.

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 d6b1d7300f
Update most CI actions (#1803)
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
7 months ago
Kévin Commaille b0115a9613
Update typos CI action (#1804)
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
7 months ago
Kévin Commaille a0bc6e7f83
Add anchors in `definition` shortcode (#1802)
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
7 months ago
Kévin Commaille 7201042894
Fix anchors for schemas under `oneOf` (#1799)
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
7 months ago
Kévin Commaille 2edfb21d5d
Add support for pattern formats for `patternProperties` (#1796)
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
7 months ago