Skip to content

Commit

Permalink
Fix links in OpenAPI data
Browse files Browse the repository at this point in the history
Links that contain only a fragment are not resolved by Hugo so the final relative URL is wrong.
They also cause problems for the OpenAPI definitions because these links are
not edited in the dump-openapi script so they end up broken.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
  • Loading branch information
zecakeh committed Nov 1, 2024
1 parent a4306c3 commit a493acb
Show file tree
Hide file tree
Showing 25 changed files with 63 additions and 55 deletions.
4 changes: 2 additions & 2 deletions data/api/client-server/account-data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ paths:
Set some account data for the client. This config is only visible to the user
that set the account data. The config will be available to clients through the
top-level `account_data` field in the homeserver response to
[/sync](#get_matrixclientv3sync).
[/sync](/client-server-api/#get_matrixclientv3sync).
operationId: setAccountData
security:
- accessTokenQuery: []
Expand Down Expand Up @@ -185,7 +185,7 @@ paths:
description: |-
Set some account data for the client on a given room. This config is only
visible to the user that set the account data. The config will be delivered to
clients in the per-room entries via [/sync](#get_matrixclientv3sync).
clients in the per-room entries via [/sync](/client-server-api/#get_matrixclientv3sync).
operationId: setAccountDataPerRoom
security:
- accessTokenQuery: []
Expand Down
4 changes: 2 additions & 2 deletions data/api/client-server/appservice_ping.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ paths:
connection works.
description: |-
This API asks the homeserver to call the
[`/_matrix/app/v1/ping`](#post_matrixappv1ping) endpoint on the
[`/_matrix/app/v1/ping`](/application-service-api/#post_matrixappv1ping) endpoint on the
application service to ensure that the homeserver can communicate
with the application service.
Expand Down Expand Up @@ -71,7 +71,7 @@ paths:
type: integer
description: |-
The duration in milliseconds that the
[`/_matrix/app/v1/ping`](#post_matrixappv1ping)
[`/_matrix/app/v1/ping`](/application-service-api/#post_matrixappv1ping)
request took from the homeserver's point of view.
required:
- duration_ms
Expand Down
2 changes: 1 addition & 1 deletion data/api/client-server/definitions/auth_data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ properties:
The authentication type that the client is attempting to complete.
May be omitted if `session` is given, and the client is reissuing a
request which it believes has been completed out-of-band (for example,
via the [fallback mechanism](#fallback)).
via the [fallback mechanism](/client-server-api/#fallback)).
type: string
session:
description: The value of the session key given by the homeserver.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ properties:
items:
type: string
description: |-
Chain of Curve25519 keys through which this session was forwarded, via [m.forwarded_room_key](#mforwarded_room_key) events.
Chain of Curve25519 keys through which this session was forwarded, via [m.forwarded_room_key](/client-server-api/#mforwarded_room_key)
events.
sender_key:
type: string
description: |-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ allOf:
The format used to encode a Megolm session key for export.
This is similar to the format before encryption used for the session keys
in [Server-side key backups](#server-side-key-backups) but adds the
`room_id` and `session_id` fields.
in [Server-side key backups](/client-server-api/#server-side-key-backups)
but adds the `room_id` and `session_id` fields.
properties:
room_id:
type: string
Expand Down
2 changes: 1 addition & 1 deletion data/api/client-server/definitions/timeline_batch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ properties:
type: boolean
prev_batch:
description: A token that can be supplied to the `from` parameter of the
[`/rooms/<room_id>/messages`](#get_matrixclientv3roomsroomidmessages)
[`/rooms/<room_id>/messages`](/client-server-api/#get_matrixclientv3roomsroomidmessages)
endpoint in order to retrieve earlier events.

If no earlier events are available, this property may be omitted from
Expand Down
4 changes: 2 additions & 2 deletions data/api/client-server/old_sync.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ paths:
description: |-
A token which correlates to the start of `chunk`.
Can be passed to
[`/rooms/<room_id>/messages`](#get_matrixclientv3roomsroomidmessages)
[`/rooms/<room_id>/messages`](/client-server-api/#get_matrixclientv3roomsroomidmessages)
to retrieve earlier events.
If no earlier events are available, this property may be omitted from
Expand All @@ -183,7 +183,7 @@ paths:
description: |-
A token which correlates to the end of `chunk`.
Can be passed to
[`/rooms/<room_id>/messages`](#get_matrixclientv3roomsroomidmessages)
[`/rooms/<room_id>/messages`](/client-server-api/#get_matrixclientv3roomsroomidmessages)
to retrieve later events.
chunk:
type: array
Expand Down
2 changes: 1 addition & 1 deletion data/api/client-server/room_event_by_timestamp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ paths:
to ask other servers for a suitable event.
After calling this endpoint, clients can call
[`/rooms/{roomId}/context/{eventId}`](#get_matrixclientv3roomsroomidcontexteventid)
[`/rooms/{roomId}/context/{eventId}`](/client-server-api/#get_matrixclientv3roomsroomidcontexteventid)
to obtain a pagination token to retrieve the events around the returned event.
The event returned by this endpoint could be an event that the client
Expand Down
4 changes: 2 additions & 2 deletions data/api/client-server/room_initial_sync.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ paths:
type: string
description: |-
A token which correlates to the start of `chunk`. Can be passed to
[`/rooms/<room_id>/messages`](#get_matrixclientv3roomsroomidmessages)
[`/rooms/<room_id>/messages`](/client-server-api/#get_matrixclientv3roomsroomidmessages)
to retrieve earlier events.
If no earlier events are available, this property may be omitted from
Expand All @@ -63,7 +63,7 @@ paths:
type: string
description: |-
A token which correlates to the end of `chunk`. Can be passed to
[`/rooms/<room_id>/messages`](#get_matrixclientv3roomsroomidmessages)
[`/rooms/<room_id>/messages`](/client-server-api/#get_matrixclientv3roomsroomidmessages)
to retrieve later events.
chunk:
type: array
Expand Down
12 changes: 6 additions & 6 deletions data/api/client-server/space_hierarchy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ paths:
Where a child room is unknown to the local server, federation is used to fill in the details.
The servers listed in the `via` array should be contacted to attempt to fill in missing rooms.
Only [`m.space.child`](#mspacechild) state events of the room are considered. Invalid child
rooms and parent events are not covered by this endpoint.
Only [`m.space.child`](/client-server-api/#mspacechild) state events of the room are considered.
Invalid child rooms and parent events are not covered by this endpoint.
operationId: getSpaceHierarchy
security:
- accessTokenQuery: []
Expand All @@ -44,8 +44,8 @@ paths:
name: suggested_only
description: |-
Optional (default `false`) flag to indicate whether or not the server should only consider
suggested rooms. Suggested rooms are annotated in their [`m.space.child`](#mspacechild) event
contents.
suggested rooms. Suggested rooms are annotated in their [`m.space.child`](/client-server-api/#mspacechild)
event contents.
example: true
schema:
type: boolean
Expand Down Expand Up @@ -103,8 +103,8 @@ paths:
children_state:
type: array
description: |-
The [`m.space.child`](#mspacechild) events of the space-room, represented
as [Stripped State Events](#stripped-state) with an added `origin_server_ts` key.
The [`m.space.child`](/client-server-api/#mspacechild) events of the space-room, represented
as [Stripped State Events](/client-server-api/#stripped-state) with an added `origin_server_ts` key.
If the room is not a space-room, this should be empty.
items:
Expand Down
27 changes: 15 additions & 12 deletions data/api/client-server/sync.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@ paths:
The new ephemeral events in the room (events that
aren't recorded in the timeline or state of the
room). In this version of the spec, these are
[typing notification](#typing-notifications) and
[read receipt](#receipts) events.
[typing notification](/client-server-api/#typing-notifications)
and [read receipt](/client-server-api/#receipts) events.
allOf:
- $ref: definitions/event_batch.yaml
account_data:
Expand All @@ -245,7 +245,7 @@ paths:
If `unread_thread_notifications` was specified as `true` on the `RoomEventFilter`,
these counts will only be for the main timeline rather than all events in the room.
See the [threading module](#threading) for more information.
See the [threading module](/client-server-api/#threading) for more information.
x-changedInMatrixVersion:
"1.4": |
Updated to reflect behaviour of having `unread_thread_notifications` as `true` in
Expand All @@ -265,8 +265,8 @@ paths:
type: object
description: |-
If `unread_thread_notifications` was specified as `true` on the `RoomEventFilter`,
the notification counts for each [thread](#threading) in this room. The object is
keyed by thread root ID, with values matching `unread_notifications`.
the notification counts for each [thread](/client-server-api/#threading) in this room.
The object is keyed by thread root ID, with values matching `unread_notifications`.
If a thread does not have any notifications it can be omitted from this object. If
no threads have notification counts, this whole object can be omitted.
Expand Down Expand Up @@ -302,12 +302,13 @@ paths:
title: InviteState
type: object
description: |-
The [stripped state](#stripped-state) of a room that the user has been invited
to.
The [stripped state](/client-server-api/#stripped-state) of a room that the user has
been invited to.
properties:
events:
description: The [stripped state events](#stripped-state) that form the invite
state.
description: |-
The [stripped state events](/client-server-api/#stripped-state) that form the
invite state.
items:
$ref: ../../event-schemas/schema/core-event-schema/stripped_state.yaml
type: array
Expand All @@ -325,12 +326,14 @@ paths:
knock_state:
title: KnockState
type: object
description: The [stripped state](#stripped-state) of a room that the user has
description: |-
The [stripped state](/client-server-api/#stripped-state) of a room that the user has
knocked upon.
properties:
events:
description: The [stripped state events](#stripped-state) that form the knock
state.
description: |-
The [stripped state events](/client-server-api/#stripped-state) that form the
knock state.
items:
$ref: ../../event-schemas/schema/core-event-schema/stripped_state.yaml
type: array
Expand Down
6 changes: 3 additions & 3 deletions data/api/client-server/whoami.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ paths:
x-addedInMatrixVersion: "1.2"
type: boolean
description: |-
When `true`, the user is a [Guest User](#guest-access). When
not present or `false`, the user is presumed to be a non-guest
user.
When `true`, the user is a [Guest User](/client-server-api/#guest-access).
When not present or `false`, the user is presumed to be a
non-guest user.
examples:
response:
value: {
Expand Down
4 changes: 2 additions & 2 deletions data/api/server-server/events.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,8 @@ paths:
using the `origin_server_ts` property, whether the returned event is
closer to the requested timestamp than the closest event that it could
find locally. If so, it should try to backfill this event via the
[`/event/{event_id}`](#get_matrixfederationv1eventeventid) endpoint so
that it is available to for a client to query.
[`/event/{event_id}`](/server-server-api/#get_matrixfederationv1eventeventid)
endpoint so that it is available to for a client to query.
operationId: getEventByTimestamp
security:
- accessToken: []
Expand Down
2 changes: 1 addition & 1 deletion data/api/server-server/joins-v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ paths:
The request is invalid, the room the server is attempting
to join has a version that is not listed in the `ver`
parameters, or the server was unable to validate
[restricted room conditions](#restricted-rooms).
[restricted room conditions](/server-server-api/#restricted-rooms).
The error should be passed through to clients so that they
may give better feedback to users.
Expand Down
4 changes: 2 additions & 2 deletions data/api/server-server/space_hierarchy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ paths:
items:
type: string
description: |-
If the room is a [restricted room](#restricted-rooms), these are the room IDs which
If the room is a [restricted room](/server-server-api/#restricted-rooms), these are the room IDs which
are specified by the join rules. Empty or omitted otherwise.
children_state:
type: array
Expand Down Expand Up @@ -119,7 +119,7 @@ paths:
items:
type: string
description: |-
If the room is a [restricted room](#restricted-rooms), these are the room IDs which
If the room is a [restricted room](/server-server-api/#restricted-rooms), these are the room IDs which
are specified by the join rules. Empty or omitted otherwise.
inaccessible_children:
type: array
Expand Down
2 changes: 1 addition & 1 deletion data/event-schemas/schema/m.forwarded_room_key.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ allOf:

description: |-
This event type is used to forward keys for end-to-end encryption.
It is encrypted as an `m.room.encrypted` event using [Olm](#molmv1curve25519-aes-sha2),
It is encrypted as an `m.room.encrypted` event using [Olm](/client-server-api/#molmv1curve25519-aes-sha2),
then sent as a [to-device](/client-server-api/#send-to-device-messaging) event.
properties:
content:
Expand Down
3 changes: 2 additions & 1 deletion data/event-schemas/schema/m.key.verification.request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ allOf:
description: |-
Requests a key verification using to-device messaging. When requesting a key
verification in a room, a `m.room.message` should be used, with
[`m.key.verification.request`](#mroommessagemkeyverificationrequest) as msgtype.
[`m.key.verification.request`](/client-server-api/#mroommessagemkeyverificationrequest)
as msgtype.
properties:
content:
properties:
Expand Down
3 changes: 2 additions & 1 deletion data/event-schemas/schema/m.room.create.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ properties:
type: string
type:
description: |-
Optional [room type](#types) to denote a room's intended function outside of traditional conversation.
Optional [room type](/client-server-api/#types) to denote a room's intended function outside of traditional
conversation.
Unspecified room types are possible using [Namespaced Identifiers](/appendices/#common-namespaced-identifier-grammar).
type: string
Expand Down
11 changes: 6 additions & 5 deletions data/event-schemas/schema/m.room.encrypted.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,15 @@ properties:
"1.3": |-
Previously this field was required, however given it offers no additional
security or privacy benefit it has been deprecated for Megolm messages.
See [`m.megolm.v1.aes-sha2`](#mmegolmv1aes-sha2) for more information.
See [`m.megolm.v1.aes-sha2`](/client-server-api/#mmegolmv1aes-sha2) for
more information.
description: |-
The Curve25519 key of the sender. Required (not deprecated) if not using Megolm.
**Deprecated**: This field provides no additional security or privacy benefit
for Megolm messages and must not be read from if the encrypted event is using
Megolm. It should still be included on outgoing messages, however must not be
used to find the corresponding session. See [`m.megolm.v1.aes-sha2`](#mmegolmv1aes-sha2)
used to find the corresponding session. See [`m.megolm.v1.aes-sha2`](/client-server-api/#mmegolmv1aes-sha2)
for more information.
device_id:
type: string
Expand All @@ -62,15 +63,15 @@ properties:
"1.3": |-
Previously this field was required for Megolm messages, however given it
offers no additional security or privacy benefit it has been deprecated
for Megolm messages. See [`m.megolm.v1.aes-sha2`](#mmegolmv1aes-sha2) for
more information.
for Megolm messages. See [`m.megolm.v1.aes-sha2`](/client-server-api/#mmegolmv1aes-sha2)
for more information.
description: |-
The ID of the sending device.
**Deprecated**: This field provides no additional security or privacy benefit
for Megolm messages and must not be read from if the encrypted event is using
Megolm. It should still be included on outgoing messages, however must not be
used to find the corresponding session. See [`m.megolm.v1.aes-sha2`](#mmegolmv1aes-sha2)
used to find the corresponding session. See [`m.megolm.v1.aes-sha2`](/client-server-api/#mmegolmv1aes-sha2)
for more information.
session_id:
type: string
Expand Down
2 changes: 1 addition & 1 deletion data/event-schemas/schema/m.room.member.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ properties:
type: string
description: |-
Usually found on `join` events, this field is used to denote which homeserver (through representation of a user with sufficient power level)
authorised the user's join. More information about this field can be found in the [Restricted Rooms Specification](#restricted-rooms).
authorised the user's join. More information about this field can be found in the [Restricted Rooms Specification](/client-server-api/#restricted-rooms).
Client and server implementations should be aware of the [signing implications](/rooms/v8/#authorization-rules) of including this
field in further events: in particular, the event must be signed by the server which
Expand Down
Loading

0 comments on commit a493acb

Please sign in to comment.