...
1---
2swagger: "2.0"
3info:
4 description: "Unannotated Echo Service\nSimilar to echo_service.proto but without\
5 \ annotations. See\nunannotated_echo_service.yaml for the equivalent of the annotations\
6 \ in\ngRPC API configuration format.\n\nEcho Service API consists of a single\
7 \ service which returns\na message."
8 version: "1.0"
9 title: "Unannotated Echo"
10 contact:
11 name: "gRPC-Gateway project"
12 url: "https://github.com/grpc-ecosystem/grpc-gateway"
13 email: "none@example.com"
14 license:
15 name: "BSD 3-Clause License"
16 url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE"
17 x-something-something: "yadda"
18tags:
19- name: "Echo"
20 description: "Echo description"
21- name: "Internal"
22 description: "Internal description"
23 x-traitTag: true
24- name: "UnannotatedEchoService"
25 description: "UnannotatedEchoService description -- which should not be used in\
26 \ place of the documentation comment!"
27 externalDocs:
28 description: "Find out more about UnannotatedEchoService"
29 url: "https://github.com/grpc-ecosystem/grpc-gateway"
30schemes:
31- "http"
32- "https"
33- "wss"
34consumes:
35- "application/json"
36- "application/x-foo-mime"
37produces:
38- "application/json"
39- "application/x-foo-mime"
40security:
41- ApiKeyAuth: []
42 BasicAuth: []
43- ApiKeyAuth: []
44 OAuth2:
45 - "read"
46 - "write"
47paths:
48 /v1/example/echo/{id}:
49 post:
50 tags:
51 - "UnannotatedEchoService"
52 summary: "Summary: Echo rpc"
53 description: "Description Echo"
54 operationId: "UnannotatedEchoService_Echo"
55 parameters:
56 - name: "id"
57 in: "path"
58 description: "Id represents the message identifier."
59 required: true
60 type: "string"
61 x-exportParamName: "Id"
62 - name: "num"
63 in: "query"
64 description: "Int value field"
65 required: true
66 type: "string"
67 default: "42"
68 format: "int64"
69 x-exportParamName: "Num"
70 - name: "duration"
71 in: "query"
72 required: false
73 type: "string"
74 x-exportParamName: "Duration"
75 x-optionalDataType: "String"
76 - name: "lineNum"
77 in: "query"
78 required: false
79 type: "string"
80 format: "int64"
81 x-exportParamName: "LineNum"
82 x-optionalDataType: "String"
83 - name: "lang"
84 in: "query"
85 required: false
86 type: "string"
87 x-exportParamName: "Lang"
88 x-optionalDataType: "String"
89 - name: "status.progress"
90 in: "query"
91 required: false
92 type: "string"
93 format: "int64"
94 x-exportParamName: "StatusProgress"
95 x-optionalDataType: "String"
96 - name: "status.note"
97 in: "query"
98 required: false
99 type: "string"
100 x-exportParamName: "StatusNote"
101 x-optionalDataType: "String"
102 - name: "en"
103 in: "query"
104 required: false
105 type: "string"
106 format: "int64"
107 x-exportParamName: "En"
108 x-optionalDataType: "String"
109 - name: "no.progress"
110 in: "query"
111 required: false
112 type: "string"
113 format: "int64"
114 x-exportParamName: "NoProgress"
115 x-optionalDataType: "String"
116 - name: "no.note"
117 in: "query"
118 required: false
119 type: "string"
120 x-exportParamName: "NoNote"
121 x-optionalDataType: "String"
122 - name: "resourceId"
123 in: "query"
124 required: false
125 type: "string"
126 x-exportParamName: "ResourceId"
127 x-optionalDataType: "String"
128 - name: "nId.nId"
129 in: "query"
130 required: false
131 type: "string"
132 x-exportParamName: "NIdNId"
133 x-optionalDataType: "String"
134 - name: "nId.val"
135 in: "query"
136 required: false
137 type: "string"
138 x-exportParamName: "NIdVal"
139 x-optionalDataType: "String"
140 responses:
141 200:
142 description: "A successful response."
143 examples:
144 application/json:
145 value: "the input value"
146 schema:
147 $ref: "#/definitions/examplepbUnannotatedSimpleMessage"
148 403:
149 description: "Returned when the user does not have permission to access\
150 \ the resource."
151 schema: {}
152 404:
153 description: "Returned when the resource does not exist."
154 schema:
155 type: "integer"
156 format: "integer"
157 503:
158 description: "Returned when the resource is temporarily unavailable."
159 schema: {}
160 x-number: 100
161 default:
162 description: "An unexpected error response."
163 schema:
164 $ref: "#/definitions/rpcStatus"
165 externalDocs:
166 description: "Find out more Echo"
167 url: "https://github.com/grpc-ecosystem/grpc-gateway"
168 /v1/example/echo/{id}/{num}:
169 get:
170 tags:
171 - "UnannotatedEchoService"
172 summary: "Summary: Echo rpc"
173 description: "Description Echo"
174 operationId: "UnannotatedEchoService_Echo2"
175 parameters:
176 - name: "id"
177 in: "path"
178 description: "Id represents the message identifier."
179 required: true
180 type: "string"
181 x-exportParamName: "Id"
182 - name: "num"
183 in: "path"
184 description: "Int value field"
185 required: true
186 type: "string"
187 default: "42"
188 format: "int64"
189 x-exportParamName: "Num"
190 - name: "duration"
191 in: "query"
192 required: false
193 type: "string"
194 x-exportParamName: "Duration"
195 x-optionalDataType: "String"
196 - name: "lineNum"
197 in: "query"
198 required: false
199 type: "string"
200 format: "int64"
201 x-exportParamName: "LineNum"
202 x-optionalDataType: "String"
203 - name: "lang"
204 in: "query"
205 required: false
206 type: "string"
207 x-exportParamName: "Lang"
208 x-optionalDataType: "String"
209 - name: "status.progress"
210 in: "query"
211 required: false
212 type: "string"
213 format: "int64"
214 x-exportParamName: "StatusProgress"
215 x-optionalDataType: "String"
216 - name: "status.note"
217 in: "query"
218 required: false
219 type: "string"
220 x-exportParamName: "StatusNote"
221 x-optionalDataType: "String"
222 - name: "en"
223 in: "query"
224 required: false
225 type: "string"
226 format: "int64"
227 x-exportParamName: "En"
228 x-optionalDataType: "String"
229 - name: "no.progress"
230 in: "query"
231 required: false
232 type: "string"
233 format: "int64"
234 x-exportParamName: "NoProgress"
235 x-optionalDataType: "String"
236 - name: "no.note"
237 in: "query"
238 required: false
239 type: "string"
240 x-exportParamName: "NoNote"
241 x-optionalDataType: "String"
242 - name: "resourceId"
243 in: "query"
244 required: false
245 type: "string"
246 x-exportParamName: "ResourceId"
247 x-optionalDataType: "String"
248 - name: "nId.nId"
249 in: "query"
250 required: false
251 type: "string"
252 x-exportParamName: "NIdNId"
253 x-optionalDataType: "String"
254 - name: "nId.val"
255 in: "query"
256 required: false
257 type: "string"
258 x-exportParamName: "NIdVal"
259 x-optionalDataType: "String"
260 responses:
261 200:
262 description: "A successful response."
263 examples:
264 application/json:
265 value: "the input value"
266 schema:
267 $ref: "#/definitions/examplepbUnannotatedSimpleMessage"
268 403:
269 description: "Returned when the user does not have permission to access\
270 \ the resource."
271 schema: {}
272 404:
273 description: "Returned when the resource does not exist."
274 schema:
275 type: "integer"
276 format: "integer"
277 503:
278 description: "Returned when the resource is temporarily unavailable."
279 schema: {}
280 x-number: 100
281 default:
282 description: "An unexpected error response."
283 schema:
284 $ref: "#/definitions/rpcStatus"
285 externalDocs:
286 description: "Find out more Echo"
287 url: "https://github.com/grpc-ecosystem/grpc-gateway"
288 /v1/example/echo_body:
289 post:
290 tags:
291 - "UnannotatedEchoService"
292 summary: "EchoBody method receives a simple message and returns it."
293 operationId: "UnannotatedEchoService_EchoBody"
294 parameters:
295 - in: "body"
296 name: "body"
297 description: "A simple message with many types"
298 required: true
299 schema:
300 $ref: "#/definitions/examplepbUnannotatedSimpleMessage"
301 x-exportParamName: "Body"
302 responses:
303 200:
304 description: "A successful response."
305 schema:
306 $ref: "#/definitions/examplepbUnannotatedSimpleMessage"
307 403:
308 description: "Returned when the user does not have permission to access\
309 \ the resource."
310 schema: {}
311 404:
312 description: "Returned when the resource does not exist."
313 schema:
314 type: "string"
315 format: "string"
316 default:
317 description: "An unexpected error response."
318 schema:
319 $ref: "#/definitions/rpcStatus"
320 /v1/example/echo_delete:
321 delete:
322 tags:
323 - "UnannotatedEchoService"
324 summary: "EchoDelete method receives a simple message and returns it."
325 operationId: "UnannotatedEchoService_EchoDelete"
326 parameters:
327 - name: "id"
328 in: "query"
329 description: "Id represents the message identifier."
330 required: false
331 type: "string"
332 x-exportParamName: "Id"
333 x-optionalDataType: "String"
334 - name: "num"
335 in: "query"
336 description: "Int value field"
337 required: true
338 type: "string"
339 default: "42"
340 format: "int64"
341 x-exportParamName: "Num"
342 - name: "duration"
343 in: "query"
344 required: false
345 type: "string"
346 x-exportParamName: "Duration"
347 x-optionalDataType: "String"
348 - name: "lineNum"
349 in: "query"
350 required: false
351 type: "string"
352 format: "int64"
353 x-exportParamName: "LineNum"
354 x-optionalDataType: "String"
355 - name: "lang"
356 in: "query"
357 required: false
358 type: "string"
359 x-exportParamName: "Lang"
360 x-optionalDataType: "String"
361 - name: "status.progress"
362 in: "query"
363 required: false
364 type: "string"
365 format: "int64"
366 x-exportParamName: "StatusProgress"
367 x-optionalDataType: "String"
368 - name: "status.note"
369 in: "query"
370 required: false
371 type: "string"
372 x-exportParamName: "StatusNote"
373 x-optionalDataType: "String"
374 - name: "en"
375 in: "query"
376 required: false
377 type: "string"
378 format: "int64"
379 x-exportParamName: "En"
380 x-optionalDataType: "String"
381 - name: "no.progress"
382 in: "query"
383 required: false
384 type: "string"
385 format: "int64"
386 x-exportParamName: "NoProgress"
387 x-optionalDataType: "String"
388 - name: "no.note"
389 in: "query"
390 required: false
391 type: "string"
392 x-exportParamName: "NoNote"
393 x-optionalDataType: "String"
394 - name: "resourceId"
395 in: "query"
396 required: false
397 type: "string"
398 x-exportParamName: "ResourceId"
399 x-optionalDataType: "String"
400 - name: "nId.nId"
401 in: "query"
402 required: false
403 type: "string"
404 x-exportParamName: "NIdNId"
405 x-optionalDataType: "String"
406 - name: "nId.val"
407 in: "query"
408 required: false
409 type: "string"
410 x-exportParamName: "NIdVal"
411 x-optionalDataType: "String"
412 responses:
413 200:
414 description: "A successful response."
415 schema:
416 $ref: "#/definitions/examplepbUnannotatedSimpleMessage"
417 403:
418 description: "Returned when the user does not have permission to access\
419 \ the resource."
420 schema: {}
421 404:
422 description: "Returned when the resource does not exist."
423 schema:
424 type: "string"
425 format: "string"
426 default:
427 description: "An unexpected error response."
428 schema:
429 $ref: "#/definitions/rpcStatus"
430securityDefinitions:
431 ApiKeyAuth:
432 type: "apiKey"
433 name: "X-API-Key"
434 in: "header"
435 x-amazon-apigateway-authorizer:
436 authorizerResultTtlInSeconds: 60
437 type: "token"
438 x-amazon-apigateway-authtype: "oauth2"
439 BasicAuth:
440 type: "basic"
441definitions:
442 examplepbUnannotatedEmbedded:
443 type: "object"
444 properties:
445 progress:
446 type: "string"
447 format: "int64"
448 note:
449 type: "string"
450 description: "Embedded represents a message embedded in SimpleMessage."
451 examplepbUnannotatedNestedMessage:
452 type: "object"
453 properties:
454 nId:
455 type: "string"
456 val:
457 type: "string"
458 examplepbUnannotatedSimpleMessage:
459 type: "object"
460 required:
461 - "id"
462 - "num"
463 properties:
464 id:
465 type: "string"
466 description: "Id represents the message identifier."
467 num:
468 type: "string"
469 format: "int64"
470 description: "Int value field"
471 default: "42"
472 duration:
473 type: "string"
474 lineNum:
475 type: "string"
476 format: "int64"
477 lang:
478 type: "string"
479 status:
480 $ref: "#/definitions/examplepbUnannotatedEmbedded"
481 en:
482 type: "string"
483 format: "int64"
484 "no":
485 $ref: "#/definitions/examplepbUnannotatedEmbedded"
486 resourceId:
487 type: "string"
488 nId:
489 $ref: "#/definitions/examplepbUnannotatedNestedMessage"
490 externalDocs:
491 description: "Find out more about UnannotatedSimpleMessage"
492 url: "https://github.com/grpc-ecosystem/grpc-gateway"
493 title: "A bit of everything"
494 description: "A simple message with many types"
495 example:
496 id: "myid"
497 protobufAny:
498 type: "object"
499 properties:
500 '@type':
501 type: "string"
502 additionalProperties: {}
503 rpcStatus:
504 type: "object"
505 properties:
506 code:
507 type: "integer"
508 format: "int32"
509 message:
510 type: "string"
511 details:
512 type: "array"
513 items:
514 $ref: "#/definitions/protobufAny"
515externalDocs:
516 description: "More about gRPC-Gateway"
517 url: "https://github.com/grpc-ecosystem/grpc-gateway"
518x-grpc-gateway-baz-list:
519- "one"
520- true
521x-grpc-gateway-foo: "bar"
View as plain text