|
| 1 | +### gid.ABitOfEverythingService.Create |
| 2 | +// Create a new ABitOfEverything |
| 3 | +// |
| 4 | +// This API creates a new ABitOfEverything |
| 5 | +POST http://localhost:8080/v1/example/a_bit_of_everything/{float_value}/{double_value}/{int64_value}/separator/{uint64_value}/{int32_value}/{fixed64_value}/{fixed32_value}/{bool_value}/{string_value=strprefix/*}/{uint32_value}/{sfixed32_value}/{sfixed64_value}/{sint32_value}/{sint64_value}/{nonConventionalNameValue}/{enum_value} |
| 6 | +Content-Type: application/json |
| 7 | + |
| 8 | +### gid.ABitOfEverythingService.CreateBody |
| 9 | +POST http://localhost:8080/v1/example/a_bit_of_everything |
| 10 | +Content-Type: application/json |
| 11 | + |
| 12 | +### gid.ABitOfEverythingService.CreateBook |
| 13 | +// Create a book. |
| 14 | +POST http://localhost:8080/v1/{parent=publishers/*}/books |
| 15 | +Content-Type: application/json |
| 16 | + |
| 17 | +### gid.ABitOfEverythingService.UpdateBook |
| 18 | +PATCH http://localhost:8080/v1/{book.name=publishers/*/books/*} |
| 19 | +Content-Type: application/json |
| 20 | + |
| 21 | +### gid.ABitOfEverythingService.Update |
| 22 | +PUT http://localhost:8080/v1/example/a_bit_of_everything/{uuid} |
| 23 | +Content-Type: application/json |
| 24 | + |
| 25 | +### gid.ABitOfEverythingService.UpdateV2 |
| 26 | +PUT http://localhost:8080/v2/example/a_bit_of_everything/{abe.uuid} |
| 27 | +Content-Type: application/json |
| 28 | + |
| 29 | +### gid.ABitOfEverythingService.GetQuery |
| 30 | +// rpc Delete(grpc.gateway.examples.internal.proto.sub2.IdMessage) returns (google.protobuf.Empty) { |
| 31 | +// option (google.api.http) = { |
| 32 | +// delete: "/v1/example/a_bit_of_everything/{uuid}" |
| 33 | +// }; |
| 34 | +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { |
| 35 | +// security: { |
| 36 | +// security_requirement: { |
| 37 | +// key: "ApiKeyAuth"; |
| 38 | +// value: {} |
| 39 | +// } |
| 40 | +// security_requirement: { |
| 41 | +// key: "OAuth2"; |
| 42 | +// value: { |
| 43 | +// scope: "read"; |
| 44 | +// scope: "write"; |
| 45 | +// } |
| 46 | +// } |
| 47 | +// } |
| 48 | +// extensions: { |
| 49 | +// key: "x-irreversible"; |
| 50 | +// value { |
| 51 | +// bool_value: true; |
| 52 | +// } |
| 53 | +// } |
| 54 | +// }; |
| 55 | +// } |
| 56 | +GET http://localhost:8080/v1/example/a_bit_of_everything/query/{uuid} |
| 57 | +Content-Type: application/json |
| 58 | + |
| 59 | +### gid.ABitOfEverythingService.GetRepeatedQuery |
| 60 | +GET http://localhost:8080/v1/example/a_bit_of_everything_repeated/{path_repeated_float_value}/{path_repeated_double_value}/{path_repeated_int64_value}/{path_repeated_uint64_value}/{path_repeated_int32_value}/{path_repeated_fixed64_value}/{path_repeated_fixed32_value}/{path_repeated_bool_value}/{path_repeated_string_value}/{path_repeated_bytes_value}/{path_repeated_uint32_value}/{path_repeated_enum_value}/{path_repeated_sfixed32_value}/{path_repeated_sfixed64_value}/{path_repeated_sint32_value}/{path_repeated_sint64_value} |
| 61 | +Content-Type: application/json |
| 62 | + |
| 63 | +### gid.ABitOfEverythingService.DeepPathEcho |
| 64 | +// Echo allows posting a StringMessage value. |
| 65 | +// |
| 66 | +// It also exposes multiple bindings. |
| 67 | +// |
| 68 | +// This makes it useful when validating that the OpenAPI v2 API |
| 69 | +// description exposes documentation correctly on all paths |
| 70 | +// defined as additional_bindings in the proto. |
| 71 | +// rpc Echo(grpc.gateway.examples.internal.proto.sub.StringMessage) returns (grpc.gateway.examples.internal.proto.sub.StringMessage) { |
| 72 | +// option (google.api.http) = { |
| 73 | +// get: "/v1/example/a_bit_of_everything/echo/{value}" |
| 74 | +// additional_bindings { |
| 75 | +// post: "/v2/example/echo" |
| 76 | +// body: "value" |
| 77 | +// } |
| 78 | +// additional_bindings { |
| 79 | +// get: "/v2/example/echo" |
| 80 | +// } |
| 81 | +// }; |
| 82 | +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { |
| 83 | +// description: "Description Echo"; |
| 84 | +// summary: "Summary: Echo rpc"; |
| 85 | +// tags: "echo rpc"; |
| 86 | +// external_docs: { |
| 87 | +// url: "https://github.com/grpc-ecosystem/grpc-gateway"; |
| 88 | +// description: "Find out more Echo"; |
| 89 | +// } |
| 90 | +// responses: { |
| 91 | +// key: "200" |
| 92 | +// value: { |
| 93 | +// examples: { |
| 94 | +// key: "application/json" |
| 95 | +// value: '{"value": "the input value"}' |
| 96 | +// } |
| 97 | +// } |
| 98 | +// } |
| 99 | +// responses: { |
| 100 | +// key: "503"; |
| 101 | +// value: { |
| 102 | +// description: "Returned when the resource is temporarily unavailable."; |
| 103 | +// extensions: { |
| 104 | +// key: "x-number"; |
| 105 | +// value { |
| 106 | +// number_value: 100; |
| 107 | +// } |
| 108 | +// } |
| 109 | +// } |
| 110 | +// } |
| 111 | +// responses: { |
| 112 | +// // Overwrites global definition. |
| 113 | +// key: "404"; |
| 114 | +// value: { |
| 115 | +// description: "Returned when the resource does not exist."; |
| 116 | +// schema: { |
| 117 | +// json_schema: { |
| 118 | +// type: INTEGER; |
| 119 | +// } |
| 120 | +// } |
| 121 | +// } |
| 122 | +// } |
| 123 | +// }; |
| 124 | +// } |
| 125 | +POST http://localhost:8080/v1/example/deep_path/{single_nested.name} |
| 126 | +Content-Type: application/json |
| 127 | + |
| 128 | +### gid.ABitOfEverythingService.NoBindings |
| 129 | +GET http://localhost:8080/v2/example/NoBindings |
| 130 | +Content-Type: application/json |
| 131 | + |
| 132 | +### gid.ABitOfEverythingService.Timeout |
| 133 | +GET http://localhost:8080/v2/example/timeout |
| 134 | +Content-Type: application/json |
| 135 | + |
| 136 | +### gid.ABitOfEverythingService.ErrorWithDetails |
| 137 | +GET http://localhost:8080/v2/example/errorwithdetails |
| 138 | +Content-Type: application/json |
| 139 | + |
| 140 | +### gid.ABitOfEverythingService.GetMessageWithBody |
| 141 | +POST http://localhost:8080/v2/example/withbody/{id} |
| 142 | +Content-Type: application/json |
| 143 | + |
| 144 | +### gid.ABitOfEverythingService.PostWithEmptyBody |
| 145 | +POST http://localhost:8080/v2/example/postwithemptybody/{name} |
| 146 | +Content-Type: application/json |
| 147 | + |
| 148 | +### gid.ABitOfEverythingService.CheckGetQueryParams |
| 149 | +GET http://localhost:8080/v1/example/a_bit_of_everything/params/get/{single_nested.name} |
| 150 | +Content-Type: application/json |
| 151 | + |
| 152 | +### gid.ABitOfEverythingService.CheckNestedEnumGetQueryParams |
| 153 | +GET http://localhost:8080/v1/example/a_bit_of_everything/params/get/nested_enum/{single_nested.ok} |
| 154 | +Content-Type: application/json |
| 155 | + |
| 156 | +### gid.ABitOfEverythingService.CheckPostQueryParams |
| 157 | +POST http://localhost:8080/v1/example/a_bit_of_everything/params/post/{string_value} |
| 158 | +Content-Type: application/json |
| 159 | + |
| 160 | +### gid.ABitOfEverythingService.OverwriteResponseContentType |
| 161 | +GET http://localhost:8080/v2/example/overwriteresponsecontenttype |
| 162 | +Content-Type: application/json |
| 163 | + |
| 164 | +### gid.ABitOfEverythingService.CheckStatus |
| 165 | +GET http://localhost:8080/v1/example/checkStatus |
| 166 | +Content-Type: application/json |
| 167 | + |
0 commit comments