Comparison

mod_rest/openapi.yaml @ 4478:7ab0c423688a

mod_rest: Support GET for certain IQ queries Example: GET /rest/version/example.com 200 OK { version: { name: "thing", version: "1.0.0" } }
author Kim Alvefur <zash@zash.se>
date Sun, 28 Feb 2021 19:33:09 +0100
parent 4477:8df6cc648963
child 4479:356b5ad521a5
comparison
equal deleted inserted replaced
4477:8df6cc648963 4478:7ab0c423688a
60 422: 60 422:
61 description: The was a problem with the format (but not the syntax) of the 61 description: The was a problem with the format (but not the syntax) of the
62 payload. 62 payload.
63 415: 63 415:
64 description: Unsupported mediatype. 64 description: Unsupported mediatype.
65 /rest/ping/{to}:
66 get:
67 security:
68 - basic: []
69 - token: []
70 summary: Ping a local or remote server or other entity
71 responses:
72 200:
73 content:
74 application/json:
75 schema:
76 type: object
77 application/xmpp+xml:
78 schema:
79 description: Single XMPP stanza in XML format.
80 example: |
81 <iq type="result"/>
82 description: OK
83 parameters:
84 - name: to
85 in: path
86 required: true
87 schema:
88 $ref: '#/components/schemas/to'
89 /rest/disco/{to}:
90 get:
91 security:
92 - basic: []
93 - token: []
94 summary: Query a remote entity for supported features
95 responses:
96 200:
97 content:
98 application/json:
99 schema:
100 type: object
101 properties:
102 disco:
103 $ref: '#/components/schemas/disco'
104 application/xmpp+xml:
105 schema:
106 description: See XEP-0030
107 description: OK
108 parameters:
109 - name: to
110 in: path
111 required: true
112 schema:
113 $ref: '#/components/schemas/to'
114 /rest/items/{to}:
115 get:
116 security:
117 - basic: []
118 - token: []
119 summary: Query an entity for related services, chat rooms or other items
120 responses:
121 200:
122 content:
123 application/json:
124 schema:
125 type: object
126 properties:
127 disco:
128 $ref: '#/components/schemas/items'
129 application/xmpp+xml:
130 schema:
131 description: See XEP-0030
132 description: OK
133 parameters:
134 - name: to
135 in: path
136 required: true
137 schema:
138 $ref: '#/components/schemas/to'
139 /rest/version/{to}:
140 get:
141 security:
142 - basic: []
143 - token: []
144 summary: Ask what software version is used
145 responses:
146 200:
147 content:
148 application/json:
149 schema:
150 $ref: '#/components/schemas/stanza'
151 application/xmpp+xml:
152 schema:
153 description: Single XMPP stanza in XML format.
154 example: |
155 <iq type="result">
156 <query xmlns="jabber:iq:version">
157 <name>Exodus</name>
158 <version>0.7.0.4</version>
159 </query>
160 </iq>
161 description: OK
162 parameters:
163 - name: to
164 in: path
165 required: true
166 schema:
167 $ref: '#/components/schemas/to'
65 /rest/{kind}/{type}/{to}: 168 /rest/{kind}/{type}/{to}:
66 post: 169 post:
67 responses: 170 responses:
68 200: 171 200:
69 description: Okay 172 description: Okay