comparison mod_rest/res/openapi.yaml @ 4546:cfe196f88e96

mod_rest: Reorganise openapi spec to group stanza types Goal is to make openapi.yaml and schema-xmpp.json not differ too much.
author Kim Alvefur <zash@zash.se>
date Sun, 25 Apr 2021 16:20:32 +0200
parents c6d44e1fb4d9
children a9e997d5eb94
comparison
equal deleted inserted replaced
4545:f4ab80f72d63 4546:cfe196f88e96
140 body: Hello 140 body: Hello
141 type: chat 141 type: chat
142 kind: message 142 kind: message
143 to: alice@example.com 143 to: alice@example.com
144 state: active 144 state: active
145 145 oneOf:
146 - $ref: '#/components/schemas/message'
147 - $ref: '#/components/schemas/presence'
148 - $ref: '#/components/schemas/iq'
149
150 message:
151 type: object
146 properties: 152 properties:
147 kind: 153 kind:
148 $ref: '#/components/schemas/kind' 154 kind:
155 description: Which kind of stanza
156 type: string
157 enum:
158 - message
149 type: 159 type:
150 $ref: '#/components/schemas/type' 160 type: string
161 enum:
162 - chat
163 - error
164 - groupchat
165 - headline
166 - normal
151 to: 167 to:
152 $ref: '#/components/schemas/to' 168 $ref: '#/components/schemas/to'
153 from: 169 from:
154 $ref: '#/components/schemas/from' 170 $ref: '#/components/schemas/from'
155 id: 171 id:
162 subject: 178 subject:
163 $ref: '#/components/schemas/subject' 179 $ref: '#/components/schemas/subject'
164 thread: 180 thread:
165 $ref: '#/components/schemas/thread' 181 $ref: '#/components/schemas/thread'
166 182
167 show:
168 $ref: '#/components/schemas/show'
169 status:
170 $ref: '#/components/schemas/status'
171 priority:
172 $ref: '#/components/schemas/priority'
173
174 state: 183 state:
175 $ref: '#/components/schemas/state' 184 $ref: '#/components/schemas/state'
176 nick: 185 nick:
177 $ref: '#/components/schemas/nick' 186 $ref: '#/components/schemas/nick'
178 delay: 187 delay:
179 $ref: '#/components/schemas/delay' 188 $ref: '#/components/schemas/delay'
180 replace: 189 replace:
181 $ref: '#/components/schemas/replace' 190 $ref: '#/components/schemas/replace'
182 191
192 html:
193 $ref: '#/components/schemas/html'
194 oob_url:
195 $ref: '#/components/schemas/oob_url'
196
197 error:
198 $ref: '#/components/schemas/error'
199
200 presence:
201 type: object
202 properties:
203 kind:
204 kind:
205 description: Which kind of stanza
206 type: string
207 enum:
208 - presence
209 type:
210 type: string
211 enum:
212 - available
213 - unavailable
214 - subscribe
215 - subscribed
216 - unsubscribe
217 - unsubscribed
218 - error
219 to:
220 $ref: '#/components/schemas/to'
221 from:
222 $ref: '#/components/schemas/from'
223 id:
224 $ref: '#/components/schemas/id'
225 lang:
226 $ref: '#/components/schemas/lang'
227
228 show:
229 $ref: '#/components/schemas/show'
230 status:
231 $ref: '#/components/schemas/status'
232 priority:
233 $ref: '#/components/schemas/priority'
234
235 nick:
236 $ref: '#/components/schemas/nick'
237 delay:
238 $ref: '#/components/schemas/delay'
239
183 join: 240 join:
184 $ref: '#/components/schemas/join' 241 $ref: '#/components/schemas/join'
185 242
186 html: 243 error:
187 $ref: '#/components/schemas/html' 244 $ref: '#/components/schemas/error'
245
246 iq:
247 type: object
248 properties:
249 kind:
250 description: Which kind of stanza
251 type: string
252 enum:
253 - iq
254 type:
255 type: string
256 enum:
257 - get
258 - set
259 - result
260 - error
261 to:
262 $ref: '#/components/schemas/to'
263 from:
264 $ref: '#/components/schemas/from'
265 id:
266 $ref: '#/components/schemas/id'
267 lang:
268 $ref: '#/components/schemas/lang'
188 269
189 ping: 270 ping:
190 $ref: '#/components/schemas/ping' 271 $ref: '#/components/schemas/ping'
191 version: 272 version:
192 $ref: '#/components/schemas/version' 273 $ref: '#/components/schemas/version'
195 items: 276 items:
196 $ref: '#/components/schemas/items' 277 $ref: '#/components/schemas/items'
197 command: 278 command:
198 $ref: '#/components/schemas/command' 279 $ref: '#/components/schemas/command'
199 280
200 oob_url: 281 stats:
201 $ref: '#/components/schemas/oob_url' 282 $ref: '#/components/schemas/stats'
202 payload: 283 payload:
203 $ref: '#/components/schemas/payload' 284 $ref: '#/components/schemas/payload'
204 dataform: 285
205 $ref: '#/components/schemas/dataform'
206 formdata:
207 $ref: '#/components/schemas/formdata'
208 stats:
209 $ref: '#/components/schemas/stats'
210 error: 286 error:
211 $ref: '#/components/schemas/error' 287 $ref: '#/components/schemas/error'
212 288
213 iq_pong: 289 iq_pong:
214 description: Test reachability of some XMPP address 290 description: Test reachability of some XMPP address