Software /
code /
prosody-modules
Annotate
mod_rest/openapi.yaml @ 4477:8df6cc648963
mod_rest: Add more REST-looking way to send stanzas
Example:
POST /rest/message/chat/juliet@example.net
{ body: "Hello" }
Becomes equivalent to
POST /rest
{ kind: "message", type: "chat", to: "juliet@example.net", body: "Hello" }
Sending messages as plain/text also becomes more convenient.
IQ stazas are still weird, but we'll do something special for those.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 28 Feb 2021 19:25:45 +0100 |
parent | 4476:125279f4a5b8 |
child | 4478:7ab0c423688a |
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: |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
16 required: true |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
17 content: |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
18 application/x-www-form-urlencoded: |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
19 schema: |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
20 description: A subset of the JSON schema, only top level string fields. |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
21 application/xmpp+xml: |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
22 schema: |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
23 description: Single XMPP stanza in XML format. |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
24 application/json: |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
25 schema: |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
26 $ref: '#/components/schemas/stanza' |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
27 security: |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
28 - basic: [] |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
29 - token: [] |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
30 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
|
31 responses: |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
32 200: |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
33 content: |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
34 text/plain: |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
35 schema: |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
36 description: Plain text response used as message body. |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
37 example: Hello |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
38 type: string |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
39 application/x-www-form-urlencoded: |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
40 schema: |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
41 description: A subset of the JSON schema, only top level string fields. |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
42 example: body=Hello |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
43 application/xmpp+xml: |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
44 schema: |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
45 description: Single XMPP stanza in XML format. |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
46 example: <message><body>Hello</body></message> |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
47 application/json: |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
48 schema: |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
49 $ref: '#/components/schemas/stanza' |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
50 description: The stanza was sent and returned a response. |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
51 401: |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
52 description: No credentials or auth token were provided. |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
53 202: |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
54 description: The stanza was sent without problem, and without response, |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
55 so an empty reply. |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
56 403: |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
57 description: Provided credentials or token not accepted. |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
58 400: |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
59 description: There was a syntax problem in the payload. |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
60 422: |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
61 description: The was a problem with the format (but not the syntax) of the |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
62 payload. |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
63 415: |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
64 description: Unsupported mediatype. |
4477
8df6cc648963
mod_rest: Add more REST-looking way to send stanzas
Kim Alvefur <zash@zash.se>
parents:
4476
diff
changeset
|
65 /rest/{kind}/{type}/{to}: |
8df6cc648963
mod_rest: Add more REST-looking way to send stanzas
Kim Alvefur <zash@zash.se>
parents:
4476
diff
changeset
|
66 post: |
8df6cc648963
mod_rest: Add more REST-looking way to send stanzas
Kim Alvefur <zash@zash.se>
parents:
4476
diff
changeset
|
67 responses: |
8df6cc648963
mod_rest: Add more REST-looking way to send stanzas
Kim Alvefur <zash@zash.se>
parents:
4476
diff
changeset
|
68 200: |
8df6cc648963
mod_rest: Add more REST-looking way to send stanzas
Kim Alvefur <zash@zash.se>
parents:
4476
diff
changeset
|
69 description: Okay |
8df6cc648963
mod_rest: Add more REST-looking way to send stanzas
Kim Alvefur <zash@zash.se>
parents:
4476
diff
changeset
|
70 security: |
8df6cc648963
mod_rest: Add more REST-looking way to send stanzas
Kim Alvefur <zash@zash.se>
parents:
4476
diff
changeset
|
71 - basic: [] |
8df6cc648963
mod_rest: Add more REST-looking way to send stanzas
Kim Alvefur <zash@zash.se>
parents:
4476
diff
changeset
|
72 - token: [] |
8df6cc648963
mod_rest: Add more REST-looking way to send stanzas
Kim Alvefur <zash@zash.se>
parents:
4476
diff
changeset
|
73 summary: Even more RESTful mapping. |
8df6cc648963
mod_rest: Add more REST-looking way to send stanzas
Kim Alvefur <zash@zash.se>
parents:
4476
diff
changeset
|
74 parameters: |
8df6cc648963
mod_rest: Add more REST-looking way to send stanzas
Kim Alvefur <zash@zash.se>
parents:
4476
diff
changeset
|
75 - name: kind |
8df6cc648963
mod_rest: Add more REST-looking way to send stanzas
Kim Alvefur <zash@zash.se>
parents:
4476
diff
changeset
|
76 in: path |
8df6cc648963
mod_rest: Add more REST-looking way to send stanzas
Kim Alvefur <zash@zash.se>
parents:
4476
diff
changeset
|
77 required: true |
8df6cc648963
mod_rest: Add more REST-looking way to send stanzas
Kim Alvefur <zash@zash.se>
parents:
4476
diff
changeset
|
78 schema: |
8df6cc648963
mod_rest: Add more REST-looking way to send stanzas
Kim Alvefur <zash@zash.se>
parents:
4476
diff
changeset
|
79 $ref: '#/components/schemas/kind' |
8df6cc648963
mod_rest: Add more REST-looking way to send stanzas
Kim Alvefur <zash@zash.se>
parents:
4476
diff
changeset
|
80 - name: type |
8df6cc648963
mod_rest: Add more REST-looking way to send stanzas
Kim Alvefur <zash@zash.se>
parents:
4476
diff
changeset
|
81 in: path |
8df6cc648963
mod_rest: Add more REST-looking way to send stanzas
Kim Alvefur <zash@zash.se>
parents:
4476
diff
changeset
|
82 required: true |
8df6cc648963
mod_rest: Add more REST-looking way to send stanzas
Kim Alvefur <zash@zash.se>
parents:
4476
diff
changeset
|
83 schema: |
8df6cc648963
mod_rest: Add more REST-looking way to send stanzas
Kim Alvefur <zash@zash.se>
parents:
4476
diff
changeset
|
84 $ref: '#/components/schemas/type' |
8df6cc648963
mod_rest: Add more REST-looking way to send stanzas
Kim Alvefur <zash@zash.se>
parents:
4476
diff
changeset
|
85 - name: to |
8df6cc648963
mod_rest: Add more REST-looking way to send stanzas
Kim Alvefur <zash@zash.se>
parents:
4476
diff
changeset
|
86 in: path |
8df6cc648963
mod_rest: Add more REST-looking way to send stanzas
Kim Alvefur <zash@zash.se>
parents:
4476
diff
changeset
|
87 required: true |
8df6cc648963
mod_rest: Add more REST-looking way to send stanzas
Kim Alvefur <zash@zash.se>
parents:
4476
diff
changeset
|
88 schema: |
8df6cc648963
mod_rest: Add more REST-looking way to send stanzas
Kim Alvefur <zash@zash.se>
parents:
4476
diff
changeset
|
89 $ref: '#/components/schemas/to' |
4474
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
90 components: |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
91 schemas: |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
92 stanza: |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
93 properties: |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
94 delay: |
4476 | 95 $ref: '#/components/schemas/delay' |
4474
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
96 state: |
4476 | 97 $ref: '#/components/schemas/state' |
98 type: | |
99 $ref: '#/components/schemas/type' | |
4474
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
100 status: |
4476 | 101 $ref: '#/components/schemas/status' |
4474
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
102 id: |
4476 | 103 $ref: '#/components/schemas/id' |
4474
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
104 replace: |
4476 | 105 $ref: '#/components/schemas/replace' |
4474
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
106 from: |
4476 | 107 $ref: '#/components/schemas/from' |
4474
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
108 body: |
4476 | 109 $ref: '#/components/schemas/body' |
110 kind: | |
111 $ref: '#/components/schemas/kind' | |
4474
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
112 show: |
4476 | 113 $ref: '#/components/schemas/show' |
4474
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
114 stats: |
4476 | 115 $ref: '#/components/schemas/stats' |
4474
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
116 priority: |
4476 | 117 $ref: '#/components/schemas/priority' |
118 nick: | |
119 $ref: '#/components/schemas/nick' | |
4474
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
120 to: |
4476 | 121 $ref: '#/components/schemas/to' |
122 ping: | |
123 $ref: '#/components/schemas/ping' | |
124 subject: | |
125 $ref: '#/components/schemas/subject' | |
4474
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
126 lang: |
4476 | 127 $ref: '#/components/schemas/lang' |
4474
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
128 join: |
4476 | 129 $ref: '#/components/schemas/join' |
130 html: | |
131 $ref: '#/components/schemas/html' | |
4474
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
132 dataform: |
4476 | 133 $ref: '#/components/schemas/dataform' |
4474
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
134 version: |
4476 | 135 $ref: '#/components/schemas/version' |
4474
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
136 payload: |
4476 | 137 $ref: '#/components/schemas/payload' |
4474
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
138 disco: |
4476 | 139 $ref: '#/components/schemas/disco' |
4474
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
140 oob_url: |
4476 | 141 $ref: '#/components/schemas/oob_url' |
142 items: | |
143 $ref: '#/components/schemas/items' | |
144 formdata: | |
145 $ref: '#/components/schemas/formdata' | |
146 thread: | |
147 $ref: '#/components/schemas/thread' | |
148 command: | |
149 $ref: '#/components/schemas/command' | |
4474
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
150 type: object |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
151 example: |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
152 body: Hello |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
153 type: chat |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
154 kind: message |
4476 | 155 to: alice@example.com |
4474
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
156 state: active |
4476 | 157 delay: |
158 type: string | |
159 description: Timestamp of when a stanza was delayed, in ISO 8601 / XEP-0082 | |
160 format. | |
161 state: | |
162 enum: | |
163 - active | |
164 - inactive | |
165 - gone | |
166 - composing | |
167 - paused | |
168 description: Chat state notifications, e.g. "is typing..." | |
169 type: string | |
170 example: composing | |
171 thread: | |
172 type: string | |
173 description: Message thread identifier | |
174 status: | |
175 type: string | |
176 description: Textual status message. | |
177 id: | |
178 type: string | |
179 description: Reasonably unique id. mod_rest generates one if left out. | |
180 replace: | |
181 type: string | |
182 description: ID of message being replaced (e.g. for corrections) | |
183 from: | |
184 description: the sender | |
185 type: string | |
186 example: bob@localhost.example | |
187 body: | |
188 description: Human-readable chat message | |
189 type: string | |
190 example: Hello, World! | |
191 command: | |
192 oneOf: | |
193 - type: string | |
194 - type: object | |
195 properties: | |
196 data: | |
197 $ref: '#/components/schemas/stanza/properties/formdata' | |
198 action: | |
199 type: string | |
200 note: | |
201 type: object | |
202 properties: | |
203 text: | |
204 type: string | |
205 type: | |
206 type: string | |
207 enum: | |
208 - info | |
209 - warn | |
210 - error | |
211 form: | |
212 $ref: '#/components/schemas/stanza/properties/dataform' | |
213 sessionid: | |
214 type: string | |
215 status: | |
216 type: string | |
217 node: | |
218 type: string | |
219 actions: | |
220 type: object | |
221 properties: | |
222 complete: | |
223 type: boolean | |
224 prev: | |
225 type: boolean | |
226 next: | |
227 type: boolean | |
228 execute: | |
229 type: string | |
230 description: Ad-hoc commands. | |
231 show: | |
232 description: indicator of availability, ie away or not | |
233 type: string | |
234 enum: | |
235 - away | |
236 - chat | |
237 - dnd | |
238 - xa | |
239 stats: | |
240 description: Statistics | |
241 type: array | |
242 items: | |
243 type: object | |
244 properties: | |
245 name: | |
246 type: string | |
247 unit: | |
248 type: string | |
249 value: | |
250 type: string | |
251 priority: | |
252 type: string | |
253 description: presence priority | |
254 kind: | |
255 description: Which kind of stanza | |
256 type: string | |
257 enum: | |
258 - message | |
259 - presence | |
260 - iq | |
261 to: | |
262 description: recipient | |
263 type: string | |
264 example: alice@example.com | |
265 type: | |
266 description: Stanza type | |
267 type: string | |
268 enum: | |
269 - chat | |
270 - normal | |
271 - headline | |
272 - groupchat | |
273 - get | |
274 - set | |
275 - result | |
276 - available | |
277 - unavailable | |
278 - subscribe | |
279 - subscribed | |
280 - unsubscribe | |
281 - unsubscribed | |
282 lang: | |
283 description: Language code | |
284 type: string | |
285 example: en | |
286 formdata: | |
287 additionalProperties: | |
288 oneOf: | |
289 - type: string | |
290 - type: array | |
291 items: | |
292 type: string | |
293 type: object | |
294 description: Simplified data form | |
295 join: | |
296 description: For joining Multi-User-Chats | |
297 type: boolean | |
298 enum: | |
299 - true | |
300 dataform: | |
301 properties: | |
302 title: | |
303 type: string | |
304 fields: | |
305 type: array | |
306 items: | |
307 type: object | |
308 properties: | |
309 value: | |
310 oneOf: | |
311 - type: string | |
312 - type: array | |
313 items: | |
314 type: string | |
315 type: | |
316 type: string | |
317 label: | |
318 type: string | |
319 desc: | |
320 type: string | |
321 required: | |
322 type: boolean | |
323 var: | |
324 type: string | |
325 type: | |
326 type: string | |
327 enum: | |
328 - form | |
329 - submit | |
330 - cancel | |
331 - result | |
332 instructions: | |
333 type: string | |
334 description: Data form | |
335 type: object | |
336 items: | |
337 oneOf: | |
338 - description: An items query or empty list | |
339 type: boolean | |
340 enum: | |
341 - true | |
342 - type: string | |
343 description: A query with a node, or an empty reply list with a node | |
344 - description: List of items referenced | |
345 type: array | |
346 items: | |
347 properties: | |
348 jid: | |
349 type: string | |
350 description: Address of item | |
351 node: | |
352 type: string | |
353 name: | |
354 type: string | |
355 description: Descriptive name | |
356 required: | |
357 - jid | |
358 type: object | |
359 description: List of references to other entities | |
360 version: | |
361 oneOf: | |
362 - type: boolean | |
363 - properties: | |
364 version: | |
365 type: string | |
366 name: | |
367 type: string | |
368 os: | |
369 type: string | |
370 required: | |
371 - name | |
372 - version | |
373 type: object | |
374 description: Software version query | |
375 payload: | |
376 required: | |
377 - datatype | |
378 - data | |
379 properties: | |
380 data: | |
381 type: object | |
382 datatype: | |
383 type: string | |
384 description: A piece of arbitrary JSON with a type field attached | |
385 type: object | |
386 disco: | |
387 oneOf: | |
388 - type: boolean | |
389 description: Either a query, or an empty response | |
390 - type: string | |
391 description: A query with a node, or an empty response with a node | |
392 - properties: | |
393 features: | |
394 description: List of URIs indicating supported features | |
395 type: array | |
396 items: | |
397 type: string | |
398 identities: | |
399 items: | |
400 type: object | |
401 properties: | |
402 name: | |
403 type: string | |
404 type: | |
405 type: string | |
406 category: | |
407 type: string | |
408 description: List of abstract identities or types that describe the | |
409 entity | |
410 type: array | |
411 example: | |
412 - name: Prosody | |
413 type: im | |
414 category: server | |
415 node: | |
416 type: string | |
417 extensions: | |
418 type: object | |
419 description: A full response | |
420 type: object | |
421 description: Discover supported features | |
422 oob_url: | |
423 type: string | |
424 description: URL of an attached media file. | |
425 html: | |
426 description: HTML version of 'body' | |
427 type: string | |
428 example: <body><p>Hello!</p></body> | |
429 subject: | |
430 description: Subject of message or group chat | |
431 type: string | |
432 example: Talking about stuff | |
433 ping: | |
434 description: A ping. | |
435 type: boolean | |
436 enum: | |
437 - true | |
438 nick: | |
439 type: string | |
440 description: Nickname of the sender | |
4474
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
441 securitySchemes: |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
442 token: |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
443 description: Tokens from mod_http_oauth2. |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
444 scheme: Bearer |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
445 type: http |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
446 basic: |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
447 description: Use JID as username. |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
448 scheme: Basic |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
449 type: http |
949db0714b5f
mod_rest: Add an OpenAPI specification
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
450 ... |