Mercurial > prosody-modules
annotate mod_rest/openapi.yaml @ 4492:9d576af18611
mod_rest/openapi: Remove 202 response for ping (doesn't happen)
Could return an error, but that's a TODO for now
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 04 Mar 2021 00:43:26 +0100 |
parents | f877a4d3770b |
children | 89571a20196f |
rev | line source |
---|---|
4474
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
1 --- |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
2 openapi: 3.0.1 |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
3 info: |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
4 title: mod_rest API |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
5 description: | |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
6 API for sending and receiving stanzas, in a REST-ish fashion or by |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
7 responding to webhooks. Multiple formats supported, including native XML |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
8 and a simplified JSON mapping. |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
9 version: 0.1.0 |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
10 license: |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
11 name: MIT |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
12 paths: |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
13 /rest: |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
14 post: |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
15 requestBody: |
4487
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
16 $ref: '#/components/requestBodies/common' |
4474
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
17 security: |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
18 - basic: [] |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
19 - token: [] |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
20 summary: Send stanzas and receive responses. Webhooks work the same way. |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
21 responses: |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
22 200: |
4487
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
23 $ref: '#/components/responses/success' |
4474
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
24 202: |
4487
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
25 $ref: '#/components/responses/sent' |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
26 /rest/{kind}/{type}/{to}: |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
27 post: |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
28 security: |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
29 - basic: [] |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
30 - token: [] |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
31 summary: Even more RESTful mapping with certain components in the path. |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
32 parameters: |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
33 - $ref: '#/components/parameters/kind' |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
34 - $ref: '#/components/parameters/type' |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
35 - $ref: '#/components/parameters/to' |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
36 responses: |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
37 200: |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
38 $ref: '#/components/responses/success' |
4478
7ab0c423688a
mod_rest: Support GET for certain IQ queries
Kim Alvefur <zash@zash.se>
parents:
4477
diff
changeset
|
39 /rest/ping/{to}: |
7ab0c423688a
mod_rest: Support GET for certain IQ queries
Kim Alvefur <zash@zash.se>
parents:
4477
diff
changeset
|
40 get: |
7ab0c423688a
mod_rest: Support GET for certain IQ queries
Kim Alvefur <zash@zash.se>
parents:
4477
diff
changeset
|
41 security: |
7ab0c423688a
mod_rest: Support GET for certain IQ queries
Kim Alvefur <zash@zash.se>
parents:
4477
diff
changeset
|
42 - basic: [] |
7ab0c423688a
mod_rest: Support GET for certain IQ queries
Kim Alvefur <zash@zash.se>
parents:
4477
diff
changeset
|
43 - token: [] |
7ab0c423688a
mod_rest: Support GET for certain IQ queries
Kim Alvefur <zash@zash.se>
parents:
4477
diff
changeset
|
44 summary: Ping a local or remote server or other entity |
7ab0c423688a
mod_rest: Support GET for certain IQ queries
Kim Alvefur <zash@zash.se>
parents:
4477
diff
changeset
|
45 responses: |
7ab0c423688a
mod_rest: Support GET for certain IQ queries
Kim Alvefur <zash@zash.se>
parents:
4477
diff
changeset
|
46 200: |
4487
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
47 $ref: '#/components/responses/success' |
4478
7ab0c423688a
mod_rest: Support GET for certain IQ queries
Kim Alvefur <zash@zash.se>
parents:
4477
diff
changeset
|
48 parameters: |
4487
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
49 - $ref: '#/components/parameters/to' |
4478
7ab0c423688a
mod_rest: Support GET for certain IQ queries
Kim Alvefur <zash@zash.se>
parents:
4477
diff
changeset
|
50 /rest/disco/{to}: |
7ab0c423688a
mod_rest: Support GET for certain IQ queries
Kim Alvefur <zash@zash.se>
parents:
4477
diff
changeset
|
51 get: |
7ab0c423688a
mod_rest: Support GET for certain IQ queries
Kim Alvefur <zash@zash.se>
parents:
4477
diff
changeset
|
52 security: |
7ab0c423688a
mod_rest: Support GET for certain IQ queries
Kim Alvefur <zash@zash.se>
parents:
4477
diff
changeset
|
53 - basic: [] |
7ab0c423688a
mod_rest: Support GET for certain IQ queries
Kim Alvefur <zash@zash.se>
parents:
4477
diff
changeset
|
54 - token: [] |
7ab0c423688a
mod_rest: Support GET for certain IQ queries
Kim Alvefur <zash@zash.se>
parents:
4477
diff
changeset
|
55 summary: Query a remote entity for supported features |
7ab0c423688a
mod_rest: Support GET for certain IQ queries
Kim Alvefur <zash@zash.se>
parents:
4477
diff
changeset
|
56 responses: |
7ab0c423688a
mod_rest: Support GET for certain IQ queries
Kim Alvefur <zash@zash.se>
parents:
4477
diff
changeset
|
57 200: |
4487
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
58 $ref: '#/components/responses/success' |
4478
7ab0c423688a
mod_rest: Support GET for certain IQ queries
Kim Alvefur <zash@zash.se>
parents:
4477
diff
changeset
|
59 parameters: |
4487
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
60 - $ref: '#/components/parameters/to' |
4478
7ab0c423688a
mod_rest: Support GET for certain IQ queries
Kim Alvefur <zash@zash.se>
parents:
4477
diff
changeset
|
61 /rest/items/{to}: |
7ab0c423688a
mod_rest: Support GET for certain IQ queries
Kim Alvefur <zash@zash.se>
parents:
4477
diff
changeset
|
62 get: |
7ab0c423688a
mod_rest: Support GET for certain IQ queries
Kim Alvefur <zash@zash.se>
parents:
4477
diff
changeset
|
63 security: |
7ab0c423688a
mod_rest: Support GET for certain IQ queries
Kim Alvefur <zash@zash.se>
parents:
4477
diff
changeset
|
64 - basic: [] |
7ab0c423688a
mod_rest: Support GET for certain IQ queries
Kim Alvefur <zash@zash.se>
parents:
4477
diff
changeset
|
65 - token: [] |
7ab0c423688a
mod_rest: Support GET for certain IQ queries
Kim Alvefur <zash@zash.se>
parents:
4477
diff
changeset
|
66 summary: Query an entity for related services, chat rooms or other items |
7ab0c423688a
mod_rest: Support GET for certain IQ queries
Kim Alvefur <zash@zash.se>
parents:
4477
diff
changeset
|
67 responses: |
7ab0c423688a
mod_rest: Support GET for certain IQ queries
Kim Alvefur <zash@zash.se>
parents:
4477
diff
changeset
|
68 200: |
4487
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
69 $ref: '#/components/responses/success' |
4478
7ab0c423688a
mod_rest: Support GET for certain IQ queries
Kim Alvefur <zash@zash.se>
parents:
4477
diff
changeset
|
70 parameters: |
4487
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
71 - $ref: '#/components/parameters/to' |
4478
7ab0c423688a
mod_rest: Support GET for certain IQ queries
Kim Alvefur <zash@zash.se>
parents:
4477
diff
changeset
|
72 /rest/version/{to}: |
7ab0c423688a
mod_rest: Support GET for certain IQ queries
Kim Alvefur <zash@zash.se>
parents:
4477
diff
changeset
|
73 get: |
7ab0c423688a
mod_rest: Support GET for certain IQ queries
Kim Alvefur <zash@zash.se>
parents:
4477
diff
changeset
|
74 security: |
7ab0c423688a
mod_rest: Support GET for certain IQ queries
Kim Alvefur <zash@zash.se>
parents:
4477
diff
changeset
|
75 - basic: [] |
7ab0c423688a
mod_rest: Support GET for certain IQ queries
Kim Alvefur <zash@zash.se>
parents:
4477
diff
changeset
|
76 - token: [] |
4487
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
77 summary: Ask what software version is used. |
4478
7ab0c423688a
mod_rest: Support GET for certain IQ queries
Kim Alvefur <zash@zash.se>
parents:
4477
diff
changeset
|
78 responses: |
7ab0c423688a
mod_rest: Support GET for certain IQ queries
Kim Alvefur <zash@zash.se>
parents:
4477
diff
changeset
|
79 200: |
4487
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
80 $ref: '#/components/responses/success' |
4478
7ab0c423688a
mod_rest: Support GET for certain IQ queries
Kim Alvefur <zash@zash.se>
parents:
4477
diff
changeset
|
81 parameters: |
4487
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
82 - $ref: '#/components/parameters/to' |
4474
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
83 components: |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
84 schemas: |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
85 stanza: |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
86 properties: |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
87 delay: |
4476 | 88 $ref: '#/components/schemas/delay' |
4474
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
89 state: |
4476 | 90 $ref: '#/components/schemas/state' |
91 type: | |
92 $ref: '#/components/schemas/type' | |
4474
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
93 status: |
4476 | 94 $ref: '#/components/schemas/status' |
4474
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
95 id: |
4476 | 96 $ref: '#/components/schemas/id' |
4474
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
97 replace: |
4476 | 98 $ref: '#/components/schemas/replace' |
4474
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
99 from: |
4476 | 100 $ref: '#/components/schemas/from' |
4474
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
101 body: |
4476 | 102 $ref: '#/components/schemas/body' |
103 kind: | |
104 $ref: '#/components/schemas/kind' | |
4474
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
105 show: |
4476 | 106 $ref: '#/components/schemas/show' |
4474
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
107 stats: |
4476 | 108 $ref: '#/components/schemas/stats' |
4474
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
109 priority: |
4476 | 110 $ref: '#/components/schemas/priority' |
111 nick: | |
112 $ref: '#/components/schemas/nick' | |
4474
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
113 to: |
4476 | 114 $ref: '#/components/schemas/to' |
115 ping: | |
116 $ref: '#/components/schemas/ping' | |
117 subject: | |
118 $ref: '#/components/schemas/subject' | |
4474
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
119 lang: |
4476 | 120 $ref: '#/components/schemas/lang' |
4474
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
121 join: |
4476 | 122 $ref: '#/components/schemas/join' |
123 html: | |
124 $ref: '#/components/schemas/html' | |
4474
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
125 dataform: |
4476 | 126 $ref: '#/components/schemas/dataform' |
4474
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
127 version: |
4476 | 128 $ref: '#/components/schemas/version' |
4474
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
129 payload: |
4476 | 130 $ref: '#/components/schemas/payload' |
4474
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
131 disco: |
4476 | 132 $ref: '#/components/schemas/disco' |
4474
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
133 oob_url: |
4476 | 134 $ref: '#/components/schemas/oob_url' |
135 items: | |
136 $ref: '#/components/schemas/items' | |
137 formdata: | |
138 $ref: '#/components/schemas/formdata' | |
139 thread: | |
140 $ref: '#/components/schemas/thread' | |
141 command: | |
142 $ref: '#/components/schemas/command' | |
4479
356b5ad521a5
mod_rest: Add schema for errors
Kim Alvefur <zash@zash.se>
parents:
4478
diff
changeset
|
143 error: |
356b5ad521a5
mod_rest: Add schema for errors
Kim Alvefur <zash@zash.se>
parents:
4478
diff
changeset
|
144 $ref: '#/components/schemas/error' |
4474
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
145 type: object |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
146 example: |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
147 body: Hello |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
148 type: chat |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
149 kind: message |
4476 | 150 to: alice@example.com |
4474
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
151 state: active |
4476 | 152 delay: |
153 type: string | |
154 description: Timestamp of when a stanza was delayed, in ISO 8601 / XEP-0082 | |
155 format. | |
156 state: | |
157 enum: | |
158 - active | |
159 - inactive | |
160 - gone | |
161 - composing | |
162 - paused | |
163 description: Chat state notifications, e.g. "is typing..." | |
164 type: string | |
165 example: composing | |
166 thread: | |
167 type: string | |
168 description: Message thread identifier | |
169 status: | |
170 type: string | |
171 description: Textual status message. | |
172 id: | |
173 type: string | |
174 description: Reasonably unique id. mod_rest generates one if left out. | |
175 replace: | |
176 type: string | |
177 description: ID of message being replaced (e.g. for corrections) | |
178 from: | |
179 description: the sender | |
180 type: string | |
181 example: bob@localhost.example | |
182 body: | |
183 description: Human-readable chat message | |
184 type: string | |
185 example: Hello, World! | |
186 command: | |
187 oneOf: | |
188 - type: string | |
189 - type: object | |
190 properties: | |
191 data: | |
4486
4f41678ba00d
mod_rest/openapi: Fix dataform references
Kim Alvefur <zash@zash.se>
parents:
4479
diff
changeset
|
192 $ref: '#/components/schemas/formdata' |
4476 | 193 action: |
194 type: string | |
195 note: | |
196 type: object | |
197 properties: | |
198 text: | |
199 type: string | |
200 type: | |
201 type: string | |
202 enum: | |
203 - info | |
204 - warn | |
205 - error | |
206 form: | |
4486
4f41678ba00d
mod_rest/openapi: Fix dataform references
Kim Alvefur <zash@zash.se>
parents:
4479
diff
changeset
|
207 $ref: '#/components/schemas/dataform' |
4476 | 208 sessionid: |
209 type: string | |
210 status: | |
211 type: string | |
212 node: | |
213 type: string | |
214 actions: | |
215 type: object | |
216 properties: | |
217 complete: | |
218 type: boolean | |
219 prev: | |
220 type: boolean | |
221 next: | |
222 type: boolean | |
223 execute: | |
224 type: string | |
225 description: Ad-hoc commands. | |
226 show: | |
227 description: indicator of availability, ie away or not | |
228 type: string | |
229 enum: | |
230 - away | |
231 - chat | |
232 - dnd | |
233 - xa | |
234 stats: | |
235 description: Statistics | |
236 type: array | |
237 items: | |
238 type: object | |
239 properties: | |
240 name: | |
241 type: string | |
242 unit: | |
243 type: string | |
244 value: | |
245 type: string | |
246 priority: | |
247 type: string | |
248 description: presence priority | |
249 kind: | |
250 description: Which kind of stanza | |
251 type: string | |
252 enum: | |
253 - message | |
254 - presence | |
255 - iq | |
256 to: | |
257 description: recipient | |
258 type: string | |
259 example: alice@example.com | |
260 type: | |
261 description: Stanza type | |
262 type: string | |
263 enum: | |
264 - chat | |
265 - normal | |
266 - headline | |
267 - groupchat | |
268 - get | |
269 - set | |
270 - result | |
271 - available | |
272 - unavailable | |
273 - subscribe | |
274 - subscribed | |
275 - unsubscribe | |
276 - unsubscribed | |
277 lang: | |
278 description: Language code | |
279 type: string | |
280 example: en | |
281 formdata: | |
282 additionalProperties: | |
283 oneOf: | |
284 - type: string | |
285 - type: array | |
286 items: | |
287 type: string | |
288 type: object | |
289 description: Simplified data form | |
290 join: | |
291 description: For joining Multi-User-Chats | |
292 type: boolean | |
293 enum: | |
294 - true | |
295 dataform: | |
296 properties: | |
297 title: | |
298 type: string | |
299 fields: | |
300 type: array | |
301 items: | |
302 type: object | |
303 properties: | |
304 value: | |
305 oneOf: | |
306 - type: string | |
307 - type: array | |
308 items: | |
309 type: string | |
310 type: | |
311 type: string | |
312 label: | |
313 type: string | |
314 desc: | |
315 type: string | |
316 required: | |
317 type: boolean | |
318 var: | |
319 type: string | |
320 type: | |
321 type: string | |
322 enum: | |
323 - form | |
324 - submit | |
325 - cancel | |
326 - result | |
327 instructions: | |
328 type: string | |
329 description: Data form | |
330 type: object | |
331 items: | |
332 oneOf: | |
333 - description: An items query or empty list | |
334 type: boolean | |
335 enum: | |
336 - true | |
337 - type: string | |
338 description: A query with a node, or an empty reply list with a node | |
339 - description: List of items referenced | |
340 type: array | |
341 items: | |
342 properties: | |
343 jid: | |
344 type: string | |
345 description: Address of item | |
346 node: | |
347 type: string | |
348 name: | |
349 type: string | |
350 description: Descriptive name | |
351 required: | |
352 - jid | |
353 type: object | |
354 description: List of references to other entities | |
355 version: | |
356 oneOf: | |
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 | |
370 payload: | |
371 required: | |
372 - datatype | |
373 - data | |
374 properties: | |
375 data: | |
376 type: object | |
377 datatype: | |
378 type: string | |
379 description: A piece of arbitrary JSON with a type field attached | |
380 type: object | |
381 disco: | |
382 oneOf: | |
383 - type: boolean | |
384 description: Either a query, or an empty response | |
385 - type: string | |
386 description: A query with a node, or an empty response with a node | |
387 - properties: | |
388 features: | |
389 description: List of URIs indicating supported features | |
390 type: array | |
391 items: | |
392 type: string | |
393 identities: | |
394 items: | |
395 type: object | |
396 properties: | |
397 name: | |
398 type: string | |
399 type: | |
400 type: string | |
401 category: | |
402 type: string | |
403 description: List of abstract identities or types that describe the | |
404 entity | |
405 type: array | |
406 example: | |
407 - name: Prosody | |
408 type: im | |
409 category: server | |
410 node: | |
411 type: string | |
412 extensions: | |
413 type: object | |
414 description: A full response | |
415 type: object | |
416 description: Discover supported features | |
417 oob_url: | |
418 type: string | |
419 description: URL of an attached media file. | |
420 html: | |
421 description: HTML version of 'body' | |
422 type: string | |
423 example: <body><p>Hello!</p></body> | |
424 subject: | |
425 description: Subject of message or group chat | |
426 type: string | |
427 example: Talking about stuff | |
428 ping: | |
429 description: A ping. | |
430 type: boolean | |
431 enum: | |
432 - true | |
433 nick: | |
434 type: string | |
435 description: Nickname of the sender | |
4479
356b5ad521a5
mod_rest: Add schema for errors
Kim Alvefur <zash@zash.se>
parents:
4478
diff
changeset
|
436 error: |
356b5ad521a5
mod_rest: Add schema for errors
Kim Alvefur <zash@zash.se>
parents:
4478
diff
changeset
|
437 type: object |
356b5ad521a5
mod_rest: Add schema for errors
Kim Alvefur <zash@zash.se>
parents:
4478
diff
changeset
|
438 description: Description of something gone wrong. See the Stanza Errors section in RFC 6120. |
356b5ad521a5
mod_rest: Add schema for errors
Kim Alvefur <zash@zash.se>
parents:
4478
diff
changeset
|
439 properties: |
356b5ad521a5
mod_rest: Add schema for errors
Kim Alvefur <zash@zash.se>
parents:
4478
diff
changeset
|
440 type: |
356b5ad521a5
mod_rest: Add schema for errors
Kim Alvefur <zash@zash.se>
parents:
4478
diff
changeset
|
441 description: General category of error |
356b5ad521a5
mod_rest: Add schema for errors
Kim Alvefur <zash@zash.se>
parents:
4478
diff
changeset
|
442 type: string |
356b5ad521a5
mod_rest: Add schema for errors
Kim Alvefur <zash@zash.se>
parents:
4478
diff
changeset
|
443 enum: |
356b5ad521a5
mod_rest: Add schema for errors
Kim Alvefur <zash@zash.se>
parents:
4478
diff
changeset
|
444 - auth |
356b5ad521a5
mod_rest: Add schema for errors
Kim Alvefur <zash@zash.se>
parents:
4478
diff
changeset
|
445 - cancel |
356b5ad521a5
mod_rest: Add schema for errors
Kim Alvefur <zash@zash.se>
parents:
4478
diff
changeset
|
446 - continue |
356b5ad521a5
mod_rest: Add schema for errors
Kim Alvefur <zash@zash.se>
parents:
4478
diff
changeset
|
447 - modify |
356b5ad521a5
mod_rest: Add schema for errors
Kim Alvefur <zash@zash.se>
parents:
4478
diff
changeset
|
448 - wait |
356b5ad521a5
mod_rest: Add schema for errors
Kim Alvefur <zash@zash.se>
parents:
4478
diff
changeset
|
449 condition: |
356b5ad521a5
mod_rest: Add schema for errors
Kim Alvefur <zash@zash.se>
parents:
4478
diff
changeset
|
450 description: Specific error condition. |
356b5ad521a5
mod_rest: Add schema for errors
Kim Alvefur <zash@zash.se>
parents:
4478
diff
changeset
|
451 type: string |
356b5ad521a5
mod_rest: Add schema for errors
Kim Alvefur <zash@zash.se>
parents:
4478
diff
changeset
|
452 # enum: [ full list available in RFC 6120 ] |
356b5ad521a5
mod_rest: Add schema for errors
Kim Alvefur <zash@zash.se>
parents:
4478
diff
changeset
|
453 code: |
356b5ad521a5
mod_rest: Add schema for errors
Kim Alvefur <zash@zash.se>
parents:
4478
diff
changeset
|
454 description: Legacy numeric error code. Similar to HTTP status codes. |
356b5ad521a5
mod_rest: Add schema for errors
Kim Alvefur <zash@zash.se>
parents:
4478
diff
changeset
|
455 type: integer |
356b5ad521a5
mod_rest: Add schema for errors
Kim Alvefur <zash@zash.se>
parents:
4478
diff
changeset
|
456 text: |
356b5ad521a5
mod_rest: Add schema for errors
Kim Alvefur <zash@zash.se>
parents:
4478
diff
changeset
|
457 description: Description of error intended for human eyes. |
356b5ad521a5
mod_rest: Add schema for errors
Kim Alvefur <zash@zash.se>
parents:
4478
diff
changeset
|
458 type: string |
4474
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
459 securitySchemes: |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
460 token: |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
461 description: Tokens from mod_http_oauth2. |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
462 scheme: Bearer |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
463 type: http |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
464 basic: |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
465 description: Use JID as username. |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
466 scheme: Basic |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
467 type: http |
4487
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
468 requestBodies: |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
469 common: |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
470 required: true |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
471 content: |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
472 application/x-www-form-urlencoded: |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
473 schema: |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
474 description: A subset of the JSON schema, only top level string fields. |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
475 application/xmpp+xml: |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
476 schema: |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
477 description: Single XMPP stanza in XML format. |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
478 application/json: |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
479 schema: |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
480 $ref: '#/components/schemas/stanza' |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
481 responses: |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
482 success: |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
483 description: The stanza was sent and returned a response. |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
484 content: |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
485 application/json: |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
486 schema: |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
487 $ref: '#/components/schemas/stanza' |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
488 application/xmpp+xml: |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
489 schema: |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
490 description: Single XMPP stanza in XML format. |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
491 example: <message><body>Hello</body></message> |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
492 application/x-www-form-urlencoded: |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
493 schema: |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
494 description: A subset of the JSON schema, only top level string fields. |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
495 example: body=Hello |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
496 text/plain: |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
497 schema: |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
498 description: Plain text response used as message body. |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
499 example: Hello |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
500 type: string |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
501 sent: |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
502 description: The stanza was sent without problem, and without response, |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
503 so an empty reply. |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
504 parameters: |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
505 to: |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
506 name: to |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
507 in: path |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
508 required: true |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
509 schema: |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
510 $ref: '#/components/schemas/to' |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
511 kind: |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
512 name: kind |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
513 in: path |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
514 required: true |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
515 schema: |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
516 $ref: '#/components/schemas/kind' |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
517 type: |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
518 name: type |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
519 in: path |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
520 required: true |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
521 schema: |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
522 $ref: '#/components/schemas/type' |
f877a4d3770b
mod_rest/openapi: Deduplicate things using references
Kim Alvefur <zash@zash.se>
parents:
4486
diff
changeset
|
523 |
4474
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
524 ... |