From 15c52a70637e8f318a90bd49519b22db92a34225 Mon Sep 17 00:00:00 2001 From: Johan Brandhorst Date: Sat, 2 Mar 2019 20:17:21 +0000 Subject: [PATCH] Upgrade generator and runtime versions (#889) * Upgrade generator and runtime versions Go 1.12 Node 10.15.2 Protoc 3.7.0 Swagger Codegen 2.4.2 * Fix vet error discovered by Go 1.12 * Regenerate protofiles with protoc 3.7.0 * Update expected error in when specifying incorrect flags Apparently this message changed with Go 1.12 * Use explicit versioning of build environment in docker commands --- .circleci/Dockerfile | 6 +-- .circleci/README.md | 2 +- .circleci/config.yml | 12 ++--- CONTRIBUTING.md | 2 +- WORKSPACE | 8 ++-- examples/clients/abe/protobuf_field_mask.go | 2 +- examples/proto/examplepb/BUILD.bazel | 2 +- .../proto/examplepb/a_bit_of_everything.pb.go | 20 ++++----- .../a_bit_of_everything.swagger.json | 2 +- examples/proto/examplepb/echo_service.pb.go | 8 ++-- .../proto/examplepb/flow_combination.pb.go | 14 +++--- .../examplepb/response_body_service.pb.go | 18 ++++---- examples/proto/examplepb/stream.pb.go | 4 +- examples/proto/examplepb/stream.swagger.json | 4 +- .../examplepb/unannotated_echo_service.pb.go | 6 +-- examples/proto/examplepb/wrappers.pb.go | 6 +-- examples/proto/pathenum/path_enum.pb.go | 10 ++--- examples/proto/sub/message.pb.go | 6 +-- examples/proto/sub2/message.pb.go | 6 +-- internal/stream_chunk.pb.go | 6 +-- .../descriptor/services_test.go | 4 +- protoc-gen-swagger/main_test.go | 6 +-- protoc-gen-swagger/options/annotations.pb.go | 4 +- protoc-gen-swagger/options/openapiv2.pb.go | 44 +++++++++---------- 24 files changed, 101 insertions(+), 101 deletions(-) diff --git a/.circleci/Dockerfile b/.circleci/Dockerfile index 10ee4847f30..1343053c0e6 100644 --- a/.circleci/Dockerfile +++ b/.circleci/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.11 +FROM golang:1.12 ## Warm apt cache RUN apt-get update @@ -12,7 +12,7 @@ RUN apt-get install -y openjdk-8-jre wget && \ ENV SWAGGER_CODEGEN="java -jar /usr/local/bin/swagger-codegen-cli.jar" # Install protoc -ENV PROTOC_VERSION=3.1.0 +ENV PROTOC_VERSION=3.7.0 RUN apt-get install -y wget unzip && \ wget https://github.com/google/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip \ -O /protoc-${PROTOC_VERSION}-linux-x86_64.zip && \ @@ -21,7 +21,7 @@ RUN apt-get install -y wget unzip && \ apt-get remove -y unzip wget # Install node -ENV NODE_VERSION=v6.1 +ENV NODE_VERSION=v10.15.2 RUN apt-get install -y wget bzip2 && \ wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash && \ apt-get remove -y wget diff --git a/.circleci/README.md b/.circleci/README.md index 6fe89053bbe..4aa13589bed 100644 --- a/.circleci/README.md +++ b/.circleci/README.md @@ -7,7 +7,7 @@ Contained within is the CI test setup for the Gateway. It runs on Circle CI. Great, it should be as simple as thus (run from the root of the directory): ```bash -$ docker run -v $(pwd):/go/src/github.com/grpc-ecosystem/grpc-gateway --rm jfbrandhorst/grpc-gateway-build-env \ +$ docker run -v $(pwd):/go/src/github.com/grpc-ecosystem/grpc-gateway --rm jfbrandhorst/grpc-gateway-build-env:1.12 \ /bin/bash -c 'cd /go/src/github.com/grpc-ecosystem/grpc-gateway && \ make realclean && \ make examples SWAGGER_CODEGEN="${SWAGGER_CODEGEN}"' diff --git a/.circleci/config.yml b/.circleci/config.yml index 3a172fabb9c..964063f8f1e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,14 +2,14 @@ version: 2 jobs: build: docker: - - image: jfbrandhorst/grpc-gateway-build-env + - image: jfbrandhorst/grpc-gateway-build-env:1.12 working_directory: /src/grpc-gateway steps: - checkout - run: go build ./... test: docker: - - image: jfbrandhorst/grpc-gateway-build-env + - image: jfbrandhorst/grpc-gateway-build-env:1.12 working_directory: /src/grpc-gateway environment: GLOG_logtostderr: '1' @@ -19,7 +19,7 @@ jobs: - run: bash <(curl -s https://codecov.io/bash) node_test: docker: - - image: jfbrandhorst/grpc-gateway-build-env + - image: jfbrandhorst/grpc-gateway-build-env:1.12 working_directory: /src/grpc-gateway steps: - checkout @@ -32,7 +32,7 @@ jobs: ./node_modules/.bin/gulp generate: docker: - - image: jfbrandhorst/grpc-gateway-build-env + - image: jfbrandhorst/grpc-gateway-build-env:1.12 working_directory: /src/grpc-gateway steps: - checkout @@ -42,7 +42,7 @@ jobs: - run: git diff --exit-code lint: docker: - - image: jfbrandhorst/grpc-gateway-build-env + - image: jfbrandhorst/grpc-gateway-build-env:1.12 working_directory: /src/grpc-gateway steps: - checkout @@ -76,7 +76,7 @@ jobs: when: always release: docker: - - image: jfbrandhorst/grpc-gateway-build-env + - image: jfbrandhorst/grpc-gateway-build-env:1.12 working_directory: /src/grpc-gateway steps: - checkout diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0c4e8287ca8..c2ac49c2bb1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -24,7 +24,7 @@ All submissions, including submissions by project members, require review. Great, it should be as simple as thus (run from the root of the directory): ```bash -docker run -v $(pwd):/src/grpc-gateway --rm jfbrandhorst/grpc-gateway-build-env \ +docker run -v $(pwd):/src/grpc-gateway --rm jfbrandhorst/grpc-gateway-build-env:1.12 \ /bin/bash -c 'cd /src/grpc-gateway && \ make realclean && \ make examples SWAGGER_CODEGEN="${SWAGGER_CODEGEN}"' diff --git a/WORKSPACE b/WORKSPACE index 66c7f2061ef..7c2f93819b5 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -5,14 +5,14 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( name = "io_bazel_rules_go", - sha256 = "492c3ac68ed9dcf527a07e6a1b2dcbf199c6bf8b35517951467ac32e421c06c1", - urls = ["https://github.com/bazelbuild/rules_go/releases/download/0.17.0/rules_go-0.17.0.tar.gz"], + sha256 = "6776d68ebb897625dead17ae510eac3d5f6342367327875210df44dbe2aeeb19", + urls = ["https://github.com/bazelbuild/rules_go/releases/download/0.17.1/rules_go-0.17.1.tar.gz"], ) http_archive( name = "bazel_gazelle", - sha256 = "7949fc6cc17b5b191103e97481cf8889217263acf52e00b560683413af204fcb", - urls = ["https://github.com/bazelbuild/bazel-gazelle/releases/download/0.16.0/bazel-gazelle-0.16.0.tar.gz"], + sha256 = "3c681998538231a2d24d0c07ed5a7658cb72bfb5fd4bf9911157c0e9ac6a2687", + urls = ["https://github.com/bazelbuild/bazel-gazelle/releases/download/0.17.0/bazel-gazelle-0.17.0.tar.gz"], ) load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies") diff --git a/examples/clients/abe/protobuf_field_mask.go b/examples/clients/abe/protobuf_field_mask.go index f30f2531765..2e21bc72874 100644 --- a/examples/clients/abe/protobuf_field_mask.go +++ b/examples/clients/abe/protobuf_field_mask.go @@ -10,7 +10,7 @@ package abe -// paths: \"f.a\" paths: \"f.b.d\" Here `f` represents a field in some root message, `a` and `b` fields in the message found in `f`, and `d` a field found in the message in `f.b`. Field masks are used to specify a subset of fields that should be returned by a get operation or modified by an update operation. Field masks also have a custom JSON encoding (see below). # Field Masks in Projections When used in the context of a projection, a response message or sub-message is filtered by the API to only contain those fields as specified in the mask. For example, if the mask in the previous example is applied to a response message as follows: f { a : 22 b { d : 1 x : 2 } y : 13 } z: 8 The result will not contain specific values for fields x,y and z (their value will be set to the default, and omitted in proto text output): f { a : 22 b { d : 1 } } A repeated field is not allowed except at the last position of a paths string. If a FieldMask object is not present in a get operation, the operation applies to all fields (as if a FieldMask of all fields had been specified). Note that a field mask does not necessarily apply to the top-level response message. In case of a REST get operation, the field mask applies directly to the response, but in case of a REST list operation, the mask instead applies to each individual message in the returned resource list. In case of a REST custom method, other definitions may be used. Where the mask applies will be clearly documented together with its declaration in the API. In any case, the effect on the returned resource/resources is required behavior for APIs. # Field Masks in Update Operations A field mask in update operations specifies which fields of the targeted resource are going to be updated. The API is required to only change the values of the fields as specified in the mask and leave the others untouched. If a resource is passed in to describe the updated values, the API ignores the values of all fields not covered by the mask. If a repeated field is specified for an update operation, the existing repeated values in the target resource will be overwritten by the new values. Note that a repeated field is only allowed in the last position of a `paths` string. If a sub-message is specified in the last position of the field mask for an update operation, then the existing sub-message in the target resource is overwritten. Given the target message: f { b { d : 1 x : 2 } c : 1 } And an update message: f { b { d : 10 } } then if the field mask is: paths: \"f.b\" then the result will be: f { b { d : 10 } c : 1 } However, if the update mask was: paths: \"f.b.d\" then the result would be: f { b { d : 10 x : 2 } c : 1 } In order to reset a field's value to the default, the field must be in the mask and set to the default value in the provided resource. Hence, in order to reset all fields of a resource, provide a default instance of the resource and set all fields in the mask, or do not provide a mask as described below. If a field mask is not present on update, the operation applies to all fields (as if a field mask of all fields has been specified). Note that in the presence of schema evolution, this may mean that fields the client does not know and has therefore not filled into the request will be reset to their default. If this is unwanted behavior, a specific service may require a client to always specify a field mask, producing an error if not. As with get operations, the location of the resource which describes the updated values in the request message depends on the operation kind. In any case, the effect of the field mask is required to be honored by the API. ## Considerations for HTTP REST The HTTP kind of an update operation which uses a field mask must be set to PATCH instead of PUT in order to satisfy HTTP semantics (PUT must only be used for full updates). # JSON Encoding of Field Masks In JSON, a field mask is encoded as a single string where paths are separated by a comma. Fields name in each path are converted to/from lower-camel naming conventions. As an example, consider the following message declarations: message Profile { User user = 1; Photo photo = 2; } message User { string display_name = 1; string address = 2; } In proto a field mask for `Profile` may look as such: mask { paths: \"user.display_name\" paths: \"photo\" } In JSON, the same mask is represented as below: { mask: \"user.displayName,photo\" } # Field Masks and Oneof Fields Field masks treat fields in oneofs just as regular fields. Consider the following message: message SampleMessage { oneof test_oneof { string name = 4; SubMessage sub_message = 9; } } The field mask can be: mask { paths: \"name\" } Or: mask { paths: \"sub_message\" } Note that oneof type names (\"test_oneof\" in this case) cannot be used in paths. +// paths: \"f.a\" paths: \"f.b.d\" Here `f` represents a field in some root message, `a` and `b` fields in the message found in `f`, and `d` a field found in the message in `f.b`. Field masks are used to specify a subset of fields that should be returned by a get operation or modified by an update operation. Field masks also have a custom JSON encoding (see below). # Field Masks in Projections When used in the context of a projection, a response message or sub-message is filtered by the API to only contain those fields as specified in the mask. For example, if the mask in the previous example is applied to a response message as follows: f { a : 22 b { d : 1 x : 2 } y : 13 } z: 8 The result will not contain specific values for fields x,y and z (their value will be set to the default, and omitted in proto text output): f { a : 22 b { d : 1 } } A repeated field is not allowed except at the last position of a paths string. If a FieldMask object is not present in a get operation, the operation applies to all fields (as if a FieldMask of all fields had been specified). Note that a field mask does not necessarily apply to the top-level response message. In case of a REST get operation, the field mask applies directly to the response, but in case of a REST list operation, the mask instead applies to each individual message in the returned resource list. In case of a REST custom method, other definitions may be used. Where the mask applies will be clearly documented together with its declaration in the API. In any case, the effect on the returned resource/resources is required behavior for APIs. # Field Masks in Update Operations A field mask in update operations specifies which fields of the targeted resource are going to be updated. The API is required to only change the values of the fields as specified in the mask and leave the others untouched. If a resource is passed in to describe the updated values, the API ignores the values of all fields not covered by the mask. If a repeated field is specified for an update operation, new values will be appended to the existing repeated field in the target resource. Note that a repeated field is only allowed in the last position of a `paths` string. If a sub-message is specified in the last position of the field mask for an update operation, then new value will be merged into the existing sub-message in the target resource. For example, given the target message: f { b { d: 1 x: 2 } c: [1] } And an update message: f { b { d: 10 } c: [2] } then if the field mask is: paths: [\"f.b\", \"f.c\"] then the result will be: f { b { d: 10 x: 2 } c: [1, 2] } An implementation may provide options to override this default behavior for repeated and message fields. In order to reset a field's value to the default, the field must be in the mask and set to the default value in the provided resource. Hence, in order to reset all fields of a resource, provide a default instance of the resource and set all fields in the mask, or do not provide a mask as described below. If a field mask is not present on update, the operation applies to all fields (as if a field mask of all fields has been specified). Note that in the presence of schema evolution, this may mean that fields the client does not know and has therefore not filled into the request will be reset to their default. If this is unwanted behavior, a specific service may require a client to always specify a field mask, producing an error if not. As with get operations, the location of the resource which describes the updated values in the request message depends on the operation kind. In any case, the effect of the field mask is required to be honored by the API. ## Considerations for HTTP REST The HTTP kind of an update operation which uses a field mask must be set to PATCH instead of PUT in order to satisfy HTTP semantics (PUT must only be used for full updates). # JSON Encoding of Field Masks In JSON, a field mask is encoded as a single string where paths are separated by a comma. Fields name in each path are converted to/from lower-camel naming conventions. As an example, consider the following message declarations: message Profile { User user = 1; Photo photo = 2; } message User { string display_name = 1; string address = 2; } In proto a field mask for `Profile` may look as such: mask { paths: \"user.display_name\" paths: \"photo\" } In JSON, the same mask is represented as below: { mask: \"user.displayName,photo\" } # Field Masks and Oneof Fields Field masks treat fields in oneofs just as regular fields. Consider the following message: message SampleMessage { oneof test_oneof { string name = 4; SubMessage sub_message = 9; } } The field mask can be: mask { paths: \"name\" } Or: mask { paths: \"sub_message\" } Note that oneof type names (\"test_oneof\" in this case) cannot be used in paths. ## Field Mask Verification The implementation of any API method which has a FieldMask type field in the request should verify the included field paths, and return an `INVALID_ARGUMENT` error if any path is duplicated or unmappable. type ProtobufFieldMask struct { // The set of field mask paths. diff --git a/examples/proto/examplepb/BUILD.bazel b/examples/proto/examplepb/BUILD.bazel index abff1fb6d90..f5aa149eb8e 100644 --- a/examples/proto/examplepb/BUILD.bazel +++ b/examples/proto/examplepb/BUILD.bazel @@ -40,7 +40,7 @@ go_proto_library( name = "examplepb_go_proto", compilers = [ "@io_bazel_rules_go//proto:go_grpc", - "//protoc-gen-grpc-gateway:go_gen_grpc_gateway", + "//protoc-gen-grpc-gateway:go_gen_grpc_gateway", # keep ], importpath = "github.com/grpc-ecosystem/grpc-gateway/examples/proto/examplepb", proto = ":examplepb_proto", diff --git a/examples/proto/examplepb/a_bit_of_everything.pb.go b/examples/proto/examplepb/a_bit_of_everything.pb.go index 4aee105fdf8..78a9e6610a0 100644 --- a/examples/proto/examplepb/a_bit_of_everything.pb.go +++ b/examples/proto/examplepb/a_bit_of_everything.pb.go @@ -55,7 +55,7 @@ func (x NumericEnum) String() string { return proto.EnumName(NumericEnum_name, int32(x)) } func (NumericEnum) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_a_bit_of_everything_13e92efa8be5f8b3, []int{0} + return fileDescriptor_a_bit_of_everything_355f53a87bca58c1, []int{0} } // DeepEnum is one or zero. @@ -81,7 +81,7 @@ func (x ABitOfEverything_Nested_DeepEnum) String() string { return proto.EnumName(ABitOfEverything_Nested_DeepEnum_name, int32(x)) } func (ABitOfEverything_Nested_DeepEnum) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_a_bit_of_everything_13e92efa8be5f8b3, []int{0, 0, 0} + return fileDescriptor_a_bit_of_everything_355f53a87bca58c1, []int{0, 0, 0} } // Intentionaly complicated message type to cover many features of Protobuf. @@ -139,7 +139,7 @@ func (m *ABitOfEverything) Reset() { *m = ABitOfEverything{} } func (m *ABitOfEverything) String() string { return proto.CompactTextString(m) } func (*ABitOfEverything) ProtoMessage() {} func (*ABitOfEverything) Descriptor() ([]byte, []int) { - return fileDescriptor_a_bit_of_everything_13e92efa8be5f8b3, []int{0} + return fileDescriptor_a_bit_of_everything_355f53a87bca58c1, []int{0} } func (m *ABitOfEverything) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ABitOfEverything.Unmarshal(m, b) @@ -512,7 +512,7 @@ func (m *ABitOfEverything_Nested) Reset() { *m = ABitOfEverything_Nested func (m *ABitOfEverything_Nested) String() string { return proto.CompactTextString(m) } func (*ABitOfEverything_Nested) ProtoMessage() {} func (*ABitOfEverything_Nested) Descriptor() ([]byte, []int) { - return fileDescriptor_a_bit_of_everything_13e92efa8be5f8b3, []int{0, 0} + return fileDescriptor_a_bit_of_everything_355f53a87bca58c1, []int{0, 0} } func (m *ABitOfEverything_Nested) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ABitOfEverything_Nested.Unmarshal(m, b) @@ -581,7 +581,7 @@ func (m *ABitOfEverythingRepeated) Reset() { *m = ABitOfEverythingRepeat func (m *ABitOfEverythingRepeated) String() string { return proto.CompactTextString(m) } func (*ABitOfEverythingRepeated) ProtoMessage() {} func (*ABitOfEverythingRepeated) Descriptor() ([]byte, []int) { - return fileDescriptor_a_bit_of_everything_13e92efa8be5f8b3, []int{1} + return fileDescriptor_a_bit_of_everything_355f53a87bca58c1, []int{1} } func (m *ABitOfEverythingRepeated) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ABitOfEverythingRepeated.Unmarshal(m, b) @@ -724,7 +724,7 @@ func (m *Body) Reset() { *m = Body{} } func (m *Body) String() string { return proto.CompactTextString(m) } func (*Body) ProtoMessage() {} func (*Body) Descriptor() ([]byte, []int) { - return fileDescriptor_a_bit_of_everything_13e92efa8be5f8b3, []int{2} + return fileDescriptor_a_bit_of_everything_355f53a87bca58c1, []int{2} } func (m *Body) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Body.Unmarshal(m, b) @@ -763,7 +763,7 @@ func (m *MessageWithBody) Reset() { *m = MessageWithBody{} } func (m *MessageWithBody) String() string { return proto.CompactTextString(m) } func (*MessageWithBody) ProtoMessage() {} func (*MessageWithBody) Descriptor() ([]byte, []int) { - return fileDescriptor_a_bit_of_everything_13e92efa8be5f8b3, []int{3} + return fileDescriptor_a_bit_of_everything_355f53a87bca58c1, []int{3} } func (m *MessageWithBody) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MessageWithBody.Unmarshal(m, b) @@ -810,7 +810,7 @@ func (m *UpdateV2Request) Reset() { *m = UpdateV2Request{} } func (m *UpdateV2Request) String() string { return proto.CompactTextString(m) } func (*UpdateV2Request) ProtoMessage() {} func (*UpdateV2Request) Descriptor() ([]byte, []int) { - return fileDescriptor_a_bit_of_everything_13e92efa8be5f8b3, []int{4} + return fileDescriptor_a_bit_of_everything_355f53a87bca58c1, []int{4} } func (m *UpdateV2Request) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UpdateV2Request.Unmarshal(m, b) @@ -1574,10 +1574,10 @@ var _AnotherServiceWithNoBindings_serviceDesc = grpc.ServiceDesc{ } func init() { - proto.RegisterFile("examples/proto/examplepb/a_bit_of_everything.proto", fileDescriptor_a_bit_of_everything_13e92efa8be5f8b3) + proto.RegisterFile("examples/proto/examplepb/a_bit_of_everything.proto", fileDescriptor_a_bit_of_everything_355f53a87bca58c1) } -var fileDescriptor_a_bit_of_everything_13e92efa8be5f8b3 = []byte{ +var fileDescriptor_a_bit_of_everything_355f53a87bca58c1 = []byte{ // 3233 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x39, 0x5b, 0x6f, 0x1b, 0xc7, 0xb9, 0x5a, 0xae, 0xae, 0xa3, 0x1b, 0x35, 0xb2, 0x65, 0x8a, 0x56, 0xa2, 0x31, 0xed, 0x24, 0x6b, diff --git a/examples/proto/examplepb/a_bit_of_everything.swagger.json b/examples/proto/examplepb/a_bit_of_everything.swagger.json index b8639ec204f..f786e898f00 100644 --- a/examples/proto/examplepb/a_bit_of_everything.swagger.json +++ b/examples/proto/examplepb/a_bit_of_everything.swagger.json @@ -1869,7 +1869,7 @@ "description": "The set of field mask paths." } }, - "description": "paths: \"f.a\"\n paths: \"f.b.d\"\n\nHere `f` represents a field in some root message, `a` and `b`\nfields in the message found in `f`, and `d` a field found in the\nmessage in `f.b`.\n\nField masks are used to specify a subset of fields that should be\nreturned by a get operation or modified by an update operation.\nField masks also have a custom JSON encoding (see below).\n\n# Field Masks in Projections\n\nWhen used in the context of a projection, a response message or\nsub-message is filtered by the API to only contain those fields as\nspecified in the mask. For example, if the mask in the previous\nexample is applied to a response message as follows:\n\n f {\n a : 22\n b {\n d : 1\n x : 2\n }\n y : 13\n }\n z: 8\n\nThe result will not contain specific values for fields x,y and z\n(their value will be set to the default, and omitted in proto text\noutput):\n\n\n f {\n a : 22\n b {\n d : 1\n }\n }\n\nA repeated field is not allowed except at the last position of a\npaths string.\n\nIf a FieldMask object is not present in a get operation, the\noperation applies to all fields (as if a FieldMask of all fields\nhad been specified).\n\nNote that a field mask does not necessarily apply to the\ntop-level response message. In case of a REST get operation, the\nfield mask applies directly to the response, but in case of a REST\nlist operation, the mask instead applies to each individual message\nin the returned resource list. In case of a REST custom method,\nother definitions may be used. Where the mask applies will be\nclearly documented together with its declaration in the API. In\nany case, the effect on the returned resource/resources is required\nbehavior for APIs.\n\n# Field Masks in Update Operations\n\nA field mask in update operations specifies which fields of the\ntargeted resource are going to be updated. The API is required\nto only change the values of the fields as specified in the mask\nand leave the others untouched. If a resource is passed in to\ndescribe the updated values, the API ignores the values of all\nfields not covered by the mask.\n\nIf a repeated field is specified for an update operation, the existing\nrepeated values in the target resource will be overwritten by the new values.\nNote that a repeated field is only allowed in the last position of a `paths`\nstring.\n\nIf a sub-message is specified in the last position of the field mask for an\nupdate operation, then the existing sub-message in the target resource is\noverwritten. Given the target message:\n\n f {\n b {\n d : 1\n x : 2\n }\n c : 1\n }\n\nAnd an update message:\n\n f {\n b {\n d : 10\n }\n }\n\nthen if the field mask is:\n\n paths: \"f.b\"\n\nthen the result will be:\n\n f {\n b {\n d : 10\n }\n c : 1\n }\n\nHowever, if the update mask was:\n\n paths: \"f.b.d\"\n\nthen the result would be:\n\n f {\n b {\n d : 10\n x : 2\n }\n c : 1\n }\n\nIn order to reset a field's value to the default, the field must\nbe in the mask and set to the default value in the provided resource.\nHence, in order to reset all fields of a resource, provide a default\ninstance of the resource and set all fields in the mask, or do\nnot provide a mask as described below.\n\nIf a field mask is not present on update, the operation applies to\nall fields (as if a field mask of all fields has been specified).\nNote that in the presence of schema evolution, this may mean that\nfields the client does not know and has therefore not filled into\nthe request will be reset to their default. If this is unwanted\nbehavior, a specific service may require a client to always specify\na field mask, producing an error if not.\n\nAs with get operations, the location of the resource which\ndescribes the updated values in the request message depends on the\noperation kind. In any case, the effect of the field mask is\nrequired to be honored by the API.\n\n## Considerations for HTTP REST\n\nThe HTTP kind of an update operation which uses a field mask must\nbe set to PATCH instead of PUT in order to satisfy HTTP semantics\n(PUT must only be used for full updates).\n\n# JSON Encoding of Field Masks\n\nIn JSON, a field mask is encoded as a single string where paths are\nseparated by a comma. Fields name in each path are converted\nto/from lower-camel naming conventions.\n\nAs an example, consider the following message declarations:\n\n message Profile {\n User user = 1;\n Photo photo = 2;\n }\n message User {\n string display_name = 1;\n string address = 2;\n }\n\nIn proto a field mask for `Profile` may look as such:\n\n mask {\n paths: \"user.display_name\"\n paths: \"photo\"\n }\n\nIn JSON, the same mask is represented as below:\n\n {\n mask: \"user.displayName,photo\"\n }\n\n# Field Masks and Oneof Fields\n\nField masks treat fields in oneofs just as regular fields. Consider the\nfollowing message:\n\n message SampleMessage {\n oneof test_oneof {\n string name = 4;\n SubMessage sub_message = 9;\n }\n }\n\nThe field mask can be:\n\n mask {\n paths: \"name\"\n }\n\nOr:\n\n mask {\n paths: \"sub_message\"\n }\n\nNote that oneof type names (\"test_oneof\" in this case) cannot be used in\npaths.", + "description": "paths: \"f.a\"\n paths: \"f.b.d\"\n\nHere `f` represents a field in some root message, `a` and `b`\nfields in the message found in `f`, and `d` a field found in the\nmessage in `f.b`.\n\nField masks are used to specify a subset of fields that should be\nreturned by a get operation or modified by an update operation.\nField masks also have a custom JSON encoding (see below).\n\n# Field Masks in Projections\n\nWhen used in the context of a projection, a response message or\nsub-message is filtered by the API to only contain those fields as\nspecified in the mask. For example, if the mask in the previous\nexample is applied to a response message as follows:\n\n f {\n a : 22\n b {\n d : 1\n x : 2\n }\n y : 13\n }\n z: 8\n\nThe result will not contain specific values for fields x,y and z\n(their value will be set to the default, and omitted in proto text\noutput):\n\n\n f {\n a : 22\n b {\n d : 1\n }\n }\n\nA repeated field is not allowed except at the last position of a\npaths string.\n\nIf a FieldMask object is not present in a get operation, the\noperation applies to all fields (as if a FieldMask of all fields\nhad been specified).\n\nNote that a field mask does not necessarily apply to the\ntop-level response message. In case of a REST get operation, the\nfield mask applies directly to the response, but in case of a REST\nlist operation, the mask instead applies to each individual message\nin the returned resource list. In case of a REST custom method,\nother definitions may be used. Where the mask applies will be\nclearly documented together with its declaration in the API. In\nany case, the effect on the returned resource/resources is required\nbehavior for APIs.\n\n# Field Masks in Update Operations\n\nA field mask in update operations specifies which fields of the\ntargeted resource are going to be updated. The API is required\nto only change the values of the fields as specified in the mask\nand leave the others untouched. If a resource is passed in to\ndescribe the updated values, the API ignores the values of all\nfields not covered by the mask.\n\nIf a repeated field is specified for an update operation, new values will\nbe appended to the existing repeated field in the target resource. Note that\na repeated field is only allowed in the last position of a `paths` string.\n\nIf a sub-message is specified in the last position of the field mask for an\nupdate operation, then new value will be merged into the existing sub-message\nin the target resource.\n\nFor example, given the target message:\n\n f {\n b {\n d: 1\n x: 2\n }\n c: [1]\n }\n\nAnd an update message:\n\n f {\n b {\n d: 10\n }\n c: [2]\n }\n\nthen if the field mask is:\n\n paths: [\"f.b\", \"f.c\"]\n\nthen the result will be:\n\n f {\n b {\n d: 10\n x: 2\n }\n c: [1, 2]\n }\n\nAn implementation may provide options to override this default behavior for\nrepeated and message fields.\n\nIn order to reset a field's value to the default, the field must\nbe in the mask and set to the default value in the provided resource.\nHence, in order to reset all fields of a resource, provide a default\ninstance of the resource and set all fields in the mask, or do\nnot provide a mask as described below.\n\nIf a field mask is not present on update, the operation applies to\nall fields (as if a field mask of all fields has been specified).\nNote that in the presence of schema evolution, this may mean that\nfields the client does not know and has therefore not filled into\nthe request will be reset to their default. If this is unwanted\nbehavior, a specific service may require a client to always specify\na field mask, producing an error if not.\n\nAs with get operations, the location of the resource which\ndescribes the updated values in the request message depends on the\noperation kind. In any case, the effect of the field mask is\nrequired to be honored by the API.\n\n## Considerations for HTTP REST\n\nThe HTTP kind of an update operation which uses a field mask must\nbe set to PATCH instead of PUT in order to satisfy HTTP semantics\n(PUT must only be used for full updates).\n\n# JSON Encoding of Field Masks\n\nIn JSON, a field mask is encoded as a single string where paths are\nseparated by a comma. Fields name in each path are converted\nto/from lower-camel naming conventions.\n\nAs an example, consider the following message declarations:\n\n message Profile {\n User user = 1;\n Photo photo = 2;\n }\n message User {\n string display_name = 1;\n string address = 2;\n }\n\nIn proto a field mask for `Profile` may look as such:\n\n mask {\n paths: \"user.display_name\"\n paths: \"photo\"\n }\n\nIn JSON, the same mask is represented as below:\n\n {\n mask: \"user.displayName,photo\"\n }\n\n# Field Masks and Oneof Fields\n\nField masks treat fields in oneofs just as regular fields. Consider the\nfollowing message:\n\n message SampleMessage {\n oneof test_oneof {\n string name = 4;\n SubMessage sub_message = 9;\n }\n }\n\nThe field mask can be:\n\n mask {\n paths: \"name\"\n }\n\nOr:\n\n mask {\n paths: \"sub_message\"\n }\n\nNote that oneof type names (\"test_oneof\" in this case) cannot be used in\npaths.\n\n## Field Mask Verification\n\nThe implementation of any API method which has a FieldMask type field in the\nrequest should verify the included field paths, and return an\n`INVALID_ARGUMENT` error if any path is duplicated or unmappable.", "title": "`FieldMask` represents a set of symbolic field paths, for example:" }, "subStringMessage": { diff --git a/examples/proto/examplepb/echo_service.pb.go b/examples/proto/examplepb/echo_service.pb.go index da8af13fbf9..5c1500fb2e5 100644 --- a/examples/proto/examplepb/echo_service.pb.go +++ b/examples/proto/examplepb/echo_service.pb.go @@ -46,7 +46,7 @@ func (m *Embedded) Reset() { *m = Embedded{} } func (m *Embedded) String() string { return proto.CompactTextString(m) } func (*Embedded) ProtoMessage() {} func (*Embedded) Descriptor() ([]byte, []int) { - return fileDescriptor_echo_service_c13a64d5f1f0c068, []int{0} + return fileDescriptor_echo_service_8fe0ac1ad649faf8, []int{0} } func (m *Embedded) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Embedded.Unmarshal(m, b) @@ -191,7 +191,7 @@ func (m *SimpleMessage) Reset() { *m = SimpleMessage{} } func (m *SimpleMessage) String() string { return proto.CompactTextString(m) } func (*SimpleMessage) ProtoMessage() {} func (*SimpleMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_echo_service_c13a64d5f1f0c068, []int{1} + return fileDescriptor_echo_service_8fe0ac1ad649faf8, []int{1} } func (m *SimpleMessage) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SimpleMessage.Unmarshal(m, b) @@ -572,10 +572,10 @@ var _EchoService_serviceDesc = grpc.ServiceDesc{ } func init() { - proto.RegisterFile("examples/proto/examplepb/echo_service.proto", fileDescriptor_echo_service_c13a64d5f1f0c068) + proto.RegisterFile("examples/proto/examplepb/echo_service.proto", fileDescriptor_echo_service_8fe0ac1ad649faf8) } -var fileDescriptor_echo_service_c13a64d5f1f0c068 = []byte{ +var fileDescriptor_echo_service_8fe0ac1ad649faf8 = []byte{ // 470 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x53, 0x3f, 0x6f, 0xd3, 0x40, 0x14, 0xef, 0xd9, 0x6e, 0x9a, 0xbc, 0x08, 0x54, 0x9d, 0x40, 0x98, 0xb4, 0xa8, 0x91, 0xc5, 0x10, diff --git a/examples/proto/examplepb/flow_combination.pb.go b/examples/proto/examplepb/flow_combination.pb.go index 25e2b775e50..f50fe51ba5c 100644 --- a/examples/proto/examplepb/flow_combination.pb.go +++ b/examples/proto/examplepb/flow_combination.pb.go @@ -34,7 +34,7 @@ func (m *EmptyProto) Reset() { *m = EmptyProto{} } func (m *EmptyProto) String() string { return proto.CompactTextString(m) } func (*EmptyProto) ProtoMessage() {} func (*EmptyProto) Descriptor() ([]byte, []int) { - return fileDescriptor_flow_combination_40371c0acedc1fc5, []int{0} + return fileDescriptor_flow_combination_63ace3110e4bd00b, []int{0} } func (m *EmptyProto) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_EmptyProto.Unmarshal(m, b) @@ -67,7 +67,7 @@ func (m *NonEmptyProto) Reset() { *m = NonEmptyProto{} } func (m *NonEmptyProto) String() string { return proto.CompactTextString(m) } func (*NonEmptyProto) ProtoMessage() {} func (*NonEmptyProto) Descriptor() ([]byte, []int) { - return fileDescriptor_flow_combination_40371c0acedc1fc5, []int{1} + return fileDescriptor_flow_combination_63ace3110e4bd00b, []int{1} } func (m *NonEmptyProto) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_NonEmptyProto.Unmarshal(m, b) @@ -119,7 +119,7 @@ func (m *UnaryProto) Reset() { *m = UnaryProto{} } func (m *UnaryProto) String() string { return proto.CompactTextString(m) } func (*UnaryProto) ProtoMessage() {} func (*UnaryProto) Descriptor() ([]byte, []int) { - return fileDescriptor_flow_combination_40371c0acedc1fc5, []int{2} + return fileDescriptor_flow_combination_63ace3110e4bd00b, []int{2} } func (m *UnaryProto) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UnaryProto.Unmarshal(m, b) @@ -159,7 +159,7 @@ func (m *NestedProto) Reset() { *m = NestedProto{} } func (m *NestedProto) String() string { return proto.CompactTextString(m) } func (*NestedProto) ProtoMessage() {} func (*NestedProto) Descriptor() ([]byte, []int) { - return fileDescriptor_flow_combination_40371c0acedc1fc5, []int{3} + return fileDescriptor_flow_combination_63ace3110e4bd00b, []int{3} } func (m *NestedProto) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_NestedProto.Unmarshal(m, b) @@ -211,7 +211,7 @@ func (m *SingleNestedProto) Reset() { *m = SingleNestedProto{} } func (m *SingleNestedProto) String() string { return proto.CompactTextString(m) } func (*SingleNestedProto) ProtoMessage() {} func (*SingleNestedProto) Descriptor() ([]byte, []int) { - return fileDescriptor_flow_combination_40371c0acedc1fc5, []int{4} + return fileDescriptor_flow_combination_63ace3110e4bd00b, []int{4} } func (m *SingleNestedProto) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SingleNestedProto.Unmarshal(m, b) @@ -791,10 +791,10 @@ var _FlowCombination_serviceDesc = grpc.ServiceDesc{ } func init() { - proto.RegisterFile("examples/proto/examplepb/flow_combination.proto", fileDescriptor_flow_combination_40371c0acedc1fc5) + proto.RegisterFile("examples/proto/examplepb/flow_combination.proto", fileDescriptor_flow_combination_63ace3110e4bd00b) } -var fileDescriptor_flow_combination_40371c0acedc1fc5 = []byte{ +var fileDescriptor_flow_combination_63ace3110e4bd00b = []byte{ // 655 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x96, 0xbf, 0x8f, 0x12, 0x41, 0x14, 0xc7, 0xf3, 0xb8, 0xc4, 0xe4, 0x86, 0xfb, 0xc1, 0x2d, 0x06, 0x81, 0xc3, 0xe3, 0x6e, 0xbc, diff --git a/examples/proto/examplepb/response_body_service.pb.go b/examples/proto/examplepb/response_body_service.pb.go index ba11d58bb78..ed7ead481db 100644 --- a/examples/proto/examplepb/response_body_service.pb.go +++ b/examples/proto/examplepb/response_body_service.pb.go @@ -50,7 +50,7 @@ func (x RepeatedResponseBodyOut_Response_ResponseType) String() string { return proto.EnumName(RepeatedResponseBodyOut_Response_ResponseType_name, int32(x)) } func (RepeatedResponseBodyOut_Response_ResponseType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_response_body_service_811d1d707fc0d3aa, []int{2, 0, 0} + return fileDescriptor_response_body_service_d3778d99bb1173be, []int{2, 0, 0} } type ResponseBodyIn struct { @@ -64,7 +64,7 @@ func (m *ResponseBodyIn) Reset() { *m = ResponseBodyIn{} } func (m *ResponseBodyIn) String() string { return proto.CompactTextString(m) } func (*ResponseBodyIn) ProtoMessage() {} func (*ResponseBodyIn) Descriptor() ([]byte, []int) { - return fileDescriptor_response_body_service_811d1d707fc0d3aa, []int{0} + return fileDescriptor_response_body_service_d3778d99bb1173be, []int{0} } func (m *ResponseBodyIn) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ResponseBodyIn.Unmarshal(m, b) @@ -102,7 +102,7 @@ func (m *ResponseBodyOut) Reset() { *m = ResponseBodyOut{} } func (m *ResponseBodyOut) String() string { return proto.CompactTextString(m) } func (*ResponseBodyOut) ProtoMessage() {} func (*ResponseBodyOut) Descriptor() ([]byte, []int) { - return fileDescriptor_response_body_service_811d1d707fc0d3aa, []int{1} + return fileDescriptor_response_body_service_d3778d99bb1173be, []int{1} } func (m *ResponseBodyOut) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ResponseBodyOut.Unmarshal(m, b) @@ -140,7 +140,7 @@ func (m *ResponseBodyOut_Response) Reset() { *m = ResponseBodyOut_Respon func (m *ResponseBodyOut_Response) String() string { return proto.CompactTextString(m) } func (*ResponseBodyOut_Response) ProtoMessage() {} func (*ResponseBodyOut_Response) Descriptor() ([]byte, []int) { - return fileDescriptor_response_body_service_811d1d707fc0d3aa, []int{1, 0} + return fileDescriptor_response_body_service_d3778d99bb1173be, []int{1, 0} } func (m *ResponseBodyOut_Response) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ResponseBodyOut_Response.Unmarshal(m, b) @@ -178,7 +178,7 @@ func (m *RepeatedResponseBodyOut) Reset() { *m = RepeatedResponseBodyOut func (m *RepeatedResponseBodyOut) String() string { return proto.CompactTextString(m) } func (*RepeatedResponseBodyOut) ProtoMessage() {} func (*RepeatedResponseBodyOut) Descriptor() ([]byte, []int) { - return fileDescriptor_response_body_service_811d1d707fc0d3aa, []int{2} + return fileDescriptor_response_body_service_d3778d99bb1173be, []int{2} } func (m *RepeatedResponseBodyOut) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RepeatedResponseBodyOut.Unmarshal(m, b) @@ -217,7 +217,7 @@ func (m *RepeatedResponseBodyOut_Response) Reset() { *m = RepeatedRespon func (m *RepeatedResponseBodyOut_Response) String() string { return proto.CompactTextString(m) } func (*RepeatedResponseBodyOut_Response) ProtoMessage() {} func (*RepeatedResponseBodyOut_Response) Descriptor() ([]byte, []int) { - return fileDescriptor_response_body_service_811d1d707fc0d3aa, []int{2, 0} + return fileDescriptor_response_body_service_d3778d99bb1173be, []int{2, 0} } func (m *RepeatedResponseBodyOut_Response) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RepeatedResponseBodyOut_Response.Unmarshal(m, b) @@ -262,7 +262,7 @@ func (m *RepeatedResponseStrings) Reset() { *m = RepeatedResponseStrings func (m *RepeatedResponseStrings) String() string { return proto.CompactTextString(m) } func (*RepeatedResponseStrings) ProtoMessage() {} func (*RepeatedResponseStrings) Descriptor() ([]byte, []int) { - return fileDescriptor_response_body_service_811d1d707fc0d3aa, []int{3} + return fileDescriptor_response_body_service_d3778d99bb1173be, []int{3} } func (m *RepeatedResponseStrings) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RepeatedResponseStrings.Unmarshal(m, b) @@ -438,10 +438,10 @@ var _ResponseBodyService_serviceDesc = grpc.ServiceDesc{ } func init() { - proto.RegisterFile("examples/proto/examplepb/response_body_service.proto", fileDescriptor_response_body_service_811d1d707fc0d3aa) + proto.RegisterFile("examples/proto/examplepb/response_body_service.proto", fileDescriptor_response_body_service_d3778d99bb1173be) } -var fileDescriptor_response_body_service_811d1d707fc0d3aa = []byte{ +var fileDescriptor_response_body_service_d3778d99bb1173be = []byte{ // 441 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x94, 0xcf, 0xaa, 0xd3, 0x40, 0x14, 0xc6, 0x9d, 0xb4, 0x5e, 0x6f, 0x27, 0x72, 0x6f, 0x99, 0x2b, 0xf7, 0x86, 0x22, 0x1a, 0x07, diff --git a/examples/proto/examplepb/stream.pb.go b/examples/proto/examplepb/stream.pb.go index cc0c274c8ea..8c1cd2e920b 100644 --- a/examples/proto/examplepb/stream.pb.go +++ b/examples/proto/examplepb/stream.pb.go @@ -258,10 +258,10 @@ var _StreamService_serviceDesc = grpc.ServiceDesc{ } func init() { - proto.RegisterFile("examples/proto/examplepb/stream.proto", fileDescriptor_stream_0929397c5d8d3331) + proto.RegisterFile("examples/proto/examplepb/stream.proto", fileDescriptor_stream_44f32a4fe5bf6004) } -var fileDescriptor_stream_0929397c5d8d3331 = []byte{ +var fileDescriptor_stream_44f32a4fe5bf6004 = []byte{ // 319 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x90, 0xb1, 0x4e, 0xc3, 0x30, 0x10, 0x86, 0x15, 0x40, 0x08, 0x8c, 0x58, 0x3c, 0x30, 0x04, 0xa4, 0x42, 0x05, 0xa2, 0x30, 0xd8, diff --git a/examples/proto/examplepb/stream.swagger.json b/examples/proto/examplepb/stream.swagger.json index 4418cbb5ce3..259900180bb 100644 --- a/examples/proto/examplepb/stream.swagger.json +++ b/examples/proto/examplepb/stream.swagger.json @@ -330,7 +330,7 @@ "properties": { "type_url": { "type": "string", - "description": "A URL/resource name whose content describes the type of the\nserialized protocol buffer message.\n\nFor URLs which use the scheme `http`, `https`, or no scheme, the\nfollowing restrictions and interpretations apply:\n\n* If no scheme is provided, `https` is assumed.\n* The last segment of the URL's path must represent the fully\n qualified name of the type (as in `path/google.protobuf.Duration`).\n The name should be in a canonical form (e.g., leading \".\" is\n not accepted).\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." }, "value": { "type": "string", @@ -338,7 +338,7 @@ "description": "Must be a valid serialized protocol buffer of the above specified type." } }, - "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := ptypes.MarshalAny(foo)\n ...\n foo := \u0026pb.Foo{}\n if err := ptypes.UnmarshalAny(any, foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" }, "runtimeStreamError": { "type": "object", diff --git a/examples/proto/examplepb/unannotated_echo_service.pb.go b/examples/proto/examplepb/unannotated_echo_service.pb.go index 28f0d7311d0..73699e5c602 100644 --- a/examples/proto/examplepb/unannotated_echo_service.pb.go +++ b/examples/proto/examplepb/unannotated_echo_service.pb.go @@ -49,7 +49,7 @@ func (m *UnannotatedSimpleMessage) Reset() { *m = UnannotatedSimpleMessa func (m *UnannotatedSimpleMessage) String() string { return proto.CompactTextString(m) } func (*UnannotatedSimpleMessage) ProtoMessage() {} func (*UnannotatedSimpleMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_unannotated_echo_service_33987b03bf51a339, []int{0} + return fileDescriptor_unannotated_echo_service_ca2b904682e29806, []int{0} } func (m *UnannotatedSimpleMessage) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UnannotatedSimpleMessage.Unmarshal(m, b) @@ -245,10 +245,10 @@ var _UnannotatedEchoService_serviceDesc = grpc.ServiceDesc{ } func init() { - proto.RegisterFile("examples/proto/examplepb/unannotated_echo_service.proto", fileDescriptor_unannotated_echo_service_33987b03bf51a339) + proto.RegisterFile("examples/proto/examplepb/unannotated_echo_service.proto", fileDescriptor_unannotated_echo_service_ca2b904682e29806) } -var fileDescriptor_unannotated_echo_service_33987b03bf51a339 = []byte{ +var fileDescriptor_unannotated_echo_service_ca2b904682e29806 = []byte{ // 268 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x32, 0x4f, 0xad, 0x48, 0xcc, 0x2d, 0xc8, 0x49, 0x2d, 0xd6, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0xd7, 0x87, 0x72, 0x0b, 0x92, 0xf4, diff --git a/examples/proto/examplepb/wrappers.pb.go b/examples/proto/examplepb/wrappers.pb.go index 0b0616ee60c..48462f92b92 100644 --- a/examples/proto/examplepb/wrappers.pb.go +++ b/examples/proto/examplepb/wrappers.pb.go @@ -45,7 +45,7 @@ func (m *Wrappers) Reset() { *m = Wrappers{} } func (m *Wrappers) String() string { return proto.CompactTextString(m) } func (*Wrappers) ProtoMessage() {} func (*Wrappers) Descriptor() ([]byte, []int) { - return fileDescriptor_wrappers_3d2e9c7780d635b4, []int{0} + return fileDescriptor_wrappers_1614a2b17737abd3, []int{0} } func (m *Wrappers) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Wrappers.Unmarshal(m, b) @@ -535,10 +535,10 @@ var _WrappersService_serviceDesc = grpc.ServiceDesc{ } func init() { - proto.RegisterFile("examples/proto/examplepb/wrappers.proto", fileDescriptor_wrappers_3d2e9c7780d635b4) + proto.RegisterFile("examples/proto/examplepb/wrappers.proto", fileDescriptor_wrappers_1614a2b17737abd3) } -var fileDescriptor_wrappers_3d2e9c7780d635b4 = []byte{ +var fileDescriptor_wrappers_1614a2b17737abd3 = []byte{ // 578 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x95, 0xdd, 0x6e, 0xd3, 0x30, 0x14, 0xc7, 0xd5, 0x31, 0xca, 0xea, 0x0c, 0xc6, 0x0c, 0x82, 0xcd, 0x9b, 0x18, 0xca, 0x0d, 0xb0, diff --git a/examples/proto/pathenum/path_enum.pb.go b/examples/proto/pathenum/path_enum.pb.go index 6de95037484..a3daa1953d4 100644 --- a/examples/proto/pathenum/path_enum.pb.go +++ b/examples/proto/pathenum/path_enum.pb.go @@ -38,7 +38,7 @@ func (x PathEnum) String() string { return proto.EnumName(PathEnum_name, int32(x)) } func (PathEnum) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_path_enum_f14abf5268452f40, []int{0} + return fileDescriptor_path_enum_802d5f52757a97bd, []int{0} } type MessagePathEnum_NestedPathEnum int32 @@ -61,7 +61,7 @@ func (x MessagePathEnum_NestedPathEnum) String() string { return proto.EnumName(MessagePathEnum_NestedPathEnum_name, int32(x)) } func (MessagePathEnum_NestedPathEnum) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_path_enum_f14abf5268452f40, []int{0, 0} + return fileDescriptor_path_enum_802d5f52757a97bd, []int{0, 0} } type MessagePathEnum struct { @@ -74,7 +74,7 @@ func (m *MessagePathEnum) Reset() { *m = MessagePathEnum{} } func (m *MessagePathEnum) String() string { return proto.CompactTextString(m) } func (*MessagePathEnum) ProtoMessage() {} func (*MessagePathEnum) Descriptor() ([]byte, []int) { - return fileDescriptor_path_enum_f14abf5268452f40, []int{0} + return fileDescriptor_path_enum_802d5f52757a97bd, []int{0} } func (m *MessagePathEnum) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MessagePathEnum.Unmarshal(m, b) @@ -101,10 +101,10 @@ func init() { } func init() { - proto.RegisterFile("examples/proto/pathenum/path_enum.proto", fileDescriptor_path_enum_f14abf5268452f40) + proto.RegisterFile("examples/proto/pathenum/path_enum.proto", fileDescriptor_path_enum_802d5f52757a97bd) } -var fileDescriptor_path_enum_f14abf5268452f40 = []byte{ +var fileDescriptor_path_enum_802d5f52757a97bd = []byte{ // 175 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4f, 0xad, 0x48, 0xcc, 0x2d, 0xc8, 0x49, 0x2d, 0xd6, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0xd7, 0x2f, 0x48, 0x2c, 0xc9, 0x48, diff --git a/examples/proto/sub/message.pb.go b/examples/proto/sub/message.pb.go index 81612434029..cc5381674f7 100644 --- a/examples/proto/sub/message.pb.go +++ b/examples/proto/sub/message.pb.go @@ -29,7 +29,7 @@ func (m *StringMessage) Reset() { *m = StringMessage{} } func (m *StringMessage) String() string { return proto.CompactTextString(m) } func (*StringMessage) ProtoMessage() {} func (*StringMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_message_c180d3d1a4bbfe02, []int{0} + return fileDescriptor_message_6a35c3d524a65df7, []int{0} } func (m *StringMessage) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_StringMessage.Unmarshal(m, b) @@ -61,10 +61,10 @@ func init() { } func init() { - proto.RegisterFile("examples/proto/sub/message.proto", fileDescriptor_message_c180d3d1a4bbfe02) + proto.RegisterFile("examples/proto/sub/message.proto", fileDescriptor_message_6a35c3d524a65df7) } -var fileDescriptor_message_c180d3d1a4bbfe02 = []byte{ +var fileDescriptor_message_6a35c3d524a65df7 = []byte{ // 114 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x48, 0xad, 0x48, 0xcc, 0x2d, 0xc8, 0x49, 0x2d, 0xd6, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0xd7, 0x2f, 0x2e, 0x4d, 0xd2, 0xcf, diff --git a/examples/proto/sub2/message.pb.go b/examples/proto/sub2/message.pb.go index 6819b67ae3c..586c6440b98 100644 --- a/examples/proto/sub2/message.pb.go +++ b/examples/proto/sub2/message.pb.go @@ -29,7 +29,7 @@ func (m *IdMessage) Reset() { *m = IdMessage{} } func (m *IdMessage) String() string { return proto.CompactTextString(m) } func (*IdMessage) ProtoMessage() {} func (*IdMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_message_1fa155de06adc960, []int{0} + return fileDescriptor_message_9619dbc3ad374621, []int{0} } func (m *IdMessage) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_IdMessage.Unmarshal(m, b) @@ -61,10 +61,10 @@ func init() { } func init() { - proto.RegisterFile("examples/proto/sub2/message.proto", fileDescriptor_message_1fa155de06adc960) + proto.RegisterFile("examples/proto/sub2/message.proto", fileDescriptor_message_9619dbc3ad374621) } -var fileDescriptor_message_1fa155de06adc960 = []byte{ +var fileDescriptor_message_9619dbc3ad374621 = []byte{ // 130 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4c, 0xad, 0x48, 0xcc, 0x2d, 0xc8, 0x49, 0x2d, 0xd6, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0xd7, 0x2f, 0x2e, 0x4d, 0x32, 0xd2, diff --git a/internal/stream_chunk.pb.go b/internal/stream_chunk.pb.go index c6cfb5c1c02..8858f069046 100644 --- a/internal/stream_chunk.pb.go +++ b/internal/stream_chunk.pb.go @@ -36,7 +36,7 @@ func (m *StreamError) Reset() { *m = StreamError{} } func (m *StreamError) String() string { return proto.CompactTextString(m) } func (*StreamError) ProtoMessage() {} func (*StreamError) Descriptor() ([]byte, []int) { - return fileDescriptor_stream_chunk_cac6867f460b29a5, []int{0} + return fileDescriptor_stream_chunk_a2afb657504565d7, []int{0} } func (m *StreamError) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_StreamError.Unmarshal(m, b) @@ -96,10 +96,10 @@ func init() { } func init() { - proto.RegisterFile("internal/stream_chunk.proto", fileDescriptor_stream_chunk_cac6867f460b29a5) + proto.RegisterFile("internal/stream_chunk.proto", fileDescriptor_stream_chunk_a2afb657504565d7) } -var fileDescriptor_stream_chunk_cac6867f460b29a5 = []byte{ +var fileDescriptor_stream_chunk_a2afb657504565d7 = []byte{ // 223 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x34, 0x90, 0x41, 0x4e, 0xc3, 0x30, 0x10, 0x45, 0x15, 0x4a, 0x69, 0x3b, 0xd9, 0x45, 0x5d, 0x18, 0xba, 0x20, 0x62, 0x95, 0x95, 0x23, diff --git a/protoc-gen-grpc-gateway/descriptor/services_test.go b/protoc-gen-grpc-gateway/descriptor/services_test.go index 355ce6099fc..1ccb8fbef0a 100644 --- a/protoc-gen-grpc-gateway/descriptor/services_test.go +++ b/protoc-gen-grpc-gateway/descriptor/services_test.go @@ -99,11 +99,11 @@ func testExtractServices(t *testing.T, input []*descriptor.FileDescriptorProto, } for ; k < len(meth.Bindings); k++ { got := meth.Bindings[k] - t.Errorf("svcs[%d].Methods[%d].Bindings[%d] = %q; want it to be missing; input = %v", i, j, k, got, input) + t.Errorf("svcs[%d].Methods[%d].Bindings[%d] = %v; want it to be missing; input = %v", i, j, k, got, input) } for ; k < len(wantMeth.Bindings); k++ { want := wantMeth.Bindings[k] - t.Errorf("svcs[%d].Methods[%d].Bindings[%d] missing; want %q; input = %v", i, j, k, want, input) + t.Errorf("svcs[%d].Methods[%d].Bindings[%d] missing; want %v; input = %v", i, j, k, want, input) } } for ; j < len(svc.Methods); j++ { diff --git a/protoc-gen-swagger/main_test.go b/protoc-gen-swagger/main_test.go index 2c6eec129d4..7dcbf0c0bb5 100644 --- a/protoc-gen-swagger/main_test.go +++ b/protoc-gen-swagger/main_test.go @@ -88,7 +88,7 @@ func TestParseReqParam(t *testing.T) { name: "Test 8", expected: map[string]string{}, request: "allow_delete_body,file,import_prefix,allow_merge,allow_repeated_fields_in_body=3,merge_file_name", - expectedError: errors.New(`Cannot set flag allow_repeated_fields_in_body=3: strconv.ParseBool: parsing "3": invalid syntax`), + expectedError: errors.New(`Cannot set flag allow_repeated_fields_in_body=3: parse error`), allowDeleteBodyV: true, allowMergeV: true, allowRepeatedFieldsInBodyV: false, includePackageInTagsV: false, fileV: "", importPathV: "", mergeFileNameV: "apidocs", }, @@ -96,7 +96,7 @@ func TestParseReqParam(t *testing.T) { name: "Test 9", expected: map[string]string{}, request: "include_package_in_tags=3", - expectedError: errors.New(`Cannot set flag include_package_in_tags=3: strconv.ParseBool: parsing "3": invalid syntax`), + expectedError: errors.New(`Cannot set flag include_package_in_tags=3: parse error`), allowDeleteBodyV: false, allowMergeV: false, allowRepeatedFieldsInBodyV: false, includePackageInTagsV: false, fileV: "stdin", importPathV: "", mergeFileNameV: "apidocs", }, @@ -104,7 +104,7 @@ func TestParseReqParam(t *testing.T) { name: "Test 10", expected: map[string]string{}, request: "fqn_for_swagger_name=3", - expectedError: errors.New(`Cannot set flag fqn_for_swagger_name=3: strconv.ParseBool: parsing "3": invalid syntax`), + expectedError: errors.New(`Cannot set flag fqn_for_swagger_name=3: parse error`), allowDeleteBodyV: false, allowMergeV: false, allowRepeatedFieldsInBodyV: false, includePackageInTagsV: false, useFQNForSwaggerNameV: false, fileV: "stdin", importPathV: "", mergeFileNameV: "apidocs", }, diff --git a/protoc-gen-swagger/options/annotations.pb.go b/protoc-gen-swagger/options/annotations.pb.go index a743078b45c..9fc282bb7bd 100644 --- a/protoc-gen-swagger/options/annotations.pb.go +++ b/protoc-gen-swagger/options/annotations.pb.go @@ -73,10 +73,10 @@ func init() { } func init() { - proto.RegisterFile("protoc-gen-swagger/options/annotations.proto", fileDescriptor_annotations_24d91a1b8877b604) + proto.RegisterFile("protoc-gen-swagger/options/annotations.proto", fileDescriptor_annotations_8378bd63c2853a5a) } -var fileDescriptor_annotations_24d91a1b8877b604 = []byte{ +var fileDescriptor_annotations_8378bd63c2853a5a = []byte{ // 346 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x4f, 0x4f, 0xea, 0x40, 0x14, 0xc5, 0xc3, 0xe6, 0xe5, 0xa5, 0xef, 0xa9, 0x58, 0x37, 0x86, 0xf8, 0x87, 0x9d, 0xc6, 0xc0, diff --git a/protoc-gen-swagger/options/openapiv2.pb.go b/protoc-gen-swagger/options/openapiv2.pb.go index dd6cfd5d072..8bf40b05e6a 100644 --- a/protoc-gen-swagger/options/openapiv2.pb.go +++ b/protoc-gen-swagger/options/openapiv2.pb.go @@ -48,7 +48,7 @@ func (x Swagger_SwaggerScheme) String() string { return proto.EnumName(Swagger_SwaggerScheme_name, int32(x)) } func (Swagger_SwaggerScheme) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_openapiv2_11f010f5fecc79bc, []int{0, 0} + return fileDescriptor_openapiv2_29cfb415de848cf5, []int{0, 0} } type JSONSchema_JSONSchemaSimpleTypes int32 @@ -89,7 +89,7 @@ func (x JSONSchema_JSONSchemaSimpleTypes) String() string { return proto.EnumName(JSONSchema_JSONSchemaSimpleTypes_name, int32(x)) } func (JSONSchema_JSONSchemaSimpleTypes) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_openapiv2_11f010f5fecc79bc, []int{8, 0} + return fileDescriptor_openapiv2_29cfb415de848cf5, []int{8, 0} } // Required. The type of the security scheme. Valid values are "basic", @@ -120,7 +120,7 @@ func (x SecurityScheme_Type) String() string { return proto.EnumName(SecurityScheme_Type_name, int32(x)) } func (SecurityScheme_Type) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_openapiv2_11f010f5fecc79bc, []int{11, 0} + return fileDescriptor_openapiv2_29cfb415de848cf5, []int{11, 0} } // Required. The location of the API key. Valid values are "query" or "header". @@ -147,7 +147,7 @@ func (x SecurityScheme_In) String() string { return proto.EnumName(SecurityScheme_In_name, int32(x)) } func (SecurityScheme_In) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_openapiv2_11f010f5fecc79bc, []int{11, 1} + return fileDescriptor_openapiv2_29cfb415de848cf5, []int{11, 1} } // Required. The flow used by the OAuth2 security scheme. Valid values are @@ -181,7 +181,7 @@ func (x SecurityScheme_Flow) String() string { return proto.EnumName(SecurityScheme_Flow_name, int32(x)) } func (SecurityScheme_Flow) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_openapiv2_11f010f5fecc79bc, []int{11, 2} + return fileDescriptor_openapiv2_29cfb415de848cf5, []int{11, 2} } // `Swagger` is a representation of OpenAPI v2 specification's Swagger object. @@ -210,7 +210,7 @@ func (m *Swagger) Reset() { *m = Swagger{} } func (m *Swagger) String() string { return proto.CompactTextString(m) } func (*Swagger) ProtoMessage() {} func (*Swagger) Descriptor() ([]byte, []int) { - return fileDescriptor_openapiv2_11f010f5fecc79bc, []int{0} + return fileDescriptor_openapiv2_29cfb415de848cf5, []int{0} } func (m *Swagger) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Swagger.Unmarshal(m, b) @@ -333,7 +333,7 @@ func (m *Operation) Reset() { *m = Operation{} } func (m *Operation) String() string { return proto.CompactTextString(m) } func (*Operation) ProtoMessage() {} func (*Operation) Descriptor() ([]byte, []int) { - return fileDescriptor_openapiv2_11f010f5fecc79bc, []int{1} + return fileDescriptor_openapiv2_29cfb415de848cf5, []int{1} } func (m *Operation) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Operation.Unmarshal(m, b) @@ -450,7 +450,7 @@ func (m *Response) Reset() { *m = Response{} } func (m *Response) String() string { return proto.CompactTextString(m) } func (*Response) ProtoMessage() {} func (*Response) Descriptor() ([]byte, []int) { - return fileDescriptor_openapiv2_11f010f5fecc79bc, []int{2} + return fileDescriptor_openapiv2_29cfb415de848cf5, []int{2} } func (m *Response) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Response.Unmarshal(m, b) @@ -505,7 +505,7 @@ func (m *Info) Reset() { *m = Info{} } func (m *Info) String() string { return proto.CompactTextString(m) } func (*Info) ProtoMessage() {} func (*Info) Descriptor() ([]byte, []int) { - return fileDescriptor_openapiv2_11f010f5fecc79bc, []int{3} + return fileDescriptor_openapiv2_29cfb415de848cf5, []int{3} } func (m *Info) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Info.Unmarshal(m, b) @@ -585,7 +585,7 @@ func (m *Contact) Reset() { *m = Contact{} } func (m *Contact) String() string { return proto.CompactTextString(m) } func (*Contact) ProtoMessage() {} func (*Contact) Descriptor() ([]byte, []int) { - return fileDescriptor_openapiv2_11f010f5fecc79bc, []int{4} + return fileDescriptor_openapiv2_29cfb415de848cf5, []int{4} } func (m *Contact) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Contact.Unmarshal(m, b) @@ -644,7 +644,7 @@ func (m *License) Reset() { *m = License{} } func (m *License) String() string { return proto.CompactTextString(m) } func (*License) ProtoMessage() {} func (*License) Descriptor() ([]byte, []int) { - return fileDescriptor_openapiv2_11f010f5fecc79bc, []int{5} + return fileDescriptor_openapiv2_29cfb415de848cf5, []int{5} } func (m *License) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_License.Unmarshal(m, b) @@ -696,7 +696,7 @@ func (m *ExternalDocumentation) Reset() { *m = ExternalDocumentation{} } func (m *ExternalDocumentation) String() string { return proto.CompactTextString(m) } func (*ExternalDocumentation) ProtoMessage() {} func (*ExternalDocumentation) Descriptor() ([]byte, []int) { - return fileDescriptor_openapiv2_11f010f5fecc79bc, []int{6} + return fileDescriptor_openapiv2_29cfb415de848cf5, []int{6} } func (m *ExternalDocumentation) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ExternalDocumentation.Unmarshal(m, b) @@ -750,7 +750,7 @@ func (m *Schema) Reset() { *m = Schema{} } func (m *Schema) String() string { return proto.CompactTextString(m) } func (*Schema) ProtoMessage() {} func (*Schema) Descriptor() ([]byte, []int) { - return fileDescriptor_openapiv2_11f010f5fecc79bc, []int{7} + return fileDescriptor_openapiv2_29cfb415de848cf5, []int{7} } func (m *Schema) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Schema.Unmarshal(m, b) @@ -854,7 +854,7 @@ func (m *JSONSchema) Reset() { *m = JSONSchema{} } func (m *JSONSchema) String() string { return proto.CompactTextString(m) } func (*JSONSchema) ProtoMessage() {} func (*JSONSchema) Descriptor() ([]byte, []int) { - return fileDescriptor_openapiv2_11f010f5fecc79bc, []int{8} + return fileDescriptor_openapiv2_29cfb415de848cf5, []int{8} } func (m *JSONSchema) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_JSONSchema.Unmarshal(m, b) @@ -1040,7 +1040,7 @@ func (m *Tag) Reset() { *m = Tag{} } func (m *Tag) String() string { return proto.CompactTextString(m) } func (*Tag) ProtoMessage() {} func (*Tag) Descriptor() ([]byte, []int) { - return fileDescriptor_openapiv2_11f010f5fecc79bc, []int{9} + return fileDescriptor_openapiv2_29cfb415de848cf5, []int{9} } func (m *Tag) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Tag.Unmarshal(m, b) @@ -1094,7 +1094,7 @@ func (m *SecurityDefinitions) Reset() { *m = SecurityDefinitions{} } func (m *SecurityDefinitions) String() string { return proto.CompactTextString(m) } func (*SecurityDefinitions) ProtoMessage() {} func (*SecurityDefinitions) Descriptor() ([]byte, []int) { - return fileDescriptor_openapiv2_11f010f5fecc79bc, []int{10} + return fileDescriptor_openapiv2_29cfb415de848cf5, []int{10} } func (m *SecurityDefinitions) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SecurityDefinitions.Unmarshal(m, b) @@ -1172,7 +1172,7 @@ func (m *SecurityScheme) Reset() { *m = SecurityScheme{} } func (m *SecurityScheme) String() string { return proto.CompactTextString(m) } func (*SecurityScheme) ProtoMessage() {} func (*SecurityScheme) Descriptor() ([]byte, []int) { - return fileDescriptor_openapiv2_11f010f5fecc79bc, []int{11} + return fileDescriptor_openapiv2_29cfb415de848cf5, []int{11} } func (m *SecurityScheme) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SecurityScheme.Unmarshal(m, b) @@ -1274,7 +1274,7 @@ func (m *SecurityRequirement) Reset() { *m = SecurityRequirement{} } func (m *SecurityRequirement) String() string { return proto.CompactTextString(m) } func (*SecurityRequirement) ProtoMessage() {} func (*SecurityRequirement) Descriptor() ([]byte, []int) { - return fileDescriptor_openapiv2_11f010f5fecc79bc, []int{12} + return fileDescriptor_openapiv2_29cfb415de848cf5, []int{12} } func (m *SecurityRequirement) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SecurityRequirement.Unmarshal(m, b) @@ -1319,7 +1319,7 @@ func (m *SecurityRequirement_SecurityRequirementValue) String() string { } func (*SecurityRequirement_SecurityRequirementValue) ProtoMessage() {} func (*SecurityRequirement_SecurityRequirementValue) Descriptor() ([]byte, []int) { - return fileDescriptor_openapiv2_11f010f5fecc79bc, []int{12, 0} + return fileDescriptor_openapiv2_29cfb415de848cf5, []int{12, 0} } func (m *SecurityRequirement_SecurityRequirementValue) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SecurityRequirement_SecurityRequirementValue.Unmarshal(m, b) @@ -1364,7 +1364,7 @@ func (m *Scopes) Reset() { *m = Scopes{} } func (m *Scopes) String() string { return proto.CompactTextString(m) } func (*Scopes) ProtoMessage() {} func (*Scopes) Descriptor() ([]byte, []int) { - return fileDescriptor_openapiv2_11f010f5fecc79bc, []int{13} + return fileDescriptor_openapiv2_29cfb415de848cf5, []int{13} } func (m *Scopes) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Scopes.Unmarshal(m, b) @@ -1420,10 +1420,10 @@ func init() { } func init() { - proto.RegisterFile("protoc-gen-swagger/options/openapiv2.proto", fileDescriptor_openapiv2_11f010f5fecc79bc) + proto.RegisterFile("protoc-gen-swagger/options/openapiv2.proto", fileDescriptor_openapiv2_29cfb415de848cf5) } -var fileDescriptor_openapiv2_11f010f5fecc79bc = []byte{ +var fileDescriptor_openapiv2_29cfb415de848cf5 = []byte{ // 1777 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0xdd, 0x73, 0xdb, 0xc6, 0x11, 0x0f, 0x48, 0x90, 0x04, 0x97, 0x22, 0x73, 0x3e, 0xcb, 0x2d, 0xa2, 0xc4, 0xae, 0xc2, 0xa6,