Comparison

mod_rest/openapi.yaml @ 4495:cdc530ec76d6

mod_rest/openapi: Improve ping (XEP-0199) representation
author Kim Alvefur <zash@zash.se>
date Thu, 04 Mar 2021 01:26:41 +0100
parent 4494:aa4dcd4b39c8
child 4496:8e9bff3cde4f
comparison
equal deleted inserted replaced
4494:aa4dcd4b39c8 4495:cdc530ec76d6
1 --- 1 ---
2 openapi: 3.0.1 2 openapi: 3.0.1
3 3
4 info: 4 info:
5 title: mod_rest API 5 title: mod_rest API
6 version: 0.2.1 6 version: 0.3.0
7 description: | 7 description: |
8 API for sending and receiving stanzas, in a REST-ish fashion or by 8 API for sending and receiving stanzas, in a REST-ish fashion or by
9 responding to webhooks. Multiple formats supported, including native XML 9 responding to webhooks. Multiple formats supported, including native XML
10 and a simplified JSON mapping. 10 and a simplified JSON mapping.
11 license: 11 license:
55 - token: [] 55 - token: []
56 parameters: 56 parameters:
57 - $ref: '#/components/parameters/to' 57 - $ref: '#/components/parameters/to'
58 responses: 58 responses:
59 200: 59 200:
60 $ref: '#/components/responses/success' 60 description: Test reachability of some address
61 content:
62 application/json:
63 schema:
64 $ref: '#/components/schemas/iq_pong'
65 application/xmpp+xml:
66 schema:
67 $ref: '#/components/schemas/iq_pong'
68
61 69
62 /rest/version/{to}: 70 /rest/version/{to}:
63 get: 71 get:
64 tags: 72 tags:
65 - query 73 - query
185 $ref: '#/components/schemas/formdata' 193 $ref: '#/components/schemas/formdata'
186 stats: 194 stats:
187 $ref: '#/components/schemas/stats' 195 $ref: '#/components/schemas/stats'
188 error: 196 error:
189 $ref: '#/components/schemas/error' 197 $ref: '#/components/schemas/error'
198
199 iq_pong:
200 description: Test reachability of some XMPP address
201 type: object
202 xml:
203 name: iq
204 properties:
205 type:
206 type: string
207 enum:
208 - result
209 xml:
210 attribute: true
190 211
191 iq_result_version: 212 iq_result_version:
192 description: Version query response 213 description: Version query response
193 type: object 214 type: object
194 xml: 215 xml: