diff --git a/BUILD.bazel b/BUILD.bazel index 1a285135a47..64f651e9960 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -3,7 +3,7 @@ load("@com_github_bazelbuild_buildtools//buildifier:def.bzl", "buildifier") load("@io_bazel_rules_go//proto:compiler.bzl", "go_proto_compiler") load("@io_bazel_rules_go//proto/wkt:well_known_types.bzl", "PROTO_RUNTIME_DEPS", "WELL_KNOWN_TYPES_APIV2") -exports_files(["LICENSE.txt"]) +exports_files(["LICENSE"]) buildifier( name = "buildifier", diff --git a/README.md b/README.md index 51e141c5541..0a2dd73d6c1 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ gRPC to JSON proxy generator following the gRPC HTTP spec

- + @@ -58,6 +58,7 @@ that's needed to generate a reverse-proxy with this library. ## Installation ### Compile from source + The following instructions assume you are using [Go Modules](https://github.com/golang/go/wiki/Modules) for dependency management. Use a @@ -100,9 +101,11 @@ Make sure that your `$GOBIN` is in your `$PATH`. You may alternatively download the binaries from the [GitHub releases page](https://github.com/grpc-ecosystem/grpc-gateway/releases/latest). We generate [SLSA3 signatures](slsa.dev) using the OpenSSF's [slsa-framework/slsa-github-generator](https://github.com/slsa-framework/slsa-github-generator) during the release process. To verify a release binary: + 1. Install the verification tool from [slsa-framework/slsa-verifier#installation](https://github.com/slsa-framework/slsa-verifier#installation). 2. Download the provenance file `attestation.intoto.jsonl` from the [GitHub releases page](https://github.com/grpc-ecosystem/grpc-gateway/releases/latest). 3. Run the verifier: + ```shell slsa-verifier -artifact-path -provenance attestation.intoto.jsonl -source github.com/grpc-ecosystem/grpc-gateway -tag ``` @@ -113,349 +116,352 @@ Alternatively, see the section on remotely managed plugin versions below. ### 1.Define your [gRPC](https://grpc.io/docs/) service using protocol buffers - `your_service.proto`: +`your_service.proto`: - ```protobuf - syntax = "proto3"; - package your.service.v1; - option go_package = "github.com/yourorg/yourprotos/gen/go/your/service/v1"; +```protobuf + syntax = "proto3"; + package your.service.v1; + option go_package = "github.com/yourorg/yourprotos/gen/go/your/service/v1"; - message StringMessage { - string value = 1; - } + message StringMessage { + string value = 1; + } - service YourService { - rpc Echo(StringMessage) returns (StringMessage) {} - } - ``` + service YourService { + rpc Echo(StringMessage) returns (StringMessage) {} + } +``` ### 2. Generate gRPC stubs - This step generates the gRPC stubs that you can use to implement the service and consume from clients: +This step generates the gRPC stubs that you can use to implement the service and consume from clients: - Here's an example `buf.gen.yaml` you can use to generate the stubs with [buf](https://github.com/bufbuild/buf): +Here's an example `buf.gen.yaml` you can use to generate the stubs with [buf](https://github.com/bufbuild/buf): - ```yaml - version: v1 - plugins: - - plugin: go - out: gen/go - opt: - - paths=source_relative - - plugin: go-grpc - out: gen/go - opt: - - paths=source_relative - ``` +```yaml +version: v1 +plugins: + - plugin: go + out: gen/go + opt: + - paths=source_relative + - plugin: go-grpc + out: gen/go + opt: + - paths=source_relative +``` - With this file in place, you can generate your files using `buf generate`. +With this file in place, you can generate your files using `buf generate`. - > For a complete example of using `buf generate` to generate protobuf stubs, see - > [the boilerplate repo](https://github.com/johanbrandhorst/grpc-gateway-boilerplate). - > For more information on generating the stubs with buf, see - > [the official documentation](https://docs.buf.build/generate-usage). +> For a complete example of using `buf generate` to generate protobuf stubs, see +> [the boilerplate repo](https://github.com/johanbrandhorst/grpc-gateway-boilerplate). +> For more information on generating the stubs with buf, see +> [the official documentation](https://docs.buf.build/generate-usage). - If you are using `protoc` to generate stubs, here's an example of what a command - might look like: +If you are using `protoc` to generate stubs, here's an example of what a command +might look like: - ```sh - protoc -I . \ - --go_out ./gen/go/ --go_opt paths=source_relative \ - --go-grpc_out ./gen/go/ --go-grpc_opt paths=source_relative \ - your/service/v1/your_service.proto - ``` +```sh +protoc -I . \ + --go_out ./gen/go/ --go_opt paths=source_relative \ + --go-grpc_out ./gen/go/ --go-grpc_opt paths=source_relative \ + your/service/v1/your_service.proto +``` ### 3. Implement your service in gRPC as usual. ### 4. Generate reverse-proxy using `protoc-gen-grpc-gateway` - At this point, you have 3 options: - - - no further modifications, use the default mapping to HTTP semantics (method, path, etc.) - - this will work on any `.proto` file, but will not allow setting HTTP paths, request parameters or similar - - additional `.proto` modifications to use a custom mapping - - relies on parameters in the `.proto` file to set custom HTTP mappings - - no `.proto` modifications, but use an external configuration file - - relies on an external configuration file to set custom HTTP mappings - - mostly useful when the source proto file isn't under your control - - #### 1. Using the default mapping - - This requires no additional modification to the `.proto` file but does require enabling a specific option when executing the plugin. - The `generate_unbound_methods` should be enabled. - - Here's what a `buf.gen.yaml` file might look like with this option enabled: - - ```yaml - version: v1 - plugins: - - plugin: go - out: gen/go - opt: - - paths=source_relative - - plugin: go-grpc - out: gen/go - opt: - - paths=source_relative - - plugin: grpc-gateway - out: gen/go - opt: - - paths=source_relative - - generate_unbound_methods=true - ``` - - With `protoc` (just the grpc-gateway stubs): - - ```sh - protoc -I . --grpc-gateway_out ./gen/go \ - --grpc-gateway_opt logtostderr=true \ - --grpc-gateway_opt paths=source_relative \ - --grpc-gateway_opt generate_unbound_methods=true \ - your/service/v1/your_service.proto - ``` - - #### 2. With custom annotations - - Add a [`google.api.http`](https://github.com/googleapis/googleapis/blob/master/google/api/http.proto#L46) - annotation to your .proto file - - `your_service.proto`: - - ```diff - syntax = "proto3"; - package your.service.v1; - option go_package = "github.com/yourorg/yourprotos/gen/go/your/service/v1"; - + - +import "google/api/annotations.proto"; - + - message StringMessage { - string value = 1; - } - - service YourService { - - rpc Echo(StringMessage) returns (StringMessage) {} - + rpc Echo(StringMessage) returns (StringMessage) { - + option (google.api.http) = { - + post: "/v1/example/echo" - + body: "*" - + }; - + } - } - ``` - - > You will need to provide the required third party protobuf files to the protobuf compiler. - > If you are using [buf](https://github.com/bufbuild/buf), this dependency can - > be added to the `deps` array in your `buf.yaml` under the name - > `buf.build/googleapis/googleapis`: - > ```yaml - > version: v1 - > name: buf.build/yourorg/myprotos - > deps: - > - buf.build/googleapis/googleapis - > ``` - > Always run `buf mod update` after adding a dependency to your `buf.yaml`. - - See [a_bit_of_everything.proto](examples/internal/proto/examplepb/a_bit_of_everything.proto) - for examples of more annotations you can add to customize gateway behavior - and generated OpenAPI output. - - Here's what a `buf.gen.yaml` file might look like: - - ```yaml - version: v1 - plugins: - - plugin: go - out: gen/go - opt: - - paths=source_relative - - plugin: go-grpc - out: gen/go - opt: - - paths=source_relative - - plugin: grpc-gateway - out: gen/go - opt: - - paths=source_relative - ``` - - If you are using `protoc` to generate stubs, you need to ensure the required - dependencies are available to the compiler at compile time. These can be found - by manually cloning and copying the relevant files from the - [googleapis repository](https://github.com/googleapis/googleapis), and providing - them to `protoc` when running. The files you will need are: - - ``` - google/api/annotations.proto - google/api/field_behavior.proto - google/api/http.proto - google/api/httpbody.proto - ``` - - Here's what a `protoc` execution might look like: - - ```sh - protoc -I . --grpc-gateway_out ./gen/go \ - --grpc-gateway_opt logtostderr=true \ - --grpc-gateway_opt paths=source_relative \ - your/service/v1/your_service.proto - ``` - - #### 3. External configuration - - If you do not want to (or cannot) modify the proto file for use with gRPC-Gateway you can - alternatively use an external - [gRPC Service Configuration](https://cloud.google.com/endpoints/docs/grpc/grpc-service-config) file. - [Check our documentation](https://grpc-ecosystem.github.io/grpc-gateway/docs/mapping/grpc_api_configuration/) - for more information. This is best combined with the `standalone=true` option - to generate a file that can live in its own package, separate from the files - generated by the source protobuf file. - - Here's what a `buf.gen.yaml` file might look like with this option enabled: - - ```yaml - version: v1 - plugins: - - plugin: go - out: gen/go - opt: - - paths=source_relative - - plugin: go-grpc - out: gen/go - opt: - - paths=source_relative - - plugin: grpc-gateway - out: gen/go - opt: - - paths=source_relative - - grpc_api_configuration=path/to/config.yaml - - standalone=true - ``` - - With `protoc` (just the grpc-gateway stubs): - - ```sh - protoc -I . --grpc-gateway_out ./gen/go \ - --grpc-gateway_opt logtostderr=true \ - --grpc-gateway_opt paths=source_relative \ - --grpc-gateway_opt grpc_api_configuration=path/to/config.yaml \ - --grpc-gateway_opt standalone=true \ - your/service/v1/your_service.proto - ``` +At this point, you have 3 options: + +- no further modifications, use the default mapping to HTTP semantics (method, path, etc.) + - this will work on any `.proto` file, but will not allow setting HTTP paths, request parameters or similar +- additional `.proto` modifications to use a custom mapping + - relies on parameters in the `.proto` file to set custom HTTP mappings +- no `.proto` modifications, but use an external configuration file + - relies on an external configuration file to set custom HTTP mappings + - mostly useful when the source proto file isn't under your control + +#### 1. Using the default mapping + +This requires no additional modification to the `.proto` file but does require enabling a specific option when executing the plugin. +The `generate_unbound_methods` should be enabled. + +Here's what a `buf.gen.yaml` file might look like with this option enabled: + +```yaml +version: v1 +plugins: + - plugin: go + out: gen/go + opt: + - paths=source_relative + - plugin: go-grpc + out: gen/go + opt: + - paths=source_relative + - plugin: grpc-gateway + out: gen/go + opt: + - paths=source_relative + - generate_unbound_methods=true +``` + +With `protoc` (just the grpc-gateway stubs): + +```sh +protoc -I . --grpc-gateway_out ./gen/go \ + --grpc-gateway_opt logtostderr=true \ + --grpc-gateway_opt paths=source_relative \ + --grpc-gateway_opt generate_unbound_methods=true \ + your/service/v1/your_service.proto +``` + +#### 2. With custom annotations + +Add a [`google.api.http`](https://github.com/googleapis/googleapis/blob/master/google/api/http.proto#L46) +annotation to your .proto file + +`your_service.proto`: + +```diff + syntax = "proto3"; + package your.service.v1; + option go_package = "github.com/yourorg/yourprotos/gen/go/your/service/v1"; ++ ++import "google/api/annotations.proto"; ++ + message StringMessage { + string value = 1; + } + + service YourService { +- rpc Echo(StringMessage) returns (StringMessage) {} ++ rpc Echo(StringMessage) returns (StringMessage) { ++ option (google.api.http) = { ++ post: "/v1/example/echo" ++ body: "*" ++ }; ++ } + } +``` + +> You will need to provide the required third party protobuf files to the protobuf compiler. +> If you are using [buf](https://github.com/bufbuild/buf), this dependency can +> be added to the `deps` array in your `buf.yaml` under the name +> `buf.build/googleapis/googleapis`: +> +> ```yaml +> version: v1 +> name: buf.build/yourorg/myprotos +> deps: +> - buf.build/googleapis/googleapis +> ``` +> +> Always run `buf mod update` after adding a dependency to your `buf.yaml`. + +See [a_bit_of_everything.proto](examples/internal/proto/examplepb/a_bit_of_everything.proto) +for examples of more annotations you can add to customize gateway behavior +and generated OpenAPI output. + +Here's what a `buf.gen.yaml` file might look like: + +```yaml +version: v1 +plugins: + - plugin: go + out: gen/go + opt: + - paths=source_relative + - plugin: go-grpc + out: gen/go + opt: + - paths=source_relative + - plugin: grpc-gateway + out: gen/go + opt: + - paths=source_relative +``` + +If you are using `protoc` to generate stubs, you need to ensure the required +dependencies are available to the compiler at compile time. These can be found +by manually cloning and copying the relevant files from the +[googleapis repository](https://github.com/googleapis/googleapis), and providing +them to `protoc` when running. The files you will need are: + +``` +google/api/annotations.proto +google/api/field_behavior.proto +google/api/http.proto +google/api/httpbody.proto +``` + +Here's what a `protoc` execution might look like: + +```sh +protoc -I . --grpc-gateway_out ./gen/go \ + --grpc-gateway_opt logtostderr=true \ + --grpc-gateway_opt paths=source_relative \ + your/service/v1/your_service.proto +``` + +#### 3. External configuration + +If you do not want to (or cannot) modify the proto file for use with gRPC-Gateway you can +alternatively use an external +[gRPC Service Configuration](https://cloud.google.com/endpoints/docs/grpc/grpc-service-config) file. +[Check our documentation](https://grpc-ecosystem.github.io/grpc-gateway/docs/mapping/grpc_api_configuration/) +for more information. This is best combined with the `standalone=true` option +to generate a file that can live in its own package, separate from the files +generated by the source protobuf file. + +Here's what a `buf.gen.yaml` file might look like with this option enabled: + +```yaml +version: v1 +plugins: + - plugin: go + out: gen/go + opt: + - paths=source_relative + - plugin: go-grpc + out: gen/go + opt: + - paths=source_relative + - plugin: grpc-gateway + out: gen/go + opt: + - paths=source_relative + - grpc_api_configuration=path/to/config.yaml + - standalone=true +``` + +With `protoc` (just the grpc-gateway stubs): + +```sh +protoc -I . --grpc-gateway_out ./gen/go \ + --grpc-gateway_opt logtostderr=true \ + --grpc-gateway_opt paths=source_relative \ + --grpc-gateway_opt grpc_api_configuration=path/to/config.yaml \ + --grpc-gateway_opt standalone=true \ + your/service/v1/your_service.proto +``` ### 5. Write an entrypoint for the HTTP reverse-proxy server - ```go - package main - - import ( - "context" - "flag" - "net/http" - - "github.com/golang/glog" - "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - "google.golang.org/grpc" - "google.golang.org/grpc/credentials/insecure" - - gw "github.com/yourorg/yourrepo/proto/gen/go/your/service/v1/your_service" // Update - ) - - var ( - // command-line options: - // gRPC server endpoint - grpcServerEndpoint = flag.String("grpc-server-endpoint", "localhost:9090", "gRPC server endpoint") - ) - - func run() error { - ctx := context.Background() - ctx, cancel := context.WithCancel(ctx) - defer cancel() - - // Register gRPC server endpoint - // Note: Make sure the gRPC server is running properly and accessible - mux := runtime.NewServeMux() - opts := []grpc.DialOption{grpc.WithTransportCredentials(insecure.NewCredentials())} - err := gw.RegisterYourServiceHandlerFromEndpoint(ctx, mux, *grpcServerEndpoint, opts) - if err != nil { - return err - } - - // Start HTTP server (and proxy calls to gRPC server endpoint) - return http.ListenAndServe(":8081", mux) - } - - func main() { - flag.Parse() - defer glog.Flush() - - if err := run(); err != nil { - glog.Fatal(err) - } - } - ``` +```go +package main + +import ( + "context" + "flag" + "net/http" + + "github.com/golang/glog" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "google.golang.org/grpc" + "google.golang.org/grpc/credentials/insecure" + + gw "github.com/yourorg/yourrepo/proto/gen/go/your/service/v1/your_service" // Update +) + +var ( + // command-line options: + // gRPC server endpoint + grpcServerEndpoint = flag.String("grpc-server-endpoint", "localhost:9090", "gRPC server endpoint") +) + +func run() error { + ctx := context.Background() + ctx, cancel := context.WithCancel(ctx) + defer cancel() + + // Register gRPC server endpoint + // Note: Make sure the gRPC server is running properly and accessible + mux := runtime.NewServeMux() + opts := []grpc.DialOption{grpc.WithTransportCredentials(insecure.NewCredentials())} + err := gw.RegisterYourServiceHandlerFromEndpoint(ctx, mux, *grpcServerEndpoint, opts) + if err != nil { + return err + } + + // Start HTTP server (and proxy calls to gRPC server endpoint) + return http.ListenAndServe(":8081", mux) +} + +func main() { + flag.Parse() + defer glog.Flush() + + if err := run(); err != nil { + glog.Fatal(err) + } +} +``` ### 6. (Optional) Generate OpenAPI definitions using `protoc-gen-openapiv2` - Here's what a `buf.gen.yaml` file might look like: - - ```yaml - version: v1 - plugins: - - plugin: go - out: gen/go - opt: - - paths=source_relative - - plugin: go-grpc - out: gen/go - opt: - - paths=source_relative - - plugin: grpc-gateway - out: gen/go - opt: - - paths=source_relative - - plugin: openapiv2 - out: gen/openapiv2 - ``` - - To use the custom protobuf annotations supported by `protoc-gen-openapiv2`, we need - another dependency added to our protobuf generation step. If you are using - `buf`, you can add the `buf.build/grpc-ecosystem/grpc-gateway` dependency - to your `deps` array: - ```yaml - version: v1 - name: buf.build/yourorg/myprotos - deps: - - buf.build/googleapis/googleapis - - buf.build/grpc-ecosystem/grpc-gateway - ``` - - With `protoc` (just the swagger file): - - ```sh - protoc -I . --openapiv2_out ./gen/openapiv2 \ - --openapiv2_opt logtostderr=true \ - your/service/v1/your_service.proto - ``` - - If you are using `protoc` to generate stubs, you will need to copy the protobuf - files from the `protoc-gen-openapiv2/options` directory of this repository, - and providing them to `protoc` when running. - - Note that this plugin also supports generating OpenAPI definitions for unannotated methods; - use the `generate_unbound_methods` option to enable this. - - It is possible with the HTTP mapping for a gRPC service method to create duplicate mappings - with the only difference being constraints on the path parameter. - - `/v1/{name=projects/*}` and `/v1/{name=organizations/*}` both become `/v1/{name}`. When - this occurs the plugin will rename the path parameter with a "_1" (or "_2" etc) suffix - to differentiate the different operations. So in the above example, the 2nd path would become - `/v1/{name_1=organizations/*}`. This can also cause OpenAPI clients to URL encode the "/" that is - part of the path parameter as that is what OpenAPI defines in the specification. To allow gRPC gateway to - accept the URL encoded slash and still route the request, use the UnescapingModeAllCharacters or - UnescapingModeLegacy (which is the default currently though may change in future versions). See - [Customizing Your Gateway](https://grpc-ecosystem.github.io/grpc-gateway/docs/mapping/customizing_your_gateway/) - for more information. +Here's what a `buf.gen.yaml` file might look like: + +```yaml +version: v1 +plugins: + - plugin: go + out: gen/go + opt: + - paths=source_relative + - plugin: go-grpc + out: gen/go + opt: + - paths=source_relative + - plugin: grpc-gateway + out: gen/go + opt: + - paths=source_relative + - plugin: openapiv2 + out: gen/openapiv2 +``` + +To use the custom protobuf annotations supported by `protoc-gen-openapiv2`, we need +another dependency added to our protobuf generation step. If you are using +`buf`, you can add the `buf.build/grpc-ecosystem/grpc-gateway` dependency +to your `deps` array: + +```yaml +version: v1 +name: buf.build/yourorg/myprotos +deps: + - buf.build/googleapis/googleapis + - buf.build/grpc-ecosystem/grpc-gateway +``` + +With `protoc` (just the swagger file): + +```sh +protoc -I . --openapiv2_out ./gen/openapiv2 \ + --openapiv2_opt logtostderr=true \ + your/service/v1/your_service.proto +``` + +If you are using `protoc` to generate stubs, you will need to copy the protobuf +files from the `protoc-gen-openapiv2/options` directory of this repository, +and providing them to `protoc` when running. + +Note that this plugin also supports generating OpenAPI definitions for unannotated methods; +use the `generate_unbound_methods` option to enable this. + +It is possible with the HTTP mapping for a gRPC service method to create duplicate mappings +with the only difference being constraints on the path parameter. + +`/v1/{name=projects/*}` and `/v1/{name=organizations/*}` both become `/v1/{name}`. When +this occurs the plugin will rename the path parameter with a "\_1" (or "\_2" etc) suffix +to differentiate the different operations. So in the above example, the 2nd path would become +`/v1/{name_1=organizations/*}`. This can also cause OpenAPI clients to URL encode the "/" that is +part of the path parameter as that is what OpenAPI defines in the specification. To allow gRPC gateway to +accept the URL encoded slash and still route the request, use the UnescapingModeAllCharacters or +UnescapingModeLegacy (which is the default currently though may change in future versions). See +[Customizing Your Gateway](https://grpc-ecosystem.github.io/grpc-gateway/docs/mapping/customizing_your_gateway/) +for more information. ## Usage with remote plugins @@ -613,4 +619,4 @@ See [CONTRIBUTING.md](http://github.com/grpc-ecosystem/grpc-gateway/blob/main/CO ## License gRPC-Gateway is licensed under the BSD 3-Clause License. -See [LICENSE.txt](https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE.txt) for more details. +See [LICENSE](https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE) for more details. diff --git a/docs/_config.yml b/docs/_config.yml index 2490ad781fe..606b48030b1 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -66,7 +66,7 @@ nav_sort: case_sensitive # Capital letters sorted before lowercase back_to_top: true back_to_top_text: "Back to top" -footer_content: 'Copyright © the gRPC-Gateway Authors. Distributed by a BSD 3-Clause License.' +footer_content: 'Copyright © the gRPC-Gateway Authors. Distributed by a BSD 3-Clause License.' # Footer last edited timestamp last_edit_timestamp: true # show or hide edit time - page must have `last_modified_date` defined in the frontmatter diff --git a/docs/index.md b/docs/index.md index 379888158fc..a2cc778cdfa 100644 --- a/docs/index.md +++ b/docs/index.md @@ -20,7 +20,7 @@ gRPC-Gateway is a plugin of [protoc](https://github.com/protocolbuffers/protobuf - + @@ -40,7 +40,7 @@ See [CONTRIBUTING.md](https://github.com/grpc-ecosystem/grpc-gateway/blob/main/C gRPC-Gateway is licensed under the BSD 3-Clause License. -See [LICENSE.txt](https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE.txt) for more details. +See [LICENSE](https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE) for more details. ### Thank you to the contributors of gRPC-Gateway diff --git a/examples/internal/browser/package.json b/examples/internal/browser/package.json index d41d3b09477..f2a18e873cd 100644 --- a/examples/internal/browser/package.json +++ b/examples/internal/browser/package.json @@ -6,7 +6,7 @@ "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", - "license": "SEE LICENSE IN LICENSE.txt", + "license": "SEE LICENSE", "devDependencies": { "bower": "^1.7.9", "bower-config": "^0.6.2", diff --git a/examples/internal/clients/abe/api/swagger.yaml b/examples/internal/clients/abe/api/swagger.yaml index 79db56b951c..0b8f9d79ca5 100644 --- a/examples/internal/clients/abe/api/swagger.yaml +++ b/examples/internal/clients/abe/api/swagger.yaml @@ -9,7 +9,7 @@ info: email: "none@example.com" license: name: "BSD 3-Clause License" - url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE.txt" + url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE" x-something-something: "yadda" tags: - name: "echo rpc" diff --git a/examples/internal/clients/unannotatedecho/api/swagger.yaml b/examples/internal/clients/unannotatedecho/api/swagger.yaml index e6572417dc0..b495bb27c5f 100644 --- a/examples/internal/clients/unannotatedecho/api/swagger.yaml +++ b/examples/internal/clients/unannotatedecho/api/swagger.yaml @@ -13,7 +13,7 @@ info: email: "none@example.com" license: name: "BSD 3-Clause License" - url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE.txt" + url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE" x-something-something: "yadda" tags: - name: "Echo" diff --git a/examples/internal/proto/examplepb/a_bit_of_everything.pb.go b/examples/internal/proto/examplepb/a_bit_of_everything.pb.go index ec09638ca08..3488471ece9 100644 --- a/examples/internal/proto/examplepb/a_bit_of_everything.pb.go +++ b/examples/internal/proto/examplepb/a_bit_of_everything.pb.go @@ -2747,109 +2747,109 @@ var file_examples_internal_proto_examplepb_a_bit_of_everything_proto_rawDesc = [ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x12, 0x26, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x73, 0x6e, 0x61, 0x6b, 0x65, 0x2f, 0x7b, 0x77, 0x68, 0x6f, 0x7d, 0x2f, 0x7b, 0x77, 0x68, 0x61, 0x74, 0x7d, - 0x2f, 0x7b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x7d, 0x42, 0xd3, 0x0c, 0x5a, 0x4b, 0x67, 0x69, 0x74, + 0x2f, 0x7b, 0x77, 0x68, 0x65, 0x72, 0x65, 0x7d, 0x42, 0xcf, 0x0c, 0x5a, 0x4b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x65, 0x63, 0x6f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, - 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x92, 0x41, 0x82, 0x0c, 0x12, 0xf4, 0x01, 0x0a, + 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x92, 0x41, 0xfe, 0x0b, 0x12, 0xf0, 0x01, 0x0a, 0x13, 0x41, 0x20, 0x42, 0x69, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x22, 0x58, 0x0a, 0x14, 0x67, 0x52, 0x50, 0x43, 0x2d, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x20, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x65, 0x63, 0x6f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x1a, 0x10, 0x6e, 0x6f, - 0x6e, 0x65, 0x40, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2a, 0x5c, + 0x6e, 0x65, 0x40, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2a, 0x58, 0x0a, 0x14, 0x42, 0x53, 0x44, 0x20, 0x33, 0x2d, 0x43, 0x6c, 0x61, 0x75, 0x73, 0x65, 0x20, 0x4c, - 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, + 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x65, 0x63, 0x6f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2f, 0x62, 0x6c, 0x6f, 0x62, 0x2f, 0x6d, 0x61, 0x69, 0x6e, - 0x2f, 0x4c, 0x49, 0x43, 0x45, 0x4e, 0x53, 0x45, 0x2e, 0x74, 0x78, 0x74, 0x32, 0x03, 0x31, 0x2e, - 0x30, 0x3a, 0x20, 0x0a, 0x15, 0x78, 0x2d, 0x73, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x69, 0x6e, 0x67, - 0x2d, 0x73, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x12, 0x07, 0x1a, 0x05, 0x79, 0x61, - 0x64, 0x64, 0x61, 0x2a, 0x03, 0x01, 0x02, 0x04, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x32, 0x16, 0x61, 0x70, 0x70, 0x6c, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x66, 0x6f, 0x6f, 0x2d, 0x6d, 0x69, - 0x6d, 0x65, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, - 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x16, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x2f, 0x78, 0x2d, 0x66, 0x6f, 0x6f, 0x2d, 0x6d, 0x69, 0x6d, 0x65, 0x52, 0x50, 0x0a, 0x03, - 0x34, 0x30, 0x33, 0x12, 0x49, 0x0a, 0x47, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, - 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x64, 0x6f, - 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, - 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x3b, - 0x0a, 0x03, 0x34, 0x30, 0x34, 0x12, 0x34, 0x0a, 0x2a, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, - 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x65, 0x78, 0x69, - 0x73, 0x74, 0x2e, 0x12, 0x06, 0x0a, 0x04, 0x9a, 0x02, 0x01, 0x07, 0x52, 0x57, 0x0a, 0x03, 0x34, - 0x31, 0x38, 0x12, 0x50, 0x0a, 0x0d, 0x49, 0x27, 0x6d, 0x20, 0x61, 0x20, 0x74, 0x65, 0x61, 0x70, - 0x6f, 0x74, 0x2e, 0x12, 0x3f, 0x0a, 0x3d, 0x1a, 0x3b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, - 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2e, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x65, - 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x4e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, - 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x9b, 0x02, 0x0a, 0x03, 0x35, 0x30, 0x30, 0x12, 0x93, 0x02, 0x0a, - 0x0c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x41, 0x0a, - 0x3f, 0x1a, 0x3d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, - 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, - 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, - 0x70, 0x62, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x1a, 0xbf, 0x01, 0x0a, 0x10, 0x58, 0x2d, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x2d, 0x49, 0x64, 0x12, 0xaa, 0x01, 0x0a, 0x2b, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, - 0x20, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x20, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, - 0x72, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x72, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x06, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x1a, 0x04, 0x75, - 0x75, 0x69, 0x64, 0x32, 0x26, 0x22, 0x32, 0x34, 0x33, 0x38, 0x61, 0x63, 0x33, 0x63, 0x2d, 0x33, - 0x37, 0x65, 0x62, 0x2d, 0x34, 0x39, 0x30, 0x32, 0x2d, 0x61, 0x64, 0x65, 0x66, 0x2d, 0x65, 0x64, - 0x31, 0x36, 0x62, 0x34, 0x34, 0x33, 0x31, 0x30, 0x33, 0x30, 0x22, 0x6a, 0x45, 0x5e, 0x5b, 0x30, - 0x2d, 0x39, 0x41, 0x2d, 0x46, 0x5d, 0x7b, 0x38, 0x7d, 0x2d, 0x5b, 0x30, 0x2d, 0x39, 0x41, 0x2d, - 0x46, 0x5d, 0x7b, 0x34, 0x7d, 0x2d, 0x34, 0x5b, 0x30, 0x2d, 0x39, 0x41, 0x2d, 0x46, 0x5d, 0x7b, - 0x33, 0x7d, 0x2d, 0x5b, 0x38, 0x39, 0x41, 0x42, 0x5d, 0x5b, 0x30, 0x2d, 0x39, 0x41, 0x2d, 0x46, - 0x5d, 0x7b, 0x33, 0x7d, 0x2d, 0x5b, 0x30, 0x2d, 0x39, 0x41, 0x2d, 0x46, 0x5d, 0x7b, 0x31, 0x32, - 0x7d, 0x24, 0x5a, 0x97, 0x03, 0x0a, 0xaa, 0x01, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, - 0x41, 0x75, 0x74, 0x68, 0x12, 0x9b, 0x01, 0x08, 0x02, 0x1a, 0x09, 0x58, 0x2d, 0x41, 0x50, 0x49, - 0x2d, 0x4b, 0x65, 0x79, 0x20, 0x02, 0x4a, 0x60, 0x0a, 0x1e, 0x78, 0x2d, 0x61, 0x6d, 0x61, 0x7a, - 0x6f, 0x6e, 0x2d, 0x61, 0x70, 0x69, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2d, 0x61, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x12, 0x3e, 0x2a, 0x3c, 0x0a, 0x29, 0x0a, 0x1c, - 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x54, 0x74, 0x6c, 0x49, 0x6e, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x12, 0x09, 0x11, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x4e, 0x40, 0x0a, 0x0f, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, - 0x07, 0x1a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x4a, 0x28, 0x0a, 0x1c, 0x78, 0x2d, 0x61, 0x6d, - 0x61, 0x7a, 0x6f, 0x6e, 0x2d, 0x61, 0x70, 0x69, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2d, - 0x61, 0x75, 0x74, 0x68, 0x74, 0x79, 0x70, 0x65, 0x12, 0x08, 0x1a, 0x06, 0x6f, 0x61, 0x75, 0x74, - 0x68, 0x32, 0x0a, 0x0f, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, - 0x02, 0x08, 0x01, 0x0a, 0xd6, 0x01, 0x0a, 0x06, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x32, 0x12, 0xcb, - 0x01, 0x08, 0x03, 0x28, 0x04, 0x32, 0x23, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x65, - 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x61, 0x75, 0x74, 0x68, - 0x2f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x3a, 0x1f, 0x68, 0x74, 0x74, 0x70, - 0x73, 0x3a, 0x2f, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x6f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x7f, 0x0a, 0x43, 0x0a, - 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x3a, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x20, 0x72, - 0x65, 0x61, 0x64, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x77, 0x72, 0x69, 0x74, 0x65, 0x20, 0x61, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x69, 0x73, 0x74, - 0x72, 0x61, 0x74, 0x69, 0x76, 0x65, 0x20, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x0a, 0x1a, 0x0a, 0x04, 0x72, 0x65, 0x61, 0x64, 0x12, 0x12, 0x47, 0x72, 0x61, 0x6e, - 0x74, 0x73, 0x20, 0x72, 0x65, 0x61, 0x64, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x0a, 0x1c, - 0x0a, 0x05, 0x77, 0x72, 0x69, 0x74, 0x65, 0x12, 0x13, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x20, - 0x77, 0x72, 0x69, 0x74, 0x65, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x62, 0x1f, 0x0a, 0x0e, - 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x0a, 0x0d, - 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x62, 0x29, 0x0a, - 0x0e, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x0a, - 0x17, 0x0a, 0x06, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x32, 0x12, 0x0d, 0x0a, 0x04, 0x72, 0x65, 0x61, - 0x64, 0x0a, 0x05, 0x77, 0x72, 0x69, 0x74, 0x65, 0x6a, 0x32, 0x0a, 0x08, 0x65, 0x63, 0x68, 0x6f, - 0x20, 0x72, 0x70, 0x63, 0x12, 0x14, 0x45, 0x63, 0x68, 0x6f, 0x20, 0x52, 0x70, 0x63, 0x20, 0x64, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x10, 0x0a, 0x0a, 0x78, 0x2d, - 0x74, 0x72, 0x61, 0x69, 0x74, 0x54, 0x61, 0x67, 0x12, 0x02, 0x20, 0x01, 0x72, 0x49, 0x0a, 0x17, - 0x4d, 0x6f, 0x72, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x75, 0x74, 0x20, 0x67, 0x52, 0x50, 0x43, 0x2d, - 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x12, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, - 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, - 0x2d, 0x65, 0x63, 0x6f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, - 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x7a, 0x28, 0x0a, 0x17, 0x78, 0x2d, 0x67, 0x72, 0x70, - 0x63, 0x2d, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2d, 0x62, 0x61, 0x7a, 0x2d, 0x6c, 0x69, - 0x73, 0x74, 0x12, 0x0d, 0x32, 0x0b, 0x0a, 0x05, 0x1a, 0x03, 0x6f, 0x6e, 0x65, 0x0a, 0x02, 0x20, - 0x01, 0x7a, 0x1b, 0x0a, 0x12, 0x78, 0x2d, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x67, 0x61, 0x74, 0x65, - 0x77, 0x61, 0x79, 0x2d, 0x66, 0x6f, 0x6f, 0x12, 0x05, 0x1a, 0x03, 0x62, 0x61, 0x72, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2f, 0x4c, 0x49, 0x43, 0x45, 0x4e, 0x53, 0x45, 0x32, 0x03, 0x31, 0x2e, 0x30, 0x3a, 0x20, 0x0a, + 0x15, 0x78, 0x2d, 0x73, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2d, 0x73, 0x6f, 0x6d, + 0x65, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x12, 0x07, 0x1a, 0x05, 0x79, 0x61, 0x64, 0x64, 0x61, 0x2a, + 0x03, 0x01, 0x02, 0x04, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x32, 0x16, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x66, 0x6f, 0x6f, 0x2d, 0x6d, 0x69, 0x6d, 0x65, 0x3a, 0x10, + 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, + 0x3a, 0x16, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, + 0x66, 0x6f, 0x6f, 0x2d, 0x6d, 0x69, 0x6d, 0x65, 0x52, 0x50, 0x0a, 0x03, 0x34, 0x30, 0x33, 0x12, + 0x49, 0x0a, 0x47, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, + 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, + 0x6f, 0x74, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x65, + 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x3b, 0x0a, 0x03, 0x34, 0x30, + 0x34, 0x12, 0x34, 0x0a, 0x2a, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, + 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, + 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x2e, 0x12, + 0x06, 0x0a, 0x04, 0x9a, 0x02, 0x01, 0x07, 0x52, 0x57, 0x0a, 0x03, 0x34, 0x31, 0x38, 0x12, 0x50, + 0x0a, 0x0d, 0x49, 0x27, 0x6d, 0x20, 0x61, 0x20, 0x74, 0x65, 0x61, 0x70, 0x6f, 0x74, 0x2e, 0x12, + 0x3f, 0x0a, 0x3d, 0x1a, 0x3b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, + 0x61, 0x79, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, + 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x4e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x45, 0x6e, 0x75, 0x6d, + 0x52, 0x9b, 0x02, 0x0a, 0x03, 0x35, 0x30, 0x30, 0x12, 0x93, 0x02, 0x0a, 0x0c, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x41, 0x0a, 0x3f, 0x1a, 0x3d, 0x2e, + 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x65, 0x78, 0x61, + 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0xbf, 0x01, 0x0a, + 0x10, 0x58, 0x2d, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x49, + 0x64, 0x12, 0xaa, 0x01, 0x0a, 0x2b, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x20, 0x65, 0x76, 0x65, + 0x6e, 0x74, 0x20, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x20, 0x66, 0x6f, + 0x72, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x73, 0x12, 0x06, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x1a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x32, + 0x26, 0x22, 0x32, 0x34, 0x33, 0x38, 0x61, 0x63, 0x33, 0x63, 0x2d, 0x33, 0x37, 0x65, 0x62, 0x2d, + 0x34, 0x39, 0x30, 0x32, 0x2d, 0x61, 0x64, 0x65, 0x66, 0x2d, 0x65, 0x64, 0x31, 0x36, 0x62, 0x34, + 0x34, 0x33, 0x31, 0x30, 0x33, 0x30, 0x22, 0x6a, 0x45, 0x5e, 0x5b, 0x30, 0x2d, 0x39, 0x41, 0x2d, + 0x46, 0x5d, 0x7b, 0x38, 0x7d, 0x2d, 0x5b, 0x30, 0x2d, 0x39, 0x41, 0x2d, 0x46, 0x5d, 0x7b, 0x34, + 0x7d, 0x2d, 0x34, 0x5b, 0x30, 0x2d, 0x39, 0x41, 0x2d, 0x46, 0x5d, 0x7b, 0x33, 0x7d, 0x2d, 0x5b, + 0x38, 0x39, 0x41, 0x42, 0x5d, 0x5b, 0x30, 0x2d, 0x39, 0x41, 0x2d, 0x46, 0x5d, 0x7b, 0x33, 0x7d, + 0x2d, 0x5b, 0x30, 0x2d, 0x39, 0x41, 0x2d, 0x46, 0x5d, 0x7b, 0x31, 0x32, 0x7d, 0x24, 0x5a, 0x97, + 0x03, 0x0a, 0xaa, 0x01, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, + 0x12, 0x9b, 0x01, 0x08, 0x02, 0x1a, 0x09, 0x58, 0x2d, 0x41, 0x50, 0x49, 0x2d, 0x4b, 0x65, 0x79, + 0x20, 0x02, 0x4a, 0x60, 0x0a, 0x1e, 0x78, 0x2d, 0x61, 0x6d, 0x61, 0x7a, 0x6f, 0x6e, 0x2d, 0x61, + 0x70, 0x69, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2d, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x7a, 0x65, 0x72, 0x12, 0x3e, 0x2a, 0x3c, 0x0a, 0x29, 0x0a, 0x1c, 0x61, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x54, 0x74, 0x6c, 0x49, + 0x6e, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x12, 0x09, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x4e, 0x40, 0x0a, 0x0f, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x07, 0x1a, 0x05, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x4a, 0x28, 0x0a, 0x1c, 0x78, 0x2d, 0x61, 0x6d, 0x61, 0x7a, 0x6f, 0x6e, + 0x2d, 0x61, 0x70, 0x69, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2d, 0x61, 0x75, 0x74, 0x68, + 0x74, 0x79, 0x70, 0x65, 0x12, 0x08, 0x1a, 0x06, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x0a, 0x0f, + 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x02, 0x08, 0x01, 0x0a, + 0xd6, 0x01, 0x0a, 0x06, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x32, 0x12, 0xcb, 0x01, 0x08, 0x03, 0x28, + 0x04, 0x32, 0x23, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, + 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x61, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x3a, 0x1f, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, + 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x61, 0x75, 0x74, + 0x68, 0x2f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x7f, 0x0a, 0x43, 0x0a, 0x05, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x12, 0x3a, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x20, 0x72, 0x65, 0x61, 0x64, 0x20, + 0x61, 0x6e, 0x64, 0x20, 0x77, 0x72, 0x69, 0x74, 0x65, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x20, 0x74, 0x6f, 0x20, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, + 0x76, 0x65, 0x20, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x1a, + 0x0a, 0x04, 0x72, 0x65, 0x61, 0x64, 0x12, 0x12, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x20, 0x72, + 0x65, 0x61, 0x64, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x0a, 0x1c, 0x0a, 0x05, 0x77, 0x72, + 0x69, 0x74, 0x65, 0x12, 0x13, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x20, 0x77, 0x72, 0x69, 0x74, + 0x65, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x62, 0x1f, 0x0a, 0x0e, 0x0a, 0x0a, 0x41, 0x70, + 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x0a, 0x0d, 0x0a, 0x09, 0x42, 0x61, + 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x62, 0x29, 0x0a, 0x0e, 0x0a, 0x0a, 0x41, + 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x0a, 0x17, 0x0a, 0x06, 0x4f, + 0x41, 0x75, 0x74, 0x68, 0x32, 0x12, 0x0d, 0x0a, 0x04, 0x72, 0x65, 0x61, 0x64, 0x0a, 0x05, 0x77, + 0x72, 0x69, 0x74, 0x65, 0x6a, 0x32, 0x0a, 0x08, 0x65, 0x63, 0x68, 0x6f, 0x20, 0x72, 0x70, 0x63, + 0x12, 0x14, 0x45, 0x63, 0x68, 0x6f, 0x20, 0x52, 0x70, 0x63, 0x20, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x10, 0x0a, 0x0a, 0x78, 0x2d, 0x74, 0x72, 0x61, 0x69, + 0x74, 0x54, 0x61, 0x67, 0x12, 0x02, 0x20, 0x01, 0x72, 0x49, 0x0a, 0x17, 0x4d, 0x6f, 0x72, 0x65, + 0x20, 0x61, 0x62, 0x6f, 0x75, 0x74, 0x20, 0x67, 0x52, 0x50, 0x43, 0x2d, 0x47, 0x61, 0x74, 0x65, + 0x77, 0x61, 0x79, 0x12, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x65, 0x63, 0x6f, + 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x67, 0x61, 0x74, 0x65, + 0x77, 0x61, 0x79, 0x7a, 0x28, 0x0a, 0x17, 0x78, 0x2d, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x67, 0x61, + 0x74, 0x65, 0x77, 0x61, 0x79, 0x2d, 0x62, 0x61, 0x7a, 0x2d, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x0d, + 0x32, 0x0b, 0x0a, 0x05, 0x1a, 0x03, 0x6f, 0x6e, 0x65, 0x0a, 0x02, 0x20, 0x01, 0x7a, 0x1b, 0x0a, + 0x12, 0x78, 0x2d, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2d, + 0x66, 0x6f, 0x6f, 0x12, 0x05, 0x1a, 0x03, 0x62, 0x61, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( diff --git a/examples/internal/proto/examplepb/a_bit_of_everything.proto b/examples/internal/proto/examplepb/a_bit_of_everything.proto index 27586e2a8c7..a40b5abb47b 100644 --- a/examples/internal/proto/examplepb/a_bit_of_everything.proto +++ b/examples/internal/proto/examplepb/a_bit_of_everything.proto @@ -28,7 +28,7 @@ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { }; license: { name: "BSD 3-Clause License"; - url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE.txt"; + url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE"; }; extensions: { key: "x-something-something"; diff --git a/examples/internal/proto/examplepb/a_bit_of_everything.swagger.json b/examples/internal/proto/examplepb/a_bit_of_everything.swagger.json index 97f422be287..159d072fbb1 100644 --- a/examples/internal/proto/examplepb/a_bit_of_everything.swagger.json +++ b/examples/internal/proto/examplepb/a_bit_of_everything.swagger.json @@ -10,7 +10,7 @@ }, "license": { "name": "BSD 3-Clause License", - "url": "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE.txt" + "url": "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE" }, "x-something-something": "yadda" }, diff --git a/examples/internal/proto/examplepb/unannotated_echo_service.swagger.json b/examples/internal/proto/examplepb/unannotated_echo_service.swagger.json index fd9eb1bf872..a00abca478e 100644 --- a/examples/internal/proto/examplepb/unannotated_echo_service.swagger.json +++ b/examples/internal/proto/examplepb/unannotated_echo_service.swagger.json @@ -11,7 +11,7 @@ }, "license": { "name": "BSD 3-Clause License", - "url": "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE.txt" + "url": "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE" }, "x-something-something": "yadda" }, diff --git a/examples/internal/proto/examplepb/unannotated_echo_service.swagger.yaml b/examples/internal/proto/examplepb/unannotated_echo_service.swagger.yaml index 483f0f80c35..83fdfca0343 100644 --- a/examples/internal/proto/examplepb/unannotated_echo_service.swagger.yaml +++ b/examples/internal/proto/examplepb/unannotated_echo_service.swagger.yaml @@ -11,7 +11,7 @@ openapiOptions: email: none@example.com license: name: BSD 3-Clause License - url: https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE.txt + url: https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE version: "1.0" extensions: x-something-something: yadda diff --git a/protoc-gen-openapiv2/options/openapiv2.pb.go b/protoc-gen-openapiv2/options/openapiv2.pb.go index ad780fc7b5b..4ad74462843 100644 --- a/protoc-gen-openapiv2/options/openapiv2.pb.go +++ b/protoc-gen-openapiv2/options/openapiv2.pb.go @@ -378,7 +378,7 @@ func (SecurityScheme_Flow) EnumDescriptor() ([]byte, []int) { // }; // license: { // name: "BSD 3-Clause License"; -// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE.txt"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE"; // }; // }; // schemes: HTTPS; @@ -1113,7 +1113,7 @@ func (x *Response) GetExtensions() map[string]*structpb.Value { // }; // license: { // name: "BSD 3-Clause License"; -// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE.txt"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE"; // }; // }; // ... @@ -1321,7 +1321,7 @@ func (x *Contact) GetEmail() string { // ... // license: { // name: "BSD 3-Clause License"; -// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE.txt"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE"; // }; // ... // }; diff --git a/protoc-gen-openapiv2/options/openapiv2.proto b/protoc-gen-openapiv2/options/openapiv2.proto index 34ddb52c0cc..9a17f021ce9 100644 --- a/protoc-gen-openapiv2/options/openapiv2.proto +++ b/protoc-gen-openapiv2/options/openapiv2.proto @@ -34,7 +34,7 @@ enum Scheme { // }; // license: { // name: "BSD 3-Clause License"; -// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE.txt"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE"; // }; // }; // schemes: HTTPS; @@ -309,7 +309,7 @@ message Response { // }; // license: { // name: "BSD 3-Clause License"; -// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE.txt"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE"; // }; // }; // ... @@ -377,7 +377,7 @@ message Contact { // ... // license: { // name: "BSD 3-Clause License"; -// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE.txt"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE"; // }; // ... // };