Skip to content

Commit

Permalink
Upgrade Swagger data to OpenAPI 3.1 (#1310)
Browse files Browse the repository at this point in the history
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
  • Loading branch information
zecakeh committed Jun 7, 2023
1 parent c64a616 commit 45b6aaf
Show file tree
Hide file tree
Showing 118 changed files with 14,997 additions and 12,660 deletions.
1 change: 1 addition & 0 deletions changelogs/internal/newsfragments/1310.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Upgrade Swagger data to OpenAPI 3.1.
75 changes: 42 additions & 33 deletions data/api/application-service/ping.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,12 @@
# 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 Application Service API"
version: "1.0.0"
host: localhost:8008
schemes:
- https
- http
basePath: /_matrix/app/v1
produces:
- application/json
securityDefinitions:
$ref: definitions/security.yaml
title: Matrix Application Service API
version: 1.0.0
paths:
"/ping":
/ping:
post:
x-addedInMatrixVersion: "1.7"
summary: Ping the application service
Expand All @@ -39,25 +30,43 @@ paths:
operationId: ping
security:
- homeserverAccessToken: []
parameters:
- in: body
name: body
description: Ping body with optional transaction ID.
schema:
type: object
example: {
"transaction_id": "mautrix-go_1683636478256400935_123"
}
properties:
transaction_id:
type: string
description: |-
A transaction ID for the ping, copied directly from the
`POST /_matrix/client/v1/appservice/{appserviceId}/ping` call.
requestBody:
content:
application/json:
schema:
type: object
example: {
"transaction_id": "mautrix-go_1683636478256400935_123"
}
properties:
transaction_id:
type: string
description: |-
A transaction ID for the ping, copied directly from the
`POST /_matrix/client/v1/appservice/{appserviceId}/ping` call.
description: Ping body with optional transaction ID.
responses:
200:
"200":
description: The provided `hs_token` is valid and the ping request was successful.
examples:
application/json: {}
schema:
type: object
content:
application/json:
schema:
type: object
examples:
response:
value: {}
servers:
- url: "{protocol}://{hostname}{basePath}"
variables:
protocol:
enum:
- http
- https
default: https
hostname:
default: localhost:8008
basePath:
default: /_matrix/app/v1
components:
securitySchemes:
$ref: definitions/security.yaml

0 comments on commit 45b6aaf

Please sign in to comment.