Manual fixes to API files

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
This commit is contained in:
Kévin Commaille 2023-05-09 16:24:43 +02:00
parent 10603b43c3
commit c3a4f5b109
No known key found for this signature in database
GPG key ID: 29A48C1F03620416
33 changed files with 226 additions and 137 deletions

View file

@ -67,6 +67,7 @@ paths:
- visibility - visibility
required: true required: true
security: security:
# again, this is the appservice's token - not a typical client's
- accessToken: [] - accessToken: []
responses: responses:
"200": "200":
@ -94,4 +95,6 @@ servers:
default: /_matrix/client/v3 default: /_matrix/client/v3
components: components:
securitySchemes: securitySchemes:
# Note: this is the same access_token definition used elsewhere in the client
# server API, however this expects an access token for an application service.
$ref: definitions/security.yaml $ref: definitions/security.yaml

View file

@ -38,12 +38,7 @@ paths:
type: string type: string
requestBody: requestBody:
content: content:
application/json: application/octet-stream:
schema:
type: string
example: <bytes>
format: byte
"*/*":
schema: schema:
type: string type: string
example: <bytes> example: <bytes>
@ -146,12 +141,7 @@ paths:
type: string type: string
requestBody: requestBody:
content: content:
application/json: application/octet-stream:
schema:
type: string
example: <bytes>
format: byte
"*/*":
schema: schema:
type: string type: string
example: <bytes> example: <bytes>
@ -168,9 +158,6 @@ paths:
examples: examples:
response: response:
value: {} value: {}
"*/*":
schema:
type: object
"403": "403":
description: |- description: |-
The user does not have permission to upload the content. Some reasons for this error include: The user does not have permission to upload the content. Some reasons for this error include:
@ -192,9 +179,6 @@ paths:
"errcode": "M_FORBIDDEN", "errcode": "M_FORBIDDEN",
"error": "Cannot upload this content" "error": "Cannot upload this content"
} }
"*/*":
schema:
$ref: definitions/errors/error.yaml
"409": "409":
description: |- description: |-
The endpoint was called with a media ID that already has content. A The endpoint was called with a media ID that already has content. A
@ -210,9 +194,6 @@ paths:
"errcode": "M_CANNOT_OVERWRITE_MEDIA", "errcode": "M_CANNOT_OVERWRITE_MEDIA",
"error": "Media already uploaded" "error": "Media already uploaded"
} }
"*/*":
schema:
$ref: definitions/errors/error.yaml
"413": "413":
description: The uploaded content is too large for the server. description: The uploaded content is too large for the server.
content: content:
@ -225,18 +206,12 @@ paths:
"errcode": "M_TOO_LARGE", "errcode": "M_TOO_LARGE",
"error": "Cannot upload files larger than 100mb" "error": "Cannot upload files larger than 100mb"
} }
"*/*":
schema:
$ref: definitions/errors/error.yaml
"429": "429":
description: This request was rate-limited. description: This request was rate-limited.
content: content:
application/json: application/json:
schema: schema:
$ref: definitions/errors/rate_limited.yaml $ref: definitions/errors/rate_limited.yaml
"*/*":
schema:
$ref: definitions/errors/rate_limited.yaml
tags: tags:
- Media - Media
/media/v1/create: /media/v1/create:
@ -266,6 +241,8 @@ paths:
x-addedInMatrixVersion: "1.7" x-addedInMatrixVersion: "1.7"
security: security:
- accessToken: [] - accessToken: []
# empty json object
parameters: []
responses: responses:
"200": "200":
description: The [`mxc://` URI](/client-server-api/#matrix-content-mxc-uris) for description: The [`mxc://` URI](/client-server-api/#matrix-content-mxc-uris) for
@ -371,24 +348,23 @@ paths:
schema: schema:
type: string type: string
content: content:
"*/*": application/octet-stream:
schema: schema:
type: string type: string
# This is a workaround for us not being able to say the response is required.
description: "**Required.** The bytes for the uploaded file." description: "**Required.** The bytes for the uploaded file."
format: binary
"429": "429":
description: This request was rate-limited. description: This request was rate-limited.
content: content:
"*/*": application/json:
schema: schema:
$ref: definitions/errors/rate_limited.yaml $ref: definitions/errors/rate_limited.yaml
"502": "502":
description: The content is too large for the server to serve. description: The content is too large for the server to serve.
content: content:
"*/*": application/json:
schema: schema:
$ref: definitions/errors/error.yaml $ref: definitions/errors/error.yaml
application/json:
examples: examples:
response: response:
value: { value: {
@ -400,10 +376,9 @@ paths:
The content is not yet available. A [standard error response](/client-server-api/#standard-error-response) The content is not yet available. A [standard error response](/client-server-api/#standard-error-response)
will be returned with the `errcode` `M_NOT_YET_UPLOADED`. will be returned with the `errcode` `M_NOT_YET_UPLOADED`.
content: content:
"*/*": application/json:
schema: schema:
$ref: definitions/errors/error.yaml $ref: definitions/errors/error.yaml
application/json:
examples: examples:
response: response:
value: { value: {
@ -485,24 +460,24 @@ paths:
schema: schema:
type: string type: string
content: content:
"*/*": application/octet-stream:
schema: schema:
type: string type: string
# This is a workaround for us not being able to say the response is required.
description: "**Required.** The bytes for the uploaded file." description: "**Required.** The bytes for the uploaded file."
format: binary format: binary
"429": "429":
description: This request was rate-limited. description: This request was rate-limited.
content: content:
"*/*": application/json:
schema: schema:
$ref: definitions/errors/rate_limited.yaml $ref: definitions/errors/rate_limited.yaml
"502": "502":
description: The content is too large for the server to serve. description: The content is too large for the server to serve.
content: content:
"*/*": application/json:
schema: schema:
$ref: definitions/errors/error.yaml $ref: definitions/errors/error.yaml
application/json:
examples: examples:
response: response:
value: { value: {
@ -514,10 +489,9 @@ paths:
The content is not yet available. A [standard error response](/client-server-api/#standard-error-response) The content is not yet available. A [standard error response](/client-server-api/#standard-error-response)
will be returned with the `errcode` `M_NOT_YET_UPLOADED`. will be returned with the `errcode` `M_NOT_YET_UPLOADED`.
content: content:
"*/*": application/json:
schema: schema:
$ref: definitions/errors/error.yaml $ref: definitions/errors/error.yaml
application/json:
examples: examples:
response: response:
value: { value: {
@ -620,11 +594,13 @@ paths:
image/jpeg: image/jpeg:
schema: schema:
type: string type: string
# This is a workaround for us not being able to say the response is required.
description: "**Required.** The bytes for the thumbnail." description: "**Required.** The bytes for the thumbnail."
format: binary format: binary
image/png: image/png:
schema: schema:
type: string type: string
# This is a workaround for us not being able to say the response is required.
description: "**Required.** The bytes for the thumbnail." description: "**Required.** The bytes for the thumbnail."
format: binary format: binary
"400": "400":
@ -633,13 +609,9 @@ paths:
the content. For example, the client requested non-integer dimensions or asked the content. For example, the client requested non-integer dimensions or asked
for negatively-sized images. for negatively-sized images.
content: content:
image/jpeg:
schema:
$ref: definitions/errors/error.yaml
image/png:
schema:
$ref: definitions/errors/error.yaml
application/json: application/json:
schema:
$ref: definitions/errors/error.yaml
examples: examples:
response: response:
value: { value: {
@ -649,13 +621,9 @@ paths:
"413": "413":
description: The local content is too large for the server to thumbnail. description: The local content is too large for the server to thumbnail.
content: content:
image/jpeg:
schema:
$ref: definitions/errors/error.yaml
image/png:
schema:
$ref: definitions/errors/error.yaml
application/json: application/json:
schema:
$ref: definitions/errors/error.yaml
examples: examples:
response: response:
value: { value: {
@ -665,22 +633,15 @@ paths:
"429": "429":
description: This request was rate-limited. description: This request was rate-limited.
content: content:
image/jpeg: application/json:
schema:
$ref: definitions/errors/rate_limited.yaml
image/png:
schema: schema:
$ref: definitions/errors/rate_limited.yaml $ref: definitions/errors/rate_limited.yaml
"502": "502":
description: The remote content is too large for the server to thumbnail. description: The remote content is too large for the server to thumbnail.
content: content:
image/jpeg:
schema:
$ref: definitions/errors/error.yaml
image/png:
schema:
$ref: definitions/errors/error.yaml
application/json: application/json:
schema:
$ref: definitions/errors/error.yaml
examples: examples:
response: response:
value: { value: {
@ -692,13 +653,9 @@ paths:
The content is not yet available. A [standard error response](/client-server-api/#standard-error-response) The content is not yet available. A [standard error response](/client-server-api/#standard-error-response)
will be returned with the `errcode` `M_NOT_YET_UPLOADED`. will be returned with the `errcode` `M_NOT_YET_UPLOADED`.
content: content:
image/jpeg:
schema:
$ref: definitions/errors/error.yaml
image/png:
schema:
$ref: definitions/errors/error.yaml
application/json: application/json:
schema:
$ref: definitions/errors/error.yaml
examples: examples:
response: response:
value: { value: {

View file

@ -17,9 +17,9 @@ type: object
properties: properties:
actions: actions:
items: items:
type: oneOf:
- object - type: object
- string - type: string
type: array type: array
description: |- description: |-
The actions to perform when this rule is matched. The actions to perform when this rule is matched.

View file

@ -124,7 +124,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
type: object type: object # empty json object
examples: examples:
response: response:
value: {} value: {}

View file

@ -16,6 +16,8 @@ info:
title: Matrix Client-Server Room Joining API title: Matrix Client-Server Room Joining API
version: 1.0.0 version: 1.0.0
paths: paths:
# With an extra " " to disambiguate from the 3pid invite endpoint
# The extra space makes it sort first for what I'm sure is a good reason.
"/rooms/{roomId}/invite ": "/rooms/{roomId}/invite ":
post: post:
summary: Invite a user to participate in a particular room. summary: Invite a user to participate in a particular room.

View file

@ -143,8 +143,6 @@ paths:
example: example:
- matrix.org - matrix.org
- elsewhere.ca - elsewhere.ca
style: form
explode: false
schema: schema:
type: array type: array
items: items:

View file

@ -38,6 +38,10 @@ paths:
allOf: allOf:
- $ref: definitions/device_keys.yaml - $ref: definitions/device_keys.yaml
one_time_keys: one_time_keys:
# $ref: "definitions/one_time_keys.yaml"
# XXX: We can't define an actual object here, so we have to hope
# that people will look at the swagger source or can figure it out
# from the other endpoints/example.
type: object type: object
title: OneTimeKeys title: OneTimeKeys
description: |- description: |-
@ -61,6 +65,8 @@ paths:
ed25519:JLAFKJWSCS: IQeCEPb9HFk217cU9kw9EOiusC6kMIkoIRnbnfOh5Oc63S1ghgyjShBGpu34blQomoalCyXWyhaaT3MrLZYQAA ed25519:JLAFKJWSCS: IQeCEPb9HFk217cU9kw9EOiusC6kMIkoIRnbnfOh5Oc63S1ghgyjShBGpu34blQomoalCyXWyhaaT3MrLZYQAA
fallback_keys: fallback_keys:
x-addedInMatrixVersion: "1.2" x-addedInMatrixVersion: "1.2"
# $ref: "definitions/one_time_keys.yaml"
# XXX: We can't define an actual object here - see above.
type: object type: object
title: OneTimeKeys title: OneTimeKeys
description: |- description: |-
@ -346,6 +352,11 @@ paths:
additionalProperties: additionalProperties:
type: object type: object
additionalProperties: additionalProperties:
# $ref: "definitions/one_time_keys.yaml"
# XXX: We can't define an actual object here, so we have to hope
# that people will read the link provided in the description
# and figure it out from the other endpoints/example.
# See also one_time_key parameter for /keys/upload above.
type: object type: object
title: OneTimeKeys title: OneTimeKeys
example: example:

View file

@ -55,8 +55,6 @@ paths:
example: example:
- matrix.org - matrix.org
- elsewhere.ca - elsewhere.ca
style: form
explode: false
schema: schema:
type: array type: array
items: items:

View file

@ -16,6 +16,8 @@ info:
title: Matrix Client-Server Sync Guest API title: Matrix Client-Server Sync Guest API
version: 1.0.0 version: 1.0.0
paths: paths:
# With an extra " " to disambiguate from the getEvents endpoint
# The extra space makes it sort first for what I'm sure is a good reason.
"/events ": "/events ":
get: get:
summary: Listen on the event stream of a particular room. summary: Listen on the event stream of a particular room.

View file

@ -65,7 +65,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
type: object type: object # empty json object
examples: examples:
response: response:
value: {} value: {}
@ -113,8 +113,7 @@ paths:
by this user. by this user.
status_msg: status_msg:
description: The state message for this user if one was set. description: The state message for this user if one was set.
nullable: true type: ["string", "null"]
type: string
currently_active: currently_active:
type: boolean type: boolean
description: Whether the user is currently active description: Whether the user is currently active

View file

@ -53,7 +53,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
type: object type: object # empty json object
examples: examples:
response: response:
value: {} value: {}
@ -139,7 +139,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
type: object type: object # empty json object
examples: examples:
response: response:
value: {} value: {}

View file

@ -174,8 +174,7 @@ paths:
The kind of pusher to configure. `"http"` makes a pusher that The kind of pusher to configure. `"http"` makes a pusher that
sends HTTP pokes. `"email"` makes a pusher that emails the sends HTTP pokes. `"email"` makes a pusher that emails the
user with unread notifications. `null` deletes the pusher. user with unread notifications. `null` deletes the pusher.
nullable: true type: ["string", "null"]
type: string
app_id: app_id:
type: string type: string
description: |- description: |-

View file

@ -350,7 +350,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
type: object type: object # empty json object
examples: examples:
response: response:
value: {} value: {}
@ -487,7 +487,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
type: object type: object # empty json object
examples: examples:
response: response:
value: {} value: {}

View file

@ -89,7 +89,7 @@ paths:
application/json: application/json:
schema: schema:
type: object type: object
maxProperties: 0 maxProperties: 0 # empty json object
examples: examples:
response: response:
value: {} value: {}

View file

@ -66,6 +66,8 @@ paths:
name: kind name: kind
required: false required: false
description: The kind of account to register. Defaults to `user`. description: The kind of account to register. Defaults to `user`.
# swagger-UI overrides the default with the example, so better make the
# example the default.
example: user example: user
schema: schema:
type: string type: string

View file

@ -97,6 +97,8 @@ paths:
- b - b
- f - f
responses: responses:
# note: this endpoint deliberately does not support rate limiting, therefore a
# 429 error response is not included.
"200": "200":
description: |- description: |-
The paginated child events which point to the parent. If no events are The paginated child events which point to the parent. If no events are
@ -161,6 +163,7 @@ paths:
} }
tags: tags:
- Event relationships - Event relationships
# The same as above, with added `/{relType}`
"/rooms/{roomId}/relations/{eventId}/{relType}": "/rooms/{roomId}/relations/{eventId}/{relType}":
get: get:
summary: Get the child events for a given parent event, with a given `relType`. summary: Get the child events for a given parent event, with a given `relType`.
@ -251,6 +254,8 @@ paths:
- b - b
- f - f
responses: responses:
# note: this endpoint deliberately does not support rate limiting, therefore a
# 429 error response is not included.
"200": "200":
description: |- description: |-
The paginated child events which point to the parent. If no events are The paginated child events which point to the parent. If no events are
@ -317,6 +322,7 @@ paths:
} }
tags: tags:
- Event relationships - Event relationships
# The same as above, with added `/{eventType}`
"/rooms/{roomId}/relations/{eventId}/{relType}/{eventType}": "/rooms/{roomId}/relations/{eventId}/{relType}/{eventType}":
get: get:
summary: Get the child events for a given parent event, with a given `relType` summary: Get the child events for a given parent event, with a given `relType`
@ -419,6 +425,8 @@ paths:
- b - b
- f - f
responses: responses:
# note: this endpoint deliberately does not support rate limiting, therefore a
# 429 error response is not included.
"200": "200":
description: |- description: |-
The paginated child events which point to the parent. If no events are The paginated child events which point to the parent. If no events are

View file

@ -200,6 +200,9 @@ paths:
example: YWxsCgpOb25lLDM1ODcwOA example: YWxsCgpOb25lLDM1ODcwOA
schema: schema:
type: string type: string
# XXX: As mentioned in MSC1227, replacing `[not_]membership` with a JSON
# filter might be a better alternative.
# See https://github.com/matrix-org/matrix-doc/issues/1337
- in: query - in: query
name: membership name: membership
description: |- description: |-

View file

@ -70,7 +70,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
type: object type: object # empty json object
examples: examples:
response: response:
value: {} value: {}

View file

@ -52,6 +52,7 @@ paths:
might be and could be "alpha", semantically versioned, or arbitrary. might be and could be "alpha", semantically versioned, or arbitrary.
required: required:
- version - version
# TODO: TravisR - Make this render
additionalProperties: additionalProperties:
type: object type: object
title: Internationalised Policy title: Internationalised Policy

View file

@ -202,7 +202,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
type: object type: object # empty json object
properties: properties:
rejected: rejected:
type: array type: array

View file

@ -40,8 +40,6 @@ paths:
required: true required: true
example: example:
- $abc123:matrix.org - $abc123:matrix.org
style: form
explode: false
schema: schema:
type: array type: array
items: items:

View file

@ -56,20 +56,21 @@ properties:
maxItems: 2 maxItems: 2
minItems: 2 minItems: 2
items: items:
- type: string anyOf:
title: Event ID - type: string
example: "$abc123:matrix.org" title: Event ID
- type: object example: "$abc123:matrix.org"
title: Event Hash - type: object
example: { title: Event Hash
"sha256": "Base64EncodedSha256HashesShouldBe43BytesLong" example: {
} "sha256": "Base64EncodedSha256HashesShouldBe43BytesLong"
properties: }
sha256: properties:
type: string sha256:
description: The event hash. type: string
example: Base64EncodedSha256HashesShouldBe43BytesLong description: The event hash.
required: ['sha256'] example: Base64EncodedSha256HashesShouldBe43BytesLong
required: ['sha256']
depth: depth:
type: integer type: integer
description: |- description: |-
@ -91,20 +92,21 @@ properties:
maxItems: 2 maxItems: 2
minItems: 2 minItems: 2
items: items:
- type: string anyOf:
title: Event ID - type: string
example: "$abc123:matrix.org" title: Event ID
- type: object example: "$abc123:matrix.org"
title: Event Hash - type: object
example: { title: Event Hash
"sha256": "Base64EncodedSha256HashesShouldBe43BytesLong" example: {
} "sha256": "Base64EncodedSha256HashesShouldBe43BytesLong"
properties: }
sha256: properties:
type: string sha256:
description: The event hash. type: string
example: Base64EncodedSha256HashesShouldBe43BytesLong description: The event hash.
required: ['sha256'] example: Base64EncodedSha256HashesShouldBe43BytesLong
required: ['sha256']
redacts: redacts:
type: string type: string
description: For redaction events, the ID of the event being redacted. description: For redaction events, the ID of the event being redacted.

View file

@ -75,6 +75,22 @@ paths:
example: example:
$ref: ../../event-schemas/examples/invite_room_state.json $ref: ../../event-schemas/examples/invite_room_state.json
type: object type: object
example: {
"room_id": "!somewhere:example.org",
"type": "m.room.member",
"state_key": "@joe:elsewhere.com",
"origin": "example.org",
"origin_server_ts": 1549041175876,
"sender": "@someone:example.org",
"content": {
"membership": "invite"
},
"signatures": {
"example.com": {
"ed25519:key_version": "SomeSignatureHere"
},
}
}
required: true required: true
responses: responses:
"200": "200":

View file

@ -78,6 +78,25 @@ paths:
required: required:
- room_version - room_version
- event - event
example: {
"room_version": "2",
"event": {
"room_id": "!somewhere:example.org",
"type": "m.room.member",
"state_key": "@joe:elsewhere.com",
"origin": "example.org",
"origin_server_ts": 1549041175876,
"sender": "@someone:example.org",
"content": {
"membership": "invite"
},
"signatures": {
"example.com": {
"ed25519:key_version": "SomeSignatureHere"
},
}
}
}
required: true required: true
responses: responses:
"200": "200":

View file

@ -49,8 +49,6 @@ paths:
example: example:
- "1" - "1"
- "2" - "2"
style: form
explode: false
schema: schema:
type: array type: array
items: items:
@ -321,6 +319,18 @@ paths:
- origin_server_ts - origin_server_ts
- type - type
- content - content
example: {
"room_id": "!somewhere:example.org",
"type": "m.room.member",
"state_key": "@someone:example.org",
"origin": "example.org",
"origin_server_ts": 1549041175876,
"sender": "@someone:example.org",
"content": {
"membership": "join",
"join_authorised_via_users_server": "@anyone:resident.example.org"
}
}
required: true required: true
responses: responses:
"200": "200":
@ -356,9 +366,6 @@ paths:
description: |- description: |-
The [PDUs](/server-server-api/#pdus) that make up the auth chain. The event format varies depending The [PDUs](/server-server-api/#pdus) that make up the auth chain. The event format varies depending
on the room version - check the [room version specification](/rooms) for precise event formats. on the room version - check the [room version specification](/rooms) for precise event formats.
schema:
type: object
properties: {}
state: state:
type: array type: array
description: |- description: |-
@ -372,9 +379,6 @@ paths:
description: |- description: |-
The [PDUs](/server-server-api/#pdus) for the fully resolved state of the room. The event format varies depending The [PDUs](/server-server-api/#pdus) for the fully resolved state of the room. The event format varies depending
on the room version - check the [room version specification](/rooms) for precise event formats. on the room version - check the [room version specification](/rooms) for precise event formats.
schema:
type: object
properties: {}
required: required:
- auth_chain - auth_chain
- state - state

View file

@ -17,6 +17,7 @@ info:
title: Matrix Federation Join Room API title: Matrix Federation Join Room API
version: 1.0.0 version: 1.0.0
paths: paths:
# Note: there is no v2 of make_join (yet)
"/send_join/{roomId}/{eventId}": "/send_join/{roomId}/{eventId}":
put: put:
summary: Submit a signed join event to a resident server summary: Submit a signed join event to a resident server
@ -138,6 +139,18 @@ paths:
- origin_server_ts - origin_server_ts
- type - type
- content - content
example: {
"room_id": "!somewhere:example.org",
"type": "m.room.member",
"state_key": "@someone:example.org",
"origin": "example.org",
"origin_server_ts": 1549041175876,
"sender": "@someone:example.org",
"content": {
"membership": "join",
"join_authorised_via_users_server": "@anyone:resident.example.org"
}
}
required: true required: true
responses: responses:
"200": "200":
@ -171,9 +184,6 @@ paths:
items: items:
type: object type: object
title: PDU title: PDU
schema:
type: object
properties: {}
x-changedInMatrixVersion: x-changedInMatrixVersion:
"1.6": |- "1.6": |-
reworded to include only consider state events returned in reworded to include only consider state events returned in
@ -190,9 +200,6 @@ paths:
items: items:
type: object type: object
title: PDU title: PDU
schema:
type: object
properties: {}
x-changedInMatrixVersion: x-changedInMatrixVersion:
"1.6": permit omission of membership events. "1.6": permit omission of membership events.
event: event:

View file

@ -88,7 +88,7 @@ paths:
given. given.
additionalProperties: additionalProperties:
type: object type: object
name: ServerName title: ServerName
description: The server names to query. description: The server names to query.
additionalProperties: additionalProperties:
type: object type: object

View file

@ -44,12 +44,10 @@ paths:
- in: query - in: query
name: ver name: ver
description: The room versions the sending server has support for. description: The room versions the sending server has support for.
required: true required: true # knocking was supported in v7
example: example:
- "1" - "1"
- "7" - "7"
style: form
explode: false
schema: schema:
type: array type: array
items: items:
@ -121,7 +119,7 @@ paths:
- content - content
- sender - sender
required: required:
- room_version - room_version # knocking was added in v7
- event - event
examples: examples:
response: response:
@ -273,6 +271,17 @@ paths:
- origin_server_ts - origin_server_ts
- type - type
- content - content
example: {
"room_id": "!somewhere:example.org",
"type": "m.room.member",
"state_key": "@someone:example.org",
"origin": "example.org",
"origin_server_ts": 1549041175876,
"sender": "@someone:example.org",
"content": {
"membership": "knock"
}
}
required: true required: true
responses: responses:
"200": "200":

View file

@ -222,6 +222,17 @@ paths:
- type - type
- depth - depth
- content - content
example: {
"room_id": "!somewhere:example.org",
"type": "m.room.member",
"state_key": "@someone:example.org",
"origin": "example.org",
"origin_server_ts": 1549041175876,
"sender": "@someone:example.org",
"content": {
"membership": "leave"
}
}
required: true required: true
responses: responses:
"200": "200":

View file

@ -17,6 +17,7 @@ info:
title: Matrix Federation Leave Room API title: Matrix Federation Leave Room API
version: 1.0.0 version: 1.0.0
paths: paths:
# Note: there is no v2 of make_leave (yet)
"/send_leave/{roomId}/{eventId}": "/send_leave/{roomId}/{eventId}":
put: put:
summary: Submit a signed leave event to a resident server summary: Submit a signed leave event to a resident server
@ -107,6 +108,17 @@ paths:
- type - type
- depth - depth
- content - content
example: {
"room_id": "!somewhere:example.org",
"type": "m.room.member",
"state_key": "@someone:example.org",
"origin": "example.org",
"origin_server_ts": 1549041175876,
"sender": "@someone:example.org",
"content": {
"membership": "leave"
}
}
required: true required: true
responses: responses:
"200": "200":

View file

@ -159,6 +159,7 @@ paths:
- $ref: ../client-server/definitions/public_rooms_chunk.yaml - $ref: ../client-server/definitions/public_rooms_chunk.yaml
- type: object - type: object
properties: properties:
# Override description of join_rule
join_rule: join_rule:
type: string type: string
description: |- description: |-

View file

@ -151,6 +151,27 @@ paths:
- sender - sender
- state_key - state_key
- content - content
example: {
"type": "m.room.member",
"room_id": "!abc123:matrix.org",
"sender": "@joe:matrix.org",
"state_key": "@someone:example.org",
"content": {
"membership": "invite",
"third_party_invite": {
"display_name": "alice",
"signed": {
"mxid": "@alice:localhost",
"token": "abc123",
"signatures": {
"magic.forest": {
"ed25519:3": "fQpGIW1Snz+pwLZu6sTy2aHy/DYWWTspTJRPyNp0PKkymfIsNffysMl6ObMMFdIJhk6g6pwlIqZ54rxo8SLmAg"
}
}
}
}
}
}
description: A partial `m.room.member` event description: A partial `m.room.member` event
required: true required: true
responses: responses:
@ -225,6 +246,8 @@ paths:
type: string type: string
description: The user ID that sent the invite. description: The user ID that sent the invite.
example: "@bob:matrix.org" example: "@bob:matrix.org"
# TODO (TravisR): Make this reusable when doing IS spec changes
# also make sure it isn't lying about anything, like the key version
signed: signed:
type: object type: object
title: Identity Server Signatures title: Identity Server Signatures
@ -240,6 +263,7 @@ paths:
example: "@alice:matrix.org" example: "@alice:matrix.org"
token: token:
type: string type: string
# TODO: What is this actually?
description: A token. description: A token.
example: Hello World example: Hello World
signatures: signatures:

View file

@ -63,10 +63,13 @@ paths:
See the [Client-Server Key Algorithms](/client-server-api/#key-algorithms) section for more information on See the [Client-Server Key Algorithms](/client-server-api/#key-algorithms) section for more information on
the Key Object format. the Key Object format.
# User
additionalProperties: additionalProperties:
type: object type: object
# Device
additionalProperties: additionalProperties:
type: object type: object
# Key
additionalProperties: additionalProperties:
type: object type: object
title: KeyObject title: KeyObject