Upgrade Swagger data to OpenAPI 3.1 (#1310)
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
This commit is contained in:
parent
c64a616d54
commit
45b6aaf07a
118 changed files with 15064 additions and 12727 deletions
|
@ -12,21 +12,10 @@
|
|||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
swagger: '2.0'
|
||||
openapi: 3.1.0
|
||||
info:
|
||||
title: "Matrix Federation User Device Management API"
|
||||
version: "1.0.0"
|
||||
host: localhost:8448
|
||||
schemes:
|
||||
- https
|
||||
basePath: /_matrix/federation/v1
|
||||
consumes:
|
||||
- application/json
|
||||
produces:
|
||||
- application/json
|
||||
securityDefinitions:
|
||||
$ref: definitions/security.yaml
|
||||
title: Matrix Federation User Device Management API
|
||||
version: 1.0.0
|
||||
paths:
|
||||
"/user/devices/{userId}":
|
||||
get:
|
||||
|
@ -38,80 +27,97 @@ paths:
|
|||
parameters:
|
||||
- in: path
|
||||
name: userId
|
||||
type: string
|
||||
required: true
|
||||
description: |-
|
||||
The user ID to retrieve devices for. Must be a user local to the
|
||||
receiving homeserver.
|
||||
x-example: "@alice:example.org"
|
||||
responses:
|
||||
200:
|
||||
description: The user's devices.
|
||||
example: "@alice:example.org"
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
user_id:
|
||||
type: string
|
||||
description: The user ID devices were requested for.
|
||||
example: "@alice:example.org"
|
||||
stream_id:
|
||||
type: integer
|
||||
description: |-
|
||||
A unique ID for a given user_id which describes the version of
|
||||
the returned device list. This is matched with the `stream_id`
|
||||
field in `m.device_list_update` EDUs in order to incrementally
|
||||
update the returned device_list.
|
||||
example: 5
|
||||
devices:
|
||||
type: array
|
||||
description: The user's devices. May be empty.
|
||||
items:
|
||||
type: object
|
||||
title: User Device
|
||||
properties:
|
||||
device_id:
|
||||
type: string
|
||||
description: The device ID.
|
||||
example: "JLAFKJWSCS"
|
||||
keys:
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
description: The user's devices.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
user_id:
|
||||
type: string
|
||||
description: The user ID devices were requested for.
|
||||
example: "@alice:example.org"
|
||||
stream_id:
|
||||
type: integer
|
||||
description: |-
|
||||
A unique ID for a given user_id which describes the version of
|
||||
the returned device list. This is matched with the `stream_id`
|
||||
field in `m.device_list_update` EDUs in order to incrementally
|
||||
update the returned device_list.
|
||||
example: 5
|
||||
devices:
|
||||
type: array
|
||||
description: The user's devices. May be empty.
|
||||
items:
|
||||
type: object
|
||||
description: Identity keys for the device.
|
||||
allOf:
|
||||
- $ref: "../client-server/definitions/device_keys.yaml"
|
||||
device_display_name:
|
||||
type: string
|
||||
description: Optional display name for the device.
|
||||
example: "Alice's Mobile Phone"
|
||||
required: ['device_id', 'keys']
|
||||
master_key:
|
||||
type: object
|
||||
description: |-
|
||||
The user\'s master cross-signing key.
|
||||
allOf:
|
||||
- $ref: ../client-server/definitions/cross_signing_key.yaml
|
||||
- example: {
|
||||
"user_id": "@alice:example.com",
|
||||
"usage": ["master"],
|
||||
"keys": {
|
||||
"ed25519:base64+master+public+key": "base64+master+public+key",
|
||||
}
|
||||
}
|
||||
self_signing_key:
|
||||
type: object
|
||||
description: |-
|
||||
The user\'s self-signing key.
|
||||
allOf:
|
||||
- $ref: ../client-server/definitions/cross_signing_key.yaml
|
||||
- example: {
|
||||
"user_id": "@alice:example.com",
|
||||
"usage": ["self_signing"],
|
||||
"keys": {
|
||||
"ed25519:base64+self+signing+public+key": "base64+self+signing+master+public+key",
|
||||
},
|
||||
"signatures": {
|
||||
"@alice:example.com": {
|
||||
"ed25519:base64+master+public+key": "signature+of+self+signing+key"
|
||||
}
|
||||
}
|
||||
}
|
||||
required: ['user_id', 'stream_id', 'devices']
|
||||
title: User Device
|
||||
properties:
|
||||
device_id:
|
||||
type: string
|
||||
description: The device ID.
|
||||
example: JLAFKJWSCS
|
||||
keys:
|
||||
type: object
|
||||
description: Identity keys for the device.
|
||||
allOf:
|
||||
- $ref: ../client-server/definitions/device_keys.yaml
|
||||
device_display_name:
|
||||
type: string
|
||||
description: Optional display name for the device.
|
||||
example: Alice's Mobile Phone
|
||||
required:
|
||||
- device_id
|
||||
- keys
|
||||
master_key:
|
||||
type: object
|
||||
description: The user\'s master cross-signing key.
|
||||
allOf:
|
||||
- $ref: ../client-server/definitions/cross_signing_key.yaml
|
||||
- example:
|
||||
user_id: "@alice:example.com"
|
||||
usage:
|
||||
- master
|
||||
keys:
|
||||
ed25519:base64+master+public+key: base64+master+public+key
|
||||
self_signing_key:
|
||||
type: object
|
||||
description: The user\'s self-signing key.
|
||||
allOf:
|
||||
- $ref: ../client-server/definitions/cross_signing_key.yaml
|
||||
- example:
|
||||
user_id: "@alice:example.com"
|
||||
usage:
|
||||
- self_signing
|
||||
keys:
|
||||
ed25519:base64+self+signing+public+key: base64+self+signing+master+public+key
|
||||
signatures:
|
||||
"@alice:example.com":
|
||||
ed25519:base64+master+public+key: signature+of+self+signing+key
|
||||
required:
|
||||
- user_id
|
||||
- stream_id
|
||||
- devices
|
||||
servers:
|
||||
- url: "{protocol}://{hostname}{basePath}"
|
||||
variables:
|
||||
protocol:
|
||||
enum:
|
||||
- http
|
||||
- https
|
||||
default: https
|
||||
hostname:
|
||||
default: localhost:8448
|
||||
basePath:
|
||||
default: /_matrix/federation/v1
|
||||
components:
|
||||
securitySchemes:
|
||||
$ref: definitions/security.yaml
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue