Software /
code /
prosody-modules
Comparison
mod_rest/openapi.yaml @ 4493:89571a20196f
mod_rest/openapi: Describe 'version' endpoint in more detail
Use the limited xml "support" in openapi to show both forms of the
response.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 04 Mar 2021 00:44:15 +0100 |
parent | 4492:9d576af18611 |
child | 4494:aa4dcd4b39c8 |
comparison
equal
deleted
inserted
replaced
4492:9d576af18611 | 4493:89571a20196f |
---|---|
4 title: mod_rest API | 4 title: mod_rest API |
5 description: | | 5 description: | |
6 API for sending and receiving stanzas, in a REST-ish fashion or by | 6 API for sending and receiving stanzas, in a REST-ish fashion or by |
7 responding to webhooks. Multiple formats supported, including native XML | 7 responding to webhooks. Multiple formats supported, including native XML |
8 and a simplified JSON mapping. | 8 and a simplified JSON mapping. |
9 version: 0.1.0 | 9 version: 0.2.0 |
10 license: | 10 license: |
11 name: MIT | 11 name: MIT |
12 paths: | 12 paths: |
13 /rest: | 13 /rest: |
14 post: | 14 post: |
75 - basic: [] | 75 - basic: [] |
76 - token: [] | 76 - token: [] |
77 summary: Ask what software version is used. | 77 summary: Ask what software version is used. |
78 responses: | 78 responses: |
79 200: | 79 200: |
80 $ref: '#/components/responses/success' | 80 description: Version query response |
81 content: | |
82 application/json: | |
83 schema: | |
84 $ref: '#/components/schemas/iq_result_version' | |
85 application/xmpp+xml: | |
86 schema: | |
87 $ref: '#/components/schemas/iq_result_version' | |
81 parameters: | 88 parameters: |
82 - $ref: '#/components/parameters/to' | 89 - $ref: '#/components/parameters/to' |
83 components: | 90 components: |
84 schemas: | 91 schemas: |
85 stanza: | 92 stanza: |
123 html: | 130 html: |
124 $ref: '#/components/schemas/html' | 131 $ref: '#/components/schemas/html' |
125 dataform: | 132 dataform: |
126 $ref: '#/components/schemas/dataform' | 133 $ref: '#/components/schemas/dataform' |
127 version: | 134 version: |
128 $ref: '#/components/schemas/version' | 135 oneOf: |
136 - $ref: '#/components/schemas/version' | |
137 - type: boolean | |
129 payload: | 138 payload: |
130 $ref: '#/components/schemas/payload' | 139 $ref: '#/components/schemas/payload' |
131 disco: | 140 disco: |
132 $ref: '#/components/schemas/disco' | 141 $ref: '#/components/schemas/disco' |
133 oob_url: | 142 oob_url: |
350 description: Descriptive name | 359 description: Descriptive name |
351 required: | 360 required: |
352 - jid | 361 - jid |
353 type: object | 362 type: object |
354 description: List of references to other entities | 363 description: List of references to other entities |
364 | |
365 iq_result_version: | |
366 description: Version query response | |
367 type: object | |
368 xml: | |
369 name: iq | |
370 properties: | |
371 type: | |
372 type: string | |
373 enum: | |
374 - result | |
375 xml: | |
376 attribute: true | |
377 version: | |
378 $ref: '#/components/schemas/version' | |
379 | |
355 version: | 380 version: |
356 oneOf: | 381 type: object |
357 - type: boolean | |
358 - properties: | |
359 version: | |
360 type: string | |
361 name: | |
362 type: string | |
363 os: | |
364 type: string | |
365 required: | |
366 - name | |
367 - version | |
368 type: object | |
369 description: Software version query | 382 description: Software version query |
383 properties: | |
384 name: | |
385 type: string | |
386 example: My Software | |
387 version: | |
388 type: string | |
389 example: 1.0.0 | |
390 os: | |
391 type: string | |
392 example: Linux | |
393 required: | |
394 - name | |
395 - version | |
396 xml: | |
397 name: query | |
398 namespace: jabber:iq:version | |
370 payload: | 399 payload: |
371 required: | 400 required: |
372 - datatype | 401 - datatype |
373 - data | 402 - data |
374 properties: | 403 properties: |