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