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