mirror of
https://github.com/matrix-org/matrix-spec
synced 2025-12-24 01:58:36 +01:00
According the the openapi spec, examples for responses and schemas should be raw objects rather than being json strings. (It's unclear what non-json examples should look like...). The swagger UI used to support json strings, but no longer does. In short, let's turn the json strings into their raw formats.
78 lines
2.4 KiB
YAML
78 lines
2.4 KiB
YAML
# Copyright 2016 OpenMarket Ltd
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# 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'
|
|
info:
|
|
title: "Matrix Client-Server Voice over IP API"
|
|
version: "1.0.0"
|
|
host: localhost:8008
|
|
schemes:
|
|
- https
|
|
- http
|
|
basePath: /_matrix/client/%CLIENT_MAJOR_VERSION%
|
|
consumes:
|
|
- application/json
|
|
produces:
|
|
- application/json
|
|
securityDefinitions:
|
|
$ref: definitions/security.yaml
|
|
paths:
|
|
"/voip/turnServer":
|
|
get:
|
|
summary: Obtain TURN server credentials.
|
|
description: |-
|
|
This API provides credentials for the client to use when initiating
|
|
calls.
|
|
security:
|
|
- accessToken: []
|
|
responses:
|
|
200:
|
|
description: The TURN server credentials.
|
|
examples:
|
|
application/json: {
|
|
"username":"1443779631:@user:example.com",
|
|
"password":"JlKfBy1QwLrO20385QyAtEyIv0=",
|
|
"uris":[
|
|
"turn:turn.example.com:3478?transport=udp",
|
|
"turn:10.20.30.40:3478?transport=tcp",
|
|
"turns:10.20.30.40:443?transport=tcp"
|
|
],
|
|
"ttl":86400
|
|
}
|
|
schema:
|
|
type: object
|
|
properties:
|
|
username:
|
|
type: string
|
|
description: |-
|
|
The username to use.
|
|
password:
|
|
type: string
|
|
description: |-
|
|
The password to use.
|
|
uris:
|
|
type: array
|
|
items:
|
|
type: string
|
|
description: A list of TURN URIs
|
|
ttl:
|
|
type: integer
|
|
description: The time-to-live in seconds
|
|
required: ["username", "password", "uris", "ttl"]
|
|
429:
|
|
description: This request was rate-limited.
|
|
schema:
|
|
"$ref": "definitions/error.yaml"
|
|
tags:
|
|
- VOIP
|