diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml
index a0da2fcc0bc..58e328a0198 100644
--- a/.bazelci/presubmit.yml
+++ b/.bazelci/presubmit.yml
@@ -4,29 +4,19 @@ platforms:
build_flags:
- "--build_tag_filters=-nolinux"
build_targets:
- - "..."
+ - "//..."
test_flags:
- "--features=race"
- "--test_tag_filters=-nolinux"
test_targets:
- - "..."
- ubuntu1604:
- build_flags:
- - "--build_tag_filters=-nolinux"
- build_targets:
- - "..."
- test_flags:
- - "--features=race"
- - "--test_tag_filters=-nolinux"
- test_targets:
- - "..."
+ - "//..."
macos:
build_flags:
- "--build_tag_filters=-nomacos"
build_targets:
- - "..."
+ - "//..."
test_flags:
- "--features=race"
- "--test_tag_filters=-nomacos"
test_targets:
- - "..."
+ - "//..."
diff --git a/.bazelversion b/.bazelversion
index 1545d966571..84197c89467 100644
--- a/.bazelversion
+++ b/.bazelversion
@@ -1 +1 @@
-3.5.0
+5.3.2
diff --git a/.circleci/Dockerfile b/.circleci/Dockerfile
deleted file mode 100644
index 2320bbf3d5f..00000000000
--- a/.circleci/Dockerfile
+++ /dev/null
@@ -1,34 +0,0 @@
-FROM golang:1.16.3
-
-# Warm apt cache and install dependencies
-# bzip2 is required by the node_tests (to extract its dependencies).
-# patch is required by bazel tests
-RUN apt-get update && \
- apt-get install -y wget unzip \
- openjdk-11-jre \
- bzip2 \
- patch
-
-# Install swagger-codegen
-ENV SWAGGER_CODEGEN_VERSION=2.4.8
-RUN wget https://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/${SWAGGER_CODEGEN_VERSION}/swagger-codegen-cli-${SWAGGER_CODEGEN_VERSION}.jar \
- -O /usr/local/bin/swagger-codegen-cli.jar
-
-# Wrap the jar for swagger-codgen
-RUN echo -e '#!/bin/bash\njava -jar /usr/local/bin/swagger-codegen-cli.jar "$@"' > /usr/local/bin/swagger-codegen && \
- chmod +x /usr/local/bin/swagger-codegen
-
-# Install node, used by NVM
-ENV NODE_VERSION=v10.16.3
-ENV NVM_VERSION=v0.35.0
-RUN wget -qO- https://raw.githubusercontent.com/creationix/nvm/${NVM_VERSION}/install.sh | bash
-
-# Install Bazelisk as bazel to manage Bazel
-RUN go get github.com/bazelbuild/bazelisk && \
- mv $(which bazelisk) /usr/local/bin/bazel
-
-# Clean up
-RUN apt-get autoremove -y && \
- apt-get remove -y wget \
- unzip && \
- rm -rf /var/lib/apt/lists/*
diff --git a/.circleci/config.yml b/.circleci/config.yml
deleted file mode 100644
index a66077dc7cf..00000000000
--- a/.circleci/config.yml
+++ /dev/null
@@ -1,206 +0,0 @@
-version: 2.1
-
-commands:
- configure_bazel:
- description: Create Bazel config file (.bazelrc)
- steps:
- - run: |
- cat > .bazelrc \<< EOF
- startup --output_base /root/.cache/_grpc_gateway_bazel
- build --test_output errors
- build --features race
- # Workaround https://github.com/bazelbuild/bazel/issues/3645
- # See https://docs.bazel.build/versions/0.23.0/command-line-reference.html
- build --local_ram_resources=4096 # Circle Docker runners have 4G of memory
- build --local_cpu_resources=2 # Circle Docker runners have 2 vCPU
- EOF
- generate:
- steps:
- - run: make install
- - run: make clean
- - run: make generate
- - run: go mod tidy
- renovate_git_amend_push:
- description: Git amend and push changes
- steps:
- - run: |
- git add .
- if output=$(git status --porcelain) && [ ! -z "$output" ]; then
- git config user.name "Renovate Bot"
- git config user.email "bot@renovateapp.com"
- git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/grpc-ecosystem/grpc-gateway.git
- git commit --amend --no-edit
- git push --force-with-lease origin ${CIRCLE_BRANCH}
- fi
-
-executors:
- build-env:
- environment:
- ## Split key to avoid github revoking it
- password0: "99544cdcb19ad4e3fd64"
- password1: "3ec86b2e5a431be2d72c"
- GLOG_logtostderr: "1"
- docker:
- - image: docker.pkg.github.com/grpc-ecosystem/grpc-gateway/build-env:1.16
- auth:
- username: gateway-ci-user
- password: ${password0}${password1}
-
-jobs:
- build:
- executor: build-env
- working_directory: /src/grpc-gateway
- steps:
- - checkout
- - run: go build ./...
- test:
- executor: build-env
- working_directory: /src/grpc-gateway
- steps:
- - checkout
- - run: go test -race -coverprofile=coverage.txt ./...
- - run: bash <(curl -s https://codecov.io/bash)
- node_test:
- executor: build-env
- working_directory: /src/grpc-gateway
- steps:
- - checkout
- - run: go mod vendor
- - run: >
- . $HOME/.nvm/nvm.sh &&
- cd examples/internal/browser &&
- npm install gulp-cli &&
- npm install &&
- ./node_modules/.bin/gulp
- generate:
- executor: build-env
- working_directory: /src/grpc-gateway
- steps:
- - checkout
- - generate
- - run: git diff --exit-code
- bazel:
- executor: build-env
- working_directory: /src/grpc-gateway
- steps:
- - checkout
- - restore_cache:
- keys:
- - v2-bazel-cache-{{ checksum "repositories.bzl" }}
- - v2-bazel-cache-
- - configure_bazel
- - run:
- name: Check that Bazel BUILD files are up-to-date
- command: |
- bazel run //:gazelle &&
- git diff --exit-code
- - run:
- name: Check that repositories.bzl is up-to-date
- command: |
- bazel run //:gazelle -- update-repos -from_file=go.mod -to_macro=repositories.bzl%go_repositories &&
- git diff --exit-code
- - run:
- name: Check formatting of Bazel BUILD files
- command: |
- bazel run //:buildifier &&
- git diff --exit-code
- - run:
- name: Run tests with Bazel
- command: bazel test //...
- - save_cache:
- key: v2-bazel-cache-{{ checksum "repositories.bzl" }}
- paths:
- - /root/.cache/_grpc_gateway_bazel
- gorelease:
- executor: build-env
- working_directory: /src/grpc-gateway
- steps:
- - checkout
- - run:
- name: Install gorelease outside local module
- command: |
- cd $(mktemp -d) &&
- go mod init tmp &&
- go get golang.org/x/exp/cmd/gorelease@latest
- - run: gorelease -base=$(git describe --abbrev=0)
- proto_lint:
- docker:
- - image: bufbuild/buf:0.41.0
- steps:
- - checkout
- - run: buf build
- - run: buf lint
- - run: buf breaking --path protoc-gen-openapiv2/options/annotations.proto --path protoc-gen-openapiv2/options/openapiv2.proto --against 'https://github.com/grpc-ecosystem/grpc-gateway.git#branch=master'
- proto_push:
- docker:
- - image: bufbuild/buf:0.41.0
- steps:
- - checkout
- - run: echo -e "machine buf.build\npassword ${BUF_API_TOKEN}" >> ~/.netrc
- - run: buf beta push
- release:
- executor: build-env
- working_directory: /src/grpc-gateway
- steps:
- - checkout
- - run: go mod vendor
- - run: curl -sL https://git.io/goreleaser | bash
- update-repositoriesbzl:
- executor: build-env
- working_directory: /src/grpc-gateway
- steps:
- - checkout
- - restore_cache:
- keys:
- - v2-bazel-cache-{{ checksum "repositories.bzl" }}
- - v2-bazel-cache-
- - configure_bazel
- - run:
- name: Update repositories.bzl
- command: |
- bazel run //:gazelle -- update-repos -from_file=go.mod -to_macro=repositories.bzl%go_repositories
- - renovate_git_amend_push
- regenerate:
- executor: build-env
- working_directory: /src/grpc-gateway
- steps:
- - checkout
- - generate
- - renovate_git_amend_push
-workflows:
- version: 2
- all:
- jobs:
- - build
- - test
- - node_test
- - generate
- - bazel
- - gorelease
- - proto_lint
- - proto_push:
- filters:
- branches:
- only: /^master$/
- - release:
- filters:
- branches:
- ignore: /.*/
- tags:
- only: /v[0-9]+(\.[0-9]+)*(-.*)*/
- - update-repositoriesbzl:
- filters:
- branches:
- only: /renovate\/master-.+/
- tags:
- ignore: /.*/
- - regenerate:
- requires:
- # Run after update-repositoriesbzl to avoid
- # git conflicts
- - update-repositoriesbzl
- filters:
- branches:
- only: /renovate\/master-.+/
- tags:
- ignore: /.*/
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
index 5c8a07c69c5..2ce6f07d2b1 100644
--- a/.devcontainer/devcontainer.json
+++ b/.devcontainer/devcontainer.json
@@ -1,23 +1,25 @@
+// For format details, see https://aka.ms/devcontainer.json.
{
- "dockerFile": "../.circleci/Dockerfile",
- "overrideCommand": true,
- // Set *default* container specific settings.json values on container create.
+ "name": "Go",
+ "build": {
+ "dockerfile": "../.github/Dockerfile",
+ "args": {
+ "NODE_VERSION": "10"
+ }
+ },
"settings": {
"editor.formatOnSave": true,
- "terminal.integrated.shell.linux": "/bin/bash",
- "go.useGoProxyToCheckForToolUpdates": true,
+ "go.toolsManagement.checkForUpdates": "local",
"go.useLanguageServer": true,
"go.gopath": "/go",
"go.goroot": "/usr/local/go",
- "go.toolsGopath": "/go/bin",
"bazel.buildifierExecutable": "/go/bin/buildifier",
"bazel.buildifierFixOnFormat": true,
"bazel.enableCodeLens": true,
},
- // Add the IDs of extensions you want installed when the container is created.
"extensions": [
"golang.Go",
"bazelbuild.vscode-bazel",
],
- "postCreateCommand": "cd $(mktemp -d) && GO111MODULE=on go get golang.org/x/tools/gopls@latest github.com/bazelbuild/buildtools/buildifier@latest && cd -",
+ "remoteUser": "vscode"
}
diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs
new file mode 100644
index 00000000000..cbe263961f9
--- /dev/null
+++ b/.git-blame-ignore-revs
@@ -0,0 +1,3 @@
+# .git-blame-ignore-revs
+# Formatted all protobuf files
+bc0110188a8ef8e232050c3d9b347198dc83536a
diff --git a/.github/Dockerfile b/.github/Dockerfile
new file mode 100644
index 00000000000..4ff3a47e25f
--- /dev/null
+++ b/.github/Dockerfile
@@ -0,0 +1,53 @@
+FROM golang:1.19.3
+
+ENV NVM_DIR="/usr/local/share/nvm"
+ENV NVM_SYMLINK_CURRENT=true \
+ PATH=${NVM_DIR}/current/bin:${PATH}
+
+ARG VSCODE_SCRIPTS_VERSION="v0.193.0"
+ARG NODE_VERSION="10"
+# Run some common installation scripts for a nicer dev environment. In order:
+# Used to create non-root user and update system packages
+# https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/common.md
+# We use this to install Go tools used by gopls
+# https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/go.md
+# We use this to install Node
+# https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/node.md
+RUN apt-get update && \
+ wget "https://raw.githubusercontent.com/microsoft/vscode-dev-containers/${VSCODE_SCRIPTS_VERSION}/script-library/common-debian.sh" && \
+ chmod +x ./common-debian.sh && \
+ ./common-debian.sh false vscode automatic automatic true false && \
+ wget "https://raw.githubusercontent.com/microsoft/vscode-dev-containers/${VSCODE_SCRIPTS_VERSION}/script-library/go-debian.sh" && \
+ chmod +x ./go-debian.sh && \
+ ./go-debian.sh none /usr/local/go /go vscode false true && \
+ wget "https://raw.githubusercontent.com/microsoft/vscode-dev-containers/${VSCODE_SCRIPTS_VERSION}/script-library/node-debian.sh" && \
+ chmod +x ./node-debian.sh && \
+ ./node-debian.sh "${NVM_DIR}" "${NODE_VERSION}" vscode true && \
+ rm common-debian.sh go-debian.sh node-debian.sh && \
+ DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends \
+ wget \
+ unzip \
+ openjdk-11-jre \
+ bzip2 \
+ patch && \
+ apt-get clean -y && \
+ rm -rf /var/lib/apt/lists/*
+
+# Install swagger-codegen
+ENV SWAGGER_CODEGEN_VERSION=2.4.8
+RUN wget https://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/${SWAGGER_CODEGEN_VERSION}/swagger-codegen-cli-${SWAGGER_CODEGEN_VERSION}.jar \
+ -O /usr/local/bin/swagger-codegen-cli.jar && \
+ echo '#!/bin/bash\njava -jar /usr/local/bin/swagger-codegen-cli.jar "$@"' > /usr/local/bin/swagger-codegen && \
+ chmod +x /usr/local/bin/swagger-codegen
+
+# Install Bazelisk as bazel to manage Bazel
+RUN go install github.com/bazelbuild/bazelisk@latest && \
+ mv $(which bazelisk) /usr/local/bin/bazel
+
+# Install buildifier for bazel formatting
+RUN go install github.com/bazelbuild/buildtools/buildifier@latest
+
+# Give vscode ownership of GOPATH
+RUN chown -R vscode: /go
+
+USER vscode
diff --git a/.circleci/README.md b/.github/README_GITHUB.md
similarity index 70%
rename from .circleci/README.md
rename to .github/README_GITHUB.md
index 1338f0078a6..5364b0d9e97 100644
--- a/.circleci/README.md
+++ b/.github/README_GITHUB.md
@@ -1,7 +1,3 @@
-## gRPC-Gateway CI testing setup
-
-Contained within is the CI test setup for the Gateway. It runs on Circle CI.
-
### Whats up with the Dockerfile?
The `Dockerfile` in this folder is used as the build environment when regenerating the files (see CONTRIBUTING.md).
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 00000000000..c4740b4d25e
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,15 @@
+# To get started with Dependabot version updates, you'll need to specify which
+# package ecosystems to update and where the package manifests are located.
+# Please see the documentation for all configuration options:
+# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
+
+version: 2
+updates:
+ - package-ecosystem: "bundler" # See documentation for possible values
+ directory: "/docs" # Location of package manifests
+ schedule:
+ interval: "daily"
+ - package-ecosystem: "github-actions"
+ directory: "/"
+ schedule:
+ interval: daily
diff --git a/.github/plugins/protoc-gen-grpc-gateway/Dockerfile b/.github/plugins/protoc-gen-grpc-gateway/Dockerfile
new file mode 100644
index 00000000000..04c141e7364
--- /dev/null
+++ b/.github/plugins/protoc-gen-grpc-gateway/Dockerfile
@@ -0,0 +1,25 @@
+FROM golang:1.19.3 as builder
+
+ARG RELEASE_VERSION
+
+# Buf plugins must be built for linux/amd64
+ENV GOOS=linux GOARCH=amd64 CGO_ENABLED=0
+RUN go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway@${RELEASE_VERSION}
+
+FROM scratch
+
+ARG RELEASE_VERSION
+ARG GO_PROTOBUF_RELEASE_VERSION
+ARG GO_GRPC_RELEASE_VERSION
+
+# Runtime dependencies
+LABEL "build.buf.plugins.runtime_library_versions.0.name"="github.com/grpc-ecosystem/grpc-gateway/v2"
+LABEL "build.buf.plugins.runtime_library_versions.0.version"="${RELEASE_VERSION}"
+LABEL "build.buf.plugins.runtime_library_versions.1.name"="google.golang.org/protobuf"
+LABEL "build.buf.plugins.runtime_library_versions.1.version"="${GO_PROTOBUF_RELEASE_VERSION}"
+LABEL "build.buf.plugins.runtime_library_versions.2.name"="google.golang.org/grpc"
+LABEL "build.buf.plugins.runtime_library_versions.2.version"="${GO_GRPC_RELEASE_VERSION}"
+
+COPY --from=builder /go/bin/protoc-gen-grpc-gateway /usr/local/bin/protoc-gen-grpc-gateway
+
+ENTRYPOINT ["/usr/local/bin/protoc-gen-grpc-gateway"]
diff --git a/.github/plugins/protoc-gen-openapiv2/Dockerfile b/.github/plugins/protoc-gen-openapiv2/Dockerfile
new file mode 100644
index 00000000000..8c9fcbc9ba6
--- /dev/null
+++ b/.github/plugins/protoc-gen-openapiv2/Dockerfile
@@ -0,0 +1,13 @@
+FROM golang:1.19.3 as builder
+
+ARG RELEASE_VERSION
+
+# Buf plugins must be built for linux/amd64
+ENV GOOS=linux GOARCH=amd64 CGO_ENABLED=0
+RUN go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2@${RELEASE_VERSION}
+
+FROM scratch
+
+COPY --from=builder /go/bin/protoc-gen-openapiv2 /usr/local/bin/protoc-gen-openapiv2
+
+ENTRYPOINT ["/usr/local/bin/protoc-gen-openapiv2"]
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 00000000000..1e37c5536c9
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,146 @@
+on:
+ - pull_request
+permissions:
+ contents: read
+name: CI
+jobs:
+ build:
+ strategy:
+ matrix:
+ go-version: [1.17.x, 1.18.x, 1.19.x]
+ os: [ubuntu-latest, macos-latest, windows-latest]
+ runs-on: ${{ matrix.os }}
+ steps:
+ - uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # tag=v3
+ with:
+ go-version: ${{ matrix.go-version }}
+ - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3
+ - run: go build ./...
+ test:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # tag=v3
+ with:
+ check-latest: true
+ - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3
+ - run: go test ./...
+ node_test:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3
+ - uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3
+ with:
+ node-version: 10
+ - uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # tag=v3
+ with:
+ check-latest: true
+ - run: >
+ cd examples/internal/browser &&
+ npm install gulp-cli &&
+ npm install &&
+ ./node_modules/.bin/gulp
+ generate:
+ container:
+ image: docker.pkg.github.com/grpc-ecosystem/grpc-gateway/build-env:1.19
+ options: "--user root"
+ credentials:
+ username: ${{ github.actor }}
+ password: ${{ secrets.GITHUB_TOKEN }}
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3
+ - run: make install
+ - run: make clean
+ - run: make generate
+ - run: go mod tidy
+ - run: git diff --exit-code
+ bazel:
+ container:
+ image: docker.pkg.github.com/grpc-ecosystem/grpc-gateway/build-env:1.19
+ options: "--user root"
+ credentials:
+ username: ${{ github.actor }}
+ password: ${{ secrets.GITHUB_TOKEN }}
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3
+ - uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # tag=v3
+ with:
+ path: /home/vscode/.cache/_grpc_gateway_bazel
+ key: v1-bazel-cache-${{ hashFiles('repositories.bzl') }}
+ restore-keys: v1-bazel-cache-
+ - name: Configure bazel
+ run: |
+ cat > .bazelrc << EOF
+ startup --output_base /home/vscode/.cache/_grpc_gateway_bazel
+ build --test_output errors
+ build --features race
+ # Workaround https://github.com/bazelbuild/bazel/issues/3645
+ # See https://docs.bazel.build/versions/0.23.0/command-line-reference.html
+ build --local_ram_resources=7168 # Github runners have 7G of memory
+ build --local_cpu_resources=2 # Github runners have 2 vCPU
+ EOF
+ - name: Check that Bazel BUILD files are up-to-date
+ run: bazel run //:gazelle && git diff --exit-code
+ - name: Check that repositories.bzl is up-to-date
+ run: |
+ bazel run //:gazelle -- update-repos -from_file=go.mod -to_macro=repositories.bzl%go_repositories &&
+ git diff --exit-code
+ - name: Check formatting of Bazel BUILD files
+ run: bazel run //:buildifier && git diff --exit-code
+ - name: Run tests with Bazel
+ run: bazel test //...
+ gorelease:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3
+ - uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # tag=v3
+ with:
+ go-version: 1.19
+ check-latest: true
+ - run: go run golang.org/x/exp/cmd/gorelease@latest -base=v2.14.0
+ proto_lint:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3
+ - uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # tag=v3
+ with:
+ check-latest: true
+ - run: make install
+ - run: PATH=$PATH:~/go/bin buf build
+ - run: PATH=$PATH:~/go/bin buf lint
+ - run: PATH=$PATH:~/go/bin buf format -w && git diff --exit-code
+ - run: PATH=$PATH:~/go/bin buf breaking --path protoc-gen-openapiv2/ --against 'https://github.com/grpc-ecosystem/grpc-gateway.git#branch=master'
+ golangci:
+ permissions:
+ pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3
+ - uses: golangci/golangci-lint-action@0ad9a0988b3973e851ab0a07adf248ec2e100376 # tag=v3
+ with:
+ version: v1.45
+ args: --enable goimports
+ fuzz:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Build Fuzzers
+ id: build
+ uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
+ with:
+ oss-fuzz-project-name: "grpc-gateway"
+ dry-run: false
+ language: go
+ - name: Run Fuzzers
+ uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
+ with:
+ oss-fuzz-project-name: "grpc-gateway"
+ fuzz-seconds: 600
+ dry-run: false
+ language: go
+ - name: Upload Crash
+ uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # tag=v3
+ if: failure() && steps.build.outcome == 'success'
+ with:
+ name: artifacts
+ path: ./out/artifacts
diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml
deleted file mode 100644
index 908efb58188..00000000000
--- a/.github/workflows/golangci-lint.yml
+++ /dev/null
@@ -1,19 +0,0 @@
-name: golangci-lint
-on:
- push:
- tags:
- - v*
- branches:
- - master
- pull_request:
-jobs:
- golangci:
- name: lint
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
- - name: golangci-lint
- uses: golangci/golangci-lint-action@v2
- with:
- version: v1.32
- args: --enable goimports
diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml
new file mode 100644
index 00000000000..dba8c4c6c99
--- /dev/null
+++ b/.github/workflows/master.yml
@@ -0,0 +1,25 @@
+on:
+ push:
+ branches:
+ - master
+ paths:
+ - protoc-gen-openapiv2/options/*.proto
+permissions:
+ contents: read
+name: master
+jobs:
+ proto_push:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3
+ - uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # tag=v3
+ with:
+ check-latest: true
+ - run: make install
+ # Limit pushes to protoc-gen-openapiv2 files. This is a total hack.
+ # It excludes all the files that we don't want to publish, just for the push step.
+ - run: echo -e " - examples\n - internal\n - runtime" >> buf.yaml
+ - run: buf push --tag "${{ github.sha }}"
+ env:
+ BUF_TOKEN: ${{ secrets.BUF_TOKEN }}
+ PATH: $PATH:~/go/bin
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 00000000000..a3c258b11fd
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,96 @@
+on:
+ push:
+ tags:
+ - v2.[0-9]+.[0-9]+
+ # For testing the workflow before pushing a tag
+ # This will run goreleaser with --snapshot and test the
+ # SLSA generator.
+ workflow_dispatch:
+permissions:
+ contents: read
+name: release
+jobs:
+ goreleaser:
+ outputs:
+ hashes: ${{ steps.hash.outputs.hashes }}
+ runs-on: ubuntu-latest
+ permissions:
+ contents: write
+ steps:
+ - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3
+ with:
+ fetch-depth: 0
+ - uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # tag=v3
+ with:
+ check-latest: true
+ - name: Generate goreleaser args
+ id: args
+ run: |
+ set -euo pipefail
+ args='release --rm-dist'
+ if [[ "$GITHUB_REF" != refs/tags/* ]]; then
+ args+=' --snapshot'
+ fi
+ echo "args=$args" >> $GITHUB_OUTPUT
+ - uses: goreleaser/goreleaser-action@b508e2e3ef3b19d4e4146d4f8fb3ba9db644a757 # tag=v3
+ id: run-goreleaser
+ with:
+ args: ${{ steps.args.outputs.args }}
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ - name: Generate subject
+ id: hash
+ env:
+ ARTIFACTS: "${{ steps.run-goreleaser.outputs.artifacts }}"
+ run: |
+ set -euo pipefail
+
+ checksum_file=$(echo "$ARTIFACTS" | jq -r '.[] | select (.type=="Checksum") | .path')
+ echo "::set-output name=hashes::$(cat $checksum_file | base64 -w0)"
+ provenance:
+ needs: [goreleaser]
+ permissions:
+ actions: read # To read the workflow path.
+ id-token: write # To sign the provenance.
+ contents: write # To add assets to a release.
+ uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v1.3.0
+ with:
+ compile-generator: true # Workaround for https://github.com/slsa-framework/slsa-github-generator/issues/1163
+ base64-subjects: "${{ needs.goreleaser.outputs.hashes }}"
+ upload-assets: ${{ github.event_name == 'push' }} # upload to a new release when pushing via tag
+
+ push_bsr_plugins:
+ runs-on: ubuntu-latest
+ if: github.event_name == 'push'
+ steps:
+ - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3
+ - uses: docker/setup-buildx-action@8c0edbc76e98fa90f69d9a2c020dcb50019dc325 # tag=v2
+ - uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # tag=v2
+ with:
+ registry: plugins.buf.build
+ username: grpcgatewaybot
+ password: ${{ secrets.BUF_TOKEN }}
+ - name: Set protobuf-version
+ run: echo ::set-output name=version::$(go list -m -f '{{.Version}}' google.golang.org/protobuf)
+ id: protobuf-version
+ - name: Set grpc-version
+ run: echo ::set-output name=version::$(go list -m -f '{{.Version}}' google.golang.org/grpc)
+ id: grpc-version
+ - uses: docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5 # tag=v3
+ with:
+ push: true
+ tags: plugins.buf.build/grpc-ecosystem/grpc-gateway:${{ github.ref_name }}-1
+ context: .github/plugins/protoc-gen-grpc-gateway
+ platforms: linux/amd64
+ build-args: |
+ RELEASE_VERSION=${{ github.ref_name }}
+ GO_PROTOBUF_RELEASE_VERSION=${{ steps.protobuf-version.outputs.version }}
+ GO_GRPC_RELEASE_VERSION=${{ steps.grpc-version.outputs.version }}
+ - uses: docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5 # tag=v3
+ with:
+ push: true
+ tags: plugins.buf.build/grpc-ecosystem/openapiv2:${{ github.ref_name }}-1
+ context: .github/plugins/protoc-gen-openapiv2
+ platforms: linux/amd64
+ build-args: |
+ RELEASE_VERSION=${{ github.ref_name }}
diff --git a/.github/workflows/renovate.yml b/.github/workflows/renovate.yml
new file mode 100644
index 00000000000..625605b7f78
--- /dev/null
+++ b/.github/workflows/renovate.yml
@@ -0,0 +1,75 @@
+on:
+ push:
+ branches:
+ - renovate/*
+permissions:
+ contents: read
+name: renovate
+jobs:
+ update_repositoriesbzl:
+ container:
+ image: docker.pkg.github.com/grpc-ecosystem/grpc-gateway/build-env:1.17
+ options: "--user root"
+ credentials:
+ username: ${{ github.actor }}
+ password: ${{ secrets.GITHUB_TOKEN }}
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3
+ with:
+ fetch-depth: 0
+ token: ${{ secrets.GH_PUSH_TOKEN }}
+ - uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # tag=v3
+ with:
+ path: /home/vscode/.cache/_grpc_gateway_bazel
+ key: v1-bazel-cache-${{ hashFiles('repositories.bzl') }}
+ restore-keys: v1-bazel-cache-
+ - name: Configure bazel
+ run: |
+ cat > .bazelrc << EOF
+ startup --output_base /home/vscode/.cache/_grpc_gateway_bazel
+ build --test_output errors
+ build --features race
+ # Workaround https://github.com/bazelbuild/bazel/issues/3645
+ # See https://docs.bazel.build/versions/0.23.0/command-line-reference.html
+ build --local_ram_resources=7168 # Github runners have 7G of memory
+ build --local_cpu_resources=2 # Github runners have 2 vCPU
+ EOF
+ - run: bazel run //:gazelle -- update-repos -from_file=go.mod -to_macro=repositories.bzl%go_repositories
+ - run: |
+ git add .
+ if output=$(git status --porcelain) && [ ! -z "$output" ]; then
+ git config user.name "Renovate Bot"
+ git config user.email "bot@renovateapp.com"
+ git commit --amend --no-edit
+ git push --force-with-lease origin ${{ github.ref_name }}
+ fi
+ regenerate:
+ container:
+ image: docker.pkg.github.com/grpc-ecosystem/grpc-gateway/build-env:1.17
+ options: "--user root"
+ credentials:
+ username: ${{ github.actor }}
+ password: ${{ secrets.GITHUB_TOKEN }}
+ runs-on: ubuntu-latest
+ needs:
+ # Run after update_repositoriesbzl to avoid
+ # git conflicts
+ - update_repositoriesbzl
+ steps:
+ - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3
+ with:
+ fetch-depth: 0
+ token: ${{ secrets.GH_PUSH_TOKEN }}
+ - run: make install
+ - run: make clean
+ - run: make generate
+ - run: go mod tidy
+ - run: |
+ git add .
+ if output=$(git status --porcelain) && [ ! -z "$output" ]; then
+ git config user.name "Renovate Bot"
+ git config user.email "bot@renovateapp.com"
+ git commit --amend --no-edit
+ git push --force-with-lease origin ${{ github.ref_name }}
+ fi
diff --git a/.goreleaser.yml b/.goreleaser.yml
index ffbe2430c71..aeb78fe380f 100644
--- a/.goreleaser.yml
+++ b/.goreleaser.yml
@@ -10,6 +10,7 @@ builds:
- windows
goarch:
- amd64
+ - arm64
- main: ./protoc-gen-openapiv2/main.go
id: protoc-gen-openapiv2
binary: protoc-gen-openapiv2
@@ -21,6 +22,7 @@ builds:
- windows
goarch:
- amd64
+ - arm64
archives:
- name_template: "{{ .Binary }}-{{ .Tag }}-{{ .Os }}-{{ .Arch }}"
format: binary
diff --git a/ADOPTERS.md b/ADOPTERS.md
index 171c2a8afd3..dafe8d29fdb 100644
--- a/ADOPTERS.md
+++ b/ADOPTERS.md
@@ -5,12 +5,18 @@ production users that have added themselves (in alphabetical order):
- [Ad Hoc](http://adhocteam.us/) uses the gRPC-Gateway to serve millions of
API requests per day.
-- [Chef](https://www.chef.io/) uses gRPC-Gateway to provide the user-facing
+- [Chef](https://www.chef.io/) uses the gRPC-Gateway to provide the user-facing
API of [Chef Automate](https://automate.chef.io/). Furthermore, the generated
OpenAPI data serves as the basis for its [API documentation](https://automate.chef.io/docs/api/).
The code is Open Source, [see `github.com/chef/automate`](https://github.com/chef/automate).
+- [Conduit](https://github.com/ConduitIO/conduit), a data streaming tool written in Go,
+ uses the gRPC-Gateway since its very beginning to provide an HTTP API in addition to its gRPC API.
+ This makes it easier to integrate with Conduit, and the generated OpenAPI data is used in the documentation.
- [Scaleway](https://www.scaleway.com/en/) uses the gRPC-Gateway since 2018 to
serve millions of API requests per day [1].
+- [SpiceDB](https://github.com/authzed/spicedb) uses the gRPC-Gateway to handle
+ requests for security-critical permissions checks in environments where gRPC
+ is unavailable.
If you have adopted the gRPC-Gateway and would like to be included in this list,
feel free to submit a PR.
diff --git a/BUILD b/BUILD
index bfcd639e9a5..90805c1af99 100644
--- a/BUILD
+++ b/BUILD
@@ -3,6 +3,8 @@ 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"])
+
buildifier(
name = "buildifier",
)
@@ -16,6 +18,7 @@ buildifier(
# gazelle:prefix github.com/grpc-ecosystem/grpc-gateway/v2
# gazelle:go_proto_compilers //:go_apiv2
# gazelle:go_grpc_compilers //:go_apiv2, //:go_grpc
+# gazelle:go_naming_convention import_alias
gazelle(name = "gazelle")
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index b320bc383e6..c6c8cd6dbed 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,21 +1,5 @@
# How to contribute
-Thank you for your contribution to gRPC-Gateway.
-Here's the recommended process of contribution.
-
-1. `go get github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway`
-1. `cd $GOPATH/src/github.com/grpc-ecosystem/grpc-gateway`
-1. hack, hack, hack...
-1. Make sure that your change follows best practices in Go
- - [Effective Go](https://golang.org/doc/effective_go.html)
- - [Go Code Review Comments](https://golang.org/wiki/CodeReviewComments)
-1. Make sure that `go test ./...` passes.
-1. Sign [a Contributor License Agreement](https://cla.developers.google.com/clas)
-1. Open a pull request in GitHub
-
-When you work on a larger contribution, it is also recommended that you get in touch
-with us through the issue tracker.
-
## Code reviews
All submissions, including submissions by project members, require review.
@@ -27,19 +11,18 @@ All submissions, including submissions by project members, require review.
It should be as simple as this (run from the root of the repository):
```bash
-docker run -v $(pwd):/src/grpc-gateway --rm docker.pkg.github.com/grpc-ecosystem/grpc-gateway/build-env:1.16 \
- /bin/bash -c 'cd /src/grpc-gateway && \
- make install && \
+docker run -v $(pwd):/grpc-gateway -w /grpc-gateway --rm ghcr.io/grpc-ecosystem/grpc-gateway/build-env:1.17 \
+ /bin/bash -c 'make install && \
make clean && \
make generate'
docker run -itv $(pwd):/grpc-gateway -w /grpc-gateway --entrypoint /bin/bash --rm \
- l.gcr.io/google/bazel:3.5.0 -c '\
+ ghcr.io/grpc-ecosystem/grpc-gateway/build-env:1.17 -c '\
bazel run :gazelle -- update-repos -from_file=go.mod -to_macro=repositories.bzl%go_repositories && \
bazel run :gazelle && \
bazel run :buildifier'
```
-You may need to authenticate with GitHub to pull `docker.pkg.github.com/grpc-ecosystem/grpc-gateway/build-env`.
+You may need to authenticate with GitHub to pull `ghcr.io/grpc-ecosystem/grpc-gateway/build-env`.
You can do this by following the steps on the [GitHub Package docs](https://help.github.com/en/packages/using-github-packages-with-your-projects-ecosystem/configuring-docker-for-use-with-github-packages#authenticating-to-github-packages).
### Using Visual Studio Code dev containers
@@ -69,8 +52,6 @@ To make a release, follow these steps:
1. Decide on a release version. The `gorelease` job can
recommend whether the new release should be a patch or minor release.
- See [CircleCI](https://app.circleci.com/pipelines/github/grpc-ecosystem/grpc-gateway/126/workflows/255a8a04-de9c-46a9-a66b-f107d2b39439/jobs/6428)
- for an example.
1. Tag the release on `master`.
1. The release can be created using the command line, or also through GitHub's [releases
UI](https://github.com/grpc-ecosystem/grpc-gateway/releases/new).
@@ -78,4 +59,5 @@ To make a release, follow these steps:
reviewed by another maintainer.
1. Update the release description. Try to include some of the highlights of this release,
ideally with links to the PRs and crediting the contributors.
+1. Update the gorelease job in .github/ci.yaml to point to the new release version.
1. Sit back and pat yourself on the back for a job well done :clap:.
diff --git a/Makefile b/Makefile
index 5d538701de4..0570aa11cc4 100644
--- a/Makefile
+++ b/Makefile
@@ -82,10 +82,8 @@ $(GENERATE_UNBOUND_METHODS_EXAMPLE_SRCS): $(GENERATE_UNBOUND_METHODS_EXAMPLE_SPE
$(EXAMPLE_CLIENT_DIR)/generateunboundmethods/git_push.sh
install:
+ go install github.com/bufbuild/buf/cmd/buf@v1.3.1
go install \
- google.golang.org/grpc/cmd/protoc-gen-go-grpc \
- google.golang.org/protobuf/cmd/protoc-gen-go \
- github.com/bufbuild/buf/cmd/buf \
./protoc-gen-openapiv2 \
./protoc-gen-grpc-gateway
@@ -117,6 +115,22 @@ proto:
buf generate \
--template ./examples/internal/proto/examplepb/use_go_template.buf.gen.yaml \
--path examples/internal/proto/examplepb/use_go_template.proto
+ buf generate \
+ --template ./examples/internal/proto/examplepb/visibility_rule_preview_echo_service.buf.gen.yaml \
+ --path examples/internal/proto/examplepb/visibility_rule_echo_service.proto
+ mv examples/internal/proto/examplepb/visibility_rule_echo_service.swagger.json examples/internal/proto/examplepb/visibility_rule_preview_echo_service.swagger.json
+ buf generate \
+ --template ./examples/internal/proto/examplepb/visibility_rule_internal_echo_service.buf.gen.yaml \
+ --path examples/internal/proto/examplepb/visibility_rule_echo_service.proto
+ mv examples/internal/proto/examplepb/visibility_rule_echo_service.swagger.json examples/internal/proto/examplepb/visibility_rule_internal_echo_service.swagger.json
+ buf generate \
+ --template ./examples/internal/proto/examplepb/visibility_rule_none_echo_service.buf.gen.yaml \
+ --path examples/internal/proto/examplepb/visibility_rule_echo_service.proto
+ mv examples/internal/proto/examplepb/visibility_rule_echo_service.swagger.json examples/internal/proto/examplepb/visibility_rule_none_echo_service.swagger.json
+ buf generate \
+ --template ./examples/internal/proto/examplepb/visibility_rule_preview_and_internal_echo_service.buf.gen.yaml \
+ --path examples/internal/proto/examplepb/visibility_rule_echo_service.proto
+ mv examples/internal/proto/examplepb/visibility_rule_echo_service.swagger.json examples/internal/proto/examplepb/visibility_rule_preview_and_internal_echo_service.swagger.json
generate: proto $(ECHO_EXAMPLE_SRCS) $(ABE_EXAMPLE_SRCS) $(UNANNOTATED_ECHO_EXAMPLE_SRCS) $(RESPONSE_BODY_EXAMPLE_SRCS) $(GENERATE_UNBOUND_METHODS_EXAMPLE_SRCS)
diff --git a/README.md b/README.md
index 471fdc3014c..317e3c97c5c 100644
--- a/README.md
+++ b/README.md
@@ -3,12 +3,13 @@
gRPC to JSON proxy generator following the gRPC HTTP spec
-
-
+
+
+
## About
@@ -56,6 +57,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
@@ -94,6 +96,19 @@ This will place four binaries in your `$GOBIN`;
Make sure that your `$GOBIN` is in your `$PATH`.
+### Download the binaries
+
+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
+```
+
+Alternatively, see the section on remotely managed plugin versions below.
+
## Usage
1. Define your [gRPC](https://grpc.io/docs/) service using protocol buffers
@@ -121,7 +136,7 @@ Make sure that your `$GOBIN` is in your `$PATH`.
Here's an example `buf.gen.yaml` you can use to generate the stubs with [buf](https://github.com/bufbuild/buf):
```yaml
- version: v1beta1
+ version: v1
plugins:
- name: go
out: gen/go
@@ -172,7 +187,7 @@ Make sure that your `$GOBIN` is in your `$PATH`.
Here's what a `buf.gen.yaml` file might look like with this option enabled:
```yaml
- version: v1beta1
+ version: v1
plugins:
- name: go
out: gen/go
@@ -231,14 +246,14 @@ Make sure that your `$GOBIN` is in your `$PATH`.
> 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/beta/googleapis`:
+ > `buf.build/googleapis/googleapis`:
> ```yaml
- > version: v1beta1
+ > version: v1
> name: buf.build/yourorg/myprotos
> deps:
- > - buf.build/beta/googleapis
+ > - buf.build/googleapis/googleapis
> ```
- > Always run `buf beta mod update` after adding a dependency to your `buf.yaml`.
+ > 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
@@ -247,7 +262,7 @@ Make sure that your `$GOBIN` is in your `$PATH`.
Here's what a `buf.gen.yaml` file might look like:
```yaml
- version: v1beta1
+ version: v1
plugins:
- name: go
out: gen/go
@@ -271,7 +286,7 @@ Make sure that your `$GOBIN` is in your `$PATH`.
```
google/api/annotations.proto
- google/api/field_behaviour.proto
+ google/api/field_behavior.proto
google/api/http.proto
google/api/httpbody.proto
```
@@ -297,7 +312,7 @@ Make sure that your `$GOBIN` is in your `$PATH`.
Here's what a `buf.gen.yaml` file might look like with this option enabled:
```yaml
- version: v1beta1
+ version: v1
plugins:
- name: go
out: gen/go
@@ -339,6 +354,7 @@ Make sure that your `$GOBIN` is in your `$PATH`.
"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
)
@@ -357,7 +373,7 @@ Make sure that your `$GOBIN` is in your `$PATH`.
// Register gRPC server endpoint
// Note: Make sure the gRPC server is running properly and accessible
mux := runtime.NewServeMux()
- opts := []grpc.DialOption{grpc.WithInsecure()}
+ opts := []grpc.DialOption{grpc.WithTransportCredentials(insecure.NewCredentials())}
err := gw.RegisterYourServiceHandlerFromEndpoint(ctx, mux, *grpcServerEndpoint, opts)
if err != nil {
return err
@@ -382,7 +398,7 @@ Make sure that your `$GOBIN` is in your `$PATH`.
Here's what a `buf.gen.yaml` file might look like:
```yaml
- version: v1beta1
+ version: v1
plugins:
- name: go
out: gen/go
@@ -405,10 +421,10 @@ Make sure that your `$GOBIN` is in your `$PATH`.
`buf`, you can add the `buf.build/grpc-ecosystem/grpc-gateway` dependency
to your `deps` array:
```yaml
- version: v1beta1
+ version: v1
name: buf.build/yourorg/myprotos
deps:
- - buf.build/beta/googleapis
+ - buf.build/googleapis/googleapis
- buf.build/grpc-ecosystem/grpc-gateway
```
@@ -427,6 +443,54 @@ Make sure that your `$GOBIN` is in your `$PATH`.
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
+
+As an alternative to all of the above, you can use `buf` with
+[remote plugins](https://docs.buf.build/configuration/v1/buf-gen-yaml#name-or-remote)
+to manage plugin versions and generation. An example `buf.gen.yaml` using remote
+plugin generation looks like this:
+
+```yaml
+version: v1
+plugins:
+ - remote: buf.build/library/plugins/go:v1.27.1-1
+ out: gen/go
+ opt:
+ - paths=source_relative
+ - remote: buf.build/library/plugins/go-grpc:v1.1.0-2
+ out: gen/go
+ opt:
+ - paths=source_relative
+ - remote: buf.build/grpc-ecosystem/plugins/grpc-gateway:v2.6.0-1
+ out: gen/go
+ opt:
+ - paths=source_relative
+ - remote: buf.build/grpc-ecosystem/plugins/openapiv2:v2.6.0-1
+ out: gen/openapiv2
+```
+
+This requires no local installation of any plugins. Be careful to use the same
+version of the generator as the runtime library, i.e. if using `v2.6.0-1`, run
+
+```shell
+$ go get github.com/grpc-ecosystem/grpc-gateway/v2@v2.6.0
+```
+
+To get the same version of the runtime in your `go.mod`.
+
## Video intro
This GopherCon UK 2019 presentation from our maintainer [@JohanBrandhorst](https://github.com/johanbrandhorst) provides a good intro to using the gRPC-Gateway. It uses the following boilerplate repo as a base: https://github.com/johanbrandhorst/grpc-gateway-boilerplate.
@@ -443,7 +507,7 @@ When using `buf` to generate stubs, flags and parameters are passed through
the `opt` field in your `buf.gen.yaml` file, for example:
```yaml
-version: v1beta1
+version: v1
plugins:
- name: grpc-gateway
out: gen/go
@@ -527,13 +591,15 @@ But patches are welcome.
- HTTP request host is added as `X-Forwarded-Host` gRPC request header.
- HTTP `Authorization` header is added as `authorization` gRPC request header.
- Remaining Permanent HTTP header keys (as specified by the IANA
- [here](http://www.iana.org/assignments/message-headers/message-headers.xhtml)
+ [here](http://www.iana.org/assignments/message-headers/message-headers.xhtml))
are prefixed with `grpcgateway-` and added with their values to gRPC request
header.
- HTTP headers that start with 'Grpc-Metadata-' are mapped to gRPC metadata
(prefixed with `grpcgateway-`).
- While configurable, the default {un,}marshaling uses
[protojson](https://pkg.go.dev/google.golang.org/protobuf/encoding/protojson).
+- The path template used to map gRPC service methods to HTTP endpoints supports the [google.api.http](https://github.com/googleapis/googleapis/blob/master/google/api/http.proto)
+ path template syntax. For example, `/api/v1/{name=projects/*/topics/*}` or `/prefix/{path=organizations/**}`.
## Contribution
diff --git a/WORKSPACE b/WORKSPACE
index 6fe9e44a6fc..c7a81b0d2dd 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -1,21 +1,22 @@
workspace(name = "grpc_ecosystem_grpc_gateway")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
+load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
# Define before rules_proto, otherwise we receive the version of com_google_protobuf from there
http_archive(
name = "com_google_protobuf",
- sha256 = "0cbdc9adda01f6d2facc65a22a2be5cecefbefe5a09e5382ee8879b522c04441",
- strip_prefix = "protobuf-3.15.8",
- urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.15.8.tar.gz"],
+ sha256 = "1add10f9bd92775b91f326da259f243881e904dd509367d5031d4c782ba82810",
+ strip_prefix = "protobuf-3.21.9",
+ urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.21.9.tar.gz"],
)
http_archive(
name = "bazel_skylib",
- sha256 = "1c531376ac7e5a180e0237938a2536de0c54d93f5c278634818e0efc952dd56c",
+ sha256 = "74d544d96f4a5bb630d465ca8bbcfe231e3594e5aae57e1edbf17a6eb3ca2506",
urls = [
- "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz",
- "https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz",
+ "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.3.0/bazel-skylib-1.3.0.tar.gz",
+ "https://github.com/bazelbuild/bazel-skylib/releases/download/1.3.0/bazel-skylib-1.3.0.tar.gz",
],
)
@@ -25,11 +26,11 @@ bazel_skylib_workspace()
http_archive(
name = "rules_proto",
- sha256 = "9fc210a34f0f9e7cc31598d109b5d069ef44911a82f507d5a88716db171615a8",
- strip_prefix = "rules_proto-f7a30f6f80006b591fa7c437fe5a951eb10bcbcf",
+ sha256 = "66bfdf8782796239d3875d37e7de19b1d94301e8972b3cbd2446b332429b4df1",
+ strip_prefix = "rules_proto-4.0.0",
urls = [
- "https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/f7a30f6f80006b591fa7c437fe5a951eb10bcbcf.tar.gz",
- "https://github.com/bazelbuild/rules_proto/archive/f7a30f6f80006b591fa7c437fe5a951eb10bcbcf.tar.gz",
+ "https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/refs/tags/4.0.0.tar.gz",
+ "https://github.com/bazelbuild/rules_proto/archive/refs/tags/4.0.0.tar.gz",
],
)
@@ -41,32 +42,28 @@ rules_proto_toolchains()
http_archive(
name = "io_bazel_rules_go",
- sha256 = "7904dbecbaffd068651916dce77ff3437679f9d20e1a7956bff43826e7645fcc",
+ sha256 = "ae013bf35bd23234d1dea46b079f1e05ba74ac0321423830119d3e787ec73483",
urls = [
- "https://storage.googleapis.com/bazel-mirror/github.com/bazelbuild/rules_go/releases/download/v0.25.1/rules_go-v0.25.1.tar.gz",
- "https://github.com/bazelbuild/rules_go/releases/download/v0.25.1/rules_go-v0.25.1.tar.gz",
+ "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.36.0/rules_go-v0.36.0.zip",
+ "https://github.com/bazelbuild/rules_go/releases/download/v0.36.0/rules_go-v0.36.0.zip",
],
)
-http_archive(
+git_repository(
name = "bazel_gazelle",
- sha256 = "222e49f034ca7a1d1231422cdb67066b885819885c356673cb1f72f748a3c9d4",
- urls = [
- "https://storage.googleapis.com/bazel-mirror/github.com/bazelbuild/bazel-gazelle/releases/download/v0.22.3/bazel-gazelle-v0.22.3.tar.gz",
- "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.22.3/bazel-gazelle-v0.22.3.tar.gz",
- ],
+ commit = "f377e6eff8e24508feb1a34b1e5e681982482a9f",
+ remote = "https://github.com/bazelbuild/bazel-gazelle",
+ shallow_since = "1648046534 -0400",
)
load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")
go_rules_dependencies()
-go_register_toolchains(version = "1.15.5")
+go_register_toolchains(version = "1.17.2")
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")
-gazelle_dependencies()
-
# Use gazelle to declare Go dependencies in Bazel.
# gazelle:repository_macro repositories.bzl%go_repositories
@@ -74,15 +71,19 @@ load("//:repositories.bzl", "go_repositories")
go_repositories()
+# This must be invoked after our explicit dependencies
+# See https://github.com/bazelbuild/bazel-gazelle/issues/1115.
+gazelle_dependencies()
+
load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
protobuf_deps()
http_archive(
name = "com_github_bazelbuild_buildtools",
- sha256 = "c28eef4d30ba1a195c6837acf6c75a4034981f5b4002dda3c5aa6e48ce023cf1",
- strip_prefix = "buildtools-4.0.1",
- urls = ["https://github.com/bazelbuild/buildtools/archive/4.0.1.tar.gz"],
+ sha256 = "e3bb0dc8b0274ea1aca75f1f8c0c835adbe589708ea89bf698069d0790701ea3",
+ strip_prefix = "buildtools-5.1.0",
+ urls = ["https://github.com/bazelbuild/buildtools/archive/5.1.0.tar.gz"],
)
load("@com_github_bazelbuild_buildtools//buildifier:deps.bzl", "buildifier_dependencies")
diff --git a/buf.gen.yaml b/buf.gen.yaml
index 008a5e702d7..3d3011103d3 100644
--- a/buf.gen.yaml
+++ b/buf.gen.yaml
@@ -1,10 +1,10 @@
-version: v1beta1
+version: v1
plugins:
- - name: go
+ - remote: buf.build/library/plugins/go:v1.27.1-1
out: .
opt:
- paths=source_relative
- - name: go-grpc
+ - remote: buf.build/library/plugins/go-grpc:v1.1.0-2
out: .
opt:
- paths=source_relative
diff --git a/buf.lock b/buf.lock
index f546ab308c8..feb8c62fd64 100644
--- a/buf.lock
+++ b/buf.lock
@@ -1,9 +1,7 @@
# Generated by buf. DO NOT EDIT.
+version: v1
deps:
- remote: buf.build
- owner: beta
+ owner: googleapis
repository: googleapis
- branch: main
- commit: 2e73676eef8642dfba4ed782b7c8d6fe
- digest: b1-vB11w98W2vFtEP4Veknm56Pi6DU6MpOuocESiOzvbqw=
- create_time: 2021-04-26T14:55:30.644663Z
+ commit: 62f35d8aed1149c291d606d958a7ce32
diff --git a/buf.yaml b/buf.yaml
index c2a6eb4f1e1..86b1da1c507 100644
--- a/buf.yaml
+++ b/buf.yaml
@@ -1,12 +1,10 @@
-version: v1beta1
+version: v1
name: buf.build/grpc-ecosystem/grpc-gateway
deps:
- - buf.build/beta/googleapis
-build:
- roots:
- - .
- excludes:
- - bazel-grpc-gateway
+ - buf.build/googleapis/googleapis
+breaking:
+ use:
+ - FILE
lint:
use:
- DEFAULT
@@ -23,6 +21,7 @@ lint:
- examples/internal/proto/examplepb/response_body_service.proto
- examples/internal/proto/examplepb/stream.proto
- examples/internal/proto/examplepb/unannotated_echo_service.proto
+ - examples/internal/proto/examplepb/visibility_rule_echo_service.proto
- examples/internal/proto/examplepb/use_go_template.proto
- examples/internal/proto/examplepb/wrappers.proto
ENUM_VALUE_PREFIX:
@@ -58,8 +57,10 @@ lint:
- examples/internal/proto/examplepb/response_body_service.proto
- examples/internal/proto/examplepb/stream.proto
- examples/internal/proto/examplepb/unannotated_echo_service.proto
+ - examples/internal/proto/examplepb/visibility_rule_echo_service.proto
- examples/internal/proto/examplepb/use_go_template.proto
- examples/internal/proto/examplepb/wrappers.proto
+ - examples/internal/proto/oneofenum/oneof_enum.proto
- examples/internal/proto/pathenum/path_enum.proto
- examples/internal/proto/sub/message.proto
- examples/internal/proto/sub2/message.proto
@@ -81,6 +82,7 @@ lint:
- examples/internal/proto/examplepb/response_body_service.proto
- examples/internal/proto/examplepb/stream.proto
- examples/internal/proto/examplepb/unannotated_echo_service.proto
+ - examples/internal/proto/examplepb/visibility_rule_echo_service.proto
- examples/internal/proto/examplepb/use_go_template.proto
- examples/internal/proto/examplepb/wrappers.proto
- runtime/internal/examplepb/example.proto
@@ -100,8 +102,10 @@ lint:
- examples/internal/proto/examplepb/response_body_service.proto
- examples/internal/proto/examplepb/stream.proto
- examples/internal/proto/examplepb/unannotated_echo_service.proto
+ - examples/internal/proto/examplepb/visibility_rule_echo_service.proto
- examples/internal/proto/examplepb/use_go_template.proto
- examples/internal/proto/examplepb/wrappers.proto
+ - examples/internal/proto/oneofenum/oneof_enum.proto
- examples/internal/proto/pathenum/path_enum.proto
- examples/internal/proto/sub/message.proto
- examples/internal/proto/sub2/message.proto
@@ -124,6 +128,7 @@ lint:
- examples/internal/proto/examplepb/response_body_service.proto
- examples/internal/proto/examplepb/stream.proto
- examples/internal/proto/examplepb/unannotated_echo_service.proto
+ - examples/internal/proto/examplepb/visibility_rule_echo_service.proto
- examples/internal/proto/examplepb/wrappers.proto
RPC_REQUEST_STANDARD_NAME:
- examples/internal/helloworld/helloworld.proto
@@ -138,6 +143,7 @@ lint:
- examples/internal/proto/examplepb/response_body_service.proto
- examples/internal/proto/examplepb/stream.proto
- examples/internal/proto/examplepb/unannotated_echo_service.proto
+ - examples/internal/proto/examplepb/visibility_rule_echo_service.proto
- examples/internal/proto/examplepb/wrappers.proto
- runtime/internal/examplepb/non_standard_names.proto
RPC_RESPONSE_STANDARD_NAME:
@@ -153,6 +159,7 @@ lint:
- examples/internal/proto/examplepb/response_body_service.proto
- examples/internal/proto/examplepb/stream.proto
- examples/internal/proto/examplepb/unannotated_echo_service.proto
+ - examples/internal/proto/examplepb/visibility_rule_echo_service.proto
- examples/internal/proto/examplepb/use_go_template.proto
- examples/internal/proto/examplepb/wrappers.proto
- runtime/internal/examplepb/non_standard_names.proto
@@ -164,6 +171,9 @@ lint:
- examples/internal/proto/examplepb/flow_combination.proto
- examples/internal/proto/examplepb/openapi_merge_a.proto
- examples/internal/proto/examplepb/openapi_merge_b.proto
-breaking:
- use:
- - FILE
+ allow_comment_ignores: true
+# Note: the build configuration goes last in this
+# files so we can append excludes at push time.
+build:
+ excludes:
+ - bazel-grpc-gateway
diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock
index c08c1592a11..c07eb8c57b9 100644
--- a/docs/Gemfile.lock
+++ b/docs/Gemfile.lock
@@ -1,264 +1,166 @@
GEM
remote: https://rubygems.org/
specs:
- activesupport (6.0.3.4)
- concurrent-ruby (~> 1.0, >= 1.0.2)
- i18n (>= 0.7, < 2)
+ activesupport (4.2.7)
+ i18n (~> 0.7)
+ json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
+ thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
- zeitwerk (~> 2.2, >= 2.2.2)
- addressable (2.7.0)
- public_suffix (>= 2.0.2, < 5.0)
+ addressable (2.4.0)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.11.1)
colorator (1.1.0)
- commonmarker (0.17.13)
- ruby-enum (~> 0.5)
- concurrent-ruby (1.1.7)
- dnsruby (1.61.5)
- simpleidn (~> 0.1)
- em-websocket (0.5.2)
- eventmachine (>= 0.12.9)
- http_parser.rb (~> 0.6.0)
- ethon (0.12.0)
- ffi (>= 1.3.0)
- eventmachine (1.2.7)
- execjs (2.7.0)
- faraday (1.1.0)
- multipart-post (>= 1.2, < 3)
- ruby2_keywords
- ffi (1.13.1)
+ concurrent-ruby (1.1.10)
+ ethon (0.15.0)
+ ffi (>= 1.15.0)
+ execjs (2.8.1)
+ faraday (2.6.0)
+ faraday-net_http (>= 2.0, < 3.1)
+ ruby2_keywords (>= 0.0.4)
+ faraday-net_http (3.0.1)
+ ffi (1.15.5)
forwardable-extended (2.6.0)
- gemoji (3.0.1)
- github-pages (209)
- github-pages-health-check (= 1.16.1)
- jekyll (= 3.9.0)
- jekyll-avatar (= 0.7.0)
- jekyll-coffeescript (= 1.1.1)
- jekyll-commonmark-ghpages (= 0.1.6)
- jekyll-default-layout (= 0.1.4)
- jekyll-feed (= 0.15.1)
- jekyll-gist (= 1.5.0)
- jekyll-github-metadata (= 2.13.0)
- jekyll-mentions (= 1.6.0)
- jekyll-optional-front-matter (= 0.3.2)
+ gemoji (2.1.0)
+ github-pages (105)
+ activesupport (= 4.2.7)
+ github-pages-health-check (= 1.2.0)
+ jekyll (= 3.3.1)
+ jekyll-avatar (= 0.4.2)
+ jekyll-coffeescript (= 1.0.1)
+ jekyll-feed (= 0.8.0)
+ jekyll-gist (= 1.4.0)
+ jekyll-github-metadata (= 2.2.0)
+ jekyll-mentions (= 1.2.0)
jekyll-paginate (= 1.1.0)
- jekyll-readme-index (= 0.3.0)
- jekyll-redirect-from (= 0.16.0)
- jekyll-relative-links (= 0.6.1)
- jekyll-remote-theme (= 0.4.2)
- jekyll-sass-converter (= 1.5.2)
- jekyll-seo-tag (= 2.6.1)
- jekyll-sitemap (= 1.4.0)
- jekyll-swiss (= 1.0.0)
- jekyll-theme-architect (= 0.1.1)
- jekyll-theme-cayman (= 0.1.1)
- jekyll-theme-dinky (= 0.1.1)
- jekyll-theme-hacker (= 0.1.2)
- jekyll-theme-leap-day (= 0.1.1)
- jekyll-theme-merlot (= 0.1.1)
- jekyll-theme-midnight (= 0.1.1)
- jekyll-theme-minimal (= 0.1.1)
- jekyll-theme-modernist (= 0.1.1)
- jekyll-theme-primer (= 0.5.4)
- jekyll-theme-slate (= 0.1.1)
- jekyll-theme-tactile (= 0.1.1)
- jekyll-theme-time-machine (= 0.1.1)
- jekyll-titles-from-headings (= 0.5.3)
- jemoji (= 0.12.0)
- kramdown (= 2.3.0)
- kramdown-parser-gfm (= 1.1.0)
- liquid (= 4.0.3)
+ jekyll-redirect-from (= 0.11.0)
+ jekyll-sass-converter (= 1.3.0)
+ jekyll-seo-tag (= 2.1.0)
+ jekyll-sitemap (= 0.12.0)
+ jekyll-swiss (= 0.4.0)
+ jemoji (= 0.7.0)
+ kramdown (= 1.11.1)
+ liquid (= 3.0.6)
+ listen (= 3.0.6)
mercenary (~> 0.3)
- minima (= 2.5.1)
- nokogiri (>= 1.11.0, < 2.0)
- rouge (= 3.23.0)
+ minima (= 2.0.0)
+ rouge (= 1.11.1)
terminal-table (~> 1.4)
- github-pages-health-check (1.16.1)
+ github-pages-health-check (1.2.0)
addressable (~> 2.3)
- dnsruby (~> 1.60)
+ net-dns (~> 0.8)
octokit (~> 4.0)
- public_suffix (~> 3.0)
- typhoeus (~> 1.3)
- html-pipeline (2.14.0)
+ public_suffix (~> 1.4)
+ typhoeus (~> 0.7)
+ html-pipeline (2.14.2)
activesupport (>= 2)
nokogiri (>= 1.4)
- http_parser.rb (0.6.0)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
- jekyll (3.9.0)
+ jekyll (3.3.1)
addressable (~> 2.4)
colorator (~> 1.0)
- em-websocket (~> 0.5)
- i18n (~> 0.7)
jekyll-sass-converter (~> 1.0)
- jekyll-watch (~> 2.0)
- kramdown (>= 1.17, < 3)
- liquid (~> 4.0)
+ jekyll-watch (~> 1.1)
+ kramdown (~> 1.3)
+ liquid (~> 3.0)
mercenary (~> 0.3.3)
pathutil (~> 0.9)
- rouge (>= 1.7, < 4)
+ rouge (~> 1.7)
safe_yaml (~> 1.0)
- jekyll-avatar (0.7.0)
- jekyll (>= 3.0, < 5.0)
- jekyll-coffeescript (1.1.1)
- coffee-script (~> 2.2)
- coffee-script-source (~> 1.11.1)
- jekyll-commonmark (1.3.1)
- commonmarker (~> 0.14)
- jekyll (>= 3.7, < 5.0)
- jekyll-commonmark-ghpages (0.1.6)
- commonmarker (~> 0.17.6)
- jekyll-commonmark (~> 1.2)
- rouge (>= 2.0, < 4.0)
- jekyll-default-layout (0.1.4)
+ jekyll-avatar (0.4.2)
jekyll (~> 3.0)
- jekyll-feed (0.15.1)
- jekyll (>= 3.7, < 5.0)
- jekyll-gist (1.5.0)
+ jekyll-coffeescript (1.0.1)
+ coffee-script (~> 2.2)
+ jekyll-default-layout (0.1.5)
+ jekyll (>= 3.0, < 5.0)
+ jekyll-feed (0.8.0)
+ jekyll (~> 3.3)
+ jekyll-gist (1.4.0)
octokit (~> 4.2)
- jekyll-github-metadata (2.13.0)
- jekyll (>= 3.4, < 5.0)
+ jekyll-github-metadata (2.2.0)
+ jekyll (~> 3.1)
octokit (~> 4.0, != 4.4.0)
- jekyll-include-cache (0.2.1)
- jekyll (>= 3.7, < 5.0)
- jekyll-mentions (1.6.0)
+ jekyll-include-cache (0.1.0)
+ jekyll (~> 3.3)
+ jekyll-mentions (1.2.0)
+ activesupport (~> 4.0)
html-pipeline (~> 2.3)
- jekyll (>= 3.7, < 5.0)
+ jekyll (~> 3.0)
jekyll-optional-front-matter (0.3.2)
jekyll (>= 3.0, < 5.0)
jekyll-paginate (1.1.0)
jekyll-readme-index (0.3.0)
jekyll (>= 3.0, < 5.0)
- jekyll-redirect-from (0.16.0)
- jekyll (>= 3.3, < 5.0)
+ jekyll-redirect-from (0.11.0)
+ jekyll (>= 2.0)
jekyll-relative-links (0.6.1)
jekyll (>= 3.3, < 5.0)
- jekyll-remote-theme (0.4.2)
- addressable (~> 2.0)
- jekyll (>= 3.5, < 5.0)
- jekyll-sass-converter (>= 1.0, <= 3.0.0, != 2.0.0)
- rubyzip (>= 1.3.0, < 3.0)
- jekyll-sass-converter (1.5.2)
- sass (~> 3.4)
- jekyll-seo-tag (2.6.1)
- jekyll (>= 3.3, < 5.0)
- jekyll-sitemap (1.4.0)
- jekyll (>= 3.7, < 5.0)
- jekyll-swiss (1.0.0)
- jekyll-theme-architect (0.1.1)
- jekyll (~> 3.5)
- jekyll-seo-tag (~> 2.0)
- jekyll-theme-cayman (0.1.1)
- jekyll (~> 3.5)
- jekyll-seo-tag (~> 2.0)
- jekyll-theme-dinky (0.1.1)
- jekyll (~> 3.5)
- jekyll-seo-tag (~> 2.0)
- jekyll-theme-hacker (0.1.2)
- jekyll (> 3.5, < 5.0)
- jekyll-seo-tag (~> 2.0)
- jekyll-theme-leap-day (0.1.1)
- jekyll (~> 3.5)
- jekyll-seo-tag (~> 2.0)
- jekyll-theme-merlot (0.1.1)
- jekyll (~> 3.5)
- jekyll-seo-tag (~> 2.0)
- jekyll-theme-midnight (0.1.1)
- jekyll (~> 3.5)
- jekyll-seo-tag (~> 2.0)
- jekyll-theme-minimal (0.1.1)
- jekyll (~> 3.5)
- jekyll-seo-tag (~> 2.0)
- jekyll-theme-modernist (0.1.1)
- jekyll (~> 3.5)
- jekyll-seo-tag (~> 2.0)
- jekyll-theme-primer (0.5.4)
- jekyll (> 3.5, < 5.0)
- jekyll-github-metadata (~> 2.9)
- jekyll-seo-tag (~> 2.0)
- jekyll-theme-slate (0.1.1)
- jekyll (~> 3.5)
- jekyll-seo-tag (~> 2.0)
- jekyll-theme-tactile (0.1.1)
- jekyll (~> 3.5)
- jekyll-seo-tag (~> 2.0)
- jekyll-theme-time-machine (0.1.1)
- jekyll (~> 3.5)
- jekyll-seo-tag (~> 2.0)
+ jekyll-sass-converter (1.3.0)
+ sass (~> 3.2)
+ jekyll-seo-tag (2.1.0)
+ jekyll (~> 3.3)
+ jekyll-sitemap (0.12.0)
+ jekyll (~> 3.3)
+ jekyll-swiss (0.4.0)
jekyll-titles-from-headings (0.5.3)
jekyll (>= 3.3, < 5.0)
- jekyll-watch (2.2.1)
+ jekyll-watch (1.5.1)
listen (~> 3.0)
- jemoji (0.12.0)
- gemoji (~> 3.0)
+ jemoji (0.7.0)
+ activesupport (~> 4.0)
+ gemoji (~> 2.0)
html-pipeline (~> 2.2)
- jekyll (>= 3.0, < 5.0)
- just-the-docs (0.3.3)
- jekyll (>= 3.8.5)
- jekyll-seo-tag (~> 2.0)
- rake (>= 12.3.1, < 13.1.0)
- kramdown (2.3.0)
- rexml
- kramdown-parser-gfm (1.1.0)
- kramdown (~> 2.0)
- liquid (4.0.3)
- listen (3.2.1)
- rb-fsevent (~> 0.10, >= 0.10.3)
- rb-inotify (~> 0.9, >= 0.9.10)
+ jekyll (>= 3.0)
+ json (1.8.6)
+ just-the-docs (0.1.6)
+ jekyll (~> 3.3)
+ rake (~> 10.0)
+ kramdown (1.11.1)
+ liquid (3.0.6)
+ listen (3.0.6)
+ rb-fsevent (>= 0.9.3)
+ rb-inotify (>= 0.9.7)
mercenary (0.3.6)
- mini_portile2 (2.5.0)
- minima (2.5.1)
- jekyll (>= 3.5, < 5.0)
- jekyll-feed (~> 0.9)
- jekyll-seo-tag (~> 2.1)
- minitest (5.14.2)
- multipart-post (2.1.1)
- nokogiri (1.11.1)
- mini_portile2 (~> 2.5.0)
+ mini_portile2 (2.8.0)
+ minima (2.0.0)
+ minitest (5.16.3)
+ net-dns (0.9.0)
+ nokogiri (1.13.9)
+ mini_portile2 (~> 2.8.0)
racc (~> 1.4)
- octokit (4.19.0)
- faraday (>= 0.9)
- sawyer (~> 0.8.0, >= 0.5.3)
+ octokit (4.25.1)
+ faraday (>= 1, < 3)
+ sawyer (~> 0.9)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
- public_suffix (3.1.1)
- racc (1.5.2)
- rake (13.0.1)
- rb-fsevent (0.10.4)
+ public_suffix (1.5.3)
+ racc (1.6.0)
+ rake (10.5.0)
+ rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
- rexml (3.2.4)
- rouge (3.23.0)
- ruby-enum (0.8.0)
- i18n
- ruby2_keywords (0.0.2)
- rubyzip (2.3.0)
+ rouge (1.11.1)
+ ruby2_keywords (0.0.5)
safe_yaml (1.0.5)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
- sawyer (0.8.2)
+ sawyer (0.9.2)
addressable (>= 2.3.5)
- faraday (> 0.8, < 2.0)
- simpleidn (0.1.1)
- unf (~> 0.1.4)
+ faraday (>= 0.17.3, < 3)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
thread_safe (0.3.6)
- typhoeus (1.4.0)
- ethon (>= 0.9.0)
- tzinfo (1.2.7)
+ typhoeus (0.8.0)
+ ethon (>= 0.8.0)
+ tzinfo (1.2.10)
thread_safe (~> 0.1)
- unf (0.1.4)
- unf_ext
- unf_ext (0.0.7.7)
- unicode-display_width (1.7.0)
- zeitwerk (2.4.1)
+ unicode-display_width (1.8.0)
PLATFORMS
ruby
diff --git a/docs/docs/development/grpc-gateway_v2_migration_guide.md b/docs/docs/development/grpc-gateway_v2_migration_guide.md
index 9fb10dd87e5..fe3b131e983 100644
--- a/docs/docs/development/grpc-gateway_v2_migration_guide.md
+++ b/docs/docs/development/grpc-gateway_v2_migration_guide.md
@@ -162,3 +162,7 @@ There is no workaround for this, as we considered it a correct interpretation of
## Error handling configuration has been overhauled
`runtime.HTTPError`, `runtime.OtherErrorHandler`, `runtime.GlobalHTTPErrorHandler`, `runtime.WithProtoErrorHandler` are all gone. Error handling is rewritten around the use of gRPCs Status types. If you wish to configure how the gateway handles errors, please use `runtime.WithErrorHandler` and `runtime.WithStreamErrorHandler`. To handle routing errors (similar to the removed `runtime.OtherErrorHandler`) please use `runtime.WithRoutingErrorHandler`.
+
+## Default query parameter parsing behaviour change
+
+The default behaviour for query parameter parsing has changed to return an `InvalidArgument` (`400 Bad Request`) error when more than one of the same matching query parameters is parsed. Previously, it would log but not return an error, using the first query parameter that matched and ignoring any others. See [the original issue](https://github.com/grpc-ecosystem/grpc-gateway/issues/2632) for more information.
\ No newline at end of file
diff --git a/docs/docs/faq.md b/docs/docs/faq.md
index e670a9cabd1..3d05c861a44 100644
--- a/docs/docs/faq.md
+++ b/docs/docs/faq.md
@@ -39,6 +39,10 @@ When a message is added which happens to conflict with another message (e.g. by
The gRPC-Gateway is a generator that generates a Go implementation of a JSON/HTTP-gRPC reverse proxy based on annotations in your proto file, while the [grpc-httpjson-transcoding](https://github.com/grpc-ecosystem/grpc-httpjson-transcoding) library doesn't require the generation step, it uses protobuf descriptors as config. It can be used as a component of an existing proxy. Google Cloud Endpoints and the gRPC-JSON transcoder filter in Envoy are using this.
+
+**Behavior differences:**
+- By default, gRPC-Gateway does not escape path parameters in the same way. [This can be configured.](../mapping/customizing_your_gateway.md#Controlling-path-parameter-unescaping)
+
## What is the difference between the gRPC-Gateway and gRPC-web?
### Usage
diff --git a/docs/docs/mapping/binary_file_uploads.md b/docs/docs/mapping/binary_file_uploads.md
index 145609ec588..1a378cf8fe0 100644
--- a/docs/docs/mapping/binary_file_uploads.md
+++ b/docs/docs/mapping/binary_file_uploads.md
@@ -32,14 +32,14 @@ mux.HandlePath("POST", "/v1/files", handleBinaryFileUpload)
And then in your handler you can do something like:
```go
-func handleBinaryFileUpload(w http.ResponseWriter, rq *http.Request, params map[string]string) {
+func handleBinaryFileUpload(w http.ResponseWriter, r *http.Request, params map[string]string) {
err := r.ParseForm()
if err != nil {
http.Error(w, fmt.Sprintf("failed to parse form: %s", err.Error()), http.StatusBadRequest)
return
}
- f, header, err := rq.FormFile("attachment")
+ f, header, err := r.FormFile("attachment")
if err != nil {
http.Error(w, fmt.Sprintf("failed to get file 'attachment': %s", err.Error()), http.StatusBadRequest)
return
diff --git a/docs/docs/mapping/customizing_openapi_output.md b/docs/docs/mapping/customizing_openapi_output.md
index 132c6675417..a93828a508b 100644
--- a/docs/docs/mapping/customizing_openapi_output.md
+++ b/docs/docs/mapping/customizing_openapi_output.md
@@ -39,6 +39,12 @@ message ABitOfEverything {
description: "Find out more about ABitOfEverything";
}
example: "{\"uuid\": \"0cf361e1-4b44-483d-a159-54dabdf7e814\"}"
+ extensions: {
+ key: "x-irreversible";
+ value {
+ bool_value: true;
+ }
+ }
};
string uuid = 1 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "The UUID field."}];
@@ -78,6 +84,29 @@ service ABitOfEverythingService {
}
```
+[Swagger Extensions](https://swagger.io/docs/specification/2-0/swagger-extensions/) can be added as key-value pairs to the options. Keys must begin with `x-` and values can be of any type listed [here](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#value). For example:
+```
+extensions: {
+ key: "x-amazon-apigateway-authorizer";
+ value {
+ struct_value {
+ fields {
+ key: "type";
+ value {
+ string_value: "token";
+ }
+ }
+ fields {
+ key: "authorizerResultTtlInSeconds";
+ value {
+ number_value: 60;
+ }
+ }
+ }
+ }
+}
+```
+
Please see this [a_bit_of_everything.proto](https://github.com/grpc-ecosystem/grpc-gateway/blob/master/examples/internal/proto/examplepb/a_bit_of_everything.proto) for examples of the options being used.
## Using google.api.field_behavior
@@ -102,7 +131,6 @@ that are not currently used. `OPTIONAL` support is currently under discussion
in [this issue](https://github.com/grpc-ecosystem/grpc-gateway/issues/669).
For `IMMUTABLE` and `INPUT_ONLY` fields, there is an [open issue](https://github.com/OAI/OpenAPI-Specification/issues/1497) in the Open API specification for adding functionality for write-once or immutable fields to the spec.
-
## Using go templates in proto file comments
Use [Go templates](https://golang.org/pkg/text/template/) in your proto file comments to allow more advanced documentation such as:
@@ -111,7 +139,7 @@ Use [Go templates](https://golang.org/pkg/text/template/) in your proto file com
- Import the content of external files (such as
[Markdown](https://en.wikipedia.org/wiki/Markdown)).
-## How to use it
+### How to use it
By default this function is turned off, so if you want to use it you have to add the `use_go_templates` option:
@@ -125,7 +153,7 @@ or:
--openapiv2_out=use_go_templates=true:.
```
-### Example script
+#### Example script
Example of a bash script with the `use_go_templates` flag set to true:
@@ -139,7 +167,7 @@ $ protoc -I. \
path/to/my/proto/v1/myproto.proto
```
-### Example proto file
+#### Example proto file
Example of a proto file with Go templates. This proto file imports documentation from another file, `tables.md`:
@@ -186,15 +214,15 @@ The content of `tables.md`:
| {{.Number}} | {{.Name}} | {{if eq .Label.String "LABEL_REPEATED"}}[]{{end}}{{.Type}} | {{fieldcomments .Message .}} | {{end}}
```
-## OpenAPI output
+### OpenAPI output
-### SwaggerUI
+#### SwaggerUI
This is how the OpenAPI file would be rendered in [Swagger UI](https://swagger.io/tools/swagger-ui/).

-### Postman
+#### Postman
This is how the OpenAPI file would be rendered in [Postman](https://www.getpostman.com/).
@@ -202,4 +230,597 @@ This is how the OpenAPI file would be rendered in [Postman](https://www.getpostm
For a more detailed example of a proto file that has Go, templates enabled, [see the examples](https://github.com/grpc-ecosystem/grpc-gateway/blob/master/examples/internal/proto/examplepb/use_go_template.proto).
+## Other plugin options
+
+A comprehensive list of OpenAPI plugin options can be found [here](https://github.com/grpc-ecosystem/grpc-gateway/blob/master/protoc-gen-openapiv2/main.go). Options can be passed via `protoc` CLI:
+
+```sh
+--openapiv2_out . --openapiv2_opt bar=baz,color=red
+```
+
+Or, with `buf` in `buf.gen.yaml`:
+
+```yaml
+ - name: openapiv2
+ out: foo
+ opt: bar=baz,color=red
+```
+
+### Merging output
+
+If your protobuf definitions are spread across multiple files, the OpenAPI plugin will create a file for each `.proto` input. This may make sense for Go bindings, since they still share a package space, but fragmenting OpenAPI specifications across multiple files changes the schema itself.
+
+To merge disparate `.proto` inputs into a single OpenAPI file, use the `allow_merge` and `merge_file_name` options.
+
+`opt: allow_merge=true,merge_file_name=foo` will result in a single `foo.swagger.json`. Note that you may need to set
+the [generation strategy](https://docs.buf.build/configuration/v1/buf-gen-yaml/#strategy) to `all` when merging many files:
+
+```yaml
+ - name: openapiv2
+ out: foo
+ strategy: all
+ opt: allow_merge=true,merge_file_name=foo
+```
+
+### Enums as integers
+
+To generate enums as integers instead of strings, use `enums_as_ints`.
+
+`opt: enums_as_ints=true` will result in:
+
+
+```json
+{
+ "name": "enumValue",
+ "description": " - Example enums",
+ "in": "query",
+ "required": false,
+ "type": "int",
+ "enum": [
+ 0,
+ 1
+ ],
+ "default": 0
+},
+```
+
+### Omitting the default value of enums
+
+If you define enum types with non default value such as declaring 0 value with UNKNOWN and want to omit the default value from generated swagger file, use `omit_enum_default_value`.
+This option also applies if enums_as_ints option is enalbled to generate enums as integer.
+
+`opt: omit_enum_default_value=true` will result in:
+
+Input Example:
+```
+enum enumValue {
+ UNKNOWN = 0;
+ FOO = 1;
+}
+```
+
+Output json:
+```json
+{
+ "name": "enumValue",
+ "description": " - Example enums",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "enum": [
+ "FOO"
+ ]
+},
+```
+
+### Hiding fields, methods, services and enum values
+
+If you require internal or unreleased fields and APIs to be hidden from your API documentation, [`google.api.VisibilityRule`](https://github.com/googleapis/googleapis/blob/9916192ab15e3507e41ba2c5165182fec06120d0/google/api/visibility.proto#L89) annotations can be added to customize where they are generated. Combined with the option `visibility_restriction_selectors`, overlapping rules will appear in the OpenAPI output.
+
+`visibility_restriction_selectors` can be declared multiple times as an option to include multiple visibility restrictions in the output.
+e.g. if you are using `buf`:
+
+```yaml
+version: v1
+plugins:
+ - name: openapiv2
+ out: .
+ opt:
+ - visibility_restriction_selectors=PREVIEW
+ - visibility_restriction_selectors=INTERNAL
+```
+
+or with `protoc`
+
+```sh
+protoc --openapiv2_out=. --openapiv2_opt=visibility_restriction_selectors=PREVIEW --openapiv2_opt=visibility_restriction_selectors=INTERNAL ./path/to/file.proto
+```
+
+Elements without `google.api.VisibilityRule` annotations will appear as usual in the generated output.
+
+These restrictions and selectors are completely arbitrary and you can define whatever values or hierarchies you want. In this example we use `INTERNAL` and `PREVIEW`, but `INTERNAL`, `ALPHA`, `BETA`, `RELEASED`, or anything else could be used if you wish.
+
+Note: Annotations are only supported on Services, Methods, Fields and Enum Values.
+
+`opt: visibility_restriction_selectors=PREVIEW` will result in:
+
+Input Example:
+```protobuf
+service Echo {
+ rpc EchoInternal(VisibilityRuleSimpleMessage) returns (VisibilityRuleSimpleMessage) {
+ option (google.api.method_visibility).restriction = "INTERNAL";
+ option (google.api.http) = {
+ get: "/v1/example/echo_internal"
+ };
+ }
+ rpc EchoInternalAndPreview(VisibilityRuleSimpleMessage) returns (VisibilityRuleSimpleMessage) {
+ option (google.api.method_visibility).restriction = "INTERNAL,PREVIEW";
+ option (google.api.http) = {
+ get: "/v1/example/echo_internal_and_preview"
+ };
+ }
+}
+
+message VisibilityRuleSimpleMessage {
+ enum VisibilityEnum {
+ UNSPECIFIED = 0;
+ VISIBLE = 1;
+ INTERNAL = 2 [(google.api.value_visibility).restriction = "INTERNAL"];
+ PREVIEW = 3 [(google.api.value_visibility).restriction = "INTERNAL,PREVIEW"];
+ }
+
+ string internal_field = 1 [(google.api.field_visibility).restriction = "INTERNAL"];
+ string preview_field = 2 [(google.api.field_visibility).restriction = "INTERNAL,PREVIEW"];
+ VisibilityEnum an_enum = 3;
+}
+```
+
+Output json:
+```json
+{
+ "paths": {
+ "/v1/example/echo_internal_and_preview": {
+ "get": {
+ "summary": "EchoInternalAndPreview is a internal and preview API that should be visible in the OpenAPI spec.",
+ "operationId": "VisibilityRuleEchoService_EchoInternalAndPreview",
+ "responses": {
+ "200": {
+ "description": "A successful response.",
+ "schema": {
+ "$ref": "#/definitions/examplepbVisibilityRuleSimpleMessage"
+ }
+ },
+ "default": {
+ "description": "An unexpected error response.",
+ "schema": {
+ "$ref": "#/definitions/rpcStatus"
+ }
+ }
+ },
+ "parameters": [
+ {
+ "name": "previewField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "anEnum",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "enum": [
+ "UNSPECIFIED",
+ "VISIBLE",
+ "PREVIEW"
+ ],
+ "default": "UNSPECIFIED"
+ }
+ ],
+ "tags": [
+ "VisibilityRuleEchoService"
+ ]
+ }
+ }
+ }
+}
+```
+
+For a more in depth example see [visibility_rule_echo_service.proto](https://github.com/grpc-ecosystem/grpc-gateway/blob/master/examples/internal/proto/examplepb/visibility_rule_echo_service.proto) and the following output files for different values of `visibility_restriction_selectors`:
+- [`visibility_restriction_selectors=PREVIEW`](https://github.com/grpc-ecosystem/grpc-gateway/blob/master/examples/internal/proto/examplepb/visibility_rule_preview_echo_service.swagger.json)
+- [`visibility_restriction_selectors=INTERNAL`](https://github.com/grpc-ecosystem/grpc-gateway/blob/master/examples/internal/proto/examplepb/visibility_rule_internal_echo_service.swagger.json)
+- [`visibility_restriction_selectors=INTERNAL,visibility_restriction_selectors=PREVIEW`](https://github.com/grpc-ecosystem/grpc-gateway/blob/master/examples/internal/proto/examplepb/visibility_rule_preview_and_internal_echo_service.swagger.json)
+- [Not set](https://github.com/grpc-ecosystem/grpc-gateway/blob/master/examples/internal/proto/examplepb/visibility_rule_none_echo_service.swagger.json)
+
+### Path parameters
+
+When defining HTTP bindings with path parameters that contain multiple path segments, as suggested by the [Google AIPs](https://google.aip.dev/), the path parameter names are numbered to avoid generating duplicate paths in the OpenAPI file.
+
+For example, consider:
+```protobuf
+service LibraryService {
+ rpc GetShelf(GetShelfRequest) returns (Shelf) {
+ option (google.api.http) = {
+ get: "/v1/{name=shelves/*}"
+ };
+ }
+ rpc GetBook(GetBookRequest) returns (Book) {
+ option (google.api.http) = {
+ get: "/v1/{name=shelves/*/books/*}"
+ };
+ }
+}
+
+message GetShelfRequest {
+ string name = 1;
+}
+
+message GetBookRequest {
+ string name = 1;
+}
+```
+
+This will generate the following paths:
+- `/v1/{name}`
+- `/v1/{name_1}`
+
+To override the path parameter names, annotate the field used as path parameter:
+```protobuf
+message GetShelfRequest {
+ string name = 1 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {field_configuration: {path_param_name: "shelfName"}}];
+}
+message GetBookRequest {
+ string name = 1 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {field_configuration: {path_param_name: "bookName"}}];
+}
+```
+
+This will instead generate the following paths:
+- `/v1/{shelfName}`
+- `/v1/{bookName}`
+
+Note that path parameters in OpenAPI does not support values with `/`, as discussed in
+[Support for path parameters which can contain slashes #892](https://github.com/OAI/OpenAPI-Specification/issues/892),
+so tools as Swagger UI will URL encode any `/` provided as parameter value. A possible workaround for this is to write
+a custom post processor for your OAS file to replace any path parameter with `/` into multiple parameters.
+
+### Output format
+
+By default the output format is JSON, but it is possible to configure it using the `output_format` option. Allowed values are: `json`, `yaml`. The output format will also change the extension of the output files.
+
+For example, if using `buf`:
+```yaml
+ - name: openapiv2
+ out: pkg
+ opt: output_format=yaml
+```
+
+Input example:
+```protobuf
+syntax = "proto3";
+
+package helloproto.v1;
+option go_package = "helloproto/v1;helloproto";
+
+import "google/api/annotations.proto";
+
+service EchoService {
+ rpc Hello(HelloReq) returns (HelloResp) {
+ option (google.api.http) = {
+ get: "/api/hello"
+ };
+ }
+}
+
+message HelloReq {
+ string name = 1;
+}
+
+message HelloResp {
+ string message = 1;
+}
+```
+
+Output:
+```yaml
+swagger: "2.0"
+info:
+ title: helloproto/v1/example.proto
+ version: version not set
+tags:
+- name: EchoService
+consumes:
+- application/json
+produces:
+- application/json
+paths:
+ /api/hello:
+ get:
+ operationId: EchoService_Hello
+ responses:
+ "200":
+ description: A successful response.
+ schema:
+ $ref: '#/definitions/v1HelloResp'
+ default:
+ description: An unexpected error response.
+ schema:
+ $ref: '#/definitions/rpcStatus'
+ parameters:
+ - name: name
+ in: query
+ required: false
+ type: string
+ tags:
+ - EchoService
+definitions:
+ protobufAny:
+ type: object
+ properties:
+ '@type':
+ type: string
+ additionalProperties: {}
+ rpcStatus:
+ type: object
+ properties:
+ code:
+ type: integer
+ format: int32
+ message:
+ type: string
+ details:
+ type: array
+ items:
+ $ref: '#/definitions/protobufAny'
+ v1HelloResp:
+ type: object
+ properties:
+ message:
+ type: string
+```
+
+### Disable service tag generation
+
+By default service tags are generated for backend services, but it is possible to disable it using the `disable_service_tags` option. Allowed values are: `true`, `false`.
+
+For example, if you are using `buf`:
+```yaml
+version: v1
+plugins:
+ - name: openapiv2
+ out: .
+ opt:
+ - disable_service_tags=true
+```
+
+or with `protoc`
+
+```sh
+protoc --openapiv2_out=. --openapiv2_opt=disable_service_tags=true ./path/to/file.proto
+```
+
+Input example:
+```protobuf
+syntax = "proto3";
+
+package helloproto.v1;
+option go_package = "helloproto/v1;helloproto";
+
+import "google/api/annotations.proto";
+
+service EchoService {
+ rpc Hello(HelloReq) returns (HelloResp) {
+ option (google.api.http) = {
+ get: "/api/hello"
+ };
+ }
+}
+
+message HelloReq {
+ string name = 1;
+}
+
+message HelloResp {
+ string message = 1;
+}
+```
+
+Output (tags object are not generated):
+```yaml
+swagger: "2.0"
+info:
+ title: helloproto/v1/example.proto
+ version: version not set
+consumes:
+ - application/json
+produces:
+ - application/json
+paths:
+ /api/hello:
+ get:
+ operationId: EchoService_Hello
+```
+
+### Disable default responses
+
+By default a 200 OK response is rendered for each service operation. But it is possible to disable this and explicitly define your service's responses, using the `disable_default_responses` option. Allowed values are: `true`, `false`.
+
+**Note**: This does not alter the behavior of the gateway itself and should be coupled with a `ForwardResponseWriter` when altering status codes, see [Controlling HTTP Response Codes](https://grpc-ecosystem.github.io/grpc-gateway/docs/mapping/customizing_your_gateway/#controlling-http-response-status-codes).
+
+For example, if you are using `buf`:
+
+```yaml
+version: v1
+plugins:
+ - name: openapiv2
+ out: .
+ opt:
+ - disable_default_responses=true
+```
+
+or with `protoc`
+
+```sh
+protoc --openapiv2_out=. --openapiv2_opt=disable_default_responses=true ./path/to/file.proto
+```
+
+Input example:
+
+```protobuf
+syntax = "proto3";
+
+package helloproto.v1;
+
+import "google/api/annotations.proto";
+import "protoc-gen-openapiv2/options/annotations.proto";
+
+option go_package = "helloproto/v1;helloproto";
+
+service EchoService {
+ rpc Hello(HelloReq) returns (HelloResp) {
+ option (google.api.http) = {get: "/api/hello"};
+ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
+ responses: {
+ key: "201",
+ value: {
+ description: "Created";
+ schema: {
+ json_schema: {ref: ".helloproto.v1.HelloResp"}
+ }
+ }
+ };
+ };
+ }
+}
+
+message HelloReq {
+ string name = 1;
+}
+
+message HelloResp {
+ string message = 1;
+}
+```
+
+Output (default response not generated):
+
+```yaml
+swagger: "2.0"
+info:
+ title: helloproto/v1/hello.proto
+ version: version not set
+consumes:
+ - application/json
+produces:
+ - application/json
+paths:
+ /api/hello:
+ get:
+ operationId: EchoService_Hello
+ responses:
+ "201":
+ description: Created
+ schema:
+ $ref: "#/definitions/v1HelloResp"
+ parameters:
+ - name: name
+ in: query
+ required: false
+ type: string
+definitions:
+ v1HelloResp:
+ type: object
+ properties:
+ message:
+ type: string
+```
+
+### Custom HTTP Header Request Parameters
+
+By default the parameters for each operation are generated from the protocol buffer definition however you can extend the parameters to include extra HTTP headers if required.
+
+**NOTE**: These annotations do not alter the behaviour of the gateway and must be coupled with custom header parsing behaviour in the application. Also be aware that adding header parameters can alter the forwards and backwards compatibility of the schema. You must also set a type for your header which can be one of `STRING`, `INTEGER`, `NUMBER` or `BOOLEAN`.
+
+```protobuf
+syntax = "proto3";
+
+package helloproto.v1;
+
+import "google/api/annotations.proto";
+import "protoc-gen-openapiv2/options/annotations.proto";
+
+option go_package = "helloproto/v1;helloproto";
+
+service EchoService {
+ rpc Hello(HelloReq) returns (HelloResp) {
+ option (google.api.http) = {get: "/api/hello"};
+ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
+ parameters: {
+ headers: {
+ name: "X-Foo";
+ description: "Foo Header";
+ type: STRING,
+ required: true;
+ };
+ headers: {
+ name: "X-Bar";
+ description: "Bar Header";
+ type: NUMBER,
+ };
+ };
+ };
+ }
+}
+
+message HelloReq {
+ string name = 1;
+}
+
+message HelloResp {
+ string message = 1;
+}
+```
+
+Output:
+
+```yaml
+swagger: "2.0"
+info:
+ title: helloproto/v1/hello.proto
+ version: version not set
+consumes:
+ - application/json
+produces:
+ - application/json
+paths:
+ /api/hello:
+ get:
+ operationId: Hello
+ responses:
+ "200":
+ description: A successful response.
+ schema:
+ $ref: "#/definitions/helloproto.v1.HelloResp"
+ parameters:
+ - name: name
+ in: query
+ required: false
+ type: string
+ - name: X-Foo
+ description: Foo Header
+ in: header
+ required: true
+ type: string
+ - name: X-Bar
+ description: Bar Header
+ in: header
+ required: false
+ type: number
+definitions:
+ helloproto.v1.HelloResp:
+ type: object
+ properties:
+ message:
+ type: string
+```
+
{% endraw %}
diff --git a/docs/docs/mapping/customizing_your_gateway.md b/docs/docs/mapping/customizing_your_gateway.md
index 2100a0539be..ca09c8c9d21 100644
--- a/docs/docs/mapping/customizing_your_gateway.md
+++ b/docs/docs/mapping/customizing_your_gateway.md
@@ -345,6 +345,30 @@ func handleStreamError(ctx context.Context, err error) *status.Status {
If no custom handler is provided, the default stream error handler will include any gRPC error attributes (code, message, detail messages), if the error being reported includes them. If the error does not have these attributes, a gRPC code of `Unknown` (2) is reported.
+## Controlling path parameter unescaping
+
+
+
+By default, gRPC-Gateway unescapes the entire URL path string attempting to route a request. This causes routing errors when the path parameter contains an illegal character such as `/`.
+
+To replicate the behavior described in [google.api.http](https://github.com/googleapis/googleapis/blob/master/google/api/http.proto#L224), use [runtime.WithUnescapingMode()](https://pkg.go.dev/github.com/grpc-ecosystem/grpc-gateway/runtime?tab=doc#WithUnescapingMode) to configure the unescaping behavior, as in the example below:
+
+```go
+mux := runtime.NewServeMux(
+ runtime.WithUnescapingMode(runtime.UnescapingModeAllExceptReserved),
+)
+```
+
+For multi-segment parameters (e.g. `{id=**}`) [RFC 6570](https://tools.ietf.org/html/rfc6570) Reserved Expansion characters are left escaped and the gRPC API will need to unescape them.
+
+To replicate the default V2 escaping behavior but also allow passing pct-encoded `/` characters, the ServeMux can be configured as in the example below:
+
+```go
+mux := runtime.NewServeMux(
+ runtime.WithUnescapingMode(runtime.UnescapingModeAllCharacters),
+)
+```
+
## Routing Error handler
To override the error behavior when `*runtime.ServeMux` was not able to serve the request due to routing issues, use the `runtime.WithRoutingErrorHandler` option.
diff --git a/docs/docs/mapping/examples.md b/docs/docs/mapping/examples.md
index 2559a24542d..48e8473164b 100644
--- a/docs/docs/mapping/examples.md
+++ b/docs/docs/mapping/examples.md
@@ -13,9 +13,9 @@ Examples are available under `examples/internal` directory.
protobuf service definitions.
- [`proto/examplepb/echo_service.pb.go`](https://github.com/grpc-ecosystem/grpc-gateway/tree/master/examples/internal/proto/examplepb/echo_service.pb.go), [`proto/examplepb/a_bit_of_everything.pb.go`](https://github.com/grpc-ecosystem/grpc-gateway/tree/master/examples/internal/proto/examplepb/a_bit_of_everything.pb.go), [`proto/examplepb/unannotated_echo_service.pb.go`](https://github.com/grpc-ecosystem/grpc-gateway/tree/master/examples/internal/proto/examplepb/unannotated_echo_service.pb.go):
generated Go service stubs and types.
-- [`proto/examplepb/echo_service.pb.gw.go`](https://github.com/grpc-ecosystem/grpc-gateway/tree/master/examples/internal/proto/examplepb/echo_service.pb.gw.go), [`proto/examplepb/a_bit_of_everything.pb.gw.go`](https://github.com/grpc-ecosystem/grpc-gateway/tree/master/examples/internal/proto/examplepb/a_bit_of_everything.pb.gw.go), [`proto/examplepb/uannotated_echo_service.pb.gw.go`](https://github.com/grpc-ecosystem/grpc-gateway/tree/master/examples/internal/proto/examplepb/uannotated_echo_service.pb.gw.go):
+- [`proto/examplepb/echo_service.pb.gw.go`](https://github.com/grpc-ecosystem/grpc-gateway/tree/master/examples/internal/proto/examplepb/echo_service.pb.gw.go), [`proto/examplepb/a_bit_of_everything.pb.gw.go`](https://github.com/grpc-ecosystem/grpc-gateway/tree/master/examples/internal/proto/examplepb/a_bit_of_everything.pb.gw.go), [`proto/examplepb/unannotated_echo_service.pb.gw.go`](https://github.com/grpc-ecosystem/grpc-gateway/tree/master/examples/internal/proto/examplepb/unannotated_echo_service.pb.gw.go):
generated gRPC-Gateway clients.
-- [`proto/examplepb/unannotated_echo_service.yaml`](https://github.com/grpc-ecosystem/grpc-gateway/tree/master/examples/internal/proto/examplepb/uannotated_echo_service.yaml):
+- [`proto/examplepb/unannotated_echo_service.yaml`](https://github.com/grpc-ecosystem/grpc-gateway/tree/master/examples/internal/proto/examplepb/unannotated_echo_service.yaml):
gRPC API Configuration for `unannotated_echo_service.proto`.
- [`server/main.go`](https://github.com/grpc-ecosystem/grpc-gateway/tree/master/examples/internal/server/main.go):
service implementation.
diff --git a/docs/docs/mapping/patch_feature.md b/docs/docs/mapping/patch_feature.md
index 7655f999e0f..61cb8d24380 100644
--- a/docs/docs/mapping/patch_feature.md
+++ b/docs/docs/mapping/patch_feature.md
@@ -9,7 +9,7 @@ parent: Mapping
The HTTP PATCH method allows a resource to be partially updated.
-If a binding is mapped to patch and the request message has exactly one FieldMask message in it, additional code is rendered for the gateway handler that will populate the FieldMask based on the request body.
+If a binding is mapped to patch and the request message has exactly one FieldMask message in it, additional code is rendered for the gateway handler that will populate the FieldMask based on the request body. FieldMask is treated as a regular field by the gateway if the request method is not PATCH, or if the HttpRule body is `"*"`
There are two scenarios:
diff --git a/docs/docs/operations/annotated_context.md b/docs/docs/operations/annotated_context.md
new file mode 100644
index 00000000000..1eaaddac0b6
--- /dev/null
+++ b/docs/docs/operations/annotated_context.md
@@ -0,0 +1,52 @@
+---
+layout: default
+title: Extracting the HTTP path pattern for a request
+nav_order: 4
+parent: Operations
+---
+
+# Extracting the HTTP path pattern for a request
+
+It is often interesting to know what [HTTP path pattern](https://github.com/googleapis/googleapis/blob/869d32e2f0af2748ab530646053b23a2b80d9ca5/google/api/http.proto#L61-L87) was matched for a specific request, for example for metrics. This article explains how to extract the HTTP path pattern from the request context.
+
+## Get HTTP Path pattern
+1. Define the HTTP path in the proto annotation. For example:
+
+```proto
+syntax = "proto3";
+option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/examplepb";
+package grpc.gateway.examples.internal.proto.examplepb;
+
+import "google/api/annotations.proto";
+
+service LoginService {
+ rpc Login (LoginRequest) returns (LoginReply) {
+ option (google.api.http) = {
+ post: "/v1/example/login"
+ body: "*"
+ };
+ }
+}
+
+message LoginRequest {}
+
+message LoginReply {}
+```
+
+2. At runtime, get the HTTP path pattern from the annotated context, for example using the `WithMetadata` function.
+You can pass data to your backend by adding them to the gRPC metadata or push them to a metrics server.
+
+```go
+mux := runtime.NewServeMux(
+ runtime.WithMetadata(func(ctx context.Context, r *http.Request) metadata.MD {
+ md := make(map[string]string)
+ if method, ok := runtime.RPCMethod(ctx); ok {
+ md["method"] = method // /grpc.gateway.examples.internal.proto.examplepb.LoginService/Login
+ }
+ if pattern, ok := runtime.HTTPPathPattern(ctx); ok {
+ md["pattern"] = pattern // /v1/example/login
+ }
+ return metadata.New(md)
+ }),
+)
+```
\ No newline at end of file
diff --git a/docs/docs/operations/health_check.md b/docs/docs/operations/health_check.md
index df332804f51..b8a8be5a3ee 100644
--- a/docs/docs/operations/health_check.md
+++ b/docs/docs/operations/health_check.md
@@ -36,3 +36,25 @@ func (s *serviceServer) Watch(in *health.HealthCheckRequest, _ health.Health_Wat
```
3. You can test the functionality with [GRPC health probe](https://github.com/grpc-ecosystem/grpc-health-probe).
+
+## Adding `/healthz` endpoint to runtime.ServeMux
+
+To automatically register a `/healthz` endpoint in your `ServeMux` you can use
+the `ServeMuxOption` `WithHealthzEndpoint`
+which takes in a connection to your registered gRPC server.
+
+This endpoint will forward a request to the `Check` method described above to really check the health of the
+whole system, not only the gateway itself. If your server doesn't implement the health checking protocol each request
+to `/healthz` will result in the following:
+
+```json
+{"code":12,"message":"unknown service grpc.health.v1.Health","details":[]}
+```
+
+If you've implemented multiple services in your server you can target specific services with the `?service=`
+query parameter. This will then be added to the `health.HealthCheckRequest` in the `Service` property. With that you can
+write your own logic to handle that in the health checking methods.
+
+Analogously, to register an `{/endpoint/path}` endpoint in your `ServeMux` with a user-defined endpoint path, you can use
+the `ServeMuxOption` `WithHealthEndpointAt`, which accepts a connection to your registered gRPC server
+together with a custom `endpointPath string` parameter.
diff --git a/docs/docs/related_projects.md b/docs/docs/related_projects.md
index 0d691d52d8f..e9600bb9bd9 100644
--- a/docs/docs/related_projects.md
+++ b/docs/docs/related_projects.md
@@ -5,11 +5,19 @@ nav_order: 8
---
# Related projects
-- [grps-dynamic-gateway](https://github.com/konsumer/grpc-dynamic-gateway)
+
+- [grpc-dynamic-gateway](https://github.com/konsumer/grpc-dynamic-gateway)
+
A dynamically configured alternative to the grpc-gateway written in Node.
+
- [rest2grpc](https://www.npmjs.com/package/rest2grpc)
+
A statically configured alternative to the grpc-gateway written in Node.
+
- The Envoy proxy [gRPC-JSON transcoder](https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/grpc_json_transcoder_filter)
+
An Envoy proxy filter that translates incoming JSON requests to gRPC and back.
+
- Google Cloud Platform [HTTP/JSON gRPC transcoding](https://cloud.google.com/endpoints/docs/grpc/transcoding)
+
A GCP product that behaves like the grpc-gateway.
diff --git a/docs/docs/tutorials/adding_annotations.md b/docs/docs/tutorials/adding_annotations.md
index d93476ad1f5..bf0b13d7a23 100644
--- a/docs/docs/tutorials/adding_annotations.md
+++ b/docs/docs/tutorials/adding_annotations.md
@@ -53,7 +53,7 @@ Now that we've got the gRPC-Gateway annotations added to the proto file, we need
We'll need to add the gRPC-Gateway generator to the generation configuration:
```yaml
-version: v1beta1
+version: v1
plugins:
- name: go
out: proto
@@ -69,16 +69,13 @@ plugins:
We'll also need to add the `googleapis` dependency to our `buf.yaml` file:
```yaml
-version: v1beta1
+version: v1
name: buf.build/myuser/myrepo
deps:
- - buf.build/beta/googleapis
-build:
- roots:
- - proto
+ - buf.build/googleapis/googleapis
```
-Then we need to run `buf beta mod update` to select a version of the dependency to use.
+Then we need to run `buf mod update` to select a version of the dependency to use.
And that's it! Now if you run:
@@ -128,6 +125,7 @@ import (
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
"google.golang.org/grpc"
+ "google.golang.org/grpc/credentials/insecure"
helloworldpb "github.com/myuser/myrepo/proto/helloworld"
)
@@ -167,7 +165,7 @@ func main() {
context.Background(),
"0.0.0.0:8080",
grpc.WithBlock(),
- grpc.WithInsecure(),
+ grpc.WithTransportCredentials(insecure.NewCredentials()),
)
if err != nil {
log.Fatalln("Failed to dial server:", err)
diff --git a/docs/docs/tutorials/creating_main.go.md b/docs/docs/tutorials/creating_main.go.md
index 880277bff42..de1f0ae7aca 100644
--- a/docs/docs/tutorials/creating_main.go.md
+++ b/docs/docs/tutorials/creating_main.go.md
@@ -22,7 +22,9 @@ import (
helloworldpb "github.com/myuser/myrepo/proto/helloworld"
)
-type server struct{}
+type server struct{
+ helloworldpb.UnimplementedGreeterServer
+}
func NewServer() *server {
return &server{}
diff --git a/docs/docs/tutorials/generating_stubs/using_buf.md b/docs/docs/tutorials/generating_stubs/using_buf.md
index 2c2aabb76d5..f7d657fb4b9 100644
--- a/docs/docs/tutorials/generating_stubs/using_buf.md
+++ b/docs/docs/tutorials/generating_stubs/using_buf.md
@@ -10,24 +10,19 @@ grand_parent: Tutorials
[Buf](https://github.com/bufbuild/buf) is a tool that provides various protobuf utilities such as linting, breaking change detection and generation. Please find installation instructions on [https://docs.buf.build/installation/](https://docs.buf.build/installation/).
-It is configured through a `buf.yaml` file that should be checked in to the root of your repository. Buf will automatically read this file if present. Configuration can also be provided via the command-line flag `--config`, which accepts a path to a `.json` or `.yaml` file, or direct JSON or YAML data.
+It is configured through a `buf.yaml` file that should be checked in to the root of your Protobuf file hierarchy. Buf will automatically read this file if present. Configuration can also be provided via the command-line flag `--config`, which accepts a path to a `.json` or `.yaml` file, or direct JSON or YAML data. As opposed to `protoc`, where all `.proto` files are manually specified on the command-line, buf operates by recursively discovering all `.proto` files under configuration and building them.
-All Buf operations that use your local `.proto` files as input rely on a valid build configuration. This configuration tells Buf where to search for `.proto` files, and how to handle imports. As opposed to `protoc`, where all `.proto` files are manually specified on the command-line, buf operates by recursively discovering all `.proto` files under configuration and building them.
-
-The following is an example of a valid configuration, assuming you have your `.proto` files rooted in the `proto` folder relative to the root of your repository.
+The following is an example of a valid configuration, and you would put it in the root of your Protobuf file hierarchy, e.g. in `proto/buf.yaml` relative to the root of your repository.
```yaml
-version: v1beta1
+version: v1
name: buf.build/myuser/myrepo
-build:
- roots:
- - proto
```
-To generate type and gRPC stubs for Go, create the file `buf.gen.yaml` at the root of the repository:
+To generate type and gRPC stubs for Go, create the file `buf.gen.yaml`:
```yaml
-version: v1beta1
+version: v1
plugins:
- name: go
out: proto
diff --git a/docs/index.md b/docs/index.md
index 5139b2fd3c7..88910e1484a 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -18,8 +18,7 @@ gRPC-Gateway is a plugin of [protoc](https://github.com/protocolbuffers/protobuf
## Getting started
-
-
+
diff --git a/examples/internal/browser/.gitignore b/examples/internal/browser/.gitignore
index 1dcc590b085..75ce18e9269 100644
--- a/examples/internal/browser/.gitignore
+++ b/examples/internal/browser/.gitignore
@@ -1,3 +1,2 @@
/bower_components
/node_modules
-/package-lock.json
diff --git a/examples/internal/browser/a_bit_of_everything_service.spec.js b/examples/internal/browser/a_bit_of_everything_service.spec.js
index 66ccd54ece7..eb6058d2818 100644
--- a/examples/internal/browser/a_bit_of_everything_service.spec.js
+++ b/examples/internal/browser/a_bit_of_everything_service.spec.js
@@ -2,226 +2,257 @@
var SwaggerClient = require('swagger-client');
-describe('ABitOfEverythingService', function() {
+describe('ABitOfEverythingService', function () {
var client;
- beforeEach(function(done) {
+ beforeEach(function (done) {
new SwaggerClient({
url: "http://localhost:8080/openapiv2/a_bit_of_everything.swagger.json",
usePromise: true,
- }).then(function(c) {
+ }).then(function (c) {
client = c;
- }).catch(function(err) {
+ }).catch(function (err) {
done.fail(err);
}).then(done);
});
- describe('Create', function() {
+ describe('Create', function () {
var created;
var expected = {
- float_value: 1.5,
- double_value: 2.5,
- int64_value: "4294967296",
- uint64_value: "9223372036854775807",
- int32_value: -2147483648,
- fixed64_value: "9223372036854775807",
- fixed32_value: 4294967295,
- bool_value: true,
- string_value: "strprefix/foo",
- uint32_value: 4294967295,
- sfixed32_value: 2147483647,
- sfixed64_value: "-4611686018427387904",
- sint32_value: 2147483647,
- sint64_value: "4611686018427387903",
+ floatValue: 1.5,
+ doubleValue: 2.5,
+ int64Value: "4294967296",
+ uint64Value: "9223372036854775807",
+ int32Value: -2147483648,
+ fixed64Value: "9223372036854775807",
+ fixed32Value: 4294967295,
+ boolValue: true,
+ stringValue: "strprefix/foo",
+ uint32Value: 4294967295,
+ sfixed32Value: 2147483647,
+ sfixed64Value: "-4611686018427387904",
+ sint32Value: 2147483647,
+ sint64Value: "4611686018427387903",
nonConventionalNameValue: "camelCase",
- enum_value: "ONE",
- path_enum_value: "DEF",
- nested_path_enum_value: "JKL",
- enum_value_annotation: "ONE",
+ enumValue: "ONE",
+ pathEnumValue: "DEF",
+ nestedPathEnumValue: "JKL",
+ enumValueAnnotation: "ONE",
+ requiredStringViaFieldBehaviorAnnotation: "foo",
+ singleNested: null,
+ nested: [],
+ bytesValue: "",
+ repeatedStringValue: [],
+ mapValue: {},
+ mappedStringValue: {},
+ mappedNestedValue: {},
+ timestampValue: "2006-01-02T15:04:05Z",
+ repeatedEnumValue: [],
+ repeatedEnumAnnotation: [],
+ repeatedStringAnnotation: [],
+ repeatedNestedAnnotation: [],
+ nestedAnnotation: null,
+ int64OverrideType: "0",
+ outputOnlyStringViaFieldBehaviorAnnotation: "",
};
- beforeEach(function(done) {
- client.ABitOfEverythingService.Create(expected).then(function(resp) {
+ beforeEach(function (done) {
+ client.ABitOfEverythingService.ABitOfEverythingService_Create(expected).then(function (resp) {
created = resp.obj;
- }).catch(function(err) {
+ }).catch(function (err) {
done.fail(err);
}).then(done);
});
- it('should assign id', function() {
+ it('should assign id', function () {
expect(created.uuid).not.toBe("");
});
- it('should echo the request back', function() {
+ it('should echo the request back', function () {
delete created.uuid;
expect(created).toEqual(expected);
});
});
- describe('CreateBody', function() {
+ describe('CreateBody', function () {
var created;
var expected = {
- float_value: 1.5,
- double_value: 2.5,
- int64_value: "4294967296",
- uint64_value: "9223372036854775807",
- int32_value: -2147483648,
- fixed64_value: "9223372036854775807",
- fixed32_value: 4294967295,
- bool_value: true,
- string_value: "strprefix/foo",
- uint32_value: 4294967295,
- sfixed32_value: 2147483647,
- sfixed64_value: "-4611686018427387904",
- sint32_value: 2147483647,
- sint64_value: "4611686018427387903",
+ floatValue: 1.5,
+ doubleValue: 2.5,
+ int64Value: "4294967296",
+ uint64Value: "9223372036854775807",
+ int32Value: -2147483648,
+ fixed64Value: "9223372036854775807",
+ fixed32Value: 4294967295,
+ boolValue: true,
+ stringValue: "strprefix/foo",
+ uint32Value: 4294967295,
+ sfixed32Value: 2147483647,
+ sfixed64Value: "-4611686018427387904",
+ sint32Value: 2147483647,
+ sint64Value: "4611686018427387903",
nonConventionalNameValue: "camelCase",
- enum_value: "ONE",
- path_enum_value: "DEF",
- nested_path_enum_value: "JKL",
-
+ enumValue: "ONE",
+ pathEnumValue: "DEF",
+ nestedPathEnumValue: "JKL",
nested: [
- { name: "bar", amount: 10 },
- { name: "baz", amount: 20 },
+ { name: "bar", amount: 10 },
+ { name: "baz", amount: 20 },
],
- repeated_string_value: ["a", "b", "c"],
- oneof_string: "x",
- map_value: { a: "ONE", b: 2 },
- mapped_string_value: { a: "x", b: "y" },
- mapped_nested_value: {
+ repeatedStringValue: ["a", "b", "c"],
+ oneofString: "x",
+ mapValue: { a: "ONE", b: 2 },
+ mappedStringValue: { a: "x", b: "y" },
+ mappedNestedValue: {
a: { name: "x", amount: 1 },
b: { name: "y", amount: 2 },
},
+ enumValueAnnotation: "ONE",
+ requiredStringViaFieldBehaviorAnnotation: "foo",
+ singleNested: null,
+ nested: [],
+ bytesValue: "",
+ repeatedStringValue: [],
+ mapValue: {},
+ mappedStringValue: {},
+ mappedNestedValue: {},
+ timestampValue: "2006-01-02T15:04:05Z",
+ repeatedEnumValue: [],
+ repeatedEnumAnnotation: [],
+ repeatedStringAnnotation: [],
+ repeatedNestedAnnotation: [],
+ nestedAnnotation: null,
+ int64OverrideType: "0",
+ outputOnlyStringViaFieldBehaviorAnnotation: "",
};
- beforeEach(function(done) {
- client.ABitOfEverythingService.CreateBody({
+ beforeEach(function (done) {
+ client.ABitOfEverythingService.ABitOfEverythingService_CreateBody({
body: expected,
- }).then(function(resp) {
+ }).then(function (resp) {
created = resp.obj;
- }).catch(function(err) {
+ }).catch(function (err) {
done.fail(err);
}).then(done);
});
- it('should assign id', function() {
+ it('should assign id', function () {
expect(created.uuid).not.toBe("");
});
- it('should echo the request back', function() {
+ it('should echo the request back', function () {
delete created.uuid;
expect(created).toEqual(expected);
});
});
- describe('lookup', function() {
+ describe('lookup', function () {
var created;
var expected = {
- bool_value: true,
- string_value: "strprefix/foo",
+ boolValue: true,
+ stringValue: "strprefix/foo",
};
- beforeEach(function(done) {
- client.ABitOfEverythingService.CreateBody({
+ beforeEach(function (done) {
+ client.ABitOfEverythingService.ABitOfEverythingService_CreateBody({
body: expected,
- }).then(function(resp) {
+ }).then(function (resp) {
created = resp.obj;
- }).catch(function(err) {
+ }).catch(function (err) {
fail(err);
}).finally(done);
});
- it('should look up an object by uuid', function(done) {
- client.ABitOfEverythingService.Lookup({
+ it('should look up an object by uuid', function (done) {
+ client.ABitOfEverythingService.ABitOfEverythingService_Lookup({
uuid: created.uuid
- }).then(function(resp) {
+ }).then(function (resp) {
expect(resp.obj).toEqual(created);
- }).catch(function(err) {
+ }).catch(function (err) {
fail(err.errObj);
}).finally(done);
});
- it('should fail if no such object', function(done) {
- client.ABitOfEverythingService.Lookup({
+ it('should fail if no such object', function (done) {
+ client.ABitOfEverythingService.ABitOfEverythingService_Lookup({
uuid: 'not_exist',
- }).then(function(resp) {
+ }).then(function (resp) {
fail('expected failure but succeeded');
- }).catch(function(err) {
+ }).catch(function (err) {
expect(err.status).toBe(404);
}).finally(done);
});
});
- describe('Delete', function() {
+ describe('Delete', function () {
var created;
var expected = {
- bool_value: true,
- string_value: "strprefix/foo",
+ boolValue: true,
+ stringValue: "strprefix/foo",
};
- beforeEach(function(done) {
- client.ABitOfEverythingService.CreateBody({
+ beforeEach(function (done) {
+ client.ABitOfEverythingService.ABitOfEverythingService_CreateBody({
body: expected,
- }).then(function(resp) {
+ }).then(function (resp) {
created = resp.obj;
- }).catch(function(err) {
+ }).catch(function (err) {
fail(err);
}).finally(done);
});
- it('should delete an object by id', function(done) {
- client.ABitOfEverythingService.Delete({
+ it('should delete an object by id', function (done) {
+ client.ABitOfEverythingService.ABitOfEverythingService_Delete({
uuid: created.uuid
- }).then(function(resp) {
+ }).then(function (resp) {
expect(resp.obj).toEqual({});
- }).catch(function(err) {
+ }).catch(function (err) {
fail(err.errObj);
- }).then(function() {
- return client.ABitOfEverythingService.Lookup({
+ }).then(function () {
+ return client.ABitOfEverythingService.ABitOfEverythingService_Lookup({
uuid: created.uuid
});
- }).then(function(resp) {
+ }).then(function (resp) {
fail('expected failure but succeeded');
- }). catch(function(err) {
+ }).catch(function (err) {
expect(err.status).toBe(404);
}).finally(done);
});
});
- describe('GetRepeatedQuery', function() {
+ describe('GetRepeatedQuery', function () {
var repeated;
var expected = {
- path_repeated_float_value: [1.5, -1.5],
- path_repeated_double_value: [2.5, -2.5],
- path_repeated_int64_value: ["4294967296", "-4294967296"],
- path_repeated_uint64_value: ["0", "9223372036854775807"],
- path_repeated_int32_value: [2147483647, -2147483648],
- path_repeated_fixed64_value: ["0", "9223372036854775807"],
- path_repeated_fixed32_value: [0, 4294967295],
- path_repeated_bool_value: [true, false],
- path_repeated_string_value: ["foo", "bar"],
- path_repeated_bytes_value: ["AA==", "_w=="],
- path_repeated_uint32_value: [4294967295, 0],
- path_repeated_enum_value: ["ONE", "ONE"],
- path_repeated_sfixed32_value: [-2147483648, 2147483647],
- path_repeated_sfixed64_value: ["-4294967296", "4294967296"],
- path_repeated_sint32_value: [2147483646, -2147483647],
- path_repeated_sint64_value: ["4611686018427387903", "-4611686018427387904"]
+ pathRepeatedFloatValue: [1.5, -1.5],
+ pathRepeatedDoubleValue: [2.5, -2.5],
+ pathRepeatedInt64Value: ["4294967296", "-4294967296"],
+ pathRepeatedUint64Value: ["0", "9223372036854775807"],
+ pathRepeatedInt32Value: [2147483647, -2147483648],
+ pathRepeatedFixed64Value: ["0", "9223372036854775807"],
+ pathRepeatedFixed32Value: [0, 4294967295],
+ pathRepeatedBoolValue: [true, false],
+ pathRepeatedStringValue: ["foo", "bar"],
+ pathRepeatedBytesValue: ["AA==", "_w=="],
+ pathRepeatedUint32Value: [4294967295, 0],
+ pathRepeatedEnumValue: ["ONE", "ONE"],
+ pathRepeatedSfixed32Value: [-2147483648, 2147483647],
+ pathRepeatedSfixed64Value: ["-4294967296", "4294967296"],
+ pathRepeatedSint32Value: [2147483646, -2147483647],
+ pathRepeatedSint64Value: ["4611686018427387903", "-4611686018427387904"]
};
- beforeEach(function(done) {
- client.ABitOfEverythingService.GetRepeatedQuery(expected).then(function(resp) {
+ beforeEach(function (done) {
+ client.ABitOfEverythingService.ABitOfEverythingService_GetRepeatedQuery(expected).then(function (resp) {
repeated = resp.obj;
- }).catch(function(err) {
+ }).catch(function (err) {
done.fail(err);
}).then(done);
});
- it('should echo the request back', function() {
+ it('should echo the request back', function () {
// API will echo a non URL safe encoding
- expected.path_repeated_bytes_value = ["AA==", "/w=="];
+ expected.pathRepeatedBytesValue = ["AA==", "/w=="];
expect(repeated).toEqual(expected);
});
});
});
-
diff --git a/examples/internal/browser/echo_service.spec.js b/examples/internal/browser/echo_service.spec.js
index 72aa13ca48e..01bef88b9a9 100644
--- a/examples/internal/browser/echo_service.spec.js
+++ b/examples/internal/browser/echo_service.spec.js
@@ -2,40 +2,50 @@
var SwaggerClient = require('swagger-client');
-describe('EchoService', function() {
+describe('EchoService', function () {
var client;
- beforeEach(function(done) {
+ beforeEach(function (done) {
new SwaggerClient({
url: "http://localhost:8080/openapiv2/echo_service.swagger.json",
usePromise: true,
- }).then(function(c) {
+ }).then(function (c) {
client = c;
done();
});
});
- describe('Echo', function() {
- it('should echo the request back', function(done) {
- client.EchoService.Echo(
- {id: "foo"},
- {responseContentType: "application/json"}
- ).then(function(resp) {
- expect(resp.obj).toEqual({id: "foo"});
- }).catch(function(err) {
+ describe('Echo', function () {
+ it('should echo the request back', function (done) {
+ var expected = {
+ id: "foo",
+ num: "0",
+ status: null
+ };
+ client.EchoService.EchoService_Echo(
+ expected,
+ { responseContentType: "application/json" }
+ ).then(function (resp) {
+ expect(resp.obj).toEqual(expected);
+ }).catch(function (err) {
done.fail(err);
}).then(done);
});
});
- describe('EchoBody', function() {
- it('should echo the request back', function(done) {
- client.EchoService.EchoBody(
- {body: {id: "foo"}},
- {responseContentType: "application/json"}
- ).then(function(resp) {
- expect(resp.obj).toEqual({id: "foo"});
- }).catch(function(err) {
+ describe('EchoBody', function () {
+ it('should echo the request back', function (done) {
+ var expected = {
+ id: "foo",
+ num: "0",
+ status: null
+ };
+ client.EchoService.EchoService_EchoBody(
+ { body: expected },
+ { responseContentType: "application/json" }
+ ).then(function (resp) {
+ expect(resp.obj).toEqual(expected);
+ }).catch(function (err) {
done.fail(err);
}).then(done);
});
diff --git a/examples/internal/browser/package-lock.json b/examples/internal/browser/package-lock.json
new file mode 100644
index 00000000000..bab89c9aa73
--- /dev/null
+++ b/examples/internal/browser/package-lock.json
@@ -0,0 +1,5968 @@
+{
+ "name": "grpc-gateway-example",
+ "version": "1.0.0",
+ "lockfileVersion": 1,
+ "requires": true,
+ "dependencies": {
+ "accepts": {
+ "version": "1.3.8",
+ "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
+ "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==",
+ "dev": true,
+ "requires": {
+ "mime-types": "~2.1.34",
+ "negotiator": "0.6.3"
+ }
+ },
+ "acorn": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz",
+ "integrity": "sha512-OLUyIIZ7mF5oaAUT1w0TFqQS81q3saT46x8t7ukpPjMNk+nbs4ZHhs7ToV8EWnLYLepjETXd4XaCE4uxkMeqUw==",
+ "dev": true
+ },
+ "align-text": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz",
+ "integrity": "sha512-GrTZLRpmp6wIC2ztrWW9MjjTgSKccffgFagbNDOX95/dcjEcYZibYTeaOntySQLcdw1ztBoFkviiUvTMbb9MYg==",
+ "dev": true,
+ "requires": {
+ "kind-of": "^3.0.2",
+ "longest": "^1.0.1",
+ "repeat-string": "^1.5.2"
+ },
+ "dependencies": {
+ "kind-of": {
+ "version": "3.2.2",
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+ "dev": true,
+ "requires": {
+ "is-buffer": "^1.1.5"
+ }
+ }
+ }
+ },
+ "amdefine": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz",
+ "integrity": "sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg==",
+ "dev": true
+ },
+ "ansi-colors": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz",
+ "integrity": "sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA==",
+ "requires": {
+ "ansi-wrap": "^0.1.0"
+ }
+ },
+ "ansi-escapes": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz",
+ "integrity": "sha512-wiXutNjDUlNEDWHcYH3jtZUhd3c4/VojassD8zHdHCY13xbZy2XbW+NKQwA0tWGBVzDA9qEzYwfoSsWmviidhw==",
+ "dev": true
+ },
+ "ansi-gray": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/ansi-gray/-/ansi-gray-0.1.1.tgz",
+ "integrity": "sha512-HrgGIZUl8h2EHuZaU9hTR/cU5nhKxpVE1V6kdGsQ8e4zirElJ5fvtfc8N7Q1oq1aatO275i8pUFUCpNWCAnVWw==",
+ "requires": {
+ "ansi-wrap": "0.1.0"
+ }
+ },
+ "ansi-regex": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
+ "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA=="
+ },
+ "ansi-styles": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
+ "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==",
+ "dev": true
+ },
+ "ansi-wrap": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz",
+ "integrity": "sha512-ZyznvL8k/FZeQHr2T6LzcJ/+vBApDnMNZvfVFy3At0knswWd6rJ3/0Hhmpu8oqa6C92npmozs890sX9Dl6q+Qw=="
+ },
+ "any-promise": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz",
+ "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==",
+ "dev": true
+ },
+ "anymatch": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz",
+ "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==",
+ "dev": true,
+ "requires": {
+ "micromatch": "^2.1.5",
+ "normalize-path": "^2.0.0"
+ },
+ "dependencies": {
+ "arr-diff": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz",
+ "integrity": "sha512-dtXTVMkh6VkEEA7OhXnN1Ecb8aAGFdZ1LFxtOCoqj4qkyOJMt7+qs6Ahdy6p/NQCPYsRSXXivhSB/J5E9jmYKA==",
+ "dev": true,
+ "requires": {
+ "arr-flatten": "^1.0.1"
+ }
+ },
+ "array-unique": {
+ "version": "0.2.1",
+ "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz",
+ "integrity": "sha512-G2n5bG5fSUCpnsXz4+8FUkYsGPkNfLn9YvS66U5qbTIXI2Ynnlo4Bi42bWv+omKUCqz+ejzfClwne0alJWJPhg==",
+ "dev": true
+ },
+ "braces": {
+ "version": "1.8.5",
+ "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz",
+ "integrity": "sha512-xU7bpz2ytJl1bH9cgIurjpg/n8Gohy9GTw81heDYLJQ4RU60dlyJsa+atVF2pI0yMMvKxI9HkKwjePCj5XI1hw==",
+ "dev": true,
+ "requires": {
+ "expand-range": "^1.8.1",
+ "preserve": "^0.2.0",
+ "repeat-element": "^1.1.2"
+ }
+ },
+ "expand-brackets": {
+ "version": "0.1.5",
+ "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz",
+ "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=",
+ "dev": true,
+ "requires": {
+ "is-posix-bracket": "^0.1.0"
+ }
+ },
+ "extglob": {
+ "version": "0.3.2",
+ "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz",
+ "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=",
+ "dev": true,
+ "requires": {
+ "is-extglob": "^1.0.0"
+ }
+ },
+ "is-extglob": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz",
+ "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=",
+ "dev": true
+ },
+ "is-glob": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz",
+ "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=",
+ "dev": true,
+ "requires": {
+ "is-extglob": "^1.0.0"
+ }
+ },
+ "kind-of": {
+ "version": "3.2.2",
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+ "dev": true,
+ "requires": {
+ "is-buffer": "^1.1.5"
+ }
+ },
+ "micromatch": {
+ "version": "2.3.11",
+ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz",
+ "integrity": "sha512-LnU2XFEk9xxSJ6rfgAry/ty5qwUTyHYOBU0g4R6tIw5ljwgGIBmiKhRWLw5NpMOnrgUNcDJ4WMp8rl3sYVHLNA==",
+ "dev": true,
+ "requires": {
+ "arr-diff": "^2.0.0",
+ "array-unique": "^0.2.1",
+ "braces": "^1.8.2",
+ "expand-brackets": "^0.1.4",
+ "extglob": "^0.3.1",
+ "filename-regex": "^2.0.0",
+ "is-extglob": "^1.0.0",
+ "is-glob": "^2.0.1",
+ "kind-of": "^3.0.2",
+ "normalize-path": "^2.0.1",
+ "object.omit": "^2.0.0",
+ "parse-glob": "^3.0.4",
+ "regex-cache": "^0.4.2"
+ }
+ }
+ }
+ },
+ "archy": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz",
+ "integrity": "sha512-Xg+9RwCg/0p32teKdGMPTPnVXKD0w3DfHnFTficozsAgsvq2XenPJq/MYpzzQ/v8zrOyJn6Ds39VA4JIDwFfqw=="
+ },
+ "argparse": {
+ "version": "1.0.10",
+ "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
+ "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
+ "dev": true,
+ "requires": {
+ "sprintf-js": "~1.0.2"
+ }
+ },
+ "arr-diff": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz",
+ "integrity": "sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA=="
+ },
+ "arr-flatten": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz",
+ "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg=="
+ },
+ "arr-union": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz",
+ "integrity": "sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q=="
+ },
+ "array-differ": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz",
+ "integrity": "sha512-LeZY+DZDRnvP7eMuQ6LHfCzUGxAAIViUBliK24P3hWXL6y4SortgR6Nim6xrkfSLlmH0+k+9NYNwVC2s53ZrYQ==",
+ "dev": true
+ },
+ "array-each": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz",
+ "integrity": "sha512-zHjL5SZa68hkKHBFBK6DJCTtr9sfTCPCaph/L7tMSLcTFgy+zX7E+6q5UArbtOtMBCtxdICpfTCspRse+ywyXA=="
+ },
+ "array-flatten": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
+ "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==",
+ "dev": true
+ },
+ "array-slice": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz",
+ "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w=="
+ },
+ "array-sort": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/array-sort/-/array-sort-1.0.0.tgz",
+ "integrity": "sha512-ihLeJkonmdiAsD7vpgN3CRcx2J2S0TiYW+IS/5zHBI7mKUq3ySvBdzzBfD236ubDBQFiiyG3SWCPc+msQ9KoYg==",
+ "requires": {
+ "default-compare": "^1.0.0",
+ "get-value": "^2.0.6",
+ "kind-of": "^5.0.2"
+ }
+ },
+ "array-uniq": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz",
+ "integrity": "sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q==",
+ "dev": true
+ },
+ "array-unique": {
+ "version": "0.3.2",
+ "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz",
+ "integrity": "sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ=="
+ },
+ "asn1": {
+ "version": "0.2.6",
+ "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz",
+ "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==",
+ "dev": true,
+ "requires": {
+ "safer-buffer": "~2.1.0"
+ }
+ },
+ "assert": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/assert/-/assert-1.5.0.tgz",
+ "integrity": "sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA==",
+ "dev": true,
+ "requires": {
+ "object-assign": "^4.1.1",
+ "util": "0.10.3"
+ },
+ "dependencies": {
+ "inherits": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz",
+ "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=",
+ "dev": true
+ },
+ "object-assign": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
+ "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
+ "dev": true
+ },
+ "util": {
+ "version": "0.10.3",
+ "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz",
+ "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=",
+ "dev": true,
+ "requires": {
+ "inherits": "2.0.1"
+ }
+ }
+ }
+ },
+ "assert-plus": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz",
+ "integrity": "sha512-u1L0ZLywRziOVjUhRxI0Qg9G+4RnFB9H/Rq40YWn0dieDgO7vAYeJz6jKAO6t/aruzlDFLAPkQTT87e+f8Imaw==",
+ "dev": true
+ },
+ "assign-symbols": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz",
+ "integrity": "sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw=="
+ },
+ "async": {
+ "version": "1.5.2",
+ "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz",
+ "integrity": "sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w==",
+ "dev": true
+ },
+ "async-each": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz",
+ "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==",
+ "dev": true
+ },
+ "atob": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz",
+ "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg=="
+ },
+ "aws-sign2": {
+ "version": "0.6.0",
+ "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz",
+ "integrity": "sha512-JnJpAS0p9RmixkOvW2XwDxxzs1bd4/VAGIl6Q0EC5YOo+p+hqIhtDhn/nmFnB/xUNXbLkpE2mOjgVIBRKD4xYw==",
+ "dev": true
+ },
+ "babel-polyfill": {
+ "version": "6.26.0",
+ "resolved": "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.26.0.tgz",
+ "integrity": "sha512-F2rZGQnAdaHWQ8YAoeRbukc7HS9QgdgeyJ0rQDd485v9opwuPvjpPFcOOT/WmkKTdgy9ESgSPXDcTNpzrGr6iQ==",
+ "dev": true,
+ "requires": {
+ "babel-runtime": "^6.26.0",
+ "core-js": "^2.5.0",
+ "regenerator-runtime": "^0.10.5"
+ }
+ },
+ "babel-runtime": {
+ "version": "6.26.0",
+ "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz",
+ "integrity": "sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g==",
+ "dev": true,
+ "requires": {
+ "core-js": "^2.4.0",
+ "regenerator-runtime": "^0.11.0"
+ },
+ "dependencies": {
+ "regenerator-runtime": {
+ "version": "0.11.1",
+ "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz",
+ "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==",
+ "dev": true
+ }
+ }
+ },
+ "balanced-match": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
+ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
+ "dev": true
+ },
+ "base": {
+ "version": "0.11.2",
+ "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz",
+ "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==",
+ "requires": {
+ "cache-base": "^1.0.1",
+ "class-utils": "^0.3.5",
+ "component-emitter": "^1.2.1",
+ "define-property": "^1.0.0",
+ "isobject": "^3.0.1",
+ "mixin-deep": "^1.2.0",
+ "pascalcase": "^0.1.1"
+ },
+ "dependencies": {
+ "define-property": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
+ "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
+ "requires": {
+ "is-descriptor": "^1.0.0"
+ }
+ },
+ "is-accessor-descriptor": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
+ "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
+ "requires": {
+ "kind-of": "^6.0.0"
+ }
+ },
+ "is-data-descriptor": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
+ "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
+ "requires": {
+ "kind-of": "^6.0.0"
+ }
+ },
+ "is-descriptor": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
+ "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
+ "requires": {
+ "is-accessor-descriptor": "^1.0.0",
+ "is-data-descriptor": "^1.0.0",
+ "kind-of": "^6.0.2"
+ }
+ },
+ "kind-of": {
+ "version": "6.0.3",
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
+ "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw=="
+ }
+ }
+ },
+ "base64-js": {
+ "version": "1.5.1",
+ "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
+ "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
+ "dev": true
+ },
+ "bcrypt-pbkdf": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
+ "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==",
+ "dev": true,
+ "requires": {
+ "tweetnacl": "^0.14.3"
+ }
+ },
+ "beeper": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/beeper/-/beeper-1.1.1.tgz",
+ "integrity": "sha512-3vqtKL1N45I5dV0RdssXZG7X6pCqQrWPNOlBPZPrd+QkE2HEhR57Z04m0KtpbsZH73j+a3F8UD1TQnn+ExTvIA==",
+ "dev": true
+ },
+ "big.js": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz",
+ "integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==",
+ "dev": true
+ },
+ "binary-extensions": {
+ "version": "1.13.1",
+ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz",
+ "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==",
+ "dev": true
+ },
+ "bindings": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
+ "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
+ "dev": true,
+ "optional": true,
+ "requires": {
+ "file-uri-to-path": "1.0.0"
+ }
+ },
+ "bl": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/bl/-/bl-1.0.3.tgz",
+ "integrity": "sha512-phbvN+yOk05EGoFcV/0S8N8ShnJqf6VCWRAw5he2gvRwBubFt/OzmcTNGqBt5b7Y4RK3YCgf6jrgGSR0Cwtsgw==",
+ "dev": true,
+ "requires": {
+ "readable-stream": "~2.0.5"
+ },
+ "dependencies": {
+ "process-nextick-args": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz",
+ "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=",
+ "dev": true
+ },
+ "readable-stream": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz",
+ "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=",
+ "dev": true,
+ "requires": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.1",
+ "isarray": "~1.0.0",
+ "process-nextick-args": "~1.0.6",
+ "string_decoder": "~0.10.x",
+ "util-deprecate": "~1.0.1"
+ }
+ },
+ "string_decoder": {
+ "version": "0.10.31",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
+ "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=",
+ "dev": true
+ }
+ }
+ },
+ "bluebird": {
+ "version": "2.11.0",
+ "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-2.11.0.tgz",
+ "integrity": "sha512-UfFSr22dmHPQqPP9XWHRhq+gWnHCYguQGkXQlbyPtW5qTnhFWA8/iXg765tH0cAjy7l/zPJ1aBTO0g5XgA7kvQ==",
+ "dev": true
+ },
+ "body-parser": {
+ "version": "1.20.0",
+ "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.0.tgz",
+ "integrity": "sha512-DfJ+q6EPcGKZD1QWUjSpqp+Q7bDQTsQIF4zfUAtZ6qk+H/3/QRhg9CEp39ss+/T2vw0+HaidC0ecJj/DRLIaKg==",
+ "dev": true,
+ "requires": {
+ "bytes": "3.1.2",
+ "content-type": "~1.0.4",
+ "debug": "2.6.9",
+ "depd": "2.0.0",
+ "destroy": "1.2.0",
+ "http-errors": "2.0.0",
+ "iconv-lite": "0.4.24",
+ "on-finished": "2.4.1",
+ "qs": "6.10.3",
+ "raw-body": "2.5.1",
+ "type-is": "~1.6.18",
+ "unpipe": "1.0.0"
+ },
+ "dependencies": {
+ "qs": {
+ "version": "6.10.3",
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz",
+ "integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==",
+ "dev": true,
+ "requires": {
+ "side-channel": "^1.0.4"
+ }
+ }
+ }
+ },
+ "boom": {
+ "version": "2.10.1",
+ "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz",
+ "integrity": "sha512-KbiZEa9/vofNcVJXGwdWWn25reQ3V3dHBWbS07FTF3/TOehLnm9GEhJV4T6ZvGPkShRpmUqYwnaCrkj0mRnP6Q==",
+ "dev": true,
+ "requires": {
+ "hoek": "2.x.x"
+ }
+ },
+ "bower": {
+ "version": "1.8.14",
+ "resolved": "https://registry.npmjs.org/bower/-/bower-1.8.14.tgz",
+ "integrity": "sha512-8Rq058FD91q9Nwthyhw0la9fzpBz0iwZTrt51LWl+w+PnJgZk9J+5wp3nibsJcIUPglMYXr4NRBaR+TUj0OkBQ==",
+ "dev": true
+ },
+ "bower-config": {
+ "version": "0.6.2",
+ "resolved": "https://registry.npmjs.org/bower-config/-/bower-config-0.6.2.tgz",
+ "integrity": "sha512-P9qlrsulpuklPusQ6H+44c+xBokDh6Tl5vOP6LDcebjqDitrqe/fn27uxknRMTj3LLMvqsOfjV4h+UWNCkmsfg==",
+ "dev": true,
+ "requires": {
+ "graceful-fs": "~2.0.0",
+ "mout": "~0.9.0",
+ "optimist": "~0.6.0",
+ "osenv": "0.0.3"
+ },
+ "dependencies": {
+ "graceful-fs": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-2.0.3.tgz",
+ "integrity": "sha1-fNLNsiiko/Nule+mzBQt59GhNtA=",
+ "dev": true
+ },
+ "mout": {
+ "version": "0.9.1",
+ "resolved": "https://registry.npmjs.org/mout/-/mout-0.9.1.tgz",
+ "integrity": "sha1-hPDz/WrMcxf2PeKv/cwM7gCbBHc=",
+ "dev": true
+ }
+ }
+ },
+ "bower-logger": {
+ "version": "0.2.2",
+ "resolved": "https://registry.npmjs.org/bower-logger/-/bower-logger-0.2.2.tgz",
+ "integrity": "sha512-2x4n3GsmV6w3BeMK3zHv6T88HbuMQH2MJ0KZNbQMbJq8XPARdH1p9/CXsdkOBW5sMcnBCOVGxutDJYbkh2A7QQ==",
+ "dev": true
+ },
+ "brace-expansion": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "dev": true,
+ "requires": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "braces": {
+ "version": "2.3.2",
+ "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz",
+ "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==",
+ "requires": {
+ "arr-flatten": "^1.1.0",
+ "array-unique": "^0.3.2",
+ "extend-shallow": "^2.0.1",
+ "fill-range": "^4.0.0",
+ "isobject": "^3.0.1",
+ "repeat-element": "^1.1.2",
+ "snapdragon": "^0.8.1",
+ "snapdragon-node": "^2.0.1",
+ "split-string": "^3.0.2",
+ "to-regex": "^3.0.1"
+ },
+ "dependencies": {
+ "extend-shallow": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+ "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==",
+ "requires": {
+ "is-extendable": "^0.1.0"
+ }
+ }
+ }
+ },
+ "browserify-aes": {
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-0.4.0.tgz",
+ "integrity": "sha512-hnvbMhZ/Ete34qnoKKyjikiYQfZbl89d5UZ29cz3EG13cv/8VRyM8Zs84luB/O7BRzC3qSng9dVovJ6jghcAvg==",
+ "dev": true,
+ "requires": {
+ "inherits": "^2.0.1"
+ }
+ },
+ "browserify-zlib": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.1.4.tgz",
+ "integrity": "sha512-19OEpq7vWgsH6WkvkBJQDFvJS1uPcbFOQ4v9CU839dO+ZZXUZO6XpE6hNCqvlIIj+4fZvRiJ6DsAQ382GwiyTQ==",
+ "dev": true,
+ "requires": {
+ "pako": "~0.2.0"
+ }
+ },
+ "btoa": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/btoa/-/btoa-1.2.1.tgz",
+ "integrity": "sha512-SB4/MIGlsiVkMcHmT+pSmIPoNDoHg+7cMzmt3Uxt628MTz2487DKSqK/fuhFBrkuqrYv5UCEnACpF4dTFNKc/g==",
+ "dev": true
+ },
+ "buffer": {
+ "version": "4.9.2",
+ "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz",
+ "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==",
+ "dev": true,
+ "requires": {
+ "base64-js": "^1.0.2",
+ "ieee754": "^1.1.4",
+ "isarray": "^1.0.0"
+ }
+ },
+ "buffer-from": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
+ "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ=="
+ },
+ "builtin-status-codes": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz",
+ "integrity": "sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ==",
+ "dev": true
+ },
+ "bytes": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
+ "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
+ "dev": true
+ },
+ "cache-base": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz",
+ "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==",
+ "requires": {
+ "collection-visit": "^1.0.0",
+ "component-emitter": "^1.2.1",
+ "get-value": "^2.0.6",
+ "has-value": "^1.0.0",
+ "isobject": "^3.0.1",
+ "set-value": "^2.0.0",
+ "to-object-path": "^0.3.0",
+ "union-value": "^1.0.0",
+ "unset-value": "^1.0.0"
+ }
+ },
+ "call-bind": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
+ "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
+ "requires": {
+ "function-bind": "^1.1.1",
+ "get-intrinsic": "^1.0.2"
+ }
+ },
+ "camelcase": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz",
+ "integrity": "sha512-4nhGqUkc4BqbBBB4Q6zLuD7lzzrHYrjKGeYaEji/3tFR5VdJu9v+LilhGIVe8wxEJPPOeWo7eg8dwY13TZ1BNg=="
+ },
+ "caseless": {
+ "version": "0.11.0",
+ "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz",
+ "integrity": "sha512-ODLXH644w9C2fMPAm7bMDQ3GRvipZWZfKc+8As6hIadRIelE0n0xZuN38NS6kiK3KPEVrpymmQD8bvncAHWQkQ==",
+ "dev": true
+ },
+ "center-align": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz",
+ "integrity": "sha512-Baz3aNe2gd2LP2qk5U+sDk/m4oSuwSDcBfayTCTBoWpfIGO5XFxPmjILQII4NGiZjD6DoDI6kf7gKaxkf7s3VQ==",
+ "dev": true,
+ "requires": {
+ "align-text": "^0.1.3",
+ "lazy-cache": "^1.0.3"
+ }
+ },
+ "chalk": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
+ "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^2.2.1",
+ "escape-string-regexp": "^1.0.2",
+ "has-ansi": "^2.0.0",
+ "strip-ansi": "^3.0.0",
+ "supports-color": "^2.0.0"
+ }
+ },
+ "chokidar": {
+ "version": "1.7.0",
+ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz",
+ "integrity": "sha512-mk8fAWcRUOxY7btlLtitj3A45jOwSAxH4tOFOoEGbVsl6cL6pPMWUy7dwZ/canfj3QEdP6FHSnf/l1c6/WkzVg==",
+ "dev": true,
+ "requires": {
+ "anymatch": "^1.3.0",
+ "async-each": "^1.0.0",
+ "fsevents": "^1.0.0",
+ "glob-parent": "^2.0.0",
+ "inherits": "^2.0.1",
+ "is-binary-path": "^1.0.0",
+ "is-glob": "^2.0.0",
+ "path-is-absolute": "^1.0.0",
+ "readdirp": "^2.0.0"
+ },
+ "dependencies": {
+ "is-extglob": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz",
+ "integrity": "sha512-7Q+VbVafe6x2T+Tu6NcOf6sRklazEPmBoB3IWk3WdGZM2iGUwU/Oe3Wtq5lSEkDTTlpp8yx+5t4pzO/i9Ty1ww==",
+ "dev": true
+ },
+ "is-glob": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz",
+ "integrity": "sha512-a1dBeB19NXsf/E0+FHqkagizel/LQw2DjSQpvQrj3zT+jYPpaUCryPnrQajXKFLCMuf4I6FhRpaGtw4lPrG6Eg==",
+ "dev": true,
+ "requires": {
+ "is-extglob": "^1.0.0"
+ }
+ }
+ }
+ },
+ "class-utils": {
+ "version": "0.3.6",
+ "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz",
+ "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==",
+ "requires": {
+ "arr-union": "^3.1.0",
+ "define-property": "^0.2.5",
+ "isobject": "^3.0.0",
+ "static-extend": "^0.1.1"
+ },
+ "dependencies": {
+ "define-property": {
+ "version": "0.2.5",
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
+ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
+ "requires": {
+ "is-descriptor": "^0.1.0"
+ }
+ }
+ }
+ },
+ "cli-cursor": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz",
+ "integrity": "sha512-25tABq090YNKkF6JH7lcwO0zFJTRke4Jcq9iX2nr/Sz0Cjjv4gckmwlW6Ty/aoyFd6z3ysR2hMGC2GFugmBo6A==",
+ "dev": true,
+ "requires": {
+ "restore-cursor": "^1.0.1"
+ }
+ },
+ "cli-width": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-1.1.1.tgz",
+ "integrity": "sha512-eMU2akIeEIkCxGXUNmDnJq1KzOIiPnJ+rKqRe6hcxE3vIOPvpMrBYOn/Bl7zNlYJj/zQxXquAnozHUCf9Whnsg==",
+ "dev": true
+ },
+ "cliui": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz",
+ "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=",
+ "requires": {
+ "string-width": "^1.0.1",
+ "strip-ansi": "^3.0.1",
+ "wrap-ansi": "^2.0.0"
+ }
+ },
+ "clone": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz",
+ "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=",
+ "dev": true
+ },
+ "clone-stats": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz",
+ "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=",
+ "dev": true
+ },
+ "code-point-at": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
+ "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c="
+ },
+ "collection-visit": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz",
+ "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=",
+ "requires": {
+ "map-visit": "^1.0.0",
+ "object-visit": "^1.0.0"
+ }
+ },
+ "color-support": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz",
+ "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg=="
+ },
+ "combined-stream": {
+ "version": "1.0.8",
+ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
+ "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
+ "dev": true,
+ "requires": {
+ "delayed-stream": "~1.0.0"
+ }
+ },
+ "commander": {
+ "version": "2.20.3",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
+ "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
+ "dev": true
+ },
+ "component-emitter": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz",
+ "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg=="
+ },
+ "concat-map": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
+ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
+ "dev": true
+ },
+ "concat-stream": {
+ "version": "1.6.2",
+ "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz",
+ "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==",
+ "requires": {
+ "buffer-from": "^1.0.0",
+ "inherits": "^2.0.3",
+ "readable-stream": "^2.2.2",
+ "typedarray": "^0.0.6"
+ }
+ },
+ "configstore": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/configstore/-/configstore-4.0.0.tgz",
+ "integrity": "sha512-CmquAXFBocrzaSM8mtGPMM/HiWmyIpr4CcJl/rgY2uCObZ/S7cKU0silxslqJejl+t/T9HS8E0PUNQD81JGUEQ==",
+ "dev": true,
+ "requires": {
+ "dot-prop": "^4.1.0",
+ "graceful-fs": "^4.1.2",
+ "make-dir": "^1.0.0",
+ "unique-string": "^1.0.0",
+ "write-file-atomic": "^2.0.0",
+ "xdg-basedir": "^3.0.0"
+ }
+ },
+ "console-browserify": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz",
+ "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==",
+ "dev": true
+ },
+ "constants-browserify": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz",
+ "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=",
+ "dev": true
+ },
+ "content-disposition": {
+ "version": "0.5.4",
+ "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
+ "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==",
+ "dev": true,
+ "requires": {
+ "safe-buffer": "5.2.1"
+ },
+ "dependencies": {
+ "safe-buffer": {
+ "version": "5.2.1",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
+ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
+ "dev": true
+ }
+ }
+ },
+ "content-type": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",
+ "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==",
+ "dev": true
+ },
+ "cookie": {
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz",
+ "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==",
+ "dev": true
+ },
+ "cookie-signature": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
+ "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=",
+ "dev": true
+ },
+ "cookiejar": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.3.tgz",
+ "integrity": "sha512-JxbCBUdrfr6AQjOXrxoTvAMJO4HBTUIlBzslcJPAz+/KT8yk53fXun51u+RenNYvad/+Vc2DIz5o9UxlCDymFQ==",
+ "dev": true
+ },
+ "copy-descriptor": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz",
+ "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40="
+ },
+ "copy-props": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/copy-props/-/copy-props-2.0.5.tgz",
+ "integrity": "sha512-XBlx8HSqrT0ObQwmSzM7WE5k8FxTV75h1DX1Z3n6NhQ/UYYAvInWYmG06vFt7hQZArE2fuO62aihiWIVQwh1sw==",
+ "requires": {
+ "each-props": "^1.3.2",
+ "is-plain-object": "^5.0.0"
+ }
+ },
+ "core-js": {
+ "version": "2.6.12",
+ "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz",
+ "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==",
+ "dev": true
+ },
+ "core-util-is": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
+ "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ=="
+ },
+ "cryptiles": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz",
+ "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=",
+ "dev": true,
+ "requires": {
+ "boom": "2.x.x"
+ }
+ },
+ "crypto-browserify": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.3.0.tgz",
+ "integrity": "sha1-ufx1u0oO1h3PHNXa6W6zDJw+UGw=",
+ "dev": true,
+ "requires": {
+ "browserify-aes": "0.4.0",
+ "pbkdf2-compat": "2.0.1",
+ "ripemd160": "0.2.0",
+ "sha.js": "2.2.6"
+ }
+ },
+ "crypto-random-string": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz",
+ "integrity": "sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4=",
+ "dev": true
+ },
+ "d": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz",
+ "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==",
+ "requires": {
+ "es5-ext": "^0.10.50",
+ "type": "^1.0.1"
+ }
+ },
+ "dashdash": {
+ "version": "1.14.1",
+ "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
+ "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
+ "dev": true,
+ "requires": {
+ "assert-plus": "^1.0.0"
+ },
+ "dependencies": {
+ "assert-plus": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
+ "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==",
+ "dev": true
+ }
+ }
+ },
+ "dateformat": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-2.2.0.tgz",
+ "integrity": "sha1-QGXiATz5+5Ft39gu+1Bq1MZ2kGI=",
+ "dev": true
+ },
+ "debug": {
+ "version": "2.6.9",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "requires": {
+ "ms": "2.0.0"
+ }
+ },
+ "decamelize": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
+ "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA="
+ },
+ "decode-uri-component": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz",
+ "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU="
+ },
+ "default-compare": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/default-compare/-/default-compare-1.0.0.tgz",
+ "integrity": "sha512-QWfXlM0EkAbqOCbD/6HjdwT19j7WCkMyiRhWilc4H9/5h/RzTF9gv5LYh1+CmDV5d1rki6KAWLtQale0xt20eQ==",
+ "requires": {
+ "kind-of": "^5.0.2"
+ }
+ },
+ "defaults": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz",
+ "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=",
+ "dev": true,
+ "requires": {
+ "clone": "^1.0.2"
+ }
+ },
+ "define-properties": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz",
+ "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==",
+ "requires": {
+ "has-property-descriptors": "^1.0.0",
+ "object-keys": "^1.1.1"
+ }
+ },
+ "define-property": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz",
+ "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==",
+ "requires": {
+ "is-descriptor": "^1.0.2",
+ "isobject": "^3.0.1"
+ },
+ "dependencies": {
+ "is-accessor-descriptor": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
+ "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
+ "requires": {
+ "kind-of": "^6.0.0"
+ }
+ },
+ "is-data-descriptor": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
+ "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
+ "requires": {
+ "kind-of": "^6.0.0"
+ }
+ },
+ "is-descriptor": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
+ "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
+ "requires": {
+ "is-accessor-descriptor": "^1.0.0",
+ "is-data-descriptor": "^1.0.0",
+ "kind-of": "^6.0.2"
+ }
+ },
+ "kind-of": {
+ "version": "6.0.3",
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
+ "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw=="
+ }
+ }
+ },
+ "delayed-stream": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
+ "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
+ "dev": true
+ },
+ "depd": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
+ "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
+ "dev": true
+ },
+ "deprecated": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/deprecated/-/deprecated-0.0.1.tgz",
+ "integrity": "sha1-+cmvVGSvoeepcUWKi97yqpTVuxk=",
+ "dev": true
+ },
+ "destroy": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz",
+ "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==",
+ "dev": true
+ },
+ "detect-file": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz",
+ "integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc="
+ },
+ "domain-browser": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz",
+ "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==",
+ "dev": true
+ },
+ "dot-prop": {
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.1.tgz",
+ "integrity": "sha512-l0p4+mIuJIua0mhxGoh4a+iNL9bmeK5DvnSVQa6T0OhrVmaEa1XScX5Etc673FePCJOArq/4Pa2cLGODUWTPOQ==",
+ "dev": true,
+ "requires": {
+ "is-obj": "^1.0.0"
+ }
+ },
+ "duplexer": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz",
+ "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==",
+ "dev": true
+ },
+ "duplexer2": {
+ "version": "0.0.2",
+ "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz",
+ "integrity": "sha1-xhTc9n4vsUmVqRcR5aYX6KYKMds=",
+ "dev": true,
+ "requires": {
+ "readable-stream": "~1.1.9"
+ },
+ "dependencies": {
+ "isarray": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
+ "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=",
+ "dev": true
+ },
+ "readable-stream": {
+ "version": "1.1.14",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
+ "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
+ "dev": true,
+ "requires": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.1",
+ "isarray": "0.0.1",
+ "string_decoder": "~0.10.x"
+ }
+ },
+ "string_decoder": {
+ "version": "0.10.31",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
+ "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=",
+ "dev": true
+ }
+ }
+ },
+ "each-props": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/each-props/-/each-props-1.3.2.tgz",
+ "integrity": "sha512-vV0Hem3zAGkJAyU7JSjixeU66rwdynTAa1vofCrSA5fEln+m67Az9CcnkVD776/fsN/UjIWmBDoNRS6t6G9RfA==",
+ "requires": {
+ "is-plain-object": "^2.0.1",
+ "object.defaults": "^1.1.0"
+ },
+ "dependencies": {
+ "is-plain-object": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
+ "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
+ "requires": {
+ "isobject": "^3.0.1"
+ }
+ }
+ }
+ },
+ "ecc-jsbn": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz",
+ "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=",
+ "dev": true,
+ "requires": {
+ "jsbn": "~0.1.0",
+ "safer-buffer": "^2.1.0"
+ }
+ },
+ "ee-first": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
+ "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=",
+ "dev": true
+ },
+ "emojis-list": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz",
+ "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=",
+ "dev": true
+ },
+ "encodeurl": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
+ "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=",
+ "dev": true
+ },
+ "end-of-stream": {
+ "version": "0.1.5",
+ "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-0.1.5.tgz",
+ "integrity": "sha1-jhdyBsPICDfYVjLouTWd/osvbq8=",
+ "dev": true,
+ "requires": {
+ "once": "~1.3.0"
+ }
+ },
+ "enhanced-resolve": {
+ "version": "0.9.1",
+ "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-0.9.1.tgz",
+ "integrity": "sha1-TW5omzcl+GCQknzMhs2fFjW4ni4=",
+ "dev": true,
+ "requires": {
+ "graceful-fs": "^4.1.2",
+ "memory-fs": "^0.2.0",
+ "tapable": "^0.1.8"
+ },
+ "dependencies": {
+ "memory-fs": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.2.0.tgz",
+ "integrity": "sha1-8rslNovBIeORwlIN6Slpyu4KApA=",
+ "dev": true
+ }
+ }
+ },
+ "errno": {
+ "version": "0.1.8",
+ "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz",
+ "integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==",
+ "dev": true,
+ "requires": {
+ "prr": "~1.0.1"
+ }
+ },
+ "error-ex": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
+ "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==",
+ "requires": {
+ "is-arrayish": "^0.2.1"
+ }
+ },
+ "es5-ext": {
+ "version": "0.10.61",
+ "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.61.tgz",
+ "integrity": "sha512-yFhIqQAzu2Ca2I4SE2Au3rxVfmohU9Y7wqGR+s7+H7krk26NXhIRAZDgqd6xqjCEFUomDEA3/Bo/7fKmIkW1kA==",
+ "requires": {
+ "es6-iterator": "^2.0.3",
+ "es6-symbol": "^3.1.3",
+ "next-tick": "^1.1.0"
+ }
+ },
+ "es6-iterator": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz",
+ "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=",
+ "requires": {
+ "d": "1",
+ "es5-ext": "^0.10.35",
+ "es6-symbol": "^3.1.1"
+ }
+ },
+ "es6-symbol": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz",
+ "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==",
+ "requires": {
+ "d": "^1.0.1",
+ "ext": "^1.1.2"
+ }
+ },
+ "escape-html": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
+ "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=",
+ "dev": true
+ },
+ "escape-string-regexp": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
+ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
+ "dev": true
+ },
+ "esprima": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
+ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
+ "dev": true
+ },
+ "etag": {
+ "version": "1.8.1",
+ "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
+ "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=",
+ "dev": true
+ },
+ "events": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz",
+ "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=",
+ "dev": true
+ },
+ "exit": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz",
+ "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=",
+ "dev": true
+ },
+ "exit-hook": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-1.1.1.tgz",
+ "integrity": "sha1-8FyiM7SMBdVP/wd2XfhQfpXAL/g=",
+ "dev": true
+ },
+ "expand-brackets": {
+ "version": "2.1.4",
+ "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz",
+ "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=",
+ "requires": {
+ "debug": "^2.3.3",
+ "define-property": "^0.2.5",
+ "extend-shallow": "^2.0.1",
+ "posix-character-classes": "^0.1.0",
+ "regex-not": "^1.0.0",
+ "snapdragon": "^0.8.1",
+ "to-regex": "^3.0.1"
+ },
+ "dependencies": {
+ "define-property": {
+ "version": "0.2.5",
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
+ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
+ "requires": {
+ "is-descriptor": "^0.1.0"
+ }
+ },
+ "extend-shallow": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+ "requires": {
+ "is-extendable": "^0.1.0"
+ }
+ }
+ }
+ },
+ "expand-range": {
+ "version": "1.8.2",
+ "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz",
+ "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=",
+ "dev": true,
+ "requires": {
+ "fill-range": "^2.1.0"
+ },
+ "dependencies": {
+ "fill-range": {
+ "version": "2.2.4",
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz",
+ "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==",
+ "dev": true,
+ "requires": {
+ "is-number": "^2.1.0",
+ "isobject": "^2.0.0",
+ "randomatic": "^3.0.0",
+ "repeat-element": "^1.1.2",
+ "repeat-string": "^1.5.2"
+ }
+ },
+ "is-number": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz",
+ "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=",
+ "dev": true,
+ "requires": {
+ "kind-of": "^3.0.2"
+ }
+ },
+ "isobject": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz",
+ "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=",
+ "dev": true,
+ "requires": {
+ "isarray": "1.0.0"
+ }
+ },
+ "kind-of": {
+ "version": "3.2.2",
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+ "dev": true,
+ "requires": {
+ "is-buffer": "^1.1.5"
+ }
+ }
+ }
+ },
+ "expand-tilde": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz",
+ "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=",
+ "requires": {
+ "homedir-polyfill": "^1.0.1"
+ }
+ },
+ "express": {
+ "version": "4.18.1",
+ "resolved": "https://registry.npmjs.org/express/-/express-4.18.1.tgz",
+ "integrity": "sha512-zZBcOX9TfehHQhtupq57OF8lFZ3UZi08Y97dwFCkD8p9d/d2Y3M+ykKcwaMDEL+4qyUolgBDX6AblpR3fL212Q==",
+ "dev": true,
+ "requires": {
+ "accepts": "~1.3.8",
+ "array-flatten": "1.1.1",
+ "body-parser": "1.20.0",
+ "content-disposition": "0.5.4",
+ "content-type": "~1.0.4",
+ "cookie": "0.5.0",
+ "cookie-signature": "1.0.6",
+ "debug": "2.6.9",
+ "depd": "2.0.0",
+ "encodeurl": "~1.0.2",
+ "escape-html": "~1.0.3",
+ "etag": "~1.8.1",
+ "finalhandler": "1.2.0",
+ "fresh": "0.5.2",
+ "http-errors": "2.0.0",
+ "merge-descriptors": "1.0.1",
+ "methods": "~1.1.2",
+ "on-finished": "2.4.1",
+ "parseurl": "~1.3.3",
+ "path-to-regexp": "0.1.7",
+ "proxy-addr": "~2.0.7",
+ "qs": "6.10.3",
+ "range-parser": "~1.2.1",
+ "safe-buffer": "5.2.1",
+ "send": "0.18.0",
+ "serve-static": "1.15.0",
+ "setprototypeof": "1.2.0",
+ "statuses": "2.0.1",
+ "type-is": "~1.6.18",
+ "utils-merge": "1.0.1",
+ "vary": "~1.1.2"
+ },
+ "dependencies": {
+ "qs": {
+ "version": "6.10.3",
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz",
+ "integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==",
+ "dev": true,
+ "requires": {
+ "side-channel": "^1.0.4"
+ }
+ },
+ "safe-buffer": {
+ "version": "5.2.1",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
+ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
+ "dev": true
+ }
+ }
+ },
+ "ext": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/ext/-/ext-1.6.0.tgz",
+ "integrity": "sha512-sdBImtzkq2HpkdRLtlLWDa6w4DX22ijZLKx8BMPUuKe1c5lbN6xwQDQCxSfxBQnHZ13ls/FH0MQZx/q/gr6FQg==",
+ "requires": {
+ "type": "^2.5.0"
+ },
+ "dependencies": {
+ "type": {
+ "version": "2.6.0",
+ "resolved": "https://registry.npmjs.org/type/-/type-2.6.0.tgz",
+ "integrity": "sha512-eiDBDOmkih5pMbo9OqsqPRGMljLodLcwd5XD5JbtNB0o89xZAwynY9EdCDsJU7LtcVCClu9DvM7/0Ep1hYX3EQ=="
+ }
+ }
+ },
+ "extend": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
+ "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g=="
+ },
+ "extend-shallow": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz",
+ "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=",
+ "requires": {
+ "assign-symbols": "^1.0.0",
+ "is-extendable": "^1.0.1"
+ },
+ "dependencies": {
+ "is-extendable": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
+ "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
+ "requires": {
+ "is-plain-object": "^2.0.4"
+ }
+ },
+ "is-plain-object": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
+ "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
+ "requires": {
+ "isobject": "^3.0.1"
+ }
+ }
+ }
+ },
+ "extglob": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz",
+ "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==",
+ "requires": {
+ "array-unique": "^0.3.2",
+ "define-property": "^1.0.0",
+ "expand-brackets": "^2.1.4",
+ "extend-shallow": "^2.0.1",
+ "fragment-cache": "^0.2.1",
+ "regex-not": "^1.0.0",
+ "snapdragon": "^0.8.1",
+ "to-regex": "^3.0.1"
+ },
+ "dependencies": {
+ "define-property": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
+ "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
+ "requires": {
+ "is-descriptor": "^1.0.0"
+ }
+ },
+ "extend-shallow": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+ "requires": {
+ "is-extendable": "^0.1.0"
+ }
+ },
+ "is-accessor-descriptor": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
+ "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
+ "requires": {
+ "kind-of": "^6.0.0"
+ }
+ },
+ "is-data-descriptor": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
+ "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
+ "requires": {
+ "kind-of": "^6.0.0"
+ }
+ },
+ "is-descriptor": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
+ "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
+ "requires": {
+ "is-accessor-descriptor": "^1.0.0",
+ "is-data-descriptor": "^1.0.0",
+ "kind-of": "^6.0.2"
+ }
+ },
+ "kind-of": {
+ "version": "6.0.3",
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
+ "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw=="
+ }
+ }
+ },
+ "extract-zip": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.5.0.tgz",
+ "integrity": "sha1-ksz22B73Cp+kwXRxFMzvbYaIpsQ=",
+ "dev": true,
+ "requires": {
+ "concat-stream": "1.5.0",
+ "debug": "0.7.4",
+ "mkdirp": "0.5.0",
+ "yauzl": "2.4.1"
+ },
+ "dependencies": {
+ "concat-stream": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.0.tgz",
+ "integrity": "sha1-U/fUPFHF5D+ByP3QMyHGMb5o1hE=",
+ "dev": true,
+ "requires": {
+ "inherits": "~2.0.1",
+ "readable-stream": "~2.0.0",
+ "typedarray": "~0.0.5"
+ }
+ },
+ "debug": {
+ "version": "0.7.4",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-0.7.4.tgz",
+ "integrity": "sha1-BuHqgILCyxTjmAbiLi9vdX+Srzk=",
+ "dev": true
+ },
+ "minimist": {
+ "version": "0.0.8",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
+ "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
+ "dev": true
+ },
+ "mkdirp": {
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.0.tgz",
+ "integrity": "sha1-HXMHam35hs2TROFecfzAWkyavxI=",
+ "dev": true,
+ "requires": {
+ "minimist": "0.0.8"
+ }
+ },
+ "process-nextick-args": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz",
+ "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=",
+ "dev": true
+ },
+ "readable-stream": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz",
+ "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=",
+ "dev": true,
+ "requires": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.1",
+ "isarray": "~1.0.0",
+ "process-nextick-args": "~1.0.6",
+ "string_decoder": "~0.10.x",
+ "util-deprecate": "~1.0.1"
+ }
+ },
+ "string_decoder": {
+ "version": "0.10.31",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
+ "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=",
+ "dev": true
+ }
+ }
+ },
+ "extsprintf": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
+ "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=",
+ "dev": true
+ },
+ "fancy-log": {
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.3.tgz",
+ "integrity": "sha512-k9oEhlyc0FrVh25qYuSELjr8oxsCoc4/LEZfg2iJJrfEk/tZL9bCoJE47gqAvI2m/AUjluCS4+3I0eTx8n3AEw==",
+ "requires": {
+ "ansi-gray": "^0.1.1",
+ "color-support": "^1.1.3",
+ "parse-node-version": "^1.0.0",
+ "time-stamp": "^1.0.0"
+ }
+ },
+ "fd-slicer": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.0.1.tgz",
+ "integrity": "sha1-i1vL2ewyfFBBv5qwI/1nUPEXfmU=",
+ "dev": true,
+ "requires": {
+ "pend": "~1.2.0"
+ }
+ },
+ "figures": {
+ "version": "1.7.0",
+ "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz",
+ "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=",
+ "dev": true,
+ "requires": {
+ "escape-string-regexp": "^1.0.5",
+ "object-assign": "^4.1.0"
+ },
+ "dependencies": {
+ "object-assign": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
+ "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
+ "dev": true
+ }
+ }
+ },
+ "file-uri-to-path": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
+ "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
+ "dev": true,
+ "optional": true
+ },
+ "filename-regex": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz",
+ "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=",
+ "dev": true
+ },
+ "fill-range": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
+ "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=",
+ "requires": {
+ "extend-shallow": "^2.0.1",
+ "is-number": "^3.0.0",
+ "repeat-string": "^1.6.1",
+ "to-regex-range": "^2.1.0"
+ },
+ "dependencies": {
+ "extend-shallow": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+ "requires": {
+ "is-extendable": "^0.1.0"
+ }
+ }
+ }
+ },
+ "finalhandler": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz",
+ "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==",
+ "dev": true,
+ "requires": {
+ "debug": "2.6.9",
+ "encodeurl": "~1.0.2",
+ "escape-html": "~1.0.3",
+ "on-finished": "2.4.1",
+ "parseurl": "~1.3.3",
+ "statuses": "2.0.1",
+ "unpipe": "~1.0.0"
+ }
+ },
+ "find-index": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/find-index/-/find-index-0.1.1.tgz",
+ "integrity": "sha1-Z101iyyjiS15Whq0cjL4tuLg3eQ=",
+ "dev": true
+ },
+ "find-up": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz",
+ "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=",
+ "requires": {
+ "path-exists": "^2.0.0",
+ "pinkie-promise": "^2.0.0"
+ }
+ },
+ "findup-sync": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-3.0.0.tgz",
+ "integrity": "sha512-YbffarhcicEhOrm4CtrwdKBdCuz576RLdhJDsIfvNtxUuhdRet1qZcsMjqbePtAseKdAnDyM/IyXbu7PRPRLYg==",
+ "requires": {
+ "detect-file": "^1.0.0",
+ "is-glob": "^4.0.0",
+ "micromatch": "^3.0.4",
+ "resolve-dir": "^1.0.1"
+ }
+ },
+ "fined": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/fined/-/fined-1.2.0.tgz",
+ "integrity": "sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng==",
+ "requires": {
+ "expand-tilde": "^2.0.2",
+ "is-plain-object": "^2.0.3",
+ "object.defaults": "^1.1.0",
+ "object.pick": "^1.2.0",
+ "parse-filepath": "^1.0.1"
+ },
+ "dependencies": {
+ "is-plain-object": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
+ "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
+ "requires": {
+ "isobject": "^3.0.1"
+ }
+ }
+ }
+ },
+ "first-chunk-stream": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz",
+ "integrity": "sha1-Wb+1DNkF9g18OUzT2ayqtOatk04=",
+ "dev": true
+ },
+ "flagged-respawn": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz",
+ "integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q=="
+ },
+ "flat-map": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/flat-map/-/flat-map-0.1.0.tgz",
+ "integrity": "sha1-Qw7NcEDGbuhAAYgsdZMhPLhVLAQ=",
+ "dev": true,
+ "requires": {
+ "babel-runtime": "^6.11.6",
+ "is-stream": "^1.1.0",
+ "through": "^2.3.8"
+ }
+ },
+ "for-in": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz",
+ "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA="
+ },
+ "for-own": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz",
+ "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=",
+ "requires": {
+ "for-in": "^1.0.1"
+ }
+ },
+ "foreachasync": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/foreachasync/-/foreachasync-3.0.0.tgz",
+ "integrity": "sha1-VQKYfchxS+M5IJfzLgBxyd7gfPY=",
+ "dev": true
+ },
+ "forever-agent": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
+ "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=",
+ "dev": true
+ },
+ "form-data": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/form-data/-/form-data-1.0.1.tgz",
+ "integrity": "sha1-rjFduaSQf6BlUCMEpm13M0de43w=",
+ "dev": true,
+ "requires": {
+ "async": "^2.0.1",
+ "combined-stream": "^1.0.5",
+ "mime-types": "^2.1.11"
+ },
+ "dependencies": {
+ "async": {
+ "version": "2.6.4",
+ "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz",
+ "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==",
+ "dev": true,
+ "requires": {
+ "lodash": "^4.17.14"
+ }
+ },
+ "lodash": {
+ "version": "4.17.21",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
+ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
+ "dev": true
+ }
+ }
+ },
+ "formidable": {
+ "version": "1.2.6",
+ "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.2.6.tgz",
+ "integrity": "sha512-KcpbcpuLNOwrEjnbpMC0gS+X8ciDoZE1kkqzat4a8vrprf+s9pKNQ/QIwWfbfs4ltgmFl3MD177SNTkve3BwGQ==",
+ "dev": true
+ },
+ "forwarded": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
+ "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
+ "dev": true
+ },
+ "fragment-cache": {
+ "version": "0.2.1",
+ "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz",
+ "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=",
+ "requires": {
+ "map-cache": "^0.2.2"
+ }
+ },
+ "fresh": {
+ "version": "0.5.2",
+ "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
+ "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=",
+ "dev": true
+ },
+ "fs-extra": {
+ "version": "0.26.7",
+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.26.7.tgz",
+ "integrity": "sha1-muH92UiXeY7at20JGM9C0MMYT6k=",
+ "dev": true,
+ "requires": {
+ "graceful-fs": "^4.1.2",
+ "jsonfile": "^2.1.0",
+ "klaw": "^1.0.0",
+ "path-is-absolute": "^1.0.0",
+ "rimraf": "^2.2.8"
+ }
+ },
+ "fs.realpath": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
+ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
+ "dev": true
+ },
+ "fsevents": {
+ "version": "1.2.13",
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz",
+ "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
+ "dev": true,
+ "optional": true,
+ "requires": {
+ "bindings": "^1.5.0",
+ "nan": "^2.12.1"
+ }
+ },
+ "function-bind": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
+ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
+ },
+ "gaze": {
+ "version": "0.5.2",
+ "resolved": "https://registry.npmjs.org/gaze/-/gaze-0.5.2.tgz",
+ "integrity": "sha1-QLcJU30k0dRXZ9takIaJ3+aaxE8=",
+ "dev": true,
+ "requires": {
+ "globule": "~0.1.0"
+ }
+ },
+ "generate-function": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz",
+ "integrity": "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==",
+ "dev": true,
+ "requires": {
+ "is-property": "^1.0.2"
+ }
+ },
+ "generate-object-property": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz",
+ "integrity": "sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA=",
+ "dev": true,
+ "requires": {
+ "is-property": "^1.0.0"
+ }
+ },
+ "get-caller-file": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz",
+ "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w=="
+ },
+ "get-intrinsic": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz",
+ "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==",
+ "requires": {
+ "function-bind": "^1.1.1",
+ "has": "^1.0.3",
+ "has-symbols": "^1.0.1"
+ }
+ },
+ "get-value": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz",
+ "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg="
+ },
+ "getpass": {
+ "version": "0.1.7",
+ "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",
+ "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",
+ "dev": true,
+ "requires": {
+ "assert-plus": "^1.0.0"
+ },
+ "dependencies": {
+ "assert-plus": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
+ "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==",
+ "dev": true
+ }
+ }
+ },
+ "glob": {
+ "version": "4.5.3",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-4.5.3.tgz",
+ "integrity": "sha1-xstz0yJsHv7wTePFbQEvAzd+4V8=",
+ "dev": true,
+ "requires": {
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^2.0.1",
+ "once": "^1.3.0"
+ }
+ },
+ "glob-base": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz",
+ "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=",
+ "dev": true,
+ "requires": {
+ "glob-parent": "^2.0.0",
+ "is-glob": "^2.0.0"
+ },
+ "dependencies": {
+ "is-extglob": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz",
+ "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=",
+ "dev": true
+ },
+ "is-glob": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz",
+ "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=",
+ "dev": true,
+ "requires": {
+ "is-extglob": "^1.0.0"
+ }
+ }
+ }
+ },
+ "glob-parent": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz",
+ "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=",
+ "dev": true,
+ "requires": {
+ "is-glob": "^2.0.0"
+ },
+ "dependencies": {
+ "is-extglob": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz",
+ "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=",
+ "dev": true
+ },
+ "is-glob": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz",
+ "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=",
+ "dev": true,
+ "requires": {
+ "is-extglob": "^1.0.0"
+ }
+ }
+ }
+ },
+ "glob-stream": {
+ "version": "3.1.18",
+ "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-3.1.18.tgz",
+ "integrity": "sha1-kXCl8St5Awb9/lmPMT+PeVT9FDs=",
+ "dev": true,
+ "requires": {
+ "glob": "^4.3.1",
+ "glob2base": "^0.0.12",
+ "minimatch": "^2.0.1",
+ "ordered-read-streams": "^0.1.0",
+ "through2": "^0.6.1",
+ "unique-stream": "^1.0.0"
+ },
+ "dependencies": {
+ "isarray": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
+ "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=",
+ "dev": true
+ },
+ "readable-stream": {
+ "version": "1.0.34",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
+ "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=",
+ "dev": true,
+ "requires": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.1",
+ "isarray": "0.0.1",
+ "string_decoder": "~0.10.x"
+ }
+ },
+ "string_decoder": {
+ "version": "0.10.31",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
+ "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=",
+ "dev": true
+ },
+ "through2": {
+ "version": "0.6.5",
+ "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz",
+ "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=",
+ "dev": true,
+ "requires": {
+ "readable-stream": ">=1.0.33-1 <1.1.0-0",
+ "xtend": ">=4.0.0 <4.1.0-0"
+ }
+ }
+ }
+ },
+ "glob-watcher": {
+ "version": "0.0.6",
+ "resolved": "https://registry.npmjs.org/glob-watcher/-/glob-watcher-0.0.6.tgz",
+ "integrity": "sha1-uVtKjfdLOcgymLDAXJeLTZo7cQs=",
+ "dev": true,
+ "requires": {
+ "gaze": "^0.5.1"
+ }
+ },
+ "glob2base": {
+ "version": "0.0.12",
+ "resolved": "https://registry.npmjs.org/glob2base/-/glob2base-0.0.12.tgz",
+ "integrity": "sha1-nUGbPijxLoOjYhZKJ3BVkiycDVY=",
+ "dev": true,
+ "requires": {
+ "find-index": "^0.1.1"
+ }
+ },
+ "global-modules": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz",
+ "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==",
+ "requires": {
+ "global-prefix": "^1.0.1",
+ "is-windows": "^1.0.1",
+ "resolve-dir": "^1.0.0"
+ }
+ },
+ "global-prefix": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz",
+ "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=",
+ "requires": {
+ "expand-tilde": "^2.0.2",
+ "homedir-polyfill": "^1.0.1",
+ "ini": "^1.3.4",
+ "is-windows": "^1.0.1",
+ "which": "^1.2.14"
+ }
+ },
+ "globule": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/globule/-/globule-0.1.0.tgz",
+ "integrity": "sha1-2cjt3h2nnRJaFRt5UzuXhnY0auU=",
+ "dev": true,
+ "requires": {
+ "glob": "~3.1.21",
+ "lodash": "~1.0.1",
+ "minimatch": "~0.2.11"
+ },
+ "dependencies": {
+ "glob": {
+ "version": "3.1.21",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-3.1.21.tgz",
+ "integrity": "sha1-0p4KBV3qUTj00H7UDomC6DwgZs0=",
+ "dev": true,
+ "requires": {
+ "graceful-fs": "~1.2.0",
+ "inherits": "1",
+ "minimatch": "~0.2.11"
+ }
+ },
+ "graceful-fs": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.3.tgz",
+ "integrity": "sha1-FaSAaldUfLLS2/J/QuiajDRRs2Q=",
+ "dev": true
+ },
+ "inherits": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-1.0.2.tgz",
+ "integrity": "sha1-ykMJ2t7mtUzAuNJH6NfHoJdb3Js=",
+ "dev": true
+ },
+ "minimatch": {
+ "version": "0.2.14",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz",
+ "integrity": "sha1-x054BXT2PG+aCQ6Q775u9TpqdWo=",
+ "dev": true,
+ "requires": {
+ "lru-cache": "2",
+ "sigmund": "~1.0.0"
+ }
+ }
+ }
+ },
+ "glogg": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.2.tgz",
+ "integrity": "sha512-5mwUoSuBk44Y4EshyiqcH95ZntbDdTQqA3QYSrxmzj28Ai0vXBGMH1ApSANH14j2sIRtqCEyg6PfsuP7ElOEDA==",
+ "requires": {
+ "sparkles": "^1.0.0"
+ }
+ },
+ "graceful-fs": {
+ "version": "4.2.10",
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz",
+ "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA=="
+ },
+ "gulp": {
+ "version": "3.9.1",
+ "resolved": "https://registry.npmjs.org/gulp/-/gulp-3.9.1.tgz",
+ "integrity": "sha1-VxzkWSjdQK9lFPxAEYZgFsE4RbQ=",
+ "dev": true,
+ "requires": {
+ "archy": "^1.0.0",
+ "chalk": "^1.0.0",
+ "deprecated": "^0.0.1",
+ "gulp-util": "^3.0.0",
+ "interpret": "^1.0.0",
+ "liftoff": "^2.1.0",
+ "minimist": "^1.1.0",
+ "orchestrator": "^0.3.0",
+ "pretty-hrtime": "^1.0.0",
+ "semver": "^4.1.0",
+ "tildify": "^1.0.0",
+ "v8flags": "^2.0.2",
+ "vinyl-fs": "^0.3.0"
+ },
+ "dependencies": {
+ "findup-sync": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz",
+ "integrity": "sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw=",
+ "dev": true,
+ "requires": {
+ "detect-file": "^1.0.0",
+ "is-glob": "^3.1.0",
+ "micromatch": "^3.0.4",
+ "resolve-dir": "^1.0.1"
+ }
+ },
+ "is-glob": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz",
+ "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=",
+ "dev": true,
+ "requires": {
+ "is-extglob": "^2.1.0"
+ }
+ },
+ "is-plain-object": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
+ "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
+ "dev": true,
+ "requires": {
+ "isobject": "^3.0.1"
+ }
+ },
+ "liftoff": {
+ "version": "2.5.0",
+ "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-2.5.0.tgz",
+ "integrity": "sha1-IAkpG7Mc6oYbvxCnwVooyvdcMew=",
+ "dev": true,
+ "requires": {
+ "extend": "^3.0.0",
+ "findup-sync": "^2.0.0",
+ "fined": "^1.0.1",
+ "flagged-respawn": "^1.0.0",
+ "is-plain-object": "^2.0.4",
+ "object.map": "^1.0.0",
+ "rechoir": "^0.6.2",
+ "resolve": "^1.1.7"
+ }
+ },
+ "minimist": {
+ "version": "1.2.6",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
+ "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==",
+ "dev": true
+ },
+ "semver": {
+ "version": "4.3.6",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz",
+ "integrity": "sha1-MAvG4OhjdPe6YQaLWx7NV/xlMto=",
+ "dev": true
+ },
+ "v8flags": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-2.1.1.tgz",
+ "integrity": "sha1-qrGh+jDUX4jdMhFIh1rALAtV5bQ=",
+ "dev": true,
+ "requires": {
+ "user-home": "^1.1.1"
+ }
+ }
+ }
+ },
+ "gulp-bower": {
+ "version": "0.0.13",
+ "resolved": "https://registry.npmjs.org/gulp-bower/-/gulp-bower-0.0.13.tgz",
+ "integrity": "sha1-fKTjxaWZ0I+torHAVMzozeTnQjU=",
+ "dev": true,
+ "requires": {
+ "bower": "^1.3.12",
+ "gulp-util": "^3.0.1",
+ "inquirer": "^0.11.2",
+ "through2": "0.6.2",
+ "walk": "2.3.3"
+ },
+ "dependencies": {
+ "isarray": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
+ "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=",
+ "dev": true
+ },
+ "readable-stream": {
+ "version": "1.0.34",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
+ "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=",
+ "dev": true,
+ "requires": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.1",
+ "isarray": "0.0.1",
+ "string_decoder": "~0.10.x"
+ }
+ },
+ "string_decoder": {
+ "version": "0.10.31",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
+ "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=",
+ "dev": true
+ },
+ "through2": {
+ "version": "0.6.2",
+ "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.2.tgz",
+ "integrity": "sha1-UyZYJMVV5/zcQRHc3FLH3mRjbHU=",
+ "dev": true,
+ "requires": {
+ "readable-stream": ">=1.0.28 <1.1.0-0",
+ "xtend": ">=4.0.0 <4.1.0-0"
+ }
+ }
+ }
+ },
+ "gulp-cli": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/gulp-cli/-/gulp-cli-2.3.0.tgz",
+ "integrity": "sha512-zzGBl5fHo0EKSXsHzjspp3y5CONegCm8ErO5Qh0UzFzk2y4tMvzLWhoDokADbarfZRL2pGpRp7yt6gfJX4ph7A==",
+ "requires": {
+ "ansi-colors": "^1.0.1",
+ "archy": "^1.0.0",
+ "array-sort": "^1.0.0",
+ "color-support": "^1.1.3",
+ "concat-stream": "^1.6.0",
+ "copy-props": "^2.0.1",
+ "fancy-log": "^1.3.2",
+ "gulplog": "^1.0.0",
+ "interpret": "^1.4.0",
+ "isobject": "^3.0.1",
+ "liftoff": "^3.1.0",
+ "matchdep": "^2.0.0",
+ "mute-stdout": "^1.0.0",
+ "pretty-hrtime": "^1.0.0",
+ "replace-homedir": "^1.0.0",
+ "semver-greatest-satisfied-range": "^1.1.0",
+ "v8flags": "^3.2.0",
+ "yargs": "^7.1.0"
+ }
+ },
+ "gulp-exit": {
+ "version": "0.0.2",
+ "resolved": "https://registry.npmjs.org/gulp-exit/-/gulp-exit-0.0.2.tgz",
+ "integrity": "sha1-CCMTVIaDrQqwXUMNelYzMNTmE3A=",
+ "dev": true
+ },
+ "gulp-jasmine-browser": {
+ "version": "1.9.1",
+ "resolved": "https://registry.npmjs.org/gulp-jasmine-browser/-/gulp-jasmine-browser-1.9.1.tgz",
+ "integrity": "sha512-LsrOZ1JxoF0rri0NObyTZR1YHEOopgklBmOC37L6zayFBxjhKDG4RpqCRR8BCr67WHYO6mkSWEM8w1oQaQoJ6Q==",
+ "dev": true,
+ "requires": {
+ "babel-polyfill": "^6.3.14",
+ "babel-runtime": "^6.3.19",
+ "express": "^4.13.3",
+ "flat-map": "^0.1.0",
+ "jasmine-core": "^2.4.1",
+ "jasmine-json-stream-reporter": "^0.3.1",
+ "jasmine-profile-reporter": "^0.0.2",
+ "jasmine-terminal-reporter": "^1.0.2",
+ "lazypipe": "^1.0.1",
+ "lodash.once": "^4.0.0",
+ "mime": "^1.3.4",
+ "portastic": "^1.0.1",
+ "qs": "^5.2.0",
+ "serve-favicon": "^2.3.0",
+ "sourcemapped-stacktrace": "^1.0.1",
+ "split2": "^2.1.0",
+ "thenify": "^3.1.1",
+ "through2": "^2.0.0",
+ "through2-reduce": "^1.1.1",
+ "vinyl": "^1.2.0"
+ },
+ "dependencies": {
+ "vinyl": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-1.2.0.tgz",
+ "integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=",
+ "dev": true,
+ "requires": {
+ "clone": "^1.0.0",
+ "clone-stats": "^0.0.1",
+ "replace-ext": "0.0.1"
+ }
+ }
+ }
+ },
+ "gulp-process": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/gulp-process/-/gulp-process-0.1.2.tgz",
+ "integrity": "sha1-yN2zkzusEMzuLggSYUCX6fe6TPY=",
+ "dev": true,
+ "requires": {
+ "gulp-util": "^3.0.6",
+ "through2": "^2.0.0"
+ }
+ },
+ "gulp-shell": {
+ "version": "0.5.2",
+ "resolved": "https://registry.npmjs.org/gulp-shell/-/gulp-shell-0.5.2.tgz",
+ "integrity": "sha1-pJWcoGUa0ce7/nCy0K27tOGuqY0=",
+ "dev": true,
+ "requires": {
+ "async": "^1.5.0",
+ "gulp-util": "^3.0.7",
+ "lodash": "^4.0.0",
+ "through2": "^2.0.0"
+ },
+ "dependencies": {
+ "lodash": {
+ "version": "4.17.21",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
+ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
+ "dev": true
+ }
+ }
+ },
+ "gulp-util": {
+ "version": "3.0.8",
+ "resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.8.tgz",
+ "integrity": "sha1-AFTh50RQLifATBh8PsxQXdVLu08=",
+ "dev": true,
+ "requires": {
+ "array-differ": "^1.0.0",
+ "array-uniq": "^1.0.2",
+ "beeper": "^1.0.0",
+ "chalk": "^1.0.0",
+ "dateformat": "^2.0.0",
+ "fancy-log": "^1.1.0",
+ "gulplog": "^1.0.0",
+ "has-gulplog": "^0.1.0",
+ "lodash._reescape": "^3.0.0",
+ "lodash._reevaluate": "^3.0.0",
+ "lodash._reinterpolate": "^3.0.0",
+ "lodash.template": "^3.0.0",
+ "minimist": "^1.1.0",
+ "multipipe": "^0.1.2",
+ "object-assign": "^3.0.0",
+ "replace-ext": "0.0.1",
+ "through2": "^2.0.0",
+ "vinyl": "^0.5.0"
+ },
+ "dependencies": {
+ "minimist": {
+ "version": "1.2.6",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
+ "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==",
+ "dev": true
+ }
+ }
+ },
+ "gulplog": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz",
+ "integrity": "sha1-4oxNRdBey77YGDY86PnFkmIp/+U=",
+ "requires": {
+ "glogg": "^1.0.0"
+ }
+ },
+ "har-validator": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz",
+ "integrity": "sha1-zcvAgYgmWtEZtqWnyKtw7s+10n0=",
+ "dev": true,
+ "requires": {
+ "chalk": "^1.1.1",
+ "commander": "^2.9.0",
+ "is-my-json-valid": "^2.12.4",
+ "pinkie-promise": "^2.0.0"
+ }
+ },
+ "has": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
+ "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
+ "requires": {
+ "function-bind": "^1.1.1"
+ }
+ },
+ "has-ansi": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
+ "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
+ "dev": true,
+ "requires": {
+ "ansi-regex": "^2.0.0"
+ }
+ },
+ "has-flag": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz",
+ "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=",
+ "dev": true
+ },
+ "has-gulplog": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/has-gulplog/-/has-gulplog-0.1.0.tgz",
+ "integrity": "sha1-ZBTIKRNpfaUVkDl9r7EvIpZ4Ec4=",
+ "dev": true,
+ "requires": {
+ "sparkles": "^1.0.0"
+ }
+ },
+ "has-property-descriptors": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz",
+ "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==",
+ "requires": {
+ "get-intrinsic": "^1.1.1"
+ }
+ },
+ "has-symbols": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
+ "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A=="
+ },
+ "has-value": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz",
+ "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=",
+ "requires": {
+ "get-value": "^2.0.6",
+ "has-values": "^1.0.0",
+ "isobject": "^3.0.0"
+ }
+ },
+ "has-values": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz",
+ "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=",
+ "requires": {
+ "is-number": "^3.0.0",
+ "kind-of": "^4.0.0"
+ },
+ "dependencies": {
+ "kind-of": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz",
+ "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=",
+ "requires": {
+ "is-buffer": "^1.1.5"
+ }
+ }
+ }
+ },
+ "hasha": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/hasha/-/hasha-2.2.0.tgz",
+ "integrity": "sha1-eNfL/B5tZjA/55g3NlmEUXsvbuE=",
+ "dev": true,
+ "requires": {
+ "is-stream": "^1.0.1",
+ "pinkie-promise": "^2.0.0"
+ }
+ },
+ "hawk": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz",
+ "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=",
+ "dev": true,
+ "requires": {
+ "boom": "2.x.x",
+ "cryptiles": "2.x.x",
+ "hoek": "2.x.x",
+ "sntp": "1.x.x"
+ }
+ },
+ "hoek": {
+ "version": "2.16.3",
+ "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz",
+ "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=",
+ "dev": true
+ },
+ "homedir-polyfill": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz",
+ "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==",
+ "requires": {
+ "parse-passwd": "^1.0.0"
+ }
+ },
+ "hosted-git-info": {
+ "version": "2.8.9",
+ "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz",
+ "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw=="
+ },
+ "http-errors": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz",
+ "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==",
+ "dev": true,
+ "requires": {
+ "depd": "2.0.0",
+ "inherits": "2.0.4",
+ "setprototypeof": "1.2.0",
+ "statuses": "2.0.1",
+ "toidentifier": "1.0.1"
+ }
+ },
+ "http-signature": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz",
+ "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=",
+ "dev": true,
+ "requires": {
+ "assert-plus": "^0.2.0",
+ "jsprim": "^1.2.2",
+ "sshpk": "^1.7.0"
+ }
+ },
+ "https-browserify": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-0.0.1.tgz",
+ "integrity": "sha1-P5E2XKvmC3ftDruiS0VOPgnZWoI=",
+ "dev": true
+ },
+ "iconv-lite": {
+ "version": "0.4.24",
+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
+ "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
+ "dev": true,
+ "requires": {
+ "safer-buffer": ">= 2.1.2 < 3"
+ }
+ },
+ "ieee754": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
+ "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
+ "dev": true
+ },
+ "imurmurhash": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
+ "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=",
+ "dev": true
+ },
+ "indent-string": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz",
+ "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=",
+ "dev": true,
+ "requires": {
+ "repeating": "^2.0.0"
+ }
+ },
+ "indexof": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz",
+ "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=",
+ "dev": true
+ },
+ "inflight": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
+ "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
+ "dev": true,
+ "requires": {
+ "once": "^1.3.0",
+ "wrappy": "1"
+ }
+ },
+ "inherits": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
+ },
+ "ini": {
+ "version": "1.3.8",
+ "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
+ "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew=="
+ },
+ "inquirer": {
+ "version": "0.11.4",
+ "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-0.11.4.tgz",
+ "integrity": "sha1-geM3ToNhvq/y2XAWIG01nQsy+k0=",
+ "dev": true,
+ "requires": {
+ "ansi-escapes": "^1.1.0",
+ "ansi-regex": "^2.0.0",
+ "chalk": "^1.0.0",
+ "cli-cursor": "^1.0.1",
+ "cli-width": "^1.0.1",
+ "figures": "^1.3.5",
+ "lodash": "^3.3.1",
+ "readline2": "^1.0.1",
+ "run-async": "^0.1.0",
+ "rx-lite": "^3.1.2",
+ "string-width": "^1.0.1",
+ "strip-ansi": "^3.0.0",
+ "through": "^2.3.6"
+ },
+ "dependencies": {
+ "lodash": {
+ "version": "3.10.1",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz",
+ "integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=",
+ "dev": true
+ }
+ }
+ },
+ "interpret": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz",
+ "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA=="
+ },
+ "invert-kv": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz",
+ "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY="
+ },
+ "ipaddr.js": {
+ "version": "1.9.1",
+ "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
+ "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
+ "dev": true
+ },
+ "is-absolute": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz",
+ "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==",
+ "requires": {
+ "is-relative": "^1.0.0",
+ "is-windows": "^1.0.1"
+ }
+ },
+ "is-accessor-descriptor": {
+ "version": "0.1.6",
+ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
+ "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=",
+ "requires": {
+ "kind-of": "^3.0.2"
+ },
+ "dependencies": {
+ "kind-of": {
+ "version": "3.2.2",
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+ "requires": {
+ "is-buffer": "^1.1.5"
+ }
+ }
+ }
+ },
+ "is-arrayish": {
+ "version": "0.2.1",
+ "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
+ "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0="
+ },
+ "is-binary-path": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz",
+ "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=",
+ "dev": true,
+ "requires": {
+ "binary-extensions": "^1.0.0"
+ }
+ },
+ "is-buffer": {
+ "version": "1.1.6",
+ "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
+ "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w=="
+ },
+ "is-core-module": {
+ "version": "2.9.0",
+ "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz",
+ "integrity": "sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==",
+ "requires": {
+ "has": "^1.0.3"
+ }
+ },
+ "is-data-descriptor": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
+ "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=",
+ "requires": {
+ "kind-of": "^3.0.2"
+ },
+ "dependencies": {
+ "kind-of": {
+ "version": "3.2.2",
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+ "requires": {
+ "is-buffer": "^1.1.5"
+ }
+ }
+ }
+ },
+ "is-descriptor": {
+ "version": "0.1.6",
+ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz",
+ "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==",
+ "requires": {
+ "is-accessor-descriptor": "^0.1.6",
+ "is-data-descriptor": "^0.1.4",
+ "kind-of": "^5.0.0"
+ }
+ },
+ "is-dotfile": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz",
+ "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=",
+ "dev": true
+ },
+ "is-equal-shallow": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz",
+ "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=",
+ "dev": true,
+ "requires": {
+ "is-primitive": "^2.0.0"
+ }
+ },
+ "is-extendable": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz",
+ "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik="
+ },
+ "is-extglob": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
+ "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI="
+ },
+ "is-finite": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz",
+ "integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==",
+ "dev": true
+ },
+ "is-fullwidth-code-point": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
+ "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
+ "requires": {
+ "number-is-nan": "^1.0.0"
+ }
+ },
+ "is-glob": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
+ "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
+ "requires": {
+ "is-extglob": "^2.1.1"
+ }
+ },
+ "is-my-ip-valid": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/is-my-ip-valid/-/is-my-ip-valid-1.0.1.tgz",
+ "integrity": "sha512-jxc8cBcOWbNK2i2aTkCZP6i7wkHF1bqKFrwEHuN5Jtg5BSaZHUZQ/JTOJwoV41YvHnOaRyWWh72T/KvfNz9DJg==",
+ "dev": true
+ },
+ "is-my-json-valid": {
+ "version": "2.20.6",
+ "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.20.6.tgz",
+ "integrity": "sha512-1JQwulVNjx8UqkPE/bqDaxtH4PXCe/2VRh/y3p99heOV87HG4Id5/VfDswd+YiAfHcRTfDlWgISycnHuhZq1aw==",
+ "dev": true,
+ "requires": {
+ "generate-function": "^2.0.0",
+ "generate-object-property": "^1.1.0",
+ "is-my-ip-valid": "^1.0.0",
+ "jsonpointer": "^5.0.0",
+ "xtend": "^4.0.0"
+ }
+ },
+ "is-number": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
+ "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
+ "requires": {
+ "kind-of": "^3.0.2"
+ },
+ "dependencies": {
+ "kind-of": {
+ "version": "3.2.2",
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+ "requires": {
+ "is-buffer": "^1.1.5"
+ }
+ }
+ }
+ },
+ "is-obj": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz",
+ "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=",
+ "dev": true
+ },
+ "is-plain-object": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz",
+ "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q=="
+ },
+ "is-posix-bracket": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz",
+ "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=",
+ "dev": true
+ },
+ "is-primitive": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz",
+ "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=",
+ "dev": true
+ },
+ "is-property": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz",
+ "integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ=",
+ "dev": true
+ },
+ "is-relative": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz",
+ "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==",
+ "requires": {
+ "is-unc-path": "^1.0.0"
+ }
+ },
+ "is-stream": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
+ "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=",
+ "dev": true
+ },
+ "is-typedarray": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
+ "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=",
+ "dev": true
+ },
+ "is-unc-path": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz",
+ "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==",
+ "requires": {
+ "unc-path-regex": "^0.1.2"
+ }
+ },
+ "is-utf8": {
+ "version": "0.2.1",
+ "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz",
+ "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI="
+ },
+ "is-windows": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz",
+ "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA=="
+ },
+ "isarray": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
+ "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
+ },
+ "isexe": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
+ "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA="
+ },
+ "isobject": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
+ "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8="
+ },
+ "isstream": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
+ "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=",
+ "dev": true
+ },
+ "jasmine": {
+ "version": "2.99.0",
+ "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-2.99.0.tgz",
+ "integrity": "sha1-jKctEC5jm4Z8ZImFbg4YqceqQrc=",
+ "dev": true,
+ "requires": {
+ "exit": "^0.1.2",
+ "glob": "^7.0.6",
+ "jasmine-core": "~2.99.0"
+ },
+ "dependencies": {
+ "glob": {
+ "version": "7.2.3",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
+ "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
+ "dev": true,
+ "requires": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.1.1",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ }
+ },
+ "minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "dev": true,
+ "requires": {
+ "brace-expansion": "^1.1.7"
+ }
+ }
+ }
+ },
+ "jasmine-core": {
+ "version": "2.99.1",
+ "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-2.99.1.tgz",
+ "integrity": "sha1-5kAN8ea1bhMLYcS80JPap/boyhU=",
+ "dev": true
+ },
+ "jasmine-json-stream-reporter": {
+ "version": "0.3.1",
+ "resolved": "https://registry.npmjs.org/jasmine-json-stream-reporter/-/jasmine-json-stream-reporter-0.3.1.tgz",
+ "integrity": "sha1-8zMKYL2t5jeeF80j00O7nu+Q08w=",
+ "dev": true,
+ "requires": {
+ "through2": "^2.0.1",
+ "uuid": "^2.0.2"
+ }
+ },
+ "jasmine-profile-reporter": {
+ "version": "0.0.2",
+ "resolved": "https://registry.npmjs.org/jasmine-profile-reporter/-/jasmine-profile-reporter-0.0.2.tgz",
+ "integrity": "sha1-sQ3a+at1t7xsTJ9G8kpnoEVfOXg=",
+ "dev": true
+ },
+ "jasmine-terminal-reporter": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/jasmine-terminal-reporter/-/jasmine-terminal-reporter-1.0.3.tgz",
+ "integrity": "sha1-iW8eyP30v2rs3UHFA+2nNH9hUms=",
+ "dev": true,
+ "requires": {
+ "indent-string": "^2.1.0",
+ "pluralize": "^1.2.1"
+ }
+ },
+ "js-yaml": {
+ "version": "3.14.1",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz",
+ "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==",
+ "dev": true,
+ "requires": {
+ "argparse": "^1.0.7",
+ "esprima": "^4.0.0"
+ }
+ },
+ "jsbn": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
+ "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=",
+ "dev": true
+ },
+ "json-schema": {
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz",
+ "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==",
+ "dev": true
+ },
+ "json-stringify-safe": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
+ "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=",
+ "dev": true
+ },
+ "json5": {
+ "version": "0.5.1",
+ "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz",
+ "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=",
+ "dev": true
+ },
+ "jsonfile": {
+ "version": "2.4.0",
+ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz",
+ "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=",
+ "dev": true,
+ "requires": {
+ "graceful-fs": "^4.1.6"
+ }
+ },
+ "jsonpointer": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-5.0.0.tgz",
+ "integrity": "sha512-PNYZIdMjVIvVgDSYKTT63Y+KZ6IZvGRNNWcxwD+GNnUz1MKPfv30J8ueCjdwcN0nDx2SlshgyB7Oy0epAzVRRg==",
+ "dev": true
+ },
+ "jsprim": {
+ "version": "1.4.2",
+ "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz",
+ "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==",
+ "dev": true,
+ "requires": {
+ "assert-plus": "1.0.0",
+ "extsprintf": "1.3.0",
+ "json-schema": "0.4.0",
+ "verror": "1.10.0"
+ },
+ "dependencies": {
+ "assert-plus": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
+ "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==",
+ "dev": true
+ }
+ }
+ },
+ "kew": {
+ "version": "0.7.0",
+ "resolved": "https://registry.npmjs.org/kew/-/kew-0.7.0.tgz",
+ "integrity": "sha1-edk9LTM2PW/dKXCzNdkUGtWR15s=",
+ "dev": true
+ },
+ "kind-of": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz",
+ "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw=="
+ },
+ "klaw": {
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz",
+ "integrity": "sha1-QIhDO0azsbolnXh4XY6W9zugJDk=",
+ "dev": true,
+ "requires": {
+ "graceful-fs": "^4.1.9"
+ }
+ },
+ "lazy-cache": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz",
+ "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=",
+ "dev": true
+ },
+ "lazypipe": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/lazypipe/-/lazypipe-1.0.2.tgz",
+ "integrity": "sha512-CrU+NYdFHW8ElaeXCWz5IbmetiYVYq1fOCmpdAeZ8L+khbv1e7EnshyjlKqkO+pJbVPrsJQnHbVxEiLujG6qhQ==",
+ "dev": true,
+ "requires": {
+ "stream-combiner": "*"
+ }
+ },
+ "lcid": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz",
+ "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=",
+ "requires": {
+ "invert-kv": "^1.0.0"
+ }
+ },
+ "liftoff": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-3.1.0.tgz",
+ "integrity": "sha512-DlIPlJUkCV0Ips2zf2pJP0unEoT1kwYhiiPUGF3s/jtxTCjziNLoiVVh+jqWOWeFi6mmwQ5fNxvAUyPad4Dfog==",
+ "requires": {
+ "extend": "^3.0.0",
+ "findup-sync": "^3.0.0",
+ "fined": "^1.0.1",
+ "flagged-respawn": "^1.0.0",
+ "is-plain-object": "^2.0.4",
+ "object.map": "^1.0.0",
+ "rechoir": "^0.6.2",
+ "resolve": "^1.1.7"
+ },
+ "dependencies": {
+ "is-plain-object": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
+ "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
+ "requires": {
+ "isobject": "^3.0.1"
+ }
+ }
+ }
+ },
+ "load-json-file": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
+ "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=",
+ "requires": {
+ "graceful-fs": "^4.1.2",
+ "parse-json": "^2.2.0",
+ "pify": "^2.0.0",
+ "pinkie-promise": "^2.0.0",
+ "strip-bom": "^2.0.0"
+ }
+ },
+ "loader-utils": {
+ "version": "0.2.17",
+ "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz",
+ "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=",
+ "dev": true,
+ "requires": {
+ "big.js": "^3.1.3",
+ "emojis-list": "^2.0.0",
+ "json5": "^0.5.0",
+ "object-assign": "^4.0.1"
+ },
+ "dependencies": {
+ "object-assign": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
+ "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
+ "dev": true
+ }
+ }
+ },
+ "lodash": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-1.0.2.tgz",
+ "integrity": "sha1-j1dWDIO1n8JwvT1WG2kAQ0MOJVE=",
+ "dev": true
+ },
+ "lodash-compat": {
+ "version": "3.10.2",
+ "resolved": "https://registry.npmjs.org/lodash-compat/-/lodash-compat-3.10.2.tgz",
+ "integrity": "sha1-xpQBKKnTD46QLNLPmf0Muk7PwYM=",
+ "dev": true
+ },
+ "lodash._basecopy": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz",
+ "integrity": "sha1-jaDmqHbPNEwK2KVIghEd08XHyjY=",
+ "dev": true
+ },
+ "lodash._basetostring": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz",
+ "integrity": "sha1-0YYdh3+CSlL2aYMtyvPuFVZqB9U=",
+ "dev": true
+ },
+ "lodash._basevalues": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz",
+ "integrity": "sha1-W3dXYoAr3j0yl1A+JjAIIP32Ybc=",
+ "dev": true
+ },
+ "lodash._getnative": {
+ "version": "3.9.1",
+ "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz",
+ "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=",
+ "dev": true
+ },
+ "lodash._isiterateecall": {
+ "version": "3.0.9",
+ "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz",
+ "integrity": "sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw=",
+ "dev": true
+ },
+ "lodash._reescape": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/lodash._reescape/-/lodash._reescape-3.0.0.tgz",
+ "integrity": "sha1-Kx1vXf4HyKNVdT5fJ/rH8c3hYWo=",
+ "dev": true
+ },
+ "lodash._reevaluate": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz",
+ "integrity": "sha1-WLx0xAZklTrgsSTYBpltrKQx4u0=",
+ "dev": true
+ },
+ "lodash._reinterpolate": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz",
+ "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=",
+ "dev": true
+ },
+ "lodash._root": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/lodash._root/-/lodash._root-3.0.1.tgz",
+ "integrity": "sha1-+6HEUkwZ7ppfgTa0YJ8BfPTe1pI=",
+ "dev": true
+ },
+ "lodash.clone": {
+ "version": "4.5.0",
+ "resolved": "https://registry.npmjs.org/lodash.clone/-/lodash.clone-4.5.0.tgz",
+ "integrity": "sha1-GVhwRQ9aExkkeN9Lw9I9LeoZB7Y=",
+ "dev": true
+ },
+ "lodash.escape": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-3.2.0.tgz",
+ "integrity": "sha1-mV7g3BjBtIzJLv+ucaEKq1tIdpg=",
+ "dev": true,
+ "requires": {
+ "lodash._root": "^3.0.0"
+ }
+ },
+ "lodash.isarguments": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz",
+ "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=",
+ "dev": true
+ },
+ "lodash.isarray": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz",
+ "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=",
+ "dev": true
+ },
+ "lodash.keys": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz",
+ "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=",
+ "dev": true,
+ "requires": {
+ "lodash._getnative": "^3.0.0",
+ "lodash.isarguments": "^3.0.0",
+ "lodash.isarray": "^3.0.0"
+ }
+ },
+ "lodash.once": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz",
+ "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=",
+ "dev": true
+ },
+ "lodash.restparam": {
+ "version": "3.6.1",
+ "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz",
+ "integrity": "sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=",
+ "dev": true
+ },
+ "lodash.some": {
+ "version": "4.6.0",
+ "resolved": "https://registry.npmjs.org/lodash.some/-/lodash.some-4.6.0.tgz",
+ "integrity": "sha1-G7nzFO9ri63tE7VJFpsqlF62jk0=",
+ "dev": true
+ },
+ "lodash.template": {
+ "version": "3.6.2",
+ "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-3.6.2.tgz",
+ "integrity": "sha1-+M3sxhaaJVvpCYrosMU9N4kx0U8=",
+ "dev": true,
+ "requires": {
+ "lodash._basecopy": "^3.0.0",
+ "lodash._basetostring": "^3.0.0",
+ "lodash._basevalues": "^3.0.0",
+ "lodash._isiterateecall": "^3.0.0",
+ "lodash._reinterpolate": "^3.0.0",
+ "lodash.escape": "^3.0.0",
+ "lodash.keys": "^3.0.0",
+ "lodash.restparam": "^3.0.0",
+ "lodash.templatesettings": "^3.0.0"
+ }
+ },
+ "lodash.templatesettings": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz",
+ "integrity": "sha1-+zB4RHU7Zrnxr6VOJix0UwfbqOU=",
+ "dev": true,
+ "requires": {
+ "lodash._reinterpolate": "^3.0.0",
+ "lodash.escape": "^3.0.0"
+ }
+ },
+ "longest": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz",
+ "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=",
+ "dev": true
+ },
+ "lru-cache": {
+ "version": "2.7.3",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz",
+ "integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=",
+ "dev": true
+ },
+ "make-dir": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz",
+ "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==",
+ "dev": true,
+ "requires": {
+ "pify": "^3.0.0"
+ },
+ "dependencies": {
+ "pify": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
+ "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
+ "dev": true
+ }
+ }
+ },
+ "make-iterator": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz",
+ "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==",
+ "requires": {
+ "kind-of": "^6.0.2"
+ },
+ "dependencies": {
+ "kind-of": {
+ "version": "6.0.3",
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
+ "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw=="
+ }
+ }
+ },
+ "map-cache": {
+ "version": "0.2.2",
+ "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz",
+ "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8="
+ },
+ "map-visit": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz",
+ "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=",
+ "requires": {
+ "object-visit": "^1.0.0"
+ }
+ },
+ "matchdep": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/matchdep/-/matchdep-2.0.0.tgz",
+ "integrity": "sha1-xvNINKDY28OzfCfui7yyfHd1WC4=",
+ "requires": {
+ "findup-sync": "^2.0.0",
+ "micromatch": "^3.0.4",
+ "resolve": "^1.4.0",
+ "stack-trace": "0.0.10"
+ },
+ "dependencies": {
+ "findup-sync": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz",
+ "integrity": "sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw=",
+ "requires": {
+ "detect-file": "^1.0.0",
+ "is-glob": "^3.1.0",
+ "micromatch": "^3.0.4",
+ "resolve-dir": "^1.0.1"
+ }
+ },
+ "is-glob": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz",
+ "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=",
+ "requires": {
+ "is-extglob": "^2.1.0"
+ }
+ }
+ }
+ },
+ "math-random": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.4.tgz",
+ "integrity": "sha512-rUxjysqif/BZQH2yhd5Aaq7vXMSx9NdEsQcyA07uEzIvxgI7zIr33gGsh+RU0/XjmQpCW7RsVof1vlkvQVCK5A==",
+ "dev": true
+ },
+ "media-typer": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
+ "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=",
+ "dev": true
+ },
+ "memory-fs": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.3.0.tgz",
+ "integrity": "sha1-e8xrYp46Q+hx1+Kaymrop/FcuyA=",
+ "dev": true,
+ "requires": {
+ "errno": "^0.1.3",
+ "readable-stream": "^2.0.1"
+ }
+ },
+ "merge-descriptors": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
+ "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=",
+ "dev": true
+ },
+ "methods": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
+ "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=",
+ "dev": true
+ },
+ "micromatch": {
+ "version": "3.1.10",
+ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz",
+ "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==",
+ "requires": {
+ "arr-diff": "^4.0.0",
+ "array-unique": "^0.3.2",
+ "braces": "^2.3.1",
+ "define-property": "^2.0.2",
+ "extend-shallow": "^3.0.2",
+ "extglob": "^2.0.4",
+ "fragment-cache": "^0.2.1",
+ "kind-of": "^6.0.2",
+ "nanomatch": "^1.2.9",
+ "object.pick": "^1.3.0",
+ "regex-not": "^1.0.0",
+ "snapdragon": "^0.8.1",
+ "to-regex": "^3.0.2"
+ },
+ "dependencies": {
+ "kind-of": {
+ "version": "6.0.3",
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
+ "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw=="
+ }
+ }
+ },
+ "mime": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
+ "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
+ "dev": true
+ },
+ "mime-db": {
+ "version": "1.52.0",
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
+ "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
+ "dev": true
+ },
+ "mime-types": {
+ "version": "2.1.35",
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
+ "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
+ "dev": true,
+ "requires": {
+ "mime-db": "1.52.0"
+ }
+ },
+ "minimatch": {
+ "version": "2.0.10",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz",
+ "integrity": "sha1-jQh8OcazjAAbl/ynzm0OHoCvusc=",
+ "dev": true,
+ "requires": {
+ "brace-expansion": "^1.0.0"
+ }
+ },
+ "minimist": {
+ "version": "0.0.10",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz",
+ "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=",
+ "dev": true
+ },
+ "mixin-deep": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz",
+ "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==",
+ "requires": {
+ "for-in": "^1.0.2",
+ "is-extendable": "^1.0.1"
+ },
+ "dependencies": {
+ "is-extendable": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
+ "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
+ "requires": {
+ "is-plain-object": "^2.0.4"
+ }
+ },
+ "is-plain-object": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
+ "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
+ "requires": {
+ "isobject": "^3.0.1"
+ }
+ }
+ }
+ },
+ "mkdirp": {
+ "version": "0.5.6",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz",
+ "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==",
+ "dev": true,
+ "requires": {
+ "minimist": "^1.2.6"
+ },
+ "dependencies": {
+ "minimist": {
+ "version": "1.2.6",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
+ "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==",
+ "dev": true
+ }
+ }
+ },
+ "mout": {
+ "version": "1.2.4",
+ "resolved": "https://registry.npmjs.org/mout/-/mout-1.2.4.tgz",
+ "integrity": "sha512-mZb9uOruMWgn/fw28DG4/yE3Kehfk1zKCLhuDU2O3vlKdnBBr4XaOCqVTflJ5aODavGUPqFHZgrFX3NJVuxGhQ==",
+ "dev": true
+ },
+ "ms": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
+ },
+ "multipipe": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/multipipe/-/multipipe-0.1.2.tgz",
+ "integrity": "sha1-Ko8t33Du1WTf8tV/HhoTfZ8FB4s=",
+ "dev": true,
+ "requires": {
+ "duplexer2": "0.0.2"
+ }
+ },
+ "mute-stdout": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/mute-stdout/-/mute-stdout-1.0.1.tgz",
+ "integrity": "sha512-kDcwXR4PS7caBpuRYYBUz9iVixUk3anO3f5OYFiIPwK/20vCzKCHyKoulbiDY1S53zD2bxUpxN/IJ+TnXjfvxg=="
+ },
+ "mute-stream": {
+ "version": "0.0.5",
+ "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.5.tgz",
+ "integrity": "sha1-j7+rsKmKJT0xhDMfno3rc3L6xsA=",
+ "dev": true
+ },
+ "nan": {
+ "version": "2.15.0",
+ "resolved": "https://registry.npmjs.org/nan/-/nan-2.15.0.tgz",
+ "integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ==",
+ "dev": true,
+ "optional": true
+ },
+ "nanomatch": {
+ "version": "1.2.13",
+ "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz",
+ "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==",
+ "requires": {
+ "arr-diff": "^4.0.0",
+ "array-unique": "^0.3.2",
+ "define-property": "^2.0.2",
+ "extend-shallow": "^3.0.2",
+ "fragment-cache": "^0.2.1",
+ "is-windows": "^1.0.2",
+ "kind-of": "^6.0.2",
+ "object.pick": "^1.3.0",
+ "regex-not": "^1.0.0",
+ "snapdragon": "^0.8.1",
+ "to-regex": "^3.0.1"
+ },
+ "dependencies": {
+ "kind-of": {
+ "version": "6.0.3",
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
+ "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw=="
+ }
+ }
+ },
+ "natives": {
+ "version": "1.1.6",
+ "resolved": "https://registry.npmjs.org/natives/-/natives-1.1.6.tgz",
+ "integrity": "sha512-6+TDFewD4yxY14ptjKaS63GVdtKiES1pTPyxn9Jb0rBqPMZ7VcCiooEhPNsr+mqHtMGxa/5c/HhcC4uPEUw/nA==",
+ "dev": true
+ },
+ "negotiator": {
+ "version": "0.6.3",
+ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
+ "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==",
+ "dev": true
+ },
+ "next-tick": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz",
+ "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ=="
+ },
+ "node-libs-browser": {
+ "version": "0.7.0",
+ "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-0.7.0.tgz",
+ "integrity": "sha1-PicsCBnjCJNeJmdECNevDhSRuDs=",
+ "dev": true,
+ "requires": {
+ "assert": "^1.1.1",
+ "browserify-zlib": "^0.1.4",
+ "buffer": "^4.9.0",
+ "console-browserify": "^1.1.0",
+ "constants-browserify": "^1.0.0",
+ "crypto-browserify": "3.3.0",
+ "domain-browser": "^1.1.1",
+ "events": "^1.0.0",
+ "https-browserify": "0.0.1",
+ "os-browserify": "^0.2.0",
+ "path-browserify": "0.0.0",
+ "process": "^0.11.0",
+ "punycode": "^1.2.4",
+ "querystring-es3": "^0.2.0",
+ "readable-stream": "^2.0.5",
+ "stream-browserify": "^2.0.1",
+ "stream-http": "^2.3.1",
+ "string_decoder": "^0.10.25",
+ "timers-browserify": "^2.0.2",
+ "tty-browserify": "0.0.0",
+ "url": "^0.11.0",
+ "util": "^0.10.3",
+ "vm-browserify": "0.0.4"
+ },
+ "dependencies": {
+ "string_decoder": {
+ "version": "0.10.31",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
+ "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=",
+ "dev": true
+ }
+ }
+ },
+ "node-uuid": {
+ "version": "1.4.8",
+ "resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.8.tgz",
+ "integrity": "sha1-sEDrCSOWivq/jTL7HxfxFn/auQc=",
+ "dev": true
+ },
+ "normalize-package-data": {
+ "version": "2.5.0",
+ "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz",
+ "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==",
+ "requires": {
+ "hosted-git-info": "^2.1.4",
+ "resolve": "^1.10.0",
+ "semver": "2 || 3 || 4 || 5",
+ "validate-npm-package-license": "^3.0.1"
+ }
+ },
+ "normalize-path": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz",
+ "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=",
+ "dev": true,
+ "requires": {
+ "remove-trailing-separator": "^1.0.1"
+ }
+ },
+ "number-is-nan": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
+ "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0="
+ },
+ "oauth-sign": {
+ "version": "0.8.2",
+ "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz",
+ "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=",
+ "dev": true
+ },
+ "object-assign": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz",
+ "integrity": "sha1-m+3VygiXlJvKR+f/QIBi1Un1h/I=",
+ "dev": true
+ },
+ "object-copy": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz",
+ "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=",
+ "requires": {
+ "copy-descriptor": "^0.1.0",
+ "define-property": "^0.2.5",
+ "kind-of": "^3.0.3"
+ },
+ "dependencies": {
+ "define-property": {
+ "version": "0.2.5",
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
+ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
+ "requires": {
+ "is-descriptor": "^0.1.0"
+ }
+ },
+ "kind-of": {
+ "version": "3.2.2",
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+ "requires": {
+ "is-buffer": "^1.1.5"
+ }
+ }
+ }
+ },
+ "object-inspect": {
+ "version": "1.12.1",
+ "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.1.tgz",
+ "integrity": "sha512-Y/jF6vnvEtOPGiKD1+q+X0CiUYRQtEHp89MLLUJ7TUivtH8Ugn2+3A7Rynqk7BRsAoqeOQWnFnjpDrKSxDgIGA==",
+ "dev": true
+ },
+ "object-keys": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
+ "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA=="
+ },
+ "object-visit": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz",
+ "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=",
+ "requires": {
+ "isobject": "^3.0.0"
+ }
+ },
+ "object.assign": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz",
+ "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==",
+ "requires": {
+ "call-bind": "^1.0.0",
+ "define-properties": "^1.1.3",
+ "has-symbols": "^1.0.1",
+ "object-keys": "^1.1.1"
+ }
+ },
+ "object.defaults": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz",
+ "integrity": "sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8=",
+ "requires": {
+ "array-each": "^1.0.1",
+ "array-slice": "^1.0.0",
+ "for-own": "^1.0.0",
+ "isobject": "^3.0.0"
+ }
+ },
+ "object.map": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz",
+ "integrity": "sha1-z4Plncj8wK1fQlDh94s7gb2AHTc=",
+ "requires": {
+ "for-own": "^1.0.0",
+ "make-iterator": "^1.0.0"
+ }
+ },
+ "object.omit": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz",
+ "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=",
+ "dev": true,
+ "requires": {
+ "for-own": "^0.1.4",
+ "is-extendable": "^0.1.1"
+ },
+ "dependencies": {
+ "for-own": {
+ "version": "0.1.5",
+ "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz",
+ "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=",
+ "dev": true,
+ "requires": {
+ "for-in": "^1.0.1"
+ }
+ }
+ }
+ },
+ "object.pick": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz",
+ "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=",
+ "requires": {
+ "isobject": "^3.0.1"
+ }
+ },
+ "on-finished": {
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
+ "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
+ "dev": true,
+ "requires": {
+ "ee-first": "1.1.1"
+ }
+ },
+ "once": {
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz",
+ "integrity": "sha1-suJhVXzkwxTsgwTz+oJmPkKXyiA=",
+ "dev": true,
+ "requires": {
+ "wrappy": "1"
+ }
+ },
+ "onetime": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz",
+ "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=",
+ "dev": true
+ },
+ "optimist": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz",
+ "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=",
+ "dev": true,
+ "requires": {
+ "minimist": "~0.0.1",
+ "wordwrap": "~0.0.2"
+ }
+ },
+ "orchestrator": {
+ "version": "0.3.8",
+ "resolved": "https://registry.npmjs.org/orchestrator/-/orchestrator-0.3.8.tgz",
+ "integrity": "sha1-FOfp4nZPcxX7rBhOUGx6pt+UrX4=",
+ "dev": true,
+ "requires": {
+ "end-of-stream": "~0.1.5",
+ "sequencify": "~0.0.7",
+ "stream-consume": "~0.1.0"
+ }
+ },
+ "ordered-read-streams": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-0.1.0.tgz",
+ "integrity": "sha1-/VZamvjrRHO6abbtijQ1LLVS8SY=",
+ "dev": true
+ },
+ "os-browserify": {
+ "version": "0.2.1",
+ "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.2.1.tgz",
+ "integrity": "sha1-Y/xMzuXS13Y9Jrv4YBB45sLgBE8=",
+ "dev": true
+ },
+ "os-homedir": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
+ "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=",
+ "dev": true
+ },
+ "os-locale": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz",
+ "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=",
+ "requires": {
+ "lcid": "^1.0.0"
+ }
+ },
+ "osenv": {
+ "version": "0.0.3",
+ "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.0.3.tgz",
+ "integrity": "sha1-zWrY3bKQkVrZ4idlV2Al1BHynLY=",
+ "dev": true
+ },
+ "pako": {
+ "version": "0.2.9",
+ "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz",
+ "integrity": "sha1-8/dSL073gjSNqBYbrZ7P1Rv4OnU=",
+ "dev": true
+ },
+ "parse-filepath": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz",
+ "integrity": "sha1-pjISf1Oq89FYdvWHLz/6x2PWyJE=",
+ "requires": {
+ "is-absolute": "^1.0.0",
+ "map-cache": "^0.2.0",
+ "path-root": "^0.1.1"
+ }
+ },
+ "parse-glob": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz",
+ "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=",
+ "dev": true,
+ "requires": {
+ "glob-base": "^0.3.0",
+ "is-dotfile": "^1.0.0",
+ "is-extglob": "^1.0.0",
+ "is-glob": "^2.0.0"
+ },
+ "dependencies": {
+ "is-extglob": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz",
+ "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=",
+ "dev": true
+ },
+ "is-glob": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz",
+ "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=",
+ "dev": true,
+ "requires": {
+ "is-extglob": "^1.0.0"
+ }
+ }
+ }
+ },
+ "parse-json": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz",
+ "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=",
+ "requires": {
+ "error-ex": "^1.2.0"
+ }
+ },
+ "parse-node-version": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/parse-node-version/-/parse-node-version-1.0.1.tgz",
+ "integrity": "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA=="
+ },
+ "parse-passwd": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz",
+ "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY="
+ },
+ "parseurl": {
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
+ "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
+ "dev": true
+ },
+ "pascalcase": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz",
+ "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ="
+ },
+ "path-browserify": {
+ "version": "0.0.0",
+ "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz",
+ "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=",
+ "dev": true
+ },
+ "path-exists": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz",
+ "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=",
+ "requires": {
+ "pinkie-promise": "^2.0.0"
+ }
+ },
+ "path-is-absolute": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
+ "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
+ "dev": true
+ },
+ "path-parse": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
+ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw=="
+ },
+ "path-root": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz",
+ "integrity": "sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc=",
+ "requires": {
+ "path-root-regex": "^0.1.0"
+ }
+ },
+ "path-root-regex": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz",
+ "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0="
+ },
+ "path-to-regexp": {
+ "version": "0.1.7",
+ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
+ "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=",
+ "dev": true
+ },
+ "path-type": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz",
+ "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=",
+ "requires": {
+ "graceful-fs": "^4.1.2",
+ "pify": "^2.0.0",
+ "pinkie-promise": "^2.0.0"
+ }
+ },
+ "pbkdf2-compat": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/pbkdf2-compat/-/pbkdf2-compat-2.0.1.tgz",
+ "integrity": "sha1-tuDI+plJTZTgURV1gCpZpcFC8og=",
+ "dev": true
+ },
+ "pend": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",
+ "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=",
+ "dev": true
+ },
+ "phantomjs": {
+ "version": "2.1.7",
+ "resolved": "https://registry.npmjs.org/phantomjs/-/phantomjs-2.1.7.tgz",
+ "integrity": "sha1-xpEPZ5NcNyhbYRQyn8LyfV8+MTQ=",
+ "dev": true,
+ "requires": {
+ "extract-zip": "~1.5.0",
+ "fs-extra": "~0.26.4",
+ "hasha": "^2.2.0",
+ "kew": "~0.7.0",
+ "progress": "~1.1.8",
+ "request": "~2.67.0",
+ "request-progress": "~2.0.1",
+ "which": "~1.2.2"
+ },
+ "dependencies": {
+ "which": {
+ "version": "1.2.14",
+ "resolved": "https://registry.npmjs.org/which/-/which-1.2.14.tgz",
+ "integrity": "sha1-mofEN48D6CfOyvGs31bHNsAcFOU=",
+ "dev": true,
+ "requires": {
+ "isexe": "^2.0.0"
+ }
+ }
+ }
+ },
+ "pify": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
+ "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw="
+ },
+ "pinkie": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz",
+ "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA="
+ },
+ "pinkie-promise": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz",
+ "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=",
+ "requires": {
+ "pinkie": "^2.0.0"
+ }
+ },
+ "pluralize": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-1.2.1.tgz",
+ "integrity": "sha1-0aIUg/0iu0HlihL6NCGCMUCJfEU=",
+ "dev": true
+ },
+ "portastic": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/portastic/-/portastic-1.0.1.tgz",
+ "integrity": "sha1-HJgF1D+uj2pAzw28d5QJGi6dDSo=",
+ "dev": true,
+ "requires": {
+ "bluebird": "^2.9.34",
+ "commander": "^2.8.1",
+ "debug": "^2.2.0"
+ }
+ },
+ "posix-character-classes": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz",
+ "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs="
+ },
+ "preserve": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz",
+ "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=",
+ "dev": true
+ },
+ "pretty-hrtime": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz",
+ "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE="
+ },
+ "process": {
+ "version": "0.11.10",
+ "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
+ "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=",
+ "dev": true
+ },
+ "process-nextick-args": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
+ "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="
+ },
+ "progress": {
+ "version": "1.1.8",
+ "resolved": "https://registry.npmjs.org/progress/-/progress-1.1.8.tgz",
+ "integrity": "sha1-4mDHj2Fhzdmw5WzD4Khd4Xx6V74=",
+ "dev": true
+ },
+ "proxy-addr": {
+ "version": "2.0.7",
+ "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
+ "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
+ "dev": true,
+ "requires": {
+ "forwarded": "0.2.0",
+ "ipaddr.js": "1.9.1"
+ }
+ },
+ "prr": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz",
+ "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=",
+ "dev": true
+ },
+ "punycode": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
+ "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=",
+ "dev": true
+ },
+ "q": {
+ "version": "1.5.1",
+ "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz",
+ "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=",
+ "dev": true
+ },
+ "qs": {
+ "version": "5.2.1",
+ "resolved": "https://registry.npmjs.org/qs/-/qs-5.2.1.tgz",
+ "integrity": "sha1-gB/uAw4LlFDWOFrcSKTMVbRK7fw=",
+ "dev": true
+ },
+ "querystring": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz",
+ "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=",
+ "dev": true
+ },
+ "querystring-es3": {
+ "version": "0.2.1",
+ "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz",
+ "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=",
+ "dev": true
+ },
+ "randomatic": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.1.1.tgz",
+ "integrity": "sha512-TuDE5KxZ0J461RVjrJZCJc+J+zCkTb1MbH9AQUq68sMhOMcy9jLcb3BrZKgp9q9Ncltdg4QVqWrH02W2EFFVYw==",
+ "dev": true,
+ "requires": {
+ "is-number": "^4.0.0",
+ "kind-of": "^6.0.0",
+ "math-random": "^1.0.1"
+ },
+ "dependencies": {
+ "is-number": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz",
+ "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==",
+ "dev": true
+ },
+ "kind-of": {
+ "version": "6.0.3",
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
+ "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
+ "dev": true
+ }
+ }
+ },
+ "range-parser": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
+ "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
+ "dev": true
+ },
+ "raw-body": {
+ "version": "2.5.1",
+ "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz",
+ "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==",
+ "dev": true,
+ "requires": {
+ "bytes": "3.1.2",
+ "http-errors": "2.0.0",
+ "iconv-lite": "0.4.24",
+ "unpipe": "1.0.0"
+ }
+ },
+ "read-pkg": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz",
+ "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=",
+ "requires": {
+ "load-json-file": "^1.0.0",
+ "normalize-package-data": "^2.3.2",
+ "path-type": "^1.0.0"
+ }
+ },
+ "read-pkg-up": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz",
+ "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=",
+ "requires": {
+ "find-up": "^1.0.0",
+ "read-pkg": "^1.0.0"
+ }
+ },
+ "readable-stream": {
+ "version": "2.3.7",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
+ "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
+ "requires": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.3",
+ "isarray": "~1.0.0",
+ "process-nextick-args": "~2.0.0",
+ "safe-buffer": "~5.1.1",
+ "string_decoder": "~1.1.1",
+ "util-deprecate": "~1.0.1"
+ }
+ },
+ "readdirp": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz",
+ "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==",
+ "dev": true,
+ "requires": {
+ "graceful-fs": "^4.1.11",
+ "micromatch": "^3.1.10",
+ "readable-stream": "^2.0.2"
+ }
+ },
+ "readline2": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/readline2/-/readline2-1.0.1.tgz",
+ "integrity": "sha1-QQWWCP/BVHV7cV2ZidGZ/783LjU=",
+ "dev": true,
+ "requires": {
+ "code-point-at": "^1.0.0",
+ "is-fullwidth-code-point": "^1.0.0",
+ "mute-stream": "0.0.5"
+ }
+ },
+ "rechoir": {
+ "version": "0.6.2",
+ "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz",
+ "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=",
+ "requires": {
+ "resolve": "^1.1.6"
+ }
+ },
+ "regenerator-runtime": {
+ "version": "0.10.5",
+ "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz",
+ "integrity": "sha1-M2w+/BIgrc7dosn6tntaeVWjNlg=",
+ "dev": true
+ },
+ "regex-cache": {
+ "version": "0.4.4",
+ "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz",
+ "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==",
+ "dev": true,
+ "requires": {
+ "is-equal-shallow": "^0.1.3"
+ }
+ },
+ "regex-not": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz",
+ "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==",
+ "requires": {
+ "extend-shallow": "^3.0.2",
+ "safe-regex": "^1.1.0"
+ }
+ },
+ "remove-trailing-separator": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz",
+ "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8="
+ },
+ "repeat-element": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz",
+ "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ=="
+ },
+ "repeat-string": {
+ "version": "1.6.1",
+ "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz",
+ "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc="
+ },
+ "repeating": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz",
+ "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=",
+ "dev": true,
+ "requires": {
+ "is-finite": "^1.0.0"
+ }
+ },
+ "replace-ext": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz",
+ "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=",
+ "dev": true
+ },
+ "replace-homedir": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/replace-homedir/-/replace-homedir-1.0.0.tgz",
+ "integrity": "sha1-6H9tUTuSjd6AgmDBK+f+xv9ueYw=",
+ "requires": {
+ "homedir-polyfill": "^1.0.1",
+ "is-absolute": "^1.0.0",
+ "remove-trailing-separator": "^1.1.0"
+ }
+ },
+ "request": {
+ "version": "2.67.0",
+ "resolved": "https://registry.npmjs.org/request/-/request-2.67.0.tgz",
+ "integrity": "sha1-ivdHgOK/EeoK6aqWXBHxGv0nJ0I=",
+ "dev": true,
+ "requires": {
+ "aws-sign2": "~0.6.0",
+ "bl": "~1.0.0",
+ "caseless": "~0.11.0",
+ "combined-stream": "~1.0.5",
+ "extend": "~3.0.0",
+ "forever-agent": "~0.6.1",
+ "form-data": "~1.0.0-rc3",
+ "har-validator": "~2.0.2",
+ "hawk": "~3.1.0",
+ "http-signature": "~1.1.0",
+ "is-typedarray": "~1.0.0",
+ "isstream": "~0.1.2",
+ "json-stringify-safe": "~5.0.1",
+ "mime-types": "~2.1.7",
+ "node-uuid": "~1.4.7",
+ "oauth-sign": "~0.8.0",
+ "qs": "~5.2.0",
+ "stringstream": "~0.0.4",
+ "tough-cookie": "~2.2.0",
+ "tunnel-agent": "~0.4.1"
+ }
+ },
+ "request-progress": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/request-progress/-/request-progress-2.0.1.tgz",
+ "integrity": "sha1-XTa7V5YcZzqlt4jbyBQf3yO0Tgg=",
+ "dev": true,
+ "requires": {
+ "throttleit": "^1.0.0"
+ }
+ },
+ "require-directory": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
+ "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I="
+ },
+ "require-main-filename": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz",
+ "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE="
+ },
+ "resolve": {
+ "version": "1.22.0",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz",
+ "integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==",
+ "requires": {
+ "is-core-module": "^2.8.1",
+ "path-parse": "^1.0.7",
+ "supports-preserve-symlinks-flag": "^1.0.0"
+ }
+ },
+ "resolve-dir": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz",
+ "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=",
+ "requires": {
+ "expand-tilde": "^2.0.0",
+ "global-modules": "^1.0.0"
+ }
+ },
+ "resolve-url": {
+ "version": "0.2.1",
+ "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz",
+ "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo="
+ },
+ "restore-cursor": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz",
+ "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=",
+ "dev": true,
+ "requires": {
+ "exit-hook": "^1.0.0",
+ "onetime": "^1.0.0"
+ }
+ },
+ "ret": {
+ "version": "0.1.15",
+ "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz",
+ "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg=="
+ },
+ "right-align": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz",
+ "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=",
+ "dev": true,
+ "requires": {
+ "align-text": "^0.1.1"
+ }
+ },
+ "rimraf": {
+ "version": "2.7.1",
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
+ "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==",
+ "dev": true,
+ "requires": {
+ "glob": "^7.1.3"
+ },
+ "dependencies": {
+ "glob": {
+ "version": "7.2.3",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
+ "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
+ "dev": true,
+ "requires": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.1.1",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ }
+ },
+ "minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "dev": true,
+ "requires": {
+ "brace-expansion": "^1.1.7"
+ }
+ }
+ }
+ },
+ "ripemd160": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-0.2.0.tgz",
+ "integrity": "sha1-K/GYveFnys+lHAqSjoS2i74XH84=",
+ "dev": true
+ },
+ "run-async": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/run-async/-/run-async-0.1.0.tgz",
+ "integrity": "sha1-yK1KXhEGYeQCp9IbUw4AnyX444k=",
+ "dev": true,
+ "requires": {
+ "once": "^1.3.0"
+ }
+ },
+ "rx-lite": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-3.1.2.tgz",
+ "integrity": "sha1-Gc5QLKVyZl87ZHsQk5+X/RYV8QI=",
+ "dev": true
+ },
+ "safe-buffer": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
+ },
+ "safe-regex": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz",
+ "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=",
+ "requires": {
+ "ret": "~0.1.10"
+ }
+ },
+ "safer-buffer": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
+ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
+ "dev": true
+ },
+ "semver": {
+ "version": "5.7.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
+ "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ=="
+ },
+ "semver-greatest-satisfied-range": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/semver-greatest-satisfied-range/-/semver-greatest-satisfied-range-1.1.0.tgz",
+ "integrity": "sha1-E+jCZYq5aRywzXEJMkAoDTb3els=",
+ "requires": {
+ "sver-compat": "^1.5.0"
+ }
+ },
+ "send": {
+ "version": "0.18.0",
+ "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz",
+ "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==",
+ "dev": true,
+ "requires": {
+ "debug": "2.6.9",
+ "depd": "2.0.0",
+ "destroy": "1.2.0",
+ "encodeurl": "~1.0.2",
+ "escape-html": "~1.0.3",
+ "etag": "~1.8.1",
+ "fresh": "0.5.2",
+ "http-errors": "2.0.0",
+ "mime": "1.6.0",
+ "ms": "2.1.3",
+ "on-finished": "2.4.1",
+ "range-parser": "~1.2.1",
+ "statuses": "2.0.1"
+ },
+ "dependencies": {
+ "ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "dev": true
+ }
+ }
+ },
+ "sequencify": {
+ "version": "0.0.7",
+ "resolved": "https://registry.npmjs.org/sequencify/-/sequencify-0.0.7.tgz",
+ "integrity": "sha1-kM/xnQLgcCf9dn9erT57ldHnOAw=",
+ "dev": true
+ },
+ "serve-favicon": {
+ "version": "2.5.0",
+ "resolved": "https://registry.npmjs.org/serve-favicon/-/serve-favicon-2.5.0.tgz",
+ "integrity": "sha1-k10kDN/g9YBTB/3+ln2IlCosvPA=",
+ "dev": true,
+ "requires": {
+ "etag": "~1.8.1",
+ "fresh": "0.5.2",
+ "ms": "2.1.1",
+ "parseurl": "~1.3.2",
+ "safe-buffer": "5.1.1"
+ },
+ "dependencies": {
+ "ms": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
+ "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==",
+ "dev": true
+ },
+ "safe-buffer": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz",
+ "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==",
+ "dev": true
+ }
+ }
+ },
+ "serve-static": {
+ "version": "1.15.0",
+ "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz",
+ "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==",
+ "dev": true,
+ "requires": {
+ "encodeurl": "~1.0.2",
+ "escape-html": "~1.0.3",
+ "parseurl": "~1.3.3",
+ "send": "0.18.0"
+ }
+ },
+ "set-blocking": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
+ "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc="
+ },
+ "set-value": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz",
+ "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==",
+ "requires": {
+ "extend-shallow": "^2.0.1",
+ "is-extendable": "^0.1.1",
+ "is-plain-object": "^2.0.3",
+ "split-string": "^3.0.1"
+ },
+ "dependencies": {
+ "extend-shallow": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+ "requires": {
+ "is-extendable": "^0.1.0"
+ }
+ },
+ "is-plain-object": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
+ "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
+ "requires": {
+ "isobject": "^3.0.1"
+ }
+ }
+ }
+ },
+ "setimmediate": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz",
+ "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=",
+ "dev": true
+ },
+ "setprototypeof": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
+ "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==",
+ "dev": true
+ },
+ "sha.js": {
+ "version": "2.2.6",
+ "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.2.6.tgz",
+ "integrity": "sha1-F93t3F9yL7ZlAWWIlUYZd4ZzFbo=",
+ "dev": true
+ },
+ "side-channel": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz",
+ "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==",
+ "dev": true,
+ "requires": {
+ "call-bind": "^1.0.0",
+ "get-intrinsic": "^1.0.2",
+ "object-inspect": "^1.9.0"
+ }
+ },
+ "sigmund": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz",
+ "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=",
+ "dev": true
+ },
+ "signal-exit": {
+ "version": "3.0.7",
+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
+ "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==",
+ "dev": true
+ },
+ "snapdragon": {
+ "version": "0.8.2",
+ "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz",
+ "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==",
+ "requires": {
+ "base": "^0.11.1",
+ "debug": "^2.2.0",
+ "define-property": "^0.2.5",
+ "extend-shallow": "^2.0.1",
+ "map-cache": "^0.2.2",
+ "source-map": "^0.5.6",
+ "source-map-resolve": "^0.5.0",
+ "use": "^3.1.0"
+ },
+ "dependencies": {
+ "define-property": {
+ "version": "0.2.5",
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
+ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
+ "requires": {
+ "is-descriptor": "^0.1.0"
+ }
+ },
+ "extend-shallow": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+ "requires": {
+ "is-extendable": "^0.1.0"
+ }
+ }
+ }
+ },
+ "snapdragon-node": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz",
+ "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==",
+ "requires": {
+ "define-property": "^1.0.0",
+ "isobject": "^3.0.0",
+ "snapdragon-util": "^3.0.1"
+ },
+ "dependencies": {
+ "define-property": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
+ "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
+ "requires": {
+ "is-descriptor": "^1.0.0"
+ }
+ },
+ "is-accessor-descriptor": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
+ "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
+ "requires": {
+ "kind-of": "^6.0.0"
+ }
+ },
+ "is-data-descriptor": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
+ "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
+ "requires": {
+ "kind-of": "^6.0.0"
+ }
+ },
+ "is-descriptor": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
+ "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
+ "requires": {
+ "is-accessor-descriptor": "^1.0.0",
+ "is-data-descriptor": "^1.0.0",
+ "kind-of": "^6.0.2"
+ }
+ },
+ "kind-of": {
+ "version": "6.0.3",
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
+ "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw=="
+ }
+ }
+ },
+ "snapdragon-util": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz",
+ "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==",
+ "requires": {
+ "kind-of": "^3.2.0"
+ },
+ "dependencies": {
+ "kind-of": {
+ "version": "3.2.2",
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+ "requires": {
+ "is-buffer": "^1.1.5"
+ }
+ }
+ }
+ },
+ "sntp": {
+ "version": "1.0.9",
+ "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz",
+ "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=",
+ "dev": true,
+ "requires": {
+ "hoek": "2.x.x"
+ }
+ },
+ "source-list-map": {
+ "version": "0.1.8",
+ "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-0.1.8.tgz",
+ "integrity": "sha1-xVCyq1Qn9rPyH1r+rYjE9Vh7IQY=",
+ "dev": true
+ },
+ "source-map": {
+ "version": "0.5.7",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
+ "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w="
+ },
+ "source-map-resolve": {
+ "version": "0.5.3",
+ "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz",
+ "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==",
+ "requires": {
+ "atob": "^2.1.2",
+ "decode-uri-component": "^0.2.0",
+ "resolve-url": "^0.2.1",
+ "source-map-url": "^0.4.0",
+ "urix": "^0.1.0"
+ }
+ },
+ "source-map-url": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz",
+ "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw=="
+ },
+ "sourcemapped-stacktrace": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/sourcemapped-stacktrace/-/sourcemapped-stacktrace-1.1.11.tgz",
+ "integrity": "sha512-O0pcWjJqzQFVsisPlPXuNawJHHg9N9UgpJ/aDmvi9+vnS3x1C0NhwkVFzzZ1VN0Xo+bekyweoqYvBw5ZBKiNnQ==",
+ "dev": true,
+ "requires": {
+ "source-map": "0.5.6"
+ },
+ "dependencies": {
+ "source-map": {
+ "version": "0.5.6",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz",
+ "integrity": "sha1-dc449SvwczxafwwRjYEzSiu19BI=",
+ "dev": true
+ }
+ }
+ },
+ "sparkles": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.1.tgz",
+ "integrity": "sha512-dSO0DDYUahUt/0/pD/Is3VIm5TGJjludZ0HVymmhYF6eNA53PVLhnUk0znSYbH8IYBuJdCE+1luR22jNLMaQdw=="
+ },
+ "spdx-correct": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz",
+ "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==",
+ "requires": {
+ "spdx-expression-parse": "^3.0.0",
+ "spdx-license-ids": "^3.0.0"
+ }
+ },
+ "spdx-exceptions": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz",
+ "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A=="
+ },
+ "spdx-expression-parse": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz",
+ "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==",
+ "requires": {
+ "spdx-exceptions": "^2.1.0",
+ "spdx-license-ids": "^3.0.0"
+ }
+ },
+ "spdx-license-ids": {
+ "version": "3.0.11",
+ "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.11.tgz",
+ "integrity": "sha512-Ctl2BrFiM0X3MANYgj3CkygxhRmr9mi6xhejbdO960nF6EDJApTYpn0BQnDKlnNBULKiCN1n3w9EBkHK8ZWg+g=="
+ },
+ "split-string": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz",
+ "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==",
+ "requires": {
+ "extend-shallow": "^3.0.0"
+ }
+ },
+ "split2": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/split2/-/split2-2.2.0.tgz",
+ "integrity": "sha512-RAb22TG39LhI31MbreBgIuKiIKhVsawfTgEGqKHTK87aG+ul/PB8Sqoi3I7kVdRWiCfrKxK3uo4/YUkpNvhPbw==",
+ "dev": true,
+ "requires": {
+ "through2": "^2.0.2"
+ }
+ },
+ "sprintf-js": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
+ "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
+ "dev": true
+ },
+ "sshpk": {
+ "version": "1.17.0",
+ "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz",
+ "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==",
+ "dev": true,
+ "requires": {
+ "asn1": "~0.2.3",
+ "assert-plus": "^1.0.0",
+ "bcrypt-pbkdf": "^1.0.0",
+ "dashdash": "^1.12.0",
+ "ecc-jsbn": "~0.1.1",
+ "getpass": "^0.1.1",
+ "jsbn": "~0.1.0",
+ "safer-buffer": "^2.0.2",
+ "tweetnacl": "~0.14.0"
+ },
+ "dependencies": {
+ "assert-plus": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
+ "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==",
+ "dev": true
+ }
+ }
+ },
+ "stack-trace": {
+ "version": "0.0.10",
+ "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz",
+ "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA="
+ },
+ "static-extend": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz",
+ "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=",
+ "requires": {
+ "define-property": "^0.2.5",
+ "object-copy": "^0.1.0"
+ },
+ "dependencies": {
+ "define-property": {
+ "version": "0.2.5",
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
+ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
+ "requires": {
+ "is-descriptor": "^0.1.0"
+ }
+ }
+ }
+ },
+ "statuses": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
+ "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==",
+ "dev": true
+ },
+ "stream-browserify": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz",
+ "integrity": "sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==",
+ "dev": true,
+ "requires": {
+ "inherits": "~2.0.1",
+ "readable-stream": "^2.0.2"
+ }
+ },
+ "stream-combiner": {
+ "version": "0.2.2",
+ "resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.2.2.tgz",
+ "integrity": "sha1-rsjLrBd7Vrb0+kec7YwZEs7lKFg=",
+ "dev": true,
+ "requires": {
+ "duplexer": "~0.1.1",
+ "through": "~2.3.4"
+ }
+ },
+ "stream-consume": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/stream-consume/-/stream-consume-0.1.1.tgz",
+ "integrity": "sha512-tNa3hzgkjEP7XbCkbRXe1jpg+ievoa0O4SCFlMOYEscGSS4JJsckGL8swUyAa/ApGU3Ae4t6Honor4HhL+tRyg==",
+ "dev": true
+ },
+ "stream-http": {
+ "version": "2.8.3",
+ "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz",
+ "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==",
+ "dev": true,
+ "requires": {
+ "builtin-status-codes": "^3.0.0",
+ "inherits": "^2.0.1",
+ "readable-stream": "^2.3.6",
+ "to-arraybuffer": "^1.0.0",
+ "xtend": "^4.0.0"
+ }
+ },
+ "string-width": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
+ "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
+ "requires": {
+ "code-point-at": "^1.0.0",
+ "is-fullwidth-code-point": "^1.0.0",
+ "strip-ansi": "^3.0.0"
+ }
+ },
+ "string_decoder": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+ "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+ "requires": {
+ "safe-buffer": "~5.1.0"
+ }
+ },
+ "stringstream": {
+ "version": "0.0.6",
+ "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.6.tgz",
+ "integrity": "sha512-87GEBAkegbBcweToUrdzf3eLhWNg06FJTebl4BVJz/JgWy8CvEr9dRtX5qWphiynMSQlxxi+QqN0z5T32SLlhA==",
+ "dev": true
+ },
+ "strip-ansi": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
+ "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
+ "requires": {
+ "ansi-regex": "^2.0.0"
+ }
+ },
+ "strip-bom": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz",
+ "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=",
+ "requires": {
+ "is-utf8": "^0.2.0"
+ }
+ },
+ "superagent": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/superagent/-/superagent-2.3.0.tgz",
+ "integrity": "sha1-cDUpoHFOV+EjlZ3e+84ZOy5Q0RU=",
+ "dev": true,
+ "requires": {
+ "component-emitter": "^1.2.0",
+ "cookiejar": "^2.0.6",
+ "debug": "^2.2.0",
+ "extend": "^3.0.0",
+ "form-data": "1.0.0-rc4",
+ "formidable": "^1.0.17",
+ "methods": "^1.1.1",
+ "mime": "^1.3.4",
+ "qs": "^6.1.0",
+ "readable-stream": "^2.0.5"
+ },
+ "dependencies": {
+ "form-data": {
+ "version": "1.0.0-rc4",
+ "resolved": "https://registry.npmjs.org/form-data/-/form-data-1.0.0-rc4.tgz",
+ "integrity": "sha1-BaxrwiIntD5EYfSIFhVUaZ1Pi14=",
+ "dev": true,
+ "requires": {
+ "async": "^1.5.2",
+ "combined-stream": "^1.0.5",
+ "mime-types": "^2.1.10"
+ }
+ },
+ "qs": {
+ "version": "6.10.3",
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz",
+ "integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==",
+ "dev": true,
+ "requires": {
+ "side-channel": "^1.0.4"
+ }
+ }
+ }
+ },
+ "supports-color": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
+ "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
+ "dev": true
+ },
+ "supports-preserve-symlinks-flag": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
+ "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w=="
+ },
+ "sver-compat": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/sver-compat/-/sver-compat-1.5.0.tgz",
+ "integrity": "sha1-PPh9/rTQe0o/FIJ7wYaz/QxkXNg=",
+ "requires": {
+ "es6-iterator": "^2.0.1",
+ "es6-symbol": "^3.1.1"
+ }
+ },
+ "swagger-client": {
+ "version": "2.2.21",
+ "resolved": "https://registry.npmjs.org/swagger-client/-/swagger-client-2.2.21.tgz",
+ "integrity": "sha1-WWa+I0dyRm5EcW9l4yAIFm2u66Q=",
+ "dev": true,
+ "requires": {
+ "btoa": "^1.1.2",
+ "cookiejar": "^2.0.1",
+ "js-yaml": "^3.3.0",
+ "lodash-compat": "^3.5.0",
+ "q": "^1.4.1",
+ "superagent": "^2.2"
+ }
+ },
+ "tapable": {
+ "version": "0.1.10",
+ "resolved": "https://registry.npmjs.org/tapable/-/tapable-0.1.10.tgz",
+ "integrity": "sha1-KcNXB8K3DlDQdIK10gLo7URtr9Q=",
+ "dev": true
+ },
+ "thenify": {
+ "version": "3.3.1",
+ "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz",
+ "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==",
+ "dev": true,
+ "requires": {
+ "any-promise": "^1.0.0"
+ }
+ },
+ "throttleit": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-1.0.0.tgz",
+ "integrity": "sha1-nnhYNtr0Z0MUWlmEtiaNgoUorGw=",
+ "dev": true
+ },
+ "through": {
+ "version": "2.3.8",
+ "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
+ "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=",
+ "dev": true
+ },
+ "through2": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz",
+ "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==",
+ "dev": true,
+ "requires": {
+ "readable-stream": "~2.3.6",
+ "xtend": "~4.0.1"
+ }
+ },
+ "through2-reduce": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/through2-reduce/-/through2-reduce-1.1.1.tgz",
+ "integrity": "sha1-QCv5qWQO//9RNpkbx9xyoqdnJRw=",
+ "dev": true,
+ "requires": {
+ "through2": "~2.0.0",
+ "xtend": "~4.0.1"
+ }
+ },
+ "tildify": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/tildify/-/tildify-1.2.0.tgz",
+ "integrity": "sha1-3OwD9V3Km3qj5bBPIYF+tW5jWIo=",
+ "dev": true,
+ "requires": {
+ "os-homedir": "^1.0.0"
+ }
+ },
+ "time-stamp": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.1.0.tgz",
+ "integrity": "sha1-dkpaEa9QVhkhsTPztE5hhofg9cM="
+ },
+ "timers-browserify": {
+ "version": "2.0.12",
+ "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.12.tgz",
+ "integrity": "sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ==",
+ "dev": true,
+ "requires": {
+ "setimmediate": "^1.0.4"
+ }
+ },
+ "to-arraybuffer": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz",
+ "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=",
+ "dev": true
+ },
+ "to-object-path": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz",
+ "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=",
+ "requires": {
+ "kind-of": "^3.0.2"
+ },
+ "dependencies": {
+ "kind-of": {
+ "version": "3.2.2",
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+ "requires": {
+ "is-buffer": "^1.1.5"
+ }
+ }
+ }
+ },
+ "to-regex": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz",
+ "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==",
+ "requires": {
+ "define-property": "^2.0.2",
+ "extend-shallow": "^3.0.2",
+ "regex-not": "^1.0.2",
+ "safe-regex": "^1.1.0"
+ }
+ },
+ "to-regex-range": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz",
+ "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=",
+ "requires": {
+ "is-number": "^3.0.0",
+ "repeat-string": "^1.6.1"
+ }
+ },
+ "toidentifier": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
+ "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
+ "dev": true
+ },
+ "tough-cookie": {
+ "version": "2.2.2",
+ "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.2.2.tgz",
+ "integrity": "sha1-yDoYMPTl7wuT7yo0iOck+N4Basc=",
+ "dev": true
+ },
+ "tty-browserify": {
+ "version": "0.0.0",
+ "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz",
+ "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=",
+ "dev": true
+ },
+ "tunnel-agent": {
+ "version": "0.4.3",
+ "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz",
+ "integrity": "sha1-Y3PbdpCf5XDgjXNYM2Xtgop07us=",
+ "dev": true
+ },
+ "tweetnacl": {
+ "version": "0.14.5",
+ "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
+ "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=",
+ "dev": true
+ },
+ "type": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz",
+ "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg=="
+ },
+ "type-is": {
+ "version": "1.6.18",
+ "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
+ "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
+ "dev": true,
+ "requires": {
+ "media-typer": "0.3.0",
+ "mime-types": "~2.1.24"
+ }
+ },
+ "typedarray": {
+ "version": "0.0.6",
+ "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
+ "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c="
+ },
+ "uglify-js": {
+ "version": "2.7.5",
+ "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.7.5.tgz",
+ "integrity": "sha1-RhLAx7qu4rp8SH3kkErhIgefLKg=",
+ "dev": true,
+ "requires": {
+ "async": "~0.2.6",
+ "source-map": "~0.5.1",
+ "uglify-to-browserify": "~1.0.0",
+ "yargs": "~3.10.0"
+ },
+ "dependencies": {
+ "async": {
+ "version": "0.2.10",
+ "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz",
+ "integrity": "sha512-eAkdoKxU6/LkKDBzLpT+t6Ff5EtfSF4wx1WfJiPEEV7WNLnDaRXk0oVysiEPm262roaachGexwUv94WhSgN5TQ==",
+ "dev": true
+ },
+ "camelcase": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz",
+ "integrity": "sha512-wzLkDa4K/mzI1OSITC+DUyjgIl/ETNHE9QvYgy6J6Jvqyyz4C0Xfd+lQhb19sX2jMpZV4IssUn0VDVmglV+s4g==",
+ "dev": true
+ },
+ "cliui": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz",
+ "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=",
+ "dev": true,
+ "requires": {
+ "center-align": "^0.1.1",
+ "right-align": "^0.1.1",
+ "wordwrap": "0.0.2"
+ }
+ },
+ "wordwrap": {
+ "version": "0.0.2",
+ "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz",
+ "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=",
+ "dev": true
+ },
+ "yargs": {
+ "version": "3.10.0",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz",
+ "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=",
+ "dev": true,
+ "requires": {
+ "camelcase": "^1.0.2",
+ "cliui": "^2.1.0",
+ "decamelize": "^1.0.0",
+ "window-size": "0.1.0"
+ }
+ }
+ }
+ },
+ "uglify-to-browserify": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz",
+ "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=",
+ "dev": true
+ },
+ "unc-path-regex": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz",
+ "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo="
+ },
+ "union-value": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz",
+ "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==",
+ "requires": {
+ "arr-union": "^3.1.0",
+ "get-value": "^2.0.6",
+ "is-extendable": "^0.1.1",
+ "set-value": "^2.0.1"
+ }
+ },
+ "unique-stream": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-1.0.0.tgz",
+ "integrity": "sha1-1ZpKdUJ0R9mqbJHnAmP40mpLEEs=",
+ "dev": true
+ },
+ "unique-string": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-1.0.0.tgz",
+ "integrity": "sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo=",
+ "dev": true,
+ "requires": {
+ "crypto-random-string": "^1.0.0"
+ }
+ },
+ "unpipe": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
+ "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=",
+ "dev": true
+ },
+ "unset-value": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz",
+ "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=",
+ "requires": {
+ "has-value": "^0.3.1",
+ "isobject": "^3.0.0"
+ },
+ "dependencies": {
+ "has-value": {
+ "version": "0.3.1",
+ "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz",
+ "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=",
+ "requires": {
+ "get-value": "^2.0.3",
+ "has-values": "^0.1.4",
+ "isobject": "^2.0.0"
+ },
+ "dependencies": {
+ "isobject": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz",
+ "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=",
+ "requires": {
+ "isarray": "1.0.0"
+ }
+ }
+ }
+ },
+ "has-values": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz",
+ "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E="
+ }
+ }
+ },
+ "urix": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz",
+ "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI="
+ },
+ "url": {
+ "version": "0.11.0",
+ "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz",
+ "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=",
+ "dev": true,
+ "requires": {
+ "punycode": "1.3.2",
+ "querystring": "0.2.0"
+ },
+ "dependencies": {
+ "punycode": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz",
+ "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=",
+ "dev": true
+ }
+ }
+ },
+ "use": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz",
+ "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ=="
+ },
+ "user-home": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/user-home/-/user-home-1.1.1.tgz",
+ "integrity": "sha1-K1viOjK2Onyd640PKNSFcko98ZA=",
+ "dev": true
+ },
+ "util": {
+ "version": "0.10.4",
+ "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz",
+ "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==",
+ "dev": true,
+ "requires": {
+ "inherits": "2.0.3"
+ },
+ "dependencies": {
+ "inherits": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
+ "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
+ "dev": true
+ }
+ }
+ },
+ "util-deprecate": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
+ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
+ },
+ "utils-merge": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
+ "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=",
+ "dev": true
+ },
+ "uuid": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.3.tgz",
+ "integrity": "sha1-Z+LoY3lyFVMN/zGOW/nc6/1Hsho=",
+ "dev": true
+ },
+ "v8flags": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.2.0.tgz",
+ "integrity": "sha512-mH8etigqMfiGWdeXpaaqGfs6BndypxusHHcv2qSHyZkGEznCd/qAXCWWRzeowtL54147cktFOC4P5y+kl8d8Jg==",
+ "requires": {
+ "homedir-polyfill": "^1.0.1"
+ }
+ },
+ "validate-npm-package-license": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz",
+ "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==",
+ "requires": {
+ "spdx-correct": "^3.0.0",
+ "spdx-expression-parse": "^3.0.0"
+ }
+ },
+ "vary": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
+ "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=",
+ "dev": true
+ },
+ "verror": {
+ "version": "1.10.0",
+ "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
+ "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=",
+ "dev": true,
+ "requires": {
+ "assert-plus": "^1.0.0",
+ "core-util-is": "1.0.2",
+ "extsprintf": "^1.2.0"
+ },
+ "dependencies": {
+ "assert-plus": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
+ "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==",
+ "dev": true
+ },
+ "core-util-is": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
+ "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
+ "dev": true
+ }
+ }
+ },
+ "vinyl": {
+ "version": "0.5.3",
+ "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.5.3.tgz",
+ "integrity": "sha1-sEVbOPxeDPMNQyUTLkYZcMIJHN4=",
+ "dev": true,
+ "requires": {
+ "clone": "^1.0.0",
+ "clone-stats": "^0.0.1",
+ "replace-ext": "0.0.1"
+ }
+ },
+ "vinyl-fs": {
+ "version": "0.3.14",
+ "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-0.3.14.tgz",
+ "integrity": "sha1-mmhRzhysHBzqX+hsCTHWIMLPqeY=",
+ "dev": true,
+ "requires": {
+ "defaults": "^1.0.0",
+ "glob-stream": "^3.1.5",
+ "glob-watcher": "^0.0.6",
+ "graceful-fs": "^3.0.0",
+ "mkdirp": "^0.5.0",
+ "strip-bom": "^1.0.0",
+ "through2": "^0.6.1",
+ "vinyl": "^0.4.0"
+ },
+ "dependencies": {
+ "clone": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/clone/-/clone-0.2.0.tgz",
+ "integrity": "sha1-xhJqkK1Pctv1rNskPMN3JP6T/B8=",
+ "dev": true
+ },
+ "graceful-fs": {
+ "version": "3.0.12",
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.12.tgz",
+ "integrity": "sha512-J55gaCS4iTTJfTXIxSVw3EMQckcqkpdRv3IR7gu6sq0+tbC363Zx6KH/SEwXASK9JRbhyZmVjJEVJIOxYsB3Qg==",
+ "dev": true,
+ "requires": {
+ "natives": "^1.1.3"
+ }
+ },
+ "isarray": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
+ "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=",
+ "dev": true
+ },
+ "readable-stream": {
+ "version": "1.0.34",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
+ "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=",
+ "dev": true,
+ "requires": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.1",
+ "isarray": "0.0.1",
+ "string_decoder": "~0.10.x"
+ }
+ },
+ "string_decoder": {
+ "version": "0.10.31",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
+ "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=",
+ "dev": true
+ },
+ "strip-bom": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-1.0.0.tgz",
+ "integrity": "sha1-hbiGLzhEtabV7IRnqTWYFzo295Q=",
+ "dev": true,
+ "requires": {
+ "first-chunk-stream": "^1.0.0",
+ "is-utf8": "^0.2.0"
+ }
+ },
+ "through2": {
+ "version": "0.6.5",
+ "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz",
+ "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=",
+ "dev": true,
+ "requires": {
+ "readable-stream": ">=1.0.33-1 <1.1.0-0",
+ "xtend": ">=4.0.0 <4.1.0-0"
+ }
+ },
+ "vinyl": {
+ "version": "0.4.6",
+ "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.4.6.tgz",
+ "integrity": "sha1-LzVsh6VQolVGHza76ypbqL94SEc=",
+ "dev": true,
+ "requires": {
+ "clone": "^0.2.0",
+ "clone-stats": "^0.0.1"
+ }
+ }
+ }
+ },
+ "vm-browserify": {
+ "version": "0.0.4",
+ "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz",
+ "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=",
+ "dev": true,
+ "requires": {
+ "indexof": "0.0.1"
+ }
+ },
+ "walk": {
+ "version": "2.3.3",
+ "resolved": "https://registry.npmjs.org/walk/-/walk-2.3.3.tgz",
+ "integrity": "sha1-tMDoxCRkwW274dcWZnZerAeBnl8=",
+ "dev": true,
+ "requires": {
+ "foreachasync": "3.x"
+ }
+ },
+ "watchpack": {
+ "version": "0.2.9",
+ "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-0.2.9.tgz",
+ "integrity": "sha1-Yuqkq15bo1/fwBgnVibjwPXj+ws=",
+ "dev": true,
+ "requires": {
+ "async": "^0.9.0",
+ "chokidar": "^1.0.0",
+ "graceful-fs": "^4.1.2"
+ },
+ "dependencies": {
+ "async": {
+ "version": "0.9.2",
+ "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz",
+ "integrity": "sha512-l6ToIJIotphWahxxHyzK9bnLR6kM4jJIIgLShZeqLY7iboHoGkdgFl7W2/Ivi4SkMJYGKqW8vSuk0uKUj6qsSw==",
+ "dev": true
+ }
+ }
+ },
+ "webpack": {
+ "version": "1.15.0",
+ "resolved": "https://registry.npmjs.org/webpack/-/webpack-1.15.0.tgz",
+ "integrity": "sha1-T/MfU9sDM55VFkqdRo7gMklo/pg=",
+ "dev": true,
+ "requires": {
+ "acorn": "^3.0.0",
+ "async": "^1.3.0",
+ "clone": "^1.0.2",
+ "enhanced-resolve": "~0.9.0",
+ "interpret": "^0.6.4",
+ "loader-utils": "^0.2.11",
+ "memory-fs": "~0.3.0",
+ "mkdirp": "~0.5.0",
+ "node-libs-browser": "^0.7.0",
+ "optimist": "~0.6.0",
+ "supports-color": "^3.1.0",
+ "tapable": "~0.1.8",
+ "uglify-js": "~2.7.3",
+ "watchpack": "^0.2.1",
+ "webpack-core": "~0.6.9"
+ },
+ "dependencies": {
+ "interpret": {
+ "version": "0.6.6",
+ "resolved": "https://registry.npmjs.org/interpret/-/interpret-0.6.6.tgz",
+ "integrity": "sha1-/s16GOfOXKar+5U+H4YhOknxYls=",
+ "dev": true
+ },
+ "supports-color": {
+ "version": "3.2.3",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz",
+ "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=",
+ "dev": true,
+ "requires": {
+ "has-flag": "^1.0.0"
+ }
+ }
+ }
+ },
+ "webpack-core": {
+ "version": "0.6.9",
+ "resolved": "https://registry.npmjs.org/webpack-core/-/webpack-core-0.6.9.tgz",
+ "integrity": "sha1-/FcViMhVjad76e+23r3Fo7FyvcI=",
+ "dev": true,
+ "requires": {
+ "source-list-map": "~0.1.7",
+ "source-map": "~0.4.1"
+ },
+ "dependencies": {
+ "source-map": {
+ "version": "0.4.4",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz",
+ "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=",
+ "dev": true,
+ "requires": {
+ "amdefine": ">=0.0.4"
+ }
+ }
+ }
+ },
+ "webpack-stream": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/webpack-stream/-/webpack-stream-3.2.0.tgz",
+ "integrity": "sha1-Oh0WD7EdQXJ7fObzL3IkZPmLIYY=",
+ "dev": true,
+ "requires": {
+ "gulp-util": "^3.0.7",
+ "lodash.clone": "^4.3.2",
+ "lodash.some": "^4.2.2",
+ "memory-fs": "^0.3.0",
+ "through": "^2.3.8",
+ "vinyl": "^1.1.0",
+ "webpack": "^1.12.9"
+ },
+ "dependencies": {
+ "vinyl": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-1.2.0.tgz",
+ "integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=",
+ "dev": true,
+ "requires": {
+ "clone": "^1.0.0",
+ "clone-stats": "^0.0.1",
+ "replace-ext": "0.0.1"
+ }
+ }
+ }
+ },
+ "which": {
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
+ "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
+ "requires": {
+ "isexe": "^2.0.0"
+ }
+ },
+ "which-module": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz",
+ "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8="
+ },
+ "window-size": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz",
+ "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=",
+ "dev": true
+ },
+ "wordwrap": {
+ "version": "0.0.3",
+ "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz",
+ "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=",
+ "dev": true
+ },
+ "wrap-ansi": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz",
+ "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=",
+ "requires": {
+ "string-width": "^1.0.1",
+ "strip-ansi": "^3.0.1"
+ }
+ },
+ "wrappy": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
+ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
+ "dev": true
+ },
+ "write-file-atomic": {
+ "version": "2.4.3",
+ "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz",
+ "integrity": "sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==",
+ "dev": true,
+ "requires": {
+ "graceful-fs": "^4.1.11",
+ "imurmurhash": "^0.1.4",
+ "signal-exit": "^3.0.2"
+ }
+ },
+ "xdg-basedir": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz",
+ "integrity": "sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ=",
+ "dev": true
+ },
+ "xtend": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
+ "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==",
+ "dev": true
+ },
+ "y18n": {
+ "version": "3.2.2",
+ "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.2.tgz",
+ "integrity": "sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ=="
+ },
+ "yargs": {
+ "version": "7.1.2",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.2.tgz",
+ "integrity": "sha512-ZEjj/dQYQy0Zx0lgLMLR8QuaqTihnxirir7EwUHp1Axq4e3+k8jXU5K0VLbNvedv1f4EWtBonDIZm0NUr+jCcA==",
+ "requires": {
+ "camelcase": "^3.0.0",
+ "cliui": "^3.2.0",
+ "decamelize": "^1.1.1",
+ "get-caller-file": "^1.0.1",
+ "os-locale": "^1.4.0",
+ "read-pkg-up": "^1.0.1",
+ "require-directory": "^2.1.1",
+ "require-main-filename": "^1.0.1",
+ "set-blocking": "^2.0.0",
+ "string-width": "^1.0.2",
+ "which-module": "^1.0.0",
+ "y18n": "^3.2.1",
+ "yargs-parser": "^5.0.1"
+ }
+ },
+ "yargs-parser": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.1.tgz",
+ "integrity": "sha512-wpav5XYiddjXxirPoCTUPbqM0PXvJ9hiBMvuJgInvo4/lAOTZzUprArw17q2O1P2+GHhbBr18/iQwjL5Z9BqfA==",
+ "requires": {
+ "camelcase": "^3.0.0",
+ "object.assign": "^4.1.0"
+ }
+ },
+ "yauzl": {
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.4.1.tgz",
+ "integrity": "sha1-lSj0QtqxsihOWLQ3m7GU4i4MQAU=",
+ "dev": true,
+ "requires": {
+ "fd-slicer": "~1.0.1"
+ }
+ }
+ }
+}
diff --git a/examples/internal/browser/package.json b/examples/internal/browser/package.json
index 6704265ba27..729103d6f04 100644
--- a/examples/internal/browser/package.json
+++ b/examples/internal/browser/package.json
@@ -20,8 +20,11 @@
"swagger-client": "^2.1.28",
"webpack-stream": "^3.2.0",
"bower-logger": "^0.2.2",
- "mout": "^1.1.0",
+ "mout": "^1.2.4",
"bower-config": "^0.6.2",
"configstore": "^4.0.0"
+ },
+ "dependencies": {
+ "gulp-cli": "^2.3.0"
}
}
diff --git a/examples/internal/clients/abe/BUILD.bazel b/examples/internal/clients/abe/BUILD.bazel
index 7d459a7dbd6..57f5cb2da9e 100644
--- a/examples/internal/clients/abe/BUILD.bazel
+++ b/examples/internal/clients/abe/BUILD.bazel
@@ -3,39 +3,68 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library")
package(default_visibility = ["//visibility:public"])
go_library(
- name = "go_default_library",
+ name = "abe",
srcs = [
"api_a_bit_of_everything_service.go",
"api_camel_case_service_name.go",
"api_echo_rpc.go",
+ "api_snake_enum_service.go",
"client.go",
"configuration.go",
"enum_helper.go",
"model_a_bit_of_everything.go",
+ "model_a_bit_of_everything_1.go",
+ "model_a_bit_of_everything_2.go",
+ "model_a_bit_of_everything_3.go",
+ "model_a_bit_of_everything_4.go",
+ "model_a_bit_of_everything_5.go",
+ "model_a_bit_of_everything_6.go",
+ "model_a_bit_of_everything_7.go",
+ "model_a_bit_of_everything_8.go",
"model_a_bit_of_everything_nested.go",
+ "model_book.go",
"model_examplepb_a_bit_of_everything.go",
"model_examplepb_a_bit_of_everything_repeated.go",
+ "model_examplepb_bar.go",
"model_examplepb_body.go",
"model_examplepb_book.go",
"model_examplepb_check_status_response.go",
"model_examplepb_error_object.go",
"model_examplepb_error_response.go",
+ "model_examplepb_foo.go",
"model_examplepb_numeric_enum.go",
- "model_examplepb_update_v2_request.go",
+ "model_examplepb_required_message_type_request.go",
+ "model_examplepb_snake_enum_response.go",
+ "model_examplepbsnake_case_0_enum.go",
+ "model_examplepbsnake_case_enum.go",
"model_message_path_enum_nested_path_enum.go",
"model_nested_deep_enum.go",
+ "model_oneofenum_example_enum.go",
"model_pathenum_path_enum.go",
+ "model_pathenumsnake_case_for_import.go",
"model_protobuf_any.go",
"model_rpc_status.go",
"model_sub_string_message.go",
+ "model_the_book_to_update_.go",
+ "model_the_book_to_update__1.go",
+ "model_the_book_to_update_the_books_name_field_is_used_to_identify_the_book_to_be_updated_format_publisherspublisherbooksbook.go",
+ "model_update_v2_request_request_for_update_includes_the_message_and_the_update_mask.go",
+ "model_update_v2_request_request_for_update_includes_the_message_and_the_update_mask_1.go",
+ "model_v1exampledeep_pathsingle_nested_name_single_nested.go",
"response.go",
],
importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/clients/abe",
deps = [
- "//examples/internal/proto/examplepb:go_default_library",
- "//examples/internal/proto/pathenum:go_default_library",
- "//runtime:go_default_library",
- "@com_github_antihax_optional//:go_default_library",
- "@org_golang_x_oauth2//:go_default_library",
+ "//examples/internal/proto/examplepb",
+ "//examples/internal/proto/pathenum",
+ "//runtime",
+ "@com_github_antihax_optional//:optional",
+ "@org_golang_x_oauth2//:oauth2",
],
)
+
+alias(
+ name = "go_default_library",
+ actual = ":abe",
+ visibility = ["//examples:__subpackages__"],
+)
diff --git a/examples/internal/clients/abe/api/swagger.yaml b/examples/internal/clients/abe/api/swagger.yaml
index 4450f3e0c6b..8f379132e23 100644
--- a/examples/internal/clients/abe/api/swagger.yaml
+++ b/examples/internal/clients/abe/api/swagger.yaml
@@ -20,6 +20,10 @@ tags:
url: "https://github.com/grpc-ecosystem/grpc-gateway"
- name: "camelCaseServiceName"
- name: "AnotherServiceWithNoBindings"
+- name: "SnakeEnumService"
+- name: "echo rpc"
+ description: "Echo Rpc description"
+ x-traitTag: true
schemes:
- "http"
- "https"
@@ -46,6 +50,8 @@ paths:
parameters:
- in: "body"
name: "body"
+ description: "Intentionally complicated message type to cover many features\
+ \ of Protobuf."
required: true
schema:
$ref: "#/definitions/examplepbABitOfEverything"
@@ -156,10 +162,11 @@ paths:
x-optionalDataType: "Int64"
- name: "uuid"
in: "query"
- required: false
+ required: true
type: "string"
+ pattern: "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}"
+ x-internal: true
x-exportParamName: "Uuid"
- x-optionalDataType: "String"
- name: "floatValue"
in: "query"
description: "Float value field"
@@ -170,18 +177,16 @@ paths:
x-exportParamName: "FloatValue"
- name: "doubleValue"
in: "query"
- required: false
+ required: true
type: "number"
format: "double"
x-exportParamName: "DoubleValue"
- x-optionalDataType: "Float64"
- name: "int64Value"
in: "query"
- required: false
+ required: true
type: "string"
format: "int64"
x-exportParamName: "Int64Value"
- x-optionalDataType: "String"
- name: "uint64Value"
in: "query"
required: false
@@ -324,7 +329,7 @@ paths:
x-optionalDataType: "Time"
- name: "repeatedEnumValue"
in: "query"
- description: "repeated enum value. it is comma-separated in query.\n\n - ZERO:\
+ description: "repeated enum value. it is comma-separated in query\n\n - ZERO:\
\ ZERO means 0\n - ONE: ONE means 1"
required: false
type: "array"
@@ -337,7 +342,7 @@ paths:
x-exportParamName: "RepeatedEnumValue"
- name: "repeatedEnumAnnotation"
in: "query"
- description: "Repeated numeric enum title. Repeated numeric enum description.\n\
+ description: "Repeated numeric enum title\n\nRepeated numeric enum description.\n\
\n - ZERO: ZERO means 0\n - ONE: ONE means 1"
required: false
type: "array"
@@ -350,8 +355,8 @@ paths:
x-exportParamName: "RepeatedEnumAnnotation"
- name: "enumValueAnnotation"
in: "query"
- description: "Numeric enum title. Numeric enum description.\n\n - ZERO: ZERO\
- \ means 0\n - ONE: ONE means 1"
+ description: "Numeric enum title\n\nNumeric enum description.\n\n - ZERO:\
+ \ ZERO means 0\n - ONE: ONE means 1"
required: false
type: "string"
default: "ZERO"
@@ -362,7 +367,7 @@ paths:
x-optionalDataType: "String"
- name: "repeatedStringAnnotation"
in: "query"
- description: "Repeated string title. Repeated string description."
+ description: "Repeated string title\n\nRepeated string description."
required: false
type: "array"
items:
@@ -392,13 +397,13 @@ paths:
x-optionalDataType: "Int64"
- name: "requiredStringViaFieldBehaviorAnnotation"
in: "query"
- description: "mark a field as required in Open API definition."
+ description: "mark a field as required in Open API definition"
required: true
type: "string"
x-exportParamName: "RequiredStringViaFieldBehaviorAnnotation"
- name: "outputOnlyStringViaFieldBehaviorAnnotation"
in: "query"
- description: "mark a field as readonly in Open API definition."
+ description: "mark a field as readonly in Open API definition"
required: false
type: "string"
x-exportParamName: "OutputOnlyStringViaFieldBehaviorAnnotation"
@@ -409,6 +414,77 @@ paths:
type: "string"
x-exportParamName: "OptionalStringValue"
x-optionalDataType: "String"
+ - name: "productId"
+ in: "query"
+ description: "Test openapiv2 generation of repeated fields\n\nOnly digits\
+ \ are allowed."
+ required: false
+ type: "array"
+ items:
+ type: "string"
+ minLength: 1
+ maxLength: 19
+ pattern: "^[0-9]+$"
+ collectionFormat: "multi"
+ x-exportParamName: "ProductId"
+ - name: "optionalStringField"
+ in: "query"
+ description: "Test openapiv2 generation of required fields with annotation\
+ \ and jsonschema to reproduce"
+ required: false
+ type: "string"
+ x-exportParamName: "OptionalStringField"
+ x-optionalDataType: "String"
+ - name: "requiredStringField1"
+ in: "query"
+ required: true
+ type: "string"
+ x-exportParamName: "RequiredStringField1"
+ - name: "requiredStringField2"
+ in: "query"
+ required: true
+ type: "string"
+ x-exportParamName: "RequiredStringField2"
+ - name: "required_field_behavior_json_name_custom"
+ in: "query"
+ description: "Test openapiv2 handling of required json_name fields"
+ required: true
+ type: "string"
+ x-exportParamName: "RequiredFieldBehaviorJsonNameCustom"
+ - name: "required_field_schema_json_name_custom"
+ in: "query"
+ required: true
+ type: "string"
+ x-exportParamName: "RequiredFieldSchemaJsonNameCustom"
+ - name: "trailingOnly"
+ in: "query"
+ description: "Trailing only"
+ required: false
+ type: "string"
+ x-exportParamName: "TrailingOnly"
+ x-optionalDataType: "String"
+ - name: "trailingOnlyDot"
+ in: "query"
+ description: "Trailing only dot."
+ required: false
+ type: "string"
+ x-exportParamName: "TrailingOnlyDot"
+ x-optionalDataType: "String"
+ - name: "trailingBoth"
+ in: "query"
+ description: "Leading both\n\nTrailing both."
+ required: false
+ type: "string"
+ x-exportParamName: "TrailingBoth"
+ x-optionalDataType: "String"
+ - name: "trailingMultiline"
+ in: "query"
+ description: "Leading multiline\n\nThis is an example of a multi-line comment.\n\
+ \nTrailing multiline."
+ required: false
+ type: "string"
+ x-exportParamName: "TrailingMultiline"
+ x-optionalDataType: "String"
responses:
200:
description: "A successful response."
@@ -468,10 +544,11 @@ paths:
x-optionalDataType: "String"
- name: "uuid"
in: "query"
- required: false
+ required: true
type: "string"
+ pattern: "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}"
+ x-internal: true
x-exportParamName: "Uuid"
- x-optionalDataType: "String"
- name: "floatValue"
in: "query"
description: "Float value field"
@@ -482,18 +559,16 @@ paths:
x-exportParamName: "FloatValue"
- name: "doubleValue"
in: "query"
- required: false
+ required: true
type: "number"
format: "double"
x-exportParamName: "DoubleValue"
- x-optionalDataType: "Float64"
- name: "int64Value"
in: "query"
- required: false
+ required: true
type: "string"
format: "int64"
x-exportParamName: "Int64Value"
- x-optionalDataType: "String"
- name: "uint64Value"
in: "query"
required: false
@@ -636,7 +711,7 @@ paths:
x-optionalDataType: "Time"
- name: "repeatedEnumValue"
in: "query"
- description: "repeated enum value. it is comma-separated in query.\n\n - ZERO:\
+ description: "repeated enum value. it is comma-separated in query\n\n - ZERO:\
\ ZERO means 0\n - ONE: ONE means 1"
required: false
type: "array"
@@ -649,7 +724,7 @@ paths:
x-exportParamName: "RepeatedEnumValue"
- name: "repeatedEnumAnnotation"
in: "query"
- description: "Repeated numeric enum title. Repeated numeric enum description.\n\
+ description: "Repeated numeric enum title\n\nRepeated numeric enum description.\n\
\n - ZERO: ZERO means 0\n - ONE: ONE means 1"
required: false
type: "array"
@@ -662,8 +737,8 @@ paths:
x-exportParamName: "RepeatedEnumAnnotation"
- name: "enumValueAnnotation"
in: "query"
- description: "Numeric enum title. Numeric enum description.\n\n - ZERO: ZERO\
- \ means 0\n - ONE: ONE means 1"
+ description: "Numeric enum title\n\nNumeric enum description.\n\n - ZERO:\
+ \ ZERO means 0\n - ONE: ONE means 1"
required: false
type: "string"
default: "ZERO"
@@ -674,7 +749,7 @@ paths:
x-optionalDataType: "String"
- name: "repeatedStringAnnotation"
in: "query"
- description: "Repeated string title. Repeated string description."
+ description: "Repeated string title\n\nRepeated string description."
required: false
type: "array"
items:
@@ -709,13 +784,13 @@ paths:
x-optionalDataType: "Int64"
- name: "requiredStringViaFieldBehaviorAnnotation"
in: "query"
- description: "mark a field as required in Open API definition."
+ description: "mark a field as required in Open API definition"
required: true
type: "string"
x-exportParamName: "RequiredStringViaFieldBehaviorAnnotation"
- name: "outputOnlyStringViaFieldBehaviorAnnotation"
in: "query"
- description: "mark a field as readonly in Open API definition."
+ description: "mark a field as readonly in Open API definition"
required: false
type: "string"
x-exportParamName: "OutputOnlyStringViaFieldBehaviorAnnotation"
@@ -726,6 +801,77 @@ paths:
type: "string"
x-exportParamName: "OptionalStringValue"
x-optionalDataType: "String"
+ - name: "productId"
+ in: "query"
+ description: "Test openapiv2 generation of repeated fields\n\nOnly digits\
+ \ are allowed."
+ required: false
+ type: "array"
+ items:
+ type: "string"
+ minLength: 1
+ maxLength: 19
+ pattern: "^[0-9]+$"
+ collectionFormat: "multi"
+ x-exportParamName: "ProductId"
+ - name: "optionalStringField"
+ in: "query"
+ description: "Test openapiv2 generation of required fields with annotation\
+ \ and jsonschema to reproduce"
+ required: false
+ type: "string"
+ x-exportParamName: "OptionalStringField"
+ x-optionalDataType: "String"
+ - name: "requiredStringField1"
+ in: "query"
+ required: true
+ type: "string"
+ x-exportParamName: "RequiredStringField1"
+ - name: "requiredStringField2"
+ in: "query"
+ required: true
+ type: "string"
+ x-exportParamName: "RequiredStringField2"
+ - name: "required_field_behavior_json_name_custom"
+ in: "query"
+ description: "Test openapiv2 handling of required json_name fields"
+ required: true
+ type: "string"
+ x-exportParamName: "RequiredFieldBehaviorJsonNameCustom"
+ - name: "required_field_schema_json_name_custom"
+ in: "query"
+ required: true
+ type: "string"
+ x-exportParamName: "RequiredFieldSchemaJsonNameCustom"
+ - name: "trailingOnly"
+ in: "query"
+ description: "Trailing only"
+ required: false
+ type: "string"
+ x-exportParamName: "TrailingOnly"
+ x-optionalDataType: "String"
+ - name: "trailingOnlyDot"
+ in: "query"
+ description: "Trailing only dot."
+ required: false
+ type: "string"
+ x-exportParamName: "TrailingOnlyDot"
+ x-optionalDataType: "String"
+ - name: "trailingBoth"
+ in: "query"
+ description: "Leading both\n\nTrailing both."
+ required: false
+ type: "string"
+ x-exportParamName: "TrailingBoth"
+ x-optionalDataType: "String"
+ - name: "trailingMultiline"
+ in: "query"
+ description: "Leading multiline\n\nThis is an example of a multi-line comment.\n\
+ \nTrailing multiline."
+ required: false
+ type: "string"
+ x-exportParamName: "TrailingMultiline"
+ x-optionalDataType: "String"
responses:
200:
description: "A successful response."
@@ -764,17 +910,18 @@ paths:
type: "string"
x-exportParamName: "StringValue"
- in: "body"
- name: "body"
+ name: "singleNested"
required: true
schema:
$ref: "#/definitions/ABitOfEverythingNested"
- x-exportParamName: "Body"
+ x-exportParamName: "SingleNested"
- name: "uuid"
in: "query"
- required: false
+ required: true
type: "string"
+ pattern: "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}"
+ x-internal: true
x-exportParamName: "Uuid"
- x-optionalDataType: "String"
- name: "floatValue"
in: "query"
description: "Float value field"
@@ -785,18 +932,16 @@ paths:
x-exportParamName: "FloatValue"
- name: "doubleValue"
in: "query"
- required: false
+ required: true
type: "number"
format: "double"
x-exportParamName: "DoubleValue"
- x-optionalDataType: "Float64"
- name: "int64Value"
in: "query"
- required: false
+ required: true
type: "string"
format: "int64"
x-exportParamName: "Int64Value"
- x-optionalDataType: "String"
- name: "uint64Value"
in: "query"
required: false
@@ -933,7 +1078,7 @@ paths:
x-optionalDataType: "Time"
- name: "repeatedEnumValue"
in: "query"
- description: "repeated enum value. it is comma-separated in query.\n\n - ZERO:\
+ description: "repeated enum value. it is comma-separated in query\n\n - ZERO:\
\ ZERO means 0\n - ONE: ONE means 1"
required: false
type: "array"
@@ -946,7 +1091,7 @@ paths:
x-exportParamName: "RepeatedEnumValue"
- name: "repeatedEnumAnnotation"
in: "query"
- description: "Repeated numeric enum title. Repeated numeric enum description.\n\
+ description: "Repeated numeric enum title\n\nRepeated numeric enum description.\n\
\n - ZERO: ZERO means 0\n - ONE: ONE means 1"
required: false
type: "array"
@@ -959,8 +1104,8 @@ paths:
x-exportParamName: "RepeatedEnumAnnotation"
- name: "enumValueAnnotation"
in: "query"
- description: "Numeric enum title. Numeric enum description.\n\n - ZERO: ZERO\
- \ means 0\n - ONE: ONE means 1"
+ description: "Numeric enum title\n\nNumeric enum description.\n\n - ZERO:\
+ \ ZERO means 0\n - ONE: ONE means 1"
required: false
type: "string"
default: "ZERO"
@@ -971,7 +1116,7 @@ paths:
x-optionalDataType: "String"
- name: "repeatedStringAnnotation"
in: "query"
- description: "Repeated string title. Repeated string description."
+ description: "Repeated string title\n\nRepeated string description."
required: false
type: "array"
items:
@@ -1013,13 +1158,13 @@ paths:
x-optionalDataType: "Int64"
- name: "requiredStringViaFieldBehaviorAnnotation"
in: "query"
- description: "mark a field as required in Open API definition."
+ description: "mark a field as required in Open API definition"
required: true
type: "string"
x-exportParamName: "RequiredStringViaFieldBehaviorAnnotation"
- name: "outputOnlyStringViaFieldBehaviorAnnotation"
in: "query"
- description: "mark a field as readonly in Open API definition."
+ description: "mark a field as readonly in Open API definition"
required: false
type: "string"
x-exportParamName: "OutputOnlyStringViaFieldBehaviorAnnotation"
@@ -1030,6 +1175,77 @@ paths:
type: "string"
x-exportParamName: "OptionalStringValue"
x-optionalDataType: "String"
+ - name: "productId"
+ in: "query"
+ description: "Test openapiv2 generation of repeated fields\n\nOnly digits\
+ \ are allowed."
+ required: false
+ type: "array"
+ items:
+ type: "string"
+ minLength: 1
+ maxLength: 19
+ pattern: "^[0-9]+$"
+ collectionFormat: "multi"
+ x-exportParamName: "ProductId"
+ - name: "optionalStringField"
+ in: "query"
+ description: "Test openapiv2 generation of required fields with annotation\
+ \ and jsonschema to reproduce"
+ required: false
+ type: "string"
+ x-exportParamName: "OptionalStringField"
+ x-optionalDataType: "String"
+ - name: "requiredStringField1"
+ in: "query"
+ required: true
+ type: "string"
+ x-exportParamName: "RequiredStringField1"
+ - name: "requiredStringField2"
+ in: "query"
+ required: true
+ type: "string"
+ x-exportParamName: "RequiredStringField2"
+ - name: "required_field_behavior_json_name_custom"
+ in: "query"
+ description: "Test openapiv2 handling of required json_name fields"
+ required: true
+ type: "string"
+ x-exportParamName: "RequiredFieldBehaviorJsonNameCustom"
+ - name: "required_field_schema_json_name_custom"
+ in: "query"
+ required: true
+ type: "string"
+ x-exportParamName: "RequiredFieldSchemaJsonNameCustom"
+ - name: "trailingOnly"
+ in: "query"
+ description: "Trailing only"
+ required: false
+ type: "string"
+ x-exportParamName: "TrailingOnly"
+ x-optionalDataType: "String"
+ - name: "trailingOnlyDot"
+ in: "query"
+ description: "Trailing only dot."
+ required: false
+ type: "string"
+ x-exportParamName: "TrailingOnlyDot"
+ x-optionalDataType: "String"
+ - name: "trailingBoth"
+ in: "query"
+ description: "Leading both\n\nTrailing both."
+ required: false
+ type: "string"
+ x-exportParamName: "TrailingBoth"
+ x-optionalDataType: "String"
+ - name: "trailingMultiline"
+ in: "query"
+ description: "Leading multiline\n\nThis is an example of a multi-line comment.\n\
+ \nTrailing multiline."
+ required: false
+ type: "string"
+ x-exportParamName: "TrailingMultiline"
+ x-optionalDataType: "String"
responses:
200:
description: "A successful response."
@@ -1056,17 +1272,18 @@ paths:
description: "An unexpected error response."
schema:
$ref: "#/definitions/rpcStatus"
- /v1/example/a_bit_of_everything/query/{uuid}:
+ /v1/example/a_bit_of_everything/query/{uuidName}:
get:
tags:
- "ABitOfEverythingService"
operationId: "ABitOfEverythingService_GetQuery"
parameters:
- - name: "uuid"
+ - name: "uuidName"
in: "path"
required: true
type: "string"
- x-exportParamName: "Uuid"
+ x-internal: true
+ x-exportParamName: "UuidName"
- name: "singleNested.name"
in: "query"
description: "name is nested field."
@@ -1103,18 +1320,16 @@ paths:
x-exportParamName: "FloatValue"
- name: "doubleValue"
in: "query"
- required: false
+ required: true
type: "number"
format: "double"
x-exportParamName: "DoubleValue"
- x-optionalDataType: "Float64"
- name: "int64Value"
in: "query"
- required: false
+ required: true
type: "string"
format: "int64"
x-exportParamName: "Int64Value"
- x-optionalDataType: "String"
- name: "uint64Value"
in: "query"
required: false
@@ -1257,7 +1472,7 @@ paths:
x-optionalDataType: "Time"
- name: "repeatedEnumValue"
in: "query"
- description: "repeated enum value. it is comma-separated in query.\n\n - ZERO:\
+ description: "repeated enum value. it is comma-separated in query\n\n - ZERO:\
\ ZERO means 0\n - ONE: ONE means 1"
required: false
type: "array"
@@ -1270,7 +1485,7 @@ paths:
x-exportParamName: "RepeatedEnumValue"
- name: "repeatedEnumAnnotation"
in: "query"
- description: "Repeated numeric enum title. Repeated numeric enum description.\n\
+ description: "Repeated numeric enum title\n\nRepeated numeric enum description.\n\
\n - ZERO: ZERO means 0\n - ONE: ONE means 1"
required: false
type: "array"
@@ -1283,8 +1498,8 @@ paths:
x-exportParamName: "RepeatedEnumAnnotation"
- name: "enumValueAnnotation"
in: "query"
- description: "Numeric enum title. Numeric enum description.\n\n - ZERO: ZERO\
- \ means 0\n - ONE: ONE means 1"
+ description: "Numeric enum title\n\nNumeric enum description.\n\n - ZERO:\
+ \ ZERO means 0\n - ONE: ONE means 1"
required: false
type: "string"
default: "ZERO"
@@ -1295,7 +1510,7 @@ paths:
x-optionalDataType: "String"
- name: "repeatedStringAnnotation"
in: "query"
- description: "Repeated string title. Repeated string description."
+ description: "Repeated string title\n\nRepeated string description."
required: false
type: "array"
items:
@@ -1337,13 +1552,13 @@ paths:
x-optionalDataType: "Int64"
- name: "requiredStringViaFieldBehaviorAnnotation"
in: "query"
- description: "mark a field as required in Open API definition."
+ description: "mark a field as required in Open API definition"
required: true
type: "string"
x-exportParamName: "RequiredStringViaFieldBehaviorAnnotation"
- name: "outputOnlyStringViaFieldBehaviorAnnotation"
in: "query"
- description: "mark a field as readonly in Open API definition."
+ description: "mark a field as readonly in Open API definition"
required: false
type: "string"
x-exportParamName: "OutputOnlyStringViaFieldBehaviorAnnotation"
@@ -1354,10 +1569,82 @@ paths:
type: "string"
x-exportParamName: "OptionalStringValue"
x-optionalDataType: "String"
+ - name: "productId"
+ in: "query"
+ description: "Test openapiv2 generation of repeated fields\n\nOnly digits\
+ \ are allowed."
+ required: false
+ type: "array"
+ items:
+ type: "string"
+ minLength: 1
+ maxLength: 19
+ pattern: "^[0-9]+$"
+ collectionFormat: "multi"
+ x-exportParamName: "ProductId"
+ - name: "optionalStringField"
+ in: "query"
+ description: "Test openapiv2 generation of required fields with annotation\
+ \ and jsonschema to reproduce"
+ required: false
+ type: "string"
+ x-exportParamName: "OptionalStringField"
+ x-optionalDataType: "String"
+ - name: "requiredStringField1"
+ in: "query"
+ required: true
+ type: "string"
+ x-exportParamName: "RequiredStringField1"
+ - name: "requiredStringField2"
+ in: "query"
+ required: true
+ type: "string"
+ x-exportParamName: "RequiredStringField2"
+ - name: "required_field_behavior_json_name_custom"
+ in: "query"
+ description: "Test openapiv2 handling of required json_name fields"
+ required: true
+ type: "string"
+ x-exportParamName: "RequiredFieldBehaviorJsonNameCustom"
+ - name: "required_field_schema_json_name_custom"
+ in: "query"
+ required: true
+ type: "string"
+ x-exportParamName: "RequiredFieldSchemaJsonNameCustom"
+ - name: "trailingOnly"
+ in: "query"
+ description: "Trailing only"
+ required: false
+ type: "string"
+ x-exportParamName: "TrailingOnly"
+ x-optionalDataType: "String"
+ - name: "trailingOnlyDot"
+ in: "query"
+ description: "Trailing only dot."
+ required: false
+ type: "string"
+ x-exportParamName: "TrailingOnlyDot"
+ x-optionalDataType: "String"
+ - name: "trailingBoth"
+ in: "query"
+ description: "Leading both\n\nTrailing both."
+ required: false
+ type: "string"
+ x-exportParamName: "TrailingBoth"
+ x-optionalDataType: "String"
+ - name: "trailingMultiline"
+ in: "query"
+ description: "Leading multiline\n\nThis is an example of a multi-line comment.\n\
+ \nTrailing multiline."
+ required: false
+ type: "string"
+ x-exportParamName: "TrailingMultiline"
+ x-optionalDataType: "String"
responses:
200:
description: "A successful response."
- schema: {}
+ schema:
+ type: "object"
403:
description: "Returned when the user does not have permission to access\
\ the resource."
@@ -1445,6 +1732,7 @@ paths:
in: "path"
required: true
type: "string"
+ pattern: "strprefix/[^/]+"
x-exportParamName: "StringValue"
- name: "uint32Value"
in: "path"
@@ -1514,124 +1802,230 @@ paths:
- "ZERO"
- "ONE"
x-exportParamName: "EnumValueAnnotation"
- responses:
- 200:
- description: "A successful response."
- schema:
- $ref: "#/definitions/examplepbABitOfEverything"
- 403:
- description: "Returned when the user does not have permission to access\
- \ the resource."
- schema: {}
- 404:
- description: "Returned when the resource does not exist."
- schema:
- type: "string"
- format: "string"
- 418:
- description: "I'm a teapot."
- schema:
- $ref: "#/definitions/examplepbNumericEnum"
- 500:
- description: "Server error"
- schema:
- $ref: "#/definitions/examplepbErrorResponse"
- default:
- description: "An unexpected error response."
- schema:
- $ref: "#/definitions/rpcStatus"
- /v1/example/a_bit_of_everything/{uuid}:
- get:
- tags:
- - "ABitOfEverythingService"
- operationId: "ABitOfEverythingService_Lookup"
- parameters:
+ - name: "singleNested.name"
+ in: "query"
+ description: "name is nested field."
+ required: false
+ type: "string"
+ x-exportParamName: "SingleNestedName"
+ x-optionalDataType: "String"
+ - name: "singleNested.amount"
+ in: "query"
+ required: false
+ type: "integer"
+ format: "int64"
+ x-exportParamName: "SingleNestedAmount"
+ x-optionalDataType: "Int64"
+ - name: "singleNested.ok"
+ in: "query"
+ description: "DeepEnum description.\n\n - FALSE: FALSE is false.\n - TRUE:\
+ \ TRUE is true."
+ required: false
+ type: "string"
+ default: "FALSE"
+ enum:
+ - "FALSE"
+ - "TRUE"
+ x-exportParamName: "SingleNestedOk"
+ x-optionalDataType: "String"
- name: "uuid"
- in: "path"
+ in: "query"
required: true
type: "string"
+ pattern: "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}"
+ x-internal: true
x-exportParamName: "Uuid"
- responses:
- 200:
- description: "A successful response."
- schema:
- $ref: "#/definitions/examplepbABitOfEverything"
- 403:
- description: "Returned when the user does not have permission to access\
- \ the resource."
- schema: {}
- 404:
- description: "Returned when the resource does not exist."
- schema:
- type: "string"
- format: "string"
- 418:
- description: "I'm a teapot."
- schema:
- $ref: "#/definitions/examplepbNumericEnum"
- 500:
- description: "Server error"
- schema:
- $ref: "#/definitions/examplepbErrorResponse"
- default:
- description: "An unexpected error response."
- schema:
- $ref: "#/definitions/rpcStatus"
- put:
- tags:
- - "ABitOfEverythingService"
- operationId: "ABitOfEverythingService_Update"
- parameters:
- - name: "uuid"
- in: "path"
+ - name: "bytesValue"
+ in: "query"
+ required: false
+ type: "string"
+ format: "byte"
+ x-exportParamName: "BytesValue"
+ x-optionalDataType: "String"
+ - name: "repeatedStringValue"
+ in: "query"
+ required: false
+ type: "array"
+ items:
+ type: "string"
+ collectionFormat: "multi"
+ x-exportParamName: "RepeatedStringValue"
+ - name: "oneofString"
+ in: "query"
+ required: false
+ type: "string"
+ x-exportParamName: "OneofString"
+ x-optionalDataType: "String"
+ - name: "timestampValue"
+ in: "query"
+ required: false
+ type: "string"
+ format: "date-time"
+ x-exportParamName: "TimestampValue"
+ x-optionalDataType: "Time"
+ - name: "repeatedEnumValue"
+ in: "query"
+ description: "repeated enum value. it is comma-separated in query\n\n - ZERO:\
+ \ ZERO means 0\n - ONE: ONE means 1"
+ required: false
+ type: "array"
+ items:
+ type: "string"
+ enum:
+ - "ZERO"
+ - "ONE"
+ collectionFormat: "multi"
+ x-exportParamName: "RepeatedEnumValue"
+ - name: "repeatedEnumAnnotation"
+ in: "query"
+ description: "Repeated numeric enum title\n\nRepeated numeric enum description.\n\
+ \n - ZERO: ZERO means 0\n - ONE: ONE means 1"
+ required: false
+ type: "array"
+ items:
+ type: "string"
+ enum:
+ - "ZERO"
+ - "ONE"
+ collectionFormat: "multi"
+ x-exportParamName: "RepeatedEnumAnnotation"
+ - name: "repeatedStringAnnotation"
+ in: "query"
+ description: "Repeated string title\n\nRepeated string description."
+ required: false
+ type: "array"
+ items:
+ type: "string"
+ collectionFormat: "multi"
+ x-exportParamName: "RepeatedStringAnnotation"
+ - name: "nestedAnnotation.name"
+ in: "query"
+ description: "name is nested field."
+ required: false
+ type: "string"
+ x-exportParamName: "NestedAnnotationName"
+ x-optionalDataType: "String"
+ - name: "nestedAnnotation.amount"
+ in: "query"
+ required: false
+ type: "integer"
+ format: "int64"
+ x-exportParamName: "NestedAnnotationAmount"
+ x-optionalDataType: "Int64"
+ - name: "nestedAnnotation.ok"
+ in: "query"
+ description: "DeepEnum description.\n\n - FALSE: FALSE is false.\n - TRUE:\
+ \ TRUE is true."
+ required: false
+ type: "string"
+ default: "FALSE"
+ enum:
+ - "FALSE"
+ - "TRUE"
+ x-exportParamName: "NestedAnnotationOk"
+ x-optionalDataType: "String"
+ - name: "int64OverrideType"
+ in: "query"
+ required: false
+ type: "integer"
+ format: "int64"
+ x-exportParamName: "Int64OverrideType"
+ x-optionalDataType: "Int64"
+ - name: "requiredStringViaFieldBehaviorAnnotation"
+ in: "query"
+ description: "mark a field as required in Open API definition"
required: true
type: "string"
- x-exportParamName: "Uuid"
- - in: "body"
- name: "body"
+ x-exportParamName: "RequiredStringViaFieldBehaviorAnnotation"
+ - name: "outputOnlyStringViaFieldBehaviorAnnotation"
+ in: "query"
+ description: "mark a field as readonly in Open API definition"
+ required: false
+ type: "string"
+ x-exportParamName: "OutputOnlyStringViaFieldBehaviorAnnotation"
+ x-optionalDataType: "String"
+ - name: "optionalStringValue"
+ in: "query"
+ required: false
+ type: "string"
+ x-exportParamName: "OptionalStringValue"
+ x-optionalDataType: "String"
+ - name: "productId"
+ in: "query"
+ description: "Test openapiv2 generation of repeated fields\n\nOnly digits\
+ \ are allowed."
+ required: false
+ type: "array"
+ items:
+ type: "string"
+ minLength: 1
+ maxLength: 19
+ pattern: "^[0-9]+$"
+ collectionFormat: "multi"
+ x-exportParamName: "ProductId"
+ - name: "optionalStringField"
+ in: "query"
+ description: "Test openapiv2 generation of required fields with annotation\
+ \ and jsonschema to reproduce"
+ required: false
+ type: "string"
+ x-exportParamName: "OptionalStringField"
+ x-optionalDataType: "String"
+ - name: "requiredStringField1"
+ in: "query"
required: true
- schema:
- $ref: "#/definitions/A bit of everything"
- x-exportParamName: "Body"
- responses:
- 200:
- description: "A successful response."
- schema: {}
- 403:
- description: "Returned when the user does not have permission to access\
- \ the resource."
- schema: {}
- 404:
- description: "Returned when the resource does not exist."
- schema:
- type: "string"
- format: "string"
- 418:
- description: "I'm a teapot."
- schema:
- $ref: "#/definitions/examplepbNumericEnum"
- 500:
- description: "Server error"
- schema:
- $ref: "#/definitions/examplepbErrorResponse"
- default:
- description: "An unexpected error response."
- schema:
- $ref: "#/definitions/rpcStatus"
- delete:
- tags:
- - "ABitOfEverythingService"
- operationId: "ABitOfEverythingService_Delete"
- parameters:
- - name: "uuid"
- in: "path"
+ type: "string"
+ x-exportParamName: "RequiredStringField1"
+ - name: "requiredStringField2"
+ in: "query"
required: true
type: "string"
- x-exportParamName: "Uuid"
+ x-exportParamName: "RequiredStringField2"
+ - name: "required_field_behavior_json_name_custom"
+ in: "query"
+ description: "Test openapiv2 handling of required json_name fields"
+ required: true
+ type: "string"
+ x-exportParamName: "RequiredFieldBehaviorJsonNameCustom"
+ - name: "required_field_schema_json_name_custom"
+ in: "query"
+ required: true
+ type: "string"
+ x-exportParamName: "RequiredFieldSchemaJsonNameCustom"
+ - name: "trailingOnly"
+ in: "query"
+ description: "Trailing only"
+ required: false
+ type: "string"
+ x-exportParamName: "TrailingOnly"
+ x-optionalDataType: "String"
+ - name: "trailingOnlyDot"
+ in: "query"
+ description: "Trailing only dot."
+ required: false
+ type: "string"
+ x-exportParamName: "TrailingOnlyDot"
+ x-optionalDataType: "String"
+ - name: "trailingBoth"
+ in: "query"
+ description: "Leading both\n\nTrailing both."
+ required: false
+ type: "string"
+ x-exportParamName: "TrailingBoth"
+ x-optionalDataType: "String"
+ - name: "trailingMultiline"
+ in: "query"
+ description: "Leading multiline\n\nThis is an example of a multi-line comment.\n\
+ \nTrailing multiline."
+ required: false
+ type: "string"
+ x-exportParamName: "TrailingMultiline"
+ x-optionalDataType: "String"
responses:
200:
description: "A successful response."
- schema: {}
+ schema:
+ $ref: "#/definitions/examplepbABitOfEverything"
403:
description: "Returned when the user does not have permission to access\
\ the resource."
@@ -1653,261 +2047,405 @@ paths:
description: "An unexpected error response."
schema:
$ref: "#/definitions/rpcStatus"
- security:
- - ApiKeyAuth: []
- OAuth2:
- - "read"
- - "write"
- x-irreversible: true
- ? /v1/example/a_bit_of_everything_repeated/{pathRepeatedFloatValue}/{pathRepeatedDoubleValue}/{pathRepeatedInt64Value}/{pathRepeatedUint64Value}/{pathRepeatedInt32Value}/{pathRepeatedFixed64Value}/{pathRepeatedFixed32Value}/{pathRepeatedBoolValue}/{pathRepeatedStringValue}/{pathRepeatedBytesValue}/{pathRepeatedUint32Value}/{pathRepeatedEnumValue}/{pathRepeatedSfixed32Value}/{pathRepeatedSfixed64Value}/{pathRepeatedSint32Value}/{pathRepeatedSint64Value}
- : get:
+ /v1/example/a_bit_of_everything/{uuidName}:
+ head:
tags:
- "ABitOfEverythingService"
- operationId: "ABitOfEverythingService_GetRepeatedQuery"
+ operationId: "ABitOfEverythingService_Exists"
parameters:
- - name: "pathRepeatedFloatValue"
- in: "path"
- description: "repeated values. they are comma-separated in path"
- required: true
- type: "array"
- items:
- type: "number"
- format: "float"
- collectionFormat: "csv"
- minItems: 1
- x-exportParamName: "PathRepeatedFloatValue"
- - name: "pathRepeatedDoubleValue"
- in: "path"
- required: true
- type: "array"
- items:
- type: "number"
- format: "double"
- collectionFormat: "csv"
- minItems: 1
- x-exportParamName: "PathRepeatedDoubleValue"
- - name: "pathRepeatedInt64Value"
+ - name: "uuidName"
in: "path"
required: true
- type: "array"
- items:
- type: "string"
- format: "int64"
- collectionFormat: "csv"
- minItems: 1
- x-exportParamName: "PathRepeatedInt64Value"
- - name: "pathRepeatedUint64Value"
- in: "path"
+ type: "string"
+ x-internal: true
+ x-exportParamName: "UuidName"
+ - name: "singleNested.name"
+ in: "query"
+ description: "name is nested field."
+ required: false
+ type: "string"
+ x-exportParamName: "SingleNestedName"
+ x-optionalDataType: "String"
+ - name: "singleNested.amount"
+ in: "query"
+ required: false
+ type: "integer"
+ format: "int64"
+ x-exportParamName: "SingleNestedAmount"
+ x-optionalDataType: "Int64"
+ - name: "singleNested.ok"
+ in: "query"
+ description: "DeepEnum description.\n\n - FALSE: FALSE is false.\n - TRUE:\
+ \ TRUE is true."
+ required: false
+ type: "string"
+ default: "FALSE"
+ enum:
+ - "FALSE"
+ - "TRUE"
+ x-exportParamName: "SingleNestedOk"
+ x-optionalDataType: "String"
+ - name: "floatValue"
+ in: "query"
+ description: "Float value field"
required: true
- type: "array"
- items:
- type: "string"
- format: "uint64"
- collectionFormat: "csv"
- minItems: 1
- x-exportParamName: "PathRepeatedUint64Value"
- - name: "pathRepeatedInt32Value"
- in: "path"
+ type: "number"
+ default: 0.2
+ format: "float"
+ x-exportParamName: "FloatValue"
+ - name: "doubleValue"
+ in: "query"
required: true
- type: "array"
- items:
- type: "integer"
- format: "int32"
- collectionFormat: "csv"
- minItems: 1
- x-exportParamName: "PathRepeatedInt32Value"
- - name: "pathRepeatedFixed64Value"
- in: "path"
+ type: "number"
+ format: "double"
+ x-exportParamName: "DoubleValue"
+ - name: "int64Value"
+ in: "query"
required: true
+ type: "string"
+ format: "int64"
+ x-exportParamName: "Int64Value"
+ - name: "uint64Value"
+ in: "query"
+ required: false
+ type: "string"
+ format: "uint64"
+ x-exportParamName: "Uint64Value"
+ x-optionalDataType: "String"
+ - name: "int32Value"
+ in: "query"
+ required: false
+ type: "integer"
+ format: "int32"
+ x-exportParamName: "Int32Value"
+ x-optionalDataType: "Int32"
+ - name: "fixed64Value"
+ in: "query"
+ required: false
+ type: "string"
+ format: "uint64"
+ x-exportParamName: "Fixed64Value"
+ x-optionalDataType: "String"
+ - name: "fixed32Value"
+ in: "query"
+ required: false
+ type: "integer"
+ format: "int64"
+ x-exportParamName: "Fixed32Value"
+ x-optionalDataType: "Int64"
+ - name: "boolValue"
+ in: "query"
+ required: false
+ type: "boolean"
+ x-exportParamName: "BoolValue"
+ x-optionalDataType: "Bool"
+ - name: "stringValue"
+ in: "query"
+ required: false
+ type: "string"
+ x-exportParamName: "StringValue"
+ x-optionalDataType: "String"
+ - name: "bytesValue"
+ in: "query"
+ required: false
+ type: "string"
+ format: "byte"
+ x-exportParamName: "BytesValue"
+ x-optionalDataType: "String"
+ - name: "uint32Value"
+ in: "query"
+ required: false
+ type: "integer"
+ format: "int64"
+ x-exportParamName: "Uint32Value"
+ x-optionalDataType: "Int64"
+ - name: "enumValue"
+ in: "query"
+ description: " - ZERO: ZERO means 0\n - ONE: ONE means 1"
+ required: false
+ type: "string"
+ default: "ZERO"
+ enum:
+ - "ZERO"
+ - "ONE"
+ x-exportParamName: "EnumValue"
+ x-optionalDataType: "String"
+ - name: "pathEnumValue"
+ in: "query"
+ required: false
+ type: "string"
+ default: "ABC"
+ enum:
+ - "ABC"
+ - "DEF"
+ x-exportParamName: "PathEnumValue"
+ x-optionalDataType: "String"
+ - name: "nestedPathEnumValue"
+ in: "query"
+ required: false
+ type: "string"
+ default: "GHI"
+ enum:
+ - "GHI"
+ - "JKL"
+ x-exportParamName: "NestedPathEnumValue"
+ x-optionalDataType: "String"
+ - name: "sfixed32Value"
+ in: "query"
+ required: false
+ type: "integer"
+ format: "int32"
+ x-exportParamName: "Sfixed32Value"
+ x-optionalDataType: "Int32"
+ - name: "sfixed64Value"
+ in: "query"
+ required: false
+ type: "string"
+ format: "int64"
+ x-exportParamName: "Sfixed64Value"
+ x-optionalDataType: "String"
+ - name: "sint32Value"
+ in: "query"
+ required: false
+ type: "integer"
+ format: "int32"
+ x-exportParamName: "Sint32Value"
+ x-optionalDataType: "Int32"
+ - name: "sint64Value"
+ in: "query"
+ required: false
+ type: "string"
+ format: "int64"
+ x-exportParamName: "Sint64Value"
+ x-optionalDataType: "String"
+ - name: "repeatedStringValue"
+ in: "query"
+ required: false
type: "array"
items:
type: "string"
- format: "uint64"
- collectionFormat: "csv"
- minItems: 1
- x-exportParamName: "PathRepeatedFixed64Value"
- - name: "pathRepeatedFixed32Value"
- in: "path"
- required: true
+ collectionFormat: "multi"
+ x-exportParamName: "RepeatedStringValue"
+ - name: "oneofString"
+ in: "query"
+ required: false
+ type: "string"
+ x-exportParamName: "OneofString"
+ x-optionalDataType: "String"
+ - name: "nonConventionalNameValue"
+ in: "query"
+ required: false
+ type: "string"
+ x-exportParamName: "NonConventionalNameValue"
+ x-optionalDataType: "String"
+ - name: "timestampValue"
+ in: "query"
+ required: false
+ type: "string"
+ format: "date-time"
+ x-exportParamName: "TimestampValue"
+ x-optionalDataType: "Time"
+ - name: "repeatedEnumValue"
+ in: "query"
+ description: "repeated enum value. it is comma-separated in query\n\n - ZERO:\
+ \ ZERO means 0\n - ONE: ONE means 1"
+ required: false
type: "array"
items:
- type: "integer"
- format: "int64"
- collectionFormat: "csv"
- minItems: 1
- x-exportParamName: "PathRepeatedFixed32Value"
- - name: "pathRepeatedBoolValue"
- in: "path"
- required: true
+ type: "string"
+ enum:
+ - "ZERO"
+ - "ONE"
+ collectionFormat: "multi"
+ x-exportParamName: "RepeatedEnumValue"
+ - name: "repeatedEnumAnnotation"
+ in: "query"
+ description: "Repeated numeric enum title\n\nRepeated numeric enum description.\n\
+ \n - ZERO: ZERO means 0\n - ONE: ONE means 1"
+ required: false
type: "array"
items:
- type: "boolean"
- collectionFormat: "csv"
- minItems: 1
- x-exportParamName: "PathRepeatedBoolValue"
- - name: "pathRepeatedStringValue"
- in: "path"
- required: true
+ type: "string"
+ enum:
+ - "ZERO"
+ - "ONE"
+ collectionFormat: "multi"
+ x-exportParamName: "RepeatedEnumAnnotation"
+ - name: "enumValueAnnotation"
+ in: "query"
+ description: "Numeric enum title\n\nNumeric enum description.\n\n - ZERO:\
+ \ ZERO means 0\n - ONE: ONE means 1"
+ required: false
+ type: "string"
+ default: "ZERO"
+ enum:
+ - "ZERO"
+ - "ONE"
+ x-exportParamName: "EnumValueAnnotation"
+ x-optionalDataType: "String"
+ - name: "repeatedStringAnnotation"
+ in: "query"
+ description: "Repeated string title\n\nRepeated string description."
+ required: false
type: "array"
items:
type: "string"
- collectionFormat: "csv"
- minItems: 1
- x-exportParamName: "PathRepeatedStringValue"
- - name: "pathRepeatedBytesValue"
- in: "path"
- required: true
- type: "array"
- items:
- type: "string"
- format: "byte"
- pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"
- collectionFormat: "csv"
- minItems: 1
- x-exportParamName: "PathRepeatedBytesValue"
- - name: "pathRepeatedUint32Value"
- in: "path"
- required: true
- type: "array"
- items:
- type: "integer"
- format: "int64"
- collectionFormat: "csv"
- minItems: 1
- x-exportParamName: "PathRepeatedUint32Value"
- - name: "pathRepeatedEnumValue"
- in: "path"
+ collectionFormat: "multi"
+ x-exportParamName: "RepeatedStringAnnotation"
+ - name: "nestedAnnotation.name"
+ in: "query"
+ description: "name is nested field."
+ required: false
+ type: "string"
+ x-exportParamName: "NestedAnnotationName"
+ x-optionalDataType: "String"
+ - name: "nestedAnnotation.amount"
+ in: "query"
+ required: false
+ type: "integer"
+ format: "int64"
+ x-exportParamName: "NestedAnnotationAmount"
+ x-optionalDataType: "Int64"
+ - name: "nestedAnnotation.ok"
+ in: "query"
+ description: "DeepEnum description.\n\n - FALSE: FALSE is false.\n - TRUE:\
+ \ TRUE is true."
+ required: false
+ type: "string"
+ default: "FALSE"
+ enum:
+ - "FALSE"
+ - "TRUE"
+ x-exportParamName: "NestedAnnotationOk"
+ x-optionalDataType: "String"
+ - name: "int64OverrideType"
+ in: "query"
+ required: false
+ type: "integer"
+ format: "int64"
+ x-exportParamName: "Int64OverrideType"
+ x-optionalDataType: "Int64"
+ - name: "requiredStringViaFieldBehaviorAnnotation"
+ in: "query"
+ description: "mark a field as required in Open API definition"
required: true
+ type: "string"
+ x-exportParamName: "RequiredStringViaFieldBehaviorAnnotation"
+ - name: "outputOnlyStringViaFieldBehaviorAnnotation"
+ in: "query"
+ description: "mark a field as readonly in Open API definition"
+ required: false
+ type: "string"
+ x-exportParamName: "OutputOnlyStringViaFieldBehaviorAnnotation"
+ x-optionalDataType: "String"
+ - name: "optionalStringValue"
+ in: "query"
+ required: false
+ type: "string"
+ x-exportParamName: "OptionalStringValue"
+ x-optionalDataType: "String"
+ - name: "productId"
+ in: "query"
+ description: "Test openapiv2 generation of repeated fields\n\nOnly digits\
+ \ are allowed."
+ required: false
type: "array"
items:
type: "string"
- enum:
- - "ZERO"
- - "ONE"
- collectionFormat: "csv"
- minItems: 1
- x-exportParamName: "PathRepeatedEnumValue"
- - name: "pathRepeatedSfixed32Value"
- in: "path"
+ minLength: 1
+ maxLength: 19
+ pattern: "^[0-9]+$"
+ collectionFormat: "multi"
+ x-exportParamName: "ProductId"
+ - name: "optionalStringField"
+ in: "query"
+ description: "Test openapiv2 generation of required fields with annotation\
+ \ and jsonschema to reproduce"
+ required: false
+ type: "string"
+ x-exportParamName: "OptionalStringField"
+ x-optionalDataType: "String"
+ - name: "requiredStringField1"
+ in: "query"
required: true
- type: "array"
- items:
- type: "integer"
- format: "int32"
- collectionFormat: "csv"
- minItems: 1
- x-exportParamName: "PathRepeatedSfixed32Value"
- - name: "pathRepeatedSfixed64Value"
- in: "path"
+ type: "string"
+ x-exportParamName: "RequiredStringField1"
+ - name: "requiredStringField2"
+ in: "query"
required: true
- type: "array"
- items:
- type: "string"
- format: "int64"
- collectionFormat: "csv"
- minItems: 1
- x-exportParamName: "PathRepeatedSfixed64Value"
- - name: "pathRepeatedSint32Value"
- in: "path"
+ type: "string"
+ x-exportParamName: "RequiredStringField2"
+ - name: "required_field_behavior_json_name_custom"
+ in: "query"
+ description: "Test openapiv2 handling of required json_name fields"
required: true
- type: "array"
- items:
- type: "integer"
- format: "int32"
- collectionFormat: "csv"
- minItems: 1
- x-exportParamName: "PathRepeatedSint32Value"
- - name: "pathRepeatedSint64Value"
- in: "path"
+ type: "string"
+ x-exportParamName: "RequiredFieldBehaviorJsonNameCustom"
+ - name: "required_field_schema_json_name_custom"
+ in: "query"
required: true
- type: "array"
- items:
- type: "string"
- format: "int64"
- collectionFormat: "csv"
- minItems: 1
- x-exportParamName: "PathRepeatedSint64Value"
- responses:
- 200:
- description: "A successful response."
- schema:
- $ref: "#/definitions/examplepbABitOfEverythingRepeated"
- 403:
- description: "Returned when the user does not have permission to access\
- \ the resource."
- schema: {}
- 404:
- description: "Returned when the resource does not exist."
- schema:
- type: "string"
- format: "string"
- 418:
- description: "I'm a teapot."
- schema:
- $ref: "#/definitions/examplepbNumericEnum"
- 500:
- description: "Server error"
- schema:
- $ref: "#/definitions/examplepbErrorResponse"
- default:
- description: "An unexpected error response."
- schema:
- $ref: "#/definitions/rpcStatus"
- /v1/example/checkStatus:
- get:
- tags:
- - "ABitOfEverythingService"
- operationId: "ABitOfEverythingService_CheckStatus"
- parameters: []
+ type: "string"
+ x-exportParamName: "RequiredFieldSchemaJsonNameCustom"
+ - name: "trailingOnly"
+ in: "query"
+ description: "Trailing only"
+ required: false
+ type: "string"
+ x-exportParamName: "TrailingOnly"
+ x-optionalDataType: "String"
+ - name: "trailingOnlyDot"
+ in: "query"
+ description: "Trailing only dot."
+ required: false
+ type: "string"
+ x-exportParamName: "TrailingOnlyDot"
+ x-optionalDataType: "String"
+ - name: "trailingBoth"
+ in: "query"
+ description: "Leading both\n\nTrailing both."
+ required: false
+ type: "string"
+ x-exportParamName: "TrailingBoth"
+ x-optionalDataType: "String"
+ - name: "trailingMultiline"
+ in: "query"
+ description: "Leading multiline\n\nThis is an example of a multi-line comment.\n\
+ \nTrailing multiline."
+ required: false
+ type: "string"
+ x-exportParamName: "TrailingMultiline"
+ x-optionalDataType: "String"
responses:
200:
description: "A successful response."
schema:
- $ref: "#/definitions/examplepbCheckStatusResponse"
- 403:
- description: "Returned when the user does not have permission to access\
- \ the resource."
- schema: {}
- 404:
- description: "Returned when the resource does not exist."
- schema:
- type: "string"
- format: "string"
- 418:
- description: "I'm a teapot."
- schema:
- $ref: "#/definitions/examplepbNumericEnum"
- 500:
- description: "Server error"
- schema:
- $ref: "#/definitions/examplepbErrorResponse"
+ type: "object"
default:
description: "An unexpected error response."
schema:
$ref: "#/definitions/rpcStatus"
- /v1/example/deep_path/{singleNested.name}:
- post:
+ put:
tags:
- "ABitOfEverythingService"
- operationId: "ABitOfEverythingService_DeepPathEcho"
+ operationId: "ABitOfEverythingService_Update"
parameters:
- - name: "singleNested.name"
+ - name: "uuidName"
in: "path"
- description: "name is nested field."
required: true
type: "string"
- x-exportParamName: "SingleNestedName"
+ x-internal: true
+ x-exportParamName: "UuidName"
- in: "body"
name: "body"
required: true
schema:
- $ref: "#/definitions/examplepbABitOfEverything"
+ $ref: "#/definitions/A bit of everything"
x-exportParamName: "Body"
responses:
200:
description: "A successful response."
schema:
- $ref: "#/definitions/examplepbABitOfEverything"
+ type: "object"
403:
description: "Returned when the user does not have permission to access\
\ the resource."
@@ -1929,676 +2467,3335 @@ paths:
description: "An unexpected error response."
schema:
$ref: "#/definitions/rpcStatus"
- /v1/{book.name=publishers/*/books/*}:
- patch:
+ options:
tags:
- "ABitOfEverythingService"
- operationId: "ABitOfEverythingService_UpdateBook"
+ operationId: "ABitOfEverythingService_CustomOptionsRequest"
parameters:
- - name: "book.name"
+ - name: "uuidName"
in: "path"
- description: "The resource name of the book.\n\nFormat: `publishers/{publisher}/books/{book}`\n\
- \nExample: `publishers/1257894000000000000/books/my-book`"
required: true
type: "string"
- x-exportParamName: "BookName"
- - in: "body"
- name: "body"
- description: "The book to update.\n\nThe book's `name` field is used to identify\
- \ the book to be updated.\nFormat: publishers/{publisher}/books/{book}"
- required: true
- schema:
- $ref: "#/definitions/examplepbBook"
- x-exportParamName: "Body"
- - name: "updateMask"
+ x-internal: true
+ x-exportParamName: "UuidName"
+ - name: "singleNested.name"
in: "query"
- description: "The list of fields to be updated."
+ description: "name is nested field."
required: false
type: "string"
- x-exportParamName: "UpdateMask"
+ x-exportParamName: "SingleNestedName"
x-optionalDataType: "String"
- - name: "allowMissing"
+ - name: "singleNested.amount"
in: "query"
- description: "If set to true, and the book is not found, a new book will be\
- \ created.\nIn this situation, `update_mask` is ignored."
required: false
- type: "boolean"
- x-exportParamName: "AllowMissing"
- x-optionalDataType: "Bool"
- responses:
- 200:
- description: "A successful response."
- schema:
- $ref: "#/definitions/examplepbBook"
- 403:
- description: "Returned when the user does not have permission to access\
- \ the resource."
- schema: {}
- 404:
- description: "Returned when the resource does not exist."
- schema:
- type: "string"
- format: "string"
- 418:
- description: "I'm a teapot."
- schema:
- $ref: "#/definitions/examplepbNumericEnum"
- 500:
- description: "Server error"
- schema:
- $ref: "#/definitions/examplepbErrorResponse"
- default:
- description: "An unexpected error response."
- schema:
- $ref: "#/definitions/rpcStatus"
- /v1/{parent=publishers/*}/books:
- post:
- tags:
- - "ABitOfEverythingService"
- summary: "Create a book."
- operationId: "ABitOfEverythingService_CreateBook"
- parameters:
- - name: "parent"
- in: "path"
- description: "The publisher in which to create the book.\n\nFormat: `publishers/{publisher}`\n\
- \nExample: `publishers/1257894000000000000`"
- required: true
+ type: "integer"
+ format: "int64"
+ x-exportParamName: "SingleNestedAmount"
+ x-optionalDataType: "Int64"
+ - name: "singleNested.ok"
+ in: "query"
+ description: "DeepEnum description.\n\n - FALSE: FALSE is false.\n - TRUE:\
+ \ TRUE is true."
+ required: false
type: "string"
- x-exportParamName: "Parent"
- - in: "body"
- name: "body"
- description: "The book to create."
+ default: "FALSE"
+ enum:
+ - "FALSE"
+ - "TRUE"
+ x-exportParamName: "SingleNestedOk"
+ x-optionalDataType: "String"
+ - name: "floatValue"
+ in: "query"
+ description: "Float value field"
required: true
- schema:
- $ref: "#/definitions/examplepbBook"
- x-exportParamName: "Body"
- - name: "bookId"
+ type: "number"
+ default: 0.2
+ format: "float"
+ x-exportParamName: "FloatValue"
+ - name: "doubleValue"
+ in: "query"
+ required: true
+ type: "number"
+ format: "double"
+ x-exportParamName: "DoubleValue"
+ - name: "int64Value"
+ in: "query"
+ required: true
+ type: "string"
+ format: "int64"
+ x-exportParamName: "Int64Value"
+ - name: "uint64Value"
in: "query"
- description: "The ID to use for the book.\n\nThis must start with an alphanumeric\
- \ character."
required: false
type: "string"
- x-exportParamName: "BookId"
+ format: "uint64"
+ x-exportParamName: "Uint64Value"
x-optionalDataType: "String"
- responses:
- 200:
- description: "A successful response."
- schema:
- $ref: "#/definitions/examplepbBook"
- 403:
- description: "Returned when the user does not have permission to access\
- \ the resource."
- schema: {}
- 404:
- description: "Returned when the resource does not exist."
- schema:
- type: "string"
- format: "string"
- 418:
- description: "I'm a teapot."
- schema:
- $ref: "#/definitions/examplepbNumericEnum"
- 500:
- description: "Server error"
- schema:
- $ref: "#/definitions/examplepbErrorResponse"
- default:
- description: "An unexpected error response."
- schema:
- $ref: "#/definitions/rpcStatus"
- /v2/example/a_bit_of_everything/{abe.uuid}:
- put:
- tags:
- - "ABitOfEverythingService"
- operationId: "ABitOfEverythingService_UpdateV2"
- parameters:
- - name: "abe.uuid"
- in: "path"
- required: true
+ - name: "int32Value"
+ in: "query"
+ required: false
+ type: "integer"
+ format: "int32"
+ x-exportParamName: "Int32Value"
+ x-optionalDataType: "Int32"
+ - name: "fixed64Value"
+ in: "query"
+ required: false
type: "string"
- x-exportParamName: "AbeUuid"
- - in: "body"
- name: "body"
- required: true
- schema:
- $ref: "#/definitions/examplepbABitOfEverything"
- x-exportParamName: "Body"
- - name: "updateMask"
+ format: "uint64"
+ x-exportParamName: "Fixed64Value"
+ x-optionalDataType: "String"
+ - name: "fixed32Value"
+ in: "query"
+ required: false
+ type: "integer"
+ format: "int64"
+ x-exportParamName: "Fixed32Value"
+ x-optionalDataType: "Int64"
+ - name: "boolValue"
+ in: "query"
+ required: false
+ type: "boolean"
+ x-exportParamName: "BoolValue"
+ x-optionalDataType: "Bool"
+ - name: "stringValue"
in: "query"
- description: "The paths to update."
required: false
type: "string"
- x-exportParamName: "UpdateMask"
+ x-exportParamName: "StringValue"
x-optionalDataType: "String"
- responses:
- 200:
- description: "A successful response."
- schema: {}
- 403:
- description: "Returned when the user does not have permission to access\
- \ the resource."
- schema: {}
- 404:
- description: "Returned when the resource does not exist."
- schema:
- type: "string"
- format: "string"
- 418:
- description: "I'm a teapot."
- schema:
- $ref: "#/definitions/examplepbNumericEnum"
- 500:
- description: "Server error"
- schema:
- $ref: "#/definitions/examplepbErrorResponse"
- default:
- description: "An unexpected error response."
- schema:
- $ref: "#/definitions/rpcStatus"
- patch:
- tags:
- - "ABitOfEverythingService"
- operationId: "ABitOfEverythingService_UpdateV22"
- parameters:
- - name: "abe.uuid"
- in: "path"
- required: true
+ - name: "bytesValue"
+ in: "query"
+ required: false
type: "string"
- x-exportParamName: "AbeUuid"
- - in: "body"
- name: "body"
- required: true
- schema:
- $ref: "#/definitions/examplepbABitOfEverything"
- x-exportParamName: "Body"
- - name: "updateMask"
+ format: "byte"
+ x-exportParamName: "BytesValue"
+ x-optionalDataType: "String"
+ - name: "uint32Value"
in: "query"
- description: "The paths to update."
+ required: false
+ type: "integer"
+ format: "int64"
+ x-exportParamName: "Uint32Value"
+ x-optionalDataType: "Int64"
+ - name: "enumValue"
+ in: "query"
+ description: " - ZERO: ZERO means 0\n - ONE: ONE means 1"
required: false
type: "string"
- x-exportParamName: "UpdateMask"
+ default: "ZERO"
+ enum:
+ - "ZERO"
+ - "ONE"
+ x-exportParamName: "EnumValue"
x-optionalDataType: "String"
- responses:
- 200:
- description: "A successful response."
- schema: {}
- 403:
- description: "Returned when the user does not have permission to access\
- \ the resource."
- schema: {}
- 404:
- description: "Returned when the resource does not exist."
- schema:
- type: "string"
- format: "string"
- 418:
- description: "I'm a teapot."
- schema:
- $ref: "#/definitions/examplepbNumericEnum"
- 500:
- description: "Server error"
- schema:
- $ref: "#/definitions/examplepbErrorResponse"
- default:
- description: "An unexpected error response."
- schema:
- $ref: "#/definitions/rpcStatus"
- /v2/example/echo:
- get:
- tags:
- - "echo rpc"
- summary: "Summary: Echo rpc"
- description: "Description Echo"
- operationId: "ABitOfEverythingService_Echo3"
- parameters:
- - name: "value"
+ - name: "pathEnumValue"
in: "query"
required: false
type: "string"
- x-exportParamName: "Value"
+ default: "ABC"
+ enum:
+ - "ABC"
+ - "DEF"
+ x-exportParamName: "PathEnumValue"
x-optionalDataType: "String"
- responses:
- 200:
- description: "A successful response."
- examples:
- application/json:
- value: "the input value"
- schema:
- $ref: "#/definitions/subStringMessage"
- 403:
- description: "Returned when the user does not have permission to access\
- \ the resource."
- schema: {}
- 404:
- description: "Returned when the resource does not exist."
- schema:
- type: "integer"
- format: "integer"
- 418:
- description: "I'm a teapot."
- schema:
- $ref: "#/definitions/examplepbNumericEnum"
- 500:
- description: "Server error"
- schema:
- $ref: "#/definitions/examplepbErrorResponse"
- 503:
- description: "Returned when the resource is temporarily unavailable."
- schema: {}
- x-number: 100
- default:
- description: "An unexpected error response."
- schema:
- $ref: "#/definitions/rpcStatus"
- externalDocs:
- description: "Find out more Echo"
- url: "https://github.com/grpc-ecosystem/grpc-gateway"
- post:
- tags:
- - "echo rpc"
- summary: "Summary: Echo rpc"
- description: "Description Echo"
- operationId: "ABitOfEverythingService_Echo2"
- parameters:
- - in: "body"
- name: "body"
+ - name: "nestedPathEnumValue"
+ in: "query"
+ required: false
+ type: "string"
+ default: "GHI"
+ enum:
+ - "GHI"
+ - "JKL"
+ x-exportParamName: "NestedPathEnumValue"
+ x-optionalDataType: "String"
+ - name: "sfixed32Value"
+ in: "query"
+ required: false
+ type: "integer"
+ format: "int32"
+ x-exportParamName: "Sfixed32Value"
+ x-optionalDataType: "Int32"
+ - name: "sfixed64Value"
+ in: "query"
+ required: false
+ type: "string"
+ format: "int64"
+ x-exportParamName: "Sfixed64Value"
+ x-optionalDataType: "String"
+ - name: "sint32Value"
+ in: "query"
+ required: false
+ type: "integer"
+ format: "int32"
+ x-exportParamName: "Sint32Value"
+ x-optionalDataType: "Int32"
+ - name: "sint64Value"
+ in: "query"
+ required: false
+ type: "string"
+ format: "int64"
+ x-exportParamName: "Sint64Value"
+ x-optionalDataType: "String"
+ - name: "repeatedStringValue"
+ in: "query"
+ required: false
+ type: "array"
+ items:
+ type: "string"
+ collectionFormat: "multi"
+ x-exportParamName: "RepeatedStringValue"
+ - name: "oneofString"
+ in: "query"
+ required: false
+ type: "string"
+ x-exportParamName: "OneofString"
+ x-optionalDataType: "String"
+ - name: "nonConventionalNameValue"
+ in: "query"
+ required: false
+ type: "string"
+ x-exportParamName: "NonConventionalNameValue"
+ x-optionalDataType: "String"
+ - name: "timestampValue"
+ in: "query"
+ required: false
+ type: "string"
+ format: "date-time"
+ x-exportParamName: "TimestampValue"
+ x-optionalDataType: "Time"
+ - name: "repeatedEnumValue"
+ in: "query"
+ description: "repeated enum value. it is comma-separated in query\n\n - ZERO:\
+ \ ZERO means 0\n - ONE: ONE means 1"
+ required: false
+ type: "array"
+ items:
+ type: "string"
+ enum:
+ - "ZERO"
+ - "ONE"
+ collectionFormat: "multi"
+ x-exportParamName: "RepeatedEnumValue"
+ - name: "repeatedEnumAnnotation"
+ in: "query"
+ description: "Repeated numeric enum title\n\nRepeated numeric enum description.\n\
+ \n - ZERO: ZERO means 0\n - ONE: ONE means 1"
+ required: false
+ type: "array"
+ items:
+ type: "string"
+ enum:
+ - "ZERO"
+ - "ONE"
+ collectionFormat: "multi"
+ x-exportParamName: "RepeatedEnumAnnotation"
+ - name: "enumValueAnnotation"
+ in: "query"
+ description: "Numeric enum title\n\nNumeric enum description.\n\n - ZERO:\
+ \ ZERO means 0\n - ONE: ONE means 1"
+ required: false
+ type: "string"
+ default: "ZERO"
+ enum:
+ - "ZERO"
+ - "ONE"
+ x-exportParamName: "EnumValueAnnotation"
+ x-optionalDataType: "String"
+ - name: "repeatedStringAnnotation"
+ in: "query"
+ description: "Repeated string title\n\nRepeated string description."
+ required: false
+ type: "array"
+ items:
+ type: "string"
+ collectionFormat: "multi"
+ x-exportParamName: "RepeatedStringAnnotation"
+ - name: "nestedAnnotation.name"
+ in: "query"
+ description: "name is nested field."
+ required: false
+ type: "string"
+ x-exportParamName: "NestedAnnotationName"
+ x-optionalDataType: "String"
+ - name: "nestedAnnotation.amount"
+ in: "query"
+ required: false
+ type: "integer"
+ format: "int64"
+ x-exportParamName: "NestedAnnotationAmount"
+ x-optionalDataType: "Int64"
+ - name: "nestedAnnotation.ok"
+ in: "query"
+ description: "DeepEnum description.\n\n - FALSE: FALSE is false.\n - TRUE:\
+ \ TRUE is true."
+ required: false
+ type: "string"
+ default: "FALSE"
+ enum:
+ - "FALSE"
+ - "TRUE"
+ x-exportParamName: "NestedAnnotationOk"
+ x-optionalDataType: "String"
+ - name: "int64OverrideType"
+ in: "query"
+ required: false
+ type: "integer"
+ format: "int64"
+ x-exportParamName: "Int64OverrideType"
+ x-optionalDataType: "Int64"
+ - name: "requiredStringViaFieldBehaviorAnnotation"
+ in: "query"
+ description: "mark a field as required in Open API definition"
required: true
- schema:
+ type: "string"
+ x-exportParamName: "RequiredStringViaFieldBehaviorAnnotation"
+ - name: "outputOnlyStringViaFieldBehaviorAnnotation"
+ in: "query"
+ description: "mark a field as readonly in Open API definition"
+ required: false
+ type: "string"
+ x-exportParamName: "OutputOnlyStringViaFieldBehaviorAnnotation"
+ x-optionalDataType: "String"
+ - name: "optionalStringValue"
+ in: "query"
+ required: false
+ type: "string"
+ x-exportParamName: "OptionalStringValue"
+ x-optionalDataType: "String"
+ - name: "productId"
+ in: "query"
+ description: "Test openapiv2 generation of repeated fields\n\nOnly digits\
+ \ are allowed."
+ required: false
+ type: "array"
+ items:
type: "string"
- x-exportParamName: "Body"
+ minLength: 1
+ maxLength: 19
+ pattern: "^[0-9]+$"
+ collectionFormat: "multi"
+ x-exportParamName: "ProductId"
+ - name: "optionalStringField"
+ in: "query"
+ description: "Test openapiv2 generation of required fields with annotation\
+ \ and jsonschema to reproduce"
+ required: false
+ type: "string"
+ x-exportParamName: "OptionalStringField"
+ x-optionalDataType: "String"
+ - name: "requiredStringField1"
+ in: "query"
+ required: true
+ type: "string"
+ x-exportParamName: "RequiredStringField1"
+ - name: "requiredStringField2"
+ in: "query"
+ required: true
+ type: "string"
+ x-exportParamName: "RequiredStringField2"
+ - name: "required_field_behavior_json_name_custom"
+ in: "query"
+ description: "Test openapiv2 handling of required json_name fields"
+ required: true
+ type: "string"
+ x-exportParamName: "RequiredFieldBehaviorJsonNameCustom"
+ - name: "required_field_schema_json_name_custom"
+ in: "query"
+ required: true
+ type: "string"
+ x-exportParamName: "RequiredFieldSchemaJsonNameCustom"
+ - name: "trailingOnly"
+ in: "query"
+ description: "Trailing only"
+ required: false
+ type: "string"
+ x-exportParamName: "TrailingOnly"
+ x-optionalDataType: "String"
+ - name: "trailingOnlyDot"
+ in: "query"
+ description: "Trailing only dot."
+ required: false
+ type: "string"
+ x-exportParamName: "TrailingOnlyDot"
+ x-optionalDataType: "String"
+ - name: "trailingBoth"
+ in: "query"
+ description: "Leading both\n\nTrailing both."
+ required: false
+ type: "string"
+ x-exportParamName: "TrailingBoth"
+ x-optionalDataType: "String"
+ - name: "trailingMultiline"
+ in: "query"
+ description: "Leading multiline\n\nThis is an example of a multi-line comment.\n\
+ \nTrailing multiline."
+ required: false
+ type: "string"
+ x-exportParamName: "TrailingMultiline"
+ x-optionalDataType: "String"
responses:
200:
description: "A successful response."
- examples:
- application/json:
- value: "the input value"
- schema:
- $ref: "#/definitions/subStringMessage"
- 403:
- description: "Returned when the user does not have permission to access\
- \ the resource."
- schema: {}
- 404:
- description: "Returned when the resource does not exist."
- schema:
- type: "integer"
- format: "integer"
- 418:
- description: "I'm a teapot."
schema:
- $ref: "#/definitions/examplepbNumericEnum"
- 500:
- description: "Server error"
- schema:
- $ref: "#/definitions/examplepbErrorResponse"
- 503:
- description: "Returned when the resource is temporarily unavailable."
- schema: {}
- x-number: 100
+ type: "object"
default:
description: "An unexpected error response."
schema:
$ref: "#/definitions/rpcStatus"
- externalDocs:
- description: "Find out more Echo"
- url: "https://github.com/grpc-ecosystem/grpc-gateway"
- /v2/example/empty:
- get:
- tags:
- - "camelCaseServiceName"
- operationId: "camelCaseServiceName_Empty"
- parameters: []
- responses:
- 200:
- description: "A successful response."
- schema: {}
- 403:
- description: "Returned when the user does not have permission to access\
- \ the resource."
- schema: {}
- 404:
- description: "Returned when the resource does not exist."
- schema:
- type: "string"
- format: "string"
- 418:
- description: "I'm a teapot."
- schema:
- $ref: "#/definitions/examplepbNumericEnum"
- 500:
- description: "Server error"
- schema:
- $ref: "#/definitions/examplepbErrorResponse"
- default:
- description: "An unexpected error response."
- schema:
- $ref: "#/definitions/rpcStatus"
- /v2/example/errorwithdetails:
- get:
- tags:
- - "ABitOfEverythingService"
- operationId: "ABitOfEverythingService_ErrorWithDetails"
- parameters: []
- responses:
- 200:
- description: "A successful response."
- schema: {}
- 403:
- description: "Returned when the user does not have permission to access\
- \ the resource."
- schema: {}
- 404:
- description: "Returned when the resource does not exist."
- schema:
- type: "string"
- format: "string"
- 418:
- description: "I'm a teapot."
- schema:
- $ref: "#/definitions/examplepbNumericEnum"
- 500:
- description: "Server error"
- schema:
- $ref: "#/definitions/examplepbErrorResponse"
- default:
- description: "An unexpected error response."
- schema:
- $ref: "#/definitions/rpcStatus"
- /v2/example/overwriteresponsecontenttype:
- get:
- tags:
- - "ABitOfEverythingService"
- operationId: "ABitOfEverythingService_OverwriteResponseContentType"
- produces:
- - "application/text"
- parameters: []
- responses:
- 200:
- description: "A successful response."
- schema:
- type: "string"
- 403:
- description: "Returned when the user does not have permission to access\
- \ the resource."
- schema: {}
- 404:
- description: "Returned when the resource does not exist."
- schema:
- type: "string"
- format: "string"
- 418:
- description: "I'm a teapot."
- schema:
- $ref: "#/definitions/examplepbNumericEnum"
- 500:
- description: "Server error"
- schema:
- $ref: "#/definitions/examplepbErrorResponse"
- default:
- description: "An unexpected error response."
- schema:
- $ref: "#/definitions/rpcStatus"
- /v2/example/postwithemptybody/{name}:
- post:
+ /v1/example/a_bit_of_everything/{uuidName}:custom:
+ post:
tags:
- "ABitOfEverythingService"
- operationId: "ABitOfEverythingService_PostWithEmptyBody"
+ operationId: "ABitOfEverythingService_Custom"
parameters:
- - name: "name"
+ - name: "uuidName"
in: "path"
required: true
type: "string"
- x-exportParamName: "Name"
- - in: "body"
- name: "body"
- required: true
- schema:
- type: "object"
- x-exportParamName: "Body"
- responses:
- 200:
- description: "A successful response."
- schema: {}
- 403:
- description: "Returned when the user does not have permission to access\
- \ the resource."
- schema: {}
- 404:
- description: "Returned when the resource does not exist."
- schema:
- type: "string"
- format: "string"
- 418:
- description: "I'm a teapot."
- schema:
- $ref: "#/definitions/examplepbNumericEnum"
- 500:
- description: "Server error"
- schema:
- $ref: "#/definitions/examplepbErrorResponse"
- default:
- description: "An unexpected error response."
- schema:
- $ref: "#/definitions/rpcStatus"
- /v2/example/timeout:
- get:
- tags:
- - "ABitOfEverythingService"
- operationId: "ABitOfEverythingService_Timeout"
- parameters: []
- responses:
- 200:
- description: "A successful response."
- schema: {}
- 403:
- description: "Returned when the user does not have permission to access\
- \ the resource."
- schema: {}
- 404:
- description: "Returned when the resource does not exist."
- schema:
- type: "string"
- format: "string"
- 418:
- description: "I'm a teapot."
- schema:
- $ref: "#/definitions/examplepbNumericEnum"
- 500:
- description: "Server error"
- schema:
- $ref: "#/definitions/examplepbErrorResponse"
- default:
- description: "An unexpected error response."
- schema:
- $ref: "#/definitions/rpcStatus"
- /v2/example/withbody/{id}:
- post:
- tags:
- - "ABitOfEverythingService"
- operationId: "ABitOfEverythingService_GetMessageWithBody"
- parameters:
- - name: "id"
- in: "path"
- required: true
+ x-internal: true
+ x-exportParamName: "UuidName"
+ - name: "singleNested.name"
+ in: "query"
+ description: "name is nested field."
+ required: false
type: "string"
- x-exportParamName: "Id"
- - in: "body"
- name: "body"
+ x-exportParamName: "SingleNestedName"
+ x-optionalDataType: "String"
+ - name: "singleNested.amount"
+ in: "query"
+ required: false
+ type: "integer"
+ format: "int64"
+ x-exportParamName: "SingleNestedAmount"
+ x-optionalDataType: "Int64"
+ - name: "singleNested.ok"
+ in: "query"
+ description: "DeepEnum description.\n\n - FALSE: FALSE is false.\n - TRUE:\
+ \ TRUE is true."
+ required: false
+ type: "string"
+ default: "FALSE"
+ enum:
+ - "FALSE"
+ - "TRUE"
+ x-exportParamName: "SingleNestedOk"
+ x-optionalDataType: "String"
+ - name: "floatValue"
+ in: "query"
+ description: "Float value field"
required: true
- schema:
- $ref: "#/definitions/examplepbBody"
- x-exportParamName: "Body"
- responses:
- 200:
- description: "A successful response."
- schema: {}
- 403:
- description: "Returned when the user does not have permission to access\
- \ the resource."
- schema: {}
- 404:
- description: "Returned when the resource does not exist."
- schema:
- type: "string"
- format: "string"
- 418:
- description: "I'm a teapot."
- schema:
- $ref: "#/definitions/examplepbNumericEnum"
- 500:
- description: "Server error"
- schema:
- $ref: "#/definitions/examplepbErrorResponse"
- default:
- description: "An unexpected error response."
- schema:
- $ref: "#/definitions/rpcStatus"
- /v2/{value}:check:
- get:
- tags:
- - "ABitOfEverythingService"
- operationId: "ABitOfEverythingService_CheckExternalNestedPathEnum"
- parameters:
- - name: "value"
- in: "path"
+ type: "number"
+ default: 0.2
+ format: "float"
+ x-exportParamName: "FloatValue"
+ - name: "doubleValue"
+ in: "query"
+ required: true
+ type: "number"
+ format: "double"
+ x-exportParamName: "DoubleValue"
+ - name: "int64Value"
+ in: "query"
required: true
type: "string"
- enum:
- - "GHI"
- - "JKL"
- x-exportParamName: "Value"
- responses:
- 200:
- description: "A successful response."
- schema: {}
- 403:
- description: "Returned when the user does not have permission to access\
- \ the resource."
- schema: {}
- 404:
- description: "Returned when the resource does not exist."
- schema:
- type: "string"
- format: "string"
- 418:
- description: "I'm a teapot."
- schema:
- $ref: "#/definitions/examplepbNumericEnum"
- 500:
- description: "Server error"
- schema:
- $ref: "#/definitions/examplepbErrorResponse"
- default:
- description: "An unexpected error response."
- schema:
- $ref: "#/definitions/rpcStatus"
- /v2a/example/a_bit_of_everything/{abe.uuid}:
- patch:
- tags:
- - "ABitOfEverythingService"
- operationId: "ABitOfEverythingService_UpdateV23"
- parameters:
- - name: "abe.uuid"
- in: "path"
+ format: "int64"
+ x-exportParamName: "Int64Value"
+ - name: "uint64Value"
+ in: "query"
+ required: false
+ type: "string"
+ format: "uint64"
+ x-exportParamName: "Uint64Value"
+ x-optionalDataType: "String"
+ - name: "int32Value"
+ in: "query"
+ required: false
+ type: "integer"
+ format: "int32"
+ x-exportParamName: "Int32Value"
+ x-optionalDataType: "Int32"
+ - name: "fixed64Value"
+ in: "query"
+ required: false
+ type: "string"
+ format: "uint64"
+ x-exportParamName: "Fixed64Value"
+ x-optionalDataType: "String"
+ - name: "fixed32Value"
+ in: "query"
+ required: false
+ type: "integer"
+ format: "int64"
+ x-exportParamName: "Fixed32Value"
+ x-optionalDataType: "Int64"
+ - name: "boolValue"
+ in: "query"
+ required: false
+ type: "boolean"
+ x-exportParamName: "BoolValue"
+ x-optionalDataType: "Bool"
+ - name: "stringValue"
+ in: "query"
+ required: false
+ type: "string"
+ x-exportParamName: "StringValue"
+ x-optionalDataType: "String"
+ - name: "bytesValue"
+ in: "query"
+ required: false
+ type: "string"
+ format: "byte"
+ x-exportParamName: "BytesValue"
+ x-optionalDataType: "String"
+ - name: "uint32Value"
+ in: "query"
+ required: false
+ type: "integer"
+ format: "int64"
+ x-exportParamName: "Uint32Value"
+ x-optionalDataType: "Int64"
+ - name: "enumValue"
+ in: "query"
+ description: " - ZERO: ZERO means 0\n - ONE: ONE means 1"
+ required: false
+ type: "string"
+ default: "ZERO"
+ enum:
+ - "ZERO"
+ - "ONE"
+ x-exportParamName: "EnumValue"
+ x-optionalDataType: "String"
+ - name: "pathEnumValue"
+ in: "query"
+ required: false
+ type: "string"
+ default: "ABC"
+ enum:
+ - "ABC"
+ - "DEF"
+ x-exportParamName: "PathEnumValue"
+ x-optionalDataType: "String"
+ - name: "nestedPathEnumValue"
+ in: "query"
+ required: false
+ type: "string"
+ default: "GHI"
+ enum:
+ - "GHI"
+ - "JKL"
+ x-exportParamName: "NestedPathEnumValue"
+ x-optionalDataType: "String"
+ - name: "sfixed32Value"
+ in: "query"
+ required: false
+ type: "integer"
+ format: "int32"
+ x-exportParamName: "Sfixed32Value"
+ x-optionalDataType: "Int32"
+ - name: "sfixed64Value"
+ in: "query"
+ required: false
+ type: "string"
+ format: "int64"
+ x-exportParamName: "Sfixed64Value"
+ x-optionalDataType: "String"
+ - name: "sint32Value"
+ in: "query"
+ required: false
+ type: "integer"
+ format: "int32"
+ x-exportParamName: "Sint32Value"
+ x-optionalDataType: "Int32"
+ - name: "sint64Value"
+ in: "query"
+ required: false
+ type: "string"
+ format: "int64"
+ x-exportParamName: "Sint64Value"
+ x-optionalDataType: "String"
+ - name: "repeatedStringValue"
+ in: "query"
+ required: false
+ type: "array"
+ items:
+ type: "string"
+ collectionFormat: "multi"
+ x-exportParamName: "RepeatedStringValue"
+ - name: "oneofString"
+ in: "query"
+ required: false
+ type: "string"
+ x-exportParamName: "OneofString"
+ x-optionalDataType: "String"
+ - name: "nonConventionalNameValue"
+ in: "query"
+ required: false
+ type: "string"
+ x-exportParamName: "NonConventionalNameValue"
+ x-optionalDataType: "String"
+ - name: "timestampValue"
+ in: "query"
+ required: false
+ type: "string"
+ format: "date-time"
+ x-exportParamName: "TimestampValue"
+ x-optionalDataType: "Time"
+ - name: "repeatedEnumValue"
+ in: "query"
+ description: "repeated enum value. it is comma-separated in query\n\n - ZERO:\
+ \ ZERO means 0\n - ONE: ONE means 1"
+ required: false
+ type: "array"
+ items:
+ type: "string"
+ enum:
+ - "ZERO"
+ - "ONE"
+ collectionFormat: "multi"
+ x-exportParamName: "RepeatedEnumValue"
+ - name: "repeatedEnumAnnotation"
+ in: "query"
+ description: "Repeated numeric enum title\n\nRepeated numeric enum description.\n\
+ \n - ZERO: ZERO means 0\n - ONE: ONE means 1"
+ required: false
+ type: "array"
+ items:
+ type: "string"
+ enum:
+ - "ZERO"
+ - "ONE"
+ collectionFormat: "multi"
+ x-exportParamName: "RepeatedEnumAnnotation"
+ - name: "enumValueAnnotation"
+ in: "query"
+ description: "Numeric enum title\n\nNumeric enum description.\n\n - ZERO:\
+ \ ZERO means 0\n - ONE: ONE means 1"
+ required: false
+ type: "string"
+ default: "ZERO"
+ enum:
+ - "ZERO"
+ - "ONE"
+ x-exportParamName: "EnumValueAnnotation"
+ x-optionalDataType: "String"
+ - name: "repeatedStringAnnotation"
+ in: "query"
+ description: "Repeated string title\n\nRepeated string description."
+ required: false
+ type: "array"
+ items:
+ type: "string"
+ collectionFormat: "multi"
+ x-exportParamName: "RepeatedStringAnnotation"
+ - name: "nestedAnnotation.name"
+ in: "query"
+ description: "name is nested field."
+ required: false
+ type: "string"
+ x-exportParamName: "NestedAnnotationName"
+ x-optionalDataType: "String"
+ - name: "nestedAnnotation.amount"
+ in: "query"
+ required: false
+ type: "integer"
+ format: "int64"
+ x-exportParamName: "NestedAnnotationAmount"
+ x-optionalDataType: "Int64"
+ - name: "nestedAnnotation.ok"
+ in: "query"
+ description: "DeepEnum description.\n\n - FALSE: FALSE is false.\n - TRUE:\
+ \ TRUE is true."
+ required: false
+ type: "string"
+ default: "FALSE"
+ enum:
+ - "FALSE"
+ - "TRUE"
+ x-exportParamName: "NestedAnnotationOk"
+ x-optionalDataType: "String"
+ - name: "int64OverrideType"
+ in: "query"
+ required: false
+ type: "integer"
+ format: "int64"
+ x-exportParamName: "Int64OverrideType"
+ x-optionalDataType: "Int64"
+ - name: "requiredStringViaFieldBehaviorAnnotation"
+ in: "query"
+ description: "mark a field as required in Open API definition"
required: true
type: "string"
- x-exportParamName: "AbeUuid"
- - in: "body"
- name: "body"
- required: true
- schema:
- $ref: "#/definitions/examplepbUpdateV2Request"
- x-exportParamName: "Body"
- responses:
- 200:
- description: "A successful response."
- schema: {}
- 403:
- description: "Returned when the user does not have permission to access\
- \ the resource."
- schema: {}
- 404:
- description: "Returned when the resource does not exist."
- schema:
- type: "string"
- format: "string"
- 418:
- description: "I'm a teapot."
- schema:
- $ref: "#/definitions/examplepbNumericEnum"
- 500:
- description: "Server error"
- schema:
- $ref: "#/definitions/examplepbErrorResponse"
- default:
- description: "An unexpected error response."
- schema:
- $ref: "#/definitions/rpcStatus"
-securityDefinitions:
- ApiKeyAuth:
- type: "apiKey"
- name: "X-API-Key"
- in: "header"
- x-amazon-apigateway-authorizer:
- authorizerResultTtlInSeconds: 60
- type: "token"
- x-amazon-apigateway-authtype: "oauth2"
- BasicAuth:
- type: "basic"
- OAuth2:
- type: "oauth2"
- authorizationUrl: "https://example.com/oauth/authorize"
- tokenUrl: "https://example.com/oauth/token"
- flow: "accessCode"
- scopes:
- admin: "Grants read and write access to administrative information"
- read: "Grants read access"
- write: "Grants write access"
-definitions:
- ABitOfEverythingNested:
+ x-exportParamName: "RequiredStringViaFieldBehaviorAnnotation"
+ - name: "outputOnlyStringViaFieldBehaviorAnnotation"
+ in: "query"
+ description: "mark a field as readonly in Open API definition"
+ required: false
+ type: "string"
+ x-exportParamName: "OutputOnlyStringViaFieldBehaviorAnnotation"
+ x-optionalDataType: "String"
+ - name: "optionalStringValue"
+ in: "query"
+ required: false
+ type: "string"
+ x-exportParamName: "OptionalStringValue"
+ x-optionalDataType: "String"
+ - name: "productId"
+ in: "query"
+ description: "Test openapiv2 generation of repeated fields\n\nOnly digits\
+ \ are allowed."
+ required: false
+ type: "array"
+ items:
+ type: "string"
+ minLength: 1
+ maxLength: 19
+ pattern: "^[0-9]+$"
+ collectionFormat: "multi"
+ x-exportParamName: "ProductId"
+ - name: "optionalStringField"
+ in: "query"
+ description: "Test openapiv2 generation of required fields with annotation\
+ \ and jsonschema to reproduce"
+ required: false
+ type: "string"
+ x-exportParamName: "OptionalStringField"
+ x-optionalDataType: "String"
+ - name: "requiredStringField1"
+ in: "query"
+ required: true
+ type: "string"
+ x-exportParamName: "RequiredStringField1"
+ - name: "requiredStringField2"
+ in: "query"
+ required: true
+ type: "string"
+ x-exportParamName: "RequiredStringField2"
+ - name: "required_field_behavior_json_name_custom"
+ in: "query"
+ description: "Test openapiv2 handling of required json_name fields"
+ required: true
+ type: "string"
+ x-exportParamName: "RequiredFieldBehaviorJsonNameCustom"
+ - name: "required_field_schema_json_name_custom"
+ in: "query"
+ required: true
+ type: "string"
+ x-exportParamName: "RequiredFieldSchemaJsonNameCustom"
+ - name: "trailingOnly"
+ in: "query"
+ description: "Trailing only"
+ required: false
+ type: "string"
+ x-exportParamName: "TrailingOnly"
+ x-optionalDataType: "String"
+ - name: "trailingOnlyDot"
+ in: "query"
+ description: "Trailing only dot."
+ required: false
+ type: "string"
+ x-exportParamName: "TrailingOnlyDot"
+ x-optionalDataType: "String"
+ - name: "trailingBoth"
+ in: "query"
+ description: "Leading both\n\nTrailing both."
+ required: false
+ type: "string"
+ x-exportParamName: "TrailingBoth"
+ x-optionalDataType: "String"
+ - name: "trailingMultiline"
+ in: "query"
+ description: "Leading multiline\n\nThis is an example of a multi-line comment.\n\
+ \nTrailing multiline."
+ required: false
+ type: "string"
+ x-exportParamName: "TrailingMultiline"
+ x-optionalDataType: "String"
+ responses:
+ 200:
+ description: "A successful response."
+ schema:
+ $ref: "#/definitions/examplepbABitOfEverything"
+ 403:
+ description: "Returned when the user does not have permission to access\
+ \ the resource."
+ schema: {}
+ 404:
+ description: "Returned when the resource does not exist."
+ schema:
+ type: "string"
+ format: "string"
+ 418:
+ description: "I'm a teapot."
+ schema:
+ $ref: "#/definitions/examplepbNumericEnum"
+ 500:
+ description: "Server error"
+ schema:
+ $ref: "#/definitions/examplepbErrorResponse"
+ default:
+ description: "An unexpected error response."
+ schema:
+ $ref: "#/definitions/rpcStatus"
+ /v1/example/a_bit_of_everything/{uuidName}:custom:custom:
+ post:
+ tags:
+ - "ABitOfEverythingService"
+ operationId: "ABitOfEverythingService_DoubleColon"
+ parameters:
+ - name: "uuidName"
+ in: "path"
+ required: true
+ type: "string"
+ x-internal: true
+ x-exportParamName: "UuidName"
+ - name: "singleNested.name"
+ in: "query"
+ description: "name is nested field."
+ required: false
+ type: "string"
+ x-exportParamName: "SingleNestedName"
+ x-optionalDataType: "String"
+ - name: "singleNested.amount"
+ in: "query"
+ required: false
+ type: "integer"
+ format: "int64"
+ x-exportParamName: "SingleNestedAmount"
+ x-optionalDataType: "Int64"
+ - name: "singleNested.ok"
+ in: "query"
+ description: "DeepEnum description.\n\n - FALSE: FALSE is false.\n - TRUE:\
+ \ TRUE is true."
+ required: false
+ type: "string"
+ default: "FALSE"
+ enum:
+ - "FALSE"
+ - "TRUE"
+ x-exportParamName: "SingleNestedOk"
+ x-optionalDataType: "String"
+ - name: "floatValue"
+ in: "query"
+ description: "Float value field"
+ required: true
+ type: "number"
+ default: 0.2
+ format: "float"
+ x-exportParamName: "FloatValue"
+ - name: "doubleValue"
+ in: "query"
+ required: true
+ type: "number"
+ format: "double"
+ x-exportParamName: "DoubleValue"
+ - name: "int64Value"
+ in: "query"
+ required: true
+ type: "string"
+ format: "int64"
+ x-exportParamName: "Int64Value"
+ - name: "uint64Value"
+ in: "query"
+ required: false
+ type: "string"
+ format: "uint64"
+ x-exportParamName: "Uint64Value"
+ x-optionalDataType: "String"
+ - name: "int32Value"
+ in: "query"
+ required: false
+ type: "integer"
+ format: "int32"
+ x-exportParamName: "Int32Value"
+ x-optionalDataType: "Int32"
+ - name: "fixed64Value"
+ in: "query"
+ required: false
+ type: "string"
+ format: "uint64"
+ x-exportParamName: "Fixed64Value"
+ x-optionalDataType: "String"
+ - name: "fixed32Value"
+ in: "query"
+ required: false
+ type: "integer"
+ format: "int64"
+ x-exportParamName: "Fixed32Value"
+ x-optionalDataType: "Int64"
+ - name: "boolValue"
+ in: "query"
+ required: false
+ type: "boolean"
+ x-exportParamName: "BoolValue"
+ x-optionalDataType: "Bool"
+ - name: "stringValue"
+ in: "query"
+ required: false
+ type: "string"
+ x-exportParamName: "StringValue"
+ x-optionalDataType: "String"
+ - name: "bytesValue"
+ in: "query"
+ required: false
+ type: "string"
+ format: "byte"
+ x-exportParamName: "BytesValue"
+ x-optionalDataType: "String"
+ - name: "uint32Value"
+ in: "query"
+ required: false
+ type: "integer"
+ format: "int64"
+ x-exportParamName: "Uint32Value"
+ x-optionalDataType: "Int64"
+ - name: "enumValue"
+ in: "query"
+ description: " - ZERO: ZERO means 0\n - ONE: ONE means 1"
+ required: false
+ type: "string"
+ default: "ZERO"
+ enum:
+ - "ZERO"
+ - "ONE"
+ x-exportParamName: "EnumValue"
+ x-optionalDataType: "String"
+ - name: "pathEnumValue"
+ in: "query"
+ required: false
+ type: "string"
+ default: "ABC"
+ enum:
+ - "ABC"
+ - "DEF"
+ x-exportParamName: "PathEnumValue"
+ x-optionalDataType: "String"
+ - name: "nestedPathEnumValue"
+ in: "query"
+ required: false
+ type: "string"
+ default: "GHI"
+ enum:
+ - "GHI"
+ - "JKL"
+ x-exportParamName: "NestedPathEnumValue"
+ x-optionalDataType: "String"
+ - name: "sfixed32Value"
+ in: "query"
+ required: false
+ type: "integer"
+ format: "int32"
+ x-exportParamName: "Sfixed32Value"
+ x-optionalDataType: "Int32"
+ - name: "sfixed64Value"
+ in: "query"
+ required: false
+ type: "string"
+ format: "int64"
+ x-exportParamName: "Sfixed64Value"
+ x-optionalDataType: "String"
+ - name: "sint32Value"
+ in: "query"
+ required: false
+ type: "integer"
+ format: "int32"
+ x-exportParamName: "Sint32Value"
+ x-optionalDataType: "Int32"
+ - name: "sint64Value"
+ in: "query"
+ required: false
+ type: "string"
+ format: "int64"
+ x-exportParamName: "Sint64Value"
+ x-optionalDataType: "String"
+ - name: "repeatedStringValue"
+ in: "query"
+ required: false
+ type: "array"
+ items:
+ type: "string"
+ collectionFormat: "multi"
+ x-exportParamName: "RepeatedStringValue"
+ - name: "oneofString"
+ in: "query"
+ required: false
+ type: "string"
+ x-exportParamName: "OneofString"
+ x-optionalDataType: "String"
+ - name: "nonConventionalNameValue"
+ in: "query"
+ required: false
+ type: "string"
+ x-exportParamName: "NonConventionalNameValue"
+ x-optionalDataType: "String"
+ - name: "timestampValue"
+ in: "query"
+ required: false
+ type: "string"
+ format: "date-time"
+ x-exportParamName: "TimestampValue"
+ x-optionalDataType: "Time"
+ - name: "repeatedEnumValue"
+ in: "query"
+ description: "repeated enum value. it is comma-separated in query\n\n - ZERO:\
+ \ ZERO means 0\n - ONE: ONE means 1"
+ required: false
+ type: "array"
+ items:
+ type: "string"
+ enum:
+ - "ZERO"
+ - "ONE"
+ collectionFormat: "multi"
+ x-exportParamName: "RepeatedEnumValue"
+ - name: "repeatedEnumAnnotation"
+ in: "query"
+ description: "Repeated numeric enum title\n\nRepeated numeric enum description.\n\
+ \n - ZERO: ZERO means 0\n - ONE: ONE means 1"
+ required: false
+ type: "array"
+ items:
+ type: "string"
+ enum:
+ - "ZERO"
+ - "ONE"
+ collectionFormat: "multi"
+ x-exportParamName: "RepeatedEnumAnnotation"
+ - name: "enumValueAnnotation"
+ in: "query"
+ description: "Numeric enum title\n\nNumeric enum description.\n\n - ZERO:\
+ \ ZERO means 0\n - ONE: ONE means 1"
+ required: false
+ type: "string"
+ default: "ZERO"
+ enum:
+ - "ZERO"
+ - "ONE"
+ x-exportParamName: "EnumValueAnnotation"
+ x-optionalDataType: "String"
+ - name: "repeatedStringAnnotation"
+ in: "query"
+ description: "Repeated string title\n\nRepeated string description."
+ required: false
+ type: "array"
+ items:
+ type: "string"
+ collectionFormat: "multi"
+ x-exportParamName: "RepeatedStringAnnotation"
+ - name: "nestedAnnotation.name"
+ in: "query"
+ description: "name is nested field."
+ required: false
+ type: "string"
+ x-exportParamName: "NestedAnnotationName"
+ x-optionalDataType: "String"
+ - name: "nestedAnnotation.amount"
+ in: "query"
+ required: false
+ type: "integer"
+ format: "int64"
+ x-exportParamName: "NestedAnnotationAmount"
+ x-optionalDataType: "Int64"
+ - name: "nestedAnnotation.ok"
+ in: "query"
+ description: "DeepEnum description.\n\n - FALSE: FALSE is false.\n - TRUE:\
+ \ TRUE is true."
+ required: false
+ type: "string"
+ default: "FALSE"
+ enum:
+ - "FALSE"
+ - "TRUE"
+ x-exportParamName: "NestedAnnotationOk"
+ x-optionalDataType: "String"
+ - name: "int64OverrideType"
+ in: "query"
+ required: false
+ type: "integer"
+ format: "int64"
+ x-exportParamName: "Int64OverrideType"
+ x-optionalDataType: "Int64"
+ - name: "requiredStringViaFieldBehaviorAnnotation"
+ in: "query"
+ description: "mark a field as required in Open API definition"
+ required: true
+ type: "string"
+ x-exportParamName: "RequiredStringViaFieldBehaviorAnnotation"
+ - name: "outputOnlyStringViaFieldBehaviorAnnotation"
+ in: "query"
+ description: "mark a field as readonly in Open API definition"
+ required: false
+ type: "string"
+ x-exportParamName: "OutputOnlyStringViaFieldBehaviorAnnotation"
+ x-optionalDataType: "String"
+ - name: "optionalStringValue"
+ in: "query"
+ required: false
+ type: "string"
+ x-exportParamName: "OptionalStringValue"
+ x-optionalDataType: "String"
+ - name: "productId"
+ in: "query"
+ description: "Test openapiv2 generation of repeated fields\n\nOnly digits\
+ \ are allowed."
+ required: false
+ type: "array"
+ items:
+ type: "string"
+ minLength: 1
+ maxLength: 19
+ pattern: "^[0-9]+$"
+ collectionFormat: "multi"
+ x-exportParamName: "ProductId"
+ - name: "optionalStringField"
+ in: "query"
+ description: "Test openapiv2 generation of required fields with annotation\
+ \ and jsonschema to reproduce"
+ required: false
+ type: "string"
+ x-exportParamName: "OptionalStringField"
+ x-optionalDataType: "String"
+ - name: "requiredStringField1"
+ in: "query"
+ required: true
+ type: "string"
+ x-exportParamName: "RequiredStringField1"
+ - name: "requiredStringField2"
+ in: "query"
+ required: true
+ type: "string"
+ x-exportParamName: "RequiredStringField2"
+ - name: "required_field_behavior_json_name_custom"
+ in: "query"
+ description: "Test openapiv2 handling of required json_name fields"
+ required: true
+ type: "string"
+ x-exportParamName: "RequiredFieldBehaviorJsonNameCustom"
+ - name: "required_field_schema_json_name_custom"
+ in: "query"
+ required: true
+ type: "string"
+ x-exportParamName: "RequiredFieldSchemaJsonNameCustom"
+ - name: "trailingOnly"
+ in: "query"
+ description: "Trailing only"
+ required: false
+ type: "string"
+ x-exportParamName: "TrailingOnly"
+ x-optionalDataType: "String"
+ - name: "trailingOnlyDot"
+ in: "query"
+ description: "Trailing only dot."
+ required: false
+ type: "string"
+ x-exportParamName: "TrailingOnlyDot"
+ x-optionalDataType: "String"
+ - name: "trailingBoth"
+ in: "query"
+ description: "Leading both\n\nTrailing both."
+ required: false
+ type: "string"
+ x-exportParamName: "TrailingBoth"
+ x-optionalDataType: "String"
+ - name: "trailingMultiline"
+ in: "query"
+ description: "Leading multiline\n\nThis is an example of a multi-line comment.\n\
+ \nTrailing multiline."
+ required: false
+ type: "string"
+ x-exportParamName: "TrailingMultiline"
+ x-optionalDataType: "String"
+ responses:
+ 200:
+ description: "A successful response."
+ schema:
+ $ref: "#/definitions/examplepbABitOfEverything"
+ 403:
+ description: "Returned when the user does not have permission to access\
+ \ the resource."
+ schema: {}
+ 404:
+ description: "Returned when the resource does not exist."
+ schema:
+ type: "string"
+ format: "string"
+ 418:
+ description: "I'm a teapot."
+ schema:
+ $ref: "#/definitions/examplepbNumericEnum"
+ 500:
+ description: "Server error"
+ schema:
+ $ref: "#/definitions/examplepbErrorResponse"
+ default:
+ description: "An unexpected error response."
+ schema:
+ $ref: "#/definitions/rpcStatus"
+ /v1/example/a_bit_of_everything/{uuid}:
+ get:
+ tags:
+ - "ABitOfEverythingService"
+ operationId: "ABitOfEverythingService_Lookup"
+ parameters:
+ - name: "uuid"
+ in: "path"
+ required: true
+ type: "string"
+ x-exportParamName: "Uuid"
+ responses:
+ 200:
+ description: "A successful response."
+ schema:
+ $ref: "#/definitions/examplepbABitOfEverything"
+ 403:
+ description: "Returned when the user does not have permission to access\
+ \ the resource."
+ schema: {}
+ 404:
+ description: "Returned when the resource does not exist."
+ schema:
+ type: "string"
+ format: "string"
+ 418:
+ description: "I'm a teapot."
+ schema:
+ $ref: "#/definitions/examplepbNumericEnum"
+ 500:
+ description: "Server error"
+ schema:
+ $ref: "#/definitions/examplepbErrorResponse"
+ default:
+ description: "An unexpected error response."
+ schema:
+ $ref: "#/definitions/rpcStatus"
+ delete:
+ tags:
+ - "ABitOfEverythingService"
+ operationId: "ABitOfEverythingService_Delete"
+ parameters:
+ - name: "uuid"
+ in: "path"
+ required: true
+ type: "string"
+ x-exportParamName: "Uuid"
+ responses:
+ 200:
+ description: "A successful response."
+ schema:
+ type: "object"
+ 403:
+ description: "Returned when the user does not have permission to access\
+ \ the resource."
+ schema: {}
+ 404:
+ description: "Returned when the resource does not exist."
+ schema:
+ type: "string"
+ format: "string"
+ 418:
+ description: "I'm a teapot."
+ schema:
+ $ref: "#/definitions/examplepbNumericEnum"
+ 500:
+ description: "Server error"
+ schema:
+ $ref: "#/definitions/examplepbErrorResponse"
+ default:
+ description: "An unexpected error response."
+ schema:
+ $ref: "#/definitions/rpcStatus"
+ security:
+ - ApiKeyAuth: []
+ OAuth2:
+ - "read"
+ - "write"
+ x-irreversible: true
+ ? /v1/example/a_bit_of_everything_repeated/{pathRepeatedFloatValue}/{pathRepeatedDoubleValue}/{pathRepeatedInt64Value}/{pathRepeatedUint64Value}/{pathRepeatedInt32Value}/{pathRepeatedFixed64Value}/{pathRepeatedFixed32Value}/{pathRepeatedBoolValue}/{pathRepeatedStringValue}/{pathRepeatedBytesValue}/{pathRepeatedUint32Value}/{pathRepeatedEnumValue}/{pathRepeatedSfixed32Value}/{pathRepeatedSfixed64Value}/{pathRepeatedSint32Value}/{pathRepeatedSint64Value}
+ : get:
+ tags:
+ - "ABitOfEverythingService"
+ operationId: "ABitOfEverythingService_GetRepeatedQuery"
+ parameters:
+ - name: "pathRepeatedFloatValue"
+ in: "path"
+ description: "repeated values. they are comma-separated in path"
+ required: true
+ type: "array"
+ items:
+ type: "number"
+ format: "float"
+ collectionFormat: "csv"
+ minItems: 1
+ x-exportParamName: "PathRepeatedFloatValue"
+ - name: "pathRepeatedDoubleValue"
+ in: "path"
+ required: true
+ type: "array"
+ items:
+ type: "number"
+ format: "double"
+ collectionFormat: "csv"
+ minItems: 1
+ x-exportParamName: "PathRepeatedDoubleValue"
+ - name: "pathRepeatedInt64Value"
+ in: "path"
+ required: true
+ type: "array"
+ items:
+ type: "string"
+ format: "int64"
+ collectionFormat: "csv"
+ minItems: 1
+ x-exportParamName: "PathRepeatedInt64Value"
+ - name: "pathRepeatedUint64Value"
+ in: "path"
+ required: true
+ type: "array"
+ items:
+ type: "string"
+ format: "uint64"
+ collectionFormat: "csv"
+ minItems: 1
+ x-exportParamName: "PathRepeatedUint64Value"
+ - name: "pathRepeatedInt32Value"
+ in: "path"
+ required: true
+ type: "array"
+ items:
+ type: "integer"
+ format: "int32"
+ collectionFormat: "csv"
+ minItems: 1
+ x-exportParamName: "PathRepeatedInt32Value"
+ - name: "pathRepeatedFixed64Value"
+ in: "path"
+ required: true
+ type: "array"
+ items:
+ type: "string"
+ format: "uint64"
+ collectionFormat: "csv"
+ minItems: 1
+ x-exportParamName: "PathRepeatedFixed64Value"
+ - name: "pathRepeatedFixed32Value"
+ in: "path"
+ required: true
+ type: "array"
+ items:
+ type: "integer"
+ format: "int64"
+ collectionFormat: "csv"
+ minItems: 1
+ x-exportParamName: "PathRepeatedFixed32Value"
+ - name: "pathRepeatedBoolValue"
+ in: "path"
+ required: true
+ type: "array"
+ items:
+ type: "boolean"
+ collectionFormat: "csv"
+ minItems: 1
+ x-exportParamName: "PathRepeatedBoolValue"
+ - name: "pathRepeatedStringValue"
+ in: "path"
+ required: true
+ type: "array"
+ items:
+ type: "string"
+ collectionFormat: "csv"
+ minItems: 1
+ x-exportParamName: "PathRepeatedStringValue"
+ - name: "pathRepeatedBytesValue"
+ in: "path"
+ required: true
+ type: "array"
+ items:
+ type: "string"
+ format: "byte"
+ pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"
+ collectionFormat: "csv"
+ minItems: 1
+ x-exportParamName: "PathRepeatedBytesValue"
+ - name: "pathRepeatedUint32Value"
+ in: "path"
+ required: true
+ type: "array"
+ items:
+ type: "integer"
+ format: "int64"
+ collectionFormat: "csv"
+ minItems: 1
+ x-exportParamName: "PathRepeatedUint32Value"
+ - name: "pathRepeatedEnumValue"
+ in: "path"
+ required: true
+ type: "array"
+ items:
+ type: "string"
+ enum:
+ - "ZERO"
+ - "ONE"
+ collectionFormat: "csv"
+ minItems: 1
+ x-exportParamName: "PathRepeatedEnumValue"
+ - name: "pathRepeatedSfixed32Value"
+ in: "path"
+ required: true
+ type: "array"
+ items:
+ type: "integer"
+ format: "int32"
+ collectionFormat: "csv"
+ minItems: 1
+ x-exportParamName: "PathRepeatedSfixed32Value"
+ - name: "pathRepeatedSfixed64Value"
+ in: "path"
+ required: true
+ type: "array"
+ items:
+ type: "string"
+ format: "int64"
+ collectionFormat: "csv"
+ minItems: 1
+ x-exportParamName: "PathRepeatedSfixed64Value"
+ - name: "pathRepeatedSint32Value"
+ in: "path"
+ required: true
+ type: "array"
+ items:
+ type: "integer"
+ format: "int32"
+ collectionFormat: "csv"
+ minItems: 1
+ x-exportParamName: "PathRepeatedSint32Value"
+ - name: "pathRepeatedSint64Value"
+ in: "path"
+ required: true
+ type: "array"
+ items:
+ type: "string"
+ format: "int64"
+ collectionFormat: "csv"
+ minItems: 1
+ x-exportParamName: "PathRepeatedSint64Value"
+ responses:
+ 200:
+ description: "A successful response."
+ schema:
+ $ref: "#/definitions/examplepbABitOfEverythingRepeated"
+ 403:
+ description: "Returned when the user does not have permission to access\
+ \ the resource."
+ schema: {}
+ 404:
+ description: "Returned when the resource does not exist."
+ schema:
+ type: "string"
+ format: "string"
+ 418:
+ description: "I'm a teapot."
+ schema:
+ $ref: "#/definitions/examplepbNumericEnum"
+ 500:
+ description: "Server error"
+ schema:
+ $ref: "#/definitions/examplepbErrorResponse"
+ default:
+ description: "An unexpected error response."
+ schema:
+ $ref: "#/definitions/rpcStatus"
+ /v1/example/checkStatus:
+ get:
+ tags:
+ - "ABitOfEverythingService"
+ operationId: "ABitOfEverythingService_CheckStatus"
+ parameters: []
+ responses:
+ 200:
+ description: "A successful response."
+ schema:
+ $ref: "#/definitions/examplepbCheckStatusResponse"
+ 403:
+ description: "Returned when the user does not have permission to access\
+ \ the resource."
+ schema: {}
+ 404:
+ description: "Returned when the resource does not exist."
+ schema:
+ type: "string"
+ format: "string"
+ 418:
+ description: "I'm a teapot."
+ schema:
+ $ref: "#/definitions/examplepbNumericEnum"
+ 500:
+ description: "Server error"
+ schema:
+ $ref: "#/definitions/examplepbErrorResponse"
+ default:
+ description: "An unexpected error response."
+ schema:
+ $ref: "#/definitions/rpcStatus"
+ /v1/example/deep_path/{singleNested.name}:
+ post:
+ tags:
+ - "ABitOfEverythingService"
+ operationId: "ABitOfEverythingService_DeepPathEcho"
+ parameters:
+ - name: "singleNested.name"
+ in: "path"
+ description: "name is nested field."
+ required: true
+ type: "string"
+ x-exportParamName: "SingleNestedName"
+ - in: "body"
+ name: "body"
+ required: true
+ schema:
+ $ref: "#/definitions/A bit of everything_1"
+ x-exportParamName: "Body"
+ responses:
+ 200:
+ description: "A successful response."
+ schema:
+ $ref: "#/definitions/examplepbABitOfEverything"
+ 403:
+ description: "Returned when the user does not have permission to access\
+ \ the resource."
+ schema: {}
+ 404:
+ description: "Returned when the resource does not exist."
+ schema:
+ type: "string"
+ format: "string"
+ 418:
+ description: "I'm a teapot."
+ schema:
+ $ref: "#/definitions/examplepbNumericEnum"
+ 500:
+ description: "Server error"
+ schema:
+ $ref: "#/definitions/examplepbErrorResponse"
+ default:
+ description: "An unexpected error response."
+ schema:
+ $ref: "#/definitions/rpcStatus"
+ /v1/example/oneofenum:
+ post:
+ tags:
+ - "ABitOfEverythingService"
+ operationId: "ABitOfEverythingService_PostOneofEnum"
+ parameters:
+ - in: "body"
+ name: "exampleEnum"
+ required: true
+ schema:
+ $ref: "#/definitions/oneofenumExampleEnum"
+ x-exportParamName: "ExampleEnum"
+ responses:
+ 200:
+ description: "A successful response."
+ schema:
+ type: "object"
+ 403:
+ description: "Returned when the user does not have permission to access\
+ \ the resource."
+ schema: {}
+ 404:
+ description: "Returned when the resource does not exist."
+ schema:
+ type: "string"
+ format: "string"
+ 418:
+ description: "I'm a teapot."
+ schema:
+ $ref: "#/definitions/examplepbNumericEnum"
+ 500:
+ description: "Server error"
+ schema:
+ $ref: "#/definitions/examplepbErrorResponse"
+ default:
+ description: "An unexpected error response."
+ schema:
+ $ref: "#/definitions/rpcStatus"
+ /v1/example/requiredmessagetype:
+ post:
+ tags:
+ - "ABitOfEverythingService"
+ operationId: "ABitOfEverythingService_PostRequiredMessageType"
+ parameters:
+ - in: "body"
+ name: "body"
+ required: true
+ schema:
+ $ref: "#/definitions/examplepbRequiredMessageTypeRequest"
+ x-exportParamName: "Body"
+ responses:
+ 200:
+ description: "A successful response."
+ schema:
+ type: "object"
+ 403:
+ description: "Returned when the user does not have permission to access\
+ \ the resource."
+ schema: {}
+ 404:
+ description: "Returned when the resource does not exist."
+ schema:
+ type: "string"
+ format: "string"
+ 418:
+ description: "I'm a teapot."
+ schema:
+ $ref: "#/definitions/examplepbNumericEnum"
+ 500:
+ description: "Server error"
+ schema:
+ $ref: "#/definitions/examplepbErrorResponse"
+ default:
+ description: "An unexpected error response."
+ schema:
+ $ref: "#/definitions/rpcStatus"
+ /v1/example/snake/{who}/{what}/{where}:
+ get:
+ tags:
+ - "SnakeEnumService"
+ operationId: "SnakeEnumService_SnakeEnum"
+ parameters:
+ - name: "who"
+ in: "path"
+ required: true
+ type: "string"
+ enum:
+ - "value_e"
+ - "value_f"
+ x-exportParamName: "Who"
+ - name: "what"
+ in: "path"
+ required: true
+ type: "string"
+ enum:
+ - "value_c"
+ - "value_d"
+ x-exportParamName: "What"
+ - name: "where"
+ in: "path"
+ required: true
+ type: "string"
+ enum:
+ - "value_x"
+ - "value_y"
+ x-exportParamName: "Where"
+ responses:
+ 200:
+ description: "A successful response."
+ schema:
+ $ref: "#/definitions/examplepbSnakeEnumResponse"
+ 403:
+ description: "Returned when the user does not have permission to access\
+ \ the resource."
+ schema: {}
+ 404:
+ description: "Returned when the resource does not exist."
+ schema:
+ type: "string"
+ format: "string"
+ 418:
+ description: "I'm a teapot."
+ schema:
+ $ref: "#/definitions/examplepbNumericEnum"
+ 500:
+ description: "Server error"
+ schema:
+ $ref: "#/definitions/examplepbErrorResponse"
+ default:
+ description: "An unexpected error response."
+ schema:
+ $ref: "#/definitions/rpcStatus"
+ /v1/{book.name}:
+ patch:
+ tags:
+ - "ABitOfEverythingService"
+ operationId: "ABitOfEverythingService_UpdateBook"
+ parameters:
+ - name: "book.name"
+ in: "path"
+ description: "The resource name of the book.\n\nFormat: `publishers/{publisher}/books/{book}`\n\
+ \nExample: `publishers/1257894000000000000/books/my-book`"
+ required: true
+ type: "string"
+ pattern: "publishers/[^/]+/books/[^/]+"
+ x-exportParamName: "BookName"
+ - in: "body"
+ name: "book"
+ description: "The book to update.\n\nThe book's `name` field is used to identify\
+ \ the book to be updated.\nFormat: publishers/{publisher}/books/{book}"
+ required: true
+ schema:
+ $ref: "The book to update."
+ x-exportParamName: "Book"
+ - name: "updateMask"
+ in: "query"
+ description: "The list of fields to be updated."
+ required: false
+ type: "string"
+ x-exportParamName: "UpdateMask"
+ x-optionalDataType: "String"
+ - name: "allowMissing"
+ in: "query"
+ description: "If set to true, and the book is not found, a new book will be\
+ \ created.\nIn this situation, `update_mask` is ignored."
+ required: false
+ type: "boolean"
+ x-exportParamName: "AllowMissing"
+ x-optionalDataType: "Bool"
+ responses:
+ 200:
+ description: "A successful response."
+ schema:
+ $ref: "#/definitions/examplepbBook"
+ 403:
+ description: "Returned when the user does not have permission to access\
+ \ the resource."
+ schema: {}
+ 404:
+ description: "Returned when the resource does not exist."
+ schema:
+ type: "string"
+ format: "string"
+ 418:
+ description: "I'm a teapot."
+ schema:
+ $ref: "#/definitions/examplepbNumericEnum"
+ 500:
+ description: "Server error"
+ schema:
+ $ref: "#/definitions/examplepbErrorResponse"
+ default:
+ description: "An unexpected error response."
+ schema:
+ $ref: "#/definitions/rpcStatus"
+ /v1/{parent}/books:
+ post:
+ tags:
+ - "ABitOfEverythingService"
+ summary: "Create a book."
+ operationId: "ABitOfEverythingService_CreateBook"
+ parameters:
+ - name: "parent"
+ in: "path"
+ description: "The publisher in which to create the book.\n\nFormat: `publishers/{publisher}`\n\
+ \nExample: `publishers/1257894000000000000`"
+ required: true
+ type: "string"
+ pattern: "publishers/[^/]+"
+ x-exportParamName: "Parent"
+ - in: "body"
+ name: "book"
+ description: "The book to create."
+ required: true
+ schema:
+ $ref: "#/definitions/examplepbBook"
+ x-exportParamName: "Book"
+ - name: "bookId"
+ in: "query"
+ description: "The ID to use for the book.\n\nThis must start with an alphanumeric\
+ \ character."
+ required: false
+ type: "string"
+ x-exportParamName: "BookId"
+ x-optionalDataType: "String"
+ responses:
+ 200:
+ description: "A successful response."
+ schema:
+ $ref: "#/definitions/examplepbBook"
+ 403:
+ description: "Returned when the user does not have permission to access\
+ \ the resource."
+ schema: {}
+ 404:
+ description: "Returned when the resource does not exist."
+ schema:
+ type: "string"
+ format: "string"
+ 418:
+ description: "I'm a teapot."
+ schema:
+ $ref: "#/definitions/examplepbNumericEnum"
+ 500:
+ description: "Server error"
+ schema:
+ $ref: "#/definitions/examplepbErrorResponse"
+ default:
+ description: "An unexpected error response."
+ schema:
+ $ref: "#/definitions/rpcStatus"
+ /v2/example/a_bit_of_everything/{uuidName}:
+ put:
+ tags:
+ - "ABitOfEverythingService"
+ operationId: "ABitOfEverythingService_UpdateV2"
+ parameters:
+ - name: "uuidName"
+ in: "path"
+ required: true
+ type: "string"
+ x-internal: true
+ x-exportParamName: "UuidName"
+ - in: "body"
+ name: "abe"
+ description: "A bit of everything\n\nIntentionally complicated message type\
+ \ to cover many features of Protobuf."
+ required: true
+ schema:
+ $ref: "#/definitions/A bit of everything_2"
+ x-exportParamName: "Abe"
+ - name: "updateMask"
+ in: "query"
+ description: "The paths to update."
+ required: false
+ type: "string"
+ x-exportParamName: "UpdateMask"
+ x-optionalDataType: "String"
+ responses:
+ 200:
+ description: "A successful response."
+ schema:
+ type: "object"
+ 403:
+ description: "Returned when the user does not have permission to access\
+ \ the resource."
+ schema: {}
+ 404:
+ description: "Returned when the resource does not exist."
+ schema:
+ type: "string"
+ format: "string"
+ 418:
+ description: "I'm a teapot."
+ schema:
+ $ref: "#/definitions/examplepbNumericEnum"
+ 500:
+ description: "Server error"
+ schema:
+ $ref: "#/definitions/examplepbErrorResponse"
+ default:
+ description: "An unexpected error response."
+ schema:
+ $ref: "#/definitions/rpcStatus"
+ patch:
+ tags:
+ - "ABitOfEverythingService"
+ operationId: "ABitOfEverythingService_UpdateV22"
+ parameters:
+ - name: "uuidName"
+ in: "path"
+ required: true
+ type: "string"
+ x-internal: true
+ x-exportParamName: "UuidName"
+ - in: "body"
+ name: "abe"
+ description: "A bit of everything\n\nIntentionally complicated message type\
+ \ to cover many features of Protobuf."
+ required: true
+ schema:
+ $ref: "#/definitions/A bit of everything_3"
+ x-exportParamName: "Abe"
+ - name: "updateMask"
+ in: "query"
+ description: "The paths to update."
+ required: false
+ type: "string"
+ x-exportParamName: "UpdateMask"
+ x-optionalDataType: "String"
+ responses:
+ 200:
+ description: "A successful response."
+ schema:
+ type: "object"
+ 403:
+ description: "Returned when the user does not have permission to access\
+ \ the resource."
+ schema: {}
+ 404:
+ description: "Returned when the resource does not exist."
+ schema:
+ type: "string"
+ format: "string"
+ 418:
+ description: "I'm a teapot."
+ schema:
+ $ref: "#/definitions/examplepbNumericEnum"
+ 500:
+ description: "Server error"
+ schema:
+ $ref: "#/definitions/examplepbErrorResponse"
+ default:
+ description: "An unexpected error response."
+ schema:
+ $ref: "#/definitions/rpcStatus"
+ /v2/example/echo:
+ get:
+ tags:
+ - "echo rpc"
+ summary: "Summary: Echo rpc"
+ description: "Description Echo"
+ operationId: "ABitOfEverythingService_Echo3"
+ parameters:
+ - name: "value"
+ in: "query"
+ required: false
+ type: "string"
+ x-exportParamName: "Value"
+ x-optionalDataType: "String"
+ responses:
+ 200:
+ description: "A successful response."
+ examples:
+ application/json:
+ value: "the input value"
+ schema:
+ $ref: "#/definitions/subStringMessage"
+ 403:
+ description: "Returned when the user does not have permission to access\
+ \ the resource."
+ schema: {}
+ 404:
+ description: "Returned when the resource does not exist."
+ schema:
+ type: "integer"
+ format: "integer"
+ 418:
+ description: "I'm a teapot."
+ schema:
+ $ref: "#/definitions/examplepbNumericEnum"
+ 500:
+ description: "Server error"
+ schema:
+ $ref: "#/definitions/examplepbErrorResponse"
+ 503:
+ description: "Returned when the resource is temporarily unavailable."
+ schema: {}
+ x-number: 100
+ default:
+ description: "An unexpected error response."
+ schema:
+ $ref: "#/definitions/rpcStatus"
+ externalDocs:
+ description: "Find out more Echo"
+ url: "https://github.com/grpc-ecosystem/grpc-gateway"
+ post:
+ tags:
+ - "echo rpc"
+ summary: "Summary: Echo rpc"
+ description: "Description Echo"
+ operationId: "ABitOfEverythingService_Echo2"
+ parameters:
+ - in: "body"
+ name: "value"
+ required: true
+ schema:
+ type: "string"
+ x-exportParamName: "Value"
+ responses:
+ 200:
+ description: "A successful response."
+ examples:
+ application/json:
+ value: "the input value"
+ schema:
+ $ref: "#/definitions/subStringMessage"
+ 403:
+ description: "Returned when the user does not have permission to access\
+ \ the resource."
+ schema: {}
+ 404:
+ description: "Returned when the resource does not exist."
+ schema:
+ type: "integer"
+ format: "integer"
+ 418:
+ description: "I'm a teapot."
+ schema:
+ $ref: "#/definitions/examplepbNumericEnum"
+ 500:
+ description: "Server error"
+ schema:
+ $ref: "#/definitions/examplepbErrorResponse"
+ 503:
+ description: "Returned when the resource is temporarily unavailable."
+ schema: {}
+ x-number: 100
+ default:
+ description: "An unexpected error response."
+ schema:
+ $ref: "#/definitions/rpcStatus"
+ externalDocs:
+ description: "Find out more Echo"
+ url: "https://github.com/grpc-ecosystem/grpc-gateway"
+ /v2/example/empty:
+ get:
+ tags:
+ - "camelCaseServiceName"
+ operationId: "camelCaseServiceName_Empty"
+ parameters: []
+ responses:
+ 200:
+ description: "A successful response."
+ schema:
+ type: "object"
+ 403:
+ description: "Returned when the user does not have permission to access\
+ \ the resource."
+ schema: {}
+ 404:
+ description: "Returned when the resource does not exist."
+ schema:
+ type: "string"
+ format: "string"
+ 418:
+ description: "I'm a teapot."
+ schema:
+ $ref: "#/definitions/examplepbNumericEnum"
+ 500:
+ description: "Server error"
+ schema:
+ $ref: "#/definitions/examplepbErrorResponse"
+ default:
+ description: "An unexpected error response."
+ schema:
+ $ref: "#/definitions/rpcStatus"
+ /v2/example/errorwithdetails:
+ get:
+ tags:
+ - "ABitOfEverythingService"
+ operationId: "ABitOfEverythingService_ErrorWithDetails"
+ parameters: []
+ responses:
+ 200:
+ description: "A successful response."
+ schema:
+ type: "object"
+ 403:
+ description: "Returned when the user does not have permission to access\
+ \ the resource."
+ schema: {}
+ 404:
+ description: "Returned when the resource does not exist."
+ schema:
+ type: "string"
+ format: "string"
+ 418:
+ description: "I'm a teapot."
+ schema:
+ $ref: "#/definitions/examplepbNumericEnum"
+ 500:
+ description: "Server error"
+ schema:
+ $ref: "#/definitions/examplepbErrorResponse"
+ default:
+ description: "An unexpected error response."
+ schema:
+ $ref: "#/definitions/rpcStatus"
+ /v2/example/overwriterequestcontenttype:
+ post:
+ tags:
+ - "ABitOfEverythingService"
+ operationId: "ABitOfEverythingService_OverwriteRequestContentType"
+ consumes:
+ - "application/x-bar-mime"
+ parameters:
+ - in: "body"
+ name: "body"
+ required: true
+ schema:
+ $ref: "#/definitions/examplepbBody"
+ x-exportParamName: "Body"
+ responses:
+ 200:
+ description: "A successful response."
+ schema:
+ type: "object"
+ 403:
+ description: "Returned when the user does not have permission to access\
+ \ the resource."
+ schema: {}
+ 404:
+ description: "Returned when the resource does not exist."
+ schema:
+ type: "string"
+ format: "string"
+ 418:
+ description: "I'm a teapot."
+ schema:
+ $ref: "#/definitions/examplepbNumericEnum"
+ 500:
+ description: "Server error"
+ schema:
+ $ref: "#/definitions/examplepbErrorResponse"
+ default:
+ description: "An unexpected error response."
+ schema:
+ $ref: "#/definitions/rpcStatus"
+ /v2/example/overwriteresponsecontenttype:
+ get:
+ tags:
+ - "ABitOfEverythingService"
+ operationId: "ABitOfEverythingService_OverwriteResponseContentType"
+ produces:
+ - "application/text"
+ parameters: []
+ responses:
+ 200:
+ description: "A successful response."
+ schema:
+ type: "string"
+ 403:
+ description: "Returned when the user does not have permission to access\
+ \ the resource."
+ schema: {}
+ 404:
+ description: "Returned when the resource does not exist."
+ schema:
+ type: "string"
+ format: "string"
+ 418:
+ description: "I'm a teapot."
+ schema:
+ $ref: "#/definitions/examplepbNumericEnum"
+ 500:
+ description: "Server error"
+ schema:
+ $ref: "#/definitions/examplepbErrorResponse"
+ default:
+ description: "An unexpected error response."
+ schema:
+ $ref: "#/definitions/rpcStatus"
+ /v2/example/postwithemptybody/{name}:
+ post:
+ tags:
+ - "ABitOfEverythingService"
+ operationId: "ABitOfEverythingService_PostWithEmptyBody"
+ parameters:
+ - name: "name"
+ in: "path"
+ required: true
+ type: "string"
+ x-exportParamName: "Name"
+ - in: "body"
+ name: "body"
+ required: true
+ schema:
+ type: "object"
+ x-exportParamName: "Body"
+ responses:
+ 200:
+ description: "A successful response."
+ schema:
+ type: "object"
+ 403:
+ description: "Returned when the user does not have permission to access\
+ \ the resource."
+ schema: {}
+ 404:
+ description: "Returned when the resource does not exist."
+ schema:
+ type: "string"
+ format: "string"
+ 418:
+ description: "I'm a teapot."
+ schema:
+ $ref: "#/definitions/examplepbNumericEnum"
+ 500:
+ description: "Server error"
+ schema:
+ $ref: "#/definitions/examplepbErrorResponse"
+ default:
+ description: "An unexpected error response."
+ schema:
+ $ref: "#/definitions/rpcStatus"
+ /v2/example/timeout:
+ get:
+ tags:
+ - "ABitOfEverythingService"
+ operationId: "ABitOfEverythingService_Timeout"
+ parameters: []
+ responses:
+ 200:
+ description: "A successful response."
+ schema:
+ type: "object"
+ 403:
+ description: "Returned when the user does not have permission to access\
+ \ the resource."
+ schema: {}
+ 404:
+ description: "Returned when the resource does not exist."
+ schema:
+ type: "string"
+ format: "string"
+ 418:
+ description: "I'm a teapot."
+ schema:
+ $ref: "#/definitions/examplepbNumericEnum"
+ 500:
+ description: "Server error"
+ schema:
+ $ref: "#/definitions/examplepbErrorResponse"
+ default:
+ description: "An unexpected error response."
+ schema:
+ $ref: "#/definitions/rpcStatus"
+ /v2/example/withbody/{id}:
+ post:
+ tags:
+ - "ABitOfEverythingService"
+ operationId: "ABitOfEverythingService_GetMessageWithBody"
+ parameters:
+ - name: "id"
+ in: "path"
+ required: true
+ type: "string"
+ x-exportParamName: "Id"
+ - in: "body"
+ name: "data"
+ required: true
+ schema:
+ $ref: "#/definitions/examplepbBody"
+ x-exportParamName: "Data"
+ responses:
+ 200:
+ description: "A successful response."
+ schema:
+ type: "object"
+ 403:
+ description: "Returned when the user does not have permission to access\
+ \ the resource."
+ schema: {}
+ 404:
+ description: "Returned when the resource does not exist."
+ schema:
+ type: "string"
+ format: "string"
+ 418:
+ description: "I'm a teapot."
+ schema:
+ $ref: "#/definitions/examplepbNumericEnum"
+ 500:
+ description: "Server error"
+ schema:
+ $ref: "#/definitions/examplepbErrorResponse"
+ default:
+ description: "An unexpected error response."
+ schema:
+ $ref: "#/definitions/rpcStatus"
+ /v2/{value}:check:
+ get:
+ tags:
+ - "ABitOfEverythingService"
+ operationId: "ABitOfEverythingService_CheckExternalPathEnum"
+ parameters:
+ - name: "value"
+ in: "path"
+ required: true
+ type: "string"
+ enum:
+ - "ABC"
+ - "DEF"
+ x-exportParamName: "Value"
+ responses:
+ 200:
+ description: "A successful response."
+ schema:
+ type: "object"
+ 403:
+ description: "Returned when the user does not have permission to access\
+ \ the resource."
+ schema: {}
+ 404:
+ description: "Returned when the resource does not exist."
+ schema:
+ type: "string"
+ format: "string"
+ 418:
+ description: "I'm a teapot."
+ schema:
+ $ref: "#/definitions/examplepbNumericEnum"
+ 500:
+ description: "Server error"
+ schema:
+ $ref: "#/definitions/examplepbErrorResponse"
+ default:
+ description: "An unexpected error response."
+ schema:
+ $ref: "#/definitions/rpcStatus"
+ /v2a/example/a_bit_of_everything/{uuidName}:
+ patch:
+ tags:
+ - "ABitOfEverythingService"
+ operationId: "ABitOfEverythingService_UpdateV23"
+ parameters:
+ - name: "uuidName"
+ in: "path"
+ required: true
+ type: "string"
+ x-internal: true
+ x-exportParamName: "UuidName"
+ - in: "body"
+ name: "body"
+ required: true
+ schema:
+ $ref: "#/definitions/UpdateV2Request request for update includes the message\
+ \ and the update mask"
+ x-exportParamName: "Body"
+ responses:
+ 200:
+ description: "A successful response."
+ schema:
+ type: "object"
+ 403:
+ description: "Returned when the user does not have permission to access\
+ \ the resource."
+ schema: {}
+ 404:
+ description: "Returned when the resource does not exist."
+ schema:
+ type: "string"
+ format: "string"
+ 418:
+ description: "I'm a teapot."
+ schema:
+ $ref: "#/definitions/examplepbNumericEnum"
+ 500:
+ description: "Server error"
+ schema:
+ $ref: "#/definitions/examplepbErrorResponse"
+ default:
+ description: "An unexpected error response."
+ schema:
+ $ref: "#/definitions/rpcStatus"
+ /v3/{value}:check:
+ get:
+ tags:
+ - "ABitOfEverythingService"
+ operationId: "ABitOfEverythingService_CheckExternalNestedPathEnum"
+ parameters:
+ - name: "value"
+ in: "path"
+ required: true
+ type: "string"
+ enum:
+ - "GHI"
+ - "JKL"
+ x-exportParamName: "Value"
+ responses:
+ 200:
+ description: "A successful response."
+ schema:
+ type: "object"
+ 403:
+ description: "Returned when the user does not have permission to access\
+ \ the resource."
+ schema: {}
+ 404:
+ description: "Returned when the resource does not exist."
+ schema:
+ type: "string"
+ format: "string"
+ 418:
+ description: "I'm a teapot."
+ schema:
+ $ref: "#/definitions/examplepbNumericEnum"
+ 500:
+ description: "Server error"
+ schema:
+ $ref: "#/definitions/examplepbErrorResponse"
+ default:
+ description: "An unexpected error response."
+ schema:
+ $ref: "#/definitions/rpcStatus"
+securityDefinitions:
+ ApiKeyAuth:
+ type: "apiKey"
+ name: "X-API-Key"
+ in: "header"
+ x-amazon-apigateway-authorizer:
+ authorizerResultTtlInSeconds: 60
+ type: "token"
+ x-amazon-apigateway-authtype: "oauth2"
+ BasicAuth:
+ type: "basic"
+ OAuth2:
+ type: "oauth2"
+ authorizationUrl: "https://example.com/oauth/authorize"
+ tokenUrl: "https://example.com/oauth/token"
+ flow: "accessCode"
+ scopes:
+ admin: "Grants read and write access to administrative information"
+ read: "Grants read access"
+ write: "Grants write access"
+definitions:
+ ABitOfEverythingNested:
+ type: "object"
+ properties:
+ name:
+ type: "string"
+ description: "name is nested field."
+ amount:
+ type: "integer"
+ format: "int64"
+ ok:
+ description: "DeepEnum description."
+ $ref: "#/definitions/NestedDeepEnum"
+ description: "Nested is nested type."
+ example:
+ ok: "TRUE"
+ MessagePathEnumNestedPathEnum:
+ type: "string"
+ enum:
+ - "GHI"
+ - "JKL"
+ default: "GHI"
+ NestedDeepEnum:
+ type: "string"
+ description: "DeepEnum is one or zero.\n\n - FALSE: FALSE is false.\n - TRUE:\
+ \ TRUE is true."
+ enum:
+ - "FALSE"
+ - "TRUE"
+ default: "FALSE"
+ examplepbABitOfEverything:
+ type: "object"
+ required:
+ - "doubleValue"
+ - "floatValue"
+ - "int64Value"
+ - "requiredStringField1"
+ - "requiredStringField2"
+ - "requiredStringViaFieldBehaviorAnnotation"
+ - "required_field_behavior_json_name_custom"
+ - "required_field_schema_json_name_custom"
+ - "uuid"
+ properties:
+ singleNested:
+ $ref: "#/definitions/ABitOfEverythingNested"
+ uuid:
+ type: "string"
+ minLength: 1
+ pattern: "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}"
+ x-internal: true
+ nested:
+ type: "array"
+ items:
+ $ref: "#/definitions/ABitOfEverythingNested"
+ floatValue:
+ type: "number"
+ format: "float"
+ description: "Float value field"
+ default: 0.2
+ doubleValue:
+ type: "number"
+ format: "double"
+ int64Value:
+ type: "string"
+ format: "int64"
+ uint64Value:
+ type: "string"
+ format: "uint64"
+ int32Value:
+ type: "integer"
+ format: "int32"
+ fixed64Value:
+ type: "string"
+ format: "uint64"
+ fixed32Value:
+ type: "integer"
+ format: "int64"
+ boolValue:
+ type: "boolean"
+ stringValue:
+ type: "string"
+ bytesValue:
+ type: "string"
+ format: "byte"
+ pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"
+ uint32Value:
+ type: "integer"
+ format: "int64"
+ enumValue:
+ $ref: "#/definitions/examplepbNumericEnum"
+ pathEnumValue:
+ $ref: "#/definitions/pathenumPathEnum"
+ nestedPathEnumValue:
+ $ref: "#/definitions/MessagePathEnumNestedPathEnum"
+ sfixed32Value:
+ type: "integer"
+ format: "int32"
+ sfixed64Value:
+ type: "string"
+ format: "int64"
+ sint32Value:
+ type: "integer"
+ format: "int32"
+ sint64Value:
+ type: "string"
+ format: "int64"
+ repeatedStringValue:
+ type: "array"
+ items:
+ type: "string"
+ oneofEmpty:
+ type: "object"
+ properties: {}
+ oneofString:
+ type: "string"
+ mapValue:
+ type: "object"
+ additionalProperties:
+ $ref: "#/definitions/examplepbNumericEnum"
+ mappedStringValue:
+ type: "object"
+ additionalProperties:
+ type: "string"
+ mappedNestedValue:
+ type: "object"
+ additionalProperties:
+ $ref: "#/definitions/ABitOfEverythingNested"
+ nonConventionalNameValue:
+ type: "string"
+ timestampValue:
+ type: "string"
+ format: "date-time"
+ repeatedEnumValue:
+ type: "array"
+ title: "repeated enum value. it is comma-separated in query"
+ items:
+ $ref: "#/definitions/examplepbNumericEnum"
+ repeatedEnumAnnotation:
+ type: "array"
+ description: "Repeated numeric enum description."
+ title: "Repeated numeric enum title"
+ items:
+ $ref: "#/definitions/examplepbNumericEnum"
+ enumValueAnnotation:
+ description: "Numeric enum description."
+ title: "Numeric enum title"
+ $ref: "#/definitions/examplepbNumericEnum"
+ repeatedStringAnnotation:
+ type: "array"
+ description: "Repeated string description."
+ title: "Repeated string title"
+ items:
+ type: "string"
+ repeatedNestedAnnotation:
+ type: "array"
+ description: "Repeated nested object description."
+ title: "Repeated nested object title"
+ items:
+ $ref: "#/definitions/ABitOfEverythingNested"
+ nestedAnnotation:
+ description: "Nested object description."
+ title: "Nested object title"
+ $ref: "#/definitions/ABitOfEverythingNested"
+ int64OverrideType:
+ type: "integer"
+ format: "int64"
+ requiredStringViaFieldBehaviorAnnotation:
+ type: "string"
+ title: "mark a field as required in Open API definition"
+ outputOnlyStringViaFieldBehaviorAnnotation:
+ type: "string"
+ title: "mark a field as readonly in Open API definition"
+ readOnly: true
+ optionalStringValue:
+ type: "string"
+ productId:
+ type: "array"
+ description: "Only digits are allowed."
+ title: "Test openapiv2 generation of repeated fields"
+ items:
+ type: "string"
+ minLength: 1
+ maxLength: 19
+ pattern: "^[0-9]+$"
+ optionalStringField:
+ type: "string"
+ title: "Test openapiv2 generation of required fields with annotation and jsonschema\
+ \ to reproduce"
+ requiredStringField1:
+ type: "string"
+ requiredStringField2:
+ type: "string"
+ required_field_behavior_json_name_custom:
+ type: "string"
+ title: "Test openapiv2 handling of required json_name fields"
+ required_field_schema_json_name_custom:
+ type: "string"
+ trailingOnly:
+ type: "string"
+ title: "Trailing only"
+ trailingOnlyDot:
+ type: "string"
+ description: "Trailing only dot."
+ trailingBoth:
+ type: "string"
+ description: "Trailing both."
+ title: "Leading both"
+ trailingMultiline:
+ type: "string"
+ description: "This is an example of a multi-line comment.\n\nTrailing multiline."
+ title: "Leading multiline"
+ externalDocs:
+ description: "Find out more about ABitOfEverything"
+ url: "https://github.com/grpc-ecosystem/grpc-gateway"
+ title: "A bit of everything"
+ description: "Intentionally complicated message type to cover many features of\
+ \ Protobuf."
+ example:
+ int64_value: 12
+ double_value: 12.3
+ x-a-bit-of-everything-foo: "bar"
+ examplepbABitOfEverythingRepeated:
+ type: "object"
+ properties:
+ pathRepeatedFloatValue:
+ type: "array"
+ title: "repeated values. they are comma-separated in path"
+ items:
+ type: "number"
+ format: "float"
+ pathRepeatedDoubleValue:
+ type: "array"
+ items:
+ type: "number"
+ format: "double"
+ pathRepeatedInt64Value:
+ type: "array"
+ items:
+ type: "string"
+ format: "int64"
+ pathRepeatedUint64Value:
+ type: "array"
+ items:
+ type: "string"
+ format: "uint64"
+ pathRepeatedInt32Value:
+ type: "array"
+ items:
+ type: "integer"
+ format: "int32"
+ pathRepeatedFixed64Value:
+ type: "array"
+ items:
+ type: "string"
+ format: "uint64"
+ pathRepeatedFixed32Value:
+ type: "array"
+ items:
+ type: "integer"
+ format: "int64"
+ pathRepeatedBoolValue:
+ type: "array"
+ items:
+ type: "boolean"
+ pathRepeatedStringValue:
+ type: "array"
+ items:
+ type: "string"
+ pathRepeatedBytesValue:
+ type: "array"
+ items:
+ type: "string"
+ format: "byte"
+ pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"
+ pathRepeatedUint32Value:
+ type: "array"
+ items:
+ type: "integer"
+ format: "int64"
+ pathRepeatedEnumValue:
+ type: "array"
+ items:
+ $ref: "#/definitions/examplepbNumericEnum"
+ pathRepeatedSfixed32Value:
+ type: "array"
+ items:
+ type: "integer"
+ format: "int32"
+ pathRepeatedSfixed64Value:
+ type: "array"
+ items:
+ type: "string"
+ format: "int64"
+ pathRepeatedSint32Value:
+ type: "array"
+ items:
+ type: "integer"
+ format: "int32"
+ pathRepeatedSint64Value:
+ type: "array"
+ items:
+ type: "string"
+ format: "int64"
+ title: "ABitOfEverythingRepeated is used to validate repeated path parameter functionality"
+ example:
+ path_repeated_bool_value:
+ - true
+ - true
+ - false
+ - true
+ path_repeated_int32_value:
+ - 1
+ - 2
+ - 3
+ examplepbBar:
+ type: "object"
+ required:
+ - "id"
+ properties:
+ id:
+ type: "string"
+ examplepbBody:
+ type: "object"
+ properties:
+ name:
+ type: "string"
+ examplepbBook:
+ type: "object"
+ properties:
+ name:
+ type: "string"
+ description: "The resource name of the book.\n\nFormat: `publishers/{publisher}/books/{book}`\n\
+ \nExample: `publishers/1257894000000000000/books/my-book`"
+ id:
+ type: "string"
+ description: "Output only. The book's ID."
+ readOnly: true
+ createTime:
+ type: "string"
+ format: "date-time"
+ description: "Output only. Creation time of the book."
+ readOnly: true
+ description: "An example resource type from AIP-123 used to test the behavior\
+ \ described in\nthe CreateBookRequest message.\n\nSee: https://google.aip.dev/123"
+ example:
+ createTime: "2000-01-23T04:56:07.000+00:00"
+ name: "name"
+ id: "id"
+ examplepbCheckStatusResponse:
+ type: "object"
+ properties:
+ status:
+ $ref: "#/definitions/rpcStatus"
+ example:
+ status:
+ code: 0
+ details:
+ - '@type': "@type"
+ - '@type': "@type"
+ message: "message"
+ examplepbErrorObject:
+ type: "object"
+ properties:
+ code:
+ type: "integer"
+ format: "integer"
+ description: "Response code"
+ title: "code"
+ message:
+ type: "string"
+ description: "Response message"
+ title: "message"
+ pattern: "^[a-zA-Z0-9]{1, 32}$"
+ examplepbErrorResponse:
+ type: "object"
+ properties:
+ correlationId:
+ type: "string"
+ format: "uuid"
+ example: "2438ac3c-37eb-4902-adef-ed16b4431030"
+ description: "Unique event identifier for server requests"
+ title: "x-correlation-id"
+ pattern: "^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"
+ error:
+ $ref: "#/definitions/examplepbErrorObject"
+ examplepbFoo:
+ type: "object"
+ required:
+ - "bar"
+ properties:
+ bar:
+ $ref: "#/definitions/examplepbBar"
+ examplepbNumericEnum:
+ type: "string"
+ description: "NumericEnum is one or zero.\n\n - ZERO: ZERO means 0\n - ONE: ONE\
+ \ means 1"
+ enum:
+ - "ZERO"
+ - "ONE"
+ default: "ZERO"
+ examplepbRequiredMessageTypeRequest:
+ type: "object"
+ required:
+ - "foo"
+ - "id"
+ properties:
+ id:
+ type: "string"
+ foo:
+ $ref: "#/definitions/examplepbFoo"
+ title: "Required message type -> OpenAPI\nhttps://github.com/grpc-ecosystem/grpc-gateway/issues/2837"
+ examplepbSnakeEnumResponse:
+ type: "object"
+ examplepbsnake_case_0_enum:
+ type: "string"
+ title: "Ignoring lint warnings as this enum type exist to validate proper functionality\n\
+ for projects that don't follow these lint rules.\nbuf:lint:ignore ENUM_PASCAL_CASE"
+ description: "- value_e: buf:lint:ignore ENUM_VALUE_UPPER_SNAKE_CASE\n - value_f:\
+ \ buf:lint:ignore ENUM_VALUE_UPPER_SNAKE_CASE"
+ enum:
+ - "value_e"
+ - "value_f"
+ default: "value_e"
+ examplepbsnake_case_enum:
+ type: "string"
+ title: "Ignoring lint warnings as this enum type exist to validate proper functionality\n\
+ for projects that don't follow these lint rules.\nbuf:lint:ignore ENUM_PASCAL_CASE"
+ description: "- value_c: buf:lint:ignore ENUM_VALUE_UPPER_SNAKE_CASE\n - value_d:\
+ \ buf:lint:ignore ENUM_VALUE_UPPER_SNAKE_CASE"
+ enum:
+ - "value_c"
+ - "value_d"
+ default: "value_c"
+ oneofenumExampleEnum:
+ type: "string"
+ enum:
+ - "EXAMPLE_ENUM_UNSPECIFIED"
+ - "EXAMPLE_ENUM_FIRST"
+ default: "EXAMPLE_ENUM_UNSPECIFIED"
+ pathenumPathEnum:
+ type: "string"
+ enum:
+ - "ABC"
+ - "DEF"
+ default: "ABC"
+ pathenumsnake_case_for_import:
+ type: "string"
+ title: "Ignoring lint warnings as this enum type exist to validate proper functionality\n\
+ for projects that don't follow these lint rules.\nbuf:lint:ignore ENUM_PASCAL_CASE"
+ description: "- value_x: buf:lint:ignore ENUM_VALUE_UPPER_SNAKE_CASE\n - value_y:\
+ \ buf:lint:ignore ENUM_VALUE_UPPER_SNAKE_CASE"
+ enum:
+ - "value_x"
+ - "value_y"
+ default: "value_x"
+ protobufAny:
+ type: "object"
+ properties:
+ '@type':
+ type: "string"
+ description: "A URL/resource name that uniquely identifies the type of the\
+ \ serialized\nprotocol buffer message. This string must contain at least\n\
+ one \"/\" character. The last segment of the URL's path must represent\n\
+ the 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\n\
+ expect it to use in the context of Any. However, for URLs which use the\n\
+ scheme `http`, `https`, or no scheme, one can optionally set up a type\n\
+ server 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."
+ 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(&foo)) {\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 := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err\
+ \ != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err\
+ \ := any.UnmarshalTo(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\": ,\n \"lastName\": \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 }"
+ example:
+ '@type': "@type"
+ additionalProperties: {}
+ rpcStatus:
+ type: "object"
+ properties:
+ code:
+ type: "integer"
+ format: "int32"
+ description: "The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]."
+ message:
+ type: "string"
+ description: "A developer-facing error message, which should be in English.\
+ \ Any\nuser-facing error message should be localized and sent in the\n[google.rpc.Status.details][google.rpc.Status.details]\
+ \ field, or localized by the client."
+ details:
+ type: "array"
+ description: "A list of messages that carry the error details. There is a\
+ \ common set of\nmessage types for APIs to use."
+ items:
+ $ref: "#/definitions/protobufAny"
+ description: "The `Status` type defines a logical error model that is suitable\
+ \ for\ndifferent programming environments, including REST APIs and RPC APIs.\
+ \ It is\nused by [gRPC](https://github.com/grpc). Each `Status` message contains\n\
+ three pieces of data: error code, error message, and error details.\n\nYou can\
+ \ find out more about this error model and how to work with it in the\n[API\
+ \ Design Guide](https://cloud.google.com/apis/design/errors)."
+ example:
+ code: 0
+ details:
+ - '@type': "@type"
+ - '@type': "@type"
+ message: "message"
+ subStringMessage:
+ type: "object"
+ properties:
+ value:
+ type: "string"
+ A bit of everything:
+ type: "object"
+ required:
+ - "doubleValue"
+ - "floatValue"
+ - "int64Value"
+ - "requiredStringField1"
+ - "requiredStringField2"
+ - "requiredStringViaFieldBehaviorAnnotation"
+ - "required_field_behavior_json_name_custom"
+ - "required_field_schema_json_name_custom"
+ properties:
+ singleNested:
+ $ref: "#/definitions/ABitOfEverythingNested"
+ nested:
+ type: "array"
+ items:
+ $ref: "#/definitions/ABitOfEverythingNested"
+ floatValue:
+ type: "number"
+ format: "float"
+ description: "Float value field"
+ default: 0.2
+ doubleValue:
+ type: "number"
+ format: "double"
+ int64Value:
+ type: "string"
+ format: "int64"
+ uint64Value:
+ type: "string"
+ format: "uint64"
+ int32Value:
+ type: "integer"
+ format: "int32"
+ fixed64Value:
+ type: "string"
+ format: "uint64"
+ fixed32Value:
+ type: "integer"
+ format: "int64"
+ boolValue:
+ type: "boolean"
+ stringValue:
+ type: "string"
+ bytesValue:
+ type: "string"
+ format: "byte"
+ pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"
+ uint32Value:
+ type: "integer"
+ format: "int64"
+ enumValue:
+ $ref: "#/definitions/examplepbNumericEnum"
+ pathEnumValue:
+ $ref: "#/definitions/pathenumPathEnum"
+ nestedPathEnumValue:
+ $ref: "#/definitions/MessagePathEnumNestedPathEnum"
+ sfixed32Value:
+ type: "integer"
+ format: "int32"
+ sfixed64Value:
+ type: "string"
+ format: "int64"
+ sint32Value:
+ type: "integer"
+ format: "int32"
+ sint64Value:
+ type: "string"
+ format: "int64"
+ repeatedStringValue:
+ type: "array"
+ items:
+ type: "string"
+ oneofEmpty:
+ type: "object"
+ properties: {}
+ oneofString:
+ type: "string"
+ mapValue:
+ type: "object"
+ additionalProperties:
+ $ref: "#/definitions/examplepbNumericEnum"
+ mappedStringValue:
+ type: "object"
+ additionalProperties:
+ type: "string"
+ mappedNestedValue:
+ type: "object"
+ additionalProperties:
+ $ref: "#/definitions/ABitOfEverythingNested"
+ nonConventionalNameValue:
+ type: "string"
+ timestampValue:
+ type: "string"
+ format: "date-time"
+ repeatedEnumValue:
+ type: "array"
+ title: "repeated enum value. it is comma-separated in query"
+ items:
+ $ref: "#/definitions/examplepbNumericEnum"
+ repeatedEnumAnnotation:
+ type: "array"
+ description: "Repeated numeric enum description."
+ title: "Repeated numeric enum title"
+ items:
+ $ref: "#/definitions/examplepbNumericEnum"
+ enumValueAnnotation:
+ description: "Numeric enum description."
+ title: "Numeric enum title"
+ $ref: "#/definitions/examplepbNumericEnum"
+ repeatedStringAnnotation:
+ type: "array"
+ description: "Repeated string description."
+ title: "Repeated string title"
+ items:
+ type: "string"
+ repeatedNestedAnnotation:
+ type: "array"
+ description: "Repeated nested object description."
+ title: "Repeated nested object title"
+ items:
+ $ref: "#/definitions/ABitOfEverythingNested"
+ nestedAnnotation:
+ description: "Nested object description."
+ title: "Nested object title"
+ $ref: "#/definitions/ABitOfEverythingNested"
+ int64OverrideType:
+ type: "integer"
+ format: "int64"
+ requiredStringViaFieldBehaviorAnnotation:
+ type: "string"
+ title: "mark a field as required in Open API definition"
+ outputOnlyStringViaFieldBehaviorAnnotation:
+ type: "string"
+ title: "mark a field as readonly in Open API definition"
+ readOnly: true
+ optionalStringValue:
+ type: "string"
+ productId:
+ type: "array"
+ description: "Only digits are allowed."
+ title: "Test openapiv2 generation of repeated fields"
+ items:
+ type: "string"
+ minLength: 1
+ maxLength: 19
+ pattern: "^[0-9]+$"
+ optionalStringField:
+ type: "string"
+ title: "Test openapiv2 generation of required fields with annotation and jsonschema\
+ \ to reproduce"
+ requiredStringField1:
+ type: "string"
+ requiredStringField2:
+ type: "string"
+ required_field_behavior_json_name_custom:
+ type: "string"
+ title: "Test openapiv2 handling of required json_name fields"
+ required_field_schema_json_name_custom:
+ type: "string"
+ trailingOnly:
+ type: "string"
+ title: "Trailing only"
+ trailingOnlyDot:
+ type: "string"
+ description: "Trailing only dot."
+ trailingBoth:
+ type: "string"
+ description: "Trailing both."
+ title: "Leading both"
+ trailingMultiline:
+ type: "string"
+ description: "This is an example of a multi-line comment.\n\nTrailing multiline."
+ title: "Leading multiline"
+ externalDocs:
+ description: "Find out more about ABitOfEverything"
+ url: "https://github.com/grpc-ecosystem/grpc-gateway"
+ title: "A bit of everything"
+ description: "Intentionally complicated message type to cover many features of\
+ \ Protobuf."
+ example:
+ int64_value: 12
+ double_value: 12.3
+ x-a-bit-of-everything-foo: "bar"
+ v1exampledeep_pathsingleNested.name_singleNested:
+ properties:
+ amount:
+ type: "integer"
+ format: "int64"
+ ok:
+ description: "DeepEnum description."
+ $ref: "#/definitions/NestedDeepEnum"
+ description: "Nested is nested type."
+ example: "{\"ok\":\"TRUE\"}"
+ A bit of everything_1:
type: "object"
+ required:
+ - "doubleValue"
+ - "floatValue"
+ - "int64Value"
+ - "requiredStringField1"
+ - "requiredStringField2"
+ - "requiredStringViaFieldBehaviorAnnotation"
+ - "required_field_behavior_json_name_custom"
+ - "required_field_schema_json_name_custom"
+ - "uuid"
properties:
- name:
+ singleNested:
+ $ref: "v1exampledeep_pathsingleNested.name_singleNested"
+ uuid:
+ type: "string"
+ minLength: 1
+ pattern: "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}"
+ x-internal: true
+ nested:
+ type: "array"
+ items:
+ $ref: "#/definitions/ABitOfEverythingNested"
+ floatValue:
+ type: "number"
+ format: "float"
+ description: "Float value field"
+ default: 0.2
+ doubleValue:
+ type: "number"
+ format: "double"
+ int64Value:
+ type: "string"
+ format: "int64"
+ uint64Value:
+ type: "string"
+ format: "uint64"
+ int32Value:
+ type: "integer"
+ format: "int32"
+ fixed64Value:
+ type: "string"
+ format: "uint64"
+ fixed32Value:
+ type: "integer"
+ format: "int64"
+ boolValue:
+ type: "boolean"
+ stringValue:
+ type: "string"
+ bytesValue:
+ type: "string"
+ format: "byte"
+ pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"
+ uint32Value:
+ type: "integer"
+ format: "int64"
+ enumValue:
+ $ref: "#/definitions/examplepbNumericEnum"
+ pathEnumValue:
+ $ref: "#/definitions/pathenumPathEnum"
+ nestedPathEnumValue:
+ $ref: "#/definitions/MessagePathEnumNestedPathEnum"
+ sfixed32Value:
+ type: "integer"
+ format: "int32"
+ sfixed64Value:
+ type: "string"
+ format: "int64"
+ sint32Value:
+ type: "integer"
+ format: "int32"
+ sint64Value:
+ type: "string"
+ format: "int64"
+ repeatedStringValue:
+ type: "array"
+ items:
+ type: "string"
+ oneofEmpty:
+ type: "object"
+ properties: {}
+ oneofString:
type: "string"
- description: "name is nested field."
- amount:
+ mapValue:
+ type: "object"
+ additionalProperties:
+ $ref: "#/definitions/examplepbNumericEnum"
+ mappedStringValue:
+ type: "object"
+ additionalProperties:
+ type: "string"
+ mappedNestedValue:
+ type: "object"
+ additionalProperties:
+ $ref: "#/definitions/ABitOfEverythingNested"
+ nonConventionalNameValue:
+ type: "string"
+ timestampValue:
+ type: "string"
+ format: "date-time"
+ repeatedEnumValue:
+ type: "array"
+ title: "repeated enum value. it is comma-separated in query"
+ items:
+ $ref: "#/definitions/examplepbNumericEnum"
+ repeatedEnumAnnotation:
+ type: "array"
+ description: "Repeated numeric enum description."
+ title: "Repeated numeric enum title"
+ items:
+ $ref: "#/definitions/examplepbNumericEnum"
+ enumValueAnnotation:
+ description: "Numeric enum description."
+ title: "Numeric enum title"
+ $ref: "#/definitions/examplepbNumericEnum"
+ repeatedStringAnnotation:
+ type: "array"
+ description: "Repeated string description."
+ title: "Repeated string title"
+ items:
+ type: "string"
+ repeatedNestedAnnotation:
+ type: "array"
+ description: "Repeated nested object description."
+ title: "Repeated nested object title"
+ items:
+ $ref: "#/definitions/ABitOfEverythingNested"
+ nestedAnnotation:
+ description: "Nested object description."
+ title: "Nested object title"
+ $ref: "#/definitions/ABitOfEverythingNested"
+ int64OverrideType:
type: "integer"
format: "int64"
- ok:
- description: "DeepEnum description."
- $ref: "#/definitions/NestedDeepEnum"
- description: "Nested is nested type."
+ requiredStringViaFieldBehaviorAnnotation:
+ type: "string"
+ title: "mark a field as required in Open API definition"
+ outputOnlyStringViaFieldBehaviorAnnotation:
+ type: "string"
+ title: "mark a field as readonly in Open API definition"
+ readOnly: true
+ optionalStringValue:
+ type: "string"
+ productId:
+ type: "array"
+ description: "Only digits are allowed."
+ title: "Test openapiv2 generation of repeated fields"
+ items:
+ type: "string"
+ minLength: 1
+ maxLength: 19
+ pattern: "^[0-9]+$"
+ optionalStringField:
+ type: "string"
+ title: "Test openapiv2 generation of required fields with annotation and jsonschema\
+ \ to reproduce"
+ requiredStringField1:
+ type: "string"
+ requiredStringField2:
+ type: "string"
+ required_field_behavior_json_name_custom:
+ type: "string"
+ title: "Test openapiv2 handling of required json_name fields"
+ required_field_schema_json_name_custom:
+ type: "string"
+ trailingOnly:
+ type: "string"
+ title: "Trailing only"
+ trailingOnlyDot:
+ type: "string"
+ description: "Trailing only dot."
+ trailingBoth:
+ type: "string"
+ description: "Trailing both."
+ title: "Leading both"
+ trailingMultiline:
+ type: "string"
+ description: "This is an example of a multi-line comment.\n\nTrailing multiline."
+ title: "Leading multiline"
+ externalDocs:
+ description: "Find out more about ABitOfEverything"
+ url: "https://github.com/grpc-ecosystem/grpc-gateway"
+ title: "A bit of everything"
+ description: "Intentionally complicated message type to cover many features of\
+ \ Protobuf."
example:
- ok: "TRUE"
- MessagePathEnumNestedPathEnum:
- type: "string"
- enum:
- - "GHI"
- - "JKL"
- default: "GHI"
- NestedDeepEnum:
- type: "string"
- description: "DeepEnum is one or zero.\n\n - FALSE: FALSE is false.\n - TRUE:\
- \ TRUE is true."
- enum:
- - "FALSE"
- - "TRUE"
- default: "FALSE"
- examplepbABitOfEverything:
+ int64_value: 12
+ double_value: 12.3
+ x-a-bit-of-everything-foo: "bar"
+ The book to update.:
+ type: "object"
+ properties:
+ id:
+ type: "string"
+ description: "Output only. The book's ID."
+ readOnly: true
+ createTime:
+ type: "string"
+ format: "date-time"
+ description: "Output only. Creation time of the book."
+ readOnly: true
+ title: "The book to update."
+ description: "The book's `name` field is used to identify the book to be updated.\n\
+ Format: publishers/{publisher}/books/{book}"
+ A bit of everything_2:
type: "object"
required:
- "doubleValue"
- "floatValue"
- "int64Value"
+ - "requiredStringField1"
+ - "requiredStringField2"
- "requiredStringViaFieldBehaviorAnnotation"
- - "uuid"
+ - "required_field_behavior_json_name_custom"
+ - "required_field_schema_json_name_custom"
properties:
singleNested:
$ref: "#/definitions/ABitOfEverythingNested"
- uuid:
- type: "string"
- minLength: 1
- pattern: "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}"
nested:
type: "array"
items:
@@ -2724,303 +5921,238 @@ definitions:
readOnly: true
optionalStringValue:
type: "string"
+ productId:
+ type: "array"
+ description: "Only digits are allowed."
+ title: "Test openapiv2 generation of repeated fields"
+ items:
+ type: "string"
+ minLength: 1
+ maxLength: 19
+ pattern: "^[0-9]+$"
+ optionalStringField:
+ type: "string"
+ title: "Test openapiv2 generation of required fields with annotation and jsonschema\
+ \ to reproduce"
+ requiredStringField1:
+ type: "string"
+ requiredStringField2:
+ type: "string"
+ required_field_behavior_json_name_custom:
+ type: "string"
+ title: "Test openapiv2 handling of required json_name fields"
+ required_field_schema_json_name_custom:
+ type: "string"
+ trailingOnly:
+ type: "string"
+ title: "Trailing only"
+ trailingOnlyDot:
+ type: "string"
+ description: "Trailing only dot."
+ trailingBoth:
+ type: "string"
+ description: "Trailing both."
+ title: "Leading both"
+ trailingMultiline:
+ type: "string"
+ description: "This is an example of a multi-line comment.\n\nTrailing multiline."
+ title: "Leading multiline"
externalDocs:
description: "Find out more about ABitOfEverything"
url: "https://github.com/grpc-ecosystem/grpc-gateway"
title: "A bit of everything"
- description: "Intentionaly complicated message type to cover many features of\
+ description: "Intentionally complicated message type to cover many features of\
\ Protobuf."
example:
int64_value: 12
double_value: 12.3
- examplepbABitOfEverythingRepeated:
+ x-a-bit-of-everything-foo: "bar"
+ A bit of everything_3:
type: "object"
+ required:
+ - "doubleValue"
+ - "floatValue"
+ - "int64Value"
+ - "requiredStringField1"
+ - "requiredStringField2"
+ - "requiredStringViaFieldBehaviorAnnotation"
+ - "required_field_behavior_json_name_custom"
+ - "required_field_schema_json_name_custom"
properties:
- pathRepeatedFloatValue:
- type: "array"
- title: "repeated values. they are comma-separated in path"
- items:
- type: "number"
- format: "float"
- pathRepeatedDoubleValue:
- type: "array"
- items:
- type: "number"
- format: "double"
- pathRepeatedInt64Value:
- type: "array"
- items:
- type: "string"
- format: "int64"
- pathRepeatedUint64Value:
- type: "array"
- items:
- type: "string"
- format: "uint64"
- pathRepeatedInt32Value:
- type: "array"
- items:
- type: "integer"
- format: "int32"
- pathRepeatedFixed64Value:
- type: "array"
- items:
- type: "string"
- format: "uint64"
- pathRepeatedFixed32Value:
- type: "array"
- items:
- type: "integer"
- format: "int64"
- pathRepeatedBoolValue:
+ singleNested:
+ $ref: "#/definitions/ABitOfEverythingNested"
+ nested:
type: "array"
items:
- type: "boolean"
- pathRepeatedStringValue:
+ $ref: "#/definitions/ABitOfEverythingNested"
+ floatValue:
+ type: "number"
+ format: "float"
+ description: "Float value field"
+ default: 0.2
+ doubleValue:
+ type: "number"
+ format: "double"
+ int64Value:
+ type: "string"
+ format: "int64"
+ uint64Value:
+ type: "string"
+ format: "uint64"
+ int32Value:
+ type: "integer"
+ format: "int32"
+ fixed64Value:
+ type: "string"
+ format: "uint64"
+ fixed32Value:
+ type: "integer"
+ format: "int64"
+ boolValue:
+ type: "boolean"
+ stringValue:
+ type: "string"
+ bytesValue:
+ type: "string"
+ format: "byte"
+ pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"
+ uint32Value:
+ type: "integer"
+ format: "int64"
+ enumValue:
+ $ref: "#/definitions/examplepbNumericEnum"
+ pathEnumValue:
+ $ref: "#/definitions/pathenumPathEnum"
+ nestedPathEnumValue:
+ $ref: "#/definitions/MessagePathEnumNestedPathEnum"
+ sfixed32Value:
+ type: "integer"
+ format: "int32"
+ sfixed64Value:
+ type: "string"
+ format: "int64"
+ sint32Value:
+ type: "integer"
+ format: "int32"
+ sint64Value:
+ type: "string"
+ format: "int64"
+ repeatedStringValue:
type: "array"
items:
type: "string"
- pathRepeatedBytesValue:
- type: "array"
- items:
+ oneofEmpty:
+ type: "object"
+ properties: {}
+ oneofString:
+ type: "string"
+ mapValue:
+ type: "object"
+ additionalProperties:
+ $ref: "#/definitions/examplepbNumericEnum"
+ mappedStringValue:
+ type: "object"
+ additionalProperties:
type: "string"
- format: "byte"
- pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"
- pathRepeatedUint32Value:
- type: "array"
- items:
- type: "integer"
- format: "int64"
- pathRepeatedEnumValue:
+ mappedNestedValue:
+ type: "object"
+ additionalProperties:
+ $ref: "#/definitions/ABitOfEverythingNested"
+ nonConventionalNameValue:
+ type: "string"
+ timestampValue:
+ type: "string"
+ format: "date-time"
+ repeatedEnumValue:
type: "array"
+ title: "repeated enum value. it is comma-separated in query"
items:
$ref: "#/definitions/examplepbNumericEnum"
- pathRepeatedSfixed32Value:
+ repeatedEnumAnnotation:
type: "array"
+ description: "Repeated numeric enum description."
+ title: "Repeated numeric enum title"
items:
- type: "integer"
- format: "int32"
- pathRepeatedSfixed64Value:
+ $ref: "#/definitions/examplepbNumericEnum"
+ enumValueAnnotation:
+ description: "Numeric enum description."
+ title: "Numeric enum title"
+ $ref: "#/definitions/examplepbNumericEnum"
+ repeatedStringAnnotation:
type: "array"
+ description: "Repeated string description."
+ title: "Repeated string title"
items:
type: "string"
- format: "int64"
- pathRepeatedSint32Value:
+ repeatedNestedAnnotation:
type: "array"
+ description: "Repeated nested object description."
+ title: "Repeated nested object title"
items:
- type: "integer"
- format: "int32"
- pathRepeatedSint64Value:
+ $ref: "#/definitions/ABitOfEverythingNested"
+ nestedAnnotation:
+ description: "Nested object description."
+ title: "Nested object title"
+ $ref: "#/definitions/ABitOfEverythingNested"
+ int64OverrideType:
+ type: "integer"
+ format: "int64"
+ requiredStringViaFieldBehaviorAnnotation:
+ type: "string"
+ title: "mark a field as required in Open API definition"
+ outputOnlyStringViaFieldBehaviorAnnotation:
+ type: "string"
+ title: "mark a field as readonly in Open API definition"
+ readOnly: true
+ optionalStringValue:
+ type: "string"
+ productId:
type: "array"
+ description: "Only digits are allowed."
+ title: "Test openapiv2 generation of repeated fields"
items:
type: "string"
- format: "int64"
- title: "ABitOfEverythingRepeated is used to validate repeated path parameter functionality"
- example:
- path_repeated_bool_value:
- - true
- - true
- - false
- - true
- path_repeated_int32_value:
- - 1
- - 2
- - 3
- examplepbBody:
- type: "object"
- properties:
- name:
- type: "string"
- examplepbBook:
- type: "object"
- properties:
- name:
+ minLength: 1
+ maxLength: 19
+ pattern: "^[0-9]+$"
+ optionalStringField:
type: "string"
- description: "The resource name of the book.\n\nFormat: `publishers/{publisher}/books/{book}`\n\
- \nExample: `publishers/1257894000000000000/books/my-book`"
- id:
+ title: "Test openapiv2 generation of required fields with annotation and jsonschema\
+ \ to reproduce"
+ requiredStringField1:
type: "string"
- description: "Output only. The book's ID."
- readOnly: true
- createTime:
+ requiredStringField2:
type: "string"
- format: "date-time"
- description: "Output only. Creation time of the book."
- readOnly: true
- description: "An example resource type from AIP-123 used to test the behavior\
- \ described in\nthe CreateBookRequest message.\n\nSee: https://google.aip.dev/123"
- example:
- createTime: "2000-01-23T04:56:07.000+00:00"
- name: "name"
- id: "id"
- examplepbCheckStatusResponse:
- type: "object"
- properties:
- status:
- $ref: "#/definitions/rpcStatus"
- example:
- status:
- code: 0
- details:
- - typeUrl: "typeUrl"
- value: "value"
- - typeUrl: "typeUrl"
- value: "value"
- message: "message"
- examplepbErrorObject:
- type: "object"
- properties:
- code:
- type: "integer"
- format: "integer"
- description: "Response code"
- title: "code"
- message:
+ required_field_behavior_json_name_custom:
type: "string"
- description: "Response message"
- title: "message"
- pattern: "^[a-zA-Z0-9]{1, 32}$"
- examplepbErrorResponse:
- type: "object"
- properties:
- correlationId:
+ title: "Test openapiv2 handling of required json_name fields"
+ required_field_schema_json_name_custom:
type: "string"
- format: "uuid"
- example: "2438ac3c-37eb-4902-adef-ed16b4431030"
- description: "Unique event identifier for server requests"
- title: "x-correlation-id"
- pattern: "^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"
- error:
- $ref: "#/definitions/examplepbErrorObject"
- examplepbNumericEnum:
- type: "string"
- description: "NumericEnum is one or zero.\n\n - ZERO: ZERO means 0\n - ONE: ONE\
- \ means 1"
- enum:
- - "ZERO"
- - "ONE"
- default: "ZERO"
- examplepbUpdateV2Request:
- type: "object"
- properties:
- abe:
- $ref: "#/definitions/examplepbABitOfEverything"
- updateMask:
+ trailingOnly:
type: "string"
- description: "The paths to update."
- title: "UpdateV2Request request for update includes the message and the update\
- \ mask"
- pathenumPathEnum:
- type: "string"
- enum:
- - "ABC"
- - "DEF"
- default: "ABC"
- protobufAny:
- type: "object"
- properties:
- typeUrl:
+ title: "Trailing only"
+ trailingOnlyDot:
type: "string"
- description: "A URL/resource name that uniquely identifies the type of the\
- \ serialized\nprotocol buffer message. This string must contain at least\n\
- one \"/\" character. The last segment of the URL's path must represent\n\
- the 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\n\
- expect it to use in the context of Any. However, for URLs which use the\n\
- scheme `http`, `https`, or no scheme, one can optionally set up a type\n\
- server 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:
+ description: "Trailing only dot."
+ trailingBoth:
type: "string"
- format: "byte"
- description: "Must be a valid serialized protocol buffer of the above specified\
- \ type."
- pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"
- 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(&foo)) {\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 := &pb.Foo{...}\n any, err := ptypes.MarshalAny(foo)\n\
- \ ...\n foo := &pb.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\n\
- name \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses\
- \ the regular\nrepresentation of the deserialized, embedded message, with an\n\
- additional 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\": ,\n \"lastName\": \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 }"
- example:
- typeUrl: "typeUrl"
- value: "value"
- rpcStatus:
- type: "object"
- properties:
- code:
- type: "integer"
- format: "int32"
- description: "The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]."
- message:
+ description: "Trailing both."
+ title: "Leading both"
+ trailingMultiline:
type: "string"
- description: "A developer-facing error message, which should be in English.\
- \ Any\nuser-facing error message should be localized and sent in the\n[google.rpc.Status.details][google.rpc.Status.details]\
- \ field, or localized by the client."
- details:
- type: "array"
- description: "A list of messages that carry the error details. There is a\
- \ common set of\nmessage types for APIs to use."
- items:
- $ref: "#/definitions/protobufAny"
- description: "The `Status` type defines a logical error model that is suitable\
- \ for\ndifferent programming environments, including REST APIs and RPC APIs.\
- \ It is\nused by [gRPC](https://github.com/grpc). Each `Status` message contains\n\
- three pieces of data: error code, error message, and error details.\n\nYou can\
- \ find out more about this error model and how to work with it in the\n[API\
- \ Design Guide](https://cloud.google.com/apis/design/errors)."
+ description: "This is an example of a multi-line comment.\n\nTrailing multiline."
+ title: "Leading multiline"
+ externalDocs:
+ description: "Find out more about ABitOfEverything"
+ url: "https://github.com/grpc-ecosystem/grpc-gateway"
+ title: "A bit of everything"
+ description: "Intentionally complicated message type to cover many features of\
+ \ Protobuf."
example:
- code: 0
- details:
- - typeUrl: "typeUrl"
- value: "value"
- - typeUrl: "typeUrl"
- value: "value"
- message: "message"
- subStringMessage:
- type: "object"
- properties:
- value:
- type: "string"
- A bit of everything:
- type: "object"
- required:
- - "doubleValue"
- - "floatValue"
- - "int64Value"
- - "requiredStringViaFieldBehaviorAnnotation"
+ int64_value: 12
+ double_value: 12.3
+ x-a-bit-of-everything-foo: "bar"
+ A bit of everything_4:
properties:
singleNested:
$ref: "#/definitions/ABitOfEverythingNested"
@@ -3149,15 +6281,55 @@ definitions:
readOnly: true
optionalStringValue:
type: "string"
- externalDocs:
- description: "Find out more about ABitOfEverything"
- url: "https://github.com/grpc-ecosystem/grpc-gateway"
- title: "A bit of everything"
- description: "Intentionaly complicated message type to cover many features of\
+ productId:
+ type: "array"
+ description: "Only digits are allowed."
+ title: "Test openapiv2 generation of repeated fields"
+ items:
+ type: "string"
+ minLength: 1
+ maxLength: 19
+ pattern: "^[0-9]+$"
+ optionalStringField:
+ type: "string"
+ title: "Test openapiv2 generation of required fields with annotation and jsonschema\
+ \ to reproduce"
+ requiredStringField1:
+ type: "string"
+ requiredStringField2:
+ type: "string"
+ required_field_behavior_json_name_custom:
+ type: "string"
+ title: "Test openapiv2 handling of required json_name fields"
+ required_field_schema_json_name_custom:
+ type: "string"
+ trailingOnly:
+ type: "string"
+ title: "Trailing only"
+ trailingOnlyDot:
+ type: "string"
+ description: "Trailing only dot."
+ trailingBoth:
+ type: "string"
+ description: "Trailing both."
+ title: "Leading both"
+ trailingMultiline:
+ type: "string"
+ description: "This is an example of a multi-line comment.\n\nTrailing multiline."
+ title: "Leading multiline"
+ description: "Intentionally complicated message type to cover many features of\
\ Protobuf."
- example:
- int64_value: 12
- double_value: 12.3
+ example: "{\"int64_value\":12,\"double_value\":12.3}"
+ UpdateV2Request request for update includes the message and the update mask:
+ type: "object"
+ properties:
+ abe:
+ $ref: "#/definitions/A bit of everything_4"
+ updateMask:
+ type: "string"
+ description: "The paths to update."
+ title: "UpdateV2Request request for update includes the message and the update\
+ \ mask"
externalDocs:
description: "More about gRPC-Gateway"
url: "https://github.com/grpc-ecosystem/grpc-gateway"
diff --git a/examples/internal/clients/abe/api_a_bit_of_everything_service.go b/examples/internal/clients/abe/api_a_bit_of_everything_service.go
index 1f48a76229f..4c4ecc9b352 100644
--- a/examples/internal/clients/abe/api_a_bit_of_everything_service.go
+++ b/examples/internal/clients/abe/api_a_bit_of_everything_service.go
@@ -43,6 +43,162 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceCheckExternal
localVarReturnValue interface{}
)
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/v3/{value}:check"
+ localVarPath = strings.Replace(localVarPath, "{"+"value"+"}", fmt.Sprintf("%v", value), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json", "application/x-foo-mime"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{"application/json", "application/x-foo-mime"}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-API-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v interface{}
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 403 {
+ var v interface{}
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v string
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 418 {
+ var v ExamplepbNumericEnum
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 500 {
+ var v ExamplepbErrorResponse
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 0 {
+ var v RpcStatus
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+ABitOfEverythingServiceApiService
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param value
+
+@return interface{}
+*/
+func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceCheckExternalPathEnum(ctx context.Context, value string) (interface{}, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue interface{}
+ )
+
// create path and map variables
localVarPath := a.client.cfg.BasePath + "/v2/{value}:check"
localVarPath = strings.Replace(localVarPath, "{"+"value"+"}", fmt.Sprintf("%v", value), -1)
@@ -187,14 +343,18 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceCheckExternal
ABitOfEverythingServiceApiService
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param singleNestedName name is nested field.
+ * @param uuid
* @param floatValue Float value field
- * @param requiredStringViaFieldBehaviorAnnotation mark a field as required in Open API definition.
+ * @param doubleValue
+ * @param int64Value
+ * @param requiredStringViaFieldBehaviorAnnotation mark a field as required in Open API definition
+ * @param requiredStringField1
+ * @param requiredStringField2
+ * @param requiredFieldBehaviorJsonNameCustom Test openapiv2 handling of required json_name fields
+ * @param requiredFieldSchemaJsonNameCustom
* @param optional nil or *ABitOfEverythingServiceCheckGetQueryParamsOpts - Optional Parameters:
* @param "SingleNestedAmount" (optional.Int64) -
* @param "SingleNestedOk" (optional.String) - DeepEnum description. - FALSE: FALSE is false. - TRUE: TRUE is true.
- * @param "Uuid" (optional.String) -
- * @param "DoubleValue" (optional.Float64) -
- * @param "Int64Value" (optional.String) -
* @param "Uint64Value" (optional.String) -
* @param "Int32Value" (optional.Int32) -
* @param "Fixed64Value" (optional.String) -
@@ -214,15 +374,21 @@ ABitOfEverythingServiceApiService
* @param "OneofString" (optional.String) -
* @param "NonConventionalNameValue" (optional.String) -
* @param "TimestampValue" (optional.Time) -
- * @param "RepeatedEnumValue" (optional.Interface of []string) - repeated enum value. it is comma-separated in query. - ZERO: ZERO means 0 - ONE: ONE means 1
- * @param "RepeatedEnumAnnotation" (optional.Interface of []string) - Repeated numeric enum title. Repeated numeric enum description. - ZERO: ZERO means 0 - ONE: ONE means 1
- * @param "EnumValueAnnotation" (optional.String) - Numeric enum title. Numeric enum description. - ZERO: ZERO means 0 - ONE: ONE means 1
- * @param "RepeatedStringAnnotation" (optional.Interface of []string) - Repeated string title. Repeated string description.
+ * @param "RepeatedEnumValue" (optional.Interface of []string) - repeated enum value. it is comma-separated in query - ZERO: ZERO means 0 - ONE: ONE means 1
+ * @param "RepeatedEnumAnnotation" (optional.Interface of []string) - Repeated numeric enum title Repeated numeric enum description. - ZERO: ZERO means 0 - ONE: ONE means 1
+ * @param "EnumValueAnnotation" (optional.String) - Numeric enum title Numeric enum description. - ZERO: ZERO means 0 - ONE: ONE means 1
+ * @param "RepeatedStringAnnotation" (optional.Interface of []string) - Repeated string title Repeated string description.
* @param "NestedAnnotationAmount" (optional.Int64) -
* @param "NestedAnnotationOk" (optional.String) - DeepEnum description. - FALSE: FALSE is false. - TRUE: TRUE is true.
* @param "Int64OverrideType" (optional.Int64) -
- * @param "OutputOnlyStringViaFieldBehaviorAnnotation" (optional.String) - mark a field as readonly in Open API definition.
+ * @param "OutputOnlyStringViaFieldBehaviorAnnotation" (optional.String) - mark a field as readonly in Open API definition
* @param "OptionalStringValue" (optional.String) -
+ * @param "ProductId" (optional.Interface of []string) - Test openapiv2 generation of repeated fields Only digits are allowed.
+ * @param "OptionalStringField" (optional.String) - Test openapiv2 generation of required fields with annotation and jsonschema to reproduce
+ * @param "TrailingOnly" (optional.String) - Trailing only
+ * @param "TrailingOnlyDot" (optional.String) - Trailing only dot.
+ * @param "TrailingBoth" (optional.String) - Leading both Trailing both.
+ * @param "TrailingMultiline" (optional.String) - Leading multiline This is an example of a multi-line comment. Trailing multiline.
@return ExamplepbABitOfEverything
*/
@@ -230,9 +396,6 @@ ABitOfEverythingServiceApiService
type ABitOfEverythingServiceCheckGetQueryParamsOpts struct {
SingleNestedAmount optional.Int64
SingleNestedOk optional.String
- Uuid optional.String
- DoubleValue optional.Float64
- Int64Value optional.String
Uint64Value optional.String
Int32Value optional.Int32
Fixed64Value optional.String
@@ -261,9 +424,15 @@ type ABitOfEverythingServiceCheckGetQueryParamsOpts struct {
Int64OverrideType optional.Int64
OutputOnlyStringViaFieldBehaviorAnnotation optional.String
OptionalStringValue optional.String
+ ProductId optional.Interface
+ OptionalStringField optional.String
+ TrailingOnly optional.String
+ TrailingOnlyDot optional.String
+ TrailingBoth optional.String
+ TrailingMultiline optional.String
}
-func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceCheckGetQueryParams(ctx context.Context, singleNestedName string, floatValue float32, requiredStringViaFieldBehaviorAnnotation string, localVarOptionals *ABitOfEverythingServiceCheckGetQueryParamsOpts) (ExamplepbABitOfEverything, *http.Response, error) {
+func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceCheckGetQueryParams(ctx context.Context, singleNestedName string, uuid string, floatValue float32, doubleValue float64, int64Value string, requiredStringViaFieldBehaviorAnnotation string, requiredStringField1 string, requiredStringField2 string, requiredFieldBehaviorJsonNameCustom string, requiredFieldSchemaJsonNameCustom string, localVarOptionals *ABitOfEverythingServiceCheckGetQueryParamsOpts) (ExamplepbABitOfEverything, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Get")
localVarPostBody interface{}
@@ -286,16 +455,10 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceCheckGetQuery
if localVarOptionals != nil && localVarOptionals.SingleNestedOk.IsSet() {
localVarQueryParams.Add("singleNested.ok", parameterToString(localVarOptionals.SingleNestedOk.Value(), ""))
}
- if localVarOptionals != nil && localVarOptionals.Uuid.IsSet() {
- localVarQueryParams.Add("uuid", parameterToString(localVarOptionals.Uuid.Value(), ""))
- }
+ localVarQueryParams.Add("uuid", parameterToString(uuid, ""))
localVarQueryParams.Add("floatValue", parameterToString(floatValue, ""))
- if localVarOptionals != nil && localVarOptionals.DoubleValue.IsSet() {
- localVarQueryParams.Add("doubleValue", parameterToString(localVarOptionals.DoubleValue.Value(), ""))
- }
- if localVarOptionals != nil && localVarOptionals.Int64Value.IsSet() {
- localVarQueryParams.Add("int64Value", parameterToString(localVarOptionals.Int64Value.Value(), ""))
- }
+ localVarQueryParams.Add("doubleValue", parameterToString(doubleValue, ""))
+ localVarQueryParams.Add("int64Value", parameterToString(int64Value, ""))
if localVarOptionals != nil && localVarOptionals.Uint64Value.IsSet() {
localVarQueryParams.Add("uint64Value", parameterToString(localVarOptionals.Uint64Value.Value(), ""))
}
@@ -381,6 +544,28 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceCheckGetQuery
if localVarOptionals != nil && localVarOptionals.OptionalStringValue.IsSet() {
localVarQueryParams.Add("optionalStringValue", parameterToString(localVarOptionals.OptionalStringValue.Value(), ""))
}
+ if localVarOptionals != nil && localVarOptionals.ProductId.IsSet() {
+ localVarQueryParams.Add("productId", parameterToString(localVarOptionals.ProductId.Value(), "multi"))
+ }
+ if localVarOptionals != nil && localVarOptionals.OptionalStringField.IsSet() {
+ localVarQueryParams.Add("optionalStringField", parameterToString(localVarOptionals.OptionalStringField.Value(), ""))
+ }
+ localVarQueryParams.Add("requiredStringField1", parameterToString(requiredStringField1, ""))
+ localVarQueryParams.Add("requiredStringField2", parameterToString(requiredStringField2, ""))
+ localVarQueryParams.Add("required_field_behavior_json_name_custom", parameterToString(requiredFieldBehaviorJsonNameCustom, ""))
+ localVarQueryParams.Add("required_field_schema_json_name_custom", parameterToString(requiredFieldSchemaJsonNameCustom, ""))
+ if localVarOptionals != nil && localVarOptionals.TrailingOnly.IsSet() {
+ localVarQueryParams.Add("trailingOnly", parameterToString(localVarOptionals.TrailingOnly.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.TrailingOnlyDot.IsSet() {
+ localVarQueryParams.Add("trailingOnlyDot", parameterToString(localVarOptionals.TrailingOnlyDot.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.TrailingBoth.IsSet() {
+ localVarQueryParams.Add("trailingBoth", parameterToString(localVarOptionals.TrailingBoth.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.TrailingMultiline.IsSet() {
+ localVarQueryParams.Add("trailingMultiline", parameterToString(localVarOptionals.TrailingMultiline.Value(), ""))
+ }
// to determine the Content-Type header
localVarHttpContentTypes := []string{"application/json", "application/x-foo-mime"}
@@ -517,14 +702,18 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceCheckGetQuery
ABitOfEverythingServiceApiService
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param singleNestedOk DeepEnum description.
+ * @param uuid
* @param floatValue Float value field
- * @param requiredStringViaFieldBehaviorAnnotation mark a field as required in Open API definition.
+ * @param doubleValue
+ * @param int64Value
+ * @param requiredStringViaFieldBehaviorAnnotation mark a field as required in Open API definition
+ * @param requiredStringField1
+ * @param requiredStringField2
+ * @param requiredFieldBehaviorJsonNameCustom Test openapiv2 handling of required json_name fields
+ * @param requiredFieldSchemaJsonNameCustom
* @param optional nil or *ABitOfEverythingServiceCheckNestedEnumGetQueryParamsOpts - Optional Parameters:
* @param "SingleNestedName" (optional.String) - name is nested field.
* @param "SingleNestedAmount" (optional.Int64) -
- * @param "Uuid" (optional.String) -
- * @param "DoubleValue" (optional.Float64) -
- * @param "Int64Value" (optional.String) -
* @param "Uint64Value" (optional.String) -
* @param "Int32Value" (optional.Int32) -
* @param "Fixed64Value" (optional.String) -
@@ -544,15 +733,21 @@ ABitOfEverythingServiceApiService
* @param "OneofString" (optional.String) -
* @param "NonConventionalNameValue" (optional.String) -
* @param "TimestampValue" (optional.Time) -
- * @param "RepeatedEnumValue" (optional.Interface of []string) - repeated enum value. it is comma-separated in query. - ZERO: ZERO means 0 - ONE: ONE means 1
- * @param "RepeatedEnumAnnotation" (optional.Interface of []string) - Repeated numeric enum title. Repeated numeric enum description. - ZERO: ZERO means 0 - ONE: ONE means 1
- * @param "EnumValueAnnotation" (optional.String) - Numeric enum title. Numeric enum description. - ZERO: ZERO means 0 - ONE: ONE means 1
- * @param "RepeatedStringAnnotation" (optional.Interface of []string) - Repeated string title. Repeated string description.
+ * @param "RepeatedEnumValue" (optional.Interface of []string) - repeated enum value. it is comma-separated in query - ZERO: ZERO means 0 - ONE: ONE means 1
+ * @param "RepeatedEnumAnnotation" (optional.Interface of []string) - Repeated numeric enum title Repeated numeric enum description. - ZERO: ZERO means 0 - ONE: ONE means 1
+ * @param "EnumValueAnnotation" (optional.String) - Numeric enum title Numeric enum description. - ZERO: ZERO means 0 - ONE: ONE means 1
+ * @param "RepeatedStringAnnotation" (optional.Interface of []string) - Repeated string title Repeated string description.
* @param "NestedAnnotationName" (optional.String) - name is nested field.
* @param "NestedAnnotationAmount" (optional.Int64) -
* @param "Int64OverrideType" (optional.Int64) -
- * @param "OutputOnlyStringViaFieldBehaviorAnnotation" (optional.String) - mark a field as readonly in Open API definition.
+ * @param "OutputOnlyStringViaFieldBehaviorAnnotation" (optional.String) - mark a field as readonly in Open API definition
* @param "OptionalStringValue" (optional.String) -
+ * @param "ProductId" (optional.Interface of []string) - Test openapiv2 generation of repeated fields Only digits are allowed.
+ * @param "OptionalStringField" (optional.String) - Test openapiv2 generation of required fields with annotation and jsonschema to reproduce
+ * @param "TrailingOnly" (optional.String) - Trailing only
+ * @param "TrailingOnlyDot" (optional.String) - Trailing only dot.
+ * @param "TrailingBoth" (optional.String) - Leading both Trailing both.
+ * @param "TrailingMultiline" (optional.String) - Leading multiline This is an example of a multi-line comment. Trailing multiline.
@return ExamplepbABitOfEverything
*/
@@ -560,9 +755,6 @@ ABitOfEverythingServiceApiService
type ABitOfEverythingServiceCheckNestedEnumGetQueryParamsOpts struct {
SingleNestedName optional.String
SingleNestedAmount optional.Int64
- Uuid optional.String
- DoubleValue optional.Float64
- Int64Value optional.String
Uint64Value optional.String
Int32Value optional.Int32
Fixed64Value optional.String
@@ -591,9 +783,15 @@ type ABitOfEverythingServiceCheckNestedEnumGetQueryParamsOpts struct {
Int64OverrideType optional.Int64
OutputOnlyStringViaFieldBehaviorAnnotation optional.String
OptionalStringValue optional.String
+ ProductId optional.Interface
+ OptionalStringField optional.String
+ TrailingOnly optional.String
+ TrailingOnlyDot optional.String
+ TrailingBoth optional.String
+ TrailingMultiline optional.String
}
-func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceCheckNestedEnumGetQueryParams(ctx context.Context, singleNestedOk string, floatValue float32, requiredStringViaFieldBehaviorAnnotation string, localVarOptionals *ABitOfEverythingServiceCheckNestedEnumGetQueryParamsOpts) (ExamplepbABitOfEverything, *http.Response, error) {
+func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceCheckNestedEnumGetQueryParams(ctx context.Context, singleNestedOk string, uuid string, floatValue float32, doubleValue float64, int64Value string, requiredStringViaFieldBehaviorAnnotation string, requiredStringField1 string, requiredStringField2 string, requiredFieldBehaviorJsonNameCustom string, requiredFieldSchemaJsonNameCustom string, localVarOptionals *ABitOfEverythingServiceCheckNestedEnumGetQueryParamsOpts) (ExamplepbABitOfEverything, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Get")
localVarPostBody interface{}
@@ -616,16 +814,10 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceCheckNestedEn
if localVarOptionals != nil && localVarOptionals.SingleNestedAmount.IsSet() {
localVarQueryParams.Add("singleNested.amount", parameterToString(localVarOptionals.SingleNestedAmount.Value(), ""))
}
- if localVarOptionals != nil && localVarOptionals.Uuid.IsSet() {
- localVarQueryParams.Add("uuid", parameterToString(localVarOptionals.Uuid.Value(), ""))
- }
+ localVarQueryParams.Add("uuid", parameterToString(uuid, ""))
localVarQueryParams.Add("floatValue", parameterToString(floatValue, ""))
- if localVarOptionals != nil && localVarOptionals.DoubleValue.IsSet() {
- localVarQueryParams.Add("doubleValue", parameterToString(localVarOptionals.DoubleValue.Value(), ""))
- }
- if localVarOptionals != nil && localVarOptionals.Int64Value.IsSet() {
- localVarQueryParams.Add("int64Value", parameterToString(localVarOptionals.Int64Value.Value(), ""))
- }
+ localVarQueryParams.Add("doubleValue", parameterToString(doubleValue, ""))
+ localVarQueryParams.Add("int64Value", parameterToString(int64Value, ""))
if localVarOptionals != nil && localVarOptionals.Uint64Value.IsSet() {
localVarQueryParams.Add("uint64Value", parameterToString(localVarOptionals.Uint64Value.Value(), ""))
}
@@ -711,6 +903,28 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceCheckNestedEn
if localVarOptionals != nil && localVarOptionals.OptionalStringValue.IsSet() {
localVarQueryParams.Add("optionalStringValue", parameterToString(localVarOptionals.OptionalStringValue.Value(), ""))
}
+ if localVarOptionals != nil && localVarOptionals.ProductId.IsSet() {
+ localVarQueryParams.Add("productId", parameterToString(localVarOptionals.ProductId.Value(), "multi"))
+ }
+ if localVarOptionals != nil && localVarOptionals.OptionalStringField.IsSet() {
+ localVarQueryParams.Add("optionalStringField", parameterToString(localVarOptionals.OptionalStringField.Value(), ""))
+ }
+ localVarQueryParams.Add("requiredStringField1", parameterToString(requiredStringField1, ""))
+ localVarQueryParams.Add("requiredStringField2", parameterToString(requiredStringField2, ""))
+ localVarQueryParams.Add("required_field_behavior_json_name_custom", parameterToString(requiredFieldBehaviorJsonNameCustom, ""))
+ localVarQueryParams.Add("required_field_schema_json_name_custom", parameterToString(requiredFieldSchemaJsonNameCustom, ""))
+ if localVarOptionals != nil && localVarOptionals.TrailingOnly.IsSet() {
+ localVarQueryParams.Add("trailingOnly", parameterToString(localVarOptionals.TrailingOnly.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.TrailingOnlyDot.IsSet() {
+ localVarQueryParams.Add("trailingOnlyDot", parameterToString(localVarOptionals.TrailingOnlyDot.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.TrailingBoth.IsSet() {
+ localVarQueryParams.Add("trailingBoth", parameterToString(localVarOptionals.TrailingBoth.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.TrailingMultiline.IsSet() {
+ localVarQueryParams.Add("trailingMultiline", parameterToString(localVarOptionals.TrailingMultiline.Value(), ""))
+ }
// to determine the Content-Type header
localVarHttpContentTypes := []string{"application/json", "application/x-foo-mime"}
@@ -847,13 +1061,17 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceCheckNestedEn
ABitOfEverythingServiceApiService
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param stringValue
- * @param body
+ * @param singleNested
+ * @param uuid
* @param floatValue Float value field
- * @param requiredStringViaFieldBehaviorAnnotation mark a field as required in Open API definition.
+ * @param doubleValue
+ * @param int64Value
+ * @param requiredStringViaFieldBehaviorAnnotation mark a field as required in Open API definition
+ * @param requiredStringField1
+ * @param requiredStringField2
+ * @param requiredFieldBehaviorJsonNameCustom Test openapiv2 handling of required json_name fields
+ * @param requiredFieldSchemaJsonNameCustom
* @param optional nil or *ABitOfEverythingServiceCheckPostQueryParamsOpts - Optional Parameters:
- * @param "Uuid" (optional.String) -
- * @param "DoubleValue" (optional.Float64) -
- * @param "Int64Value" (optional.String) -
* @param "Uint64Value" (optional.String) -
* @param "Int32Value" (optional.Int32) -
* @param "Fixed64Value" (optional.String) -
@@ -872,24 +1090,27 @@ ABitOfEverythingServiceApiService
* @param "OneofString" (optional.String) -
* @param "NonConventionalNameValue" (optional.String) -
* @param "TimestampValue" (optional.Time) -
- * @param "RepeatedEnumValue" (optional.Interface of []string) - repeated enum value. it is comma-separated in query. - ZERO: ZERO means 0 - ONE: ONE means 1
- * @param "RepeatedEnumAnnotation" (optional.Interface of []string) - Repeated numeric enum title. Repeated numeric enum description. - ZERO: ZERO means 0 - ONE: ONE means 1
- * @param "EnumValueAnnotation" (optional.String) - Numeric enum title. Numeric enum description. - ZERO: ZERO means 0 - ONE: ONE means 1
- * @param "RepeatedStringAnnotation" (optional.Interface of []string) - Repeated string title. Repeated string description.
+ * @param "RepeatedEnumValue" (optional.Interface of []string) - repeated enum value. it is comma-separated in query - ZERO: ZERO means 0 - ONE: ONE means 1
+ * @param "RepeatedEnumAnnotation" (optional.Interface of []string) - Repeated numeric enum title Repeated numeric enum description. - ZERO: ZERO means 0 - ONE: ONE means 1
+ * @param "EnumValueAnnotation" (optional.String) - Numeric enum title Numeric enum description. - ZERO: ZERO means 0 - ONE: ONE means 1
+ * @param "RepeatedStringAnnotation" (optional.Interface of []string) - Repeated string title Repeated string description.
* @param "NestedAnnotationName" (optional.String) - name is nested field.
* @param "NestedAnnotationAmount" (optional.Int64) -
* @param "NestedAnnotationOk" (optional.String) - DeepEnum description. - FALSE: FALSE is false. - TRUE: TRUE is true.
* @param "Int64OverrideType" (optional.Int64) -
- * @param "OutputOnlyStringViaFieldBehaviorAnnotation" (optional.String) - mark a field as readonly in Open API definition.
+ * @param "OutputOnlyStringViaFieldBehaviorAnnotation" (optional.String) - mark a field as readonly in Open API definition
* @param "OptionalStringValue" (optional.String) -
+ * @param "ProductId" (optional.Interface of []string) - Test openapiv2 generation of repeated fields Only digits are allowed.
+ * @param "OptionalStringField" (optional.String) - Test openapiv2 generation of required fields with annotation and jsonschema to reproduce
+ * @param "TrailingOnly" (optional.String) - Trailing only
+ * @param "TrailingOnlyDot" (optional.String) - Trailing only dot.
+ * @param "TrailingBoth" (optional.String) - Leading both Trailing both.
+ * @param "TrailingMultiline" (optional.String) - Leading multiline This is an example of a multi-line comment. Trailing multiline.
@return ExamplepbABitOfEverything
*/
type ABitOfEverythingServiceCheckPostQueryParamsOpts struct {
- Uuid optional.String
- DoubleValue optional.Float64
- Int64Value optional.String
Uint64Value optional.String
Int32Value optional.Int32
Fixed64Value optional.String
@@ -918,9 +1139,15 @@ type ABitOfEverythingServiceCheckPostQueryParamsOpts struct {
Int64OverrideType optional.Int64
OutputOnlyStringViaFieldBehaviorAnnotation optional.String
OptionalStringValue optional.String
+ ProductId optional.Interface
+ OptionalStringField optional.String
+ TrailingOnly optional.String
+ TrailingOnlyDot optional.String
+ TrailingBoth optional.String
+ TrailingMultiline optional.String
}
-func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceCheckPostQueryParams(ctx context.Context, stringValue string, body ABitOfEverythingNested, floatValue float32, requiredStringViaFieldBehaviorAnnotation string, localVarOptionals *ABitOfEverythingServiceCheckPostQueryParamsOpts) (ExamplepbABitOfEverything, *http.Response, error) {
+func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceCheckPostQueryParams(ctx context.Context, stringValue string, singleNested ABitOfEverythingNested, uuid string, floatValue float32, doubleValue float64, int64Value string, requiredStringViaFieldBehaviorAnnotation string, requiredStringField1 string, requiredStringField2 string, requiredFieldBehaviorJsonNameCustom string, requiredFieldSchemaJsonNameCustom string, localVarOptionals *ABitOfEverythingServiceCheckPostQueryParamsOpts) (ExamplepbABitOfEverything, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Post")
localVarPostBody interface{}
@@ -937,16 +1164,10 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceCheckPostQuer
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
- if localVarOptionals != nil && localVarOptionals.Uuid.IsSet() {
- localVarQueryParams.Add("uuid", parameterToString(localVarOptionals.Uuid.Value(), ""))
- }
+ localVarQueryParams.Add("uuid", parameterToString(uuid, ""))
localVarQueryParams.Add("floatValue", parameterToString(floatValue, ""))
- if localVarOptionals != nil && localVarOptionals.DoubleValue.IsSet() {
- localVarQueryParams.Add("doubleValue", parameterToString(localVarOptionals.DoubleValue.Value(), ""))
- }
- if localVarOptionals != nil && localVarOptionals.Int64Value.IsSet() {
- localVarQueryParams.Add("int64Value", parameterToString(localVarOptionals.Int64Value.Value(), ""))
- }
+ localVarQueryParams.Add("doubleValue", parameterToString(doubleValue, ""))
+ localVarQueryParams.Add("int64Value", parameterToString(int64Value, ""))
if localVarOptionals != nil && localVarOptionals.Uint64Value.IsSet() {
localVarQueryParams.Add("uint64Value", parameterToString(localVarOptionals.Uint64Value.Value(), ""))
}
@@ -1032,6 +1253,28 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceCheckPostQuer
if localVarOptionals != nil && localVarOptionals.OptionalStringValue.IsSet() {
localVarQueryParams.Add("optionalStringValue", parameterToString(localVarOptionals.OptionalStringValue.Value(), ""))
}
+ if localVarOptionals != nil && localVarOptionals.ProductId.IsSet() {
+ localVarQueryParams.Add("productId", parameterToString(localVarOptionals.ProductId.Value(), "multi"))
+ }
+ if localVarOptionals != nil && localVarOptionals.OptionalStringField.IsSet() {
+ localVarQueryParams.Add("optionalStringField", parameterToString(localVarOptionals.OptionalStringField.Value(), ""))
+ }
+ localVarQueryParams.Add("requiredStringField1", parameterToString(requiredStringField1, ""))
+ localVarQueryParams.Add("requiredStringField2", parameterToString(requiredStringField2, ""))
+ localVarQueryParams.Add("required_field_behavior_json_name_custom", parameterToString(requiredFieldBehaviorJsonNameCustom, ""))
+ localVarQueryParams.Add("required_field_schema_json_name_custom", parameterToString(requiredFieldSchemaJsonNameCustom, ""))
+ if localVarOptionals != nil && localVarOptionals.TrailingOnly.IsSet() {
+ localVarQueryParams.Add("trailingOnly", parameterToString(localVarOptionals.TrailingOnly.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.TrailingOnlyDot.IsSet() {
+ localVarQueryParams.Add("trailingOnlyDot", parameterToString(localVarOptionals.TrailingOnlyDot.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.TrailingBoth.IsSet() {
+ localVarQueryParams.Add("trailingBoth", parameterToString(localVarOptionals.TrailingBoth.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.TrailingMultiline.IsSet() {
+ localVarQueryParams.Add("trailingMultiline", parameterToString(localVarOptionals.TrailingMultiline.Value(), ""))
+ }
// to determine the Content-Type header
localVarHttpContentTypes := []string{"application/json", "application/x-foo-mime"}
@@ -1050,7 +1293,7 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceCheckPostQuer
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
}
// body params
- localVarPostBody = &body
+ localVarPostBody = &singleNested
if ctx != nil {
// API Key Authentication
if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
@@ -1343,10 +1586,65 @@ This API creates a new ABitOfEverything
* @param pathEnumValue
* @param nestedPathEnumValue
* @param enumValueAnnotation Numeric enum description.
+ * @param uuid
+ * @param requiredStringViaFieldBehaviorAnnotation mark a field as required in Open API definition
+ * @param requiredStringField1
+ * @param requiredStringField2
+ * @param requiredFieldBehaviorJsonNameCustom Test openapiv2 handling of required json_name fields
+ * @param requiredFieldSchemaJsonNameCustom
+ * @param optional nil or *ABitOfEverythingServiceCreateOpts - Optional Parameters:
+ * @param "SingleNestedName" (optional.String) - name is nested field.
+ * @param "SingleNestedAmount" (optional.Int64) -
+ * @param "SingleNestedOk" (optional.String) - DeepEnum description. - FALSE: FALSE is false. - TRUE: TRUE is true.
+ * @param "BytesValue" (optional.String) -
+ * @param "RepeatedStringValue" (optional.Interface of []string) -
+ * @param "OneofString" (optional.String) -
+ * @param "TimestampValue" (optional.Time) -
+ * @param "RepeatedEnumValue" (optional.Interface of []string) - repeated enum value. it is comma-separated in query - ZERO: ZERO means 0 - ONE: ONE means 1
+ * @param "RepeatedEnumAnnotation" (optional.Interface of []string) - Repeated numeric enum title Repeated numeric enum description. - ZERO: ZERO means 0 - ONE: ONE means 1
+ * @param "RepeatedStringAnnotation" (optional.Interface of []string) - Repeated string title Repeated string description.
+ * @param "NestedAnnotationName" (optional.String) - name is nested field.
+ * @param "NestedAnnotationAmount" (optional.Int64) -
+ * @param "NestedAnnotationOk" (optional.String) - DeepEnum description. - FALSE: FALSE is false. - TRUE: TRUE is true.
+ * @param "Int64OverrideType" (optional.Int64) -
+ * @param "OutputOnlyStringViaFieldBehaviorAnnotation" (optional.String) - mark a field as readonly in Open API definition
+ * @param "OptionalStringValue" (optional.String) -
+ * @param "ProductId" (optional.Interface of []string) - Test openapiv2 generation of repeated fields Only digits are allowed.
+ * @param "OptionalStringField" (optional.String) - Test openapiv2 generation of required fields with annotation and jsonschema to reproduce
+ * @param "TrailingOnly" (optional.String) - Trailing only
+ * @param "TrailingOnlyDot" (optional.String) - Trailing only dot.
+ * @param "TrailingBoth" (optional.String) - Leading both Trailing both.
+ * @param "TrailingMultiline" (optional.String) - Leading multiline This is an example of a multi-line comment. Trailing multiline.
@return ExamplepbABitOfEverything
*/
-func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceCreate(ctx context.Context, floatValue float32, doubleValue float64, int64Value string, uint64Value string, int32Value int32, fixed64Value string, fixed32Value int64, boolValue bool, stringValue string, uint32Value int64, sfixed32Value int32, sfixed64Value string, sint32Value int32, sint64Value string, nonConventionalNameValue string, enumValue string, pathEnumValue string, nestedPathEnumValue string, enumValueAnnotation string) (ExamplepbABitOfEverything, *http.Response, error) {
+
+type ABitOfEverythingServiceCreateOpts struct {
+ SingleNestedName optional.String
+ SingleNestedAmount optional.Int64
+ SingleNestedOk optional.String
+ BytesValue optional.String
+ RepeatedStringValue optional.Interface
+ OneofString optional.String
+ TimestampValue optional.Time
+ RepeatedEnumValue optional.Interface
+ RepeatedEnumAnnotation optional.Interface
+ RepeatedStringAnnotation optional.Interface
+ NestedAnnotationName optional.String
+ NestedAnnotationAmount optional.Int64
+ NestedAnnotationOk optional.String
+ Int64OverrideType optional.Int64
+ OutputOnlyStringViaFieldBehaviorAnnotation optional.String
+ OptionalStringValue optional.String
+ ProductId optional.Interface
+ OptionalStringField optional.String
+ TrailingOnly optional.String
+ TrailingOnlyDot optional.String
+ TrailingBoth optional.String
+ TrailingMultiline optional.String
+}
+
+func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceCreate(ctx context.Context, floatValue float32, doubleValue float64, int64Value string, uint64Value string, int32Value int32, fixed64Value string, fixed32Value int64, boolValue bool, stringValue string, uint32Value int64, sfixed32Value int32, sfixed64Value string, sint32Value int32, sint64Value string, nonConventionalNameValue string, enumValue string, pathEnumValue string, nestedPathEnumValue string, enumValueAnnotation string, uuid string, requiredStringViaFieldBehaviorAnnotation string, requiredStringField1 string, requiredStringField2 string, requiredFieldBehaviorJsonNameCustom string, requiredFieldSchemaJsonNameCustom string, localVarOptionals *ABitOfEverythingServiceCreateOpts) (ExamplepbABitOfEverything, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Post")
localVarPostBody interface{}
@@ -1381,35 +1679,107 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceCreate(ctx co
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{"application/json", "application/x-foo-mime"}
-
- // set Content-Type header
- localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
-
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{"application/json", "application/x-foo-mime"}
-
- // set Accept header
- localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ if localVarOptionals != nil && localVarOptionals.SingleNestedName.IsSet() {
+ localVarQueryParams.Add("singleNested.name", parameterToString(localVarOptionals.SingleNestedName.Value(), ""))
}
- if ctx != nil {
- // API Key Authentication
- if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
- var key string
- if auth.Prefix != "" {
- key = auth.Prefix + " " + auth.Key
- } else {
- key = auth.Key
- }
- localVarHeaderParams["X-API-Key"] = key
-
- }
+ if localVarOptionals != nil && localVarOptionals.SingleNestedAmount.IsSet() {
+ localVarQueryParams.Add("singleNested.amount", parameterToString(localVarOptionals.SingleNestedAmount.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.SingleNestedOk.IsSet() {
+ localVarQueryParams.Add("singleNested.ok", parameterToString(localVarOptionals.SingleNestedOk.Value(), ""))
+ }
+ localVarQueryParams.Add("uuid", parameterToString(uuid, ""))
+ if localVarOptionals != nil && localVarOptionals.BytesValue.IsSet() {
+ localVarQueryParams.Add("bytesValue", parameterToString(localVarOptionals.BytesValue.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.RepeatedStringValue.IsSet() {
+ localVarQueryParams.Add("repeatedStringValue", parameterToString(localVarOptionals.RepeatedStringValue.Value(), "multi"))
+ }
+ if localVarOptionals != nil && localVarOptionals.OneofString.IsSet() {
+ localVarQueryParams.Add("oneofString", parameterToString(localVarOptionals.OneofString.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.TimestampValue.IsSet() {
+ localVarQueryParams.Add("timestampValue", parameterToString(localVarOptionals.TimestampValue.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.RepeatedEnumValue.IsSet() {
+ localVarQueryParams.Add("repeatedEnumValue", parameterToString(localVarOptionals.RepeatedEnumValue.Value(), "multi"))
+ }
+ if localVarOptionals != nil && localVarOptionals.RepeatedEnumAnnotation.IsSet() {
+ localVarQueryParams.Add("repeatedEnumAnnotation", parameterToString(localVarOptionals.RepeatedEnumAnnotation.Value(), "multi"))
+ }
+ if localVarOptionals != nil && localVarOptionals.RepeatedStringAnnotation.IsSet() {
+ localVarQueryParams.Add("repeatedStringAnnotation", parameterToString(localVarOptionals.RepeatedStringAnnotation.Value(), "multi"))
+ }
+ if localVarOptionals != nil && localVarOptionals.NestedAnnotationName.IsSet() {
+ localVarQueryParams.Add("nestedAnnotation.name", parameterToString(localVarOptionals.NestedAnnotationName.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.NestedAnnotationAmount.IsSet() {
+ localVarQueryParams.Add("nestedAnnotation.amount", parameterToString(localVarOptionals.NestedAnnotationAmount.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.NestedAnnotationOk.IsSet() {
+ localVarQueryParams.Add("nestedAnnotation.ok", parameterToString(localVarOptionals.NestedAnnotationOk.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Int64OverrideType.IsSet() {
+ localVarQueryParams.Add("int64OverrideType", parameterToString(localVarOptionals.Int64OverrideType.Value(), ""))
+ }
+ localVarQueryParams.Add("requiredStringViaFieldBehaviorAnnotation", parameterToString(requiredStringViaFieldBehaviorAnnotation, ""))
+ if localVarOptionals != nil && localVarOptionals.OutputOnlyStringViaFieldBehaviorAnnotation.IsSet() {
+ localVarQueryParams.Add("outputOnlyStringViaFieldBehaviorAnnotation", parameterToString(localVarOptionals.OutputOnlyStringViaFieldBehaviorAnnotation.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.OptionalStringValue.IsSet() {
+ localVarQueryParams.Add("optionalStringValue", parameterToString(localVarOptionals.OptionalStringValue.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.ProductId.IsSet() {
+ localVarQueryParams.Add("productId", parameterToString(localVarOptionals.ProductId.Value(), "multi"))
+ }
+ if localVarOptionals != nil && localVarOptionals.OptionalStringField.IsSet() {
+ localVarQueryParams.Add("optionalStringField", parameterToString(localVarOptionals.OptionalStringField.Value(), ""))
+ }
+ localVarQueryParams.Add("requiredStringField1", parameterToString(requiredStringField1, ""))
+ localVarQueryParams.Add("requiredStringField2", parameterToString(requiredStringField2, ""))
+ localVarQueryParams.Add("required_field_behavior_json_name_custom", parameterToString(requiredFieldBehaviorJsonNameCustom, ""))
+ localVarQueryParams.Add("required_field_schema_json_name_custom", parameterToString(requiredFieldSchemaJsonNameCustom, ""))
+ if localVarOptionals != nil && localVarOptionals.TrailingOnly.IsSet() {
+ localVarQueryParams.Add("trailingOnly", parameterToString(localVarOptionals.TrailingOnly.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.TrailingOnlyDot.IsSet() {
+ localVarQueryParams.Add("trailingOnlyDot", parameterToString(localVarOptionals.TrailingOnlyDot.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.TrailingBoth.IsSet() {
+ localVarQueryParams.Add("trailingBoth", parameterToString(localVarOptionals.TrailingBoth.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.TrailingMultiline.IsSet() {
+ localVarQueryParams.Add("trailingMultiline", parameterToString(localVarOptionals.TrailingMultiline.Value(), ""))
+ }
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json", "application/x-foo-mime"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{"application/json", "application/x-foo-mime"}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-API-Key"] = key
+
+ }
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
if err != nil {
@@ -1516,7 +1886,7 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceCreate(ctx co
/*
ABitOfEverythingServiceApiService
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param body
+ * @param body Intentionally complicated message type to cover many features of Protobuf.
@return ExamplepbABitOfEverything
*/
@@ -1674,7 +2044,7 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceCreateBody(ct
ABitOfEverythingServiceApiService Create a book.
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param parent The publisher in which to create the book. Format: `publishers/{publisher}` Example: `publishers/1257894000000000000`
- * @param body The book to create.
+ * @param book The book to create.
* @param optional nil or *ABitOfEverythingServiceCreateBookOpts - Optional Parameters:
* @param "BookId" (optional.String) - The ID to use for the book. This must start with an alphanumeric character.
@@ -1685,7 +2055,7 @@ type ABitOfEverythingServiceCreateBookOpts struct {
BookId optional.String
}
-func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceCreateBook(ctx context.Context, parent string, body ExamplepbBook, localVarOptionals *ABitOfEverythingServiceCreateBookOpts) (ExamplepbBook, *http.Response, error) {
+func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceCreateBook(ctx context.Context, parent string, book ExamplepbBook, localVarOptionals *ABitOfEverythingServiceCreateBookOpts) (ExamplepbBook, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Post")
localVarPostBody interface{}
@@ -1695,7 +2065,7 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceCreateBook(ct
)
// create path and map variables
- localVarPath := a.client.cfg.BasePath + "/v1/{parent=publishers/*}/books"
+ localVarPath := a.client.cfg.BasePath + "/v1/{parent}/books"
localVarPath = strings.Replace(localVarPath, "{"+"parent"+"}", fmt.Sprintf("%v", parent), -1)
localVarHeaderParams := make(map[string]string)
@@ -1723,7 +2093,7 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceCreateBook(ct
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
}
// body params
- localVarPostBody = &body
+ localVarPostBody = &book
if ctx != nil {
// API Key Authentication
if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
@@ -1842,12 +2212,100 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceCreateBook(ct
/*
ABitOfEverythingServiceApiService
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param singleNestedName name is nested field.
- * @param body
+ * @param uuidName
+ * @param floatValue Float value field
+ * @param doubleValue
+ * @param int64Value
+ * @param requiredStringViaFieldBehaviorAnnotation mark a field as required in Open API definition
+ * @param requiredStringField1
+ * @param requiredStringField2
+ * @param requiredFieldBehaviorJsonNameCustom Test openapiv2 handling of required json_name fields
+ * @param requiredFieldSchemaJsonNameCustom
+ * @param optional nil or *ABitOfEverythingServiceCustomOpts - Optional Parameters:
+ * @param "SingleNestedName" (optional.String) - name is nested field.
+ * @param "SingleNestedAmount" (optional.Int64) -
+ * @param "SingleNestedOk" (optional.String) - DeepEnum description. - FALSE: FALSE is false. - TRUE: TRUE is true.
+ * @param "Uint64Value" (optional.String) -
+ * @param "Int32Value" (optional.Int32) -
+ * @param "Fixed64Value" (optional.String) -
+ * @param "Fixed32Value" (optional.Int64) -
+ * @param "BoolValue" (optional.Bool) -
+ * @param "StringValue" (optional.String) -
+ * @param "BytesValue" (optional.String) -
+ * @param "Uint32Value" (optional.Int64) -
+ * @param "EnumValue" (optional.String) - - ZERO: ZERO means 0 - ONE: ONE means 1
+ * @param "PathEnumValue" (optional.String) -
+ * @param "NestedPathEnumValue" (optional.String) -
+ * @param "Sfixed32Value" (optional.Int32) -
+ * @param "Sfixed64Value" (optional.String) -
+ * @param "Sint32Value" (optional.Int32) -
+ * @param "Sint64Value" (optional.String) -
+ * @param "RepeatedStringValue" (optional.Interface of []string) -
+ * @param "OneofString" (optional.String) -
+ * @param "NonConventionalNameValue" (optional.String) -
+ * @param "TimestampValue" (optional.Time) -
+ * @param "RepeatedEnumValue" (optional.Interface of []string) - repeated enum value. it is comma-separated in query - ZERO: ZERO means 0 - ONE: ONE means 1
+ * @param "RepeatedEnumAnnotation" (optional.Interface of []string) - Repeated numeric enum title Repeated numeric enum description. - ZERO: ZERO means 0 - ONE: ONE means 1
+ * @param "EnumValueAnnotation" (optional.String) - Numeric enum title Numeric enum description. - ZERO: ZERO means 0 - ONE: ONE means 1
+ * @param "RepeatedStringAnnotation" (optional.Interface of []string) - Repeated string title Repeated string description.
+ * @param "NestedAnnotationName" (optional.String) - name is nested field.
+ * @param "NestedAnnotationAmount" (optional.Int64) -
+ * @param "NestedAnnotationOk" (optional.String) - DeepEnum description. - FALSE: FALSE is false. - TRUE: TRUE is true.
+ * @param "Int64OverrideType" (optional.Int64) -
+ * @param "OutputOnlyStringViaFieldBehaviorAnnotation" (optional.String) - mark a field as readonly in Open API definition
+ * @param "OptionalStringValue" (optional.String) -
+ * @param "ProductId" (optional.Interface of []string) - Test openapiv2 generation of repeated fields Only digits are allowed.
+ * @param "OptionalStringField" (optional.String) - Test openapiv2 generation of required fields with annotation and jsonschema to reproduce
+ * @param "TrailingOnly" (optional.String) - Trailing only
+ * @param "TrailingOnlyDot" (optional.String) - Trailing only dot.
+ * @param "TrailingBoth" (optional.String) - Leading both Trailing both.
+ * @param "TrailingMultiline" (optional.String) - Leading multiline This is an example of a multi-line comment. Trailing multiline.
@return ExamplepbABitOfEverything
*/
-func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceDeepPathEcho(ctx context.Context, singleNestedName string, body ExamplepbABitOfEverything) (ExamplepbABitOfEverything, *http.Response, error) {
+
+type ABitOfEverythingServiceCustomOpts struct {
+ SingleNestedName optional.String
+ SingleNestedAmount optional.Int64
+ SingleNestedOk optional.String
+ Uint64Value optional.String
+ Int32Value optional.Int32
+ Fixed64Value optional.String
+ Fixed32Value optional.Int64
+ BoolValue optional.Bool
+ StringValue optional.String
+ BytesValue optional.String
+ Uint32Value optional.Int64
+ EnumValue optional.String
+ PathEnumValue optional.String
+ NestedPathEnumValue optional.String
+ Sfixed32Value optional.Int32
+ Sfixed64Value optional.String
+ Sint32Value optional.Int32
+ Sint64Value optional.String
+ RepeatedStringValue optional.Interface
+ OneofString optional.String
+ NonConventionalNameValue optional.String
+ TimestampValue optional.Time
+ RepeatedEnumValue optional.Interface
+ RepeatedEnumAnnotation optional.Interface
+ EnumValueAnnotation optional.String
+ RepeatedStringAnnotation optional.Interface
+ NestedAnnotationName optional.String
+ NestedAnnotationAmount optional.Int64
+ NestedAnnotationOk optional.String
+ Int64OverrideType optional.Int64
+ OutputOnlyStringViaFieldBehaviorAnnotation optional.String
+ OptionalStringValue optional.String
+ ProductId optional.Interface
+ OptionalStringField optional.String
+ TrailingOnly optional.String
+ TrailingOnlyDot optional.String
+ TrailingBoth optional.String
+ TrailingMultiline optional.String
+}
+
+func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceCustom(ctx context.Context, uuidName string, floatValue float32, doubleValue float64, int64Value string, requiredStringViaFieldBehaviorAnnotation string, requiredStringField1 string, requiredStringField2 string, requiredFieldBehaviorJsonNameCustom string, requiredFieldSchemaJsonNameCustom string, localVarOptionals *ABitOfEverythingServiceCustomOpts) (ExamplepbABitOfEverything, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Post")
localVarPostBody interface{}
@@ -1857,13 +2315,135 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceDeepPathEcho(
)
// create path and map variables
- localVarPath := a.client.cfg.BasePath + "/v1/example/deep_path/{singleNested.name}"
- localVarPath = strings.Replace(localVarPath, "{"+"singleNested.name"+"}", fmt.Sprintf("%v", singleNestedName), -1)
+ localVarPath := a.client.cfg.BasePath + "/v1/example/a_bit_of_everything/{uuidName}:custom"
+ localVarPath = strings.Replace(localVarPath, "{"+"uuidName"+"}", fmt.Sprintf("%v", uuidName), -1)
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
+ if localVarOptionals != nil && localVarOptionals.SingleNestedName.IsSet() {
+ localVarQueryParams.Add("singleNested.name", parameterToString(localVarOptionals.SingleNestedName.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.SingleNestedAmount.IsSet() {
+ localVarQueryParams.Add("singleNested.amount", parameterToString(localVarOptionals.SingleNestedAmount.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.SingleNestedOk.IsSet() {
+ localVarQueryParams.Add("singleNested.ok", parameterToString(localVarOptionals.SingleNestedOk.Value(), ""))
+ }
+ localVarQueryParams.Add("floatValue", parameterToString(floatValue, ""))
+ localVarQueryParams.Add("doubleValue", parameterToString(doubleValue, ""))
+ localVarQueryParams.Add("int64Value", parameterToString(int64Value, ""))
+ if localVarOptionals != nil && localVarOptionals.Uint64Value.IsSet() {
+ localVarQueryParams.Add("uint64Value", parameterToString(localVarOptionals.Uint64Value.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Int32Value.IsSet() {
+ localVarQueryParams.Add("int32Value", parameterToString(localVarOptionals.Int32Value.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Fixed64Value.IsSet() {
+ localVarQueryParams.Add("fixed64Value", parameterToString(localVarOptionals.Fixed64Value.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Fixed32Value.IsSet() {
+ localVarQueryParams.Add("fixed32Value", parameterToString(localVarOptionals.Fixed32Value.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.BoolValue.IsSet() {
+ localVarQueryParams.Add("boolValue", parameterToString(localVarOptionals.BoolValue.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.StringValue.IsSet() {
+ localVarQueryParams.Add("stringValue", parameterToString(localVarOptionals.StringValue.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.BytesValue.IsSet() {
+ localVarQueryParams.Add("bytesValue", parameterToString(localVarOptionals.BytesValue.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Uint32Value.IsSet() {
+ localVarQueryParams.Add("uint32Value", parameterToString(localVarOptionals.Uint32Value.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.EnumValue.IsSet() {
+ localVarQueryParams.Add("enumValue", parameterToString(localVarOptionals.EnumValue.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.PathEnumValue.IsSet() {
+ localVarQueryParams.Add("pathEnumValue", parameterToString(localVarOptionals.PathEnumValue.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.NestedPathEnumValue.IsSet() {
+ localVarQueryParams.Add("nestedPathEnumValue", parameterToString(localVarOptionals.NestedPathEnumValue.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Sfixed32Value.IsSet() {
+ localVarQueryParams.Add("sfixed32Value", parameterToString(localVarOptionals.Sfixed32Value.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Sfixed64Value.IsSet() {
+ localVarQueryParams.Add("sfixed64Value", parameterToString(localVarOptionals.Sfixed64Value.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Sint32Value.IsSet() {
+ localVarQueryParams.Add("sint32Value", parameterToString(localVarOptionals.Sint32Value.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Sint64Value.IsSet() {
+ localVarQueryParams.Add("sint64Value", parameterToString(localVarOptionals.Sint64Value.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.RepeatedStringValue.IsSet() {
+ localVarQueryParams.Add("repeatedStringValue", parameterToString(localVarOptionals.RepeatedStringValue.Value(), "multi"))
+ }
+ if localVarOptionals != nil && localVarOptionals.OneofString.IsSet() {
+ localVarQueryParams.Add("oneofString", parameterToString(localVarOptionals.OneofString.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.NonConventionalNameValue.IsSet() {
+ localVarQueryParams.Add("nonConventionalNameValue", parameterToString(localVarOptionals.NonConventionalNameValue.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.TimestampValue.IsSet() {
+ localVarQueryParams.Add("timestampValue", parameterToString(localVarOptionals.TimestampValue.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.RepeatedEnumValue.IsSet() {
+ localVarQueryParams.Add("repeatedEnumValue", parameterToString(localVarOptionals.RepeatedEnumValue.Value(), "multi"))
+ }
+ if localVarOptionals != nil && localVarOptionals.RepeatedEnumAnnotation.IsSet() {
+ localVarQueryParams.Add("repeatedEnumAnnotation", parameterToString(localVarOptionals.RepeatedEnumAnnotation.Value(), "multi"))
+ }
+ if localVarOptionals != nil && localVarOptionals.EnumValueAnnotation.IsSet() {
+ localVarQueryParams.Add("enumValueAnnotation", parameterToString(localVarOptionals.EnumValueAnnotation.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.RepeatedStringAnnotation.IsSet() {
+ localVarQueryParams.Add("repeatedStringAnnotation", parameterToString(localVarOptionals.RepeatedStringAnnotation.Value(), "multi"))
+ }
+ if localVarOptionals != nil && localVarOptionals.NestedAnnotationName.IsSet() {
+ localVarQueryParams.Add("nestedAnnotation.name", parameterToString(localVarOptionals.NestedAnnotationName.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.NestedAnnotationAmount.IsSet() {
+ localVarQueryParams.Add("nestedAnnotation.amount", parameterToString(localVarOptionals.NestedAnnotationAmount.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.NestedAnnotationOk.IsSet() {
+ localVarQueryParams.Add("nestedAnnotation.ok", parameterToString(localVarOptionals.NestedAnnotationOk.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Int64OverrideType.IsSet() {
+ localVarQueryParams.Add("int64OverrideType", parameterToString(localVarOptionals.Int64OverrideType.Value(), ""))
+ }
+ localVarQueryParams.Add("requiredStringViaFieldBehaviorAnnotation", parameterToString(requiredStringViaFieldBehaviorAnnotation, ""))
+ if localVarOptionals != nil && localVarOptionals.OutputOnlyStringViaFieldBehaviorAnnotation.IsSet() {
+ localVarQueryParams.Add("outputOnlyStringViaFieldBehaviorAnnotation", parameterToString(localVarOptionals.OutputOnlyStringViaFieldBehaviorAnnotation.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.OptionalStringValue.IsSet() {
+ localVarQueryParams.Add("optionalStringValue", parameterToString(localVarOptionals.OptionalStringValue.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.ProductId.IsSet() {
+ localVarQueryParams.Add("productId", parameterToString(localVarOptionals.ProductId.Value(), "multi"))
+ }
+ if localVarOptionals != nil && localVarOptionals.OptionalStringField.IsSet() {
+ localVarQueryParams.Add("optionalStringField", parameterToString(localVarOptionals.OptionalStringField.Value(), ""))
+ }
+ localVarQueryParams.Add("requiredStringField1", parameterToString(requiredStringField1, ""))
+ localVarQueryParams.Add("requiredStringField2", parameterToString(requiredStringField2, ""))
+ localVarQueryParams.Add("required_field_behavior_json_name_custom", parameterToString(requiredFieldBehaviorJsonNameCustom, ""))
+ localVarQueryParams.Add("required_field_schema_json_name_custom", parameterToString(requiredFieldSchemaJsonNameCustom, ""))
+ if localVarOptionals != nil && localVarOptionals.TrailingOnly.IsSet() {
+ localVarQueryParams.Add("trailingOnly", parameterToString(localVarOptionals.TrailingOnly.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.TrailingOnlyDot.IsSet() {
+ localVarQueryParams.Add("trailingOnlyDot", parameterToString(localVarOptionals.TrailingOnlyDot.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.TrailingBoth.IsSet() {
+ localVarQueryParams.Add("trailingBoth", parameterToString(localVarOptionals.TrailingBoth.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.TrailingMultiline.IsSet() {
+ localVarQueryParams.Add("trailingMultiline", parameterToString(localVarOptionals.TrailingMultiline.Value(), ""))
+ }
// to determine the Content-Type header
localVarHttpContentTypes := []string{"application/json", "application/x-foo-mime"}
@@ -1881,8 +2461,6 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceDeepPathEcho(
if localVarHttpHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
}
- // body params
- localVarPostBody = &body
if ctx != nil {
// API Key Authentication
if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
@@ -2001,13 +2579,102 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceDeepPathEcho(
/*
ABitOfEverythingServiceApiService
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param uuid
+ * @param uuidName
+ * @param floatValue Float value field
+ * @param doubleValue
+ * @param int64Value
+ * @param requiredStringViaFieldBehaviorAnnotation mark a field as required in Open API definition
+ * @param requiredStringField1
+ * @param requiredStringField2
+ * @param requiredFieldBehaviorJsonNameCustom Test openapiv2 handling of required json_name fields
+ * @param requiredFieldSchemaJsonNameCustom
+ * @param optional nil or *ABitOfEverythingServiceCustomOptionsRequestOpts - Optional Parameters:
+ * @param "SingleNestedName" (optional.String) - name is nested field.
+ * @param "SingleNestedAmount" (optional.Int64) -
+ * @param "SingleNestedOk" (optional.String) - DeepEnum description. - FALSE: FALSE is false. - TRUE: TRUE is true.
+ * @param "Uint64Value" (optional.String) -
+ * @param "Int32Value" (optional.Int32) -
+ * @param "Fixed64Value" (optional.String) -
+ * @param "Fixed32Value" (optional.Int64) -
+ * @param "BoolValue" (optional.Bool) -
+ * @param "StringValue" (optional.String) -
+ * @param "BytesValue" (optional.String) -
+ * @param "Uint32Value" (optional.Int64) -
+ * @param "EnumValue" (optional.String) - - ZERO: ZERO means 0 - ONE: ONE means 1
+ * @param "PathEnumValue" (optional.String) -
+ * @param "NestedPathEnumValue" (optional.String) -
+ * @param "Sfixed32Value" (optional.Int32) -
+ * @param "Sfixed64Value" (optional.String) -
+ * @param "Sint32Value" (optional.Int32) -
+ * @param "Sint64Value" (optional.String) -
+ * @param "RepeatedStringValue" (optional.Interface of []string) -
+ * @param "OneofString" (optional.String) -
+ * @param "NonConventionalNameValue" (optional.String) -
+ * @param "TimestampValue" (optional.Time) -
+ * @param "RepeatedEnumValue" (optional.Interface of []string) - repeated enum value. it is comma-separated in query - ZERO: ZERO means 0 - ONE: ONE means 1
+ * @param "RepeatedEnumAnnotation" (optional.Interface of []string) - Repeated numeric enum title Repeated numeric enum description. - ZERO: ZERO means 0 - ONE: ONE means 1
+ * @param "EnumValueAnnotation" (optional.String) - Numeric enum title Numeric enum description. - ZERO: ZERO means 0 - ONE: ONE means 1
+ * @param "RepeatedStringAnnotation" (optional.Interface of []string) - Repeated string title Repeated string description.
+ * @param "NestedAnnotationName" (optional.String) - name is nested field.
+ * @param "NestedAnnotationAmount" (optional.Int64) -
+ * @param "NestedAnnotationOk" (optional.String) - DeepEnum description. - FALSE: FALSE is false. - TRUE: TRUE is true.
+ * @param "Int64OverrideType" (optional.Int64) -
+ * @param "OutputOnlyStringViaFieldBehaviorAnnotation" (optional.String) - mark a field as readonly in Open API definition
+ * @param "OptionalStringValue" (optional.String) -
+ * @param "ProductId" (optional.Interface of []string) - Test openapiv2 generation of repeated fields Only digits are allowed.
+ * @param "OptionalStringField" (optional.String) - Test openapiv2 generation of required fields with annotation and jsonschema to reproduce
+ * @param "TrailingOnly" (optional.String) - Trailing only
+ * @param "TrailingOnlyDot" (optional.String) - Trailing only dot.
+ * @param "TrailingBoth" (optional.String) - Leading both Trailing both.
+ * @param "TrailingMultiline" (optional.String) - Leading multiline This is an example of a multi-line comment. Trailing multiline.
@return interface{}
*/
-func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceDelete(ctx context.Context, uuid string) (interface{}, *http.Response, error) {
+
+type ABitOfEverythingServiceCustomOptionsRequestOpts struct {
+ SingleNestedName optional.String
+ SingleNestedAmount optional.Int64
+ SingleNestedOk optional.String
+ Uint64Value optional.String
+ Int32Value optional.Int32
+ Fixed64Value optional.String
+ Fixed32Value optional.Int64
+ BoolValue optional.Bool
+ StringValue optional.String
+ BytesValue optional.String
+ Uint32Value optional.Int64
+ EnumValue optional.String
+ PathEnumValue optional.String
+ NestedPathEnumValue optional.String
+ Sfixed32Value optional.Int32
+ Sfixed64Value optional.String
+ Sint32Value optional.Int32
+ Sint64Value optional.String
+ RepeatedStringValue optional.Interface
+ OneofString optional.String
+ NonConventionalNameValue optional.String
+ TimestampValue optional.Time
+ RepeatedEnumValue optional.Interface
+ RepeatedEnumAnnotation optional.Interface
+ EnumValueAnnotation optional.String
+ RepeatedStringAnnotation optional.Interface
+ NestedAnnotationName optional.String
+ NestedAnnotationAmount optional.Int64
+ NestedAnnotationOk optional.String
+ Int64OverrideType optional.Int64
+ OutputOnlyStringViaFieldBehaviorAnnotation optional.String
+ OptionalStringValue optional.String
+ ProductId optional.Interface
+ OptionalStringField optional.String
+ TrailingOnly optional.String
+ TrailingOnlyDot optional.String
+ TrailingBoth optional.String
+ TrailingMultiline optional.String
+}
+
+func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceCustomOptionsRequest(ctx context.Context, uuidName string, floatValue float32, doubleValue float64, int64Value string, requiredStringViaFieldBehaviorAnnotation string, requiredStringField1 string, requiredStringField2 string, requiredFieldBehaviorJsonNameCustom string, requiredFieldSchemaJsonNameCustom string, localVarOptionals *ABitOfEverythingServiceCustomOptionsRequestOpts) (interface{}, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Delete")
+ localVarHttpMethod = strings.ToUpper("Options")
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
@@ -2015,13 +2682,135 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceDelete(ctx co
)
// create path and map variables
- localVarPath := a.client.cfg.BasePath + "/v1/example/a_bit_of_everything/{uuid}"
- localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", fmt.Sprintf("%v", uuid), -1)
+ localVarPath := a.client.cfg.BasePath + "/v1/example/a_bit_of_everything/{uuidName}"
+ localVarPath = strings.Replace(localVarPath, "{"+"uuidName"+"}", fmt.Sprintf("%v", uuidName), -1)
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
+ if localVarOptionals != nil && localVarOptionals.SingleNestedName.IsSet() {
+ localVarQueryParams.Add("singleNested.name", parameterToString(localVarOptionals.SingleNestedName.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.SingleNestedAmount.IsSet() {
+ localVarQueryParams.Add("singleNested.amount", parameterToString(localVarOptionals.SingleNestedAmount.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.SingleNestedOk.IsSet() {
+ localVarQueryParams.Add("singleNested.ok", parameterToString(localVarOptionals.SingleNestedOk.Value(), ""))
+ }
+ localVarQueryParams.Add("floatValue", parameterToString(floatValue, ""))
+ localVarQueryParams.Add("doubleValue", parameterToString(doubleValue, ""))
+ localVarQueryParams.Add("int64Value", parameterToString(int64Value, ""))
+ if localVarOptionals != nil && localVarOptionals.Uint64Value.IsSet() {
+ localVarQueryParams.Add("uint64Value", parameterToString(localVarOptionals.Uint64Value.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Int32Value.IsSet() {
+ localVarQueryParams.Add("int32Value", parameterToString(localVarOptionals.Int32Value.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Fixed64Value.IsSet() {
+ localVarQueryParams.Add("fixed64Value", parameterToString(localVarOptionals.Fixed64Value.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Fixed32Value.IsSet() {
+ localVarQueryParams.Add("fixed32Value", parameterToString(localVarOptionals.Fixed32Value.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.BoolValue.IsSet() {
+ localVarQueryParams.Add("boolValue", parameterToString(localVarOptionals.BoolValue.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.StringValue.IsSet() {
+ localVarQueryParams.Add("stringValue", parameterToString(localVarOptionals.StringValue.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.BytesValue.IsSet() {
+ localVarQueryParams.Add("bytesValue", parameterToString(localVarOptionals.BytesValue.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Uint32Value.IsSet() {
+ localVarQueryParams.Add("uint32Value", parameterToString(localVarOptionals.Uint32Value.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.EnumValue.IsSet() {
+ localVarQueryParams.Add("enumValue", parameterToString(localVarOptionals.EnumValue.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.PathEnumValue.IsSet() {
+ localVarQueryParams.Add("pathEnumValue", parameterToString(localVarOptionals.PathEnumValue.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.NestedPathEnumValue.IsSet() {
+ localVarQueryParams.Add("nestedPathEnumValue", parameterToString(localVarOptionals.NestedPathEnumValue.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Sfixed32Value.IsSet() {
+ localVarQueryParams.Add("sfixed32Value", parameterToString(localVarOptionals.Sfixed32Value.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Sfixed64Value.IsSet() {
+ localVarQueryParams.Add("sfixed64Value", parameterToString(localVarOptionals.Sfixed64Value.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Sint32Value.IsSet() {
+ localVarQueryParams.Add("sint32Value", parameterToString(localVarOptionals.Sint32Value.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Sint64Value.IsSet() {
+ localVarQueryParams.Add("sint64Value", parameterToString(localVarOptionals.Sint64Value.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.RepeatedStringValue.IsSet() {
+ localVarQueryParams.Add("repeatedStringValue", parameterToString(localVarOptionals.RepeatedStringValue.Value(), "multi"))
+ }
+ if localVarOptionals != nil && localVarOptionals.OneofString.IsSet() {
+ localVarQueryParams.Add("oneofString", parameterToString(localVarOptionals.OneofString.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.NonConventionalNameValue.IsSet() {
+ localVarQueryParams.Add("nonConventionalNameValue", parameterToString(localVarOptionals.NonConventionalNameValue.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.TimestampValue.IsSet() {
+ localVarQueryParams.Add("timestampValue", parameterToString(localVarOptionals.TimestampValue.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.RepeatedEnumValue.IsSet() {
+ localVarQueryParams.Add("repeatedEnumValue", parameterToString(localVarOptionals.RepeatedEnumValue.Value(), "multi"))
+ }
+ if localVarOptionals != nil && localVarOptionals.RepeatedEnumAnnotation.IsSet() {
+ localVarQueryParams.Add("repeatedEnumAnnotation", parameterToString(localVarOptionals.RepeatedEnumAnnotation.Value(), "multi"))
+ }
+ if localVarOptionals != nil && localVarOptionals.EnumValueAnnotation.IsSet() {
+ localVarQueryParams.Add("enumValueAnnotation", parameterToString(localVarOptionals.EnumValueAnnotation.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.RepeatedStringAnnotation.IsSet() {
+ localVarQueryParams.Add("repeatedStringAnnotation", parameterToString(localVarOptionals.RepeatedStringAnnotation.Value(), "multi"))
+ }
+ if localVarOptionals != nil && localVarOptionals.NestedAnnotationName.IsSet() {
+ localVarQueryParams.Add("nestedAnnotation.name", parameterToString(localVarOptionals.NestedAnnotationName.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.NestedAnnotationAmount.IsSet() {
+ localVarQueryParams.Add("nestedAnnotation.amount", parameterToString(localVarOptionals.NestedAnnotationAmount.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.NestedAnnotationOk.IsSet() {
+ localVarQueryParams.Add("nestedAnnotation.ok", parameterToString(localVarOptionals.NestedAnnotationOk.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Int64OverrideType.IsSet() {
+ localVarQueryParams.Add("int64OverrideType", parameterToString(localVarOptionals.Int64OverrideType.Value(), ""))
+ }
+ localVarQueryParams.Add("requiredStringViaFieldBehaviorAnnotation", parameterToString(requiredStringViaFieldBehaviorAnnotation, ""))
+ if localVarOptionals != nil && localVarOptionals.OutputOnlyStringViaFieldBehaviorAnnotation.IsSet() {
+ localVarQueryParams.Add("outputOnlyStringViaFieldBehaviorAnnotation", parameterToString(localVarOptionals.OutputOnlyStringViaFieldBehaviorAnnotation.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.OptionalStringValue.IsSet() {
+ localVarQueryParams.Add("optionalStringValue", parameterToString(localVarOptionals.OptionalStringValue.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.ProductId.IsSet() {
+ localVarQueryParams.Add("productId", parameterToString(localVarOptionals.ProductId.Value(), "multi"))
+ }
+ if localVarOptionals != nil && localVarOptionals.OptionalStringField.IsSet() {
+ localVarQueryParams.Add("optionalStringField", parameterToString(localVarOptionals.OptionalStringField.Value(), ""))
+ }
+ localVarQueryParams.Add("requiredStringField1", parameterToString(requiredStringField1, ""))
+ localVarQueryParams.Add("requiredStringField2", parameterToString(requiredStringField2, ""))
+ localVarQueryParams.Add("required_field_behavior_json_name_custom", parameterToString(requiredFieldBehaviorJsonNameCustom, ""))
+ localVarQueryParams.Add("required_field_schema_json_name_custom", parameterToString(requiredFieldSchemaJsonNameCustom, ""))
+ if localVarOptionals != nil && localVarOptionals.TrailingOnly.IsSet() {
+ localVarQueryParams.Add("trailingOnly", parameterToString(localVarOptionals.TrailingOnly.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.TrailingOnlyDot.IsSet() {
+ localVarQueryParams.Add("trailingOnlyDot", parameterToString(localVarOptionals.TrailingOnlyDot.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.TrailingBoth.IsSet() {
+ localVarQueryParams.Add("trailingBoth", parameterToString(localVarOptionals.TrailingBoth.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.TrailingMultiline.IsSet() {
+ localVarQueryParams.Add("trailingMultiline", parameterToString(localVarOptionals.TrailingMultiline.Value(), ""))
+ }
// to determine the Content-Type header
localVarHttpContentTypes := []string{"application/json", "application/x-foo-mime"}
@@ -2093,50 +2882,6 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceDelete(ctx co
return localVarReturnValue, localVarHttpResponse, newErr
}
- if localVarHttpResponse.StatusCode == 403 {
- var v interface{}
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
- return localVarReturnValue, localVarHttpResponse, newErr
- }
-
- if localVarHttpResponse.StatusCode == 404 {
- var v string
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
- return localVarReturnValue, localVarHttpResponse, newErr
- }
-
- if localVarHttpResponse.StatusCode == 418 {
- var v ExamplepbNumericEnum
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
- return localVarReturnValue, localVarHttpResponse, newErr
- }
-
- if localVarHttpResponse.StatusCode == 500 {
- var v ExamplepbErrorResponse
- err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err != nil {
- newErr.error = err.Error()
- return localVarReturnValue, localVarHttpResponse, newErr
- }
- newErr.model = v
- return localVarReturnValue, localVarHttpResponse, newErr
- }
-
if localVarHttpResponse.StatusCode == 0 {
var v RpcStatus
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
@@ -2157,20 +2902,23 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceDelete(ctx co
/*
ABitOfEverythingServiceApiService
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param singleNestedName name is nested field.
+ * @param body
-@return interface{}
+@return ExamplepbABitOfEverything
*/
-func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceErrorWithDetails(ctx context.Context) (interface{}, *http.Response, error) {
+func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceDeepPathEcho(ctx context.Context, singleNestedName string, body ABitOfEverything1) (ExamplepbABitOfEverything, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
+ localVarHttpMethod = strings.ToUpper("Post")
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
- localVarReturnValue interface{}
+ localVarReturnValue ExamplepbABitOfEverything
)
// create path and map variables
- localVarPath := a.client.cfg.BasePath + "/v2/example/errorwithdetails"
+ localVarPath := a.client.cfg.BasePath + "/v1/example/deep_path/{singleNested.name}"
+ localVarPath = strings.Replace(localVarPath, "{"+"singleNested.name"+"}", fmt.Sprintf("%v", singleNestedName), -1)
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
@@ -2193,6 +2941,8 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceErrorWithDeta
if localVarHttpHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
}
+ // body params
+ localVarPostBody = &body
if ctx != nil {
// API Key Authentication
if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
@@ -2237,7 +2987,7 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceErrorWithDeta
}
if localVarHttpResponse.StatusCode == 200 {
- var v interface{}
+ var v ExamplepbABitOfEverything
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
@@ -2311,14 +3061,13 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceErrorWithDeta
/*
ABitOfEverythingServiceApiService
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param id
- * @param body
+ * @param uuid
@return interface{}
*/
-func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceGetMessageWithBody(ctx context.Context, id string, body ExamplepbBody) (interface{}, *http.Response, error) {
+func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceDelete(ctx context.Context, uuid string) (interface{}, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Post")
+ localVarHttpMethod = strings.ToUpper("Delete")
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
@@ -2326,8 +3075,8 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceGetMessageWit
)
// create path and map variables
- localVarPath := a.client.cfg.BasePath + "/v2/example/withbody/{id}"
- localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", fmt.Sprintf("%v", id), -1)
+ localVarPath := a.client.cfg.BasePath + "/v1/example/a_bit_of_everything/{uuid}"
+ localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", fmt.Sprintf("%v", uuid), -1)
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
@@ -2350,8 +3099,6 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceGetMessageWit
if localVarHttpHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
}
- // body params
- localVarPostBody = &body
if ctx != nil {
// API Key Authentication
if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
@@ -2470,15 +3217,19 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceGetMessageWit
/*
ABitOfEverythingServiceApiService
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param uuid
+ * @param uuidName
* @param floatValue Float value field
- * @param requiredStringViaFieldBehaviorAnnotation mark a field as required in Open API definition.
- * @param optional nil or *ABitOfEverythingServiceGetQueryOpts - Optional Parameters:
+ * @param doubleValue
+ * @param int64Value
+ * @param requiredStringViaFieldBehaviorAnnotation mark a field as required in Open API definition
+ * @param requiredStringField1
+ * @param requiredStringField2
+ * @param requiredFieldBehaviorJsonNameCustom Test openapiv2 handling of required json_name fields
+ * @param requiredFieldSchemaJsonNameCustom
+ * @param optional nil or *ABitOfEverythingServiceDoubleColonOpts - Optional Parameters:
* @param "SingleNestedName" (optional.String) - name is nested field.
* @param "SingleNestedAmount" (optional.Int64) -
* @param "SingleNestedOk" (optional.String) - DeepEnum description. - FALSE: FALSE is false. - TRUE: TRUE is true.
- * @param "DoubleValue" (optional.Float64) -
- * @param "Int64Value" (optional.String) -
* @param "Uint64Value" (optional.String) -
* @param "Int32Value" (optional.Int32) -
* @param "Fixed64Value" (optional.String) -
@@ -2498,26 +3249,30 @@ ABitOfEverythingServiceApiService
* @param "OneofString" (optional.String) -
* @param "NonConventionalNameValue" (optional.String) -
* @param "TimestampValue" (optional.Time) -
- * @param "RepeatedEnumValue" (optional.Interface of []string) - repeated enum value. it is comma-separated in query. - ZERO: ZERO means 0 - ONE: ONE means 1
- * @param "RepeatedEnumAnnotation" (optional.Interface of []string) - Repeated numeric enum title. Repeated numeric enum description. - ZERO: ZERO means 0 - ONE: ONE means 1
- * @param "EnumValueAnnotation" (optional.String) - Numeric enum title. Numeric enum description. - ZERO: ZERO means 0 - ONE: ONE means 1
- * @param "RepeatedStringAnnotation" (optional.Interface of []string) - Repeated string title. Repeated string description.
+ * @param "RepeatedEnumValue" (optional.Interface of []string) - repeated enum value. it is comma-separated in query - ZERO: ZERO means 0 - ONE: ONE means 1
+ * @param "RepeatedEnumAnnotation" (optional.Interface of []string) - Repeated numeric enum title Repeated numeric enum description. - ZERO: ZERO means 0 - ONE: ONE means 1
+ * @param "EnumValueAnnotation" (optional.String) - Numeric enum title Numeric enum description. - ZERO: ZERO means 0 - ONE: ONE means 1
+ * @param "RepeatedStringAnnotation" (optional.Interface of []string) - Repeated string title Repeated string description.
* @param "NestedAnnotationName" (optional.String) - name is nested field.
* @param "NestedAnnotationAmount" (optional.Int64) -
* @param "NestedAnnotationOk" (optional.String) - DeepEnum description. - FALSE: FALSE is false. - TRUE: TRUE is true.
* @param "Int64OverrideType" (optional.Int64) -
- * @param "OutputOnlyStringViaFieldBehaviorAnnotation" (optional.String) - mark a field as readonly in Open API definition.
+ * @param "OutputOnlyStringViaFieldBehaviorAnnotation" (optional.String) - mark a field as readonly in Open API definition
* @param "OptionalStringValue" (optional.String) -
+ * @param "ProductId" (optional.Interface of []string) - Test openapiv2 generation of repeated fields Only digits are allowed.
+ * @param "OptionalStringField" (optional.String) - Test openapiv2 generation of required fields with annotation and jsonschema to reproduce
+ * @param "TrailingOnly" (optional.String) - Trailing only
+ * @param "TrailingOnlyDot" (optional.String) - Trailing only dot.
+ * @param "TrailingBoth" (optional.String) - Leading both Trailing both.
+ * @param "TrailingMultiline" (optional.String) - Leading multiline This is an example of a multi-line comment. Trailing multiline.
-@return interface{}
+@return ExamplepbABitOfEverything
*/
-type ABitOfEverythingServiceGetQueryOpts struct {
+type ABitOfEverythingServiceDoubleColonOpts struct {
SingleNestedName optional.String
SingleNestedAmount optional.Int64
SingleNestedOk optional.String
- DoubleValue optional.Float64
- Int64Value optional.String
Uint64Value optional.String
Int32Value optional.Int32
Fixed64Value optional.String
@@ -2547,11 +3302,1675 @@ type ABitOfEverythingServiceGetQueryOpts struct {
Int64OverrideType optional.Int64
OutputOnlyStringViaFieldBehaviorAnnotation optional.String
OptionalStringValue optional.String
+ ProductId optional.Interface
+ OptionalStringField optional.String
+ TrailingOnly optional.String
+ TrailingOnlyDot optional.String
+ TrailingBoth optional.String
+ TrailingMultiline optional.String
+}
+
+func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceDoubleColon(ctx context.Context, uuidName string, floatValue float32, doubleValue float64, int64Value string, requiredStringViaFieldBehaviorAnnotation string, requiredStringField1 string, requiredStringField2 string, requiredFieldBehaviorJsonNameCustom string, requiredFieldSchemaJsonNameCustom string, localVarOptionals *ABitOfEverythingServiceDoubleColonOpts) (ExamplepbABitOfEverything, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue ExamplepbABitOfEverything
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/v1/example/a_bit_of_everything/{uuidName}:custom:custom"
+ localVarPath = strings.Replace(localVarPath, "{"+"uuidName"+"}", fmt.Sprintf("%v", uuidName), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ if localVarOptionals != nil && localVarOptionals.SingleNestedName.IsSet() {
+ localVarQueryParams.Add("singleNested.name", parameterToString(localVarOptionals.SingleNestedName.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.SingleNestedAmount.IsSet() {
+ localVarQueryParams.Add("singleNested.amount", parameterToString(localVarOptionals.SingleNestedAmount.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.SingleNestedOk.IsSet() {
+ localVarQueryParams.Add("singleNested.ok", parameterToString(localVarOptionals.SingleNestedOk.Value(), ""))
+ }
+ localVarQueryParams.Add("floatValue", parameterToString(floatValue, ""))
+ localVarQueryParams.Add("doubleValue", parameterToString(doubleValue, ""))
+ localVarQueryParams.Add("int64Value", parameterToString(int64Value, ""))
+ if localVarOptionals != nil && localVarOptionals.Uint64Value.IsSet() {
+ localVarQueryParams.Add("uint64Value", parameterToString(localVarOptionals.Uint64Value.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Int32Value.IsSet() {
+ localVarQueryParams.Add("int32Value", parameterToString(localVarOptionals.Int32Value.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Fixed64Value.IsSet() {
+ localVarQueryParams.Add("fixed64Value", parameterToString(localVarOptionals.Fixed64Value.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Fixed32Value.IsSet() {
+ localVarQueryParams.Add("fixed32Value", parameterToString(localVarOptionals.Fixed32Value.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.BoolValue.IsSet() {
+ localVarQueryParams.Add("boolValue", parameterToString(localVarOptionals.BoolValue.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.StringValue.IsSet() {
+ localVarQueryParams.Add("stringValue", parameterToString(localVarOptionals.StringValue.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.BytesValue.IsSet() {
+ localVarQueryParams.Add("bytesValue", parameterToString(localVarOptionals.BytesValue.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Uint32Value.IsSet() {
+ localVarQueryParams.Add("uint32Value", parameterToString(localVarOptionals.Uint32Value.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.EnumValue.IsSet() {
+ localVarQueryParams.Add("enumValue", parameterToString(localVarOptionals.EnumValue.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.PathEnumValue.IsSet() {
+ localVarQueryParams.Add("pathEnumValue", parameterToString(localVarOptionals.PathEnumValue.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.NestedPathEnumValue.IsSet() {
+ localVarQueryParams.Add("nestedPathEnumValue", parameterToString(localVarOptionals.NestedPathEnumValue.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Sfixed32Value.IsSet() {
+ localVarQueryParams.Add("sfixed32Value", parameterToString(localVarOptionals.Sfixed32Value.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Sfixed64Value.IsSet() {
+ localVarQueryParams.Add("sfixed64Value", parameterToString(localVarOptionals.Sfixed64Value.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Sint32Value.IsSet() {
+ localVarQueryParams.Add("sint32Value", parameterToString(localVarOptionals.Sint32Value.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Sint64Value.IsSet() {
+ localVarQueryParams.Add("sint64Value", parameterToString(localVarOptionals.Sint64Value.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.RepeatedStringValue.IsSet() {
+ localVarQueryParams.Add("repeatedStringValue", parameterToString(localVarOptionals.RepeatedStringValue.Value(), "multi"))
+ }
+ if localVarOptionals != nil && localVarOptionals.OneofString.IsSet() {
+ localVarQueryParams.Add("oneofString", parameterToString(localVarOptionals.OneofString.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.NonConventionalNameValue.IsSet() {
+ localVarQueryParams.Add("nonConventionalNameValue", parameterToString(localVarOptionals.NonConventionalNameValue.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.TimestampValue.IsSet() {
+ localVarQueryParams.Add("timestampValue", parameterToString(localVarOptionals.TimestampValue.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.RepeatedEnumValue.IsSet() {
+ localVarQueryParams.Add("repeatedEnumValue", parameterToString(localVarOptionals.RepeatedEnumValue.Value(), "multi"))
+ }
+ if localVarOptionals != nil && localVarOptionals.RepeatedEnumAnnotation.IsSet() {
+ localVarQueryParams.Add("repeatedEnumAnnotation", parameterToString(localVarOptionals.RepeatedEnumAnnotation.Value(), "multi"))
+ }
+ if localVarOptionals != nil && localVarOptionals.EnumValueAnnotation.IsSet() {
+ localVarQueryParams.Add("enumValueAnnotation", parameterToString(localVarOptionals.EnumValueAnnotation.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.RepeatedStringAnnotation.IsSet() {
+ localVarQueryParams.Add("repeatedStringAnnotation", parameterToString(localVarOptionals.RepeatedStringAnnotation.Value(), "multi"))
+ }
+ if localVarOptionals != nil && localVarOptionals.NestedAnnotationName.IsSet() {
+ localVarQueryParams.Add("nestedAnnotation.name", parameterToString(localVarOptionals.NestedAnnotationName.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.NestedAnnotationAmount.IsSet() {
+ localVarQueryParams.Add("nestedAnnotation.amount", parameterToString(localVarOptionals.NestedAnnotationAmount.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.NestedAnnotationOk.IsSet() {
+ localVarQueryParams.Add("nestedAnnotation.ok", parameterToString(localVarOptionals.NestedAnnotationOk.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Int64OverrideType.IsSet() {
+ localVarQueryParams.Add("int64OverrideType", parameterToString(localVarOptionals.Int64OverrideType.Value(), ""))
+ }
+ localVarQueryParams.Add("requiredStringViaFieldBehaviorAnnotation", parameterToString(requiredStringViaFieldBehaviorAnnotation, ""))
+ if localVarOptionals != nil && localVarOptionals.OutputOnlyStringViaFieldBehaviorAnnotation.IsSet() {
+ localVarQueryParams.Add("outputOnlyStringViaFieldBehaviorAnnotation", parameterToString(localVarOptionals.OutputOnlyStringViaFieldBehaviorAnnotation.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.OptionalStringValue.IsSet() {
+ localVarQueryParams.Add("optionalStringValue", parameterToString(localVarOptionals.OptionalStringValue.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.ProductId.IsSet() {
+ localVarQueryParams.Add("productId", parameterToString(localVarOptionals.ProductId.Value(), "multi"))
+ }
+ if localVarOptionals != nil && localVarOptionals.OptionalStringField.IsSet() {
+ localVarQueryParams.Add("optionalStringField", parameterToString(localVarOptionals.OptionalStringField.Value(), ""))
+ }
+ localVarQueryParams.Add("requiredStringField1", parameterToString(requiredStringField1, ""))
+ localVarQueryParams.Add("requiredStringField2", parameterToString(requiredStringField2, ""))
+ localVarQueryParams.Add("required_field_behavior_json_name_custom", parameterToString(requiredFieldBehaviorJsonNameCustom, ""))
+ localVarQueryParams.Add("required_field_schema_json_name_custom", parameterToString(requiredFieldSchemaJsonNameCustom, ""))
+ if localVarOptionals != nil && localVarOptionals.TrailingOnly.IsSet() {
+ localVarQueryParams.Add("trailingOnly", parameterToString(localVarOptionals.TrailingOnly.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.TrailingOnlyDot.IsSet() {
+ localVarQueryParams.Add("trailingOnlyDot", parameterToString(localVarOptionals.TrailingOnlyDot.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.TrailingBoth.IsSet() {
+ localVarQueryParams.Add("trailingBoth", parameterToString(localVarOptionals.TrailingBoth.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.TrailingMultiline.IsSet() {
+ localVarQueryParams.Add("trailingMultiline", parameterToString(localVarOptionals.TrailingMultiline.Value(), ""))
+ }
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json", "application/x-foo-mime"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{"application/json", "application/x-foo-mime"}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-API-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v ExamplepbABitOfEverything
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 403 {
+ var v interface{}
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v string
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 418 {
+ var v ExamplepbNumericEnum
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 500 {
+ var v ExamplepbErrorResponse
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 0 {
+ var v RpcStatus
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+ABitOfEverythingServiceApiService
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+
+@return interface{}
+*/
+func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceErrorWithDetails(ctx context.Context) (interface{}, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue interface{}
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/v2/example/errorwithdetails"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json", "application/x-foo-mime"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{"application/json", "application/x-foo-mime"}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-API-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v interface{}
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 403 {
+ var v interface{}
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v string
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 418 {
+ var v ExamplepbNumericEnum
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 500 {
+ var v ExamplepbErrorResponse
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 0 {
+ var v RpcStatus
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+ABitOfEverythingServiceApiService
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param uuidName
+ * @param floatValue Float value field
+ * @param doubleValue
+ * @param int64Value
+ * @param requiredStringViaFieldBehaviorAnnotation mark a field as required in Open API definition
+ * @param requiredStringField1
+ * @param requiredStringField2
+ * @param requiredFieldBehaviorJsonNameCustom Test openapiv2 handling of required json_name fields
+ * @param requiredFieldSchemaJsonNameCustom
+ * @param optional nil or *ABitOfEverythingServiceExistsOpts - Optional Parameters:
+ * @param "SingleNestedName" (optional.String) - name is nested field.
+ * @param "SingleNestedAmount" (optional.Int64) -
+ * @param "SingleNestedOk" (optional.String) - DeepEnum description. - FALSE: FALSE is false. - TRUE: TRUE is true.
+ * @param "Uint64Value" (optional.String) -
+ * @param "Int32Value" (optional.Int32) -
+ * @param "Fixed64Value" (optional.String) -
+ * @param "Fixed32Value" (optional.Int64) -
+ * @param "BoolValue" (optional.Bool) -
+ * @param "StringValue" (optional.String) -
+ * @param "BytesValue" (optional.String) -
+ * @param "Uint32Value" (optional.Int64) -
+ * @param "EnumValue" (optional.String) - - ZERO: ZERO means 0 - ONE: ONE means 1
+ * @param "PathEnumValue" (optional.String) -
+ * @param "NestedPathEnumValue" (optional.String) -
+ * @param "Sfixed32Value" (optional.Int32) -
+ * @param "Sfixed64Value" (optional.String) -
+ * @param "Sint32Value" (optional.Int32) -
+ * @param "Sint64Value" (optional.String) -
+ * @param "RepeatedStringValue" (optional.Interface of []string) -
+ * @param "OneofString" (optional.String) -
+ * @param "NonConventionalNameValue" (optional.String) -
+ * @param "TimestampValue" (optional.Time) -
+ * @param "RepeatedEnumValue" (optional.Interface of []string) - repeated enum value. it is comma-separated in query - ZERO: ZERO means 0 - ONE: ONE means 1
+ * @param "RepeatedEnumAnnotation" (optional.Interface of []string) - Repeated numeric enum title Repeated numeric enum description. - ZERO: ZERO means 0 - ONE: ONE means 1
+ * @param "EnumValueAnnotation" (optional.String) - Numeric enum title Numeric enum description. - ZERO: ZERO means 0 - ONE: ONE means 1
+ * @param "RepeatedStringAnnotation" (optional.Interface of []string) - Repeated string title Repeated string description.
+ * @param "NestedAnnotationName" (optional.String) - name is nested field.
+ * @param "NestedAnnotationAmount" (optional.Int64) -
+ * @param "NestedAnnotationOk" (optional.String) - DeepEnum description. - FALSE: FALSE is false. - TRUE: TRUE is true.
+ * @param "Int64OverrideType" (optional.Int64) -
+ * @param "OutputOnlyStringViaFieldBehaviorAnnotation" (optional.String) - mark a field as readonly in Open API definition
+ * @param "OptionalStringValue" (optional.String) -
+ * @param "ProductId" (optional.Interface of []string) - Test openapiv2 generation of repeated fields Only digits are allowed.
+ * @param "OptionalStringField" (optional.String) - Test openapiv2 generation of required fields with annotation and jsonschema to reproduce
+ * @param "TrailingOnly" (optional.String) - Trailing only
+ * @param "TrailingOnlyDot" (optional.String) - Trailing only dot.
+ * @param "TrailingBoth" (optional.String) - Leading both Trailing both.
+ * @param "TrailingMultiline" (optional.String) - Leading multiline This is an example of a multi-line comment. Trailing multiline.
+
+@return interface{}
+*/
+
+type ABitOfEverythingServiceExistsOpts struct {
+ SingleNestedName optional.String
+ SingleNestedAmount optional.Int64
+ SingleNestedOk optional.String
+ Uint64Value optional.String
+ Int32Value optional.Int32
+ Fixed64Value optional.String
+ Fixed32Value optional.Int64
+ BoolValue optional.Bool
+ StringValue optional.String
+ BytesValue optional.String
+ Uint32Value optional.Int64
+ EnumValue optional.String
+ PathEnumValue optional.String
+ NestedPathEnumValue optional.String
+ Sfixed32Value optional.Int32
+ Sfixed64Value optional.String
+ Sint32Value optional.Int32
+ Sint64Value optional.String
+ RepeatedStringValue optional.Interface
+ OneofString optional.String
+ NonConventionalNameValue optional.String
+ TimestampValue optional.Time
+ RepeatedEnumValue optional.Interface
+ RepeatedEnumAnnotation optional.Interface
+ EnumValueAnnotation optional.String
+ RepeatedStringAnnotation optional.Interface
+ NestedAnnotationName optional.String
+ NestedAnnotationAmount optional.Int64
+ NestedAnnotationOk optional.String
+ Int64OverrideType optional.Int64
+ OutputOnlyStringViaFieldBehaviorAnnotation optional.String
+ OptionalStringValue optional.String
+ ProductId optional.Interface
+ OptionalStringField optional.String
+ TrailingOnly optional.String
+ TrailingOnlyDot optional.String
+ TrailingBoth optional.String
+ TrailingMultiline optional.String
+}
+
+func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceExists(ctx context.Context, uuidName string, floatValue float32, doubleValue float64, int64Value string, requiredStringViaFieldBehaviorAnnotation string, requiredStringField1 string, requiredStringField2 string, requiredFieldBehaviorJsonNameCustom string, requiredFieldSchemaJsonNameCustom string, localVarOptionals *ABitOfEverythingServiceExistsOpts) (interface{}, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Head")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue interface{}
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/v1/example/a_bit_of_everything/{uuidName}"
+ localVarPath = strings.Replace(localVarPath, "{"+"uuidName"+"}", fmt.Sprintf("%v", uuidName), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ if localVarOptionals != nil && localVarOptionals.SingleNestedName.IsSet() {
+ localVarQueryParams.Add("singleNested.name", parameterToString(localVarOptionals.SingleNestedName.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.SingleNestedAmount.IsSet() {
+ localVarQueryParams.Add("singleNested.amount", parameterToString(localVarOptionals.SingleNestedAmount.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.SingleNestedOk.IsSet() {
+ localVarQueryParams.Add("singleNested.ok", parameterToString(localVarOptionals.SingleNestedOk.Value(), ""))
+ }
+ localVarQueryParams.Add("floatValue", parameterToString(floatValue, ""))
+ localVarQueryParams.Add("doubleValue", parameterToString(doubleValue, ""))
+ localVarQueryParams.Add("int64Value", parameterToString(int64Value, ""))
+ if localVarOptionals != nil && localVarOptionals.Uint64Value.IsSet() {
+ localVarQueryParams.Add("uint64Value", parameterToString(localVarOptionals.Uint64Value.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Int32Value.IsSet() {
+ localVarQueryParams.Add("int32Value", parameterToString(localVarOptionals.Int32Value.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Fixed64Value.IsSet() {
+ localVarQueryParams.Add("fixed64Value", parameterToString(localVarOptionals.Fixed64Value.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Fixed32Value.IsSet() {
+ localVarQueryParams.Add("fixed32Value", parameterToString(localVarOptionals.Fixed32Value.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.BoolValue.IsSet() {
+ localVarQueryParams.Add("boolValue", parameterToString(localVarOptionals.BoolValue.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.StringValue.IsSet() {
+ localVarQueryParams.Add("stringValue", parameterToString(localVarOptionals.StringValue.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.BytesValue.IsSet() {
+ localVarQueryParams.Add("bytesValue", parameterToString(localVarOptionals.BytesValue.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Uint32Value.IsSet() {
+ localVarQueryParams.Add("uint32Value", parameterToString(localVarOptionals.Uint32Value.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.EnumValue.IsSet() {
+ localVarQueryParams.Add("enumValue", parameterToString(localVarOptionals.EnumValue.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.PathEnumValue.IsSet() {
+ localVarQueryParams.Add("pathEnumValue", parameterToString(localVarOptionals.PathEnumValue.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.NestedPathEnumValue.IsSet() {
+ localVarQueryParams.Add("nestedPathEnumValue", parameterToString(localVarOptionals.NestedPathEnumValue.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Sfixed32Value.IsSet() {
+ localVarQueryParams.Add("sfixed32Value", parameterToString(localVarOptionals.Sfixed32Value.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Sfixed64Value.IsSet() {
+ localVarQueryParams.Add("sfixed64Value", parameterToString(localVarOptionals.Sfixed64Value.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Sint32Value.IsSet() {
+ localVarQueryParams.Add("sint32Value", parameterToString(localVarOptionals.Sint32Value.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Sint64Value.IsSet() {
+ localVarQueryParams.Add("sint64Value", parameterToString(localVarOptionals.Sint64Value.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.RepeatedStringValue.IsSet() {
+ localVarQueryParams.Add("repeatedStringValue", parameterToString(localVarOptionals.RepeatedStringValue.Value(), "multi"))
+ }
+ if localVarOptionals != nil && localVarOptionals.OneofString.IsSet() {
+ localVarQueryParams.Add("oneofString", parameterToString(localVarOptionals.OneofString.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.NonConventionalNameValue.IsSet() {
+ localVarQueryParams.Add("nonConventionalNameValue", parameterToString(localVarOptionals.NonConventionalNameValue.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.TimestampValue.IsSet() {
+ localVarQueryParams.Add("timestampValue", parameterToString(localVarOptionals.TimestampValue.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.RepeatedEnumValue.IsSet() {
+ localVarQueryParams.Add("repeatedEnumValue", parameterToString(localVarOptionals.RepeatedEnumValue.Value(), "multi"))
+ }
+ if localVarOptionals != nil && localVarOptionals.RepeatedEnumAnnotation.IsSet() {
+ localVarQueryParams.Add("repeatedEnumAnnotation", parameterToString(localVarOptionals.RepeatedEnumAnnotation.Value(), "multi"))
+ }
+ if localVarOptionals != nil && localVarOptionals.EnumValueAnnotation.IsSet() {
+ localVarQueryParams.Add("enumValueAnnotation", parameterToString(localVarOptionals.EnumValueAnnotation.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.RepeatedStringAnnotation.IsSet() {
+ localVarQueryParams.Add("repeatedStringAnnotation", parameterToString(localVarOptionals.RepeatedStringAnnotation.Value(), "multi"))
+ }
+ if localVarOptionals != nil && localVarOptionals.NestedAnnotationName.IsSet() {
+ localVarQueryParams.Add("nestedAnnotation.name", parameterToString(localVarOptionals.NestedAnnotationName.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.NestedAnnotationAmount.IsSet() {
+ localVarQueryParams.Add("nestedAnnotation.amount", parameterToString(localVarOptionals.NestedAnnotationAmount.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.NestedAnnotationOk.IsSet() {
+ localVarQueryParams.Add("nestedAnnotation.ok", parameterToString(localVarOptionals.NestedAnnotationOk.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Int64OverrideType.IsSet() {
+ localVarQueryParams.Add("int64OverrideType", parameterToString(localVarOptionals.Int64OverrideType.Value(), ""))
+ }
+ localVarQueryParams.Add("requiredStringViaFieldBehaviorAnnotation", parameterToString(requiredStringViaFieldBehaviorAnnotation, ""))
+ if localVarOptionals != nil && localVarOptionals.OutputOnlyStringViaFieldBehaviorAnnotation.IsSet() {
+ localVarQueryParams.Add("outputOnlyStringViaFieldBehaviorAnnotation", parameterToString(localVarOptionals.OutputOnlyStringViaFieldBehaviorAnnotation.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.OptionalStringValue.IsSet() {
+ localVarQueryParams.Add("optionalStringValue", parameterToString(localVarOptionals.OptionalStringValue.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.ProductId.IsSet() {
+ localVarQueryParams.Add("productId", parameterToString(localVarOptionals.ProductId.Value(), "multi"))
+ }
+ if localVarOptionals != nil && localVarOptionals.OptionalStringField.IsSet() {
+ localVarQueryParams.Add("optionalStringField", parameterToString(localVarOptionals.OptionalStringField.Value(), ""))
+ }
+ localVarQueryParams.Add("requiredStringField1", parameterToString(requiredStringField1, ""))
+ localVarQueryParams.Add("requiredStringField2", parameterToString(requiredStringField2, ""))
+ localVarQueryParams.Add("required_field_behavior_json_name_custom", parameterToString(requiredFieldBehaviorJsonNameCustom, ""))
+ localVarQueryParams.Add("required_field_schema_json_name_custom", parameterToString(requiredFieldSchemaJsonNameCustom, ""))
+ if localVarOptionals != nil && localVarOptionals.TrailingOnly.IsSet() {
+ localVarQueryParams.Add("trailingOnly", parameterToString(localVarOptionals.TrailingOnly.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.TrailingOnlyDot.IsSet() {
+ localVarQueryParams.Add("trailingOnlyDot", parameterToString(localVarOptionals.TrailingOnlyDot.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.TrailingBoth.IsSet() {
+ localVarQueryParams.Add("trailingBoth", parameterToString(localVarOptionals.TrailingBoth.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.TrailingMultiline.IsSet() {
+ localVarQueryParams.Add("trailingMultiline", parameterToString(localVarOptionals.TrailingMultiline.Value(), ""))
+ }
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json", "application/x-foo-mime"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{"application/json", "application/x-foo-mime"}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-API-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v interface{}
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 0 {
+ var v RpcStatus
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+ABitOfEverythingServiceApiService
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param id
+ * @param data
+
+@return interface{}
+*/
+func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceGetMessageWithBody(ctx context.Context, id string, data ExamplepbBody) (interface{}, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue interface{}
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/v2/example/withbody/{id}"
+ localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", fmt.Sprintf("%v", id), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json", "application/x-foo-mime"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{"application/json", "application/x-foo-mime"}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ localVarPostBody = &data
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-API-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v interface{}
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 403 {
+ var v interface{}
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v string
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 418 {
+ var v ExamplepbNumericEnum
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 500 {
+ var v ExamplepbErrorResponse
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 0 {
+ var v RpcStatus
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+ABitOfEverythingServiceApiService
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param uuidName
+ * @param floatValue Float value field
+ * @param doubleValue
+ * @param int64Value
+ * @param requiredStringViaFieldBehaviorAnnotation mark a field as required in Open API definition
+ * @param requiredStringField1
+ * @param requiredStringField2
+ * @param requiredFieldBehaviorJsonNameCustom Test openapiv2 handling of required json_name fields
+ * @param requiredFieldSchemaJsonNameCustom
+ * @param optional nil or *ABitOfEverythingServiceGetQueryOpts - Optional Parameters:
+ * @param "SingleNestedName" (optional.String) - name is nested field.
+ * @param "SingleNestedAmount" (optional.Int64) -
+ * @param "SingleNestedOk" (optional.String) - DeepEnum description. - FALSE: FALSE is false. - TRUE: TRUE is true.
+ * @param "Uint64Value" (optional.String) -
+ * @param "Int32Value" (optional.Int32) -
+ * @param "Fixed64Value" (optional.String) -
+ * @param "Fixed32Value" (optional.Int64) -
+ * @param "BoolValue" (optional.Bool) -
+ * @param "StringValue" (optional.String) -
+ * @param "BytesValue" (optional.String) -
+ * @param "Uint32Value" (optional.Int64) -
+ * @param "EnumValue" (optional.String) - - ZERO: ZERO means 0 - ONE: ONE means 1
+ * @param "PathEnumValue" (optional.String) -
+ * @param "NestedPathEnumValue" (optional.String) -
+ * @param "Sfixed32Value" (optional.Int32) -
+ * @param "Sfixed64Value" (optional.String) -
+ * @param "Sint32Value" (optional.Int32) -
+ * @param "Sint64Value" (optional.String) -
+ * @param "RepeatedStringValue" (optional.Interface of []string) -
+ * @param "OneofString" (optional.String) -
+ * @param "NonConventionalNameValue" (optional.String) -
+ * @param "TimestampValue" (optional.Time) -
+ * @param "RepeatedEnumValue" (optional.Interface of []string) - repeated enum value. it is comma-separated in query - ZERO: ZERO means 0 - ONE: ONE means 1
+ * @param "RepeatedEnumAnnotation" (optional.Interface of []string) - Repeated numeric enum title Repeated numeric enum description. - ZERO: ZERO means 0 - ONE: ONE means 1
+ * @param "EnumValueAnnotation" (optional.String) - Numeric enum title Numeric enum description. - ZERO: ZERO means 0 - ONE: ONE means 1
+ * @param "RepeatedStringAnnotation" (optional.Interface of []string) - Repeated string title Repeated string description.
+ * @param "NestedAnnotationName" (optional.String) - name is nested field.
+ * @param "NestedAnnotationAmount" (optional.Int64) -
+ * @param "NestedAnnotationOk" (optional.String) - DeepEnum description. - FALSE: FALSE is false. - TRUE: TRUE is true.
+ * @param "Int64OverrideType" (optional.Int64) -
+ * @param "OutputOnlyStringViaFieldBehaviorAnnotation" (optional.String) - mark a field as readonly in Open API definition
+ * @param "OptionalStringValue" (optional.String) -
+ * @param "ProductId" (optional.Interface of []string) - Test openapiv2 generation of repeated fields Only digits are allowed.
+ * @param "OptionalStringField" (optional.String) - Test openapiv2 generation of required fields with annotation and jsonschema to reproduce
+ * @param "TrailingOnly" (optional.String) - Trailing only
+ * @param "TrailingOnlyDot" (optional.String) - Trailing only dot.
+ * @param "TrailingBoth" (optional.String) - Leading both Trailing both.
+ * @param "TrailingMultiline" (optional.String) - Leading multiline This is an example of a multi-line comment. Trailing multiline.
+
+@return interface{}
+*/
+
+type ABitOfEverythingServiceGetQueryOpts struct {
+ SingleNestedName optional.String
+ SingleNestedAmount optional.Int64
+ SingleNestedOk optional.String
+ Uint64Value optional.String
+ Int32Value optional.Int32
+ Fixed64Value optional.String
+ Fixed32Value optional.Int64
+ BoolValue optional.Bool
+ StringValue optional.String
+ BytesValue optional.String
+ Uint32Value optional.Int64
+ EnumValue optional.String
+ PathEnumValue optional.String
+ NestedPathEnumValue optional.String
+ Sfixed32Value optional.Int32
+ Sfixed64Value optional.String
+ Sint32Value optional.Int32
+ Sint64Value optional.String
+ RepeatedStringValue optional.Interface
+ OneofString optional.String
+ NonConventionalNameValue optional.String
+ TimestampValue optional.Time
+ RepeatedEnumValue optional.Interface
+ RepeatedEnumAnnotation optional.Interface
+ EnumValueAnnotation optional.String
+ RepeatedStringAnnotation optional.Interface
+ NestedAnnotationName optional.String
+ NestedAnnotationAmount optional.Int64
+ NestedAnnotationOk optional.String
+ Int64OverrideType optional.Int64
+ OutputOnlyStringViaFieldBehaviorAnnotation optional.String
+ OptionalStringValue optional.String
+ ProductId optional.Interface
+ OptionalStringField optional.String
+ TrailingOnly optional.String
+ TrailingOnlyDot optional.String
+ TrailingBoth optional.String
+ TrailingMultiline optional.String
+}
+
+func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceGetQuery(ctx context.Context, uuidName string, floatValue float32, doubleValue float64, int64Value string, requiredStringViaFieldBehaviorAnnotation string, requiredStringField1 string, requiredStringField2 string, requiredFieldBehaviorJsonNameCustom string, requiredFieldSchemaJsonNameCustom string, localVarOptionals *ABitOfEverythingServiceGetQueryOpts) (interface{}, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue interface{}
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/v1/example/a_bit_of_everything/query/{uuidName}"
+ localVarPath = strings.Replace(localVarPath, "{"+"uuidName"+"}", fmt.Sprintf("%v", uuidName), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ if localVarOptionals != nil && localVarOptionals.SingleNestedName.IsSet() {
+ localVarQueryParams.Add("singleNested.name", parameterToString(localVarOptionals.SingleNestedName.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.SingleNestedAmount.IsSet() {
+ localVarQueryParams.Add("singleNested.amount", parameterToString(localVarOptionals.SingleNestedAmount.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.SingleNestedOk.IsSet() {
+ localVarQueryParams.Add("singleNested.ok", parameterToString(localVarOptionals.SingleNestedOk.Value(), ""))
+ }
+ localVarQueryParams.Add("floatValue", parameterToString(floatValue, ""))
+ localVarQueryParams.Add("doubleValue", parameterToString(doubleValue, ""))
+ localVarQueryParams.Add("int64Value", parameterToString(int64Value, ""))
+ if localVarOptionals != nil && localVarOptionals.Uint64Value.IsSet() {
+ localVarQueryParams.Add("uint64Value", parameterToString(localVarOptionals.Uint64Value.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Int32Value.IsSet() {
+ localVarQueryParams.Add("int32Value", parameterToString(localVarOptionals.Int32Value.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Fixed64Value.IsSet() {
+ localVarQueryParams.Add("fixed64Value", parameterToString(localVarOptionals.Fixed64Value.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Fixed32Value.IsSet() {
+ localVarQueryParams.Add("fixed32Value", parameterToString(localVarOptionals.Fixed32Value.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.BoolValue.IsSet() {
+ localVarQueryParams.Add("boolValue", parameterToString(localVarOptionals.BoolValue.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.StringValue.IsSet() {
+ localVarQueryParams.Add("stringValue", parameterToString(localVarOptionals.StringValue.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.BytesValue.IsSet() {
+ localVarQueryParams.Add("bytesValue", parameterToString(localVarOptionals.BytesValue.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Uint32Value.IsSet() {
+ localVarQueryParams.Add("uint32Value", parameterToString(localVarOptionals.Uint32Value.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.EnumValue.IsSet() {
+ localVarQueryParams.Add("enumValue", parameterToString(localVarOptionals.EnumValue.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.PathEnumValue.IsSet() {
+ localVarQueryParams.Add("pathEnumValue", parameterToString(localVarOptionals.PathEnumValue.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.NestedPathEnumValue.IsSet() {
+ localVarQueryParams.Add("nestedPathEnumValue", parameterToString(localVarOptionals.NestedPathEnumValue.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Sfixed32Value.IsSet() {
+ localVarQueryParams.Add("sfixed32Value", parameterToString(localVarOptionals.Sfixed32Value.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Sfixed64Value.IsSet() {
+ localVarQueryParams.Add("sfixed64Value", parameterToString(localVarOptionals.Sfixed64Value.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Sint32Value.IsSet() {
+ localVarQueryParams.Add("sint32Value", parameterToString(localVarOptionals.Sint32Value.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Sint64Value.IsSet() {
+ localVarQueryParams.Add("sint64Value", parameterToString(localVarOptionals.Sint64Value.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.RepeatedStringValue.IsSet() {
+ localVarQueryParams.Add("repeatedStringValue", parameterToString(localVarOptionals.RepeatedStringValue.Value(), "multi"))
+ }
+ if localVarOptionals != nil && localVarOptionals.OneofString.IsSet() {
+ localVarQueryParams.Add("oneofString", parameterToString(localVarOptionals.OneofString.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.NonConventionalNameValue.IsSet() {
+ localVarQueryParams.Add("nonConventionalNameValue", parameterToString(localVarOptionals.NonConventionalNameValue.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.TimestampValue.IsSet() {
+ localVarQueryParams.Add("timestampValue", parameterToString(localVarOptionals.TimestampValue.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.RepeatedEnumValue.IsSet() {
+ localVarQueryParams.Add("repeatedEnumValue", parameterToString(localVarOptionals.RepeatedEnumValue.Value(), "multi"))
+ }
+ if localVarOptionals != nil && localVarOptionals.RepeatedEnumAnnotation.IsSet() {
+ localVarQueryParams.Add("repeatedEnumAnnotation", parameterToString(localVarOptionals.RepeatedEnumAnnotation.Value(), "multi"))
+ }
+ if localVarOptionals != nil && localVarOptionals.EnumValueAnnotation.IsSet() {
+ localVarQueryParams.Add("enumValueAnnotation", parameterToString(localVarOptionals.EnumValueAnnotation.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.RepeatedStringAnnotation.IsSet() {
+ localVarQueryParams.Add("repeatedStringAnnotation", parameterToString(localVarOptionals.RepeatedStringAnnotation.Value(), "multi"))
+ }
+ if localVarOptionals != nil && localVarOptionals.NestedAnnotationName.IsSet() {
+ localVarQueryParams.Add("nestedAnnotation.name", parameterToString(localVarOptionals.NestedAnnotationName.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.NestedAnnotationAmount.IsSet() {
+ localVarQueryParams.Add("nestedAnnotation.amount", parameterToString(localVarOptionals.NestedAnnotationAmount.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.NestedAnnotationOk.IsSet() {
+ localVarQueryParams.Add("nestedAnnotation.ok", parameterToString(localVarOptionals.NestedAnnotationOk.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Int64OverrideType.IsSet() {
+ localVarQueryParams.Add("int64OverrideType", parameterToString(localVarOptionals.Int64OverrideType.Value(), ""))
+ }
+ localVarQueryParams.Add("requiredStringViaFieldBehaviorAnnotation", parameterToString(requiredStringViaFieldBehaviorAnnotation, ""))
+ if localVarOptionals != nil && localVarOptionals.OutputOnlyStringViaFieldBehaviorAnnotation.IsSet() {
+ localVarQueryParams.Add("outputOnlyStringViaFieldBehaviorAnnotation", parameterToString(localVarOptionals.OutputOnlyStringViaFieldBehaviorAnnotation.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.OptionalStringValue.IsSet() {
+ localVarQueryParams.Add("optionalStringValue", parameterToString(localVarOptionals.OptionalStringValue.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.ProductId.IsSet() {
+ localVarQueryParams.Add("productId", parameterToString(localVarOptionals.ProductId.Value(), "multi"))
+ }
+ if localVarOptionals != nil && localVarOptionals.OptionalStringField.IsSet() {
+ localVarQueryParams.Add("optionalStringField", parameterToString(localVarOptionals.OptionalStringField.Value(), ""))
+ }
+ localVarQueryParams.Add("requiredStringField1", parameterToString(requiredStringField1, ""))
+ localVarQueryParams.Add("requiredStringField2", parameterToString(requiredStringField2, ""))
+ localVarQueryParams.Add("required_field_behavior_json_name_custom", parameterToString(requiredFieldBehaviorJsonNameCustom, ""))
+ localVarQueryParams.Add("required_field_schema_json_name_custom", parameterToString(requiredFieldSchemaJsonNameCustom, ""))
+ if localVarOptionals != nil && localVarOptionals.TrailingOnly.IsSet() {
+ localVarQueryParams.Add("trailingOnly", parameterToString(localVarOptionals.TrailingOnly.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.TrailingOnlyDot.IsSet() {
+ localVarQueryParams.Add("trailingOnlyDot", parameterToString(localVarOptionals.TrailingOnlyDot.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.TrailingBoth.IsSet() {
+ localVarQueryParams.Add("trailingBoth", parameterToString(localVarOptionals.TrailingBoth.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.TrailingMultiline.IsSet() {
+ localVarQueryParams.Add("trailingMultiline", parameterToString(localVarOptionals.TrailingMultiline.Value(), ""))
+ }
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json", "application/x-foo-mime"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{"application/json", "application/x-foo-mime"}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v interface{}
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 403 {
+ var v interface{}
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v string
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 418 {
+ var v ExamplepbNumericEnum
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 500 {
+ var v ExamplepbErrorResponse
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 0 {
+ var v RpcStatus
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+ABitOfEverythingServiceApiService
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param pathRepeatedFloatValue repeated values. they are comma-separated in path
+ * @param pathRepeatedDoubleValue
+ * @param pathRepeatedInt64Value
+ * @param pathRepeatedUint64Value
+ * @param pathRepeatedInt32Value
+ * @param pathRepeatedFixed64Value
+ * @param pathRepeatedFixed32Value
+ * @param pathRepeatedBoolValue
+ * @param pathRepeatedStringValue
+ * @param pathRepeatedBytesValue
+ * @param pathRepeatedUint32Value
+ * @param pathRepeatedEnumValue
+ * @param pathRepeatedSfixed32Value
+ * @param pathRepeatedSfixed64Value
+ * @param pathRepeatedSint32Value
+ * @param pathRepeatedSint64Value
+
+@return ExamplepbABitOfEverythingRepeated
+*/
+func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceGetRepeatedQuery(ctx context.Context, pathRepeatedFloatValue []float32, pathRepeatedDoubleValue []float64, pathRepeatedInt64Value []string, pathRepeatedUint64Value []string, pathRepeatedInt32Value []int32, pathRepeatedFixed64Value []string, pathRepeatedFixed32Value []int64, pathRepeatedBoolValue []bool, pathRepeatedStringValue []string, pathRepeatedBytesValue []string, pathRepeatedUint32Value []int64, pathRepeatedEnumValue []string, pathRepeatedSfixed32Value []int32, pathRepeatedSfixed64Value []string, pathRepeatedSint32Value []int32, pathRepeatedSint64Value []string) (ExamplepbABitOfEverythingRepeated, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue ExamplepbABitOfEverythingRepeated
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/v1/example/a_bit_of_everything_repeated/{pathRepeatedFloatValue}/{pathRepeatedDoubleValue}/{pathRepeatedInt64Value}/{pathRepeatedUint64Value}/{pathRepeatedInt32Value}/{pathRepeatedFixed64Value}/{pathRepeatedFixed32Value}/{pathRepeatedBoolValue}/{pathRepeatedStringValue}/{pathRepeatedBytesValue}/{pathRepeatedUint32Value}/{pathRepeatedEnumValue}/{pathRepeatedSfixed32Value}/{pathRepeatedSfixed64Value}/{pathRepeatedSint32Value}/{pathRepeatedSint64Value}"
+ localVarPath = strings.Replace(localVarPath, "{"+"pathRepeatedFloatValue"+"}", fmt.Sprintf("%v", pathRepeatedFloatValue), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"pathRepeatedDoubleValue"+"}", fmt.Sprintf("%v", pathRepeatedDoubleValue), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"pathRepeatedInt64Value"+"}", fmt.Sprintf("%v", pathRepeatedInt64Value), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"pathRepeatedUint64Value"+"}", fmt.Sprintf("%v", pathRepeatedUint64Value), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"pathRepeatedInt32Value"+"}", fmt.Sprintf("%v", pathRepeatedInt32Value), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"pathRepeatedFixed64Value"+"}", fmt.Sprintf("%v", pathRepeatedFixed64Value), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"pathRepeatedFixed32Value"+"}", fmt.Sprintf("%v", pathRepeatedFixed32Value), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"pathRepeatedBoolValue"+"}", fmt.Sprintf("%v", pathRepeatedBoolValue), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"pathRepeatedStringValue"+"}", fmt.Sprintf("%v", pathRepeatedStringValue), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"pathRepeatedBytesValue"+"}", fmt.Sprintf("%v", pathRepeatedBytesValue), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"pathRepeatedUint32Value"+"}", fmt.Sprintf("%v", pathRepeatedUint32Value), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"pathRepeatedEnumValue"+"}", fmt.Sprintf("%v", pathRepeatedEnumValue), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"pathRepeatedSfixed32Value"+"}", fmt.Sprintf("%v", pathRepeatedSfixed32Value), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"pathRepeatedSfixed64Value"+"}", fmt.Sprintf("%v", pathRepeatedSfixed64Value), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"pathRepeatedSint32Value"+"}", fmt.Sprintf("%v", pathRepeatedSint32Value), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"pathRepeatedSint64Value"+"}", fmt.Sprintf("%v", pathRepeatedSint64Value), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if len(pathRepeatedFloatValue) < 1 {
+ return localVarReturnValue, nil, reportError("pathRepeatedFloatValue must have at least 1 elements")
+ }
+ if len(pathRepeatedDoubleValue) < 1 {
+ return localVarReturnValue, nil, reportError("pathRepeatedDoubleValue must have at least 1 elements")
+ }
+ if len(pathRepeatedInt64Value) < 1 {
+ return localVarReturnValue, nil, reportError("pathRepeatedInt64Value must have at least 1 elements")
+ }
+ if len(pathRepeatedUint64Value) < 1 {
+ return localVarReturnValue, nil, reportError("pathRepeatedUint64Value must have at least 1 elements")
+ }
+ if len(pathRepeatedInt32Value) < 1 {
+ return localVarReturnValue, nil, reportError("pathRepeatedInt32Value must have at least 1 elements")
+ }
+ if len(pathRepeatedFixed64Value) < 1 {
+ return localVarReturnValue, nil, reportError("pathRepeatedFixed64Value must have at least 1 elements")
+ }
+ if len(pathRepeatedFixed32Value) < 1 {
+ return localVarReturnValue, nil, reportError("pathRepeatedFixed32Value must have at least 1 elements")
+ }
+ if len(pathRepeatedBoolValue) < 1 {
+ return localVarReturnValue, nil, reportError("pathRepeatedBoolValue must have at least 1 elements")
+ }
+ if len(pathRepeatedStringValue) < 1 {
+ return localVarReturnValue, nil, reportError("pathRepeatedStringValue must have at least 1 elements")
+ }
+ if len(pathRepeatedBytesValue) < 1 {
+ return localVarReturnValue, nil, reportError("pathRepeatedBytesValue must have at least 1 elements")
+ }
+ if len(pathRepeatedUint32Value) < 1 {
+ return localVarReturnValue, nil, reportError("pathRepeatedUint32Value must have at least 1 elements")
+ }
+ if len(pathRepeatedEnumValue) < 1 {
+ return localVarReturnValue, nil, reportError("pathRepeatedEnumValue must have at least 1 elements")
+ }
+ if len(pathRepeatedSfixed32Value) < 1 {
+ return localVarReturnValue, nil, reportError("pathRepeatedSfixed32Value must have at least 1 elements")
+ }
+ if len(pathRepeatedSfixed64Value) < 1 {
+ return localVarReturnValue, nil, reportError("pathRepeatedSfixed64Value must have at least 1 elements")
+ }
+ if len(pathRepeatedSint32Value) < 1 {
+ return localVarReturnValue, nil, reportError("pathRepeatedSint32Value must have at least 1 elements")
+ }
+ if len(pathRepeatedSint64Value) < 1 {
+ return localVarReturnValue, nil, reportError("pathRepeatedSint64Value must have at least 1 elements")
+ }
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json", "application/x-foo-mime"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{"application/json", "application/x-foo-mime"}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-API-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v ExamplepbABitOfEverythingRepeated
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 403 {
+ var v interface{}
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v string
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 418 {
+ var v ExamplepbNumericEnum
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 500 {
+ var v ExamplepbErrorResponse
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 0 {
+ var v RpcStatus
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+ABitOfEverythingServiceApiService
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param uuid
+
+@return ExamplepbABitOfEverything
+*/
+func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceLookup(ctx context.Context, uuid string) (ExamplepbABitOfEverything, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue ExamplepbABitOfEverything
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/v1/example/a_bit_of_everything/{uuid}"
+ localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", fmt.Sprintf("%v", uuid), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json", "application/x-foo-mime"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{"application/json", "application/x-foo-mime"}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-API-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v ExamplepbABitOfEverything
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 403 {
+ var v interface{}
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v string
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 418 {
+ var v ExamplepbNumericEnum
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 500 {
+ var v ExamplepbErrorResponse
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 0 {
+ var v RpcStatus
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
}
-func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceGetQuery(ctx context.Context, uuid string, floatValue float32, requiredStringViaFieldBehaviorAnnotation string, localVarOptionals *ABitOfEverythingServiceGetQueryOpts) (interface{}, *http.Response, error) {
+/*
+ABitOfEverythingServiceApiService
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param body
+
+@return interface{}
+*/
+func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceOverwriteRequestContentType(ctx context.Context, body ExamplepbBody) (interface{}, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
+ localVarHttpMethod = strings.ToUpper("Post")
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
@@ -2559,119 +4978,14 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceGetQuery(ctx
)
// create path and map variables
- localVarPath := a.client.cfg.BasePath + "/v1/example/a_bit_of_everything/query/{uuid}"
- localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", fmt.Sprintf("%v", uuid), -1)
+ localVarPath := a.client.cfg.BasePath + "/v2/example/overwriterequestcontenttype"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
- if localVarOptionals != nil && localVarOptionals.SingleNestedName.IsSet() {
- localVarQueryParams.Add("singleNested.name", parameterToString(localVarOptionals.SingleNestedName.Value(), ""))
- }
- if localVarOptionals != nil && localVarOptionals.SingleNestedAmount.IsSet() {
- localVarQueryParams.Add("singleNested.amount", parameterToString(localVarOptionals.SingleNestedAmount.Value(), ""))
- }
- if localVarOptionals != nil && localVarOptionals.SingleNestedOk.IsSet() {
- localVarQueryParams.Add("singleNested.ok", parameterToString(localVarOptionals.SingleNestedOk.Value(), ""))
- }
- localVarQueryParams.Add("floatValue", parameterToString(floatValue, ""))
- if localVarOptionals != nil && localVarOptionals.DoubleValue.IsSet() {
- localVarQueryParams.Add("doubleValue", parameterToString(localVarOptionals.DoubleValue.Value(), ""))
- }
- if localVarOptionals != nil && localVarOptionals.Int64Value.IsSet() {
- localVarQueryParams.Add("int64Value", parameterToString(localVarOptionals.Int64Value.Value(), ""))
- }
- if localVarOptionals != nil && localVarOptionals.Uint64Value.IsSet() {
- localVarQueryParams.Add("uint64Value", parameterToString(localVarOptionals.Uint64Value.Value(), ""))
- }
- if localVarOptionals != nil && localVarOptionals.Int32Value.IsSet() {
- localVarQueryParams.Add("int32Value", parameterToString(localVarOptionals.Int32Value.Value(), ""))
- }
- if localVarOptionals != nil && localVarOptionals.Fixed64Value.IsSet() {
- localVarQueryParams.Add("fixed64Value", parameterToString(localVarOptionals.Fixed64Value.Value(), ""))
- }
- if localVarOptionals != nil && localVarOptionals.Fixed32Value.IsSet() {
- localVarQueryParams.Add("fixed32Value", parameterToString(localVarOptionals.Fixed32Value.Value(), ""))
- }
- if localVarOptionals != nil && localVarOptionals.BoolValue.IsSet() {
- localVarQueryParams.Add("boolValue", parameterToString(localVarOptionals.BoolValue.Value(), ""))
- }
- if localVarOptionals != nil && localVarOptionals.StringValue.IsSet() {
- localVarQueryParams.Add("stringValue", parameterToString(localVarOptionals.StringValue.Value(), ""))
- }
- if localVarOptionals != nil && localVarOptionals.BytesValue.IsSet() {
- localVarQueryParams.Add("bytesValue", parameterToString(localVarOptionals.BytesValue.Value(), ""))
- }
- if localVarOptionals != nil && localVarOptionals.Uint32Value.IsSet() {
- localVarQueryParams.Add("uint32Value", parameterToString(localVarOptionals.Uint32Value.Value(), ""))
- }
- if localVarOptionals != nil && localVarOptionals.EnumValue.IsSet() {
- localVarQueryParams.Add("enumValue", parameterToString(localVarOptionals.EnumValue.Value(), ""))
- }
- if localVarOptionals != nil && localVarOptionals.PathEnumValue.IsSet() {
- localVarQueryParams.Add("pathEnumValue", parameterToString(localVarOptionals.PathEnumValue.Value(), ""))
- }
- if localVarOptionals != nil && localVarOptionals.NestedPathEnumValue.IsSet() {
- localVarQueryParams.Add("nestedPathEnumValue", parameterToString(localVarOptionals.NestedPathEnumValue.Value(), ""))
- }
- if localVarOptionals != nil && localVarOptionals.Sfixed32Value.IsSet() {
- localVarQueryParams.Add("sfixed32Value", parameterToString(localVarOptionals.Sfixed32Value.Value(), ""))
- }
- if localVarOptionals != nil && localVarOptionals.Sfixed64Value.IsSet() {
- localVarQueryParams.Add("sfixed64Value", parameterToString(localVarOptionals.Sfixed64Value.Value(), ""))
- }
- if localVarOptionals != nil && localVarOptionals.Sint32Value.IsSet() {
- localVarQueryParams.Add("sint32Value", parameterToString(localVarOptionals.Sint32Value.Value(), ""))
- }
- if localVarOptionals != nil && localVarOptionals.Sint64Value.IsSet() {
- localVarQueryParams.Add("sint64Value", parameterToString(localVarOptionals.Sint64Value.Value(), ""))
- }
- if localVarOptionals != nil && localVarOptionals.RepeatedStringValue.IsSet() {
- localVarQueryParams.Add("repeatedStringValue", parameterToString(localVarOptionals.RepeatedStringValue.Value(), "multi"))
- }
- if localVarOptionals != nil && localVarOptionals.OneofString.IsSet() {
- localVarQueryParams.Add("oneofString", parameterToString(localVarOptionals.OneofString.Value(), ""))
- }
- if localVarOptionals != nil && localVarOptionals.NonConventionalNameValue.IsSet() {
- localVarQueryParams.Add("nonConventionalNameValue", parameterToString(localVarOptionals.NonConventionalNameValue.Value(), ""))
- }
- if localVarOptionals != nil && localVarOptionals.TimestampValue.IsSet() {
- localVarQueryParams.Add("timestampValue", parameterToString(localVarOptionals.TimestampValue.Value(), ""))
- }
- if localVarOptionals != nil && localVarOptionals.RepeatedEnumValue.IsSet() {
- localVarQueryParams.Add("repeatedEnumValue", parameterToString(localVarOptionals.RepeatedEnumValue.Value(), "multi"))
- }
- if localVarOptionals != nil && localVarOptionals.RepeatedEnumAnnotation.IsSet() {
- localVarQueryParams.Add("repeatedEnumAnnotation", parameterToString(localVarOptionals.RepeatedEnumAnnotation.Value(), "multi"))
- }
- if localVarOptionals != nil && localVarOptionals.EnumValueAnnotation.IsSet() {
- localVarQueryParams.Add("enumValueAnnotation", parameterToString(localVarOptionals.EnumValueAnnotation.Value(), ""))
- }
- if localVarOptionals != nil && localVarOptionals.RepeatedStringAnnotation.IsSet() {
- localVarQueryParams.Add("repeatedStringAnnotation", parameterToString(localVarOptionals.RepeatedStringAnnotation.Value(), "multi"))
- }
- if localVarOptionals != nil && localVarOptionals.NestedAnnotationName.IsSet() {
- localVarQueryParams.Add("nestedAnnotation.name", parameterToString(localVarOptionals.NestedAnnotationName.Value(), ""))
- }
- if localVarOptionals != nil && localVarOptionals.NestedAnnotationAmount.IsSet() {
- localVarQueryParams.Add("nestedAnnotation.amount", parameterToString(localVarOptionals.NestedAnnotationAmount.Value(), ""))
- }
- if localVarOptionals != nil && localVarOptionals.NestedAnnotationOk.IsSet() {
- localVarQueryParams.Add("nestedAnnotation.ok", parameterToString(localVarOptionals.NestedAnnotationOk.Value(), ""))
- }
- if localVarOptionals != nil && localVarOptionals.Int64OverrideType.IsSet() {
- localVarQueryParams.Add("int64OverrideType", parameterToString(localVarOptionals.Int64OverrideType.Value(), ""))
- }
- localVarQueryParams.Add("requiredStringViaFieldBehaviorAnnotation", parameterToString(requiredStringViaFieldBehaviorAnnotation, ""))
- if localVarOptionals != nil && localVarOptionals.OutputOnlyStringViaFieldBehaviorAnnotation.IsSet() {
- localVarQueryParams.Add("outputOnlyStringViaFieldBehaviorAnnotation", parameterToString(localVarOptionals.OutputOnlyStringViaFieldBehaviorAnnotation.Value(), ""))
- }
- if localVarOptionals != nil && localVarOptionals.OptionalStringValue.IsSet() {
- localVarQueryParams.Add("optionalStringValue", parameterToString(localVarOptionals.OptionalStringValue.Value(), ""))
- }
// to determine the Content-Type header
- localVarHttpContentTypes := []string{"application/json", "application/x-foo-mime"}
+ localVarHttpContentTypes := []string{"application/x-bar-mime"}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
@@ -2687,6 +5001,21 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceGetQuery(ctx
if localVarHttpHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
}
+ // body params
+ localVarPostBody = &body
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-API-Key"] = key
+
+ }
+ }
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
if err != nil {
return localVarReturnValue, nil, err
@@ -2792,104 +5121,24 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceGetQuery(ctx
/*
ABitOfEverythingServiceApiService
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param pathRepeatedFloatValue repeated values. they are comma-separated in path
- * @param pathRepeatedDoubleValue
- * @param pathRepeatedInt64Value
- * @param pathRepeatedUint64Value
- * @param pathRepeatedInt32Value
- * @param pathRepeatedFixed64Value
- * @param pathRepeatedFixed32Value
- * @param pathRepeatedBoolValue
- * @param pathRepeatedStringValue
- * @param pathRepeatedBytesValue
- * @param pathRepeatedUint32Value
- * @param pathRepeatedEnumValue
- * @param pathRepeatedSfixed32Value
- * @param pathRepeatedSfixed64Value
- * @param pathRepeatedSint32Value
- * @param pathRepeatedSint64Value
-@return ExamplepbABitOfEverythingRepeated
+@return string
*/
-func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceGetRepeatedQuery(ctx context.Context, pathRepeatedFloatValue []float32, pathRepeatedDoubleValue []float64, pathRepeatedInt64Value []string, pathRepeatedUint64Value []string, pathRepeatedInt32Value []int32, pathRepeatedFixed64Value []string, pathRepeatedFixed32Value []int64, pathRepeatedBoolValue []bool, pathRepeatedStringValue []string, pathRepeatedBytesValue []string, pathRepeatedUint32Value []int64, pathRepeatedEnumValue []string, pathRepeatedSfixed32Value []int32, pathRepeatedSfixed64Value []string, pathRepeatedSint32Value []int32, pathRepeatedSint64Value []string) (ExamplepbABitOfEverythingRepeated, *http.Response, error) {
+func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceOverwriteResponseContentType(ctx context.Context) (string, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Get")
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
- localVarReturnValue ExamplepbABitOfEverythingRepeated
+ localVarReturnValue string
)
// create path and map variables
- localVarPath := a.client.cfg.BasePath + "/v1/example/a_bit_of_everything_repeated/{pathRepeatedFloatValue}/{pathRepeatedDoubleValue}/{pathRepeatedInt64Value}/{pathRepeatedUint64Value}/{pathRepeatedInt32Value}/{pathRepeatedFixed64Value}/{pathRepeatedFixed32Value}/{pathRepeatedBoolValue}/{pathRepeatedStringValue}/{pathRepeatedBytesValue}/{pathRepeatedUint32Value}/{pathRepeatedEnumValue}/{pathRepeatedSfixed32Value}/{pathRepeatedSfixed64Value}/{pathRepeatedSint32Value}/{pathRepeatedSint64Value}"
- localVarPath = strings.Replace(localVarPath, "{"+"pathRepeatedFloatValue"+"}", fmt.Sprintf("%v", pathRepeatedFloatValue), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"pathRepeatedDoubleValue"+"}", fmt.Sprintf("%v", pathRepeatedDoubleValue), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"pathRepeatedInt64Value"+"}", fmt.Sprintf("%v", pathRepeatedInt64Value), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"pathRepeatedUint64Value"+"}", fmt.Sprintf("%v", pathRepeatedUint64Value), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"pathRepeatedInt32Value"+"}", fmt.Sprintf("%v", pathRepeatedInt32Value), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"pathRepeatedFixed64Value"+"}", fmt.Sprintf("%v", pathRepeatedFixed64Value), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"pathRepeatedFixed32Value"+"}", fmt.Sprintf("%v", pathRepeatedFixed32Value), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"pathRepeatedBoolValue"+"}", fmt.Sprintf("%v", pathRepeatedBoolValue), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"pathRepeatedStringValue"+"}", fmt.Sprintf("%v", pathRepeatedStringValue), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"pathRepeatedBytesValue"+"}", fmt.Sprintf("%v", pathRepeatedBytesValue), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"pathRepeatedUint32Value"+"}", fmt.Sprintf("%v", pathRepeatedUint32Value), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"pathRepeatedEnumValue"+"}", fmt.Sprintf("%v", pathRepeatedEnumValue), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"pathRepeatedSfixed32Value"+"}", fmt.Sprintf("%v", pathRepeatedSfixed32Value), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"pathRepeatedSfixed64Value"+"}", fmt.Sprintf("%v", pathRepeatedSfixed64Value), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"pathRepeatedSint32Value"+"}", fmt.Sprintf("%v", pathRepeatedSint32Value), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"pathRepeatedSint64Value"+"}", fmt.Sprintf("%v", pathRepeatedSint64Value), -1)
+ localVarPath := a.client.cfg.BasePath + "/v2/example/overwriteresponsecontenttype"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
- if len(pathRepeatedFloatValue) < 1 {
- return localVarReturnValue, nil, reportError("pathRepeatedFloatValue must have at least 1 elements")
- }
- if len(pathRepeatedDoubleValue) < 1 {
- return localVarReturnValue, nil, reportError("pathRepeatedDoubleValue must have at least 1 elements")
- }
- if len(pathRepeatedInt64Value) < 1 {
- return localVarReturnValue, nil, reportError("pathRepeatedInt64Value must have at least 1 elements")
- }
- if len(pathRepeatedUint64Value) < 1 {
- return localVarReturnValue, nil, reportError("pathRepeatedUint64Value must have at least 1 elements")
- }
- if len(pathRepeatedInt32Value) < 1 {
- return localVarReturnValue, nil, reportError("pathRepeatedInt32Value must have at least 1 elements")
- }
- if len(pathRepeatedFixed64Value) < 1 {
- return localVarReturnValue, nil, reportError("pathRepeatedFixed64Value must have at least 1 elements")
- }
- if len(pathRepeatedFixed32Value) < 1 {
- return localVarReturnValue, nil, reportError("pathRepeatedFixed32Value must have at least 1 elements")
- }
- if len(pathRepeatedBoolValue) < 1 {
- return localVarReturnValue, nil, reportError("pathRepeatedBoolValue must have at least 1 elements")
- }
- if len(pathRepeatedStringValue) < 1 {
- return localVarReturnValue, nil, reportError("pathRepeatedStringValue must have at least 1 elements")
- }
- if len(pathRepeatedBytesValue) < 1 {
- return localVarReturnValue, nil, reportError("pathRepeatedBytesValue must have at least 1 elements")
- }
- if len(pathRepeatedUint32Value) < 1 {
- return localVarReturnValue, nil, reportError("pathRepeatedUint32Value must have at least 1 elements")
- }
- if len(pathRepeatedEnumValue) < 1 {
- return localVarReturnValue, nil, reportError("pathRepeatedEnumValue must have at least 1 elements")
- }
- if len(pathRepeatedSfixed32Value) < 1 {
- return localVarReturnValue, nil, reportError("pathRepeatedSfixed32Value must have at least 1 elements")
- }
- if len(pathRepeatedSfixed64Value) < 1 {
- return localVarReturnValue, nil, reportError("pathRepeatedSfixed64Value must have at least 1 elements")
- }
- if len(pathRepeatedSint32Value) < 1 {
- return localVarReturnValue, nil, reportError("pathRepeatedSint32Value must have at least 1 elements")
- }
- if len(pathRepeatedSint64Value) < 1 {
- return localVarReturnValue, nil, reportError("pathRepeatedSint64Value must have at least 1 elements")
- }
// to determine the Content-Type header
localVarHttpContentTypes := []string{"application/json", "application/x-foo-mime"}
@@ -2901,7 +5150,7 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceGetRepeatedQu
}
// to determine the Accept header
- localVarHttpHeaderAccepts := []string{"application/json", "application/x-foo-mime"}
+ localVarHttpHeaderAccepts := []string{"application/text"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@@ -2952,7 +5201,7 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceGetRepeatedQu
}
if localVarHttpResponse.StatusCode == 200 {
- var v ExamplepbABitOfEverythingRepeated
+ var v string
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
@@ -3026,22 +5275,21 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceGetRepeatedQu
/*
ABitOfEverythingServiceApiService
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param uuid
+ * @param exampleEnum
-@return ExamplepbABitOfEverything
+@return interface{}
*/
-func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceLookup(ctx context.Context, uuid string) (ExamplepbABitOfEverything, *http.Response, error) {
+func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServicePostOneofEnum(ctx context.Context, exampleEnum OneofenumExampleEnum) (interface{}, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
+ localVarHttpMethod = strings.ToUpper("Post")
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
- localVarReturnValue ExamplepbABitOfEverything
+ localVarReturnValue interface{}
)
// create path and map variables
- localVarPath := a.client.cfg.BasePath + "/v1/example/a_bit_of_everything/{uuid}"
- localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", fmt.Sprintf("%v", uuid), -1)
+ localVarPath := a.client.cfg.BasePath + "/v1/example/oneofenum"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
@@ -3064,6 +5312,8 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceLookup(ctx co
if localVarHttpHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
}
+ // body params
+ localVarPostBody = &exampleEnum
if ctx != nil {
// API Key Authentication
if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
@@ -3108,7 +5358,7 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceLookup(ctx co
}
if localVarHttpResponse.StatusCode == 200 {
- var v ExamplepbABitOfEverything
+ var v interface{}
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
@@ -3182,20 +5432,21 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceLookup(ctx co
/*
ABitOfEverythingServiceApiService
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param body
-@return string
+@return interface{}
*/
-func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceOverwriteResponseContentType(ctx context.Context) (string, *http.Response, error) {
+func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServicePostRequiredMessageType(ctx context.Context, body ExamplepbRequiredMessageTypeRequest) (interface{}, *http.Response, error) {
var (
- localVarHttpMethod = strings.ToUpper("Get")
+ localVarHttpMethod = strings.ToUpper("Post")
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
- localVarReturnValue string
+ localVarReturnValue interface{}
)
// create path and map variables
- localVarPath := a.client.cfg.BasePath + "/v2/example/overwriteresponsecontenttype"
+ localVarPath := a.client.cfg.BasePath + "/v1/example/requiredmessagetype"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
@@ -3211,13 +5462,15 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceOverwriteResp
}
// to determine the Accept header
- localVarHttpHeaderAccepts := []string{"application/text"}
+ localVarHttpHeaderAccepts := []string{"application/json", "application/x-foo-mime"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
if localVarHttpHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
}
+ // body params
+ localVarPostBody = &body
if ctx != nil {
// API Key Authentication
if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
@@ -3262,7 +5515,7 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceOverwriteResp
}
if localVarHttpResponse.StatusCode == 200 {
- var v string
+ var v interface{}
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
@@ -3649,12 +5902,12 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceTimeout(ctx c
/*
ABitOfEverythingServiceApiService
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param uuid
+ * @param uuidName
* @param body
@return interface{}
*/
-func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceUpdate(ctx context.Context, uuid string, body ABitOfEverything) (interface{}, *http.Response, error) {
+func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceUpdate(ctx context.Context, uuidName string, body ABitOfEverything) (interface{}, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Put")
localVarPostBody interface{}
@@ -3664,8 +5917,8 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceUpdate(ctx co
)
// create path and map variables
- localVarPath := a.client.cfg.BasePath + "/v1/example/a_bit_of_everything/{uuid}"
- localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", fmt.Sprintf("%v", uuid), -1)
+ localVarPath := a.client.cfg.BasePath + "/v1/example/a_bit_of_everything/{uuidName}"
+ localVarPath = strings.Replace(localVarPath, "{"+"uuidName"+"}", fmt.Sprintf("%v", uuidName), -1)
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
@@ -3809,7 +6062,7 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceUpdate(ctx co
ABitOfEverythingServiceApiService
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param bookName The resource name of the book. Format: `publishers/{publisher}/books/{book}` Example: `publishers/1257894000000000000/books/my-book`
- * @param body The book to update. The book's `name` field is used to identify the book to be updated. Format: publishers/{publisher}/books/{book}
+ * @param book The book to update. The book's `name` field is used to identify the book to be updated. Format: publishers/{publisher}/books/{book}
* @param optional nil or *ABitOfEverythingServiceUpdateBookOpts - Optional Parameters:
* @param "UpdateMask" (optional.String) - The list of fields to be updated.
* @param "AllowMissing" (optional.Bool) - If set to true, and the book is not found, a new book will be created. In this situation, `update_mask` is ignored.
@@ -3822,7 +6075,7 @@ type ABitOfEverythingServiceUpdateBookOpts struct {
AllowMissing optional.Bool
}
-func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceUpdateBook(ctx context.Context, bookName string, body ExamplepbBook, localVarOptionals *ABitOfEverythingServiceUpdateBookOpts) (ExamplepbBook, *http.Response, error) {
+func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceUpdateBook(ctx context.Context, bookName string, book TheBookToUpdate_, localVarOptionals *ABitOfEverythingServiceUpdateBookOpts) (ExamplepbBook, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Patch")
localVarPostBody interface{}
@@ -3832,7 +6085,7 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceUpdateBook(ct
)
// create path and map variables
- localVarPath := a.client.cfg.BasePath + "/v1/{book.name=publishers/*/books/*}"
+ localVarPath := a.client.cfg.BasePath + "/v1/{book.name}"
localVarPath = strings.Replace(localVarPath, "{"+"book.name"+"}", fmt.Sprintf("%v", bookName), -1)
localVarHeaderParams := make(map[string]string)
@@ -3863,7 +6116,7 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceUpdateBook(ct
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
}
// body params
- localVarPostBody = &body
+ localVarPostBody = &book
if ctx != nil {
// API Key Authentication
if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
@@ -3982,8 +6235,8 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceUpdateBook(ct
/*
ABitOfEverythingServiceApiService
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param abeUuid
- * @param body
+ * @param uuidName
+ * @param abe A bit of everything Intentionally complicated message type to cover many features of Protobuf.
* @param optional nil or *ABitOfEverythingServiceUpdateV2Opts - Optional Parameters:
* @param "UpdateMask" (optional.String) - The paths to update.
@@ -3994,7 +6247,7 @@ type ABitOfEverythingServiceUpdateV2Opts struct {
UpdateMask optional.String
}
-func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceUpdateV2(ctx context.Context, abeUuid string, body ExamplepbABitOfEverything, localVarOptionals *ABitOfEverythingServiceUpdateV2Opts) (interface{}, *http.Response, error) {
+func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceUpdateV2(ctx context.Context, uuidName string, abe ABitOfEverything2, localVarOptionals *ABitOfEverythingServiceUpdateV2Opts) (interface{}, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Put")
localVarPostBody interface{}
@@ -4004,8 +6257,8 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceUpdateV2(ctx
)
// create path and map variables
- localVarPath := a.client.cfg.BasePath + "/v2/example/a_bit_of_everything/{abe.uuid}"
- localVarPath = strings.Replace(localVarPath, "{"+"abe.uuid"+"}", fmt.Sprintf("%v", abeUuid), -1)
+ localVarPath := a.client.cfg.BasePath + "/v2/example/a_bit_of_everything/{uuidName}"
+ localVarPath = strings.Replace(localVarPath, "{"+"uuidName"+"}", fmt.Sprintf("%v", uuidName), -1)
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
@@ -4032,7 +6285,7 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceUpdateV2(ctx
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
}
// body params
- localVarPostBody = &body
+ localVarPostBody = &abe
if ctx != nil {
// API Key Authentication
if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
@@ -4151,8 +6404,8 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceUpdateV2(ctx
/*
ABitOfEverythingServiceApiService
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param abeUuid
- * @param body
+ * @param uuidName
+ * @param abe A bit of everything Intentionally complicated message type to cover many features of Protobuf.
* @param optional nil or *ABitOfEverythingServiceUpdateV22Opts - Optional Parameters:
* @param "UpdateMask" (optional.String) - The paths to update.
@@ -4163,7 +6416,7 @@ type ABitOfEverythingServiceUpdateV22Opts struct {
UpdateMask optional.String
}
-func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceUpdateV22(ctx context.Context, abeUuid string, body ExamplepbABitOfEverything, localVarOptionals *ABitOfEverythingServiceUpdateV22Opts) (interface{}, *http.Response, error) {
+func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceUpdateV22(ctx context.Context, uuidName string, abe ABitOfEverything3, localVarOptionals *ABitOfEverythingServiceUpdateV22Opts) (interface{}, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Patch")
localVarPostBody interface{}
@@ -4173,8 +6426,8 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceUpdateV22(ctx
)
// create path and map variables
- localVarPath := a.client.cfg.BasePath + "/v2/example/a_bit_of_everything/{abe.uuid}"
- localVarPath = strings.Replace(localVarPath, "{"+"abe.uuid"+"}", fmt.Sprintf("%v", abeUuid), -1)
+ localVarPath := a.client.cfg.BasePath + "/v2/example/a_bit_of_everything/{uuidName}"
+ localVarPath = strings.Replace(localVarPath, "{"+"uuidName"+"}", fmt.Sprintf("%v", uuidName), -1)
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
@@ -4201,7 +6454,7 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceUpdateV22(ctx
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
}
// body params
- localVarPostBody = &body
+ localVarPostBody = &abe
if ctx != nil {
// API Key Authentication
if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
@@ -4320,12 +6573,12 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceUpdateV22(ctx
/*
ABitOfEverythingServiceApiService
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param abeUuid
+ * @param uuidName
* @param body
@return interface{}
*/
-func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceUpdateV23(ctx context.Context, abeUuid string, body ExamplepbUpdateV2Request) (interface{}, *http.Response, error) {
+func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceUpdateV23(ctx context.Context, uuidName string, body UpdateV2RequestRequestForUpdateIncludesTheMessageAndTheUpdateMask) (interface{}, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Patch")
localVarPostBody interface{}
@@ -4335,8 +6588,8 @@ func (a *ABitOfEverythingServiceApiService) ABitOfEverythingServiceUpdateV23(ctx
)
// create path and map variables
- localVarPath := a.client.cfg.BasePath + "/v2a/example/a_bit_of_everything/{abe.uuid}"
- localVarPath = strings.Replace(localVarPath, "{"+"abe.uuid"+"}", fmt.Sprintf("%v", abeUuid), -1)
+ localVarPath := a.client.cfg.BasePath + "/v2a/example/a_bit_of_everything/{uuidName}"
+ localVarPath = strings.Replace(localVarPath, "{"+"uuidName"+"}", fmt.Sprintf("%v", uuidName), -1)
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
diff --git a/examples/internal/clients/abe/api_echo_rpc.go b/examples/internal/clients/abe/api_echo_rpc.go
index f79c8a61b37..1578fbff89b 100644
--- a/examples/internal/clients/abe/api_echo_rpc.go
+++ b/examples/internal/clients/abe/api_echo_rpc.go
@@ -199,11 +199,11 @@ func (a *EchoRpcApiService) ABitOfEverythingServiceEcho(ctx context.Context, val
EchoRpcApiService Summary: Echo rpc
Description Echo
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param body
+ * @param value
@return SubStringMessage
*/
-func (a *EchoRpcApiService) ABitOfEverythingServiceEcho2(ctx context.Context, body string) (SubStringMessage, *http.Response, error) {
+func (a *EchoRpcApiService) ABitOfEverythingServiceEcho2(ctx context.Context, value string) (SubStringMessage, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Post")
localVarPostBody interface{}
@@ -237,7 +237,7 @@ func (a *EchoRpcApiService) ABitOfEverythingServiceEcho2(ctx context.Context, bo
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
}
// body params
- localVarPostBody = &body
+ localVarPostBody = &value
if ctx != nil {
// API Key Authentication
if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
diff --git a/examples/internal/clients/abe/api_snake_enum_service.go b/examples/internal/clients/abe/api_snake_enum_service.go
new file mode 100644
index 00000000000..0c28d4ab4f4
--- /dev/null
+++ b/examples/internal/clients/abe/api_snake_enum_service.go
@@ -0,0 +1,187 @@
+/*
+ * A Bit of Everything
+ *
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * API version: 1.0
+ * Contact: none@example.com
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package abe
+
+import (
+ "context"
+ "io/ioutil"
+ "net/http"
+ "net/url"
+ "strings"
+ "fmt"
+)
+
+// Linger please
+var (
+ _ context.Context
+)
+
+type SnakeEnumServiceApiService service
+
+/*
+SnakeEnumServiceApiService
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param who
+ * @param what
+ * @param where
+
+@return ExamplepbSnakeEnumResponse
+*/
+func (a *SnakeEnumServiceApiService) SnakeEnumServiceSnakeEnum(ctx context.Context, who string, what string, where string) (ExamplepbSnakeEnumResponse, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue ExamplepbSnakeEnumResponse
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/v1/example/snake/{who}/{what}/{where}"
+ localVarPath = strings.Replace(localVarPath, "{"+"who"+"}", fmt.Sprintf("%v", who), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"what"+"}", fmt.Sprintf("%v", what), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"where"+"}", fmt.Sprintf("%v", where), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json", "application/x-foo-mime"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{"application/json", "application/x-foo-mime"}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-API-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v ExamplepbSnakeEnumResponse
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 403 {
+ var v interface{}
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v string
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 418 {
+ var v ExamplepbNumericEnum
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 500 {
+ var v ExamplepbErrorResponse
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 0 {
+ var v RpcStatus
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
diff --git a/examples/internal/clients/abe/client.go b/examples/internal/clients/abe/client.go
index 1bf9497bd2d..8552ff007bc 100644
--- a/examples/internal/clients/abe/client.go
+++ b/examples/internal/clients/abe/client.go
@@ -51,6 +51,8 @@ type APIClient struct {
CamelCaseServiceNameApi *CamelCaseServiceNameApiService
EchoRpcApi *EchoRpcApiService
+
+ SnakeEnumServiceApi *SnakeEnumServiceApiService
}
type service struct {
@@ -72,6 +74,7 @@ func NewAPIClient(cfg *Configuration) *APIClient {
c.ABitOfEverythingServiceApi = (*ABitOfEverythingServiceApiService)(&c.common)
c.CamelCaseServiceNameApi = (*CamelCaseServiceNameApiService)(&c.common)
c.EchoRpcApi = (*EchoRpcApiService)(&c.common)
+ c.SnakeEnumServiceApi = (*SnakeEnumServiceApiService)(&c.common)
return c
}
diff --git a/examples/internal/clients/abe/model_a_bit_of_everything.go b/examples/internal/clients/abe/model_a_bit_of_everything.go
index 1f9f5392a48..25a28dc37d9 100644
--- a/examples/internal/clients/abe/model_a_bit_of_everything.go
+++ b/examples/internal/clients/abe/model_a_bit_of_everything.go
@@ -14,7 +14,7 @@ import (
"time"
)
-// Intentionaly complicated message type to cover many features of Protobuf.
+// Intentionally complicated message type to cover many features of Protobuf.
type ABitOfEverything struct {
SingleNested *ABitOfEverythingNested `json:"singleNested,omitempty"`
Nested []ABitOfEverythingNested `json:"nested,omitempty"`
@@ -60,4 +60,18 @@ type ABitOfEverything struct {
RequiredStringViaFieldBehaviorAnnotation string `json:"requiredStringViaFieldBehaviorAnnotation"`
OutputOnlyStringViaFieldBehaviorAnnotation string `json:"outputOnlyStringViaFieldBehaviorAnnotation,omitempty"`
OptionalStringValue string `json:"optionalStringValue,omitempty"`
+ // Only digits are allowed.
+ ProductId []string `json:"productId,omitempty"`
+ OptionalStringField string `json:"optionalStringField,omitempty"`
+ RequiredStringField1 string `json:"requiredStringField1"`
+ RequiredStringField2 string `json:"requiredStringField2"`
+ RequiredFieldBehaviorJsonNameCustom string `json:"required_field_behavior_json_name_custom"`
+ RequiredFieldSchemaJsonNameCustom string `json:"required_field_schema_json_name_custom"`
+ TrailingOnly string `json:"trailingOnly,omitempty"`
+ // Trailing only dot.
+ TrailingOnlyDot string `json:"trailingOnlyDot,omitempty"`
+ // Trailing both.
+ TrailingBoth string `json:"trailingBoth,omitempty"`
+ // This is an example of a multi-line comment. Trailing multiline.
+ TrailingMultiline string `json:"trailingMultiline,omitempty"`
}
diff --git a/examples/internal/clients/abe/model_a_bit_of_everything_1.go b/examples/internal/clients/abe/model_a_bit_of_everything_1.go
new file mode 100644
index 00000000000..75a9ea1ee48
--- /dev/null
+++ b/examples/internal/clients/abe/model_a_bit_of_everything_1.go
@@ -0,0 +1,78 @@
+/*
+ * A Bit of Everything
+ *
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * API version: 1.0
+ * Contact: none@example.com
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package abe
+
+import (
+ "time"
+)
+
+// Intentionally complicated message type to cover many features of Protobuf.
+type ABitOfEverything1 struct {
+ SingleNested *V1exampledeepPathsingleNestedNameSingleNested `json:"singleNested,omitempty"`
+ Uuid string `json:"uuid"`
+ Nested []ABitOfEverythingNested `json:"nested,omitempty"`
+ // Float value field
+ FloatValue float32 `json:"floatValue"`
+ DoubleValue float64 `json:"doubleValue"`
+ Int64Value string `json:"int64Value"`
+ Uint64Value string `json:"uint64Value,omitempty"`
+ Int32Value int32 `json:"int32Value,omitempty"`
+ Fixed64Value string `json:"fixed64Value,omitempty"`
+ Fixed32Value int64 `json:"fixed32Value,omitempty"`
+ BoolValue bool `json:"boolValue,omitempty"`
+ StringValue string `json:"stringValue,omitempty"`
+ BytesValue string `json:"bytesValue,omitempty"`
+ Uint32Value int64 `json:"uint32Value,omitempty"`
+ EnumValue *ExamplepbNumericEnum `json:"enumValue,omitempty"`
+ PathEnumValue *PathenumPathEnum `json:"pathEnumValue,omitempty"`
+ NestedPathEnumValue *MessagePathEnumNestedPathEnum `json:"nestedPathEnumValue,omitempty"`
+ Sfixed32Value int32 `json:"sfixed32Value,omitempty"`
+ Sfixed64Value string `json:"sfixed64Value,omitempty"`
+ Sint32Value int32 `json:"sint32Value,omitempty"`
+ Sint64Value string `json:"sint64Value,omitempty"`
+ RepeatedStringValue []string `json:"repeatedStringValue,omitempty"`
+ OneofEmpty *interface{} `json:"oneofEmpty,omitempty"`
+ OneofString string `json:"oneofString,omitempty"`
+ MapValue map[string]ExamplepbNumericEnum `json:"mapValue,omitempty"`
+ MappedStringValue map[string]string `json:"mappedStringValue,omitempty"`
+ MappedNestedValue map[string]ABitOfEverythingNested `json:"mappedNestedValue,omitempty"`
+ NonConventionalNameValue string `json:"nonConventionalNameValue,omitempty"`
+ TimestampValue time.Time `json:"timestampValue,omitempty"`
+ RepeatedEnumValue []ExamplepbNumericEnum `json:"repeatedEnumValue,omitempty"`
+ // Repeated numeric enum description.
+ RepeatedEnumAnnotation []ExamplepbNumericEnum `json:"repeatedEnumAnnotation,omitempty"`
+ // Numeric enum description.
+ EnumValueAnnotation *ExamplepbNumericEnum `json:"enumValueAnnotation,omitempty"`
+ // Repeated string description.
+ RepeatedStringAnnotation []string `json:"repeatedStringAnnotation,omitempty"`
+ // Repeated nested object description.
+ RepeatedNestedAnnotation []ABitOfEverythingNested `json:"repeatedNestedAnnotation,omitempty"`
+ // Nested object description.
+ NestedAnnotation *ABitOfEverythingNested `json:"nestedAnnotation,omitempty"`
+ Int64OverrideType int64 `json:"int64OverrideType,omitempty"`
+ RequiredStringViaFieldBehaviorAnnotation string `json:"requiredStringViaFieldBehaviorAnnotation"`
+ OutputOnlyStringViaFieldBehaviorAnnotation string `json:"outputOnlyStringViaFieldBehaviorAnnotation,omitempty"`
+ OptionalStringValue string `json:"optionalStringValue,omitempty"`
+ // Only digits are allowed.
+ ProductId []string `json:"productId,omitempty"`
+ OptionalStringField string `json:"optionalStringField,omitempty"`
+ RequiredStringField1 string `json:"requiredStringField1"`
+ RequiredStringField2 string `json:"requiredStringField2"`
+ RequiredFieldBehaviorJsonNameCustom string `json:"required_field_behavior_json_name_custom"`
+ RequiredFieldSchemaJsonNameCustom string `json:"required_field_schema_json_name_custom"`
+ TrailingOnly string `json:"trailingOnly,omitempty"`
+ // Trailing only dot.
+ TrailingOnlyDot string `json:"trailingOnlyDot,omitempty"`
+ // Trailing both.
+ TrailingBoth string `json:"trailingBoth,omitempty"`
+ // This is an example of a multi-line comment. Trailing multiline.
+ TrailingMultiline string `json:"trailingMultiline,omitempty"`
+}
diff --git a/examples/internal/clients/abe/model_a_bit_of_everything_2.go b/examples/internal/clients/abe/model_a_bit_of_everything_2.go
new file mode 100644
index 00000000000..28c009de5ca
--- /dev/null
+++ b/examples/internal/clients/abe/model_a_bit_of_everything_2.go
@@ -0,0 +1,77 @@
+/*
+ * A Bit of Everything
+ *
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * API version: 1.0
+ * Contact: none@example.com
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package abe
+
+import (
+ "time"
+)
+
+// Intentionally complicated message type to cover many features of Protobuf.
+type ABitOfEverything2 struct {
+ SingleNested *ABitOfEverythingNested `json:"singleNested,omitempty"`
+ Nested []ABitOfEverythingNested `json:"nested,omitempty"`
+ // Float value field
+ FloatValue float32 `json:"floatValue"`
+ DoubleValue float64 `json:"doubleValue"`
+ Int64Value string `json:"int64Value"`
+ Uint64Value string `json:"uint64Value,omitempty"`
+ Int32Value int32 `json:"int32Value,omitempty"`
+ Fixed64Value string `json:"fixed64Value,omitempty"`
+ Fixed32Value int64 `json:"fixed32Value,omitempty"`
+ BoolValue bool `json:"boolValue,omitempty"`
+ StringValue string `json:"stringValue,omitempty"`
+ BytesValue string `json:"bytesValue,omitempty"`
+ Uint32Value int64 `json:"uint32Value,omitempty"`
+ EnumValue *ExamplepbNumericEnum `json:"enumValue,omitempty"`
+ PathEnumValue *PathenumPathEnum `json:"pathEnumValue,omitempty"`
+ NestedPathEnumValue *MessagePathEnumNestedPathEnum `json:"nestedPathEnumValue,omitempty"`
+ Sfixed32Value int32 `json:"sfixed32Value,omitempty"`
+ Sfixed64Value string `json:"sfixed64Value,omitempty"`
+ Sint32Value int32 `json:"sint32Value,omitempty"`
+ Sint64Value string `json:"sint64Value,omitempty"`
+ RepeatedStringValue []string `json:"repeatedStringValue,omitempty"`
+ OneofEmpty *interface{} `json:"oneofEmpty,omitempty"`
+ OneofString string `json:"oneofString,omitempty"`
+ MapValue map[string]ExamplepbNumericEnum `json:"mapValue,omitempty"`
+ MappedStringValue map[string]string `json:"mappedStringValue,omitempty"`
+ MappedNestedValue map[string]ABitOfEverythingNested `json:"mappedNestedValue,omitempty"`
+ NonConventionalNameValue string `json:"nonConventionalNameValue,omitempty"`
+ TimestampValue time.Time `json:"timestampValue,omitempty"`
+ RepeatedEnumValue []ExamplepbNumericEnum `json:"repeatedEnumValue,omitempty"`
+ // Repeated numeric enum description.
+ RepeatedEnumAnnotation []ExamplepbNumericEnum `json:"repeatedEnumAnnotation,omitempty"`
+ // Numeric enum description.
+ EnumValueAnnotation *ExamplepbNumericEnum `json:"enumValueAnnotation,omitempty"`
+ // Repeated string description.
+ RepeatedStringAnnotation []string `json:"repeatedStringAnnotation,omitempty"`
+ // Repeated nested object description.
+ RepeatedNestedAnnotation []ABitOfEverythingNested `json:"repeatedNestedAnnotation,omitempty"`
+ // Nested object description.
+ NestedAnnotation *ABitOfEverythingNested `json:"nestedAnnotation,omitempty"`
+ Int64OverrideType int64 `json:"int64OverrideType,omitempty"`
+ RequiredStringViaFieldBehaviorAnnotation string `json:"requiredStringViaFieldBehaviorAnnotation"`
+ OutputOnlyStringViaFieldBehaviorAnnotation string `json:"outputOnlyStringViaFieldBehaviorAnnotation,omitempty"`
+ OptionalStringValue string `json:"optionalStringValue,omitempty"`
+ // Only digits are allowed.
+ ProductId []string `json:"productId,omitempty"`
+ OptionalStringField string `json:"optionalStringField,omitempty"`
+ RequiredStringField1 string `json:"requiredStringField1"`
+ RequiredStringField2 string `json:"requiredStringField2"`
+ RequiredFieldBehaviorJsonNameCustom string `json:"required_field_behavior_json_name_custom"`
+ RequiredFieldSchemaJsonNameCustom string `json:"required_field_schema_json_name_custom"`
+ TrailingOnly string `json:"trailingOnly,omitempty"`
+ // Trailing only dot.
+ TrailingOnlyDot string `json:"trailingOnlyDot,omitempty"`
+ // Trailing both.
+ TrailingBoth string `json:"trailingBoth,omitempty"`
+ // This is an example of a multi-line comment. Trailing multiline.
+ TrailingMultiline string `json:"trailingMultiline,omitempty"`
+}
diff --git a/examples/internal/clients/abe/model_a_bit_of_everything_3.go b/examples/internal/clients/abe/model_a_bit_of_everything_3.go
new file mode 100644
index 00000000000..464e7f875c2
--- /dev/null
+++ b/examples/internal/clients/abe/model_a_bit_of_everything_3.go
@@ -0,0 +1,77 @@
+/*
+ * A Bit of Everything
+ *
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * API version: 1.0
+ * Contact: none@example.com
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package abe
+
+import (
+ "time"
+)
+
+// Intentionally complicated message type to cover many features of Protobuf.
+type ABitOfEverything3 struct {
+ SingleNested *ABitOfEverythingNested `json:"singleNested,omitempty"`
+ Nested []ABitOfEverythingNested `json:"nested,omitempty"`
+ // Float value field
+ FloatValue float32 `json:"floatValue"`
+ DoubleValue float64 `json:"doubleValue"`
+ Int64Value string `json:"int64Value"`
+ Uint64Value string `json:"uint64Value,omitempty"`
+ Int32Value int32 `json:"int32Value,omitempty"`
+ Fixed64Value string `json:"fixed64Value,omitempty"`
+ Fixed32Value int64 `json:"fixed32Value,omitempty"`
+ BoolValue bool `json:"boolValue,omitempty"`
+ StringValue string `json:"stringValue,omitempty"`
+ BytesValue string `json:"bytesValue,omitempty"`
+ Uint32Value int64 `json:"uint32Value,omitempty"`
+ EnumValue *ExamplepbNumericEnum `json:"enumValue,omitempty"`
+ PathEnumValue *PathenumPathEnum `json:"pathEnumValue,omitempty"`
+ NestedPathEnumValue *MessagePathEnumNestedPathEnum `json:"nestedPathEnumValue,omitempty"`
+ Sfixed32Value int32 `json:"sfixed32Value,omitempty"`
+ Sfixed64Value string `json:"sfixed64Value,omitempty"`
+ Sint32Value int32 `json:"sint32Value,omitempty"`
+ Sint64Value string `json:"sint64Value,omitempty"`
+ RepeatedStringValue []string `json:"repeatedStringValue,omitempty"`
+ OneofEmpty *interface{} `json:"oneofEmpty,omitempty"`
+ OneofString string `json:"oneofString,omitempty"`
+ MapValue map[string]ExamplepbNumericEnum `json:"mapValue,omitempty"`
+ MappedStringValue map[string]string `json:"mappedStringValue,omitempty"`
+ MappedNestedValue map[string]ABitOfEverythingNested `json:"mappedNestedValue,omitempty"`
+ NonConventionalNameValue string `json:"nonConventionalNameValue,omitempty"`
+ TimestampValue time.Time `json:"timestampValue,omitempty"`
+ RepeatedEnumValue []ExamplepbNumericEnum `json:"repeatedEnumValue,omitempty"`
+ // Repeated numeric enum description.
+ RepeatedEnumAnnotation []ExamplepbNumericEnum `json:"repeatedEnumAnnotation,omitempty"`
+ // Numeric enum description.
+ EnumValueAnnotation *ExamplepbNumericEnum `json:"enumValueAnnotation,omitempty"`
+ // Repeated string description.
+ RepeatedStringAnnotation []string `json:"repeatedStringAnnotation,omitempty"`
+ // Repeated nested object description.
+ RepeatedNestedAnnotation []ABitOfEverythingNested `json:"repeatedNestedAnnotation,omitempty"`
+ // Nested object description.
+ NestedAnnotation *ABitOfEverythingNested `json:"nestedAnnotation,omitempty"`
+ Int64OverrideType int64 `json:"int64OverrideType,omitempty"`
+ RequiredStringViaFieldBehaviorAnnotation string `json:"requiredStringViaFieldBehaviorAnnotation"`
+ OutputOnlyStringViaFieldBehaviorAnnotation string `json:"outputOnlyStringViaFieldBehaviorAnnotation,omitempty"`
+ OptionalStringValue string `json:"optionalStringValue,omitempty"`
+ // Only digits are allowed.
+ ProductId []string `json:"productId,omitempty"`
+ OptionalStringField string `json:"optionalStringField,omitempty"`
+ RequiredStringField1 string `json:"requiredStringField1"`
+ RequiredStringField2 string `json:"requiredStringField2"`
+ RequiredFieldBehaviorJsonNameCustom string `json:"required_field_behavior_json_name_custom"`
+ RequiredFieldSchemaJsonNameCustom string `json:"required_field_schema_json_name_custom"`
+ TrailingOnly string `json:"trailingOnly,omitempty"`
+ // Trailing only dot.
+ TrailingOnlyDot string `json:"trailingOnlyDot,omitempty"`
+ // Trailing both.
+ TrailingBoth string `json:"trailingBoth,omitempty"`
+ // This is an example of a multi-line comment. Trailing multiline.
+ TrailingMultiline string `json:"trailingMultiline,omitempty"`
+}
diff --git a/examples/internal/clients/abe/model_a_bit_of_everything_4.go b/examples/internal/clients/abe/model_a_bit_of_everything_4.go
new file mode 100644
index 00000000000..c26d449ef07
--- /dev/null
+++ b/examples/internal/clients/abe/model_a_bit_of_everything_4.go
@@ -0,0 +1,77 @@
+/*
+ * A Bit of Everything
+ *
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * API version: 1.0
+ * Contact: none@example.com
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package abe
+
+import (
+ "time"
+)
+
+// Intentionally complicated message type to cover many features of Protobuf.
+type ABitOfEverything4 struct {
+ SingleNested *ABitOfEverythingNested `json:"singleNested,omitempty"`
+ Nested []ABitOfEverythingNested `json:"nested,omitempty"`
+ // Float value field
+ FloatValue float32 `json:"floatValue,omitempty"`
+ DoubleValue float64 `json:"doubleValue,omitempty"`
+ Int64Value string `json:"int64Value,omitempty"`
+ Uint64Value string `json:"uint64Value,omitempty"`
+ Int32Value int32 `json:"int32Value,omitempty"`
+ Fixed64Value string `json:"fixed64Value,omitempty"`
+ Fixed32Value int64 `json:"fixed32Value,omitempty"`
+ BoolValue bool `json:"boolValue,omitempty"`
+ StringValue string `json:"stringValue,omitempty"`
+ BytesValue string `json:"bytesValue,omitempty"`
+ Uint32Value int64 `json:"uint32Value,omitempty"`
+ EnumValue *ExamplepbNumericEnum `json:"enumValue,omitempty"`
+ PathEnumValue *PathenumPathEnum `json:"pathEnumValue,omitempty"`
+ NestedPathEnumValue *MessagePathEnumNestedPathEnum `json:"nestedPathEnumValue,omitempty"`
+ Sfixed32Value int32 `json:"sfixed32Value,omitempty"`
+ Sfixed64Value string `json:"sfixed64Value,omitempty"`
+ Sint32Value int32 `json:"sint32Value,omitempty"`
+ Sint64Value string `json:"sint64Value,omitempty"`
+ RepeatedStringValue []string `json:"repeatedStringValue,omitempty"`
+ OneofEmpty *interface{} `json:"oneofEmpty,omitempty"`
+ OneofString string `json:"oneofString,omitempty"`
+ MapValue map[string]ExamplepbNumericEnum `json:"mapValue,omitempty"`
+ MappedStringValue map[string]string `json:"mappedStringValue,omitempty"`
+ MappedNestedValue map[string]ABitOfEverythingNested `json:"mappedNestedValue,omitempty"`
+ NonConventionalNameValue string `json:"nonConventionalNameValue,omitempty"`
+ TimestampValue time.Time `json:"timestampValue,omitempty"`
+ RepeatedEnumValue []ExamplepbNumericEnum `json:"repeatedEnumValue,omitempty"`
+ // Repeated numeric enum description.
+ RepeatedEnumAnnotation []ExamplepbNumericEnum `json:"repeatedEnumAnnotation,omitempty"`
+ // Numeric enum description.
+ EnumValueAnnotation *ExamplepbNumericEnum `json:"enumValueAnnotation,omitempty"`
+ // Repeated string description.
+ RepeatedStringAnnotation []string `json:"repeatedStringAnnotation,omitempty"`
+ // Repeated nested object description.
+ RepeatedNestedAnnotation []ABitOfEverythingNested `json:"repeatedNestedAnnotation,omitempty"`
+ // Nested object description.
+ NestedAnnotation *ABitOfEverythingNested `json:"nestedAnnotation,omitempty"`
+ Int64OverrideType int64 `json:"int64OverrideType,omitempty"`
+ RequiredStringViaFieldBehaviorAnnotation string `json:"requiredStringViaFieldBehaviorAnnotation,omitempty"`
+ OutputOnlyStringViaFieldBehaviorAnnotation string `json:"outputOnlyStringViaFieldBehaviorAnnotation,omitempty"`
+ OptionalStringValue string `json:"optionalStringValue,omitempty"`
+ // Only digits are allowed.
+ ProductId []string `json:"productId,omitempty"`
+ OptionalStringField string `json:"optionalStringField,omitempty"`
+ RequiredStringField1 string `json:"requiredStringField1,omitempty"`
+ RequiredStringField2 string `json:"requiredStringField2,omitempty"`
+ RequiredFieldBehaviorJsonNameCustom string `json:"required_field_behavior_json_name_custom,omitempty"`
+ RequiredFieldSchemaJsonNameCustom string `json:"required_field_schema_json_name_custom,omitempty"`
+ TrailingOnly string `json:"trailingOnly,omitempty"`
+ // Trailing only dot.
+ TrailingOnlyDot string `json:"trailingOnlyDot,omitempty"`
+ // Trailing both.
+ TrailingBoth string `json:"trailingBoth,omitempty"`
+ // This is an example of a multi-line comment. Trailing multiline.
+ TrailingMultiline string `json:"trailingMultiline,omitempty"`
+}
diff --git a/examples/internal/clients/abe/model_a_bit_of_everything_5.go b/examples/internal/clients/abe/model_a_bit_of_everything_5.go
new file mode 100644
index 00000000000..bf59a1748e5
--- /dev/null
+++ b/examples/internal/clients/abe/model_a_bit_of_everything_5.go
@@ -0,0 +1,59 @@
+/*
+ * A Bit of Everything
+ *
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * API version: 1.0
+ * Contact: none@example.com
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+package abe
+import (
+ "time"
+)
+
+// Intentionally complicated message type to cover many features of Protobuf.
+type ABitOfEverything5 struct {
+ SingleNested *ABitOfEverythingNested `json:"singleNested,omitempty"`
+ Nested []ABitOfEverythingNested `json:"nested,omitempty"`
+ // Float value field
+ FloatValue float32 `json:"floatValue"`
+ DoubleValue float64 `json:"doubleValue"`
+ Int64Value string `json:"int64Value"`
+ Uint64Value string `json:"uint64Value,omitempty"`
+ Int32Value int32 `json:"int32Value,omitempty"`
+ Fixed64Value string `json:"fixed64Value,omitempty"`
+ Fixed32Value int64 `json:"fixed32Value,omitempty"`
+ BoolValue bool `json:"boolValue,omitempty"`
+ StringValue string `json:"stringValue,omitempty"`
+ BytesValue string `json:"bytesValue,omitempty"`
+ Uint32Value int64 `json:"uint32Value,omitempty"`
+ EnumValue *ExamplepbNumericEnum `json:"enumValue,omitempty"`
+ PathEnumValue *PathenumPathEnum `json:"pathEnumValue,omitempty"`
+ NestedPathEnumValue *MessagePathEnumNestedPathEnum `json:"nestedPathEnumValue,omitempty"`
+ Sfixed32Value int32 `json:"sfixed32Value,omitempty"`
+ Sfixed64Value string `json:"sfixed64Value,omitempty"`
+ Sint32Value int32 `json:"sint32Value,omitempty"`
+ Sint64Value string `json:"sint64Value,omitempty"`
+ RepeatedStringValue []string `json:"repeatedStringValue,omitempty"`
+ OneofEmpty *interface{} `json:"oneofEmpty,omitempty"`
+ OneofString string `json:"oneofString,omitempty"`
+ MapValue map[string]ExamplepbNumericEnum `json:"mapValue,omitempty"`
+ MappedStringValue map[string]string `json:"mappedStringValue,omitempty"`
+ MappedNestedValue map[string]ABitOfEverythingNested `json:"mappedNestedValue,omitempty"`
+ NonConventionalNameValue string `json:"nonConventionalNameValue,omitempty"`
+ TimestampValue time.Time `json:"timestampValue,omitempty"`
+ RepeatedEnumValue []ExamplepbNumericEnum `json:"repeatedEnumValue,omitempty"`
+ // Repeated numeric enum description.
+ RepeatedEnumAnnotation []ExamplepbNumericEnum `json:"repeatedEnumAnnotation,omitempty"`
+ EnumValueAnnotation *ExamplepbNumericEnum `json:"enumValueAnnotation,omitempty"`
+ // Repeated string description.
+ RepeatedStringAnnotation []string `json:"repeatedStringAnnotation,omitempty"`
+ // Repeated nested object description.
+ RepeatedNestedAnnotation []ABitOfEverythingNested `json:"repeatedNestedAnnotation,omitempty"`
+ NestedAnnotation *ABitOfEverythingNested `json:"nestedAnnotation,omitempty"`
+ Int64OverrideType int64 `json:"int64OverrideType,omitempty"`
+ RequiredStringViaFieldBehaviorAnnotation string `json:"requiredStringViaFieldBehaviorAnnotation"`
+ OutputOnlyStringViaFieldBehaviorAnnotation string `json:"outputOnlyStringViaFieldBehaviorAnnotation,omitempty"`
+ OptionalStringValue string `json:"optionalStringValue,omitempty"`
+}
diff --git a/examples/internal/clients/abe/model_a_bit_of_everything_6.go b/examples/internal/clients/abe/model_a_bit_of_everything_6.go
new file mode 100644
index 00000000000..468fb91c1ce
--- /dev/null
+++ b/examples/internal/clients/abe/model_a_bit_of_everything_6.go
@@ -0,0 +1,59 @@
+/*
+ * A Bit of Everything
+ *
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * API version: 1.0
+ * Contact: none@example.com
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+package abe
+import (
+ "time"
+)
+
+// Intentionally complicated message type to cover many features of Protobuf.
+type ABitOfEverything6 struct {
+ SingleNested *ABitOfEverythingNested `json:"singleNested,omitempty"`
+ Nested []ABitOfEverythingNested `json:"nested,omitempty"`
+ // Float value field
+ FloatValue float32 `json:"floatValue"`
+ DoubleValue float64 `json:"doubleValue"`
+ Int64Value string `json:"int64Value"`
+ Uint64Value string `json:"uint64Value,omitempty"`
+ Int32Value int32 `json:"int32Value,omitempty"`
+ Fixed64Value string `json:"fixed64Value,omitempty"`
+ Fixed32Value int64 `json:"fixed32Value,omitempty"`
+ BoolValue bool `json:"boolValue,omitempty"`
+ StringValue string `json:"stringValue,omitempty"`
+ BytesValue string `json:"bytesValue,omitempty"`
+ Uint32Value int64 `json:"uint32Value,omitempty"`
+ EnumValue *ExamplepbNumericEnum `json:"enumValue,omitempty"`
+ PathEnumValue *PathenumPathEnum `json:"pathEnumValue,omitempty"`
+ NestedPathEnumValue *MessagePathEnumNestedPathEnum `json:"nestedPathEnumValue,omitempty"`
+ Sfixed32Value int32 `json:"sfixed32Value,omitempty"`
+ Sfixed64Value string `json:"sfixed64Value,omitempty"`
+ Sint32Value int32 `json:"sint32Value,omitempty"`
+ Sint64Value string `json:"sint64Value,omitempty"`
+ RepeatedStringValue []string `json:"repeatedStringValue,omitempty"`
+ OneofEmpty *interface{} `json:"oneofEmpty,omitempty"`
+ OneofString string `json:"oneofString,omitempty"`
+ MapValue map[string]ExamplepbNumericEnum `json:"mapValue,omitempty"`
+ MappedStringValue map[string]string `json:"mappedStringValue,omitempty"`
+ MappedNestedValue map[string]ABitOfEverythingNested `json:"mappedNestedValue,omitempty"`
+ NonConventionalNameValue string `json:"nonConventionalNameValue,omitempty"`
+ TimestampValue time.Time `json:"timestampValue,omitempty"`
+ RepeatedEnumValue []ExamplepbNumericEnum `json:"repeatedEnumValue,omitempty"`
+ // Repeated numeric enum description.
+ RepeatedEnumAnnotation []ExamplepbNumericEnum `json:"repeatedEnumAnnotation,omitempty"`
+ EnumValueAnnotation *ExamplepbNumericEnum `json:"enumValueAnnotation,omitempty"`
+ // Repeated string description.
+ RepeatedStringAnnotation []string `json:"repeatedStringAnnotation,omitempty"`
+ // Repeated nested object description.
+ RepeatedNestedAnnotation []ABitOfEverythingNested `json:"repeatedNestedAnnotation,omitempty"`
+ NestedAnnotation *ABitOfEverythingNested `json:"nestedAnnotation,omitempty"`
+ Int64OverrideType int64 `json:"int64OverrideType,omitempty"`
+ RequiredStringViaFieldBehaviorAnnotation string `json:"requiredStringViaFieldBehaviorAnnotation"`
+ OutputOnlyStringViaFieldBehaviorAnnotation string `json:"outputOnlyStringViaFieldBehaviorAnnotation,omitempty"`
+ OptionalStringValue string `json:"optionalStringValue,omitempty"`
+}
diff --git a/examples/internal/clients/abe/model_a_bit_of_everything_7.go b/examples/internal/clients/abe/model_a_bit_of_everything_7.go
new file mode 100644
index 00000000000..e72e74f5fd9
--- /dev/null
+++ b/examples/internal/clients/abe/model_a_bit_of_everything_7.go
@@ -0,0 +1,59 @@
+/*
+ * A Bit of Everything
+ *
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * API version: 1.0
+ * Contact: none@example.com
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+package abe
+import (
+ "time"
+)
+
+// Intentionally complicated message type to cover many features of Protobuf.
+type ABitOfEverything7 struct {
+ SingleNested *ABitOfEverythingNested `json:"singleNested,omitempty"`
+ Nested []ABitOfEverythingNested `json:"nested,omitempty"`
+ // Float value field
+ FloatValue float32 `json:"floatValue"`
+ DoubleValue float64 `json:"doubleValue"`
+ Int64Value string `json:"int64Value"`
+ Uint64Value string `json:"uint64Value,omitempty"`
+ Int32Value int32 `json:"int32Value,omitempty"`
+ Fixed64Value string `json:"fixed64Value,omitempty"`
+ Fixed32Value int64 `json:"fixed32Value,omitempty"`
+ BoolValue bool `json:"boolValue,omitempty"`
+ StringValue string `json:"stringValue,omitempty"`
+ BytesValue string `json:"bytesValue,omitempty"`
+ Uint32Value int64 `json:"uint32Value,omitempty"`
+ EnumValue *ExamplepbNumericEnum `json:"enumValue,omitempty"`
+ PathEnumValue *PathenumPathEnum `json:"pathEnumValue,omitempty"`
+ NestedPathEnumValue *MessagePathEnumNestedPathEnum `json:"nestedPathEnumValue,omitempty"`
+ Sfixed32Value int32 `json:"sfixed32Value,omitempty"`
+ Sfixed64Value string `json:"sfixed64Value,omitempty"`
+ Sint32Value int32 `json:"sint32Value,omitempty"`
+ Sint64Value string `json:"sint64Value,omitempty"`
+ RepeatedStringValue []string `json:"repeatedStringValue,omitempty"`
+ OneofEmpty *interface{} `json:"oneofEmpty,omitempty"`
+ OneofString string `json:"oneofString,omitempty"`
+ MapValue map[string]ExamplepbNumericEnum `json:"mapValue,omitempty"`
+ MappedStringValue map[string]string `json:"mappedStringValue,omitempty"`
+ MappedNestedValue map[string]ABitOfEverythingNested `json:"mappedNestedValue,omitempty"`
+ NonConventionalNameValue string `json:"nonConventionalNameValue,omitempty"`
+ TimestampValue time.Time `json:"timestampValue,omitempty"`
+ RepeatedEnumValue []ExamplepbNumericEnum `json:"repeatedEnumValue,omitempty"`
+ // Repeated numeric enum description.
+ RepeatedEnumAnnotation []ExamplepbNumericEnum `json:"repeatedEnumAnnotation,omitempty"`
+ EnumValueAnnotation *ExamplepbNumericEnum `json:"enumValueAnnotation,omitempty"`
+ // Repeated string description.
+ RepeatedStringAnnotation []string `json:"repeatedStringAnnotation,omitempty"`
+ // Repeated nested object description.
+ RepeatedNestedAnnotation []ABitOfEverythingNested `json:"repeatedNestedAnnotation,omitempty"`
+ NestedAnnotation *ABitOfEverythingNested `json:"nestedAnnotation,omitempty"`
+ Int64OverrideType int64 `json:"int64OverrideType,omitempty"`
+ RequiredStringViaFieldBehaviorAnnotation string `json:"requiredStringViaFieldBehaviorAnnotation"`
+ OutputOnlyStringViaFieldBehaviorAnnotation string `json:"outputOnlyStringViaFieldBehaviorAnnotation,omitempty"`
+ OptionalStringValue string `json:"optionalStringValue,omitempty"`
+}
diff --git a/examples/internal/clients/abe/model_a_bit_of_everything_8.go b/examples/internal/clients/abe/model_a_bit_of_everything_8.go
new file mode 100644
index 00000000000..e9a940b104a
--- /dev/null
+++ b/examples/internal/clients/abe/model_a_bit_of_everything_8.go
@@ -0,0 +1,59 @@
+/*
+ * A Bit of Everything
+ *
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * API version: 1.0
+ * Contact: none@example.com
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+package abe
+import (
+ "time"
+)
+
+// Intentionally complicated message type to cover many features of Protobuf.
+type ABitOfEverything8 struct {
+ SingleNested *ABitOfEverythingNested `json:"singleNested,omitempty"`
+ Nested []ABitOfEverythingNested `json:"nested,omitempty"`
+ // Float value field
+ FloatValue float32 `json:"floatValue"`
+ DoubleValue float64 `json:"doubleValue"`
+ Int64Value string `json:"int64Value"`
+ Uint64Value string `json:"uint64Value,omitempty"`
+ Int32Value int32 `json:"int32Value,omitempty"`
+ Fixed64Value string `json:"fixed64Value,omitempty"`
+ Fixed32Value int64 `json:"fixed32Value,omitempty"`
+ BoolValue bool `json:"boolValue,omitempty"`
+ StringValue string `json:"stringValue,omitempty"`
+ BytesValue string `json:"bytesValue,omitempty"`
+ Uint32Value int64 `json:"uint32Value,omitempty"`
+ EnumValue *ExamplepbNumericEnum `json:"enumValue,omitempty"`
+ PathEnumValue *PathenumPathEnum `json:"pathEnumValue,omitempty"`
+ NestedPathEnumValue *MessagePathEnumNestedPathEnum `json:"nestedPathEnumValue,omitempty"`
+ Sfixed32Value int32 `json:"sfixed32Value,omitempty"`
+ Sfixed64Value string `json:"sfixed64Value,omitempty"`
+ Sint32Value int32 `json:"sint32Value,omitempty"`
+ Sint64Value string `json:"sint64Value,omitempty"`
+ RepeatedStringValue []string `json:"repeatedStringValue,omitempty"`
+ OneofEmpty *interface{} `json:"oneofEmpty,omitempty"`
+ OneofString string `json:"oneofString,omitempty"`
+ MapValue map[string]ExamplepbNumericEnum `json:"mapValue,omitempty"`
+ MappedStringValue map[string]string `json:"mappedStringValue,omitempty"`
+ MappedNestedValue map[string]ABitOfEverythingNested `json:"mappedNestedValue,omitempty"`
+ NonConventionalNameValue string `json:"nonConventionalNameValue,omitempty"`
+ TimestampValue time.Time `json:"timestampValue,omitempty"`
+ RepeatedEnumValue []ExamplepbNumericEnum `json:"repeatedEnumValue,omitempty"`
+ // Repeated numeric enum description.
+ RepeatedEnumAnnotation []ExamplepbNumericEnum `json:"repeatedEnumAnnotation,omitempty"`
+ EnumValueAnnotation *ExamplepbNumericEnum `json:"enumValueAnnotation,omitempty"`
+ // Repeated string description.
+ RepeatedStringAnnotation []string `json:"repeatedStringAnnotation,omitempty"`
+ // Repeated nested object description.
+ RepeatedNestedAnnotation []ABitOfEverythingNested `json:"repeatedNestedAnnotation,omitempty"`
+ NestedAnnotation *ABitOfEverythingNested `json:"nestedAnnotation,omitempty"`
+ Int64OverrideType int64 `json:"int64OverrideType,omitempty"`
+ RequiredStringViaFieldBehaviorAnnotation string `json:"requiredStringViaFieldBehaviorAnnotation"`
+ OutputOnlyStringViaFieldBehaviorAnnotation string `json:"outputOnlyStringViaFieldBehaviorAnnotation,omitempty"`
+ OptionalStringValue string `json:"optionalStringValue,omitempty"`
+}
diff --git a/examples/internal/clients/abe/model_book.go b/examples/internal/clients/abe/model_book.go
new file mode 100644
index 00000000000..febf42b05fb
--- /dev/null
+++ b/examples/internal/clients/abe/model_book.go
@@ -0,0 +1,23 @@
+/*
+ * A Bit of Everything
+ *
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * API version: 1.0
+ * Contact: none@example.com
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package abe
+
+import (
+ "time"
+)
+
+// An example resource type from AIP-123 used to test the behavior described in the CreateBookRequest message. See: https://google.aip.dev/123
+type Book struct {
+ // Output only. The book's ID.
+ Id string `json:"id,omitempty"`
+ // Output only. Creation time of the book.
+ CreateTime time.Time `json:"createTime,omitempty"`
+}
diff --git a/examples/internal/clients/abe/model_examplepb_a_bit_of_everything.go b/examples/internal/clients/abe/model_examplepb_a_bit_of_everything.go
index 13e68e74443..04a06e37dfb 100644
--- a/examples/internal/clients/abe/model_examplepb_a_bit_of_everything.go
+++ b/examples/internal/clients/abe/model_examplepb_a_bit_of_everything.go
@@ -14,7 +14,7 @@ import (
"time"
)
-// Intentionaly complicated message type to cover many features of Protobuf.
+// Intentionally complicated message type to cover many features of Protobuf.
type ExamplepbABitOfEverything struct {
SingleNested *ABitOfEverythingNested `json:"singleNested,omitempty"`
Uuid string `json:"uuid"`
@@ -61,4 +61,18 @@ type ExamplepbABitOfEverything struct {
RequiredStringViaFieldBehaviorAnnotation string `json:"requiredStringViaFieldBehaviorAnnotation"`
OutputOnlyStringViaFieldBehaviorAnnotation string `json:"outputOnlyStringViaFieldBehaviorAnnotation,omitempty"`
OptionalStringValue string `json:"optionalStringValue,omitempty"`
+ // Only digits are allowed.
+ ProductId []string `json:"productId,omitempty"`
+ OptionalStringField string `json:"optionalStringField,omitempty"`
+ RequiredStringField1 string `json:"requiredStringField1"`
+ RequiredStringField2 string `json:"requiredStringField2"`
+ RequiredFieldBehaviorJsonNameCustom string `json:"required_field_behavior_json_name_custom"`
+ RequiredFieldSchemaJsonNameCustom string `json:"required_field_schema_json_name_custom"`
+ TrailingOnly string `json:"trailingOnly,omitempty"`
+ // Trailing only dot.
+ TrailingOnlyDot string `json:"trailingOnlyDot,omitempty"`
+ // Trailing both.
+ TrailingBoth string `json:"trailingBoth,omitempty"`
+ // This is an example of a multi-line comment. Trailing multiline.
+ TrailingMultiline string `json:"trailingMultiline,omitempty"`
}
diff --git a/examples/internal/clients/abe/model_examplepb_bar.go b/examples/internal/clients/abe/model_examplepb_bar.go
new file mode 100644
index 00000000000..40841f24c41
--- /dev/null
+++ b/examples/internal/clients/abe/model_examplepb_bar.go
@@ -0,0 +1,15 @@
+/*
+ * A Bit of Everything
+ *
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * API version: 1.0
+ * Contact: none@example.com
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package abe
+
+type ExamplepbBar struct {
+ Id string `json:"id"`
+}
diff --git a/examples/internal/clients/abe/model_examplepb_foo.go b/examples/internal/clients/abe/model_examplepb_foo.go
new file mode 100644
index 00000000000..168f5b7f630
--- /dev/null
+++ b/examples/internal/clients/abe/model_examplepb_foo.go
@@ -0,0 +1,15 @@
+/*
+ * A Bit of Everything
+ *
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * API version: 1.0
+ * Contact: none@example.com
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package abe
+
+type ExamplepbFoo struct {
+ Bar *ExamplepbBar `json:"bar"`
+}
diff --git a/examples/internal/clients/abe/model_examplepb_required_message_type_request.go b/examples/internal/clients/abe/model_examplepb_required_message_type_request.go
new file mode 100644
index 00000000000..a64035f141c
--- /dev/null
+++ b/examples/internal/clients/abe/model_examplepb_required_message_type_request.go
@@ -0,0 +1,16 @@
+/*
+ * A Bit of Everything
+ *
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * API version: 1.0
+ * Contact: none@example.com
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package abe
+
+type ExamplepbRequiredMessageTypeRequest struct {
+ Id string `json:"id"`
+ Foo *ExamplepbFoo `json:"foo"`
+}
diff --git a/examples/internal/clients/abe/model_examplepb_snake_enum_response.go b/examples/internal/clients/abe/model_examplepb_snake_enum_response.go
new file mode 100644
index 00000000000..eff692b9826
--- /dev/null
+++ b/examples/internal/clients/abe/model_examplepb_snake_enum_response.go
@@ -0,0 +1,14 @@
+/*
+ * A Bit of Everything
+ *
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * API version: 1.0
+ * Contact: none@example.com
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package abe
+
+type ExamplepbSnakeEnumResponse struct {
+}
diff --git a/examples/internal/clients/abe/model_examplepbsnake_case_0_enum.go b/examples/internal/clients/abe/model_examplepbsnake_case_0_enum.go
new file mode 100644
index 00000000000..50f149d8268
--- /dev/null
+++ b/examples/internal/clients/abe/model_examplepbsnake_case_0_enum.go
@@ -0,0 +1,19 @@
+/*
+ * A Bit of Everything
+ *
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * API version: 1.0
+ * Contact: none@example.com
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package abe
+// ExamplepbsnakeCase0Enum : - value_e: buf:lint:ignore ENUM_VALUE_UPPER_SNAKE_CASE - value_f: buf:lint:ignore ENUM_VALUE_UPPER_SNAKE_CASE
+type ExamplepbsnakeCase0Enum string
+
+// List of examplepbsnake_case_0_enum
+const (
+ E_ExamplepbsnakeCase0Enum ExamplepbsnakeCase0Enum = "value_e"
+ F_ExamplepbsnakeCase0Enum ExamplepbsnakeCase0Enum = "value_f"
+)
diff --git a/examples/internal/clients/abe/model_examplepbsnake_case_enum.go b/examples/internal/clients/abe/model_examplepbsnake_case_enum.go
new file mode 100644
index 00000000000..003b2f22f26
--- /dev/null
+++ b/examples/internal/clients/abe/model_examplepbsnake_case_enum.go
@@ -0,0 +1,19 @@
+/*
+ * A Bit of Everything
+ *
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * API version: 1.0
+ * Contact: none@example.com
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package abe
+// ExamplepbsnakeCaseEnum : - value_c: buf:lint:ignore ENUM_VALUE_UPPER_SNAKE_CASE - value_d: buf:lint:ignore ENUM_VALUE_UPPER_SNAKE_CASE
+type ExamplepbsnakeCaseEnum string
+
+// List of examplepbsnake_case_enum
+const (
+ C_ExamplepbsnakeCaseEnum ExamplepbsnakeCaseEnum = "value_c"
+ D_ExamplepbsnakeCaseEnum ExamplepbsnakeCaseEnum = "value_d"
+)
diff --git a/examples/internal/clients/abe/model_oneofenum_example_enum.go b/examples/internal/clients/abe/model_oneofenum_example_enum.go
new file mode 100644
index 00000000000..939f0f7f192
--- /dev/null
+++ b/examples/internal/clients/abe/model_oneofenum_example_enum.go
@@ -0,0 +1,19 @@
+/*
+ * A Bit of Everything
+ *
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * API version: 1.0
+ * Contact: none@example.com
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package abe
+
+type OneofenumExampleEnum string
+
+// List of oneofenumExampleEnum
+const (
+ UNSPECIFIED_OneofenumExampleEnum OneofenumExampleEnum = "EXAMPLE_ENUM_UNSPECIFIED"
+ FIRST_OneofenumExampleEnum OneofenumExampleEnum = "EXAMPLE_ENUM_FIRST"
+)
diff --git a/examples/internal/clients/abe/model_pathenumsnake_case_for_import.go b/examples/internal/clients/abe/model_pathenumsnake_case_for_import.go
new file mode 100644
index 00000000000..f6c7ec5100d
--- /dev/null
+++ b/examples/internal/clients/abe/model_pathenumsnake_case_for_import.go
@@ -0,0 +1,19 @@
+/*
+ * A Bit of Everything
+ *
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * API version: 1.0
+ * Contact: none@example.com
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package abe
+// PathenumsnakeCaseForImport : - value_x: buf:lint:ignore ENUM_VALUE_UPPER_SNAKE_CASE - value_y: buf:lint:ignore ENUM_VALUE_UPPER_SNAKE_CASE
+type PathenumsnakeCaseForImport string
+
+// List of pathenumsnake_case_for_import
+const (
+ X_PathenumsnakeCaseForImport PathenumsnakeCaseForImport = "value_x"
+ Y_PathenumsnakeCaseForImport PathenumsnakeCaseForImport = "value_y"
+)
diff --git a/examples/internal/clients/abe/model_protobuf_any.go b/examples/internal/clients/abe/model_protobuf_any.go
index f0b26154ef9..59d98beccd8 100644
--- a/examples/internal/clients/abe/model_protobuf_any.go
+++ b/examples/internal/clients/abe/model_protobuf_any.go
@@ -10,10 +10,8 @@
package abe
-// `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := ptypes.MarshalAny(foo) ... foo := &pb.Foo{} if err := ptypes.UnmarshalAny(any, foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example \"foo.bar.com/x/y.z\" will yield type name \"y.z\". JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { \"@type\": \"type.googleapis.com/google.profile.Person\", \"firstName\": , \"lastName\": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { \"@type\": \"type.googleapis.com/google.protobuf.Duration\", \"value\": \"1.212s\" }
+// `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example \"foo.bar.com/x/y.z\" will yield type name \"y.z\". JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { \"@type\": \"type.googleapis.com/google.profile.Person\", \"firstName\": , \"lastName\": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { \"@type\": \"type.googleapis.com/google.protobuf.Duration\", \"value\": \"1.212s\" }
type ProtobufAny struct {
// A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one \"/\" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading \".\" is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics.
- TypeUrl string `json:"typeUrl,omitempty"`
- // Must be a valid serialized protocol buffer of the above specified type.
- Value string `json:"value,omitempty"`
+ Type_ string `json:"@type,omitempty"`
}
diff --git a/examples/internal/clients/abe/model_the_book_to_update_.go b/examples/internal/clients/abe/model_the_book_to_update_.go
new file mode 100644
index 00000000000..22b4e447e9c
--- /dev/null
+++ b/examples/internal/clients/abe/model_the_book_to_update_.go
@@ -0,0 +1,23 @@
+/*
+ * A Bit of Everything
+ *
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * API version: 1.0
+ * Contact: none@example.com
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package abe
+
+import (
+ "time"
+)
+
+// The book's `name` field is used to identify the book to be updated. Format: publishers/{publisher}/books/{book}
+type TheBookToUpdate_ struct {
+ // Output only. The book's ID.
+ Id string `json:"id,omitempty"`
+ // Output only. Creation time of the book.
+ CreateTime time.Time `json:"createTime,omitempty"`
+}
diff --git a/examples/internal/clients/abe/model_the_book_to_update__1.go b/examples/internal/clients/abe/model_the_book_to_update__1.go
new file mode 100644
index 00000000000..be7408012c8
--- /dev/null
+++ b/examples/internal/clients/abe/model_the_book_to_update__1.go
@@ -0,0 +1,21 @@
+/*
+ * A Bit of Everything
+ *
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * API version: 1.0
+ * Contact: none@example.com
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+package abe
+import (
+ "time"
+)
+
+// The book's `name` field is used to identify the book to be updated. Format: publishers/{publisher}/books/{book}
+type TheBookToUpdate1 struct {
+ // Output only. The book's ID.
+ Id string `json:"id,omitempty"`
+ // Output only. Creation time of the book.
+ CreateTime time.Time `json:"createTime,omitempty"`
+}
diff --git a/examples/internal/clients/abe/model_the_book_to_update_the_books_name_field_is_used_to_identify_the_book_to_be_updated_format_publisherspublisherbooksbook.go b/examples/internal/clients/abe/model_the_book_to_update_the_books_name_field_is_used_to_identify_the_book_to_be_updated_format_publisherspublisherbooksbook.go
new file mode 100644
index 00000000000..b928ebfe2f4
--- /dev/null
+++ b/examples/internal/clients/abe/model_the_book_to_update_the_books_name_field_is_used_to_identify_the_book_to_be_updated_format_publisherspublisherbooksbook.go
@@ -0,0 +1,22 @@
+/*
+ * A Bit of Everything
+ *
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * API version: 1.0
+ * Contact: none@example.com
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package abe
+
+import (
+ "time"
+)
+
+type TheBookToUpdateTheBooksNameFieldIsUsedToIdentifyTheBookToBeUpdatedFormatPublisherspublisherbooksbook struct {
+ // Output only. The book's ID.
+ Id string `json:"id,omitempty"`
+ // Output only. Creation time of the book.
+ CreateTime time.Time `json:"createTime,omitempty"`
+}
diff --git a/examples/internal/clients/abe/model_examplepb_update_v2_request.go b/examples/internal/clients/abe/model_update_v2_request_request_for_update_includes_the_message_and_the_update_mask.go
similarity index 74%
rename from examples/internal/clients/abe/model_examplepb_update_v2_request.go
rename to examples/internal/clients/abe/model_update_v2_request_request_for_update_includes_the_message_and_the_update_mask.go
index dab839628b5..128cb16f31b 100644
--- a/examples/internal/clients/abe/model_examplepb_update_v2_request.go
+++ b/examples/internal/clients/abe/model_update_v2_request_request_for_update_includes_the_message_and_the_update_mask.go
@@ -10,8 +10,8 @@
package abe
-type ExamplepbUpdateV2Request struct {
- Abe *ExamplepbABitOfEverything `json:"abe,omitempty"`
+type UpdateV2RequestRequestForUpdateIncludesTheMessageAndTheUpdateMask struct {
+ Abe *ABitOfEverything4 `json:"abe,omitempty"`
// The paths to update.
UpdateMask string `json:"updateMask,omitempty"`
}
diff --git a/examples/internal/clients/abe/model_update_v2_request_request_for_update_includes_the_message_and_the_update_mask_1.go b/examples/internal/clients/abe/model_update_v2_request_request_for_update_includes_the_message_and_the_update_mask_1.go
new file mode 100644
index 00000000000..ca3f4eadfe9
--- /dev/null
+++ b/examples/internal/clients/abe/model_update_v2_request_request_for_update_includes_the_message_and_the_update_mask_1.go
@@ -0,0 +1,16 @@
+/*
+ * A Bit of Everything
+ *
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * API version: 1.0
+ * Contact: none@example.com
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+package abe
+
+type UpdateV2RequestRequestForUpdateIncludesTheMessageAndTheUpdateMask1 struct {
+ Abe *ABitOfEverything8 `json:"abe,omitempty"`
+ // The paths to update.
+ UpdateMask string `json:"updateMask,omitempty"`
+}
diff --git a/examples/internal/clients/abe/model_v1exampledeep_pathsingle_nested_name_single_nested.go b/examples/internal/clients/abe/model_v1exampledeep_pathsingle_nested_name_single_nested.go
new file mode 100644
index 00000000000..3ab04604db7
--- /dev/null
+++ b/examples/internal/clients/abe/model_v1exampledeep_pathsingle_nested_name_single_nested.go
@@ -0,0 +1,18 @@
+/*
+ * A Bit of Everything
+ *
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * API version: 1.0
+ * Contact: none@example.com
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package abe
+
+// Nested is nested type.
+type V1exampledeepPathsingleNestedNameSingleNested struct {
+ Amount int64 `json:"amount,omitempty"`
+ // DeepEnum description.
+ Ok *NestedDeepEnum `json:"ok,omitempty"`
+}
diff --git a/examples/internal/clients/echo/BUILD.bazel b/examples/internal/clients/echo/BUILD.bazel
index ec37262987f..5c62a33e1f8 100644
--- a/examples/internal/clients/echo/BUILD.bazel
+++ b/examples/internal/clients/echo/BUILD.bazel
@@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library")
package(default_visibility = ["//visibility:public"])
go_library(
- name = "go_default_library",
+ name = "echo",
srcs = [
"api_echo_service.go",
"client.go",
@@ -19,7 +19,13 @@ go_library(
],
importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/clients/echo",
deps = [
- "@com_github_antihax_optional//:go_default_library",
- "@org_golang_x_oauth2//:go_default_library",
+ "@com_github_antihax_optional//:optional",
+ "@org_golang_x_oauth2//:oauth2",
],
)
+
+alias(
+ name = "go_default_library",
+ actual = ":echo",
+ visibility = ["//examples:__subpackages__"],
+)
diff --git a/examples/internal/clients/echo/api/swagger.yaml b/examples/internal/clients/echo/api/swagger.yaml
index 905cda4bb73..e56c6a5e2a7 100644
--- a/examples/internal/clients/echo/api/swagger.yaml
+++ b/examples/internal/clients/echo/api/swagger.yaml
@@ -25,6 +25,59 @@ paths:
required: true
type: "string"
x-exportParamName: "Id"
+ - name: "num"
+ in: "query"
+ required: false
+ type: "string"
+ format: "int64"
+ x-exportParamName: "Num"
+ x-optionalDataType: "String"
+ - name: "lineNum"
+ in: "query"
+ required: false
+ type: "string"
+ format: "int64"
+ x-exportParamName: "LineNum"
+ x-optionalDataType: "String"
+ - name: "lang"
+ in: "query"
+ required: false
+ type: "string"
+ x-exportParamName: "Lang"
+ x-optionalDataType: "String"
+ - name: "status.progress"
+ in: "query"
+ required: false
+ type: "string"
+ format: "int64"
+ x-exportParamName: "StatusProgress"
+ x-optionalDataType: "String"
+ - name: "status.note"
+ in: "query"
+ required: false
+ type: "string"
+ x-exportParamName: "StatusNote"
+ x-optionalDataType: "String"
+ - name: "en"
+ in: "query"
+ required: false
+ type: "string"
+ format: "int64"
+ x-exportParamName: "En"
+ x-optionalDataType: "String"
+ - name: "no.progress"
+ in: "query"
+ required: false
+ type: "string"
+ format: "int64"
+ x-exportParamName: "NoProgress"
+ x-optionalDataType: "String"
+ - name: "no.note"
+ in: "query"
+ required: false
+ type: "string"
+ x-exportParamName: "NoNote"
+ x-optionalDataType: "String"
responses:
200:
description: "A successful response."
@@ -330,6 +383,7 @@ paths:
parameters:
- in: "body"
name: "body"
+ description: "SimpleMessage represents a simple message sent to the Echo service."
required: true
schema:
$ref: "#/definitions/examplepbSimpleMessage"
@@ -343,6 +397,74 @@ paths:
description: "An unexpected error response."
schema:
$ref: "#/definitions/rpcStatus"
+ /v1/example/echo_body/{id}:
+ put:
+ tags:
+ - "EchoService"
+ summary: "EchoBody method receives a simple message and returns it."
+ operationId: "EchoService_EchoBody2"
+ parameters:
+ - name: "id"
+ in: "path"
+ description: "Id represents the message identifier."
+ required: true
+ type: "string"
+ x-exportParamName: "Id"
+ - in: "body"
+ name: "no"
+ required: true
+ schema:
+ $ref: "#/definitions/examplepbEmbedded"
+ x-exportParamName: "No"
+ - name: "num"
+ in: "query"
+ required: false
+ type: "string"
+ format: "int64"
+ x-exportParamName: "Num"
+ x-optionalDataType: "String"
+ - name: "lineNum"
+ in: "query"
+ required: false
+ type: "string"
+ format: "int64"
+ x-exportParamName: "LineNum"
+ x-optionalDataType: "String"
+ - name: "lang"
+ in: "query"
+ required: false
+ type: "string"
+ x-exportParamName: "Lang"
+ x-optionalDataType: "String"
+ - name: "status.progress"
+ in: "query"
+ required: false
+ type: "string"
+ format: "int64"
+ x-exportParamName: "StatusProgress"
+ x-optionalDataType: "String"
+ - name: "status.note"
+ in: "query"
+ required: false
+ type: "string"
+ x-exportParamName: "StatusNote"
+ x-optionalDataType: "String"
+ - name: "en"
+ in: "query"
+ required: false
+ type: "string"
+ format: "int64"
+ x-exportParamName: "En"
+ x-optionalDataType: "String"
+ responses:
+ 200:
+ description: "A successful response."
+ schema:
+ $ref: "#/definitions/examplepbSimpleMessage"
+ default:
+ description: "An unexpected error response."
+ schema:
+ $ref: "#/definitions/rpcStatus"
/v1/example/echo_delete:
delete:
tags:
@@ -447,6 +569,84 @@ paths:
description: "An unexpected error response."
schema:
$ref: "#/definitions/rpcStatus"
+ /v1/example/echo_unauthorized:
+ get:
+ tags:
+ - "EchoService"
+ summary: "EchoUnauthorized method receives a simple message and returns it.\
+ \ It must\nalways return a google.rpc.Code of `UNAUTHENTICATED` and a HTTP\
+ \ Status code\nof 401."
+ operationId: "EchoService_EchoUnauthorized"
+ parameters:
+ - name: "id"
+ in: "query"
+ description: "Id represents the message identifier."
+ required: false
+ type: "string"
+ x-exportParamName: "Id"
+ x-optionalDataType: "String"
+ - name: "num"
+ in: "query"
+ required: false
+ type: "string"
+ format: "int64"
+ x-exportParamName: "Num"
+ x-optionalDataType: "String"
+ - name: "lineNum"
+ in: "query"
+ required: false
+ type: "string"
+ format: "int64"
+ x-exportParamName: "LineNum"
+ x-optionalDataType: "String"
+ - name: "lang"
+ in: "query"
+ required: false
+ type: "string"
+ x-exportParamName: "Lang"
+ x-optionalDataType: "String"
+ - name: "status.progress"
+ in: "query"
+ required: false
+ type: "string"
+ format: "int64"
+ x-exportParamName: "StatusProgress"
+ x-optionalDataType: "String"
+ - name: "status.note"
+ in: "query"
+ required: false
+ type: "string"
+ x-exportParamName: "StatusNote"
+ x-optionalDataType: "String"
+ - name: "en"
+ in: "query"
+ required: false
+ type: "string"
+ format: "int64"
+ x-exportParamName: "En"
+ x-optionalDataType: "String"
+ - name: "no.progress"
+ in: "query"
+ required: false
+ type: "string"
+ format: "int64"
+ x-exportParamName: "NoProgress"
+ x-optionalDataType: "String"
+ - name: "no.note"
+ in: "query"
+ required: false
+ type: "string"
+ x-exportParamName: "NoNote"
+ x-optionalDataType: "String"
+ responses:
+ 200:
+ description: "A successful response."
+ schema:
+ $ref: "#/definitions/examplepbSimpleMessage"
+ default:
+ description: "An unexpected error response."
+ schema:
+ $ref: "#/definitions/rpcStatus"
definitions:
examplepbDynamicMessage:
type: "object"
@@ -454,14 +654,12 @@ definitions:
structField:
type: "object"
properties: {}
- valueField:
- type: "object"
- properties: {}
+ valueField: {}
description: "DynamicMessage represents a message which can have its structure\n\
built dynamically using Struct and Values."
example:
structField: "{}"
- valueField: "{}"
+ valueField: ""
examplepbDynamicMessageUpdate:
type: "object"
properties:
@@ -472,7 +670,7 @@ definitions:
example:
body:
structField: "{}"
- valueField: "{}"
+ valueField: ""
updateMask: "updateMask"
examplepbEmbedded:
type: "object"
@@ -523,7 +721,7 @@ definitions:
protobufAny:
type: "object"
properties:
- typeUrl:
+ '@type':
type: "string"
description: "A URL/resource name that uniquely identifies the type of the\
\ serialized\nprotocol buffer message. This string must contain at least\n\
@@ -544,12 +742,6 @@ definitions:
\ 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"
- format: "byte"
- description: "Must be a valid serialized protocol buffer of the above specified\
- \ type."
- pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"
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\
@@ -561,23 +753,24 @@ definitions:
\ }\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 := &pb.Foo{...}\n any, err := ptypes.MarshalAny(foo)\n\
- \ ...\n foo := &pb.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\n\
- name \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses\
- \ the regular\nrepresentation of the deserialized, embedded message, with an\n\
- additional 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\"\
+ \ Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err\
+ \ != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err\
+ \ := any.UnmarshalTo(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\": ,\n \"lastName\": \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 }"
+ additionalProperties: {}
protobufNullValue:
type: "string"
description: "`NullValue` is a singleton enumeration to represent the null value\
diff --git a/examples/internal/clients/echo/api_echo_service.go b/examples/internal/clients/echo/api_echo_service.go
index 1bcf461f765..32dc2bbdade 100644
--- a/examples/internal/clients/echo/api_echo_service.go
+++ b/examples/internal/clients/echo/api_echo_service.go
@@ -31,10 +31,31 @@ EchoServiceApiService Echo method receives a simple message and returns it.
The message posted as the id parameter will also be returned.
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param id Id represents the message identifier.
+ * @param optional nil or *EchoServiceEchoOpts - Optional Parameters:
+ * @param "Num" (optional.String) -
+ * @param "LineNum" (optional.String) -
+ * @param "Lang" (optional.String) -
+ * @param "StatusProgress" (optional.String) -
+ * @param "StatusNote" (optional.String) -
+ * @param "En" (optional.String) -
+ * @param "NoProgress" (optional.String) -
+ * @param "NoNote" (optional.String) -
@return ExamplepbSimpleMessage
*/
-func (a *EchoServiceApiService) EchoServiceEcho(ctx context.Context, id string) (ExamplepbSimpleMessage, *http.Response, error) {
+
+type EchoServiceEchoOpts struct {
+ Num optional.String
+ LineNum optional.String
+ Lang optional.String
+ StatusProgress optional.String
+ StatusNote optional.String
+ En optional.String
+ NoProgress optional.String
+ NoNote optional.String
+}
+
+func (a *EchoServiceApiService) EchoServiceEcho(ctx context.Context, id string, localVarOptionals *EchoServiceEchoOpts) (ExamplepbSimpleMessage, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Post")
localVarPostBody interface{}
@@ -51,6 +72,30 @@ func (a *EchoServiceApiService) EchoServiceEcho(ctx context.Context, id string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
+ if localVarOptionals != nil && localVarOptionals.Num.IsSet() {
+ localVarQueryParams.Add("num", parameterToString(localVarOptionals.Num.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.LineNum.IsSet() {
+ localVarQueryParams.Add("lineNum", parameterToString(localVarOptionals.LineNum.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Lang.IsSet() {
+ localVarQueryParams.Add("lang", parameterToString(localVarOptionals.Lang.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.StatusProgress.IsSet() {
+ localVarQueryParams.Add("status.progress", parameterToString(localVarOptionals.StatusProgress.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.StatusNote.IsSet() {
+ localVarQueryParams.Add("status.note", parameterToString(localVarOptionals.StatusNote.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.En.IsSet() {
+ localVarQueryParams.Add("en", parameterToString(localVarOptionals.En.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.NoProgress.IsSet() {
+ localVarQueryParams.Add("no.progress", parameterToString(localVarOptionals.NoProgress.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.NoNote.IsSet() {
+ localVarQueryParams.Add("no.note", parameterToString(localVarOptionals.NoNote.Value(), ""))
+ }
// to determine the Content-Type header
localVarHttpContentTypes := []string{"application/json"}
@@ -684,7 +729,7 @@ func (a *EchoServiceApiService) EchoServiceEcho5(ctx context.Context, noNote str
/*
EchoServiceApiService EchoBody method receives a simple message and returns it.
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param body
+ * @param body SimpleMessage represents a simple message sent to the Echo service.
@return ExamplepbSimpleMessage
*/
@@ -781,6 +826,143 @@ func (a *EchoServiceApiService) EchoServiceEchoBody(ctx context.Context, body Ex
return localVarReturnValue, localVarHttpResponse, nil
}
+/*
+EchoServiceApiService EchoBody method receives a simple message and returns it.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param id Id represents the message identifier.
+ * @param no
+ * @param optional nil or *EchoServiceEchoBody2Opts - Optional Parameters:
+ * @param "Num" (optional.String) -
+ * @param "LineNum" (optional.String) -
+ * @param "Lang" (optional.String) -
+ * @param "StatusProgress" (optional.String) -
+ * @param "StatusNote" (optional.String) -
+ * @param "En" (optional.String) -
+
+@return ExamplepbSimpleMessage
+*/
+
+type EchoServiceEchoBody2Opts struct {
+ Num optional.String
+ LineNum optional.String
+ Lang optional.String
+ StatusProgress optional.String
+ StatusNote optional.String
+ En optional.String
+}
+
+func (a *EchoServiceApiService) EchoServiceEchoBody2(ctx context.Context, id string, no ExamplepbEmbedded, localVarOptionals *EchoServiceEchoBody2Opts) (ExamplepbSimpleMessage, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Put")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue ExamplepbSimpleMessage
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/v1/example/echo_body/{id}"
+ localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", fmt.Sprintf("%v", id), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ if localVarOptionals != nil && localVarOptionals.Num.IsSet() {
+ localVarQueryParams.Add("num", parameterToString(localVarOptionals.Num.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.LineNum.IsSet() {
+ localVarQueryParams.Add("lineNum", parameterToString(localVarOptionals.LineNum.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Lang.IsSet() {
+ localVarQueryParams.Add("lang", parameterToString(localVarOptionals.Lang.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.StatusProgress.IsSet() {
+ localVarQueryParams.Add("status.progress", parameterToString(localVarOptionals.StatusProgress.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.StatusNote.IsSet() {
+ localVarQueryParams.Add("status.note", parameterToString(localVarOptionals.StatusNote.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.En.IsSet() {
+ localVarQueryParams.Add("en", parameterToString(localVarOptionals.En.Value(), ""))
+ }
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ localVarPostBody = &no
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v ExamplepbSimpleMessage
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 0 {
+ var v RpcStatus
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
/*
EchoServiceApiService EchoDelete method receives a simple message and returns it.
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@@ -1037,3 +1219,150 @@ func (a *EchoServiceApiService) EchoServiceEchoPatch(ctx context.Context, body E
return localVarReturnValue, localVarHttpResponse, nil
}
+
+/*
+EchoServiceApiService EchoUnauthorized method receives a simple message and returns it. It must always return a google.rpc.Code of `UNAUTHENTICATED` and a HTTP Status code of 401.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param optional nil or *EchoServiceEchoUnauthorizedOpts - Optional Parameters:
+ * @param "Id" (optional.String) - Id represents the message identifier.
+ * @param "Num" (optional.String) -
+ * @param "LineNum" (optional.String) -
+ * @param "Lang" (optional.String) -
+ * @param "StatusProgress" (optional.String) -
+ * @param "StatusNote" (optional.String) -
+ * @param "En" (optional.String) -
+ * @param "NoProgress" (optional.String) -
+ * @param "NoNote" (optional.String) -
+
+@return ExamplepbSimpleMessage
+*/
+
+type EchoServiceEchoUnauthorizedOpts struct {
+ Id optional.String
+ Num optional.String
+ LineNum optional.String
+ Lang optional.String
+ StatusProgress optional.String
+ StatusNote optional.String
+ En optional.String
+ NoProgress optional.String
+ NoNote optional.String
+}
+
+func (a *EchoServiceApiService) EchoServiceEchoUnauthorized(ctx context.Context, localVarOptionals *EchoServiceEchoUnauthorizedOpts) (ExamplepbSimpleMessage, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue ExamplepbSimpleMessage
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/v1/example/echo_unauthorized"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ if localVarOptionals != nil && localVarOptionals.Id.IsSet() {
+ localVarQueryParams.Add("id", parameterToString(localVarOptionals.Id.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Num.IsSet() {
+ localVarQueryParams.Add("num", parameterToString(localVarOptionals.Num.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.LineNum.IsSet() {
+ localVarQueryParams.Add("lineNum", parameterToString(localVarOptionals.LineNum.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Lang.IsSet() {
+ localVarQueryParams.Add("lang", parameterToString(localVarOptionals.Lang.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.StatusProgress.IsSet() {
+ localVarQueryParams.Add("status.progress", parameterToString(localVarOptionals.StatusProgress.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.StatusNote.IsSet() {
+ localVarQueryParams.Add("status.note", parameterToString(localVarOptionals.StatusNote.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.En.IsSet() {
+ localVarQueryParams.Add("en", parameterToString(localVarOptionals.En.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.NoProgress.IsSet() {
+ localVarQueryParams.Add("no.progress", parameterToString(localVarOptionals.NoProgress.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.NoNote.IsSet() {
+ localVarQueryParams.Add("no.note", parameterToString(localVarOptionals.NoNote.Value(), ""))
+ }
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v ExamplepbSimpleMessage
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 0 {
+ var v RpcStatus
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
diff --git a/examples/internal/clients/echo/model_protobuf_any.go b/examples/internal/clients/echo/model_protobuf_any.go
index eca688d5411..a51f1e596c7 100644
--- a/examples/internal/clients/echo/model_protobuf_any.go
+++ b/examples/internal/clients/echo/model_protobuf_any.go
@@ -9,10 +9,8 @@
package echo
-// `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := ptypes.MarshalAny(foo) ... foo := &pb.Foo{} if err := ptypes.UnmarshalAny(any, foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example \"foo.bar.com/x/y.z\" will yield type name \"y.z\". JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { \"@type\": \"type.googleapis.com/google.profile.Person\", \"firstName\": , \"lastName\": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { \"@type\": \"type.googleapis.com/google.protobuf.Duration\", \"value\": \"1.212s\" }
+// `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example \"foo.bar.com/x/y.z\" will yield type name \"y.z\". JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { \"@type\": \"type.googleapis.com/google.profile.Person\", \"firstName\": , \"lastName\": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { \"@type\": \"type.googleapis.com/google.protobuf.Duration\", \"value\": \"1.212s\" }
type ProtobufAny struct {
// A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one \"/\" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading \".\" is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics.
- TypeUrl string `json:"typeUrl,omitempty"`
- // Must be a valid serialized protocol buffer of the above specified type.
- Value string `json:"value,omitempty"`
+ Type_ string `json:"@type,omitempty"`
}
diff --git a/examples/internal/clients/generateunboundmethods/BUILD.bazel b/examples/internal/clients/generateunboundmethods/BUILD.bazel
index 4f1928e62c5..ce2fed06823 100644
--- a/examples/internal/clients/generateunboundmethods/BUILD.bazel
+++ b/examples/internal/clients/generateunboundmethods/BUILD.bazel
@@ -1,7 +1,7 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
- name = "go_default_library",
+ name = "generateunboundmethods",
srcs = [
"api_generate_unbound_methods_echo_service.go",
"client.go",
@@ -14,5 +14,11 @@ go_library(
],
importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/clients/generateunboundmethods",
visibility = ["//examples:__subpackages__"],
- deps = ["@org_golang_x_oauth2//:go_default_library"],
+ deps = ["@org_golang_x_oauth2//:oauth2"],
+)
+
+alias(
+ name = "go_default_library",
+ actual = ":generateunboundmethods",
+ visibility = ["//examples:__subpackages__"],
)
diff --git a/examples/internal/clients/generateunboundmethods/api/swagger.yaml b/examples/internal/clients/generateunboundmethods/api/swagger.yaml
index c64662ab118..746556eff27 100644
--- a/examples/internal/clients/generateunboundmethods/api/swagger.yaml
+++ b/examples/internal/clients/generateunboundmethods/api/swagger.yaml
@@ -23,6 +23,8 @@ paths:
parameters:
- in: "body"
name: "body"
+ description: "GenerateUnboundMethodsSimpleMessage represents a simple message\
+ \ sent to the unannotated GenerateUnboundMethodsEchoService service."
required: true
schema:
$ref: "#/definitions/examplepbGenerateUnboundMethodsSimpleMessage"
@@ -45,6 +47,8 @@ paths:
parameters:
- in: "body"
name: "body"
+ description: "GenerateUnboundMethodsSimpleMessage represents a simple message\
+ \ sent to the unannotated GenerateUnboundMethodsEchoService service."
required: true
schema:
$ref: "#/definitions/examplepbGenerateUnboundMethodsSimpleMessage"
@@ -67,6 +71,8 @@ paths:
parameters:
- in: "body"
name: "body"
+ description: "GenerateUnboundMethodsSimpleMessage represents a simple message\
+ \ sent to the unannotated GenerateUnboundMethodsEchoService service."
required: true
schema:
$ref: "#/definitions/examplepbGenerateUnboundMethodsSimpleMessage"
@@ -101,12 +107,9 @@ definitions:
protobufAny:
type: "object"
properties:
- typeUrl:
+ '@type':
type: "string"
- value:
- type: "string"
- format: "byte"
- pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"
+ additionalProperties: {}
rpcStatus:
type: "object"
properties:
diff --git a/examples/internal/clients/generateunboundmethods/api_generate_unbound_methods_echo_service.go b/examples/internal/clients/generateunboundmethods/api_generate_unbound_methods_echo_service.go
index 1df1aa7e978..dd9c050b931 100644
--- a/examples/internal/clients/generateunboundmethods/api_generate_unbound_methods_echo_service.go
+++ b/examples/internal/clients/generateunboundmethods/api_generate_unbound_methods_echo_service.go
@@ -28,7 +28,7 @@ type GenerateUnboundMethodsEchoServiceApiService service
GenerateUnboundMethodsEchoServiceApiService Echo method receives a simple message and returns it.
The message posted as the id parameter will also be returned.
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param body
+ * @param body GenerateUnboundMethodsSimpleMessage represents a simple message sent to the unannotated GenerateUnboundMethodsEchoService service.
@return ExamplepbGenerateUnboundMethodsSimpleMessage
*/
@@ -128,7 +128,7 @@ func (a *GenerateUnboundMethodsEchoServiceApiService) GenerateUnboundMethodsEcho
/*
GenerateUnboundMethodsEchoServiceApiService EchoBody method receives a simple message and returns it.
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param body
+ * @param body GenerateUnboundMethodsSimpleMessage represents a simple message sent to the unannotated GenerateUnboundMethodsEchoService service.
@return ExamplepbGenerateUnboundMethodsSimpleMessage
*/
@@ -228,7 +228,7 @@ func (a *GenerateUnboundMethodsEchoServiceApiService) GenerateUnboundMethodsEcho
/*
GenerateUnboundMethodsEchoServiceApiService EchoDelete method receives a simple message and returns it.
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param body
+ * @param body GenerateUnboundMethodsSimpleMessage represents a simple message sent to the unannotated GenerateUnboundMethodsEchoService service.
@return ExamplepbGenerateUnboundMethodsSimpleMessage
*/
diff --git a/examples/internal/clients/generateunboundmethods/docs/GenerateUnboundMethodsEchoServiceApi.md b/examples/internal/clients/generateunboundmethods/docs/GenerateUnboundMethodsEchoServiceApi.md
index 6d3426c300b..58446c8c6a8 100644
--- a/examples/internal/clients/generateunboundmethods/docs/GenerateUnboundMethodsEchoServiceApi.md
+++ b/examples/internal/clients/generateunboundmethods/docs/GenerateUnboundMethodsEchoServiceApi.md
@@ -20,7 +20,7 @@ The message posted as the id parameter will also be returned.
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
- **body** | [**ExamplepbGenerateUnboundMethodsSimpleMessage**](ExamplepbGenerateUnboundMethodsSimpleMessage.md)| |
+ **body** | [**ExamplepbGenerateUnboundMethodsSimpleMessage**](ExamplepbGenerateUnboundMethodsSimpleMessage.md)| GenerateUnboundMethodsSimpleMessage represents a simple message sent to the unannotated GenerateUnboundMethodsEchoService service. |
### Return type
@@ -46,7 +46,7 @@ EchoBody method receives a simple message and returns it.
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
- **body** | [**ExamplepbGenerateUnboundMethodsSimpleMessage**](ExamplepbGenerateUnboundMethodsSimpleMessage.md)| |
+ **body** | [**ExamplepbGenerateUnboundMethodsSimpleMessage**](ExamplepbGenerateUnboundMethodsSimpleMessage.md)| GenerateUnboundMethodsSimpleMessage represents a simple message sent to the unannotated GenerateUnboundMethodsEchoService service. |
### Return type
@@ -72,7 +72,7 @@ EchoDelete method receives a simple message and returns it.
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
- **body** | [**ExamplepbGenerateUnboundMethodsSimpleMessage**](ExamplepbGenerateUnboundMethodsSimpleMessage.md)| |
+ **body** | [**ExamplepbGenerateUnboundMethodsSimpleMessage**](ExamplepbGenerateUnboundMethodsSimpleMessage.md)| GenerateUnboundMethodsSimpleMessage represents a simple message sent to the unannotated GenerateUnboundMethodsEchoService service. |
### Return type
diff --git a/examples/internal/clients/generateunboundmethods/docs/ProtobufAny.md b/examples/internal/clients/generateunboundmethods/docs/ProtobufAny.md
index 8305460df3c..029c2d3cceb 100644
--- a/examples/internal/clients/generateunboundmethods/docs/ProtobufAny.md
+++ b/examples/internal/clients/generateunboundmethods/docs/ProtobufAny.md
@@ -3,8 +3,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**TypeUrl** | **string** | | [optional] [default to null]
-**Value** | **string** | | [optional] [default to null]
+**Type_** | **string** | | [optional] [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/examples/internal/clients/generateunboundmethods/model_protobuf_any.go b/examples/internal/clients/generateunboundmethods/model_protobuf_any.go
index 21871e3df35..f8c0bf0d876 100644
--- a/examples/internal/clients/generateunboundmethods/model_protobuf_any.go
+++ b/examples/internal/clients/generateunboundmethods/model_protobuf_any.go
@@ -10,6 +10,5 @@
package generateunboundmethods
type ProtobufAny struct {
- TypeUrl string `json:"typeUrl,omitempty"`
- Value string `json:"value,omitempty"`
+ Type_ string `json:"@type,omitempty"`
}
diff --git a/examples/internal/clients/responsebody/BUILD.bazel b/examples/internal/clients/responsebody/BUILD.bazel
index 524400360f2..9d76d60e947 100644
--- a/examples/internal/clients/responsebody/BUILD.bazel
+++ b/examples/internal/clients/responsebody/BUILD.bazel
@@ -1,7 +1,7 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
- name = "go_default_library",
+ name = "responsebody",
srcs = [
"api_response_body_service.go",
"client.go",
@@ -19,5 +19,11 @@ go_library(
],
importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/clients/responsebody",
visibility = ["//visibility:public"],
- deps = ["@org_golang_x_oauth2//:go_default_library"],
+ deps = ["@org_golang_x_oauth2//:oauth2"],
+)
+
+alias(
+ name = "go_default_library",
+ actual = ":responsebody",
+ visibility = ["//examples:__subpackages__"],
)
diff --git a/examples/internal/clients/responsebody/api/swagger.yaml b/examples/internal/clients/responsebody/api/swagger.yaml
index 6bbce165148..bd7a206dbc1 100644
--- a/examples/internal/clients/responsebody/api/swagger.yaml
+++ b/examples/internal/clients/responsebody/api/swagger.yaml
@@ -148,7 +148,7 @@ definitions:
protobufAny:
type: "object"
properties:
- typeUrl:
+ '@type':
type: "string"
description: "A URL/resource name that uniquely identifies the type of the\
\ serialized\nprotocol buffer message. This string must contain at least\n\
@@ -169,12 +169,6 @@ definitions:
\ 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"
- format: "byte"
- description: "Must be a valid serialized protocol buffer of the above specified\
- \ type."
- pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"
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\
@@ -186,17 +180,17 @@ definitions:
\ }\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 := &pb.Foo{...}\n any, err := ptypes.MarshalAny(foo)\n\
- \ ...\n foo := &pb.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\n\
- name \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses\
- \ the regular\nrepresentation of the deserialized, embedded message, with an\n\
- additional 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\"\
+ \ Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err\
+ \ != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err\
+ \ := any.UnmarshalTo(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\": ,\n \"lastName\": \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\
@@ -204,8 +198,8 @@ definitions:
\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n\
\ \"value\": \"1.212s\"\n }"
example:
- typeUrl: "typeUrl"
- value: "value"
+ '@type': "@type"
+ additionalProperties: {}
rpcStatus:
type: "object"
properties:
@@ -233,10 +227,8 @@ definitions:
example:
code: 0
details:
- - typeUrl: "typeUrl"
- value: "value"
- - typeUrl: "typeUrl"
- value: "value"
+ - '@type': "@type"
+ - '@type': "@type"
message: "message"
Stream result of examplepbResponseBodyOut:
properties:
@@ -250,8 +242,6 @@ definitions:
error:
code: 0
details:
- - typeUrl: "typeUrl"
- value: "value"
- - typeUrl: "typeUrl"
- value: "value"
+ - '@type': "@type"
+ - '@type': "@type"
message: "message"
diff --git a/examples/internal/clients/responsebody/docs/ProtobufAny.md b/examples/internal/clients/responsebody/docs/ProtobufAny.md
index 50aaf9e772b..b70aaa32cf8 100644
--- a/examples/internal/clients/responsebody/docs/ProtobufAny.md
+++ b/examples/internal/clients/responsebody/docs/ProtobufAny.md
@@ -3,8 +3,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**TypeUrl** | **string** | A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one \"/\" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading \".\" is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. | [optional] [default to null]
-**Value** | **string** | Must be a valid serialized protocol buffer of the above specified type. | [optional] [default to null]
+**Type_** | **string** | A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one \"/\" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading \".\" is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. | [optional] [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/examples/internal/clients/responsebody/model_protobuf_any.go b/examples/internal/clients/responsebody/model_protobuf_any.go
index 37441229127..3b1831bcd74 100644
--- a/examples/internal/clients/responsebody/model_protobuf_any.go
+++ b/examples/internal/clients/responsebody/model_protobuf_any.go
@@ -9,10 +9,8 @@
package responsebody
-// `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := ptypes.MarshalAny(foo) ... foo := &pb.Foo{} if err := ptypes.UnmarshalAny(any, foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example \"foo.bar.com/x/y.z\" will yield type name \"y.z\". JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { \"@type\": \"type.googleapis.com/google.profile.Person\", \"firstName\": , \"lastName\": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { \"@type\": \"type.googleapis.com/google.protobuf.Duration\", \"value\": \"1.212s\" }
+// `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example \"foo.bar.com/x/y.z\" will yield type name \"y.z\". JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { \"@type\": \"type.googleapis.com/google.profile.Person\", \"firstName\": , \"lastName\": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { \"@type\": \"type.googleapis.com/google.protobuf.Duration\", \"value\": \"1.212s\" }
type ProtobufAny struct {
// A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one \"/\" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading \".\" is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics.
- TypeUrl string `json:"typeUrl,omitempty"`
- // Must be a valid serialized protocol buffer of the above specified type.
- Value string `json:"value,omitempty"`
+ Type_ string `json:"@type,omitempty"`
}
diff --git a/examples/internal/clients/unannotatedecho/BUILD.bazel b/examples/internal/clients/unannotatedecho/BUILD.bazel
index 574f2eaf0d5..af3361e0a84 100644
--- a/examples/internal/clients/unannotatedecho/BUILD.bazel
+++ b/examples/internal/clients/unannotatedecho/BUILD.bazel
@@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library")
package(default_visibility = ["//visibility:public"])
go_library(
- name = "go_default_library",
+ name = "unannotatedecho",
srcs = [
"api_unannotated_echo_service.go",
"client.go",
@@ -17,7 +17,13 @@ go_library(
],
importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/clients/unannotatedecho",
deps = [
- "@com_github_antihax_optional//:go_default_library",
- "@org_golang_x_oauth2//:go_default_library",
+ "@com_github_antihax_optional//:optional",
+ "@org_golang_x_oauth2//:oauth2",
],
)
+
+alias(
+ name = "go_default_library",
+ actual = ":unannotatedecho",
+ visibility = ["//examples:__subpackages__"],
+)
diff --git a/examples/internal/clients/unannotatedecho/api/swagger.yaml b/examples/internal/clients/unannotatedecho/api/swagger.yaml
index a0ca2163b3e..e3c03d81023 100644
--- a/examples/internal/clients/unannotatedecho/api/swagger.yaml
+++ b/examples/internal/clients/unannotatedecho/api/swagger.yaml
@@ -17,6 +17,16 @@ info:
x-something-something: "yadda"
tags:
- name: "UnannotatedEchoService"
+ description: "UnannotatedEchoService description -- which should not be used in\
+ \ place of the documentation comment!"
+ externalDocs:
+ description: "Find out more about UnannotatedEchoService"
+ url: "https://github.com/grpc-ecosystem/grpc-gateway"
+- name: "Echo"
+ description: "Echo description"
+- name: "Internal"
+ description: "Internal description"
+ x-traitTag: true
schemes:
- "http"
- "https"
@@ -49,6 +59,66 @@ paths:
required: true
type: "string"
x-exportParamName: "Id"
+ - name: "num"
+ in: "query"
+ description: "Int value field"
+ required: true
+ type: "string"
+ default: "42"
+ format: "int64"
+ x-exportParamName: "Num"
+ - name: "duration"
+ in: "query"
+ required: false
+ type: "string"
+ x-exportParamName: "Duration"
+ x-optionalDataType: "String"
+ - name: "lineNum"
+ in: "query"
+ required: false
+ type: "string"
+ format: "int64"
+ x-exportParamName: "LineNum"
+ x-optionalDataType: "String"
+ - name: "lang"
+ in: "query"
+ required: false
+ type: "string"
+ x-exportParamName: "Lang"
+ x-optionalDataType: "String"
+ - name: "status.progress"
+ in: "query"
+ required: false
+ type: "string"
+ format: "int64"
+ x-exportParamName: "StatusProgress"
+ x-optionalDataType: "String"
+ - name: "status.note"
+ in: "query"
+ required: false
+ type: "string"
+ x-exportParamName: "StatusNote"
+ x-optionalDataType: "String"
+ - name: "en"
+ in: "query"
+ required: false
+ type: "string"
+ format: "int64"
+ x-exportParamName: "En"
+ x-optionalDataType: "String"
+ - name: "no.progress"
+ in: "query"
+ required: false
+ type: "string"
+ format: "int64"
+ x-exportParamName: "NoProgress"
+ x-optionalDataType: "String"
+ - name: "no.note"
+ in: "query"
+ required: false
+ type: "string"
+ x-exportParamName: "NoNote"
+ x-optionalDataType: "String"
responses:
200:
description: "A successful response."
@@ -188,6 +258,7 @@ paths:
parameters:
- in: "body"
name: "body"
+ description: "A simple message with many types"
required: true
schema:
$ref: "#/definitions/examplepbUnannotatedSimpleMessage"
@@ -361,12 +432,9 @@ definitions:
protobufAny:
type: "object"
properties:
- typeUrl:
- type: "string"
- value:
+ '@type':
type: "string"
- format: "byte"
- pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"
+ additionalProperties: {}
rpcStatus:
type: "object"
properties:
diff --git a/examples/internal/clients/unannotatedecho/api_unannotated_echo_service.go b/examples/internal/clients/unannotatedecho/api_unannotated_echo_service.go
index ed62777fb30..70697ae6749 100644
--- a/examples/internal/clients/unannotatedecho/api_unannotated_echo_service.go
+++ b/examples/internal/clients/unannotatedecho/api_unannotated_echo_service.go
@@ -32,10 +32,32 @@ UnannotatedEchoServiceApiService Summary: Echo rpc
Description Echo
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param id Id represents the message identifier.
+ * @param num Int value field
+ * @param optional nil or *UnannotatedEchoServiceEchoOpts - Optional Parameters:
+ * @param "Duration" (optional.String) -
+ * @param "LineNum" (optional.String) -
+ * @param "Lang" (optional.String) -
+ * @param "StatusProgress" (optional.String) -
+ * @param "StatusNote" (optional.String) -
+ * @param "En" (optional.String) -
+ * @param "NoProgress" (optional.String) -
+ * @param "NoNote" (optional.String) -
@return ExamplepbUnannotatedSimpleMessage
*/
-func (a *UnannotatedEchoServiceApiService) UnannotatedEchoServiceEcho(ctx context.Context, id string) (ExamplepbUnannotatedSimpleMessage, *http.Response, error) {
+
+type UnannotatedEchoServiceEchoOpts struct {
+ Duration optional.String
+ LineNum optional.String
+ Lang optional.String
+ StatusProgress optional.String
+ StatusNote optional.String
+ En optional.String
+ NoProgress optional.String
+ NoNote optional.String
+}
+
+func (a *UnannotatedEchoServiceApiService) UnannotatedEchoServiceEcho(ctx context.Context, id string, num string, localVarOptionals *UnannotatedEchoServiceEchoOpts) (ExamplepbUnannotatedSimpleMessage, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Post")
localVarPostBody interface{}
@@ -52,6 +74,31 @@ func (a *UnannotatedEchoServiceApiService) UnannotatedEchoServiceEcho(ctx contex
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
+ localVarQueryParams.Add("num", parameterToString(num, ""))
+ if localVarOptionals != nil && localVarOptionals.Duration.IsSet() {
+ localVarQueryParams.Add("duration", parameterToString(localVarOptionals.Duration.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.LineNum.IsSet() {
+ localVarQueryParams.Add("lineNum", parameterToString(localVarOptionals.LineNum.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Lang.IsSet() {
+ localVarQueryParams.Add("lang", parameterToString(localVarOptionals.Lang.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.StatusProgress.IsSet() {
+ localVarQueryParams.Add("status.progress", parameterToString(localVarOptionals.StatusProgress.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.StatusNote.IsSet() {
+ localVarQueryParams.Add("status.note", parameterToString(localVarOptionals.StatusNote.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.En.IsSet() {
+ localVarQueryParams.Add("en", parameterToString(localVarOptionals.En.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.NoProgress.IsSet() {
+ localVarQueryParams.Add("no.progress", parameterToString(localVarOptionals.NoProgress.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.NoNote.IsSet() {
+ localVarQueryParams.Add("no.note", parameterToString(localVarOptionals.NoNote.Value(), ""))
+ }
// to determine the Content-Type header
localVarHttpContentTypes := []string{"application/json", "application/x-foo-mime"}
@@ -369,7 +416,7 @@ func (a *UnannotatedEchoServiceApiService) UnannotatedEchoServiceEcho2(ctx conte
/*
UnannotatedEchoServiceApiService EchoBody method receives a simple message and returns it.
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- * @param body
+ * @param body A simple message with many types
@return ExamplepbUnannotatedSimpleMessage
*/
diff --git a/examples/internal/clients/unannotatedecho/model_protobuf_any.go b/examples/internal/clients/unannotatedecho/model_protobuf_any.go
index c1893febf6f..6697363afa8 100644
--- a/examples/internal/clients/unannotatedecho/model_protobuf_any.go
+++ b/examples/internal/clients/unannotatedecho/model_protobuf_any.go
@@ -11,6 +11,5 @@
package unannotatedecho
type ProtobufAny struct {
- TypeUrl string `json:"typeUrl,omitempty"`
- Value string `json:"value,omitempty"`
+ Type_ string `json:"@type,omitempty"`
}
diff --git a/examples/internal/cmd/example-gateway-server/BUILD.bazel b/examples/internal/cmd/example-gateway-server/BUILD.bazel
index a111605039b..a56015d065c 100644
--- a/examples/internal/cmd/example-gateway-server/BUILD.bazel
+++ b/examples/internal/cmd/example-gateway-server/BUILD.bazel
@@ -1,18 +1,18 @@
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
go_library(
- name = "go_default_library",
+ name = "example-gateway-server_lib",
srcs = ["main.go"],
importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/cmd/example-gateway-server",
visibility = ["//visibility:private"],
deps = [
- "//examples/internal/gateway:go_default_library",
- "@com_github_golang_glog//:go_default_library",
+ "//examples/internal/gateway",
+ "@com_github_golang_glog//:glog",
],
)
go_binary(
name = "example-gateway-server",
- embed = [":go_default_library"],
+ embed = [":example-gateway-server_lib"],
visibility = ["//visibility:public"],
)
diff --git a/examples/internal/cmd/example-grpc-server/BUILD.bazel b/examples/internal/cmd/example-grpc-server/BUILD.bazel
index 6f19a9bd106..7f216a10520 100644
--- a/examples/internal/cmd/example-grpc-server/BUILD.bazel
+++ b/examples/internal/cmd/example-grpc-server/BUILD.bazel
@@ -3,17 +3,17 @@ load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
package(default_visibility = ["//visibility:private"])
go_library(
- name = "go_default_library",
+ name = "example-grpc-server_lib",
srcs = ["main.go"],
importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/cmd/example-grpc-server",
deps = [
- "//examples/internal/server:go_default_library",
- "@com_github_golang_glog//:go_default_library",
+ "//examples/internal/server",
+ "@com_github_golang_glog//:glog",
],
)
go_binary(
name = "example-server",
- embed = [":go_default_library"],
+ embed = [":example-grpc-server_lib"],
visibility = ["//visibility:public"],
)
diff --git a/examples/internal/gateway/BUILD.bazel b/examples/internal/gateway/BUILD.bazel
index 5656e532591..13dba37441b 100644
--- a/examples/internal/gateway/BUILD.bazel
+++ b/examples/internal/gateway/BUILD.bazel
@@ -1,7 +1,7 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
- name = "go_default_library",
+ name = "gateway",
srcs = [
"doc.go",
"gateway.go",
@@ -11,12 +11,19 @@ go_library(
importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/gateway",
visibility = ["//visibility:public"],
deps = [
- "//examples/internal/proto/examplepb:go_default_library",
- "//examples/internal/proto/standalone:go_default_library",
- "//runtime:go_default_library",
- "@com_github_golang_glog//:go_default_library",
+ "//examples/internal/proto/examplepb",
+ "//examples/internal/proto/standalone",
+ "//runtime",
+ "@com_github_golang_glog//:glog",
"@go_googleapis//google/rpc:errdetails_go_proto",
"@org_golang_google_grpc//:go_default_library",
- "@org_golang_google_grpc//connectivity:go_default_library",
+ "@org_golang_google_grpc//connectivity",
+ "@org_golang_google_grpc//credentials/insecure",
],
)
+
+alias(
+ name = "go_default_library",
+ actual = ":gateway",
+ visibility = ["//examples:__subpackages__"],
+)
diff --git a/examples/internal/gateway/gateway.go b/examples/internal/gateway/gateway.go
index b82089d60fe..7dd07bac578 100644
--- a/examples/internal/gateway/gateway.go
+++ b/examples/internal/gateway/gateway.go
@@ -3,6 +3,7 @@ package gateway
import (
"context"
"fmt"
+ "google.golang.org/grpc/credentials/insecure"
"net"
"net/http"
@@ -48,7 +49,7 @@ func dial(ctx context.Context, network, addr string) (*grpc.ClientConn, error) {
// dialTCP creates a client connection via TCP.
// "addr" must be a valid TCP address with a port number.
func dialTCP(ctx context.Context, addr string) (*grpc.ClientConn, error) {
- return grpc.DialContext(ctx, addr, grpc.WithInsecure())
+ return grpc.DialContext(ctx, addr, grpc.WithTransportCredentials(insecure.NewCredentials()))
}
// dialUnix creates a client connection via a unix domain socket.
@@ -57,5 +58,5 @@ func dialUnix(ctx context.Context, addr string) (*grpc.ClientConn, error) {
d := func(ctx context.Context, addr string) (net.Conn, error) {
return (&net.Dialer{}).DialContext(ctx, "unix", addr)
}
- return grpc.DialContext(ctx, addr, grpc.WithInsecure(), grpc.WithContextDialer(d))
+ return grpc.DialContext(ctx, addr, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithContextDialer(d))
}
diff --git a/examples/internal/helloworld/BUILD.bazel b/examples/internal/helloworld/BUILD.bazel
index c93b8bbc2d3..2b1e974df45 100644
--- a/examples/internal/helloworld/BUILD.bazel
+++ b/examples/internal/helloworld/BUILD.bazel
@@ -33,8 +33,14 @@ go_proto_library(
)
go_library(
- name = "go_default_library",
+ name = "helloworld",
embed = [":helloworld_go_proto"],
importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/helloworld",
visibility = ["//examples:__subpackages__"],
)
+
+alias(
+ name = "go_default_library",
+ actual = ":helloworld",
+ visibility = ["//examples:__subpackages__"],
+)
diff --git a/examples/internal/helloworld/helloworld.pb.go b/examples/internal/helloworld/helloworld.pb.go
index c6fc1f07757..998896d85ca 100644
--- a/examples/internal/helloworld/helloworld.pb.go
+++ b/examples/internal/helloworld/helloworld.pb.go
@@ -1,16 +1,16 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.26.0
-// protoc v3.13.0
+// protoc-gen-go v1.27.1
+// protoc (unknown)
// source: examples/internal/helloworld/helloworld.proto
package helloworld
import (
- wrappers "github.com/golang/protobuf/ptypes/wrappers"
_ "google.golang.org/genproto/googleapis/api/annotations"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ wrapperspb "google.golang.org/protobuf/types/known/wrapperspb"
reflect "reflect"
sync "sync"
)
@@ -27,16 +27,16 @@ type HelloRequest struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
- StrVal *wrappers.StringValue `protobuf:"bytes,2,opt,name=strVal,proto3" json:"strVal,omitempty"`
- FloatVal *wrappers.FloatValue `protobuf:"bytes,3,opt,name=floatVal,proto3" json:"floatVal,omitempty"`
- DoubleVal *wrappers.DoubleValue `protobuf:"bytes,4,opt,name=doubleVal,proto3" json:"doubleVal,omitempty"`
- BoolVal *wrappers.BoolValue `protobuf:"bytes,5,opt,name=boolVal,proto3" json:"boolVal,omitempty"`
- BytesVal *wrappers.BytesValue `protobuf:"bytes,6,opt,name=bytesVal,proto3" json:"bytesVal,omitempty"`
- Int32Val *wrappers.Int32Value `protobuf:"bytes,7,opt,name=int32Val,proto3" json:"int32Val,omitempty"`
- Uint32Val *wrappers.UInt32Value `protobuf:"bytes,8,opt,name=uint32Val,proto3" json:"uint32Val,omitempty"`
- Int64Val *wrappers.Int64Value `protobuf:"bytes,9,opt,name=int64Val,proto3" json:"int64Val,omitempty"`
- Uint64Val *wrappers.UInt64Value `protobuf:"bytes,10,opt,name=uint64Val,proto3" json:"uint64Val,omitempty"`
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ StrVal *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=strVal,proto3" json:"strVal,omitempty"`
+ FloatVal *wrapperspb.FloatValue `protobuf:"bytes,3,opt,name=floatVal,proto3" json:"floatVal,omitempty"`
+ DoubleVal *wrapperspb.DoubleValue `protobuf:"bytes,4,opt,name=doubleVal,proto3" json:"doubleVal,omitempty"`
+ BoolVal *wrapperspb.BoolValue `protobuf:"bytes,5,opt,name=boolVal,proto3" json:"boolVal,omitempty"`
+ BytesVal *wrapperspb.BytesValue `protobuf:"bytes,6,opt,name=bytesVal,proto3" json:"bytesVal,omitempty"`
+ Int32Val *wrapperspb.Int32Value `protobuf:"bytes,7,opt,name=int32Val,proto3" json:"int32Val,omitempty"`
+ Uint32Val *wrapperspb.UInt32Value `protobuf:"bytes,8,opt,name=uint32Val,proto3" json:"uint32Val,omitempty"`
+ Int64Val *wrapperspb.Int64Value `protobuf:"bytes,9,opt,name=int64Val,proto3" json:"int64Val,omitempty"`
+ Uint64Val *wrapperspb.UInt64Value `protobuf:"bytes,10,opt,name=uint64Val,proto3" json:"uint64Val,omitempty"`
}
func (x *HelloRequest) Reset() {
@@ -78,63 +78,63 @@ func (x *HelloRequest) GetName() string {
return ""
}
-func (x *HelloRequest) GetStrVal() *wrappers.StringValue {
+func (x *HelloRequest) GetStrVal() *wrapperspb.StringValue {
if x != nil {
return x.StrVal
}
return nil
}
-func (x *HelloRequest) GetFloatVal() *wrappers.FloatValue {
+func (x *HelloRequest) GetFloatVal() *wrapperspb.FloatValue {
if x != nil {
return x.FloatVal
}
return nil
}
-func (x *HelloRequest) GetDoubleVal() *wrappers.DoubleValue {
+func (x *HelloRequest) GetDoubleVal() *wrapperspb.DoubleValue {
if x != nil {
return x.DoubleVal
}
return nil
}
-func (x *HelloRequest) GetBoolVal() *wrappers.BoolValue {
+func (x *HelloRequest) GetBoolVal() *wrapperspb.BoolValue {
if x != nil {
return x.BoolVal
}
return nil
}
-func (x *HelloRequest) GetBytesVal() *wrappers.BytesValue {
+func (x *HelloRequest) GetBytesVal() *wrapperspb.BytesValue {
if x != nil {
return x.BytesVal
}
return nil
}
-func (x *HelloRequest) GetInt32Val() *wrappers.Int32Value {
+func (x *HelloRequest) GetInt32Val() *wrapperspb.Int32Value {
if x != nil {
return x.Int32Val
}
return nil
}
-func (x *HelloRequest) GetUint32Val() *wrappers.UInt32Value {
+func (x *HelloRequest) GetUint32Val() *wrapperspb.UInt32Value {
if x != nil {
return x.Uint32Val
}
return nil
}
-func (x *HelloRequest) GetInt64Val() *wrappers.Int64Value {
+func (x *HelloRequest) GetInt64Val() *wrapperspb.Int64Value {
if x != nil {
return x.Int64Val
}
return nil
}
-func (x *HelloRequest) GetUint64Val() *wrappers.UInt64Value {
+func (x *HelloRequest) GetUint64Val() *wrapperspb.UInt64Value {
if x != nil {
return x.Uint64Val
}
@@ -246,24 +246,24 @@ var file_examples_internal_helloworld_helloworld_proto_rawDesc = []byte{
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, 0x68, 0x65, 0x6c,
0x6c, 0x6f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x2e, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x70,
- 0x6c, 0x79, 0x22, 0x90, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x89, 0x02, 0x12, 0x0b, 0x2f, 0x73,
- 0x61, 0x79, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x5a, 0x16, 0x12, 0x14, 0x2f, 0x73, 0x61,
- 0x79, 0x2f, 0x73, 0x74, 0x72, 0x76, 0x61, 0x6c, 0x2f, 0x7b, 0x73, 0x74, 0x72, 0x56, 0x61, 0x6c,
- 0x7d, 0x5a, 0x1a, 0x12, 0x18, 0x2f, 0x73, 0x61, 0x79, 0x2f, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x76,
- 0x61, 0x6c, 0x2f, 0x7b, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x56, 0x61, 0x6c, 0x7d, 0x5a, 0x1c, 0x12,
- 0x1a, 0x2f, 0x73, 0x61, 0x79, 0x2f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x76, 0x61, 0x6c, 0x2f,
- 0x7b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x7d, 0x5a, 0x18, 0x12, 0x16, 0x2f,
- 0x73, 0x61, 0x79, 0x2f, 0x62, 0x6f, 0x6f, 0x6c, 0x76, 0x61, 0x6c, 0x2f, 0x7b, 0x62, 0x6f, 0x6f,
- 0x6c, 0x56, 0x61, 0x6c, 0x7d, 0x5a, 0x1a, 0x12, 0x18, 0x2f, 0x73, 0x61, 0x79, 0x2f, 0x62, 0x79,
- 0x74, 0x65, 0x73, 0x76, 0x61, 0x6c, 0x2f, 0x7b, 0x62, 0x79, 0x74, 0x65, 0x73, 0x56, 0x61, 0x6c,
- 0x7d, 0x5a, 0x1a, 0x12, 0x18, 0x2f, 0x73, 0x61, 0x79, 0x2f, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x76,
- 0x61, 0x6c, 0x2f, 0x7b, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x7d, 0x5a, 0x1c, 0x12,
- 0x1a, 0x2f, 0x73, 0x61, 0x79, 0x2f, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x76, 0x61, 0x6c, 0x2f,
- 0x7b, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x7d, 0x5a, 0x1a, 0x12, 0x18, 0x2f,
- 0x73, 0x61, 0x79, 0x2f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x76, 0x61, 0x6c, 0x2f, 0x7b, 0x69, 0x6e,
- 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x7d, 0x5a, 0x1c, 0x12, 0x1a, 0x2f, 0x73, 0x61, 0x79, 0x2f,
- 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x76, 0x61, 0x6c, 0x2f, 0x7b, 0x75, 0x69, 0x6e, 0x74, 0x36,
- 0x34, 0x56, 0x61, 0x6c, 0x7d, 0x42, 0x48, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
+ 0x6c, 0x79, 0x22, 0x90, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x89, 0x02, 0x5a, 0x16, 0x12, 0x14,
+ 0x2f, 0x73, 0x61, 0x79, 0x2f, 0x73, 0x74, 0x72, 0x76, 0x61, 0x6c, 0x2f, 0x7b, 0x73, 0x74, 0x72,
+ 0x56, 0x61, 0x6c, 0x7d, 0x5a, 0x1a, 0x12, 0x18, 0x2f, 0x73, 0x61, 0x79, 0x2f, 0x66, 0x6c, 0x6f,
+ 0x61, 0x74, 0x76, 0x61, 0x6c, 0x2f, 0x7b, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x56, 0x61, 0x6c, 0x7d,
+ 0x5a, 0x1c, 0x12, 0x1a, 0x2f, 0x73, 0x61, 0x79, 0x2f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x76,
+ 0x61, 0x6c, 0x2f, 0x7b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x7d, 0x5a, 0x18,
+ 0x12, 0x16, 0x2f, 0x73, 0x61, 0x79, 0x2f, 0x62, 0x6f, 0x6f, 0x6c, 0x76, 0x61, 0x6c, 0x2f, 0x7b,
+ 0x62, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x7d, 0x5a, 0x1a, 0x12, 0x18, 0x2f, 0x73, 0x61, 0x79,
+ 0x2f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x76, 0x61, 0x6c, 0x2f, 0x7b, 0x62, 0x79, 0x74, 0x65, 0x73,
+ 0x56, 0x61, 0x6c, 0x7d, 0x5a, 0x1a, 0x12, 0x18, 0x2f, 0x73, 0x61, 0x79, 0x2f, 0x69, 0x6e, 0x74,
+ 0x33, 0x32, 0x76, 0x61, 0x6c, 0x2f, 0x7b, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x7d,
+ 0x5a, 0x1c, 0x12, 0x1a, 0x2f, 0x73, 0x61, 0x79, 0x2f, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x76,
+ 0x61, 0x6c, 0x2f, 0x7b, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x7d, 0x5a, 0x1a,
+ 0x12, 0x18, 0x2f, 0x73, 0x61, 0x79, 0x2f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x76, 0x61, 0x6c, 0x2f,
+ 0x7b, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x7d, 0x5a, 0x1c, 0x12, 0x1a, 0x2f, 0x73,
+ 0x61, 0x79, 0x2f, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x76, 0x61, 0x6c, 0x2f, 0x7b, 0x75, 0x69,
+ 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x7d, 0x12, 0x0b, 0x2f, 0x73, 0x61, 0x79, 0x2f, 0x7b,
+ 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x42, 0x48, 0x5a, 0x46, 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,
@@ -285,17 +285,17 @@ func file_examples_internal_helloworld_helloworld_proto_rawDescGZIP() []byte {
var file_examples_internal_helloworld_helloworld_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_examples_internal_helloworld_helloworld_proto_goTypes = []interface{}{
- (*HelloRequest)(nil), // 0: grpc.gateway.examples.internal.helloworld.HelloRequest
- (*HelloReply)(nil), // 1: grpc.gateway.examples.internal.helloworld.HelloReply
- (*wrappers.StringValue)(nil), // 2: google.protobuf.StringValue
- (*wrappers.FloatValue)(nil), // 3: google.protobuf.FloatValue
- (*wrappers.DoubleValue)(nil), // 4: google.protobuf.DoubleValue
- (*wrappers.BoolValue)(nil), // 5: google.protobuf.BoolValue
- (*wrappers.BytesValue)(nil), // 6: google.protobuf.BytesValue
- (*wrappers.Int32Value)(nil), // 7: google.protobuf.Int32Value
- (*wrappers.UInt32Value)(nil), // 8: google.protobuf.UInt32Value
- (*wrappers.Int64Value)(nil), // 9: google.protobuf.Int64Value
- (*wrappers.UInt64Value)(nil), // 10: google.protobuf.UInt64Value
+ (*HelloRequest)(nil), // 0: grpc.gateway.examples.internal.helloworld.HelloRequest
+ (*HelloReply)(nil), // 1: grpc.gateway.examples.internal.helloworld.HelloReply
+ (*wrapperspb.StringValue)(nil), // 2: google.protobuf.StringValue
+ (*wrapperspb.FloatValue)(nil), // 3: google.protobuf.FloatValue
+ (*wrapperspb.DoubleValue)(nil), // 4: google.protobuf.DoubleValue
+ (*wrapperspb.BoolValue)(nil), // 5: google.protobuf.BoolValue
+ (*wrapperspb.BytesValue)(nil), // 6: google.protobuf.BytesValue
+ (*wrapperspb.Int32Value)(nil), // 7: google.protobuf.Int32Value
+ (*wrapperspb.UInt32Value)(nil), // 8: google.protobuf.UInt32Value
+ (*wrapperspb.Int64Value)(nil), // 9: google.protobuf.Int64Value
+ (*wrapperspb.UInt64Value)(nil), // 10: google.protobuf.UInt64Value
}
var file_examples_internal_helloworld_helloworld_proto_depIdxs = []int32{
2, // 0: grpc.gateway.examples.internal.helloworld.HelloRequest.strVal:type_name -> google.protobuf.StringValue
diff --git a/examples/internal/helloworld/helloworld.pb.gw.go b/examples/internal/helloworld/helloworld.pb.gw.go
index 8dccd650f28..6f76ae1f442 100644
--- a/examples/internal/helloworld/helloworld.pb.gw.go
+++ b/examples/internal/helloworld/helloworld.pb.gw.go
@@ -743,20 +743,22 @@ func RegisterGreeterHandlerServer(ctx context.Context, mux *runtime.ServeMux, se
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.helloworld.Greeter/SayHello")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.helloworld.Greeter/SayHello", runtime.WithHTTPPathPattern("/say/{name}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_Greeter_SayHello_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_Greeter_SayHello_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_Greeter_SayHello_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_Greeter_SayHello_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -766,20 +768,22 @@ func RegisterGreeterHandlerServer(ctx context.Context, mux *runtime.ServeMux, se
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.helloworld.Greeter/SayHello")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.helloworld.Greeter/SayHello", runtime.WithHTTPPathPattern("/say/strval/{strVal}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_Greeter_SayHello_1(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_Greeter_SayHello_1(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_Greeter_SayHello_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_Greeter_SayHello_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -789,20 +793,22 @@ func RegisterGreeterHandlerServer(ctx context.Context, mux *runtime.ServeMux, se
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.helloworld.Greeter/SayHello")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.helloworld.Greeter/SayHello", runtime.WithHTTPPathPattern("/say/floatval/{floatVal}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_Greeter_SayHello_2(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_Greeter_SayHello_2(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_Greeter_SayHello_2(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_Greeter_SayHello_2(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -812,20 +818,22 @@ func RegisterGreeterHandlerServer(ctx context.Context, mux *runtime.ServeMux, se
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.helloworld.Greeter/SayHello")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.helloworld.Greeter/SayHello", runtime.WithHTTPPathPattern("/say/doubleval/{doubleVal}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_Greeter_SayHello_3(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_Greeter_SayHello_3(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_Greeter_SayHello_3(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_Greeter_SayHello_3(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -835,20 +843,22 @@ func RegisterGreeterHandlerServer(ctx context.Context, mux *runtime.ServeMux, se
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.helloworld.Greeter/SayHello")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.helloworld.Greeter/SayHello", runtime.WithHTTPPathPattern("/say/boolval/{boolVal}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_Greeter_SayHello_4(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_Greeter_SayHello_4(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_Greeter_SayHello_4(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_Greeter_SayHello_4(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -858,20 +868,22 @@ func RegisterGreeterHandlerServer(ctx context.Context, mux *runtime.ServeMux, se
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.helloworld.Greeter/SayHello")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.helloworld.Greeter/SayHello", runtime.WithHTTPPathPattern("/say/bytesval/{bytesVal}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_Greeter_SayHello_5(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_Greeter_SayHello_5(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_Greeter_SayHello_5(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_Greeter_SayHello_5(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -881,20 +893,22 @@ func RegisterGreeterHandlerServer(ctx context.Context, mux *runtime.ServeMux, se
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.helloworld.Greeter/SayHello")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.helloworld.Greeter/SayHello", runtime.WithHTTPPathPattern("/say/int32val/{int32Val}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_Greeter_SayHello_6(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_Greeter_SayHello_6(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_Greeter_SayHello_6(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_Greeter_SayHello_6(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -904,20 +918,22 @@ func RegisterGreeterHandlerServer(ctx context.Context, mux *runtime.ServeMux, se
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.helloworld.Greeter/SayHello")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.helloworld.Greeter/SayHello", runtime.WithHTTPPathPattern("/say/uint32val/{uint32Val}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_Greeter_SayHello_7(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_Greeter_SayHello_7(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_Greeter_SayHello_7(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_Greeter_SayHello_7(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -927,20 +943,22 @@ func RegisterGreeterHandlerServer(ctx context.Context, mux *runtime.ServeMux, se
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.helloworld.Greeter/SayHello")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.helloworld.Greeter/SayHello", runtime.WithHTTPPathPattern("/say/int64val/{int64Val}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_Greeter_SayHello_8(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_Greeter_SayHello_8(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_Greeter_SayHello_8(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_Greeter_SayHello_8(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -950,20 +968,22 @@ func RegisterGreeterHandlerServer(ctx context.Context, mux *runtime.ServeMux, se
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.helloworld.Greeter/SayHello")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.helloworld.Greeter/SayHello", runtime.WithHTTPPathPattern("/say/uint64val/{uint64Val}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_Greeter_SayHello_9(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_Greeter_SayHello_9(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_Greeter_SayHello_9(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_Greeter_SayHello_9(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -1012,19 +1032,21 @@ func RegisterGreeterHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.helloworld.Greeter/SayHello")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.helloworld.Greeter/SayHello", runtime.WithHTTPPathPattern("/say/{name}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_Greeter_SayHello_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_Greeter_SayHello_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_Greeter_SayHello_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_Greeter_SayHello_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -1032,19 +1054,21 @@ func RegisterGreeterHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.helloworld.Greeter/SayHello")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.helloworld.Greeter/SayHello", runtime.WithHTTPPathPattern("/say/strval/{strVal}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_Greeter_SayHello_1(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_Greeter_SayHello_1(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_Greeter_SayHello_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_Greeter_SayHello_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -1052,19 +1076,21 @@ func RegisterGreeterHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.helloworld.Greeter/SayHello")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.helloworld.Greeter/SayHello", runtime.WithHTTPPathPattern("/say/floatval/{floatVal}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_Greeter_SayHello_2(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_Greeter_SayHello_2(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_Greeter_SayHello_2(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_Greeter_SayHello_2(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -1072,19 +1098,21 @@ func RegisterGreeterHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.helloworld.Greeter/SayHello")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.helloworld.Greeter/SayHello", runtime.WithHTTPPathPattern("/say/doubleval/{doubleVal}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_Greeter_SayHello_3(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_Greeter_SayHello_3(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_Greeter_SayHello_3(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_Greeter_SayHello_3(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -1092,19 +1120,21 @@ func RegisterGreeterHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.helloworld.Greeter/SayHello")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.helloworld.Greeter/SayHello", runtime.WithHTTPPathPattern("/say/boolval/{boolVal}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_Greeter_SayHello_4(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_Greeter_SayHello_4(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_Greeter_SayHello_4(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_Greeter_SayHello_4(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -1112,19 +1142,21 @@ func RegisterGreeterHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.helloworld.Greeter/SayHello")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.helloworld.Greeter/SayHello", runtime.WithHTTPPathPattern("/say/bytesval/{bytesVal}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_Greeter_SayHello_5(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_Greeter_SayHello_5(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_Greeter_SayHello_5(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_Greeter_SayHello_5(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -1132,19 +1164,21 @@ func RegisterGreeterHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.helloworld.Greeter/SayHello")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.helloworld.Greeter/SayHello", runtime.WithHTTPPathPattern("/say/int32val/{int32Val}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_Greeter_SayHello_6(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_Greeter_SayHello_6(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_Greeter_SayHello_6(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_Greeter_SayHello_6(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -1152,19 +1186,21 @@ func RegisterGreeterHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.helloworld.Greeter/SayHello")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.helloworld.Greeter/SayHello", runtime.WithHTTPPathPattern("/say/uint32val/{uint32Val}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_Greeter_SayHello_7(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_Greeter_SayHello_7(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_Greeter_SayHello_7(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_Greeter_SayHello_7(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -1172,19 +1208,21 @@ func RegisterGreeterHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.helloworld.Greeter/SayHello")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.helloworld.Greeter/SayHello", runtime.WithHTTPPathPattern("/say/int64val/{int64Val}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_Greeter_SayHello_8(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_Greeter_SayHello_8(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_Greeter_SayHello_8(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_Greeter_SayHello_8(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -1192,19 +1230,21 @@ func RegisterGreeterHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.helloworld.Greeter/SayHello")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.helloworld.Greeter/SayHello", runtime.WithHTTPPathPattern("/say/uint64val/{uint64Val}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_Greeter_SayHello_9(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_Greeter_SayHello_9(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_Greeter_SayHello_9(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_Greeter_SayHello_9(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
diff --git a/examples/internal/helloworld/helloworld.proto b/examples/internal/helloworld/helloworld.proto
index fae2ab00777..96ab370104c 100644
--- a/examples/internal/helloworld/helloworld.proto
+++ b/examples/internal/helloworld/helloworld.proto
@@ -2,13 +2,13 @@ syntax = "proto3";
package grpc.gateway.examples.internal.helloworld;
-option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/helloworld";
-
import "google/api/annotations.proto";
import "google/protobuf/wrappers.proto";
+option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/helloworld";
+
service Greeter {
- rpc SayHello (HelloRequest) returns (HelloReply) {
+ rpc SayHello(HelloRequest) returns (HelloReply) {
option (google.api.http) = {
get: "/say/{name}"
additional_bindings: {
diff --git a/examples/internal/helloworld/helloworld.swagger.json b/examples/internal/helloworld/helloworld.swagger.json
index b33e770ceda..26bb6f53c36 100644
--- a/examples/internal/helloworld/helloworld.swagger.json
+++ b/examples/internal/helloworld/helloworld.swagger.json
@@ -939,14 +939,11 @@
"protobufAny": {
"type": "object",
"properties": {
- "typeUrl": {
+ "@type": {
"type": "string"
- },
- "value": {
- "type": "string",
- "format": "byte"
}
- }
+ },
+ "additionalProperties": {}
},
"rpcStatus": {
"type": "object",
diff --git a/examples/internal/helloworld/helloworld_grpc.pb.go b/examples/internal/helloworld/helloworld_grpc.pb.go
index 66bef337188..e2604a3a6d3 100644
--- a/examples/internal/helloworld/helloworld_grpc.pb.go
+++ b/examples/internal/helloworld/helloworld_grpc.pb.go
@@ -11,6 +11,7 @@ import (
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
+// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// GreeterClient is the client API for Greeter service.
@@ -59,8 +60,8 @@ type UnsafeGreeterServer interface {
mustEmbedUnimplementedGreeterServer()
}
-func RegisterGreeterServer(s *grpc.Server, srv GreeterServer) {
- s.RegisterService(&_Greeter_serviceDesc, srv)
+func RegisterGreeterServer(s grpc.ServiceRegistrar, srv GreeterServer) {
+ s.RegisterService(&Greeter_ServiceDesc, srv)
}
func _Greeter_SayHello_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
@@ -81,7 +82,10 @@ func _Greeter_SayHello_Handler(srv interface{}, ctx context.Context, dec func(in
return interceptor(ctx, in, info, handler)
}
-var _Greeter_serviceDesc = grpc.ServiceDesc{
+// Greeter_ServiceDesc is the grpc.ServiceDesc for Greeter service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var Greeter_ServiceDesc = grpc.ServiceDesc{
ServiceName: "grpc.gateway.examples.internal.helloworld.Greeter",
HandlerType: (*GreeterServer)(nil),
Methods: []grpc.MethodDesc{
diff --git a/examples/internal/integration/BUILD.bazel b/examples/internal/integration/BUILD.bazel
index 3aab0e53439..8e234f7dbd5 100644
--- a/examples/internal/integration/BUILD.bazel
+++ b/examples/internal/integration/BUILD.bazel
@@ -1,31 +1,32 @@
load("@io_bazel_rules_go//go:def.bzl", "go_test")
go_test(
- name = "go_default_test",
+ name = "integration_test",
srcs = [
"client_test.go",
"integration_test.go",
"main_test.go",
],
deps = [
- "//examples/internal/clients/abe:go_default_library",
- "//examples/internal/clients/echo:go_default_library",
- "//examples/internal/clients/unannotatedecho:go_default_library",
- "//examples/internal/gateway:go_default_library",
- "//examples/internal/proto/examplepb:go_default_library",
- "//examples/internal/proto/pathenum:go_default_library",
- "//examples/internal/proto/sub:go_default_library",
- "//examples/internal/server:go_default_library",
- "//runtime:go_default_library",
- "@com_github_golang_glog//:go_default_library",
- "@com_github_google_go_cmp//cmp:go_default_library",
+ "//examples/internal/clients/abe",
+ "//examples/internal/clients/echo",
+ "//examples/internal/clients/unannotatedecho",
+ "//examples/internal/gateway",
+ "//examples/internal/proto/examplepb",
+ "//examples/internal/proto/pathenum",
+ "//examples/internal/proto/sub",
+ "//examples/internal/server",
+ "//runtime",
+ "@com_github_golang_glog//:glog",
+ "@com_github_google_go_cmp//cmp",
+ "@com_github_rogpeppe_fastuuid//:fastuuid",
"@go_googleapis//google/rpc:status_go_proto",
"@io_bazel_rules_go//proto/wkt:field_mask_go_proto",
- "@org_golang_google_grpc//codes:go_default_library",
- "@org_golang_google_protobuf//encoding/protojson:go_default_library",
- "@org_golang_google_protobuf//proto:go_default_library",
- "@org_golang_google_protobuf//testing/protocmp:go_default_library",
- "@org_golang_google_protobuf//types/known/emptypb:go_default_library",
- "@org_golang_google_protobuf//types/known/structpb:go_default_library",
+ "@org_golang_google_grpc//codes",
+ "@org_golang_google_protobuf//encoding/protojson",
+ "@org_golang_google_protobuf//proto",
+ "@org_golang_google_protobuf//testing/protocmp",
+ "@org_golang_google_protobuf//types/known/emptypb",
+ "@org_golang_google_protobuf//types/known/structpb",
],
)
diff --git a/examples/internal/integration/client_test.go b/examples/internal/integration/client_test.go
index b856843fcc0..13caa9881b8 100644
--- a/examples/internal/integration/client_test.go
+++ b/examples/internal/integration/client_test.go
@@ -2,13 +2,17 @@ package integration_test
import (
"context"
+ "fmt"
"testing"
"github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/clients/abe"
"github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/clients/echo"
"github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/clients/unannotatedecho"
+ "github.com/rogpeppe/fastuuid"
)
+var uuidgen = fastuuid.MustNewGenerator()
+
func TestEchoClient(t *testing.T) {
if testing.Short() {
t.Skip()
@@ -19,7 +23,7 @@ func TestEchoClient(t *testing.T) {
cfg.BasePath = "http://localhost:8088"
cl := echo.NewAPIClient(cfg)
- resp, _, err := cl.EchoServiceApi.EchoServiceEcho(context.Background(), "foo")
+ resp, _, err := cl.EchoServiceApi.EchoServiceEcho(context.Background(), "foo", nil)
if err != nil {
t.Errorf(`cl.EchoServiceApi.Echo("foo") failed with %v; want success`, err)
}
@@ -48,6 +52,26 @@ func TestEchoBodyClient(t *testing.T) {
}
}
+func TestEchoBody2Client(t *testing.T) {
+ if testing.Short() {
+ t.Skip()
+ return
+ }
+
+ cfg := echo.NewConfiguration()
+ cfg.BasePath = "http://localhost:8088"
+
+ cl := echo.NewAPIClient(cfg)
+ req := echo.ExamplepbEmbedded{Note: "note"}
+ resp, _, err := cl.EchoServiceApi.EchoServiceEchoBody2(context.Background(), "foo", req, nil)
+ if err != nil {
+ t.Errorf("cl.EchoBody(%#v) failed with %v; want success", req, err)
+ }
+ if got, want := resp.Id, "foo"; got != want {
+ t.Errorf("resp.Id = %q; want %q", got, want)
+ }
+}
+
func TestAbitOfEverythingClient(t *testing.T) {
if testing.Short() {
t.Skip()
@@ -68,25 +92,28 @@ func testABEClientCreate(t *testing.T, cl *abe.APIClient) {
messagePath := abe.JKL_MessagePathEnumNestedPathEnum
want := &abe.ExamplepbABitOfEverything{
- FloatValue: 1.5,
- DoubleValue: 2.5,
- Int64Value: "4294967296",
- Uint64Value: "9223372036854775807",
- Int32Value: -2147483648,
- Fixed64Value: "9223372036854775807",
- Fixed32Value: 4294967295,
- BoolValue: true,
- StringValue: "strprefix/foo",
- Uint32Value: 4294967295,
- Sfixed32Value: 2147483647,
- Sfixed64Value: "-4611686018427387904",
- Sint32Value: 2147483647,
- Sint64Value: "4611686018427387903",
- NonConventionalNameValue: "camelCase",
- EnumValue: &enumZero,
- PathEnumValue: &enumPath,
- NestedPathEnumValue: &messagePath,
- EnumValueAnnotation: &enumZero,
+ FloatValue: 1.5,
+ DoubleValue: 2.5,
+ Int64Value: "4294967296",
+ Uint64Value: "9223372036854775807",
+ Int32Value: -2147483648,
+ Fixed64Value: "9223372036854775807",
+ Fixed32Value: 4294967295,
+ BoolValue: true,
+ StringValue: "strprefix/foo",
+ Uint32Value: 4294967295,
+ Sfixed32Value: 2147483647,
+ Sfixed64Value: "-4611686018427387904",
+ Sint32Value: 2147483647,
+ Sint64Value: "4611686018427387903",
+ NonConventionalNameValue: "camelCase",
+ EnumValue: &enumZero,
+ PathEnumValue: &enumPath,
+ NestedPathEnumValue: &messagePath,
+ EnumValueAnnotation: &enumZero,
+ Uuid: fmt.Sprintf("%x", uuidgen.Next()),
+ RequiredFieldBehaviorJsonNameCustom: "test",
+ RequiredFieldSchemaJsonNameCustom: "test",
}
resp, _, err := cl.ABitOfEverythingServiceApi.ABitOfEverythingServiceCreate(
context.Background(),
@@ -109,6 +136,13 @@ func testABEClientCreate(t *testing.T, cl *abe.APIClient) {
want.PathEnumValue.String(),
want.NestedPathEnumValue.String(),
want.EnumValueAnnotation.String(),
+ want.Uuid,
+ want.RequiredStringViaFieldBehaviorAnnotation,
+ want.StringValue,
+ want.StringValue,
+ want.RequiredFieldBehaviorJsonNameCustom,
+ want.RequiredFieldSchemaJsonNameCustom,
+ nil,
)
if err != nil {
t.Fatalf("cl.Create(%#v) failed with %v; want success", want, err)
@@ -188,7 +222,7 @@ func TestUnannotatedEchoClient(t *testing.T) {
cl := unannotatedecho.NewAPIClient(cfg)
- resp, _, err := cl.UnannotatedEchoServiceApi.UnannotatedEchoServiceEcho(context.Background(), "foo")
+ resp, _, err := cl.UnannotatedEchoServiceApi.UnannotatedEchoServiceEcho(context.Background(), "foo", "1", nil)
if err != nil {
t.Errorf(`cl.Echo("foo") failed with %v; want success`, err)
}
diff --git a/examples/internal/integration/integration_test.go b/examples/internal/integration/integration_test.go
index 3bd1c8f14c1..e650e0b896f 100644
--- a/examples/internal/integration/integration_test.go
+++ b/examples/internal/integration/integration_test.go
@@ -8,7 +8,6 @@ import (
"encoding/json"
"fmt"
"io"
- "io/ioutil"
"net/http"
"net/url"
"reflect"
@@ -47,13 +46,47 @@ func TestEcho(t *testing.T) {
testEchoOneof(t, 8088, apiPrefix, "application/json")
testEchoOneof1(t, 8088, apiPrefix, "application/json")
testEchoOneof2(t, 8088, apiPrefix, "application/json")
- testEchoBody(t, 8088, apiPrefix)
+ testEchoBody(t, 8088, apiPrefix, true)
+ testEchoBody(t, 8088, apiPrefix, false)
// Use SendHeader/SetTrailer without gRPC server https://github.com/grpc-ecosystem/grpc-gateway/issues/517#issuecomment-684625645
- testEchoBody(t, 8089, apiPrefix)
+ testEchoBody(t, 8089, apiPrefix, true)
+ testEchoBody(t, 8089, apiPrefix, false)
})
}
}
+func TestEchoUnauthorized(t *testing.T) {
+ if testing.Short() {
+ t.Skip()
+ return
+ }
+ apiURL := "http://localhost:8088/v1/example/echo_unauthorized"
+ resp, err := http.Get(apiURL)
+ if err != nil {
+ t.Errorf("http.Get(%q) failed with %v; want success", apiURL, err)
+ return
+ }
+ defer resp.Body.Close()
+ buf, err := io.ReadAll(resp.Body)
+ if err != nil {
+ t.Errorf("io.ReadAll(resp.Body) failed with %v; want success", err)
+ return
+ }
+ msg := new(statuspb.Status)
+ if err := marshaler.Unmarshal(buf, msg); err != nil {
+ t.Errorf("marshaler.Unmarshal(%s, msg) failed with %v; want success", buf, err)
+ return
+ }
+
+ if got, want := resp.StatusCode, http.StatusUnauthorized; got != want {
+ t.Errorf("resp.StatusCode = %d; want %d", got, want)
+ }
+
+ if value := resp.Header.Get("WWW-Authenticate"); value == "" {
+ t.Errorf("WWW-Authenticate header should not be empty")
+ }
+}
+
func TestEchoPatch(t *testing.T) {
if testing.Short() {
t.Skip()
@@ -66,9 +99,12 @@ func TestEchoPatch(t *testing.T) {
StructValue: &structpb.Struct{Fields: map[string]*structpb.Value{
"layered_struct_key": {Kind: &structpb.Value_StringValue{StringValue: "struct_val"}},
}},
- }}}},
- ValueField: &structpb.Value{Kind: &structpb.Value_StructValue{StructValue: &structpb.Struct{Fields: map[string]*structpb.Value{
- "value_struct_key": {Kind: &structpb.Value_StringValue{StringValue: "value_struct_val"}}}},
+ }},
+ }},
+ ValueField: &structpb.Value{Kind: &structpb.Value_StructValue{
+ StructValue: &structpb.Struct{Fields: map[string]*structpb.Value{
+ "value_struct_key": {Kind: &structpb.Value_StringValue{StringValue: "value_struct_val"}},
+ }},
}},
}
payload, err := protojson.MarshalOptions{UseProtoNames: true}.Marshal(&sent)
@@ -88,9 +124,9 @@ func TestEchoPatch(t *testing.T) {
return
}
defer resp.Body.Close()
- buf, err := ioutil.ReadAll(resp.Body)
+ buf, err := io.ReadAll(resp.Body)
if err != nil {
- t.Errorf("ioutil.ReadAll(resp.Body) failed with %v; want success", err)
+ t.Errorf("io.ReadAll(resp.Body) failed with %v; want success", err)
return
}
@@ -146,6 +182,39 @@ func TestForwardResponseOption(t *testing.T) {
testEcho(t, port, "v1", "application/vnd.docker.plugins.v1.1+json")
}
+func TestForwardResponseOptionHTTPPathPattern(t *testing.T) {
+ if testing.Short() {
+ t.Skip()
+ return
+ }
+
+ ctx := context.Background()
+ ctx, cancel := context.WithCancel(ctx)
+ defer cancel()
+
+ port := 7080
+ go func() {
+ if err := runGateway(
+ ctx,
+ fmt.Sprintf(":%d", port),
+ runtime.WithForwardResponseOption(
+ func(ctx context.Context, w http.ResponseWriter, _ proto.Message) error {
+ path, _ := runtime.HTTPPathPattern(ctx)
+ w.Header().Set("Content-Type", path)
+ return nil
+ },
+ ),
+ ); err != nil {
+ t.Errorf("runGateway() failed with %v; want success", err)
+ return
+ }
+ }()
+ if err := waitForGateway(ctx, uint16(port)); err != nil {
+ t.Errorf("waitForGateway(ctx, %d) failed with %v; want success", port, err)
+ }
+ testEcho(t, port, "v1", "/v1/example/echo/{id}")
+}
+
func testEcho(t *testing.T, port int, apiPrefix string, contentType string) {
apiURL := fmt.Sprintf("http://localhost:%d/%s/example/echo/myid", port, apiPrefix)
resp, err := http.Post(apiURL, "application/json", strings.NewReader("{}"))
@@ -154,9 +223,9 @@ func testEcho(t *testing.T, port int, apiPrefix string, contentType string) {
return
}
defer resp.Body.Close()
- buf, err := ioutil.ReadAll(resp.Body)
+ buf, err := io.ReadAll(resp.Body)
if err != nil {
- t.Errorf("ioutil.ReadAll(resp.Body) failed with %v; want success", err)
+ t.Errorf("io.ReadAll(resp.Body) failed with %v; want success", err)
return
}
@@ -187,9 +256,9 @@ func testEchoOneof(t *testing.T, port int, apiPrefix string, contentType string)
return
}
defer resp.Body.Close()
- buf, err := ioutil.ReadAll(resp.Body)
+ buf, err := io.ReadAll(resp.Body)
if err != nil {
- t.Errorf("ioutil.ReadAll(resp.Body) failed with %v; want success", err)
+ t.Errorf("io.ReadAll(resp.Body) failed with %v; want success", err)
return
}
@@ -220,9 +289,9 @@ func testEchoOneof1(t *testing.T, port int, apiPrefix string, contentType string
return
}
defer resp.Body.Close()
- buf, err := ioutil.ReadAll(resp.Body)
+ buf, err := io.ReadAll(resp.Body)
if err != nil {
- t.Errorf("ioutil.ReadAll(resp.Body) failed with %v; want success", err)
+ t.Errorf("io.ReadAll(resp.Body) failed with %v; want success", err)
return
}
@@ -253,9 +322,9 @@ func testEchoOneof2(t *testing.T, port int, apiPrefix string, contentType string
return
}
defer resp.Body.Close()
- buf, err := ioutil.ReadAll(resp.Body)
+ buf, err := io.ReadAll(resp.Body)
if err != nil {
- t.Errorf("ioutil.ReadAll(resp.Body) failed with %v; want success", err)
+ t.Errorf("io.ReadAll(resp.Body) failed with %v; want success", err)
return
}
@@ -278,7 +347,7 @@ func testEchoOneof2(t *testing.T, port int, apiPrefix string, contentType string
}
}
-func testEchoBody(t *testing.T, port int, apiPrefix string) {
+func testEchoBody(t *testing.T, port int, apiPrefix string, useTrailers bool) {
sent := examplepb.UnannotatedSimpleMessage{Id: "example"}
payload, err := marshaler.Marshal(&sent)
if err != nil {
@@ -286,15 +355,25 @@ func testEchoBody(t *testing.T, port int, apiPrefix string) {
}
apiURL := fmt.Sprintf("http://localhost:%d/%s/example/echo_body", port, apiPrefix)
- resp, err := http.Post(apiURL, "", bytes.NewReader(payload))
+
+ req, err := http.NewRequest("POST", apiURL, bytes.NewReader(payload))
if err != nil {
- t.Errorf("http.Post(%q) failed with %v; want success", apiURL, err)
+ t.Errorf("http.NewRequest() failed with %v; want success", err)
+ return
+ }
+ if useTrailers {
+ req.Header.Set("TE", "trailers")
+ }
+
+ resp, err := http.DefaultClient.Do(req)
+ if err != nil {
+ t.Errorf("client.Do(%v) failed with %v; want success", req, err)
return
}
defer resp.Body.Close()
- buf, err := ioutil.ReadAll(resp.Body)
+ buf, err := io.ReadAll(resp.Body)
if err != nil {
- t.Errorf("ioutil.ReadAll(resp.Body) failed with %v; want success", err)
+ t.Errorf("io.ReadAll(resp.Body) failed with %v; want success", err)
return
}
@@ -319,11 +398,18 @@ func testEchoBody(t *testing.T, port int, apiPrefix string) {
t.Errorf("Grpc-Metadata-Bar was %q, wanted %q", got, want)
}
- if got, want := resp.Trailer.Get("Grpc-Trailer-Foo"), "foo2"; got != want {
- t.Errorf("Grpc-Trailer-Foo was %q, wanted %q", got, want)
+ wantedTrailers := map[bool]map[string]string{
+ true: {
+ "Grpc-Trailer-Foo": "foo2",
+ "Grpc-Trailer-Bar": "bar2",
+ },
+ false: {},
}
- if got, want := resp.Trailer.Get("Grpc-Trailer-Bar"), "bar2"; got != want {
- t.Errorf("Grpc-Trailer-Bar was %q, wanted %q", got, want)
+
+ for trailer, want := range wantedTrailers[useTrailers] {
+ if got := resp.Trailer.Get(trailer); got != want {
+ t.Errorf("%s was %q, wanted %q", trailer, got, want)
+ }
}
}
@@ -335,7 +421,8 @@ func TestABE(t *testing.T) {
testABECreate(t, 8088)
testABECreateBody(t, 8088)
- testABEBulkCreate(t, 8088)
+ testABEBulkCreate(t, 8088, true)
+ testABEBulkCreate(t, 8088, false)
testABEBulkCreateWithError(t, 8088)
testABELookup(t, 8088)
testABELookupNotFound(t, 8088, true)
@@ -346,6 +433,10 @@ func TestABE(t *testing.T) {
testABEBulkEchoZeroLength(t, 8088)
testAdditionalBindings(t, 8088)
testABERepeated(t, 8088)
+ testABEExists(t, 8088)
+ testABEExistsNotFound(t, 8088)
+ testABEOptions(t, 8088)
+ testABETrace(t, 8088)
}
func testABECreate(t *testing.T, port int) {
@@ -378,9 +469,9 @@ func testABECreate(t *testing.T, port int) {
return
}
defer resp.Body.Close()
- buf, err := ioutil.ReadAll(resp.Body)
+ buf, err := io.ReadAll(resp.Body)
if err != nil {
- t.Errorf("ioutil.ReadAll(resp.Body) failed with %v; want success", err)
+ t.Errorf("io.ReadAll(resp.Body) failed with %v; want success", err)
return
}
@@ -488,9 +579,9 @@ func testABECreateBody(t *testing.T, port int) {
return
}
defer resp.Body.Close()
- buf, err := ioutil.ReadAll(resp.Body)
+ buf, err := io.ReadAll(resp.Body)
if err != nil {
- t.Errorf("ioutil.ReadAll(resp.Body) failed with %v; want success", err)
+ t.Errorf("io.ReadAll(resp.Body) failed with %v; want success", err)
return
}
@@ -513,7 +604,7 @@ func testABECreateBody(t *testing.T, port int) {
}
}
-func testABEBulkCreate(t *testing.T, port int) {
+func testABEBulkCreate(t *testing.T, port int, useTrailers bool) {
count := 0
r, w := io.Pipe()
go func(w io.WriteCloser) {
@@ -598,15 +689,28 @@ func testABEBulkCreate(t *testing.T, port int) {
}
}(w)
apiURL := fmt.Sprintf("http://localhost:%d/v1/example/a_bit_of_everything/bulk", port)
- resp, err := http.Post(apiURL, "application/json", r)
+
+ req, err := http.NewRequest("POST", apiURL, r)
if err != nil {
- t.Errorf("http.Post(%q) failed with %v; want success", apiURL, err)
+ t.Errorf("http.NewRequest() failed with %v; want success", err)
return
}
+ req.Header.Set("Content-Type", "application/json")
+
+ if useTrailers {
+ req.Header.Set("TE", "trailers")
+ }
+
+ resp, err := http.DefaultClient.Do(req)
+ if err != nil {
+ t.Errorf("client.Do(%v) failed with %v; want success", req, err)
+ return
+ }
+
defer resp.Body.Close()
- buf, err := ioutil.ReadAll(resp.Body)
+ buf, err := io.ReadAll(resp.Body)
if err != nil {
- t.Errorf("ioutil.ReadAll(resp.Body) failed with %v; want success", err)
+ t.Errorf("io.ReadAll(resp.Body) failed with %v; want success", err)
return
}
@@ -625,11 +729,18 @@ func testABEBulkCreate(t *testing.T, port int) {
t.Errorf("Grpc-Metadata-Count was %q, wanted %q", got, want)
}
- if got, want := resp.Trailer.Get("Grpc-Trailer-Foo"), "foo2"; got != want {
- t.Errorf("Grpc-Trailer-Foo was %q, wanted %q", got, want)
+ wantedTrailers := map[bool]map[string]string{
+ true: {
+ "Grpc-Trailer-Foo": "foo2",
+ "Grpc-Trailer-Bar": "bar2",
+ },
+ false: {},
}
- if got, want := resp.Trailer.Get("Grpc-Trailer-Bar"), "bar2"; got != want {
- t.Errorf("Grpc-Trailer-Bar was %q, wanted %q", got, want)
+
+ for trailer, want := range wantedTrailers[useTrailers] {
+ if got := resp.Trailer.Get(trailer); got != want {
+ t.Errorf("%s was %q, wanted %q", trailer, got, want)
+ }
}
}
@@ -680,9 +791,9 @@ func testABEBulkCreateWithError(t *testing.T, port int) {
return
}
defer resp.Body.Close()
- buf, err := ioutil.ReadAll(resp.Body)
+ buf, err := io.ReadAll(resp.Body)
if err != nil {
- t.Errorf("ioutil.ReadAll(resp.Body) failed with %v; want success", err)
+ t.Errorf("io.ReadAll(resp.Body) failed with %v; want success", err)
return
}
@@ -707,9 +818,9 @@ func testABELookup(t *testing.T, port int) {
return
}
defer cresp.Body.Close()
- buf, err := ioutil.ReadAll(cresp.Body)
+ buf, err := io.ReadAll(cresp.Body)
if err != nil {
- t.Errorf("ioutil.ReadAll(cresp.Body) failed with %v; want success", err)
+ t.Errorf("io.ReadAll(cresp.Body) failed with %v; want success", err)
return
}
if got, want := cresp.StatusCode, http.StatusOK; got != want {
@@ -732,9 +843,9 @@ func testABELookup(t *testing.T, port int) {
}
defer resp.Body.Close()
- buf, err = ioutil.ReadAll(resp.Body)
+ buf, err = io.ReadAll(resp.Body)
if err != nil {
- t.Errorf("ioutil.ReadAll(resp.Body) failed with %v; want success", err)
+ t.Errorf("io.ReadAll(resp.Body) failed with %v; want success", err)
return
}
@@ -781,7 +892,7 @@ func TestABEPatch(t *testing.T) {
t.Fatalf("failed to issue PATCH request: %v", err)
}
if got, want := patchResp.StatusCode, http.StatusOK; got != want {
- if body, err := ioutil.ReadAll(patchResp.Body); err != nil {
+ if body, err := io.ReadAll(patchResp.Body); err != nil {
t.Errorf("patchResp body couldn't be read: %v", err)
} else {
t.Errorf("patchResp.StatusCode= %d; want %d resp: %v", got, want, string(body))
@@ -914,7 +1025,7 @@ func TestABEPatchBody(t *testing.T) {
t.Fatalf("failed to issue PATCH request: %v", err)
}
if got, want := patchResp.StatusCode, http.StatusOK; got != want {
- if body, err := ioutil.ReadAll(patchResp.Body); err != nil {
+ if body, err := io.ReadAll(patchResp.Body); err != nil {
t.Errorf("patchResp body couldn't be read: %v", err)
} else {
t.Errorf("patchResp.StatusCode= %d; want %d resp: %v", got, want, string(body))
@@ -949,7 +1060,7 @@ func postABE(t *testing.T, port int, abe *examplepb.ABitOfEverything) (uuid stri
t.Fatalf("http.Post(%q) failed with %v; want success", apiURL, err)
return
}
- body, err := ioutil.ReadAll(postResp.Body)
+ body, err := io.ReadAll(postResp.Body)
if err != nil {
t.Fatalf("postResp body couldn't be read: %v", err)
}
@@ -978,7 +1089,7 @@ func getABE(t *testing.T, port int, uuid string) *examplepb.ABitOfEverything {
t.Fatalf("getResp.StatusCode= %d, want %d. resp: %v", got, want, getResp)
}
var getRestatuspbody examplepb.ABitOfEverything
- body, err := ioutil.ReadAll(getResp.Body)
+ body, err := io.ReadAll(getResp.Body)
if err != nil {
t.Fatalf("getResp body couldn't be read: %v", err)
}
@@ -994,7 +1105,6 @@ func testABELookupNotFound(t *testing.T, port int, useTrailers bool) {
uuid := "not_exist"
apiURL = fmt.Sprintf("%s/%s", apiURL, uuid)
- client := &http.Client{}
req, err := http.NewRequest("GET", apiURL, nil)
if err != nil {
t.Errorf("http.NewRequest() failed with %v; want success", err)
@@ -1005,16 +1115,16 @@ func testABELookupNotFound(t *testing.T, port int, useTrailers bool) {
req.Header.Set("TE", "trailers")
}
- resp, err := client.Do(req)
+ resp, err := http.DefaultClient.Do(req)
if err != nil {
t.Errorf("client.Do(%v) failed with %v; want success", req, err)
return
}
defer resp.Body.Close()
- buf, err := ioutil.ReadAll(resp.Body)
+ buf, err := io.ReadAll(resp.Body)
if err != nil {
- t.Errorf("ioutil.ReadAll(resp.Body) failed with %v; want success", err)
+ t.Errorf("io.ReadAll(resp.Body) failed with %v; want success", err)
return
}
@@ -1044,7 +1154,7 @@ func testABELookupNotFound(t *testing.T, port int, useTrailers bool) {
t.Errorf("Grpc-Metadata-Uuid was %s, wanted %s", got, want)
}
- var trailers = map[bool]map[string]string{
+ trailers := map[bool]map[string]string{
true: {
"Grpc-Trailer-Foo": "foo2",
"Grpc-Trailer-Bar": "bar2",
@@ -1298,9 +1408,9 @@ func testAdditionalBindings(t *testing.T, port int) {
}
defer resp.Body.Close()
- buf, err := ioutil.ReadAll(resp.Body)
+ buf, err := io.ReadAll(resp.Body)
if err != nil {
- t.Errorf("ioutil.ReadAll(resp.Body) failed with %v; want success; i=%d", err, i)
+ t.Errorf("io.ReadAll(resp.Body) failed with %v; want success; i=%d", err, i)
return
}
if got, want := resp.StatusCode, http.StatusOK; got != want {
@@ -1417,9 +1527,9 @@ func testABERepeated(t *testing.T, port int) {
return
}
defer resp.Body.Close()
- buf, err := ioutil.ReadAll(resp.Body)
+ buf, err := io.ReadAll(resp.Body)
if err != nil {
- t.Errorf("ioutil.ReadAll(resp.Body) failed with %v; want success", err)
+ t.Errorf("io.ReadAll(resp.Body) failed with %v; want success", err)
return
}
@@ -1463,6 +1573,31 @@ func TestTimeout(t *testing.T) {
}
}
+func TestInvalidTimeout(t *testing.T) {
+ if testing.Short() {
+ t.Skip()
+ return
+ }
+
+ apiURL := "http://localhost:8088/v2/example/timeout"
+ req, err := http.NewRequest("GET", apiURL, nil)
+ if err != nil {
+ t.Errorf(`http.NewRequest("GET", %q, nil) failed with %v; want success`, apiURL, err)
+ return
+ }
+ req.Header.Set("Grpc-Timeout", "INVALID")
+ resp, err := http.DefaultClient.Do(req)
+ if err != nil {
+ t.Errorf("http.DefaultClient.Do(%#v) failed with %v; want success", req, err)
+ return
+ }
+ defer resp.Body.Close()
+
+ if got, want := resp.StatusCode, http.StatusBadRequest; got != want {
+ t.Errorf("resp.StatusCode = %d; want %d", got, want)
+ }
+}
+
func TestPostWithEmptyBody(t *testing.T) {
if testing.Short() {
t.Skip()
@@ -1471,7 +1606,6 @@ func TestPostWithEmptyBody(t *testing.T) {
apiURL := "http://localhost:8088/v2/example/postwithemptybody/name"
rep, err := http.Post(apiURL, "application/json", nil)
-
if err != nil {
t.Errorf("http.Post(%q) failed with %v; want success", apiURL, err)
return
@@ -1497,9 +1631,9 @@ func TestUnknownPath(t *testing.T) {
return
}
defer resp.Body.Close()
- buf, err := ioutil.ReadAll(resp.Body)
+ buf, err := io.ReadAll(resp.Body)
if err != nil {
- t.Errorf("ioutil.ReadAll(resp.Body) failed with %v; want success", err)
+ t.Errorf("io.ReadAll(resp.Body) failed with %v; want success", err)
return
}
@@ -1522,12 +1656,11 @@ func TestNotImplemented(t *testing.T) {
return
}
defer resp.Body.Close()
- buf, err := ioutil.ReadAll(resp.Body)
+ buf, err := io.ReadAll(resp.Body)
if err != nil {
- t.Errorf("ioutil.ReadAll(resp.Body) failed with %v; want success", err)
+ t.Errorf("io.ReadAll(resp.Body) failed with %v; want success", err)
return
}
-
if got, want := resp.StatusCode, http.StatusNotImplemented; got != want {
t.Errorf("resp.StatusCode = %d; want %d", got, want)
t.Logf("%s", buf)
@@ -1547,9 +1680,9 @@ func TestInvalidArgument(t *testing.T) {
return
}
defer resp.Body.Close()
- buf, err := ioutil.ReadAll(resp.Body)
+ buf, err := io.ReadAll(resp.Body)
if err != nil {
- t.Errorf("ioutil.ReadAll(resp.Body) failed with %v; want success", err)
+ t.Errorf("io.ReadAll(resp.Body) failed with %v; want success", err)
return
}
@@ -1592,9 +1725,9 @@ func testResponseBody(t *testing.T, port int) {
}
defer resp.Body.Close()
- buf, err := ioutil.ReadAll(resp.Body)
+ buf, err := io.ReadAll(resp.Body)
if err != nil {
- t.Fatalf("ioutil.ReadAll(resp.Body) failed with %v; want success", err)
+ t.Fatalf("io.ReadAll(resp.Body) failed with %v; want success", err)
}
if got, want := resp.StatusCode, tt.wantStatus; got != want {
@@ -1672,9 +1805,9 @@ func testResponseBodies(t *testing.T, port int) {
return
}
defer resp.Body.Close()
- buf, err := ioutil.ReadAll(resp.Body)
+ buf, err := io.ReadAll(resp.Body)
if err != nil {
- t.Errorf("ioutil.ReadAll(resp.Body) failed with %v; want success", err)
+ t.Errorf("io.ReadAll(resp.Body) failed with %v; want success", err)
return
}
@@ -1729,9 +1862,9 @@ func testResponseStrings(t *testing.T, port int) {
return
}
defer resp.Body.Close()
- buf, err := ioutil.ReadAll(resp.Body)
+ buf, err := io.ReadAll(resp.Body)
if err != nil {
- t.Errorf("ioutil.ReadAll(resp.Body) failed with %v; want success", err)
+ t.Errorf("io.ReadAll(resp.Body) failed with %v; want success", err)
return
}
@@ -1760,9 +1893,9 @@ func testResponseStrings(t *testing.T, port int) {
return
}
defer resp.Body.Close()
- buf, err := ioutil.ReadAll(resp.Body)
+ buf, err := io.ReadAll(resp.Body)
if err != nil {
- t.Errorf("ioutil.ReadAll(resp.Body) failed with %v; want success", err)
+ t.Errorf("io.ReadAll(resp.Body) failed with %v; want success", err)
return
}
@@ -1791,9 +1924,9 @@ func testResponseStrings(t *testing.T, port int) {
return
}
defer resp.Body.Close()
- buf, err := ioutil.ReadAll(resp.Body)
+ buf, err := io.ReadAll(resp.Body)
if err != nil {
- t.Errorf("ioutil.ReadAll(resp.Body) failed with %v; want success", err)
+ t.Errorf("io.ReadAll(resp.Body) failed with %v; want success", err)
return
}
@@ -1818,7 +1951,6 @@ func testResponseStrings(t *testing.T, port int) {
t.Errorf(diff)
}
})
-
}
func TestRequestQueryParams(t *testing.T) {
@@ -1929,9 +2061,9 @@ func testRequestQueryParams(t *testing.T, port int) {
}
defer resp.Body.Close()
- buf, err := ioutil.ReadAll(resp.Body)
+ buf, err := io.ReadAll(resp.Body)
if err != nil {
- t.Errorf("ioutil.ReadAll(resp.Body) failed with %v; want success", err)
+ t.Errorf("io.ReadAll(resp.Body) failed with %v; want success", err)
return
}
@@ -2160,7 +2292,7 @@ func testNonStandardNames(t *testing.T, port int, method string, jsonBody string
t.Fatalf("failed to issue PATCH request: %v", err)
}
- body, err := ioutil.ReadAll(patchResp.Body)
+ body, err := io.ReadAll(patchResp.Body)
if err != nil {
t.Errorf("patchResp body couldn't be read: %v", err)
}
@@ -2180,3 +2312,122 @@ func testNonStandardNames(t *testing.T, port int, method string, jsonBody string
t.Errorf(diff)
}
}
+
+func testABEExists(t *testing.T, port int) {
+ apiURL := fmt.Sprintf("http://localhost:%d/v1/example/a_bit_of_everything", port)
+ cresp, err := http.Post(apiURL, "application/json", strings.NewReader(`
+ {"bool_value": true, "string_value": "strprefix/example"}
+ `))
+ if err != nil {
+ t.Errorf("http.Post(%q) failed with %v; want success", apiURL, err)
+ return
+ }
+ defer cresp.Body.Close()
+ buf, err := io.ReadAll(cresp.Body)
+ if err != nil {
+ t.Errorf("io.ReadAll(cresp.Body) failed with %v; want success", err)
+ return
+ }
+ if got, want := cresp.StatusCode, http.StatusOK; got != want {
+ t.Errorf("resp.StatusCode = %d; want %d", got, want)
+ t.Logf("%s", buf)
+ return
+ }
+
+ want := new(examplepb.ABitOfEverything)
+ if err := marshaler.Unmarshal(buf, want); err != nil {
+ t.Errorf("marshaler.Unmarshal(%s, want) failed with %v; want success", buf, err)
+ return
+ }
+
+ apiURL = fmt.Sprintf("%s/%s", apiURL, want.Uuid)
+ resp, err := http.Head(apiURL)
+ if err != nil {
+ t.Errorf("http.Head(%q) failed with %v; want success", apiURL, err)
+ return
+ }
+ defer resp.Body.Close()
+
+ if got, want := resp.StatusCode, http.StatusOK; got != want {
+ t.Errorf("resp.StatusCode = %d; want %d", got, want)
+ t.Logf("%s", buf)
+ }
+}
+
+func testABEExistsNotFound(t *testing.T, port int) {
+ apiURL := fmt.Sprintf("http://localhost:%d/v1/example/a_bit_of_everything", port)
+ apiURL = fmt.Sprintf("%s/%s", apiURL, "not_exist")
+ resp, err := http.Head(apiURL)
+ if err != nil {
+ t.Errorf("http.Head(%q) failed with %v; want success", apiURL, err)
+ return
+ }
+ defer resp.Body.Close()
+
+ if got, want := resp.StatusCode, http.StatusNotFound; got != want {
+ t.Errorf("resp.StatusCode = %d; want %d", got, want)
+ return
+ }
+}
+
+func testABEOptions(t *testing.T, port int) {
+ apiURL := fmt.Sprintf("http://localhost:%d/v1/example/a_bit_of_everything/test", port)
+ req, err := http.NewRequest(http.MethodOptions, apiURL, strings.NewReader(`
+ {"bool_value": true, "string_value": "strprefix/example"}
+ `))
+ req.Header.Set("Content-Type", "application/json")
+ if err != nil {
+ t.Errorf("http.NewRequest(http.MethodTrace, %q, ...) failed with %v; want success", apiURL, err)
+ return
+ }
+ client := &http.Client{}
+ resp, err := client.Do(req)
+ if err != nil {
+ t.Fatal(err)
+ }
+ defer resp.Body.Close()
+ if got, want := resp.StatusCode, http.StatusOK; got != want {
+ t.Errorf("resp.StatusCode = %d; want %d", got, want)
+ return
+ }
+
+ value := resp.Header.Get("Grpc-Metadata-Allow")
+ if value != "OPTIONS, GET, HEAD, POST, PUT, TRACE" {
+ t.Errorf("Grpc-Metadata-Allow does not have the expected HTTP methods")
+ t.Logf("%s", value)
+ }
+}
+
+func testABETrace(t *testing.T, port int) {
+ apiURL := fmt.Sprintf("http://localhost:%d/v1/example/a_bit_of_everything/test", port)
+ req, err := http.NewRequest(http.MethodTrace, apiURL, strings.NewReader(`
+ {"bool_value": true, "string_value": "strprefix/example"}
+ `))
+ req.Header.Set("Content-Type", "application/json")
+ if err != nil {
+ t.Errorf("http.NewRequest(http.MethodTrace, %q, ...) failed with %v; want success", apiURL, err)
+ return
+ }
+ client := &http.Client{}
+ resp, err := client.Do(req)
+ if err != nil {
+ t.Fatal(err)
+ }
+ defer resp.Body.Close()
+ buf, err := io.ReadAll(resp.Body)
+ if err != nil {
+ t.Errorf("io.ReadAll(cresp.Body) failed with %v; want success", err)
+ return
+ }
+ if got, want := resp.StatusCode, http.StatusOK; got != want {
+ t.Errorf("resp.StatusCode = %d; want %d", got, want)
+ t.Logf("%s", buf)
+ return
+ }
+
+ want := new(examplepb.ABitOfEverything)
+ if err := marshaler.Unmarshal(buf, want); err != nil {
+ t.Errorf("marshaler.Unmarshal(%s, want) failed with %v; want success", buf, err)
+ return
+ }
+}
diff --git a/examples/internal/proto/examplepb/BUILD.bazel b/examples/internal/proto/examplepb/BUILD.bazel
index 1abcb8bfedd..fb887c73534 100644
--- a/examples/internal/proto/examplepb/BUILD.bazel
+++ b/examples/internal/proto/examplepb/BUILD.bazel
@@ -28,6 +28,8 @@ package(default_visibility = ["//visibility:public"])
# gazelle:exclude wrappers_grpc.pb.go
# gazelle:exclude unannotated_echo_service.pb.gw.go
# gazelle:exclude unannotated_echo_service_grpc.pb.go
+# gazelle:exclude visibility_rule_echo_service.pb.gw.go
+# gazelle:exclude visibility_rule_echo_service_grpc.pb.go
# gazelle:exclude openapi_merge_a.proto
# gazelle:exclude openapi_merge_b.proto
# gazelle:go_grpc_compilers //:go_apiv2, //:go_grpc, //protoc-gen-grpc-gateway:go_gen_grpc_gateway
@@ -52,9 +54,11 @@ proto_library(
"stream.proto",
"unannotated_echo_service.proto",
"use_go_template.proto",
+ "visibility_rule_echo_service.proto",
"wrappers.proto",
],
deps = [
+ "//examples/internal/proto/oneofenum:oneofenum_proto",
"//examples/internal/proto/pathenum:pathenum_proto",
"//examples/internal/proto/sub:sub_proto",
"//examples/internal/proto/sub2:sub2_proto",
@@ -67,6 +71,7 @@ proto_library(
"@com_google_protobuf//:wrappers_proto",
"@go_googleapis//google/api:annotations_proto",
"@go_googleapis//google/api:httpbody_proto",
+ "@go_googleapis//google/api:visibility_proto",
"@go_googleapis//google/rpc:status_proto",
],
)
@@ -94,20 +99,22 @@ go_proto_library(
importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/examplepb",
proto = ":examplepb_proto",
deps = [
- "//examples/internal/proto/pathenum:go_default_library",
- "//examples/internal/proto/sub:go_default_library",
- "//examples/internal/proto/sub2:go_default_library",
- "//protoc-gen-openapiv2/options:go_default_library",
+ "//examples/internal/proto/oneofenum",
+ "//examples/internal/proto/pathenum",
+ "//examples/internal/proto/sub",
+ "//examples/internal/proto/sub2",
+ "//protoc-gen-openapiv2/options",
"@com_github_golang_protobuf//descriptor:go_default_library_gen", # keep
"@go_googleapis//google/api:annotations_go_proto",
"@go_googleapis//google/api:httpbody_go_proto",
+ "@go_googleapis//google/api:visibility_go_proto",
"@go_googleapis//google/rpc:status_go_proto",
"@org_golang_google_protobuf//proto:go_default_library", # keep
],
)
go_library(
- name = "go_default_library",
+ name = "examplepb",
srcs = [
"openapi_merge_a.pb.go",
"openapi_merge_a.pb.gw.go",
@@ -119,17 +126,17 @@ go_library(
embed = [":examplepb_go_proto"],
importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/examplepb",
deps = [
- "//runtime:go_default_library",
- "//utilities:go_default_library",
+ "//runtime",
+ "//utilities",
"@go_googleapis//google/api:annotations_go_proto",
"@org_golang_google_grpc//:go_default_library",
- "@org_golang_google_grpc//codes:go_default_library",
- "@org_golang_google_grpc//grpclog:go_default_library",
- "@org_golang_google_grpc//metadata:go_default_library",
- "@org_golang_google_grpc//status:go_default_library",
- "@org_golang_google_protobuf//proto:go_default_library",
- "@org_golang_google_protobuf//reflect/protoreflect:go_default_library",
- "@org_golang_google_protobuf//runtime/protoimpl:go_default_library",
+ "@org_golang_google_grpc//codes",
+ "@org_golang_google_grpc//grpclog",
+ "@org_golang_google_grpc//metadata",
+ "@org_golang_google_grpc//status",
+ "@org_golang_google_protobuf//proto",
+ "@org_golang_google_protobuf//reflect/protoreflect",
+ "@org_golang_google_protobuf//runtime/protoimpl",
],
)
@@ -149,3 +156,9 @@ protoc_gen_openapiv2(
proto = ":openapi_merge_proto",
single_output = True, # Outputs a single swagger.json file.
)
+
+alias(
+ name = "go_default_library",
+ actual = ":examplepb",
+ visibility = ["//examples:__subpackages__"],
+)
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 8fbf7fedefc..cd02596624c 100644
--- a/examples/internal/proto/examplepb/a_bit_of_everything.pb.go
+++ b/examples/internal/proto/examplepb/a_bit_of_everything.pb.go
@@ -1,25 +1,26 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.26.0
-// protoc v3.13.0
+// protoc-gen-go v1.27.1
+// protoc (unknown)
// source: examples/internal/proto/examplepb/a_bit_of_everything.proto
package examplepb
import (
- duration "github.com/golang/protobuf/ptypes/duration"
- empty "github.com/golang/protobuf/ptypes/empty"
- timestamp "github.com/golang/protobuf/ptypes/timestamp"
- wrappers "github.com/golang/protobuf/ptypes/wrappers"
+ oneofenum "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/oneofenum"
pathenum "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/pathenum"
sub "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/sub"
sub2 "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/sub2"
_ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"
_ "google.golang.org/genproto/googleapis/api/annotations"
status "google.golang.org/genproto/googleapis/rpc/status"
- field_mask "google.golang.org/genproto/protobuf/field_mask"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ durationpb "google.golang.org/protobuf/types/known/durationpb"
+ emptypb "google.golang.org/protobuf/types/known/emptypb"
+ fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb"
+ timestamppb "google.golang.org/protobuf/types/known/timestamppb"
+ wrapperspb "google.golang.org/protobuf/types/known/wrapperspb"
reflect "reflect"
sync "sync"
)
@@ -80,6 +81,108 @@ func (NumericEnum) EnumDescriptor() ([]byte, []int) {
return file_examples_internal_proto_examplepb_a_bit_of_everything_proto_rawDescGZIP(), []int{0}
}
+// Ignoring lint warnings as this enum type exist to validate proper functionality
+// for projects that don't follow these lint rules.
+// buf:lint:ignore ENUM_PASCAL_CASE
+type SnakeCaseEnum int32
+
+const (
+ // buf:lint:ignore ENUM_VALUE_UPPER_SNAKE_CASE
+ SnakeCaseEnum_value_c SnakeCaseEnum = 0
+ // buf:lint:ignore ENUM_VALUE_UPPER_SNAKE_CASE
+ SnakeCaseEnum_value_d SnakeCaseEnum = 1
+)
+
+// Enum value maps for SnakeCaseEnum.
+var (
+ SnakeCaseEnum_name = map[int32]string{
+ 0: "value_c",
+ 1: "value_d",
+ }
+ SnakeCaseEnum_value = map[string]int32{
+ "value_c": 0,
+ "value_d": 1,
+ }
+)
+
+func (x SnakeCaseEnum) Enum() *SnakeCaseEnum {
+ p := new(SnakeCaseEnum)
+ *p = x
+ return p
+}
+
+func (x SnakeCaseEnum) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (SnakeCaseEnum) Descriptor() protoreflect.EnumDescriptor {
+ return file_examples_internal_proto_examplepb_a_bit_of_everything_proto_enumTypes[1].Descriptor()
+}
+
+func (SnakeCaseEnum) Type() protoreflect.EnumType {
+ return &file_examples_internal_proto_examplepb_a_bit_of_everything_proto_enumTypes[1]
+}
+
+func (x SnakeCaseEnum) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use SnakeCaseEnum.Descriptor instead.
+func (SnakeCaseEnum) EnumDescriptor() ([]byte, []int) {
+ return file_examples_internal_proto_examplepb_a_bit_of_everything_proto_rawDescGZIP(), []int{1}
+}
+
+// Ignoring lint warnings as this enum type exist to validate proper functionality
+// for projects that don't follow these lint rules.
+// buf:lint:ignore ENUM_PASCAL_CASE
+type SnakeCase_0Enum int32
+
+const (
+ // buf:lint:ignore ENUM_VALUE_UPPER_SNAKE_CASE
+ SnakeCase_0Enum_value_e SnakeCase_0Enum = 0
+ // buf:lint:ignore ENUM_VALUE_UPPER_SNAKE_CASE
+ SnakeCase_0Enum_value_f SnakeCase_0Enum = 1
+)
+
+// Enum value maps for SnakeCase_0Enum.
+var (
+ SnakeCase_0Enum_name = map[int32]string{
+ 0: "value_e",
+ 1: "value_f",
+ }
+ SnakeCase_0Enum_value = map[string]int32{
+ "value_e": 0,
+ "value_f": 1,
+ }
+)
+
+func (x SnakeCase_0Enum) Enum() *SnakeCase_0Enum {
+ p := new(SnakeCase_0Enum)
+ *p = x
+ return p
+}
+
+func (x SnakeCase_0Enum) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (SnakeCase_0Enum) Descriptor() protoreflect.EnumDescriptor {
+ return file_examples_internal_proto_examplepb_a_bit_of_everything_proto_enumTypes[2].Descriptor()
+}
+
+func (SnakeCase_0Enum) Type() protoreflect.EnumType {
+ return &file_examples_internal_proto_examplepb_a_bit_of_everything_proto_enumTypes[2]
+}
+
+func (x SnakeCase_0Enum) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use SnakeCase_0Enum.Descriptor instead.
+func (SnakeCase_0Enum) EnumDescriptor() ([]byte, []int) {
+ return file_examples_internal_proto_examplepb_a_bit_of_everything_proto_rawDescGZIP(), []int{2}
+}
+
// DeepEnum is one or zero.
type ABitOfEverything_Nested_DeepEnum int32
@@ -113,11 +216,11 @@ func (x ABitOfEverything_Nested_DeepEnum) String() string {
}
func (ABitOfEverything_Nested_DeepEnum) Descriptor() protoreflect.EnumDescriptor {
- return file_examples_internal_proto_examplepb_a_bit_of_everything_proto_enumTypes[1].Descriptor()
+ return file_examples_internal_proto_examplepb_a_bit_of_everything_proto_enumTypes[3].Descriptor()
}
func (ABitOfEverything_Nested_DeepEnum) Type() protoreflect.EnumType {
- return &file_examples_internal_proto_examplepb_a_bit_of_everything_proto_enumTypes[1]
+ return &file_examples_internal_proto_examplepb_a_bit_of_everything_proto_enumTypes[3]
}
func (x ABitOfEverything_Nested_DeepEnum) Number() protoreflect.EnumNumber {
@@ -275,7 +378,7 @@ type ABitOfEverything struct {
MappedStringValue map[string]string `protobuf:"bytes,23,rep,name=mapped_string_value,json=mappedStringValue,proto3" json:"mapped_string_value,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
MappedNestedValue map[string]*ABitOfEverything_Nested `protobuf:"bytes,24,rep,name=mapped_nested_value,json=mappedNestedValue,proto3" json:"mapped_nested_value,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
NonConventionalNameValue string `protobuf:"bytes,26,opt,name=nonConventionalNameValue,proto3" json:"nonConventionalNameValue,omitempty"`
- TimestampValue *timestamp.Timestamp `protobuf:"bytes,27,opt,name=timestamp_value,json=timestampValue,proto3" json:"timestamp_value,omitempty"`
+ TimestampValue *timestamppb.Timestamp `protobuf:"bytes,27,opt,name=timestamp_value,json=timestampValue,proto3" json:"timestamp_value,omitempty"`
// repeated enum value. it is comma-separated in query
RepeatedEnumValue []NumericEnum `protobuf:"varint,28,rep,packed,name=repeated_enum_value,json=repeatedEnumValue,proto3,enum=grpc.gateway.examples.internal.proto.examplepb.NumericEnum" json:"repeated_enum_value,omitempty"`
// repeated numeric enum comment (This comment is overridden by the field annotation)
@@ -294,6 +397,23 @@ type ABitOfEverything struct {
// mark a field as readonly in Open API definition
OutputOnlyStringViaFieldBehaviorAnnotation string `protobuf:"bytes,39,opt,name=output_only_string_via_field_behavior_annotation,json=outputOnlyStringViaFieldBehaviorAnnotation,proto3" json:"output_only_string_via_field_behavior_annotation,omitempty"`
OptionalStringValue *string `protobuf:"bytes,40,opt,name=optional_string_value,json=optionalStringValue,proto3,oneof" json:"optional_string_value,omitempty"`
+ // Test openapiv2 generation of repeated fields
+ ProductId []string `protobuf:"bytes,41,rep,name=product_id,json=productId,proto3" json:"product_id,omitempty"`
+ // Test openapiv2 generation of required fields with annotation and jsonschema to reproduce
+ OptionalStringField string `protobuf:"bytes,42,opt,name=optional_string_field,json=optionalStringField,proto3" json:"optional_string_field,omitempty"`
+ RequiredStringField_1 string `protobuf:"bytes,43,opt,name=required_string_field_1,json=requiredStringField1,proto3" json:"required_string_field_1,omitempty"`
+ RequiredStringField_2 string `protobuf:"bytes,44,opt,name=required_string_field_2,json=requiredStringField2,proto3" json:"required_string_field_2,omitempty"`
+ // Test openapiv2 handling of required json_name fields
+ RequiredFieldBehaviorJsonName string `protobuf:"bytes,45,opt,name=required_field_behavior_json_name,json=required_field_behavior_json_name_custom,proto3" json:"required_field_behavior_json_name,omitempty"`
+ RequiredFieldSchemaJsonName string `protobuf:"bytes,46,opt,name=required_field_schema_json_name,json=required_field_schema_json_name_custom,proto3" json:"required_field_schema_json_name,omitempty"`
+ TrailingOnly string `protobuf:"bytes,47,opt,name=trailing_only,json=trailingOnly,proto3" json:"trailing_only,omitempty"` // Trailing only
+ TrailingOnlyDot string `protobuf:"bytes,48,opt,name=trailing_only_dot,json=trailingOnlyDot,proto3" json:"trailing_only_dot,omitempty"` // Trailing only dot.
+ // Leading both
+ TrailingBoth string `protobuf:"bytes,49,opt,name=trailing_both,json=trailingBoth,proto3" json:"trailing_both,omitempty"` // Trailing both.
+ // Leading multiline
+ //
+ // This is an example of a multi-line comment.
+ TrailingMultiline string `protobuf:"bytes,50,opt,name=trailing_multiline,json=trailingMultiline,proto3" json:"trailing_multiline,omitempty"` // Trailing multiline.
}
func (x *ABitOfEverything) Reset() {
@@ -437,14 +557,14 @@ func (x *ABitOfEverything) GetPathEnumValue() pathenum.PathEnum {
if x != nil {
return x.PathEnumValue
}
- return pathenum.PathEnum_ABC
+ return pathenum.PathEnum(0)
}
func (x *ABitOfEverything) GetNestedPathEnumValue() pathenum.MessagePathEnum_NestedPathEnum {
if x != nil {
return x.NestedPathEnumValue
}
- return pathenum.MessagePathEnum_GHI
+ return pathenum.MessagePathEnum_NestedPathEnum(0)
}
func (x *ABitOfEverything) GetSfixed32Value() int32 {
@@ -489,7 +609,7 @@ func (m *ABitOfEverything) GetOneofValue() isABitOfEverything_OneofValue {
return nil
}
-func (x *ABitOfEverything) GetOneofEmpty() *empty.Empty {
+func (x *ABitOfEverything) GetOneofEmpty() *emptypb.Empty {
if x, ok := x.GetOneofValue().(*ABitOfEverything_OneofEmpty); ok {
return x.OneofEmpty
}
@@ -531,7 +651,7 @@ func (x *ABitOfEverything) GetNonConventionalNameValue() string {
return ""
}
-func (x *ABitOfEverything) GetTimestampValue() *timestamp.Timestamp {
+func (x *ABitOfEverything) GetTimestampValue() *timestamppb.Timestamp {
if x != nil {
return x.TimestampValue
}
@@ -608,12 +728,82 @@ func (x *ABitOfEverything) GetOptionalStringValue() string {
return ""
}
+func (x *ABitOfEverything) GetProductId() []string {
+ if x != nil {
+ return x.ProductId
+ }
+ return nil
+}
+
+func (x *ABitOfEverything) GetOptionalStringField() string {
+ if x != nil {
+ return x.OptionalStringField
+ }
+ return ""
+}
+
+func (x *ABitOfEverything) GetRequiredStringField_1() string {
+ if x != nil {
+ return x.RequiredStringField_1
+ }
+ return ""
+}
+
+func (x *ABitOfEverything) GetRequiredStringField_2() string {
+ if x != nil {
+ return x.RequiredStringField_2
+ }
+ return ""
+}
+
+func (x *ABitOfEverything) GetRequiredFieldBehaviorJsonName() string {
+ if x != nil {
+ return x.RequiredFieldBehaviorJsonName
+ }
+ return ""
+}
+
+func (x *ABitOfEverything) GetRequiredFieldSchemaJsonName() string {
+ if x != nil {
+ return x.RequiredFieldSchemaJsonName
+ }
+ return ""
+}
+
+func (x *ABitOfEverything) GetTrailingOnly() string {
+ if x != nil {
+ return x.TrailingOnly
+ }
+ return ""
+}
+
+func (x *ABitOfEverything) GetTrailingOnlyDot() string {
+ if x != nil {
+ return x.TrailingOnlyDot
+ }
+ return ""
+}
+
+func (x *ABitOfEverything) GetTrailingBoth() string {
+ if x != nil {
+ return x.TrailingBoth
+ }
+ return ""
+}
+
+func (x *ABitOfEverything) GetTrailingMultiline() string {
+ if x != nil {
+ return x.TrailingMultiline
+ }
+ return ""
+}
+
type isABitOfEverything_OneofValue interface {
isABitOfEverything_OneofValue()
}
type ABitOfEverything_OneofEmpty struct {
- OneofEmpty *empty.Empty `protobuf:"bytes,20,opt,name=oneof_empty,json=oneofEmpty,proto3,oneof"`
+ OneofEmpty *emptypb.Empty `protobuf:"bytes,20,opt,name=oneof_empty,json=oneofEmpty,proto3,oneof"`
}
type ABitOfEverything_OneofString struct {
@@ -950,7 +1140,7 @@ type UpdateV2Request struct {
Abe *ABitOfEverything `protobuf:"bytes,1,opt,name=abe,proto3" json:"abe,omitempty"`
// The paths to update.
- UpdateMask *field_mask.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
+ UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
}
func (x *UpdateV2Request) Reset() {
@@ -992,7 +1182,7 @@ func (x *UpdateV2Request) GetAbe() *ABitOfEverything {
return nil
}
-func (x *UpdateV2Request) GetUpdateMask() *field_mask.FieldMask {
+func (x *UpdateV2Request) GetUpdateMask() *fieldmaskpb.FieldMask {
if x != nil {
return x.UpdateMask
}
@@ -1017,7 +1207,7 @@ type Book struct {
// Output only. The book's ID.
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
// Output only. Creation time of the book.
- CreateTime *timestamp.Timestamp `protobuf:"bytes,3,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
+ CreateTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
}
func (x *Book) Reset() {
@@ -1066,7 +1256,7 @@ func (x *Book) GetId() string {
return ""
}
-func (x *Book) GetCreateTime() *timestamp.Timestamp {
+func (x *Book) GetCreateTime() *timestamppb.Timestamp {
if x != nil {
return x.CreateTime
}
@@ -1164,7 +1354,7 @@ type UpdateBookRequest struct {
// Format: publishers/{publisher}/books/{book}
Book *Book `protobuf:"bytes,1,opt,name=book,proto3" json:"book,omitempty"`
// The list of fields to be updated.
- UpdateMask *field_mask.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
+ UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
// If set to true, and the book is not found, a new book will be created.
// In this situation, `update_mask` is ignored.
AllowMissing bool `protobuf:"varint,3,opt,name=allow_missing,json=allowMissing,proto3" json:"allow_missing,omitempty"`
@@ -1209,7 +1399,7 @@ func (x *UpdateBookRequest) GetBook() *Book {
return nil
}
-func (x *UpdateBookRequest) GetUpdateMask() *field_mask.FieldMask {
+func (x *UpdateBookRequest) GetUpdateMask() *fieldmaskpb.FieldMask {
if x != nil {
return x.UpdateMask
}
@@ -1223,21 +1413,18 @@ func (x *UpdateBookRequest) GetAllowMissing() bool {
return false
}
-// Nested is nested type.
-type ABitOfEverything_Nested struct {
+type SnakeEnumRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- // name is nested field.
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
- Amount uint32 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"`
- // DeepEnum comment.
- Ok ABitOfEverything_Nested_DeepEnum `protobuf:"varint,3,opt,name=ok,proto3,enum=grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything_Nested_DeepEnum" json:"ok,omitempty"`
+ What SnakeCaseEnum `protobuf:"varint,1,opt,name=what,proto3,enum=grpc.gateway.examples.internal.proto.examplepb.SnakeCaseEnum" json:"what,omitempty"`
+ Who SnakeCase_0Enum `protobuf:"varint,2,opt,name=who,proto3,enum=grpc.gateway.examples.internal.proto.examplepb.SnakeCase_0Enum" json:"who,omitempty"`
+ Where pathenum.SnakeCaseForImport `protobuf:"varint,3,opt,name=where,proto3,enum=grpc.gateway.examples.internal.pathenum.SnakeCaseForImport" json:"where,omitempty"`
}
-func (x *ABitOfEverything_Nested) Reset() {
- *x = ABitOfEverything_Nested{}
+func (x *SnakeEnumRequest) Reset() {
+ *x = SnakeEnumRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_examples_internal_proto_examplepb_a_bit_of_everything_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -1245,13 +1432,13 @@ func (x *ABitOfEverything_Nested) Reset() {
}
}
-func (x *ABitOfEverything_Nested) String() string {
+func (x *SnakeEnumRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*ABitOfEverything_Nested) ProtoMessage() {}
+func (*SnakeEnumRequest) ProtoMessage() {}
-func (x *ABitOfEverything_Nested) ProtoReflect() protoreflect.Message {
+func (x *SnakeEnumRequest) ProtoReflect() protoreflect.Message {
mi := &file_examples_internal_proto_examplepb_a_bit_of_everything_proto_msgTypes[11]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -1263,740 +1450,1121 @@ func (x *ABitOfEverything_Nested) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use ABitOfEverything_Nested.ProtoReflect.Descriptor instead.
-func (*ABitOfEverything_Nested) Descriptor() ([]byte, []int) {
- return file_examples_internal_proto_examplepb_a_bit_of_everything_proto_rawDescGZIP(), []int{2, 0}
+// Deprecated: Use SnakeEnumRequest.ProtoReflect.Descriptor instead.
+func (*SnakeEnumRequest) Descriptor() ([]byte, []int) {
+ return file_examples_internal_proto_examplepb_a_bit_of_everything_proto_rawDescGZIP(), []int{11}
}
-func (x *ABitOfEverything_Nested) GetName() string {
+func (x *SnakeEnumRequest) GetWhat() SnakeCaseEnum {
if x != nil {
- return x.Name
+ return x.What
+ }
+ return SnakeCaseEnum_value_c
+}
+
+func (x *SnakeEnumRequest) GetWho() SnakeCase_0Enum {
+ if x != nil {
+ return x.Who
+ }
+ return SnakeCase_0Enum_value_e
+}
+
+func (x *SnakeEnumRequest) GetWhere() pathenum.SnakeCaseForImport {
+ if x != nil {
+ return x.Where
+ }
+ return pathenum.SnakeCaseForImport(0)
+}
+
+type SnakeEnumResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *SnakeEnumResponse) Reset() {
+ *x = SnakeEnumResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_examples_internal_proto_examplepb_a_bit_of_everything_proto_msgTypes[12]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SnakeEnumResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SnakeEnumResponse) ProtoMessage() {}
+
+func (x *SnakeEnumResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_examples_internal_proto_examplepb_a_bit_of_everything_proto_msgTypes[12]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use SnakeEnumResponse.ProtoReflect.Descriptor instead.
+func (*SnakeEnumResponse) Descriptor() ([]byte, []int) {
+ return file_examples_internal_proto_examplepb_a_bit_of_everything_proto_rawDescGZIP(), []int{12}
+}
+
+// Required message type -> OpenAPI
+// https://github.com/grpc-ecosystem/grpc-gateway/issues/2837
+type RequiredMessageTypeRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ Foo *Foo `protobuf:"bytes,2,opt,name=foo,proto3" json:"foo,omitempty"`
+}
+
+func (x *RequiredMessageTypeRequest) Reset() {
+ *x = RequiredMessageTypeRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_examples_internal_proto_examplepb_a_bit_of_everything_proto_msgTypes[13]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RequiredMessageTypeRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RequiredMessageTypeRequest) ProtoMessage() {}
+
+func (x *RequiredMessageTypeRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_examples_internal_proto_examplepb_a_bit_of_everything_proto_msgTypes[13]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use RequiredMessageTypeRequest.ProtoReflect.Descriptor instead.
+func (*RequiredMessageTypeRequest) Descriptor() ([]byte, []int) {
+ return file_examples_internal_proto_examplepb_a_bit_of_everything_proto_rawDescGZIP(), []int{13}
+}
+
+func (x *RequiredMessageTypeRequest) GetId() string {
+ if x != nil {
+ return x.Id
}
return ""
}
-func (x *ABitOfEverything_Nested) GetAmount() uint32 {
+func (x *RequiredMessageTypeRequest) GetFoo() *Foo {
if x != nil {
- return x.Amount
+ return x.Foo
}
- return 0
+ return nil
}
-func (x *ABitOfEverything_Nested) GetOk() ABitOfEverything_Nested_DeepEnum {
+type Foo struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Bar *Bar `protobuf:"bytes,1,opt,name=bar,proto3" json:"bar,omitempty"`
+}
+
+func (x *Foo) Reset() {
+ *x = Foo{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_examples_internal_proto_examplepb_a_bit_of_everything_proto_msgTypes[14]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Foo) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Foo) ProtoMessage() {}
+
+func (x *Foo) ProtoReflect() protoreflect.Message {
+ mi := &file_examples_internal_proto_examplepb_a_bit_of_everything_proto_msgTypes[14]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Foo.ProtoReflect.Descriptor instead.
+func (*Foo) Descriptor() ([]byte, []int) {
+ return file_examples_internal_proto_examplepb_a_bit_of_everything_proto_rawDescGZIP(), []int{14}
+}
+
+func (x *Foo) GetBar() *Bar {
if x != nil {
- return x.Ok
+ return x.Bar
}
- return ABitOfEverything_Nested_FALSE
+ return nil
}
-var File_examples_internal_proto_examplepb_a_bit_of_everything_proto protoreflect.FileDescriptor
+type Bar struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
-var file_examples_internal_proto_examplepb_a_bit_of_everything_proto_rawDesc = []byte{
- 0x0a, 0x3b, 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, 0x2f, 0x61, 0x5f, 0x62, 0x69, 0x74, 0x5f, 0x6f, 0x66, 0x5f, 0x65, 0x76, 0x65,
- 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 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, 0x1a, 0x1c, 0x67,
- 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
- 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f,
- 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65,
- 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f,
- 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69,
- 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b,
- 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f,
- 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f,
- 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72,
- 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f,
- 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61,
- 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x30, 0x65, 0x78, 0x61,
- 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70,
- 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x61, 0x74, 0x68, 0x65, 0x6e, 0x75, 0x6d, 0x2f, 0x70, 0x61,
- 0x74, 0x68, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x65,
- 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c,
- 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x75, 0x62, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61,
- 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c,
- 0x65, 0x73, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x2f, 0x73, 0x75, 0x62, 0x32, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x70,
- 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f,
- 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e,
- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70,
- 0x63, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e,
- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61,
- 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e,
- 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc6,
- 0x02, 0x0a, 0x0d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
- 0x12, 0xe1, 0x01, 0x0a, 0x0d, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e,
- 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0xba, 0x01, 0x92, 0x41, 0xb6, 0x01, 0x2a,
- 0x10, 0x78, 0x2d, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x69,
- 0x64, 0x32, 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, 0x4a, 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, 0x8a, 0x01, 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, 0xa2, 0x02,
- 0x04, 0x75, 0x75, 0x69, 0x64, 0x52, 0x0d, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69,
- 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x51, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20,
- 0x01, 0x28, 0x0b, 0x32, 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, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74,
- 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0xa0, 0x01, 0x0a, 0x0b, 0x45, 0x72, 0x72, 0x6f,
- 0x72, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x40, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18,
- 0x01, 0x20, 0x01, 0x28, 0x05, 0x42, 0x2c, 0x92, 0x41, 0x29, 0x2a, 0x04, 0x63, 0x6f, 0x64, 0x65,
- 0x32, 0x0d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x8a,
- 0x01, 0x07, 0x5e, 0x5b, 0x30, 0x2d, 0x39, 0x5d, 0x24, 0xa2, 0x02, 0x07, 0x69, 0x6e, 0x74, 0x65,
- 0x67, 0x65, 0x72, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x4f, 0x0a, 0x07, 0x6d, 0x65, 0x73,
- 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x35, 0x92, 0x41, 0x32, 0x2a,
- 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 0x10, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
- 0x73, 0x65, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x8a, 0x01, 0x14, 0x5e, 0x5b, 0x61,
- 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5d, 0x7b, 0x31, 0x2c, 0x20, 0x33, 0x32, 0x7d,
- 0x24, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xce, 0x1f, 0x0a, 0x10, 0x41,
- 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x12,
- 0x6c, 0x0a, 0x0d, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64,
- 0x18, 0x19, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x47, 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, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76,
- 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x52,
- 0x0c, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x12, 0x68, 0x0a,
- 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x54, 0x92, 0x41, 0x51,
- 0x80, 0x01, 0x01, 0x8a, 0x01, 0x4b, 0x5b, 0x61, 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x30, 0x2d, 0x39,
- 0x5d, 0x7b, 0x38, 0x7d, 0x2d, 0x5b, 0x61, 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x30, 0x2d, 0x39, 0x5d,
- 0x7b, 0x34, 0x7d, 0x2d, 0x5b, 0x61, 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x30, 0x2d, 0x39, 0x5d, 0x7b,
- 0x34, 0x7d, 0x2d, 0x5b, 0x61, 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x30, 0x2d, 0x39, 0x5d, 0x7b, 0x34,
- 0x7d, 0x2d, 0x5b, 0x61, 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x30, 0x2d, 0x39, 0x5d, 0x7b, 0x31, 0x32,
- 0x7d, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x5f, 0x0a, 0x06, 0x6e, 0x65, 0x73, 0x74, 0x65,
- 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x47, 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, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45,
- 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64,
- 0x52, 0x06, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x12, 0x4a, 0x0a, 0x0b, 0x66, 0x6c, 0x6f, 0x61,
- 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x42, 0x29, 0x92,
- 0x41, 0x26, 0x32, 0x11, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20,
- 0x66, 0x69, 0x65, 0x6c, 0x64, 0x3a, 0x03, 0x30, 0x2e, 0x32, 0xd2, 0x01, 0x0b, 0x66, 0x6c, 0x6f,
- 0x61, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x56,
- 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76,
- 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x64, 0x6f, 0x75, 0x62,
- 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, 0x74, 0x36, 0x34,
- 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x69, 0x6e,
- 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x75, 0x69, 0x6e, 0x74,
- 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b,
- 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x69,
- 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05,
- 0x52, 0x0a, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0d,
- 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x08, 0x20,
- 0x01, 0x28, 0x06, 0x52, 0x0c, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75,
- 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c,
- 0x75, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x07, 0x52, 0x0c, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33,
- 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x76,
- 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x62, 0x6f, 0x6f, 0x6c,
- 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f,
- 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x74, 0x72,
- 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x79, 0x74, 0x65,
- 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x62,
- 0x79, 0x74, 0x65, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x75, 0x69, 0x6e,
- 0x74, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0d, 0x52,
- 0x0b, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x5a, 0x0a, 0x0a,
- 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0e,
- 0x32, 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, 0x09, 0x65,
- 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x59, 0x0a, 0x0f, 0x70, 0x61, 0x74, 0x68,
- 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x1e, 0x20, 0x01, 0x28,
- 0x0e, 0x32, 0x31, 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, 0x61, 0x74, 0x68, 0x65, 0x6e, 0x75, 0x6d, 0x2e, 0x50, 0x61, 0x74, 0x68,
- 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x0d, 0x70, 0x61, 0x74, 0x68, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61,
- 0x6c, 0x75, 0x65, 0x12, 0x7c, 0x0a, 0x16, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x61,
- 0x74, 0x68, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x1f, 0x20,
- 0x01, 0x28, 0x0e, 0x32, 0x47, 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, 0x61, 0x74, 0x68, 0x65, 0x6e, 0x75, 0x6d, 0x2e, 0x4d, 0x65,
- 0x73, 0x73, 0x61, 0x67, 0x65, 0x50, 0x61, 0x74, 0x68, 0x45, 0x6e, 0x75, 0x6d, 0x2e, 0x4e, 0x65,
- 0x73, 0x74, 0x65, 0x64, 0x50, 0x61, 0x74, 0x68, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x13, 0x6e, 0x65,
- 0x73, 0x74, 0x65, 0x64, 0x50, 0x61, 0x74, 0x68, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75,
- 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x5f, 0x76, 0x61,
- 0x6c, 0x75, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0f, 0x52, 0x0d, 0x73, 0x66, 0x69, 0x78, 0x65,
- 0x64, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x66, 0x69, 0x78,
- 0x65, 0x64, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x10,
- 0x52, 0x0d, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12,
- 0x21, 0x0a, 0x0c, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,
- 0x11, 0x20, 0x01, 0x28, 0x11, 0x52, 0x0b, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c,
- 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c,
- 0x75, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x12, 0x52, 0x0b, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34,
- 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x32, 0x0a, 0x15, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65,
- 0x64, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x13,
- 0x20, 0x03, 0x28, 0x09, 0x52, 0x13, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x53, 0x74,
- 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x39, 0x0a, 0x0b, 0x6f, 0x6e, 0x65,
- 0x6f, 0x66, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16,
- 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
- 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x48, 0x00, 0x52, 0x0a, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x45,
- 0x6d, 0x70, 0x74, 0x79, 0x12, 0x23, 0x0a, 0x0c, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x73, 0x74,
- 0x72, 0x69, 0x6e, 0x67, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x6f, 0x6e,
- 0x65, 0x6f, 0x66, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x6b, 0x0a, 0x09, 0x6d, 0x61, 0x70,
- 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x16, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4e, 0x2e, 0x67,
- 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x65, 0x78, 0x61, 0x6d,
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+}
+
+func (x *Bar) Reset() {
+ *x = Bar{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_examples_internal_proto_examplepb_a_bit_of_everything_proto_msgTypes[15]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Bar) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Bar) ProtoMessage() {}
+
+func (x *Bar) ProtoReflect() protoreflect.Message {
+ mi := &file_examples_internal_proto_examplepb_a_bit_of_everything_proto_msgTypes[15]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Bar.ProtoReflect.Descriptor instead.
+func (*Bar) Descriptor() ([]byte, []int) {
+ return file_examples_internal_proto_examplepb_a_bit_of_everything_proto_rawDescGZIP(), []int{15}
+}
+
+func (x *Bar) GetId() string {
+ if x != nil {
+ return x.Id
+ }
+ return ""
+}
+
+// Nested is nested type.
+type ABitOfEverything_Nested struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // name is nested field.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ Amount uint32 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"`
+ // DeepEnum comment.
+ Ok ABitOfEverything_Nested_DeepEnum `protobuf:"varint,3,opt,name=ok,proto3,enum=grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything_Nested_DeepEnum" json:"ok,omitempty"`
+}
+
+func (x *ABitOfEverything_Nested) Reset() {
+ *x = ABitOfEverything_Nested{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_examples_internal_proto_examplepb_a_bit_of_everything_proto_msgTypes[16]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ABitOfEverything_Nested) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ABitOfEverything_Nested) ProtoMessage() {}
+
+func (x *ABitOfEverything_Nested) ProtoReflect() protoreflect.Message {
+ mi := &file_examples_internal_proto_examplepb_a_bit_of_everything_proto_msgTypes[16]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ABitOfEverything_Nested.ProtoReflect.Descriptor instead.
+func (*ABitOfEverything_Nested) Descriptor() ([]byte, []int) {
+ return file_examples_internal_proto_examplepb_a_bit_of_everything_proto_rawDescGZIP(), []int{2, 0}
+}
+
+func (x *ABitOfEverything_Nested) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *ABitOfEverything_Nested) GetAmount() uint32 {
+ if x != nil {
+ return x.Amount
+ }
+ return 0
+}
+
+func (x *ABitOfEverything_Nested) GetOk() ABitOfEverything_Nested_DeepEnum {
+ if x != nil {
+ return x.Ok
+ }
+ return ABitOfEverything_Nested_FALSE
+}
+
+var File_examples_internal_proto_examplepb_a_bit_of_everything_proto protoreflect.FileDescriptor
+
+var file_examples_internal_proto_examplepb_a_bit_of_everything_proto_rawDesc = []byte{
+ 0x0a, 0x3b, 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, 0x2f, 0x61, 0x5f, 0x62, 0x69, 0x74, 0x5f, 0x6f, 0x66, 0x5f, 0x65, 0x76, 0x65,
+ 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 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, 0x41, 0x42,
- 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x4d,
- 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x61,
- 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x87, 0x01, 0x0a, 0x13, 0x6d, 0x61, 0x70, 0x70, 0x65,
- 0x64, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x17,
+ 0x6f, 0x74, 0x6f, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x1a, 0x32, 0x65,
+ 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c,
+ 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x65, 0x6e, 0x75, 0x6d,
+ 0x2f, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x1a, 0x30, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x69, 0x6e, 0x74, 0x65,
+ 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x61, 0x74, 0x68, 0x65,
+ 0x6e, 0x75, 0x6d, 0x2f, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x69, 0x6e,
+ 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x75, 0x62,
+ 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a,
+ 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61,
+ 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x75, 0x62, 0x32, 0x2f, 0x6d, 0x65, 0x73,
+ 0x73, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67,
+ 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+ 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76,
+ 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61,
+ 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+ 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74,
+ 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70,
+ 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f,
+ 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
+ 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x22, 0xc6, 0x02, 0x0a, 0x0d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70,
+ 0x6f, 0x6e, 0x73, 0x65, 0x12, 0xe1, 0x01, 0x0a, 0x0d, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x6c, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0xba, 0x01, 0x92,
+ 0x41, 0xb6, 0x01, 0x2a, 0x10, 0x78, 0x2d, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x2d, 0x69, 0x64, 0x32, 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, 0x4a, 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, 0x8a, 0x01, 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, 0xa2, 0x02, 0x04, 0x75, 0x75, 0x69, 0x64, 0x52, 0x0d, 0x63, 0x6f, 0x72, 0x72, 0x65,
+ 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x51, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f,
+ 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 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, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4f, 0x62,
+ 0x6a, 0x65, 0x63, 0x74, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0xa0, 0x01, 0x0a, 0x0b,
+ 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x40, 0x0a, 0x04, 0x63,
+ 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x42, 0x2c, 0x92, 0x41, 0x29, 0x2a, 0x04,
+ 0x63, 0x6f, 0x64, 0x65, 0x32, 0x0d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x20, 0x63,
+ 0x6f, 0x64, 0x65, 0x8a, 0x01, 0x07, 0x5e, 0x5b, 0x30, 0x2d, 0x39, 0x5d, 0x24, 0xa2, 0x02, 0x07,
+ 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x4f, 0x0a,
+ 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x35,
+ 0x92, 0x41, 0x32, 0x2a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 0x10, 0x52, 0x65,
+ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x8a, 0x01,
+ 0x14, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5d, 0x7b, 0x31, 0x2c,
+ 0x20, 0x33, 0x32, 0x7d, 0x24, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x80,
+ 0x25, 0x0a, 0x10, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68,
+ 0x69, 0x6e, 0x67, 0x12, 0x6c, 0x0a, 0x0d, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x6e, 0x65,
+ 0x73, 0x74, 0x65, 0x64, 0x18, 0x19, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x47, 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, 0x41, 0x42, 0x69, 0x74,
+ 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x4e, 0x65, 0x73,
+ 0x74, 0x65, 0x64, 0x52, 0x0c, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x4e, 0x65, 0x73, 0x74, 0x65,
+ 0x64, 0x12, 0x89, 0x01, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+ 0x42, 0x75, 0x92, 0x41, 0x72, 0x80, 0x01, 0x01, 0x8a, 0x01, 0x4b, 0x5b, 0x61, 0x2d, 0x66, 0x41,
+ 0x2d, 0x46, 0x30, 0x2d, 0x39, 0x5d, 0x7b, 0x38, 0x7d, 0x2d, 0x5b, 0x61, 0x2d, 0x66, 0x41, 0x2d,
+ 0x46, 0x30, 0x2d, 0x39, 0x5d, 0x7b, 0x34, 0x7d, 0x2d, 0x5b, 0x61, 0x2d, 0x66, 0x41, 0x2d, 0x46,
+ 0x30, 0x2d, 0x39, 0x5d, 0x7b, 0x34, 0x7d, 0x2d, 0x5b, 0x61, 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x30,
+ 0x2d, 0x39, 0x5d, 0x7b, 0x34, 0x7d, 0x2d, 0x5b, 0x61, 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x30, 0x2d,
+ 0x39, 0x5d, 0x7b, 0x31, 0x32, 0x7d, 0x82, 0x03, 0x10, 0x0a, 0x0a, 0x78, 0x2d, 0x69, 0x6e, 0x74,
+ 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x12, 0x02, 0x20, 0x01, 0xca, 0x3e, 0x0b, 0xfa, 0x02, 0x08, 0x75,
+ 0x75, 0x69, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x5f, 0x0a,
+ 0x06, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x47, 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, 0x41,
+ 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2e,
+ 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x52, 0x06, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x12, 0x4a,
+ 0x0a, 0x0b, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20,
+ 0x01, 0x28, 0x02, 0x42, 0x29, 0x92, 0x41, 0x26, 0x32, 0x11, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x20,
+ 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x3a, 0x03, 0x30, 0x2e, 0x32,
+ 0xd2, 0x01, 0x0b, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a,
+ 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x6f,
+ 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01,
+ 0x52, 0x0b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a,
+ 0x0b, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01,
+ 0x28, 0x03, 0x52, 0x0a, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21,
+ 0x0a, 0x0c, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06,
+ 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75,
+ 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65,
+ 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c,
+ 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x5f, 0x76, 0x61,
+ 0x6c, 0x75, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x06, 0x52, 0x0c, 0x66, 0x69, 0x78, 0x65, 0x64,
+ 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x69, 0x78, 0x65, 0x64,
+ 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x07, 0x52, 0x0c,
+ 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x0a,
+ 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08,
+ 0x52, 0x09, 0x62, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73,
+ 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f,
+ 0x0a, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x1d, 0x20,
+ 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x62, 0x79, 0x74, 0x65, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12,
+ 0x21, 0x0a, 0x0c, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,
+ 0x0d, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c,
+ 0x75, 0x65, 0x12, 0x5a, 0x0a, 0x0a, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65,
+ 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0e, 0x32, 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, 0x09, 0x65, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x59,
+ 0x0a, 0x0f, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x76, 0x61, 0x6c, 0x75,
+ 0x65, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 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, 0x61, 0x74, 0x68, 0x65, 0x6e, 0x75,
+ 0x6d, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x0d, 0x70, 0x61, 0x74, 0x68,
+ 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x7c, 0x0a, 0x16, 0x6e, 0x65, 0x73,
+ 0x74, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x76, 0x61,
+ 0x6c, 0x75, 0x65, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x47, 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, 0x61, 0x74, 0x68, 0x65,
+ 0x6e, 0x75, 0x6d, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x50, 0x61, 0x74, 0x68, 0x45,
+ 0x6e, 0x75, 0x6d, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x50, 0x61, 0x74, 0x68, 0x45, 0x6e,
+ 0x75, 0x6d, 0x52, 0x13, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x50, 0x61, 0x74, 0x68, 0x45, 0x6e,
+ 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x66, 0x69, 0x78, 0x65,
+ 0x64, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0f, 0x52,
+ 0x0d, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x25,
+ 0x0a, 0x0e, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65,
+ 0x18, 0x10, 0x20, 0x01, 0x28, 0x10, 0x52, 0x0d, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34,
+ 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f,
+ 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x11, 0x52, 0x0b, 0x73, 0x69, 0x6e,
+ 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x69, 0x6e, 0x74,
+ 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x12, 0x52, 0x0b,
+ 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x32, 0x0a, 0x15, 0x72,
+ 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76,
+ 0x61, 0x6c, 0x75, 0x65, 0x18, 0x13, 0x20, 0x03, 0x28, 0x09, 0x52, 0x13, 0x72, 0x65, 0x70, 0x65,
+ 0x61, 0x74, 0x65, 0x64, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12,
+ 0x39, 0x0a, 0x0b, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x14,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x48, 0x00, 0x52, 0x0a,
+ 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x23, 0x0a, 0x0c, 0x6f, 0x6e,
+ 0x65, 0x6f, 0x66, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09,
+ 0x48, 0x00, 0x52, 0x0b, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12,
+ 0x6b, 0x0a, 0x09, 0x6d, 0x61, 0x70, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x16, 0x20, 0x03,
+ 0x28, 0x0b, 0x32, 0x4e, 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, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74,
+ 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x6e, 0x74,
+ 0x72, 0x79, 0x52, 0x08, 0x6d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x87, 0x01, 0x0a,
+ 0x13, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76,
+ 0x61, 0x6c, 0x75, 0x65, 0x18, 0x17, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x57, 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, 0x41, 0x42, 0x69, 0x74,
+ 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x61, 0x70,
+ 0x70, 0x65, 0x64, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x6e,
+ 0x74, 0x72, 0x79, 0x52, 0x11, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x64, 0x53, 0x74, 0x72, 0x69, 0x6e,
+ 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x87, 0x01, 0x0a, 0x13, 0x6d, 0x61, 0x70, 0x70, 0x65,
+ 0x64, 0x5f, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x18,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x57, 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, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72,
- 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x64, 0x53, 0x74, 0x72,
- 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x11, 0x6d,
- 0x61, 0x70, 0x70, 0x65, 0x64, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65,
- 0x12, 0x87, 0x01, 0x0a, 0x13, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x64, 0x5f, 0x6e, 0x65, 0x73, 0x74,
- 0x65, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x18, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x57,
+ 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x64, 0x4e, 0x65, 0x73,
+ 0x74, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x11, 0x6d,
+ 0x61, 0x70, 0x70, 0x65, 0x64, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65,
+ 0x12, 0x3a, 0x0a, 0x18, 0x6e, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x6f,
+ 0x6e, 0x61, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x1a, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x18, 0x6e, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x6f,
+ 0x6e, 0x61, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x43, 0x0a, 0x0f,
+ 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,
+ 0x1b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d,
+ 0x70, 0x52, 0x0e, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x56, 0x61, 0x6c, 0x75,
+ 0x65, 0x12, 0x6b, 0x0a, 0x13, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x65, 0x6e,
+ 0x75, 0x6d, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x1c, 0x20, 0x03, 0x28, 0x0e, 0x32, 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,
- 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67,
- 0x2e, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x64, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x56, 0x61, 0x6c,
- 0x75, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x11, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x64, 0x4e,
- 0x65, 0x73, 0x74, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3a, 0x0a, 0x18, 0x6e, 0x6f,
- 0x6e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x4e, 0x61, 0x6d,
- 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x18, 0x6e, 0x6f,
- 0x6e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x4e, 0x61, 0x6d,
- 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x43, 0x0a, 0x0f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74,
- 0x61, 0x6d, 0x70, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x0b, 0x32,
- 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
- 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0e, 0x74, 0x69, 0x6d,
- 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x6b, 0x0a, 0x13, 0x72,
- 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x76, 0x61, 0x6c,
- 0x75, 0x65, 0x18, 0x1c, 0x20, 0x03, 0x28, 0x0e, 0x32, 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, 0x11, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x45,
- 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0xbb, 0x01, 0x0a, 0x18, 0x72, 0x65, 0x70,
- 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x61, 0x6e, 0x6e, 0x6f, 0x74,
- 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x20, 0x20, 0x03, 0x28, 0x0e, 0x32, 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, 0x42, 0x44, 0x92, 0x41, 0x41, 0x2a, 0x1b, 0x52,
- 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x20,
- 0x65, 0x6e, 0x75, 0x6d, 0x20, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x32, 0x22, 0x52, 0x65, 0x70, 0x65,
- 0x61, 0x74, 0x65, 0x64, 0x20, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x20, 0x65, 0x6e, 0x75,
- 0x6d, 0x20, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x16,
- 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x41, 0x6e, 0x6e, 0x6f,
- 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0xa3, 0x01, 0x0a, 0x15, 0x65, 0x6e, 0x75, 0x6d, 0x5f,
- 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
- 0x18, 0x21, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61,
+ 0x4e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x11, 0x72, 0x65, 0x70,
+ 0x65, 0x61, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0xbb,
+ 0x01, 0x0a, 0x18, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x75, 0x6d,
+ 0x5f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x20, 0x20, 0x03, 0x28,
+ 0x0e, 0x32, 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, 0x42, 0x44,
+ 0x92, 0x41, 0x41, 0x2a, 0x1b, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x6e, 0x75,
+ 0x6d, 0x65, 0x72, 0x69, 0x63, 0x20, 0x65, 0x6e, 0x75, 0x6d, 0x20, 0x74, 0x69, 0x74, 0x6c, 0x65,
+ 0x32, 0x22, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x6e, 0x75, 0x6d, 0x65, 0x72,
+ 0x69, 0x63, 0x20, 0x65, 0x6e, 0x75, 0x6d, 0x20, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74,
+ 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x16, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x45, 0x6e,
+ 0x75, 0x6d, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0xa3, 0x01, 0x0a,
+ 0x15, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x61, 0x6e, 0x6e, 0x6f,
+ 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0e, 0x32, 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, 0x42, 0x32, 0x92, 0x41, 0x2f, 0x2a, 0x12,
+ 0x4e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x20, 0x65, 0x6e, 0x75, 0x6d, 0x20, 0x74, 0x69, 0x74,
+ 0x6c, 0x65, 0x32, 0x19, 0x4e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x20, 0x65, 0x6e, 0x75, 0x6d,
+ 0x20, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x13, 0x65,
+ 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x12, 0x76, 0x0a, 0x1a, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73,
+ 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x18, 0x22, 0x20, 0x03, 0x28, 0x09, 0x42, 0x38, 0x92, 0x41, 0x35, 0x2a, 0x15, 0x52, 0x65, 0x70,
+ 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x69, 0x74,
+ 0x6c, 0x65, 0x32, 0x1c, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x73, 0x74, 0x72,
+ 0x69, 0x6e, 0x67, 0x20, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
+ 0x52, 0x18, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67,
+ 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0xcd, 0x01, 0x0a, 0x1a, 0x72,
+ 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x61,
+ 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x23, 0x20, 0x03, 0x28, 0x0b, 0x32,
+ 0x47, 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, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e,
+ 0x67, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x42, 0x46, 0x92, 0x41, 0x43, 0x2a, 0x1c, 0x52,
+ 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x20, 0x6f,
+ 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x32, 0x23, 0x52, 0x65, 0x70,
+ 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x20, 0x6f, 0x62, 0x6a,
+ 0x65, 0x63, 0x74, 0x20, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
+ 0x52, 0x18, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64,
+ 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0xaa, 0x01, 0x0a, 0x11, 0x6e,
+ 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x18, 0x24, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x47, 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, 0x42, 0x32, 0x92, 0x41, 0x2f, 0x2a, 0x12, 0x4e, 0x75, 0x6d, 0x65, 0x72, 0x69,
- 0x63, 0x20, 0x65, 0x6e, 0x75, 0x6d, 0x20, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x32, 0x19, 0x4e, 0x75,
- 0x6d, 0x65, 0x72, 0x69, 0x63, 0x20, 0x65, 0x6e, 0x75, 0x6d, 0x20, 0x64, 0x65, 0x73, 0x63, 0x72,
- 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x13, 0x65, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c,
- 0x75, 0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x76, 0x0a, 0x1a,
- 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f,
- 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x22, 0x20, 0x03, 0x28, 0x09,
- 0x42, 0x38, 0x92, 0x41, 0x35, 0x2a, 0x15, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20,
- 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x32, 0x1c, 0x52, 0x65,
- 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x64, 0x65,
- 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x18, 0x72, 0x65, 0x70, 0x65,
- 0x61, 0x74, 0x65, 0x64, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
- 0x74, 0x69, 0x6f, 0x6e, 0x12, 0xcd, 0x01, 0x0a, 0x1a, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65,
- 0x64, 0x5f, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74,
- 0x69, 0x6f, 0x6e, 0x18, 0x23, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x47, 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, 0x41, 0x42, 0x69, 0x74, 0x4f,
- 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x4e, 0x65, 0x73, 0x74,
- 0x65, 0x64, 0x42, 0x46, 0x92, 0x41, 0x43, 0x2a, 0x1c, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65,
- 0x64, 0x20, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20,
- 0x74, 0x69, 0x74, 0x6c, 0x65, 0x32, 0x23, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20,
- 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x64, 0x65,
- 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x18, 0x72, 0x65, 0x70, 0x65,
- 0x61, 0x74, 0x65, 0x64, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
- 0x74, 0x69, 0x6f, 0x6e, 0x12, 0xaa, 0x01, 0x0a, 0x11, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f,
- 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x24, 0x20, 0x01, 0x28, 0x0b,
- 0x32, 0x47, 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, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69,
- 0x6e, 0x67, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x42, 0x34, 0x92, 0x41, 0x31, 0x2a, 0x13,
- 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x74, 0x69,
- 0x74, 0x6c, 0x65, 0x32, 0x1a, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x20, 0x6f, 0x62, 0x6a, 0x65,
- 0x63, 0x74, 0x20, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52,
- 0x10, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
- 0x6e, 0x12, 0x37, 0x0a, 0x13, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x72,
- 0x69, 0x64, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x25, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07,
- 0x92, 0x41, 0x04, 0x9a, 0x02, 0x01, 0x03, 0x52, 0x11, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x4f, 0x76,
- 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x65, 0x0a, 0x2d, 0x72, 0x65,
- 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x69,
- 0x61, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72,
- 0x5f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x26, 0x20, 0x01, 0x28,
- 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x28, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65,
- 0x64, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x69, 0x61, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42,
+ 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76,
+ 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x42,
+ 0x34, 0x92, 0x41, 0x31, 0x2a, 0x13, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x20, 0x6f, 0x62, 0x6a,
+ 0x65, 0x63, 0x74, 0x20, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x32, 0x1a, 0x4e, 0x65, 0x73, 0x74, 0x65,
+ 0x64, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x10, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x41, 0x6e, 0x6e,
+ 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x13, 0x69, 0x6e, 0x74, 0x36, 0x34,
+ 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x25,
+ 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0x92, 0x41, 0x04, 0x9a, 0x02, 0x01, 0x03, 0x52, 0x11, 0x69,
+ 0x6e, 0x74, 0x36, 0x34, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65,
+ 0x12, 0x64, 0x0a, 0x2d, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x72,
+ 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x69, 0x61, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65,
+ 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x5f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x18, 0x26, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x28, 0x72, 0x65,
+ 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x69, 0x61, 0x46,
+ 0x69, 0x65, 0x6c, 0x64, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x41, 0x6e, 0x6e, 0x6f,
+ 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x69, 0x0a, 0x30, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74,
+ 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x69, 0x61,
+ 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x5f,
+ 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x27, 0x20, 0x01, 0x28, 0x09,
+ 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x2a, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x4f, 0x6e, 0x6c,
+ 0x79, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x69, 0x61, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42,
0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
- 0x6e, 0x12, 0x6a, 0x0a, 0x30, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x6f, 0x6e, 0x6c, 0x79,
- 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x69, 0x61, 0x5f, 0x66, 0x69, 0x65, 0x6c,
- 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x5f, 0x61, 0x6e, 0x6e, 0x6f, 0x74,
- 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x27, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01,
- 0x03, 0x52, 0x2a, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x4f, 0x6e, 0x6c, 0x79, 0x53, 0x74, 0x72,
- 0x69, 0x6e, 0x67, 0x56, 0x69, 0x61, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x65, 0x68, 0x61, 0x76,
- 0x69, 0x6f, 0x72, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a,
- 0x15, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67,
- 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x28, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x13,
- 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61,
- 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x1a, 0xe8, 0x01, 0x0a, 0x06, 0x4e, 0x65, 0x73, 0x74, 0x65,
- 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18,
- 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x7c, 0x0a,
- 0x02, 0x6f, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x50, 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, 0x41, 0x42, 0x69, 0x74, 0x4f,
- 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x4e, 0x65, 0x73, 0x74,
- 0x65, 0x64, 0x2e, 0x44, 0x65, 0x65, 0x70, 0x45, 0x6e, 0x75, 0x6d, 0x42, 0x1a, 0x92, 0x41, 0x17,
- 0x32, 0x15, 0x44, 0x65, 0x65, 0x70, 0x45, 0x6e, 0x75, 0x6d, 0x20, 0x64, 0x65, 0x73, 0x63, 0x72,
- 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x02, 0x6f, 0x6b, 0x22, 0x1f, 0x0a, 0x08, 0x44,
- 0x65, 0x65, 0x70, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x09, 0x0a, 0x05, 0x46, 0x41, 0x4c, 0x53, 0x45,
- 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x52, 0x55, 0x45, 0x10, 0x01, 0x3a, 0x13, 0x92, 0x41,
- 0x10, 0x32, 0x0e, 0x7b, 0x22, 0x6f, 0x6b, 0x22, 0x3a, 0x20, 0x22, 0x54, 0x52, 0x55, 0x45, 0x22,
- 0x7d, 0x1a, 0x78, 0x0a, 0x0d, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x6e, 0x74,
- 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x03, 0x6b, 0x65, 0x79, 0x12, 0x51, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20,
- 0x01, 0x28, 0x0e, 0x32, 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, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x44, 0x0a, 0x16, 0x4d,
- 0x61, 0x70, 0x70, 0x65, 0x64, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65,
- 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
- 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38,
- 0x01, 0x1a, 0x8d, 0x01, 0x0a, 0x16, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x64, 0x4e, 0x65, 0x73, 0x74,
- 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03,
- 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x5d,
- 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x47, 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, 0x41,
- 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2e,
- 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38,
- 0x01, 0x3a, 0x8e, 0x02, 0x92, 0x41, 0x8a, 0x02, 0x0a, 0x84, 0x01, 0x2a, 0x13, 0x41, 0x20, 0x62,
- 0x69, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x65, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67,
- 0x32, 0x49, 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x79, 0x20, 0x63,
- 0x6f, 0x6d, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61,
- 0x67, 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x63, 0x6f, 0x76, 0x65, 0x72,
- 0x20, 0x6d, 0x61, 0x6e, 0x79, 0x20, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x20, 0x6f,
- 0x66, 0x20, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0xd2, 0x01, 0x04, 0x75, 0x75,
- 0x69, 0x64, 0xd2, 0x01, 0x0b, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65,
- 0xd2, 0x01, 0x0c, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2a,
- 0x56, 0x0a, 0x24, 0x46, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x75, 0x74, 0x20, 0x6d, 0x6f, 0x72, 0x65,
- 0x20, 0x61, 0x62, 0x6f, 0x75, 0x74, 0x20, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65,
- 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 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, 0x32, 0x29, 0x7b, 0x22, 0x69, 0x6e, 0x74, 0x36, 0x34,
- 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x3a, 0x20, 0x31, 0x32, 0x2c, 0x20, 0x22, 0x64, 0x6f,
- 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x3a, 0x20, 0x31, 0x32, 0x2e,
- 0x33, 0x7d, 0x42, 0x0d, 0x0a, 0x0b, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x76, 0x61, 0x6c, 0x75,
- 0x65, 0x42, 0x18, 0x0a, 0x16, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x73,
- 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x89, 0x09, 0x0a, 0x18,
- 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67,
- 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x39, 0x0a, 0x19, 0x70, 0x61, 0x74, 0x68,
- 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x5f,
- 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x02, 0x52, 0x16, 0x70, 0x61, 0x74,
- 0x68, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x56, 0x61,
- 0x6c, 0x75, 0x65, 0x12, 0x3b, 0x0a, 0x1a, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65,
- 0x61, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75,
- 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x01, 0x52, 0x17, 0x70, 0x61, 0x74, 0x68, 0x52, 0x65, 0x70,
- 0x65, 0x61, 0x74, 0x65, 0x64, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65,
- 0x12, 0x39, 0x0a, 0x19, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65,
- 0x64, 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20,
- 0x03, 0x28, 0x03, 0x52, 0x16, 0x70, 0x61, 0x74, 0x68, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65,
- 0x64, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3b, 0x0a, 0x1a, 0x70,
- 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x75, 0x69, 0x6e,
- 0x74, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x04, 0x52,
- 0x17, 0x70, 0x61, 0x74, 0x68, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x55, 0x69, 0x6e,
- 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x39, 0x0a, 0x19, 0x70, 0x61, 0x74, 0x68,
- 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f,
- 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x05, 0x52, 0x16, 0x70, 0x61, 0x74,
- 0x68, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61,
- 0x6c, 0x75, 0x65, 0x12, 0x3d, 0x0a, 0x1b, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65,
- 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c,
- 0x75, 0x65, 0x18, 0x06, 0x20, 0x03, 0x28, 0x06, 0x52, 0x18, 0x70, 0x61, 0x74, 0x68, 0x52, 0x65,
- 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x56, 0x61, 0x6c,
- 0x75, 0x65, 0x12, 0x3d, 0x0a, 0x1b, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61,
- 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75,
- 0x65, 0x18, 0x07, 0x20, 0x03, 0x28, 0x07, 0x52, 0x18, 0x70, 0x61, 0x74, 0x68, 0x52, 0x65, 0x70,
- 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75,
- 0x65, 0x12, 0x37, 0x0a, 0x18, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74,
- 0x65, 0x64, 0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x08, 0x20,
- 0x03, 0x28, 0x08, 0x52, 0x15, 0x70, 0x61, 0x74, 0x68, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65,
- 0x64, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3b, 0x0a, 0x1a, 0x70, 0x61,
- 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x72, 0x69,
- 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x52, 0x17,
- 0x70, 0x61, 0x74, 0x68, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x53, 0x74, 0x72, 0x69,
- 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x39, 0x0a, 0x19, 0x70, 0x61, 0x74, 0x68, 0x5f,
- 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x76,
- 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x16, 0x70, 0x61, 0x74, 0x68,
- 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, 0x79, 0x74, 0x65, 0x73, 0x56, 0x61, 0x6c,
- 0x75, 0x65, 0x12, 0x3b, 0x0a, 0x1a, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61,
- 0x74, 0x65, 0x64, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65,
- 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x17, 0x70, 0x61, 0x74, 0x68, 0x52, 0x65, 0x70, 0x65,
- 0x61, 0x74, 0x65, 0x64, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12,
- 0x74, 0x0a, 0x18, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64,
- 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0c, 0x20, 0x03, 0x28,
+ 0x6e, 0x12, 0x37, 0x0a, 0x15, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x74,
+ 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x28, 0x20, 0x01, 0x28, 0x09,
+ 0x48, 0x01, 0x52, 0x13, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x53, 0x74, 0x72, 0x69,
+ 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x4c, 0x0a, 0x0a, 0x70, 0x72,
+ 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x29, 0x20, 0x03, 0x28, 0x09, 0x42, 0x2d,
+ 0x92, 0x41, 0x2a, 0x32, 0x18, 0x4f, 0x6e, 0x6c, 0x79, 0x20, 0x64, 0x69, 0x67, 0x69, 0x74, 0x73,
+ 0x20, 0x61, 0x72, 0x65, 0x20, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x2e, 0x78, 0x13, 0x80,
+ 0x01, 0x01, 0x8a, 0x01, 0x08, 0x5e, 0x5b, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x24, 0x52, 0x09, 0x70,
+ 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x15, 0x6f, 0x70, 0x74, 0x69,
+ 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x69, 0x65, 0x6c,
+ 0x64, 0x18, 0x2a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61,
+ 0x6c, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x3a, 0x0a, 0x17,
+ 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f,
+ 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x31, 0x18, 0x2b, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0,
+ 0x41, 0x02, 0x52, 0x14, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x53, 0x74, 0x72, 0x69,
+ 0x6e, 0x67, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x31, 0x12, 0x3a, 0x0a, 0x17, 0x72, 0x65, 0x71, 0x75,
+ 0x69, 0x72, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x69, 0x65, 0x6c,
+ 0x64, 0x5f, 0x32, 0x18, 0x2c, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x14,
+ 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x69,
+ 0x65, 0x6c, 0x64, 0x32, 0x12, 0x58, 0x0a, 0x21, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64,
+ 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x5f,
+ 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x2d, 0x20, 0x01, 0x28, 0x09, 0x42,
+ 0x03, 0xe0, 0x41, 0x02, 0x52, 0x28, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x66,
+ 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x5f, 0x6a, 0x73,
+ 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x12, 0x4f,
+ 0x0a, 0x1f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64,
+ 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d,
+ 0x65, 0x18, 0x2e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x26, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65,
+ 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x6a,
+ 0x73, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x12,
+ 0x23, 0x0a, 0x0d, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x6f, 0x6e, 0x6c, 0x79,
+ 0x18, 0x2f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67,
+ 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x2a, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67,
+ 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x5f, 0x64, 0x6f, 0x74, 0x18, 0x30, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x0f, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x4f, 0x6e, 0x6c, 0x79, 0x44, 0x6f, 0x74,
+ 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x6f, 0x74,
+ 0x68, 0x18, 0x31, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e,
+ 0x67, 0x42, 0x6f, 0x74, 0x68, 0x12, 0x2d, 0x0a, 0x12, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e,
+ 0x67, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x32, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x11, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x4d, 0x75, 0x6c, 0x74, 0x69,
+ 0x6c, 0x69, 0x6e, 0x65, 0x1a, 0xe8, 0x01, 0x0a, 0x06, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x12,
+ 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
+ 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20,
+ 0x01, 0x28, 0x0d, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x7c, 0x0a, 0x02, 0x6f,
+ 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x50, 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, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45,
+ 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64,
+ 0x2e, 0x44, 0x65, 0x65, 0x70, 0x45, 0x6e, 0x75, 0x6d, 0x42, 0x1a, 0x92, 0x41, 0x17, 0x32, 0x15,
+ 0x44, 0x65, 0x65, 0x70, 0x45, 0x6e, 0x75, 0x6d, 0x20, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x02, 0x6f, 0x6b, 0x22, 0x1f, 0x0a, 0x08, 0x44, 0x65, 0x65,
+ 0x70, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x09, 0x0a, 0x05, 0x46, 0x41, 0x4c, 0x53, 0x45, 0x10, 0x00,
+ 0x12, 0x08, 0x0a, 0x04, 0x54, 0x52, 0x55, 0x45, 0x10, 0x01, 0x3a, 0x13, 0x92, 0x41, 0x10, 0x32,
+ 0x0e, 0x7b, 0x22, 0x6f, 0x6b, 0x22, 0x3a, 0x20, 0x22, 0x54, 0x52, 0x55, 0x45, 0x22, 0x7d, 0x1a,
+ 0x78, 0x0a, 0x0d, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79,
+ 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b,
+ 0x65, 0x79, 0x12, 0x51, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x0e, 0x32, 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, 0x15,
- 0x70, 0x61, 0x74, 0x68, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d,
- 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3f, 0x0a, 0x1c, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65,
- 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x5f,
- 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0f, 0x52, 0x19, 0x70, 0x61, 0x74,
- 0x68, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33,
- 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3f, 0x0a, 0x1c, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72,
- 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34,
- 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x10, 0x52, 0x19, 0x70, 0x61,
- 0x74, 0x68, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64,
- 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3b, 0x0a, 0x1a, 0x70, 0x61, 0x74, 0x68, 0x5f,
- 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f,
- 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x11, 0x52, 0x17, 0x70, 0x61, 0x74,
- 0x68, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x53, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x56,
- 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3b, 0x0a, 0x1a, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70,
- 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c,
- 0x75, 0x65, 0x18, 0x10, 0x20, 0x03, 0x28, 0x12, 0x52, 0x17, 0x70, 0x61, 0x74, 0x68, 0x52, 0x65,
- 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x53, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75,
- 0x65, 0x3a, 0x64, 0x92, 0x41, 0x61, 0x32, 0x5f, 0x7b, 0x22, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72,
- 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x76, 0x61, 0x6c,
- 0x75, 0x65, 0x22, 0x3a, 0x20, 0x5b, 0x74, 0x72, 0x75, 0x65, 0x2c, 0x20, 0x74, 0x72, 0x75, 0x65,
- 0x2c, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x2c, 0x20, 0x74, 0x72, 0x75, 0x65, 0x5d, 0x2c, 0x20,
- 0x22, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x69,
- 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x3a, 0x20, 0x5b, 0x31, 0x2c,
- 0x20, 0x32, 0x2c, 0x20, 0x33, 0x5d, 0x7d, 0x22, 0x41, 0x0a, 0x13, 0x43, 0x68, 0x65, 0x63, 0x6b,
- 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a,
- 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12,
- 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74,
- 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x1a, 0x0a, 0x04, 0x42, 0x6f,
- 0x64, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x6b, 0x0a, 0x0f, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
- 0x65, 0x57, 0x69, 0x74, 0x68, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
- 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x48, 0x0a, 0x04, 0x64, 0x61, 0x74,
- 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67,
+ 0x70, 0x62, 0x2e, 0x4e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x05,
+ 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x44, 0x0a, 0x16, 0x4d, 0x61, 0x70,
+ 0x70, 0x65, 0x64, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x6e,
+ 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a,
+ 0x8d, 0x01, 0x0a, 0x16, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x64, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64,
+ 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65,
+ 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x5d, 0x0a, 0x05,
+ 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x47, 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, 0x41, 0x42, 0x69,
+ 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x4e, 0x65,
+ 0x73, 0x74, 0x65, 0x64, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a,
+ 0xd6, 0x02, 0x92, 0x41, 0xd2, 0x02, 0x0a, 0xcc, 0x01, 0x2a, 0x13, 0x41, 0x20, 0x62, 0x69, 0x74,
+ 0x20, 0x6f, 0x66, 0x20, 0x65, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x32, 0x4a,
+ 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x63, 0x6f,
+ 0x6d, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
+ 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x20,
+ 0x6d, 0x61, 0x6e, 0x79, 0x20, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x20, 0x6f, 0x66,
+ 0x20, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0xd2, 0x01, 0x04, 0x75, 0x75, 0x69,
+ 0x64, 0xd2, 0x01, 0x0b, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0xd2,
+ 0x01, 0x0c, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0xd2, 0x01,
+ 0x1f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f,
+ 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65,
+ 0x82, 0x03, 0x22, 0x0a, 0x19, 0x78, 0x2d, 0x61, 0x2d, 0x62, 0x69, 0x74, 0x2d, 0x6f, 0x66, 0x2d,
+ 0x65, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2d, 0x66, 0x6f, 0x6f, 0x12, 0x05,
+ 0x1a, 0x03, 0x62, 0x61, 0x72, 0x2a, 0x56, 0x0a, 0x24, 0x46, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x75,
+ 0x74, 0x20, 0x6d, 0x6f, 0x72, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x75, 0x74, 0x20, 0x41, 0x42, 0x69,
+ 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 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, 0x32, 0x29, 0x7b,
+ 0x22, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x3a, 0x20, 0x31,
+ 0x32, 0x2c, 0x20, 0x22, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65,
+ 0x22, 0x3a, 0x20, 0x31, 0x32, 0x2e, 0x33, 0x7d, 0x42, 0x0d, 0x0a, 0x0b, 0x6f, 0x6e, 0x65, 0x6f,
+ 0x66, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x18, 0x0a, 0x16, 0x5f, 0x6f, 0x70, 0x74, 0x69,
+ 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75,
+ 0x65, 0x22, 0x89, 0x09, 0x0a, 0x18, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72,
+ 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x39,
+ 0x0a, 0x19, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f,
+ 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28,
+ 0x02, 0x52, 0x16, 0x70, 0x61, 0x74, 0x68, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46,
+ 0x6c, 0x6f, 0x61, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3b, 0x0a, 0x1a, 0x70, 0x61, 0x74,
+ 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x6f, 0x75, 0x62, 0x6c,
+ 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x01, 0x52, 0x17, 0x70,
+ 0x61, 0x74, 0x68, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x44, 0x6f, 0x75, 0x62, 0x6c,
+ 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x39, 0x0a, 0x19, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72,
+ 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x76, 0x61,
+ 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x03, 0x52, 0x16, 0x70, 0x61, 0x74, 0x68, 0x52,
+ 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75,
+ 0x65, 0x12, 0x3b, 0x0a, 0x1a, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74,
+ 0x65, 0x64, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,
+ 0x04, 0x20, 0x03, 0x28, 0x04, 0x52, 0x17, 0x70, 0x61, 0x74, 0x68, 0x52, 0x65, 0x70, 0x65, 0x61,
+ 0x74, 0x65, 0x64, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x39,
+ 0x0a, 0x19, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f,
+ 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28,
+ 0x05, 0x52, 0x16, 0x70, 0x61, 0x74, 0x68, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x49,
+ 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3d, 0x0a, 0x1b, 0x70, 0x61, 0x74,
+ 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64,
+ 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x03, 0x28, 0x06, 0x52, 0x18,
+ 0x70, 0x61, 0x74, 0x68, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x78, 0x65,
+ 0x64, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3d, 0x0a, 0x1b, 0x70, 0x61, 0x74, 0x68,
+ 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33,
+ 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x03, 0x28, 0x07, 0x52, 0x18, 0x70,
+ 0x61, 0x74, 0x68, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x78, 0x65, 0x64,
+ 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x37, 0x0a, 0x18, 0x70, 0x61, 0x74, 0x68, 0x5f,
+ 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x76, 0x61,
+ 0x6c, 0x75, 0x65, 0x18, 0x08, 0x20, 0x03, 0x28, 0x08, 0x52, 0x15, 0x70, 0x61, 0x74, 0x68, 0x52,
+ 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65,
+ 0x12, 0x3b, 0x0a, 0x1a, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65,
+ 0x64, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x09,
+ 0x20, 0x03, 0x28, 0x09, 0x52, 0x17, 0x70, 0x61, 0x74, 0x68, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74,
+ 0x65, 0x64, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x39, 0x0a,
+ 0x19, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62,
+ 0x79, 0x74, 0x65, 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0c,
+ 0x52, 0x16, 0x70, 0x61, 0x74, 0x68, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, 0x79,
+ 0x74, 0x65, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3b, 0x0a, 0x1a, 0x70, 0x61, 0x74, 0x68,
+ 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32,
+ 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x17, 0x70, 0x61,
+ 0x74, 0x68, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32,
+ 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x74, 0x0a, 0x18, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65,
+ 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x76, 0x61, 0x6c, 0x75,
+ 0x65, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0e, 0x32, 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, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x64,
- 0x61, 0x74, 0x61, 0x22, 0xa2, 0x01, 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x32,
- 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x52, 0x0a, 0x03, 0x61, 0x62, 0x65, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 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, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72,
- 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x52, 0x03, 0x61, 0x62, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x75,
- 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
- 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
- 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70,
- 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x67, 0x0a, 0x04, 0x42, 0x6f, 0x6f, 0x6b,
- 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
- 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x02, 0x69, 0x64, 0x12, 0x3b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74,
- 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
- 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65,
- 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d,
- 0x65, 0x22, 0x8e, 0x01, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b,
- 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e,
- 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12,
- 0x48, 0x0a, 0x04, 0x62, 0x6f, 0x6f, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e,
+ 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x4e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63,
+ 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x15, 0x70, 0x61, 0x74, 0x68, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74,
+ 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3f, 0x0a, 0x1c, 0x70,
+ 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x66, 0x69,
+ 0x78, 0x65, 0x64, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0d, 0x20, 0x03, 0x28,
+ 0x0f, 0x52, 0x19, 0x70, 0x61, 0x74, 0x68, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x53,
+ 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3f, 0x0a, 0x1c,
+ 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x66,
+ 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0e, 0x20, 0x03,
+ 0x28, 0x10, 0x52, 0x19, 0x70, 0x61, 0x74, 0x68, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64,
+ 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3b, 0x0a,
+ 0x1a, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73,
+ 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0f, 0x20, 0x03, 0x28,
+ 0x11, 0x52, 0x17, 0x70, 0x61, 0x74, 0x68, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x53,
+ 0x69, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3b, 0x0a, 0x1a, 0x70, 0x61,
+ 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x69, 0x6e, 0x74,
+ 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x10, 0x20, 0x03, 0x28, 0x12, 0x52, 0x17,
+ 0x70, 0x61, 0x74, 0x68, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x53, 0x69, 0x6e, 0x74,
+ 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x64, 0x92, 0x41, 0x61, 0x32, 0x5f, 0x7b, 0x22,
+ 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x6f,
+ 0x6f, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x3a, 0x20, 0x5b, 0x74, 0x72, 0x75, 0x65,
+ 0x2c, 0x20, 0x74, 0x72, 0x75, 0x65, 0x2c, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x2c, 0x20, 0x74,
+ 0x72, 0x75, 0x65, 0x5d, 0x2c, 0x20, 0x22, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65,
+ 0x61, 0x74, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65,
+ 0x22, 0x3a, 0x20, 0x5b, 0x31, 0x2c, 0x20, 0x32, 0x2c, 0x20, 0x33, 0x5d, 0x7d, 0x22, 0x41, 0x0a,
+ 0x13, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70,
+ 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70,
+ 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
+ 0x22, 0x1a, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x6b, 0x0a, 0x0f,
+ 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x57, 0x69, 0x74, 0x68, 0x42, 0x6f, 0x64, 0x79, 0x12,
+ 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12,
+ 0x48, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 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, 0x42,
- 0x6f, 0x6f, 0x6b, 0x52, 0x04, 0x62, 0x6f, 0x6f, 0x6b, 0x12, 0x17, 0x0a, 0x07, 0x62, 0x6f, 0x6f,
- 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x62, 0x6f, 0x6f, 0x6b,
- 0x49, 0x64, 0x22, 0xc5, 0x01, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f,
- 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4e, 0x0a, 0x04, 0x62, 0x6f, 0x6f, 0x6b,
- 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 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, 0x42, 0x6f, 0x6f, 0x6b, 0x42, 0x04, 0xe2, 0x41,
- 0x01, 0x02, 0x52, 0x04, 0x62, 0x6f, 0x6f, 0x6b, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61,
- 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e,
- 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
- 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74,
- 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x6d,
- 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x61, 0x6c,
- 0x6c, 0x6f, 0x77, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x2a, 0x20, 0x0a, 0x0b, 0x4e, 0x75,
- 0x6d, 0x65, 0x72, 0x69, 0x63, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x08, 0x0a, 0x04, 0x5a, 0x45, 0x52,
- 0x4f, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x4f, 0x4e, 0x45, 0x10, 0x01, 0x32, 0xa0, 0x2c, 0x0a,
- 0x17, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e,
- 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x8c, 0x04, 0x0a, 0x06, 0x43, 0x72, 0x65,
- 0x61, 0x74, 0x65, 0x12, 0x40, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77,
+ 0x6f, 0x64, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xa2, 0x01, 0x0a, 0x0f, 0x55, 0x70,
+ 0x64, 0x61, 0x74, 0x65, 0x56, 0x32, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x52, 0x0a,
+ 0x03, 0x61, 0x62, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 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, 0x41, 0x42, 0x69, 0x74,
+ 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x52, 0x03, 0x61, 0x62,
+ 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61,
+ 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x67,
+ 0x0a, 0x04, 0x42, 0x6f, 0x6f, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3b, 0x0a, 0x0b, 0x63, 0x72,
+ 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
+ 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65,
+ 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x8e, 0x01, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61,
+ 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a,
+ 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70,
+ 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x48, 0x0a, 0x04, 0x62, 0x6f, 0x6f, 0x6b, 0x18, 0x02, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x34, 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, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79,
- 0x74, 0x68, 0x69, 0x6e, 0x67, 0x1a, 0x40, 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, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65,
- 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x22, 0xfd, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0xf6,
- 0x02, 0x22, 0xf3, 0x02, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f,
- 0x61, 0x5f, 0x62, 0x69, 0x74, 0x5f, 0x6f, 0x66, 0x5f, 0x65, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68,
- 0x69, 0x6e, 0x67, 0x2f, 0x7b, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65,
- 0x7d, 0x2f, 0x7b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d,
- 0x2f, 0x7b, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x73,
- 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x7b, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34,
- 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x76,
- 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x5f, 0x76,
- 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x5f, 0x76,
- 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75,
- 0x65, 0x7d, 0x2f, 0x7b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65,
- 0x3d, 0x73, 0x74, 0x72, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x2f, 0x2a, 0x7d, 0x2f, 0x7b, 0x75,
- 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b, 0x73, 0x66,
- 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b, 0x73,
- 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b,
- 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b, 0x73,
- 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b, 0x6e, 0x6f,
- 0x6e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x4e, 0x61, 0x6d,
- 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x76, 0x61,
- 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x5f,
- 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x70,
- 0x61, 0x74, 0x68, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f,
- 0x7b, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x61, 0x6e, 0x6e, 0x6f,
- 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x12, 0xbc, 0x01, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61,
- 0x74, 0x65, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x40, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61,
+ 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x42, 0x6f, 0x6f, 0x6b, 0x52, 0x04, 0x62, 0x6f, 0x6f, 0x6b, 0x12,
+ 0x17, 0x0a, 0x07, 0x62, 0x6f, 0x6f, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x06, 0x62, 0x6f, 0x6f, 0x6b, 0x49, 0x64, 0x22, 0xc4, 0x01, 0x0a, 0x11, 0x55, 0x70, 0x64,
+ 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4d,
+ 0x0a, 0x04, 0x62, 0x6f, 0x6f, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 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, 0x42, 0x6f,
+ 0x6f, 0x6b, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x62, 0x6f, 0x6f, 0x6b, 0x12, 0x3b, 0x0a,
+ 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a,
+ 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x6c,
+ 0x6c, 0x6f, 0x77, 0x5f, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28,
+ 0x08, 0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x22,
+ 0x92, 0x02, 0x0a, 0x10, 0x53, 0x6e, 0x61, 0x6b, 0x65, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x12, 0x53, 0x0a, 0x04, 0x77, 0x68, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x0e, 0x32, 0x3f, 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, 0x73, 0x6e, 0x61, 0x6b, 0x65, 0x5f, 0x63, 0x61, 0x73, 0x65, 0x5f, 0x65,
+ 0x6e, 0x75, 0x6d, 0x52, 0x04, 0x77, 0x68, 0x61, 0x74, 0x12, 0x53, 0x0a, 0x03, 0x77, 0x68, 0x6f,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x41, 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, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76,
- 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x1a, 0x40, 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, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66,
- 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93,
- 0x02, 0x24, 0x22, 0x1f, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f,
- 0x61, 0x5f, 0x62, 0x69, 0x74, 0x5f, 0x6f, 0x66, 0x5f, 0x65, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68,
- 0x69, 0x6e, 0x67, 0x3a, 0x01, 0x2a, 0x12, 0xb4, 0x01, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74,
- 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x12, 0x41, 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, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f,
- 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 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, 0x42, 0x6f, 0x6f, 0x6b, 0x22, 0x2d,
- 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x22, 0x1f, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72,
- 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x73, 0x2f, 0x2a,
- 0x7d, 0x2f, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x3a, 0x04, 0x62, 0x6f, 0x6f, 0x6b, 0x12, 0xb9, 0x01,
- 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x12, 0x41, 0x2e, 0x67,
+ 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x73, 0x6e, 0x61, 0x6b, 0x65, 0x5f, 0x63, 0x61,
+ 0x73, 0x65, 0x5f, 0x30, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x52, 0x03, 0x77, 0x68, 0x6f, 0x12, 0x54,
+ 0x0a, 0x05, 0x77, 0x68, 0x65, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3e, 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,
+ 0x61, 0x74, 0x68, 0x65, 0x6e, 0x75, 0x6d, 0x2e, 0x73, 0x6e, 0x61, 0x6b, 0x65, 0x5f, 0x63, 0x61,
+ 0x73, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x05, 0x77,
+ 0x68, 0x65, 0x72, 0x65, 0x22, 0x13, 0x0a, 0x11, 0x53, 0x6e, 0x61, 0x6b, 0x65, 0x45, 0x6e, 0x75,
+ 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x7d, 0x0a, 0x1a, 0x52, 0x65, 0x71,
+ 0x75, 0x69, 0x72, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x13, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x02, 0x69, 0x64, 0x12, 0x4a, 0x0a, 0x03,
+ 0x66, 0x6f, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 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, 0x46, 0x6f, 0x6f, 0x42, 0x03,
+ 0xe0, 0x41, 0x02, 0x52, 0x03, 0x66, 0x6f, 0x6f, 0x22, 0x51, 0x0a, 0x03, 0x46, 0x6f, 0x6f, 0x12,
+ 0x4a, 0x0a, 0x03, 0x62, 0x61, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 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, 0x55, 0x70,
- 0x64, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
- 0x34, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x65,
+ 0x6f, 0x74, 0x6f, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x42, 0x61,
+ 0x72, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x03, 0x62, 0x61, 0x72, 0x22, 0x1a, 0x0a, 0x03, 0x42,
+ 0x61, 0x72, 0x12, 0x13, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03,
+ 0xe0, 0x41, 0x02, 0x52, 0x02, 0x69, 0x64, 0x2a, 0x20, 0x0a, 0x0b, 0x4e, 0x75, 0x6d, 0x65, 0x72,
+ 0x69, 0x63, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x08, 0x0a, 0x04, 0x5a, 0x45, 0x52, 0x4f, 0x10, 0x00,
+ 0x12, 0x07, 0x0a, 0x03, 0x4f, 0x4e, 0x45, 0x10, 0x01, 0x2a, 0x2b, 0x0a, 0x0f, 0x73, 0x6e, 0x61,
+ 0x6b, 0x65, 0x5f, 0x63, 0x61, 0x73, 0x65, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x12, 0x0b, 0x0a, 0x07,
+ 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x63, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x76, 0x61, 0x6c,
+ 0x75, 0x65, 0x5f, 0x64, 0x10, 0x01, 0x2a, 0x2d, 0x0a, 0x11, 0x73, 0x6e, 0x61, 0x6b, 0x65, 0x5f,
+ 0x63, 0x61, 0x73, 0x65, 0x5f, 0x30, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x12, 0x0b, 0x0a, 0x07, 0x76,
+ 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x65, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x76, 0x61, 0x6c, 0x75,
+ 0x65, 0x5f, 0x66, 0x10, 0x01, 0x32, 0xd3, 0x37, 0x0a, 0x17, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66,
+ 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
+ 0x65, 0x12, 0x8c, 0x04, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x40, 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, 0x41, 0x42,
+ 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x1a, 0x40,
+ 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,
+ 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67,
+ 0x22, 0xfd, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0xf6, 0x02, 0x22, 0xf3, 0x02, 0x2f, 0x76, 0x31,
+ 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x61, 0x5f, 0x62, 0x69, 0x74, 0x5f, 0x6f,
+ 0x66, 0x5f, 0x65, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x7b, 0x66, 0x6c,
+ 0x6f, 0x61, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b, 0x64, 0x6f, 0x75, 0x62,
+ 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b, 0x69, 0x6e, 0x74, 0x36, 0x34,
+ 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x73, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x6f,
+ 0x72, 0x2f, 0x7b, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d,
+ 0x2f, 0x7b, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b,
+ 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b,
+ 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b,
+ 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b, 0x73, 0x74, 0x72,
+ 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3d, 0x73, 0x74, 0x72, 0x70, 0x72, 0x65,
+ 0x66, 0x69, 0x78, 0x2f, 0x2a, 0x7d, 0x2f, 0x7b, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x76,
+ 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x5f,
+ 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34,
+ 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f,
+ 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x76,
+ 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b, 0x6e, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x6e,
+ 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x7d,
+ 0x2f, 0x7b, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b, 0x70,
+ 0x61, 0x74, 0x68, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f,
+ 0x7b, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x65, 0x6e, 0x75,
+ 0x6d, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x76,
+ 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d,
+ 0x12, 0xbc, 0x01, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x64, 0x79, 0x12,
+ 0x40, 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, 0x42, 0x6f, 0x6f, 0x6b, 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x32, 0x24, 0x2f,
- 0x76, 0x31, 0x2f, 0x7b, 0x62, 0x6f, 0x6f, 0x6b, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x75,
- 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x6f, 0x6f, 0x6b, 0x73,
- 0x2f, 0x2a, 0x7d, 0x3a, 0x04, 0x62, 0x6f, 0x6f, 0x6b, 0x12, 0xb0, 0x01, 0x0a, 0x06, 0x4c, 0x6f,
- 0x6f, 0x6b, 0x75, 0x70, 0x12, 0x34, 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, 0x73, 0x75, 0x62, 0x32,
- 0x2e, 0x49, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x40, 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, 0x41, 0x42, 0x69, 0x74,
- 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x22, 0x2e, 0x82, 0xd3,
- 0xe4, 0x93, 0x02, 0x28, 0x12, 0x26, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c,
- 0x65, 0x2f, 0x61, 0x5f, 0x62, 0x69, 0x74, 0x5f, 0x6f, 0x66, 0x5f, 0x65, 0x76, 0x65, 0x72, 0x79,
- 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x7b, 0x75, 0x75, 0x69, 0x64, 0x7d, 0x12, 0x95, 0x01, 0x0a,
- 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x40, 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, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45,
- 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
- 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74,
- 0x79, 0x22, 0x31, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2b, 0x1a, 0x26, 0x2f, 0x76, 0x31, 0x2f, 0x65,
- 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x61, 0x5f, 0x62, 0x69, 0x74, 0x5f, 0x6f, 0x66, 0x5f,
- 0x65, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x7b, 0x75, 0x75, 0x69, 0x64,
- 0x7d, 0x3a, 0x01, 0x2a, 0x12, 0x83, 0x02, 0x0a, 0x08, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56,
- 0x32, 0x12, 0x3f, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79,
+ 0x2e, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e,
+ 0x67, 0x1a, 0x40, 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, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x32, 0x52, 0x65, 0x71, 0x75, 0x65,
- 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x9d, 0x01, 0x82, 0xd3, 0xe4,
- 0x93, 0x02, 0x96, 0x01, 0x1a, 0x2a, 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c,
- 0x65, 0x2f, 0x61, 0x5f, 0x62, 0x69, 0x74, 0x5f, 0x6f, 0x66, 0x5f, 0x65, 0x76, 0x65, 0x72, 0x79,
- 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x7b, 0x61, 0x62, 0x65, 0x2e, 0x75, 0x75, 0x69, 0x64, 0x7d,
- 0x3a, 0x03, 0x61, 0x62, 0x65, 0x5a, 0x31, 0x32, 0x2a, 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x78, 0x61,
- 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x61, 0x5f, 0x62, 0x69, 0x74, 0x5f, 0x6f, 0x66, 0x5f, 0x65, 0x76,
- 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x7b, 0x61, 0x62, 0x65, 0x2e, 0x75, 0x75,
- 0x69, 0x64, 0x7d, 0x3a, 0x03, 0x61, 0x62, 0x65, 0x5a, 0x30, 0x32, 0x2b, 0x2f, 0x76, 0x32, 0x61,
- 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x61, 0x5f, 0x62, 0x69, 0x74, 0x5f, 0x6f,
- 0x66, 0x5f, 0x65, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x7b, 0x61, 0x62,
- 0x65, 0x2e, 0x75, 0x75, 0x69, 0x64, 0x7d, 0x3a, 0x01, 0x2a, 0x12, 0xca, 0x01, 0x0a, 0x06, 0x44,
- 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x34, 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, 0x73, 0x75, 0x62,
- 0x32, 0x2e, 0x49, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x16, 0x2e, 0x67, 0x6f,
- 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d,
- 0x70, 0x74, 0x79, 0x22, 0x72, 0x92, 0x41, 0x41, 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, 0x14, 0x0a, 0x0e, 0x78, 0x2d, 0x69, 0x72, 0x72, 0x65, 0x76, 0x65, 0x72,
- 0x73, 0x69, 0x62, 0x6c, 0x65, 0x12, 0x02, 0x20, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x2a,
- 0x26, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x61, 0x5f, 0x62,
- 0x69, 0x74, 0x5f, 0x6f, 0x66, 0x5f, 0x65, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67,
- 0x2f, 0x7b, 0x75, 0x75, 0x69, 0x64, 0x7d, 0x12, 0xf2, 0x01, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x51,
- 0x75, 0x65, 0x72, 0x79, 0x12, 0x40, 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, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72,
- 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x8b,
- 0x01, 0x92, 0x41, 0x54, 0x22, 0x4e, 0x0a, 0x1c, 0x46, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x75, 0x74,
- 0x20, 0x6d, 0x6f, 0x72, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x75, 0x74, 0x20, 0x47, 0x65, 0x74, 0x51,
- 0x75, 0x65, 0x72, 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, 0x58, 0x01, 0x62, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x12, 0x2c,
+ 0x70, 0x62, 0x2e, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68,
+ 0x69, 0x6e, 0x67, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x3a, 0x01, 0x2a, 0x22, 0x1f,
0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x61, 0x5f, 0x62, 0x69,
- 0x74, 0x5f, 0x6f, 0x66, 0x5f, 0x65, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2f,
- 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x7b, 0x75, 0x75, 0x69, 0x64, 0x7d, 0x12, 0xa9, 0x05, 0x0a,
- 0x10, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x51, 0x75, 0x65, 0x72,
- 0x79, 0x12, 0x48, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79,
+ 0x74, 0x5f, 0x6f, 0x66, 0x5f, 0x65, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x12,
+ 0xb4, 0x01, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x12, 0x41,
+ 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,
+ 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x1a, 0x34, 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, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68,
- 0x69, 0x6e, 0x67, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x1a, 0x48, 0x2e, 0x67, 0x72,
+ 0x70, 0x62, 0x2e, 0x42, 0x6f, 0x6f, 0x6b, 0x22, 0x2d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x3a,
+ 0x04, 0x62, 0x6f, 0x6f, 0x6b, 0x22, 0x1f, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65,
+ 0x6e, 0x74, 0x3d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d,
+ 0x2f, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x12, 0xb9, 0x01, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74,
+ 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x12, 0x41, 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, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f,
+ 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 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, 0x42, 0x6f, 0x6f, 0x6b, 0x22, 0x32,
+ 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x3a, 0x04, 0x62, 0x6f, 0x6f, 0x6b, 0x32, 0x24, 0x2f, 0x76,
+ 0x31, 0x2f, 0x7b, 0x62, 0x6f, 0x6f, 0x6b, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x75, 0x62,
+ 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x2f,
+ 0x2a, 0x7d, 0x12, 0xb0, 0x01, 0x0a, 0x06, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x12, 0x34, 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, 0x73, 0x75, 0x62, 0x32, 0x2e, 0x49, 0x64, 0x4d, 0x65, 0x73, 0x73,
+ 0x61, 0x67, 0x65, 0x1a, 0x40, 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, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79,
+ 0x74, 0x68, 0x69, 0x6e, 0x67, 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x12, 0x26, 0x2f,
+ 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x61, 0x5f, 0x62, 0x69, 0x74,
+ 0x5f, 0x6f, 0x66, 0x5f, 0x65, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x7b,
+ 0x75, 0x75, 0x69, 0x64, 0x7d, 0x12, 0xc3, 0x01, 0x0a, 0x06, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d,
+ 0x12, 0x40, 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, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69,
+ 0x6e, 0x67, 0x1a, 0x40, 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, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74,
+ 0x68, 0x69, 0x6e, 0x67, 0x22, 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x22, 0x2d, 0x2f, 0x76,
+ 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x61, 0x5f, 0x62, 0x69, 0x74, 0x5f,
+ 0x6f, 0x66, 0x5f, 0x65, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x7b, 0x75,
+ 0x75, 0x69, 0x64, 0x7d, 0x3a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x12, 0xcf, 0x01, 0x0a, 0x0b,
+ 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6c, 0x6f, 0x6e, 0x12, 0x40, 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, 0x41, 0x42, 0x69,
- 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x70,
- 0x65, 0x61, 0x74, 0x65, 0x64, 0x22, 0x80, 0x04, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0xf9, 0x03, 0x12,
- 0xf6, 0x03, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x61, 0x5f,
+ 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x1a, 0x40, 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, 0x41,
+ 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x22,
+ 0x3c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x36, 0x22, 0x34, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61,
+ 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x61, 0x5f, 0x62, 0x69, 0x74, 0x5f, 0x6f, 0x66, 0x5f, 0x65, 0x76,
+ 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x7b, 0x75, 0x75, 0x69, 0x64, 0x7d, 0x3a,
+ 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x3a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x12, 0x95, 0x01,
+ 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x40, 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, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66,
+ 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f,
+ 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70,
+ 0x74, 0x79, 0x22, 0x31, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2b, 0x3a, 0x01, 0x2a, 0x1a, 0x26, 0x2f,
+ 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x61, 0x5f, 0x62, 0x69, 0x74,
+ 0x5f, 0x6f, 0x66, 0x5f, 0x65, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x7b,
+ 0x75, 0x75, 0x69, 0x64, 0x7d, 0x12, 0x83, 0x02, 0x0a, 0x08, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
+ 0x56, 0x32, 0x12, 0x3f, 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, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x32, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x9d, 0x01, 0x82, 0xd3,
+ 0xe4, 0x93, 0x02, 0x96, 0x01, 0x3a, 0x03, 0x61, 0x62, 0x65, 0x5a, 0x31, 0x3a, 0x03, 0x61, 0x62,
+ 0x65, 0x32, 0x2a, 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x61,
+ 0x5f, 0x62, 0x69, 0x74, 0x5f, 0x6f, 0x66, 0x5f, 0x65, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69,
+ 0x6e, 0x67, 0x2f, 0x7b, 0x61, 0x62, 0x65, 0x2e, 0x75, 0x75, 0x69, 0x64, 0x7d, 0x5a, 0x30, 0x3a,
+ 0x01, 0x2a, 0x32, 0x2b, 0x2f, 0x76, 0x32, 0x61, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65,
+ 0x2f, 0x61, 0x5f, 0x62, 0x69, 0x74, 0x5f, 0x6f, 0x66, 0x5f, 0x65, 0x76, 0x65, 0x72, 0x79, 0x74,
+ 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x7b, 0x61, 0x62, 0x65, 0x2e, 0x75, 0x75, 0x69, 0x64, 0x7d, 0x1a,
+ 0x2a, 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x61, 0x5f, 0x62,
+ 0x69, 0x74, 0x5f, 0x6f, 0x66, 0x5f, 0x65, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67,
+ 0x2f, 0x7b, 0x61, 0x62, 0x65, 0x2e, 0x75, 0x75, 0x69, 0x64, 0x7d, 0x12, 0xca, 0x01, 0x0a, 0x06,
+ 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x34, 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, 0x73, 0x75,
+ 0x62, 0x32, 0x2e, 0x49, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x16, 0x2e, 0x67,
+ 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45,
+ 0x6d, 0x70, 0x74, 0x79, 0x22, 0x72, 0x92, 0x41, 0x41, 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, 0x14, 0x0a, 0x0e, 0x78, 0x2d, 0x69, 0x72, 0x72, 0x65, 0x76, 0x65,
+ 0x72, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x12, 0x02, 0x20, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28,
+ 0x2a, 0x26, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x61, 0x5f,
0x62, 0x69, 0x74, 0x5f, 0x6f, 0x66, 0x5f, 0x65, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e,
- 0x67, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x2f, 0x7b, 0x70, 0x61, 0x74, 0x68,
- 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x5f,
- 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70,
- 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c,
- 0x75, 0x65, 0x7d, 0x2f, 0x7b, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74,
- 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f,
- 0x7b, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x75,
- 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b, 0x70, 0x61,
- 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x74, 0x33,
- 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72,
- 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x5f,
- 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70,
- 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x5f, 0x76, 0x61,
+ 0x67, 0x2f, 0x7b, 0x75, 0x75, 0x69, 0x64, 0x7d, 0x12, 0xf2, 0x01, 0x0a, 0x08, 0x47, 0x65, 0x74,
+ 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x40, 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, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65,
+ 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22,
+ 0x8b, 0x01, 0x92, 0x41, 0x54, 0x22, 0x4e, 0x0a, 0x1c, 0x46, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x75,
+ 0x74, 0x20, 0x6d, 0x6f, 0x72, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x75, 0x74, 0x20, 0x47, 0x65, 0x74,
+ 0x51, 0x75, 0x65, 0x72, 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, 0x58, 0x01, 0x62, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x12,
+ 0x2c, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x61, 0x5f, 0x62,
+ 0x69, 0x74, 0x5f, 0x6f, 0x66, 0x5f, 0x65, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67,
+ 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x7b, 0x75, 0x75, 0x69, 0x64, 0x7d, 0x12, 0xa9, 0x05,
+ 0x0a, 0x10, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x51, 0x75, 0x65,
+ 0x72, 0x79, 0x12, 0x48, 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, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74,
+ 0x68, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x1a, 0x48, 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, 0x41, 0x42,
+ 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x52, 0x65,
+ 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x22, 0x80, 0x04, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0xf9, 0x03,
+ 0x12, 0xf6, 0x03, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x61,
+ 0x5f, 0x62, 0x69, 0x74, 0x5f, 0x6f, 0x66, 0x5f, 0x65, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69,
+ 0x6e, 0x67, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x2f, 0x7b, 0x70, 0x61, 0x74,
+ 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x6c, 0x6f, 0x61, 0x74,
+ 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65,
+ 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61,
- 0x74, 0x65, 0x64, 0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f,
- 0x7b, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73,
- 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b, 0x70, 0x61,
- 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x74, 0x65,
- 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72,
- 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x76,
+ 0x74, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d,
+ 0x2f, 0x7b, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f,
+ 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b, 0x70,
+ 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x74,
+ 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b, 0x70, 0x61, 0x74, 0x68, 0x5f,
+ 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34,
+ 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65,
+ 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x5f, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65,
- 0x61, 0x74, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d,
+ 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d,
+ 0x2f, 0x7b, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f,
+ 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b, 0x70,
+ 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x74,
+ 0x65, 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b, 0x70, 0x61, 0x74, 0x68, 0x5f,
+ 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f,
+ 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70,
+ 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65,
+ 0x7d, 0x2f, 0x7b, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64,
+ 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d,
0x2f, 0x7b, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f,
- 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f,
+ 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f,
0x7b, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73,
- 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b,
- 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x69,
- 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b, 0x70, 0x61, 0x74,
- 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x36,
- 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x12, 0xa7, 0x04, 0x0a, 0x04, 0x45, 0x63, 0x68,
- 0x6f, 0x12, 0x37, 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, 0x73, 0x75, 0x62, 0x2e, 0x53, 0x74, 0x72,
- 0x69, 0x6e, 0x67, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x37, 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, 0x73, 0x75, 0x62, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x65, 0x73, 0x73,
- 0x61, 0x67, 0x65, 0x22, 0xac, 0x03, 0x92, 0x41, 0xc5, 0x02, 0x0a, 0x08, 0x65, 0x63, 0x68, 0x6f,
- 0x20, 0x72, 0x70, 0x63, 0x12, 0x11, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x3a, 0x20, 0x45,
- 0x63, 0x68, 0x6f, 0x20, 0x72, 0x70, 0x63, 0x1a, 0x10, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70,
- 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x45, 0x63, 0x68, 0x6f, 0x22, 0x44, 0x0a, 0x12, 0x46, 0x69, 0x6e,
- 0x64, 0x20, 0x6f, 0x75, 0x74, 0x20, 0x6d, 0x6f, 0x72, 0x65, 0x20, 0x45, 0x63, 0x68, 0x6f, 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, 0x4a,
- 0x39, 0x0a, 0x03, 0x32, 0x30, 0x30, 0x12, 0x32, 0x22, 0x30, 0x0a, 0x10, 0x61, 0x70, 0x70, 0x6c,
- 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x12, 0x1c, 0x7b, 0x22,
- 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x74, 0x68, 0x65, 0x20, 0x69, 0x6e, 0x70,
- 0x75, 0x74, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x7d, 0x4a, 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, 0x03, 0x4a, 0x56, 0x0a, 0x03, 0x35, 0x30, 0x33, 0x12, 0x4f,
- 0x0a, 0x36, 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, 0x69, 0x73, 0x20,
- 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x72, 0x69, 0x6c, 0x79, 0x20, 0x75, 0x6e, 0x61, 0x76,
- 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x2a, 0x15, 0x0a, 0x08, 0x78, 0x2d, 0x6e, 0x75,
- 0x6d, 0x62, 0x65, 0x72, 0x12, 0x09, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0x40, 0x82,
- 0xd3, 0xe4, 0x93, 0x02, 0x5d, 0x12, 0x2c, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70,
+ 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x2f, 0x7b, 0x70, 0x61,
+ 0x74, 0x68, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x69, 0x6e, 0x74,
+ 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x12, 0xa7, 0x04, 0x0a, 0x04, 0x45, 0x63,
+ 0x68, 0x6f, 0x12, 0x37, 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, 0x73, 0x75, 0x62, 0x2e, 0x53, 0x74,
+ 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x37, 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, 0x73, 0x75, 0x62, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x65, 0x73,
+ 0x73, 0x61, 0x67, 0x65, 0x22, 0xac, 0x03, 0x92, 0x41, 0xc5, 0x02, 0x0a, 0x08, 0x65, 0x63, 0x68,
+ 0x6f, 0x20, 0x72, 0x70, 0x63, 0x12, 0x11, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x3a, 0x20,
+ 0x45, 0x63, 0x68, 0x6f, 0x20, 0x72, 0x70, 0x63, 0x1a, 0x10, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69,
+ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x45, 0x63, 0x68, 0x6f, 0x22, 0x44, 0x0a, 0x12, 0x46, 0x69,
+ 0x6e, 0x64, 0x20, 0x6f, 0x75, 0x74, 0x20, 0x6d, 0x6f, 0x72, 0x65, 0x20, 0x45, 0x63, 0x68, 0x6f,
+ 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,
+ 0x4a, 0x39, 0x0a, 0x03, 0x32, 0x30, 0x30, 0x12, 0x32, 0x22, 0x30, 0x0a, 0x10, 0x61, 0x70, 0x70,
+ 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x12, 0x1c, 0x7b,
+ 0x22, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x74, 0x68, 0x65, 0x20, 0x69, 0x6e,
+ 0x70, 0x75, 0x74, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x7d, 0x4a, 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, 0x03, 0x4a, 0x56, 0x0a, 0x03, 0x35, 0x30, 0x33, 0x12,
+ 0x4f, 0x0a, 0x36, 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, 0x69, 0x73,
+ 0x20, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x72, 0x69, 0x6c, 0x79, 0x20, 0x75, 0x6e, 0x61,
+ 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x2a, 0x15, 0x0a, 0x08, 0x78, 0x2d, 0x6e,
+ 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x09, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0x40,
+ 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x5d, 0x5a, 0x19, 0x3a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22,
+ 0x10, 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x65, 0x63, 0x68,
+ 0x6f, 0x5a, 0x12, 0x12, 0x10, 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65,
+ 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x12, 0x2c, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70,
0x6c, 0x65, 0x2f, 0x61, 0x5f, 0x62, 0x69, 0x74, 0x5f, 0x6f, 0x66, 0x5f, 0x65, 0x76, 0x65, 0x72,
0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x2f, 0x7b, 0x76, 0x61, 0x6c,
- 0x75, 0x65, 0x7d, 0x5a, 0x19, 0x22, 0x10, 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70,
- 0x6c, 0x65, 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x3a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5a, 0x12,
- 0x12, 0x10, 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x65, 0x63,
- 0x68, 0x6f, 0x12, 0xc9, 0x01, 0x0a, 0x0c, 0x44, 0x65, 0x65, 0x70, 0x50, 0x61, 0x74, 0x68, 0x45,
- 0x63, 0x68, 0x6f, 0x12, 0x40, 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, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79,
- 0x74, 0x68, 0x69, 0x6e, 0x67, 0x1a, 0x40, 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, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65,
- 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x22, 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x22,
- 0x2a, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x64, 0x65, 0x65,
- 0x70, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x2f, 0x7b, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x6e,
- 0x65, 0x73, 0x74, 0x65, 0x64, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x3a, 0x01, 0x2a, 0x12, 0x41,
- 0x0a, 0x0a, 0x4e, 0x6f, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x19, 0x2e, 0x67,
- 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44,
- 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
- 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22,
- 0x00, 0x12, 0x56, 0x0a, 0x07, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x16, 0x2e, 0x67,
- 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45,
- 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
- 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x1b, 0x82, 0xd3,
- 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c,
- 0x65, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x68, 0x0a, 0x10, 0x45, 0x72, 0x72,
- 0x6f, 0x72, 0x57, 0x69, 0x74, 0x68, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x16, 0x2e,
+ 0x75, 0x65, 0x7d, 0x12, 0xc9, 0x01, 0x0a, 0x0c, 0x44, 0x65, 0x65, 0x70, 0x50, 0x61, 0x74, 0x68,
+ 0x45, 0x63, 0x68, 0x6f, 0x12, 0x40, 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, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72,
+ 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x1a, 0x40, 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, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76,
+ 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x22, 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f,
+ 0x3a, 0x01, 0x2a, 0x22, 0x2a, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65,
+ 0x2f, 0x64, 0x65, 0x65, 0x70, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x2f, 0x7b, 0x73, 0x69, 0x6e, 0x67,
+ 0x6c, 0x65, 0x5f, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12,
+ 0x41, 0x0a, 0x0a, 0x4e, 0x6f, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x19, 0x2e,
+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
+ 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79,
+ 0x22, 0x00, 0x12, 0x56, 0x0a, 0x07, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x16, 0x2e,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
- 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x24, 0x82,
- 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70,
- 0x6c, 0x65, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x77, 0x69, 0x74, 0x68, 0x64, 0x65, 0x74, 0x61,
- 0x69, 0x6c, 0x73, 0x12, 0x96, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61,
- 0x67, 0x65, 0x57, 0x69, 0x74, 0x68, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x3f, 0x2e, 0x67, 0x72, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x1b, 0x82,
+ 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70,
+ 0x6c, 0x65, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x68, 0x0a, 0x10, 0x45, 0x72,
+ 0x72, 0x6f, 0x72, 0x57, 0x69, 0x74, 0x68, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x16,
+ 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
+ 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x24,
+ 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x78, 0x61, 0x6d,
+ 0x70, 0x6c, 0x65, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x77, 0x69, 0x74, 0x68, 0x64, 0x65, 0x74,
+ 0x61, 0x69, 0x6c, 0x73, 0x12, 0x96, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x73, 0x73,
+ 0x61, 0x67, 0x65, 0x57, 0x69, 0x74, 0x68, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x3f, 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, 0x4d, 0x65, 0x73,
+ 0x73, 0x61, 0x67, 0x65, 0x57, 0x69, 0x74, 0x68, 0x42, 0x6f, 0x64, 0x79, 0x1a, 0x16, 0x2e, 0x67,
+ 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45,
+ 0x6d, 0x70, 0x74, 0x79, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x3a, 0x04, 0x64, 0x61,
+ 0x74, 0x61, 0x22, 0x19, 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f,
+ 0x77, 0x69, 0x74, 0x68, 0x62, 0x6f, 0x64, 0x79, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x92, 0x01,
+ 0x0a, 0x11, 0x50, 0x6f, 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x42,
+ 0x6f, 0x64, 0x79, 0x12, 0x34, 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, 0x42, 0x6f, 0x64, 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
+ 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74,
+ 0x79, 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x3a, 0x01, 0x2a, 0x22, 0x24, 0x2f, 0x76,
+ 0x32, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x77, 0x69,
+ 0x74, 0x68, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x62, 0x6f, 0x64, 0x79, 0x2f, 0x7b, 0x6e, 0x61, 0x6d,
+ 0x65, 0x7d, 0x12, 0xe2, 0x01, 0x0a, 0x13, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x47, 0x65, 0x74, 0x51,
+ 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x40, 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, 0x4d, 0x65, 0x73, 0x73,
- 0x61, 0x67, 0x65, 0x57, 0x69, 0x74, 0x68, 0x42, 0x6f, 0x64, 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f,
- 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d,
- 0x70, 0x74, 0x79, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x22, 0x19, 0x2f, 0x76, 0x32,
- 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x77, 0x69, 0x74, 0x68, 0x62, 0x6f, 0x64,
- 0x79, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x3a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x92, 0x01, 0x0a,
- 0x11, 0x50, 0x6f, 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x42, 0x6f,
- 0x64, 0x79, 0x12, 0x34, 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, 0x42, 0x6f, 0x64, 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
- 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79,
- 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x22, 0x24, 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x78,
- 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x77, 0x69, 0x74, 0x68, 0x65, 0x6d,
- 0x70, 0x74, 0x79, 0x62, 0x6f, 0x64, 0x79, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x3a, 0x01,
- 0x2a, 0x12, 0xe2, 0x01, 0x0a, 0x13, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x47, 0x65, 0x74, 0x51, 0x75,
+ 0x6f, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x41, 0x42, 0x69, 0x74,
+ 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x1a, 0x40, 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, 0x41, 0x42,
+ 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x22, 0x47,
+ 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x41, 0x12, 0x3f, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d,
+ 0x70, 0x6c, 0x65, 0x2f, 0x61, 0x5f, 0x62, 0x69, 0x74, 0x5f, 0x6f, 0x66, 0x5f, 0x65, 0x76, 0x65,
+ 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2f, 0x67,
+ 0x65, 0x74, 0x2f, 0x7b, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x6e, 0x65, 0x73, 0x74, 0x65,
+ 0x64, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0xf6, 0x01, 0x0a, 0x1d, 0x43, 0x68, 0x65, 0x63,
+ 0x6b, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x47, 0x65, 0x74, 0x51, 0x75,
0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x40, 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,
@@ -2005,203 +2573,270 @@ var file_examples_internal_proto_examplepb_a_bit_of_everything_proto_rawDesc = [
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, 0x41, 0x42, 0x69,
- 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x22, 0x47, 0x82,
- 0xd3, 0xe4, 0x93, 0x02, 0x41, 0x12, 0x3f, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70,
+ 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x22, 0x51, 0x82,
+ 0xd3, 0xe4, 0x93, 0x02, 0x4b, 0x12, 0x49, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70,
0x6c, 0x65, 0x2f, 0x61, 0x5f, 0x62, 0x69, 0x74, 0x5f, 0x6f, 0x66, 0x5f, 0x65, 0x76, 0x65, 0x72,
0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2f, 0x67, 0x65,
- 0x74, 0x2f, 0x7b, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64,
- 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0xf6, 0x01, 0x0a, 0x1d, 0x43, 0x68, 0x65, 0x63, 0x6b,
- 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x47, 0x65, 0x74, 0x51, 0x75, 0x65,
- 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x40, 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, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66,
- 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x1a, 0x40, 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, 0x41, 0x42, 0x69, 0x74,
- 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x22, 0x51, 0x82, 0xd3,
- 0xe4, 0x93, 0x02, 0x4b, 0x12, 0x49, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c,
- 0x65, 0x2f, 0x61, 0x5f, 0x62, 0x69, 0x74, 0x5f, 0x6f, 0x66, 0x5f, 0x65, 0x76, 0x65, 0x72, 0x79,
- 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2f, 0x67, 0x65, 0x74,
- 0x2f, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x2f, 0x7b, 0x73, 0x69,
- 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x2e, 0x6f, 0x6b, 0x7d, 0x12,
- 0xed, 0x01, 0x0a, 0x14, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x6f, 0x73, 0x74, 0x51, 0x75, 0x65,
- 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x40, 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, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66,
- 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x1a, 0x40, 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, 0x41, 0x42, 0x69, 0x74,
- 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x22, 0x51, 0x82, 0xd3,
- 0xe4, 0x93, 0x02, 0x4b, 0x22, 0x3a, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c,
+ 0x74, 0x2f, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x2f, 0x7b, 0x73,
+ 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x2e, 0x6f, 0x6b, 0x7d,
+ 0x12, 0xed, 0x01, 0x0a, 0x14, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x6f, 0x73, 0x74, 0x51, 0x75,
+ 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x40, 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, 0x41, 0x42, 0x69, 0x74, 0x4f,
+ 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x1a, 0x40, 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, 0x41, 0x42, 0x69,
+ 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x22, 0x51, 0x82,
+ 0xd3, 0xe4, 0x93, 0x02, 0x4b, 0x3a, 0x0d, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x6e, 0x65,
+ 0x73, 0x74, 0x65, 0x64, 0x22, 0x3a, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c,
0x65, 0x2f, 0x61, 0x5f, 0x62, 0x69, 0x74, 0x5f, 0x6f, 0x66, 0x5f, 0x65, 0x76, 0x65, 0x72, 0x79,
0x74, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2f, 0x70, 0x6f, 0x73,
0x74, 0x2f, 0x7b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d,
- 0x3a, 0x0d, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x12,
- 0x9b, 0x01, 0x0a, 0x1c, 0x4f, 0x76, 0x65, 0x72, 0x77, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73,
- 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65,
- 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
- 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
- 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e,
- 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x45, 0x92, 0x41, 0x12, 0x3a, 0x10, 0x61, 0x70, 0x70,
- 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x74, 0x65, 0x78, 0x74, 0x82, 0xd3, 0xe4,
- 0x93, 0x02, 0x2a, 0x12, 0x28, 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65,
- 0x2f, 0x6f, 0x76, 0x65, 0x72, 0x77, 0x72, 0x69, 0x74, 0x65, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e,
- 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x74, 0x79, 0x70, 0x65, 0x12, 0x88, 0x01,
- 0x0a, 0x15, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x50,
- 0x61, 0x74, 0x68, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x3c, 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, 0x61, 0x74, 0x68, 0x65, 0x6e, 0x75,
- 0x6d, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x57, 0x69, 0x74, 0x68, 0x50, 0x61, 0x74,
- 0x68, 0x45, 0x6e, 0x75, 0x6d, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
- 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x19, 0x82,
- 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x76, 0x32, 0x2f, 0x7b, 0x76, 0x61, 0x6c, 0x75,
- 0x65, 0x7d, 0x3a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x94, 0x01, 0x0a, 0x1b, 0x43, 0x68, 0x65,
- 0x63, 0x6b, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64,
- 0x50, 0x61, 0x74, 0x68, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x42, 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, 0x61, 0x74, 0x68, 0x65, 0x6e,
- 0x75, 0x6d, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x57, 0x69, 0x74, 0x68, 0x4e, 0x65,
- 0x73, 0x74, 0x65, 0x64, 0x50, 0x61, 0x74, 0x68, 0x45, 0x6e, 0x75, 0x6d, 0x1a, 0x16, 0x2e, 0x67,
- 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45,
- 0x6d, 0x70, 0x74, 0x79, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x76,
- 0x32, 0x2f, 0x7b, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x3a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x12,
- 0x8b, 0x01, 0x0a, 0x0b, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12,
- 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
- 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x43, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67,
+ 0x12, 0xba, 0x01, 0x0a, 0x1b, 0x4f, 0x76, 0x65, 0x72, 0x77, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65,
+ 0x12, 0x34, 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, 0x42, 0x6f, 0x64, 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x4d,
+ 0x92, 0x41, 0x18, 0x32, 0x16, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x2f, 0x78, 0x2d, 0x62, 0x61, 0x72, 0x2d, 0x6d, 0x69, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02,
+ 0x2c, 0x3a, 0x01, 0x2a, 0x22, 0x27, 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c,
+ 0x65, 0x2f, 0x6f, 0x76, 0x65, 0x72, 0x77, 0x72, 0x69, 0x74, 0x65, 0x72, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x74, 0x79, 0x70, 0x65, 0x12, 0x9b, 0x01,
+ 0x0a, 0x1c, 0x4f, 0x76, 0x65, 0x72, 0x77, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16,
+ 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
+ 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56,
+ 0x61, 0x6c, 0x75, 0x65, 0x22, 0x45, 0x92, 0x41, 0x12, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69,
+ 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x74, 0x65, 0x78, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02,
+ 0x2a, 0x12, 0x28, 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x6f,
+ 0x76, 0x65, 0x72, 0x77, 0x72, 0x69, 0x74, 0x65, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x74, 0x79, 0x70, 0x65, 0x12, 0x88, 0x01, 0x0a, 0x15,
+ 0x43, 0x68, 0x65, 0x63, 0x6b, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x50, 0x61, 0x74,
+ 0x68, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x3c, 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, 0x61, 0x74, 0x68, 0x65, 0x6e, 0x75, 0x6d, 0x2e,
+ 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x57, 0x69, 0x74, 0x68, 0x50, 0x61, 0x74, 0x68, 0x45,
+ 0x6e, 0x75, 0x6d, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x19, 0x82, 0xd3, 0xe4,
+ 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x76, 0x32, 0x2f, 0x7b, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d,
+ 0x3a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x94, 0x01, 0x0a, 0x1b, 0x43, 0x68, 0x65, 0x63, 0x6b,
+ 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x50, 0x61,
+ 0x74, 0x68, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x42, 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, 0x61, 0x74, 0x68, 0x65, 0x6e, 0x75, 0x6d,
+ 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x57, 0x69, 0x74, 0x68, 0x4e, 0x65, 0x73, 0x74,
+ 0x65, 0x64, 0x50, 0x61, 0x74, 0x68, 0x45, 0x6e, 0x75, 0x6d, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f,
+ 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70,
+ 0x74, 0x79, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x76, 0x33, 0x2f,
+ 0x7b, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x3a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x8b, 0x01,
+ 0x0a, 0x0b, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x2e,
+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
+ 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x43, 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, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74,
+ 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93,
+ 0x02, 0x19, 0x12, 0x17, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f,
+ 0x63, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x9a, 0x01, 0x0a, 0x06,
+ 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x12, 0x40, 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, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76,
+ 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79,
+ 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x42, 0x2e, 0x0a, 0x04, 0x48, 0x45, 0x41, 0x44,
+ 0x12, 0x26, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x61, 0x5f,
+ 0x62, 0x69, 0x74, 0x5f, 0x6f, 0x66, 0x5f, 0x65, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e,
+ 0x67, 0x2f, 0x7b, 0x75, 0x75, 0x69, 0x64, 0x7d, 0x12, 0xab, 0x01, 0x0a, 0x14, 0x43, 0x75, 0x73,
+ 0x74, 0x6f, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x12, 0x40, 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, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68,
+ 0x69, 0x6e, 0x67, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x39, 0x82, 0xd3, 0xe4,
+ 0x93, 0x02, 0x33, 0x42, 0x31, 0x0a, 0x07, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x12, 0x26,
+ 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x61, 0x5f, 0x62, 0x69,
+ 0x74, 0x5f, 0x6f, 0x66, 0x5f, 0x65, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2f,
+ 0x7b, 0x75, 0x75, 0x69, 0x64, 0x7d, 0x12, 0xcb, 0x01, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x63, 0x65,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 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, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74,
- 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3,
- 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c,
- 0x65, 0x2f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x1a, 0xbf, 0x01,
- 0x92, 0x41, 0xbb, 0x01, 0x12, 0x66, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72,
- 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x64, 0x65,
- 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x2d, 0x2d, 0x20, 0x77, 0x68, 0x69,
- 0x63, 0x68, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x62, 0x65,
- 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x20, 0x6f,
- 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74,
- 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x21, 0x1a, 0x51, 0x0a, 0x1f,
- 0x46, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x75, 0x74, 0x20, 0x6d, 0x6f, 0x72, 0x65, 0x20, 0x61, 0x62,
- 0x6f, 0x75, 0x74, 0x20, 0x45, 0x63, 0x68, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 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, 0x32,
- 0x6a, 0x0a, 0x14, 0x63, 0x61, 0x6d, 0x65, 0x6c, 0x43, 0x61, 0x73, 0x65, 0x53, 0x65, 0x72, 0x76,
- 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x52, 0x0a, 0x05, 0x45, 0x6d, 0x70, 0x74, 0x79,
- 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
- 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45,
+ 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x1a, 0x40, 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, 0x41, 0x42, 0x69, 0x74, 0x4f,
+ 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x22, 0x37, 0x82, 0xd3, 0xe4,
+ 0x93, 0x02, 0x31, 0x42, 0x2f, 0x0a, 0x05, 0x54, 0x52, 0x41, 0x43, 0x45, 0x12, 0x26, 0x2f, 0x76,
+ 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x61, 0x5f, 0x62, 0x69, 0x74, 0x5f,
+ 0x6f, 0x66, 0x5f, 0x65, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x7b, 0x75,
+ 0x75, 0x69, 0x64, 0x7d, 0x12, 0x96, 0x01, 0x0a, 0x0d, 0x50, 0x6f, 0x73, 0x74, 0x4f, 0x6e, 0x65,
+ 0x6f, 0x66, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x40, 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, 0x6f, 0x6e,
+ 0x65, 0x6f, 0x66, 0x65, 0x6e, 0x75, 0x6d, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x45, 0x6e, 0x75,
+ 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79,
- 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x78,
- 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x32, 0x5e, 0x0a, 0x1c, 0x41,
- 0x6e, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x57, 0x69, 0x74,
- 0x68, 0x4e, 0x6f, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3e, 0x0a, 0x0a, 0x4e,
- 0x6f, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
- 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74,
- 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
- 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x42, 0xa1, 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, 0xd0, 0x0b, 0x12,
- 0xf6, 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, 0x5e, 0x0a, 0x14, 0x42, 0x53, 0x44, 0x20, 0x33, 0x2d, 0x43, 0x6c, 0x61, 0x75, 0x73,
- 0x65, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x12, 0x46, 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, 0x73, 0x74, 0x65, 0x72, 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,
+ 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x0c, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c,
+ 0x65, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x22, 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d,
+ 0x70, 0x6c, 0x65, 0x2f, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x65, 0x6e, 0x75, 0x6d, 0x12, 0xa9, 0x01,
+ 0x0a, 0x17, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x4d, 0x65,
+ 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x4a, 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, 0x52, 0x65, 0x71, 0x75, 0x69,
+ 0x72, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x2a, 0x82,
+ 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x3a, 0x01, 0x2a, 0x22, 0x1f, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78,
+ 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x6d, 0x65,
+ 0x73, 0x73, 0x61, 0x67, 0x65, 0x74, 0x79, 0x70, 0x65, 0x1a, 0xbf, 0x01, 0x92, 0x41, 0xbb, 0x01,
+ 0x12, 0x66, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69,
+ 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69,
+ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x2d, 0x2d, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x73,
+ 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x62, 0x65, 0x20, 0x75, 0x73, 0x65,
+ 0x64, 0x20, 0x69, 0x6e, 0x20, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68,
+ 0x65, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20,
+ 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x21, 0x1a, 0x51, 0x0a, 0x1f, 0x46, 0x69, 0x6e, 0x64,
+ 0x20, 0x6f, 0x75, 0x74, 0x20, 0x6d, 0x6f, 0x72, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x75, 0x74, 0x20,
+ 0x45, 0x63, 0x68, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 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, 0x32, 0x6a, 0x0a, 0x14, 0x63,
+ 0x61, 0x6d, 0x65, 0x6c, 0x43, 0x61, 0x73, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e,
+ 0x61, 0x6d, 0x65, 0x12, 0x52, 0x0a, 0x05, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x16, 0x2e, 0x67,
+ 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45,
+ 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x19, 0x82, 0xd3,
+ 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c,
+ 0x65, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x32, 0x5e, 0x0a, 0x1c, 0x41, 0x6e, 0x6f, 0x74, 0x68,
+ 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x57, 0x69, 0x74, 0x68, 0x4e, 0x6f, 0x42,
+ 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3e, 0x0a, 0x0a, 0x4e, 0x6f, 0x42, 0x69, 0x6e,
+ 0x64, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e,
+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
+ 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x32, 0xd5, 0x01, 0x0a, 0x10, 0x53, 0x6e, 0x61, 0x6b,
+ 0x65, 0x45, 0x6e, 0x75, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xc0, 0x01, 0x0a,
+ 0x09, 0x53, 0x6e, 0x61, 0x6b, 0x65, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x40, 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, 0x53, 0x6e, 0x61, 0x6b,
+ 0x65, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x41, 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, 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,
+ 0x6f, 0x74, 0x6f, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x53, 0x6e,
+ 0x61, 0x6b, 0x65, 0x45, 0x6e, 0x75, 0x6d, 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,
+ 0xd5, 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, 0x84, 0x0c, 0x12, 0xf6, 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, 0x5e, 0x0a, 0x14, 0x42, 0x53, 0x44, 0x20, 0x33, 0x2d, 0x43,
+ 0x6c, 0x61, 0x75, 0x73, 0x65, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x12, 0x46, 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, 0x73, 0x74, 0x65, 0x72, 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,
}
var (
@@ -2216,125 +2851,157 @@ func file_examples_internal_proto_examplepb_a_bit_of_everything_proto_rawDescGZI
return file_examples_internal_proto_examplepb_a_bit_of_everything_proto_rawDescData
}
-var file_examples_internal_proto_examplepb_a_bit_of_everything_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
-var file_examples_internal_proto_examplepb_a_bit_of_everything_proto_msgTypes = make([]protoimpl.MessageInfo, 15)
+var file_examples_internal_proto_examplepb_a_bit_of_everything_proto_enumTypes = make([]protoimpl.EnumInfo, 4)
+var file_examples_internal_proto_examplepb_a_bit_of_everything_proto_msgTypes = make([]protoimpl.MessageInfo, 20)
var file_examples_internal_proto_examplepb_a_bit_of_everything_proto_goTypes = []interface{}{
(NumericEnum)(0), // 0: grpc.gateway.examples.internal.proto.examplepb.NumericEnum
- (ABitOfEverything_Nested_DeepEnum)(0), // 1: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.Nested.DeepEnum
- (*ErrorResponse)(nil), // 2: grpc.gateway.examples.internal.proto.examplepb.ErrorResponse
- (*ErrorObject)(nil), // 3: grpc.gateway.examples.internal.proto.examplepb.ErrorObject
- (*ABitOfEverything)(nil), // 4: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything
- (*ABitOfEverythingRepeated)(nil), // 5: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingRepeated
- (*CheckStatusResponse)(nil), // 6: grpc.gateway.examples.internal.proto.examplepb.CheckStatusResponse
- (*Body)(nil), // 7: grpc.gateway.examples.internal.proto.examplepb.Body
- (*MessageWithBody)(nil), // 8: grpc.gateway.examples.internal.proto.examplepb.MessageWithBody
- (*UpdateV2Request)(nil), // 9: grpc.gateway.examples.internal.proto.examplepb.UpdateV2Request
- (*Book)(nil), // 10: grpc.gateway.examples.internal.proto.examplepb.Book
- (*CreateBookRequest)(nil), // 11: grpc.gateway.examples.internal.proto.examplepb.CreateBookRequest
- (*UpdateBookRequest)(nil), // 12: grpc.gateway.examples.internal.proto.examplepb.UpdateBookRequest
- (*ABitOfEverything_Nested)(nil), // 13: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.Nested
- nil, // 14: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.MapValueEntry
- nil, // 15: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.MappedStringValueEntry
- nil, // 16: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.MappedNestedValueEntry
- (pathenum.PathEnum)(0), // 17: grpc.gateway.examples.internal.pathenum.PathEnum
- (pathenum.MessagePathEnum_NestedPathEnum)(0), // 18: grpc.gateway.examples.internal.pathenum.MessagePathEnum.NestedPathEnum
- (*empty.Empty)(nil), // 19: google.protobuf.Empty
- (*timestamp.Timestamp)(nil), // 20: google.protobuf.Timestamp
- (*status.Status)(nil), // 21: google.rpc.Status
- (*field_mask.FieldMask)(nil), // 22: google.protobuf.FieldMask
- (*sub2.IdMessage)(nil), // 23: grpc.gateway.examples.internal.proto.sub2.IdMessage
- (*sub.StringMessage)(nil), // 24: grpc.gateway.examples.internal.proto.sub.StringMessage
- (*duration.Duration)(nil), // 25: google.protobuf.Duration
- (*pathenum.MessageWithPathEnum)(nil), // 26: grpc.gateway.examples.internal.pathenum.MessageWithPathEnum
- (*pathenum.MessageWithNestedPathEnum)(nil), // 27: grpc.gateway.examples.internal.pathenum.MessageWithNestedPathEnum
- (*wrappers.StringValue)(nil), // 28: google.protobuf.StringValue
+ (SnakeCaseEnum)(0), // 1: grpc.gateway.examples.internal.proto.examplepb.snake_case_enum
+ (SnakeCase_0Enum)(0), // 2: grpc.gateway.examples.internal.proto.examplepb.snake_case_0_enum
+ (ABitOfEverything_Nested_DeepEnum)(0), // 3: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.Nested.DeepEnum
+ (*ErrorResponse)(nil), // 4: grpc.gateway.examples.internal.proto.examplepb.ErrorResponse
+ (*ErrorObject)(nil), // 5: grpc.gateway.examples.internal.proto.examplepb.ErrorObject
+ (*ABitOfEverything)(nil), // 6: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything
+ (*ABitOfEverythingRepeated)(nil), // 7: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingRepeated
+ (*CheckStatusResponse)(nil), // 8: grpc.gateway.examples.internal.proto.examplepb.CheckStatusResponse
+ (*Body)(nil), // 9: grpc.gateway.examples.internal.proto.examplepb.Body
+ (*MessageWithBody)(nil), // 10: grpc.gateway.examples.internal.proto.examplepb.MessageWithBody
+ (*UpdateV2Request)(nil), // 11: grpc.gateway.examples.internal.proto.examplepb.UpdateV2Request
+ (*Book)(nil), // 12: grpc.gateway.examples.internal.proto.examplepb.Book
+ (*CreateBookRequest)(nil), // 13: grpc.gateway.examples.internal.proto.examplepb.CreateBookRequest
+ (*UpdateBookRequest)(nil), // 14: grpc.gateway.examples.internal.proto.examplepb.UpdateBookRequest
+ (*SnakeEnumRequest)(nil), // 15: grpc.gateway.examples.internal.proto.examplepb.SnakeEnumRequest
+ (*SnakeEnumResponse)(nil), // 16: grpc.gateway.examples.internal.proto.examplepb.SnakeEnumResponse
+ (*RequiredMessageTypeRequest)(nil), // 17: grpc.gateway.examples.internal.proto.examplepb.RequiredMessageTypeRequest
+ (*Foo)(nil), // 18: grpc.gateway.examples.internal.proto.examplepb.Foo
+ (*Bar)(nil), // 19: grpc.gateway.examples.internal.proto.examplepb.Bar
+ (*ABitOfEverything_Nested)(nil), // 20: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.Nested
+ nil, // 21: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.MapValueEntry
+ nil, // 22: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.MappedStringValueEntry
+ nil, // 23: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.MappedNestedValueEntry
+ (pathenum.PathEnum)(0), // 24: grpc.gateway.examples.internal.pathenum.PathEnum
+ (pathenum.MessagePathEnum_NestedPathEnum)(0), // 25: grpc.gateway.examples.internal.pathenum.MessagePathEnum.NestedPathEnum
+ (*emptypb.Empty)(nil), // 26: google.protobuf.Empty
+ (*timestamppb.Timestamp)(nil), // 27: google.protobuf.Timestamp
+ (*status.Status)(nil), // 28: google.rpc.Status
+ (*fieldmaskpb.FieldMask)(nil), // 29: google.protobuf.FieldMask
+ (pathenum.SnakeCaseForImport)(0), // 30: grpc.gateway.examples.internal.pathenum.snake_case_for_import
+ (*sub2.IdMessage)(nil), // 31: grpc.gateway.examples.internal.proto.sub2.IdMessage
+ (*sub.StringMessage)(nil), // 32: grpc.gateway.examples.internal.proto.sub.StringMessage
+ (*durationpb.Duration)(nil), // 33: google.protobuf.Duration
+ (*pathenum.MessageWithPathEnum)(nil), // 34: grpc.gateway.examples.internal.pathenum.MessageWithPathEnum
+ (*pathenum.MessageWithNestedPathEnum)(nil), // 35: grpc.gateway.examples.internal.pathenum.MessageWithNestedPathEnum
+ (*oneofenum.OneofEnumMessage)(nil), // 36: grpc.gateway.examples.internal.proto.oneofenum.OneofEnumMessage
+ (*wrapperspb.StringValue)(nil), // 37: google.protobuf.StringValue
}
var file_examples_internal_proto_examplepb_a_bit_of_everything_proto_depIdxs = []int32{
- 3, // 0: grpc.gateway.examples.internal.proto.examplepb.ErrorResponse.error:type_name -> grpc.gateway.examples.internal.proto.examplepb.ErrorObject
- 13, // 1: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.single_nested:type_name -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.Nested
- 13, // 2: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.nested:type_name -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.Nested
+ 5, // 0: grpc.gateway.examples.internal.proto.examplepb.ErrorResponse.error:type_name -> grpc.gateway.examples.internal.proto.examplepb.ErrorObject
+ 20, // 1: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.single_nested:type_name -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.Nested
+ 20, // 2: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.nested:type_name -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.Nested
0, // 3: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.enum_value:type_name -> grpc.gateway.examples.internal.proto.examplepb.NumericEnum
- 17, // 4: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.path_enum_value:type_name -> grpc.gateway.examples.internal.pathenum.PathEnum
- 18, // 5: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.nested_path_enum_value:type_name -> grpc.gateway.examples.internal.pathenum.MessagePathEnum.NestedPathEnum
- 19, // 6: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.oneof_empty:type_name -> google.protobuf.Empty
- 14, // 7: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.map_value:type_name -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.MapValueEntry
- 15, // 8: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.mapped_string_value:type_name -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.MappedStringValueEntry
- 16, // 9: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.mapped_nested_value:type_name -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.MappedNestedValueEntry
- 20, // 10: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.timestamp_value:type_name -> google.protobuf.Timestamp
+ 24, // 4: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.path_enum_value:type_name -> grpc.gateway.examples.internal.pathenum.PathEnum
+ 25, // 5: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.nested_path_enum_value:type_name -> grpc.gateway.examples.internal.pathenum.MessagePathEnum.NestedPathEnum
+ 26, // 6: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.oneof_empty:type_name -> google.protobuf.Empty
+ 21, // 7: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.map_value:type_name -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.MapValueEntry
+ 22, // 8: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.mapped_string_value:type_name -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.MappedStringValueEntry
+ 23, // 9: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.mapped_nested_value:type_name -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.MappedNestedValueEntry
+ 27, // 10: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.timestamp_value:type_name -> google.protobuf.Timestamp
0, // 11: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.repeated_enum_value:type_name -> grpc.gateway.examples.internal.proto.examplepb.NumericEnum
0, // 12: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.repeated_enum_annotation:type_name -> grpc.gateway.examples.internal.proto.examplepb.NumericEnum
0, // 13: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.enum_value_annotation:type_name -> grpc.gateway.examples.internal.proto.examplepb.NumericEnum
- 13, // 14: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.repeated_nested_annotation:type_name -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.Nested
- 13, // 15: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.nested_annotation:type_name -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.Nested
+ 20, // 14: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.repeated_nested_annotation:type_name -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.Nested
+ 20, // 15: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.nested_annotation:type_name -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.Nested
0, // 16: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingRepeated.path_repeated_enum_value:type_name -> grpc.gateway.examples.internal.proto.examplepb.NumericEnum
- 21, // 17: grpc.gateway.examples.internal.proto.examplepb.CheckStatusResponse.status:type_name -> google.rpc.Status
- 7, // 18: grpc.gateway.examples.internal.proto.examplepb.MessageWithBody.data:type_name -> grpc.gateway.examples.internal.proto.examplepb.Body
- 4, // 19: grpc.gateway.examples.internal.proto.examplepb.UpdateV2Request.abe:type_name -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything
- 22, // 20: grpc.gateway.examples.internal.proto.examplepb.UpdateV2Request.update_mask:type_name -> google.protobuf.FieldMask
- 20, // 21: grpc.gateway.examples.internal.proto.examplepb.Book.create_time:type_name -> google.protobuf.Timestamp
- 10, // 22: grpc.gateway.examples.internal.proto.examplepb.CreateBookRequest.book:type_name -> grpc.gateway.examples.internal.proto.examplepb.Book
- 10, // 23: grpc.gateway.examples.internal.proto.examplepb.UpdateBookRequest.book:type_name -> grpc.gateway.examples.internal.proto.examplepb.Book
- 22, // 24: grpc.gateway.examples.internal.proto.examplepb.UpdateBookRequest.update_mask:type_name -> google.protobuf.FieldMask
- 1, // 25: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.Nested.ok:type_name -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.Nested.DeepEnum
- 0, // 26: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.MapValueEntry.value:type_name -> grpc.gateway.examples.internal.proto.examplepb.NumericEnum
- 13, // 27: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.MappedNestedValueEntry.value:type_name -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.Nested
- 4, // 28: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.Create:input_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything
- 4, // 29: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.CreateBody:input_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything
- 11, // 30: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.CreateBook:input_type -> grpc.gateway.examples.internal.proto.examplepb.CreateBookRequest
- 12, // 31: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.UpdateBook:input_type -> grpc.gateway.examples.internal.proto.examplepb.UpdateBookRequest
- 23, // 32: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.Lookup:input_type -> grpc.gateway.examples.internal.proto.sub2.IdMessage
- 4, // 33: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.Update:input_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything
- 9, // 34: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.UpdateV2:input_type -> grpc.gateway.examples.internal.proto.examplepb.UpdateV2Request
- 23, // 35: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.Delete:input_type -> grpc.gateway.examples.internal.proto.sub2.IdMessage
- 4, // 36: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.GetQuery:input_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything
- 5, // 37: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.GetRepeatedQuery:input_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingRepeated
- 24, // 38: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.Echo:input_type -> grpc.gateway.examples.internal.proto.sub.StringMessage
- 4, // 39: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.DeepPathEcho:input_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything
- 25, // 40: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.NoBindings:input_type -> google.protobuf.Duration
- 19, // 41: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.Timeout:input_type -> google.protobuf.Empty
- 19, // 42: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.ErrorWithDetails:input_type -> google.protobuf.Empty
- 8, // 43: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.GetMessageWithBody:input_type -> grpc.gateway.examples.internal.proto.examplepb.MessageWithBody
- 7, // 44: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.PostWithEmptyBody:input_type -> grpc.gateway.examples.internal.proto.examplepb.Body
- 4, // 45: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.CheckGetQueryParams:input_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything
- 4, // 46: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.CheckNestedEnumGetQueryParams:input_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything
- 4, // 47: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.CheckPostQueryParams:input_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything
- 19, // 48: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.OverwriteResponseContentType:input_type -> google.protobuf.Empty
- 26, // 49: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.CheckExternalPathEnum:input_type -> grpc.gateway.examples.internal.pathenum.MessageWithPathEnum
- 27, // 50: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.CheckExternalNestedPathEnum:input_type -> grpc.gateway.examples.internal.pathenum.MessageWithNestedPathEnum
- 19, // 51: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.CheckStatus:input_type -> google.protobuf.Empty
- 19, // 52: grpc.gateway.examples.internal.proto.examplepb.camelCaseServiceName.Empty:input_type -> google.protobuf.Empty
- 19, // 53: grpc.gateway.examples.internal.proto.examplepb.AnotherServiceWithNoBindings.NoBindings:input_type -> google.protobuf.Empty
- 4, // 54: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.Create:output_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything
- 4, // 55: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.CreateBody:output_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything
- 10, // 56: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.CreateBook:output_type -> grpc.gateway.examples.internal.proto.examplepb.Book
- 10, // 57: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.UpdateBook:output_type -> grpc.gateway.examples.internal.proto.examplepb.Book
- 4, // 58: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.Lookup:output_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything
- 19, // 59: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.Update:output_type -> google.protobuf.Empty
- 19, // 60: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.UpdateV2:output_type -> google.protobuf.Empty
- 19, // 61: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.Delete:output_type -> google.protobuf.Empty
- 19, // 62: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.GetQuery:output_type -> google.protobuf.Empty
- 5, // 63: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.GetRepeatedQuery:output_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingRepeated
- 24, // 64: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.Echo:output_type -> grpc.gateway.examples.internal.proto.sub.StringMessage
- 4, // 65: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.DeepPathEcho:output_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything
- 19, // 66: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.NoBindings:output_type -> google.protobuf.Empty
- 19, // 67: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.Timeout:output_type -> google.protobuf.Empty
- 19, // 68: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.ErrorWithDetails:output_type -> google.protobuf.Empty
- 19, // 69: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.GetMessageWithBody:output_type -> google.protobuf.Empty
- 19, // 70: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.PostWithEmptyBody:output_type -> google.protobuf.Empty
- 4, // 71: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.CheckGetQueryParams:output_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything
- 4, // 72: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.CheckNestedEnumGetQueryParams:output_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything
- 4, // 73: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.CheckPostQueryParams:output_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything
- 28, // 74: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.OverwriteResponseContentType:output_type -> google.protobuf.StringValue
- 19, // 75: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.CheckExternalPathEnum:output_type -> google.protobuf.Empty
- 19, // 76: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.CheckExternalNestedPathEnum:output_type -> google.protobuf.Empty
- 6, // 77: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.CheckStatus:output_type -> grpc.gateway.examples.internal.proto.examplepb.CheckStatusResponse
- 19, // 78: grpc.gateway.examples.internal.proto.examplepb.camelCaseServiceName.Empty:output_type -> google.protobuf.Empty
- 19, // 79: grpc.gateway.examples.internal.proto.examplepb.AnotherServiceWithNoBindings.NoBindings:output_type -> google.protobuf.Empty
- 54, // [54:80] is the sub-list for method output_type
- 28, // [28:54] is the sub-list for method input_type
- 28, // [28:28] is the sub-list for extension type_name
- 28, // [28:28] is the sub-list for extension extendee
- 0, // [0:28] is the sub-list for field type_name
+ 28, // 17: grpc.gateway.examples.internal.proto.examplepb.CheckStatusResponse.status:type_name -> google.rpc.Status
+ 9, // 18: grpc.gateway.examples.internal.proto.examplepb.MessageWithBody.data:type_name -> grpc.gateway.examples.internal.proto.examplepb.Body
+ 6, // 19: grpc.gateway.examples.internal.proto.examplepb.UpdateV2Request.abe:type_name -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything
+ 29, // 20: grpc.gateway.examples.internal.proto.examplepb.UpdateV2Request.update_mask:type_name -> google.protobuf.FieldMask
+ 27, // 21: grpc.gateway.examples.internal.proto.examplepb.Book.create_time:type_name -> google.protobuf.Timestamp
+ 12, // 22: grpc.gateway.examples.internal.proto.examplepb.CreateBookRequest.book:type_name -> grpc.gateway.examples.internal.proto.examplepb.Book
+ 12, // 23: grpc.gateway.examples.internal.proto.examplepb.UpdateBookRequest.book:type_name -> grpc.gateway.examples.internal.proto.examplepb.Book
+ 29, // 24: grpc.gateway.examples.internal.proto.examplepb.UpdateBookRequest.update_mask:type_name -> google.protobuf.FieldMask
+ 1, // 25: grpc.gateway.examples.internal.proto.examplepb.SnakeEnumRequest.what:type_name -> grpc.gateway.examples.internal.proto.examplepb.snake_case_enum
+ 2, // 26: grpc.gateway.examples.internal.proto.examplepb.SnakeEnumRequest.who:type_name -> grpc.gateway.examples.internal.proto.examplepb.snake_case_0_enum
+ 30, // 27: grpc.gateway.examples.internal.proto.examplepb.SnakeEnumRequest.where:type_name -> grpc.gateway.examples.internal.pathenum.snake_case_for_import
+ 18, // 28: grpc.gateway.examples.internal.proto.examplepb.RequiredMessageTypeRequest.foo:type_name -> grpc.gateway.examples.internal.proto.examplepb.Foo
+ 19, // 29: grpc.gateway.examples.internal.proto.examplepb.Foo.bar:type_name -> grpc.gateway.examples.internal.proto.examplepb.Bar
+ 3, // 30: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.Nested.ok:type_name -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.Nested.DeepEnum
+ 0, // 31: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.MapValueEntry.value:type_name -> grpc.gateway.examples.internal.proto.examplepb.NumericEnum
+ 20, // 32: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.MappedNestedValueEntry.value:type_name -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything.Nested
+ 6, // 33: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.Create:input_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything
+ 6, // 34: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.CreateBody:input_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything
+ 13, // 35: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.CreateBook:input_type -> grpc.gateway.examples.internal.proto.examplepb.CreateBookRequest
+ 14, // 36: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.UpdateBook:input_type -> grpc.gateway.examples.internal.proto.examplepb.UpdateBookRequest
+ 31, // 37: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.Lookup:input_type -> grpc.gateway.examples.internal.proto.sub2.IdMessage
+ 6, // 38: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.Custom:input_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything
+ 6, // 39: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.DoubleColon:input_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything
+ 6, // 40: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.Update:input_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything
+ 11, // 41: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.UpdateV2:input_type -> grpc.gateway.examples.internal.proto.examplepb.UpdateV2Request
+ 31, // 42: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.Delete:input_type -> grpc.gateway.examples.internal.proto.sub2.IdMessage
+ 6, // 43: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.GetQuery:input_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything
+ 7, // 44: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.GetRepeatedQuery:input_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingRepeated
+ 32, // 45: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.Echo:input_type -> grpc.gateway.examples.internal.proto.sub.StringMessage
+ 6, // 46: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.DeepPathEcho:input_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything
+ 33, // 47: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.NoBindings:input_type -> google.protobuf.Duration
+ 26, // 48: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.Timeout:input_type -> google.protobuf.Empty
+ 26, // 49: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.ErrorWithDetails:input_type -> google.protobuf.Empty
+ 10, // 50: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.GetMessageWithBody:input_type -> grpc.gateway.examples.internal.proto.examplepb.MessageWithBody
+ 9, // 51: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.PostWithEmptyBody:input_type -> grpc.gateway.examples.internal.proto.examplepb.Body
+ 6, // 52: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.CheckGetQueryParams:input_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything
+ 6, // 53: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.CheckNestedEnumGetQueryParams:input_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything
+ 6, // 54: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.CheckPostQueryParams:input_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything
+ 9, // 55: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.OverwriteRequestContentType:input_type -> grpc.gateway.examples.internal.proto.examplepb.Body
+ 26, // 56: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.OverwriteResponseContentType:input_type -> google.protobuf.Empty
+ 34, // 57: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.CheckExternalPathEnum:input_type -> grpc.gateway.examples.internal.pathenum.MessageWithPathEnum
+ 35, // 58: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.CheckExternalNestedPathEnum:input_type -> grpc.gateway.examples.internal.pathenum.MessageWithNestedPathEnum
+ 26, // 59: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.CheckStatus:input_type -> google.protobuf.Empty
+ 6, // 60: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.Exists:input_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything
+ 6, // 61: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.CustomOptionsRequest:input_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything
+ 6, // 62: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.TraceRequest:input_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything
+ 36, // 63: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.PostOneofEnum:input_type -> grpc.gateway.examples.internal.proto.oneofenum.OneofEnumMessage
+ 17, // 64: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.PostRequiredMessageType:input_type -> grpc.gateway.examples.internal.proto.examplepb.RequiredMessageTypeRequest
+ 26, // 65: grpc.gateway.examples.internal.proto.examplepb.camelCaseServiceName.Empty:input_type -> google.protobuf.Empty
+ 26, // 66: grpc.gateway.examples.internal.proto.examplepb.AnotherServiceWithNoBindings.NoBindings:input_type -> google.protobuf.Empty
+ 15, // 67: grpc.gateway.examples.internal.proto.examplepb.SnakeEnumService.SnakeEnum:input_type -> grpc.gateway.examples.internal.proto.examplepb.SnakeEnumRequest
+ 6, // 68: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.Create:output_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything
+ 6, // 69: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.CreateBody:output_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything
+ 12, // 70: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.CreateBook:output_type -> grpc.gateway.examples.internal.proto.examplepb.Book
+ 12, // 71: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.UpdateBook:output_type -> grpc.gateway.examples.internal.proto.examplepb.Book
+ 6, // 72: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.Lookup:output_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything
+ 6, // 73: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.Custom:output_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything
+ 6, // 74: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.DoubleColon:output_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything
+ 26, // 75: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.Update:output_type -> google.protobuf.Empty
+ 26, // 76: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.UpdateV2:output_type -> google.protobuf.Empty
+ 26, // 77: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.Delete:output_type -> google.protobuf.Empty
+ 26, // 78: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.GetQuery:output_type -> google.protobuf.Empty
+ 7, // 79: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.GetRepeatedQuery:output_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingRepeated
+ 32, // 80: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.Echo:output_type -> grpc.gateway.examples.internal.proto.sub.StringMessage
+ 6, // 81: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.DeepPathEcho:output_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything
+ 26, // 82: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.NoBindings:output_type -> google.protobuf.Empty
+ 26, // 83: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.Timeout:output_type -> google.protobuf.Empty
+ 26, // 84: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.ErrorWithDetails:output_type -> google.protobuf.Empty
+ 26, // 85: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.GetMessageWithBody:output_type -> google.protobuf.Empty
+ 26, // 86: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.PostWithEmptyBody:output_type -> google.protobuf.Empty
+ 6, // 87: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.CheckGetQueryParams:output_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything
+ 6, // 88: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.CheckNestedEnumGetQueryParams:output_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything
+ 6, // 89: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.CheckPostQueryParams:output_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything
+ 26, // 90: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.OverwriteRequestContentType:output_type -> google.protobuf.Empty
+ 37, // 91: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.OverwriteResponseContentType:output_type -> google.protobuf.StringValue
+ 26, // 92: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.CheckExternalPathEnum:output_type -> google.protobuf.Empty
+ 26, // 93: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.CheckExternalNestedPathEnum:output_type -> google.protobuf.Empty
+ 8, // 94: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.CheckStatus:output_type -> grpc.gateway.examples.internal.proto.examplepb.CheckStatusResponse
+ 26, // 95: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.Exists:output_type -> google.protobuf.Empty
+ 26, // 96: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.CustomOptionsRequest:output_type -> google.protobuf.Empty
+ 6, // 97: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.TraceRequest:output_type -> grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything
+ 26, // 98: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.PostOneofEnum:output_type -> google.protobuf.Empty
+ 26, // 99: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService.PostRequiredMessageType:output_type -> google.protobuf.Empty
+ 26, // 100: grpc.gateway.examples.internal.proto.examplepb.camelCaseServiceName.Empty:output_type -> google.protobuf.Empty
+ 26, // 101: grpc.gateway.examples.internal.proto.examplepb.AnotherServiceWithNoBindings.NoBindings:output_type -> google.protobuf.Empty
+ 16, // 102: grpc.gateway.examples.internal.proto.examplepb.SnakeEnumService.SnakeEnum:output_type -> grpc.gateway.examples.internal.proto.examplepb.SnakeEnumResponse
+ 68, // [68:103] is the sub-list for method output_type
+ 33, // [33:68] is the sub-list for method input_type
+ 33, // [33:33] is the sub-list for extension type_name
+ 33, // [33:33] is the sub-list for extension extendee
+ 0, // [0:33] is the sub-list for field type_name
}
func init() { file_examples_internal_proto_examplepb_a_bit_of_everything_proto_init() }
@@ -2476,6 +3143,66 @@ func file_examples_internal_proto_examplepb_a_bit_of_everything_proto_init() {
}
}
file_examples_internal_proto_examplepb_a_bit_of_everything_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SnakeEnumRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_examples_internal_proto_examplepb_a_bit_of_everything_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SnakeEnumResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_examples_internal_proto_examplepb_a_bit_of_everything_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RequiredMessageTypeRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_examples_internal_proto_examplepb_a_bit_of_everything_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Foo); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_examples_internal_proto_examplepb_a_bit_of_everything_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Bar); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_examples_internal_proto_examplepb_a_bit_of_everything_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ABitOfEverything_Nested); i {
case 0:
return &v.state
@@ -2497,10 +3224,10 @@ func file_examples_internal_proto_examplepb_a_bit_of_everything_proto_init() {
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_examples_internal_proto_examplepb_a_bit_of_everything_proto_rawDesc,
- NumEnums: 2,
- NumMessages: 15,
+ NumEnums: 4,
+ NumMessages: 20,
NumExtensions: 0,
- NumServices: 3,
+ NumServices: 4,
},
GoTypes: file_examples_internal_proto_examplepb_a_bit_of_everything_proto_goTypes,
DependencyIndexes: file_examples_internal_proto_examplepb_a_bit_of_everything_proto_depIdxs,
diff --git a/examples/internal/proto/examplepb/a_bit_of_everything.pb.gw.go b/examples/internal/proto/examplepb/a_bit_of_everything.pb.gw.go
index 25a9a60c826..873dce4d621 100644
--- a/examples/internal/proto/examplepb/a_bit_of_everything.pb.gw.go
+++ b/examples/internal/proto/examplepb/a_bit_of_everything.pb.gw.go
@@ -13,7 +13,7 @@ import (
"io"
"net/http"
- "github.com/golang/protobuf/ptypes/empty"
+ "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/oneofenum"
"github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/pathenum"
"github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/sub"
"github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/sub2"
@@ -25,6 +25,7 @@ import (
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/proto"
+ "google.golang.org/protobuf/types/known/emptypb"
)
// Suppress "imported and not used" errors
@@ -755,6 +756,146 @@ func local_request_ABitOfEverythingService_Lookup_0(ctx context.Context, marshal
}
+var (
+ filter_ABitOfEverythingService_Custom_0 = &utilities.DoubleArray{Encoding: map[string]int{"uuid": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}
+)
+
+func request_ABitOfEverythingService_Custom_0(ctx context.Context, marshaler runtime.Marshaler, client ABitOfEverythingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ABitOfEverything
+ var metadata runtime.ServerMetadata
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["uuid"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uuid")
+ }
+
+ protoReq.Uuid, err = runtime.String(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uuid", err)
+ }
+
+ if err := req.ParseForm(); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ABitOfEverythingService_Custom_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := client.Custom(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_ABitOfEverythingService_Custom_0(ctx context.Context, marshaler runtime.Marshaler, server ABitOfEverythingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ABitOfEverything
+ var metadata runtime.ServerMetadata
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["uuid"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uuid")
+ }
+
+ protoReq.Uuid, err = runtime.String(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uuid", err)
+ }
+
+ if err := req.ParseForm(); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ABitOfEverythingService_Custom_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := server.Custom(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
+var (
+ filter_ABitOfEverythingService_DoubleColon_0 = &utilities.DoubleArray{Encoding: map[string]int{"uuid": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}
+)
+
+func request_ABitOfEverythingService_DoubleColon_0(ctx context.Context, marshaler runtime.Marshaler, client ABitOfEverythingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ABitOfEverything
+ var metadata runtime.ServerMetadata
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["uuid"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uuid")
+ }
+
+ protoReq.Uuid, err = runtime.String(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uuid", err)
+ }
+
+ if err := req.ParseForm(); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ABitOfEverythingService_DoubleColon_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := client.DoubleColon(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_ABitOfEverythingService_DoubleColon_0(ctx context.Context, marshaler runtime.Marshaler, server ABitOfEverythingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ABitOfEverything
+ var metadata runtime.ServerMetadata
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["uuid"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uuid")
+ }
+
+ protoReq.Uuid, err = runtime.String(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uuid", err)
+ }
+
+ if err := req.ParseForm(); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ABitOfEverythingService_DoubleColon_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := server.DoubleColon(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
func request_ABitOfEverythingService_Update_0(ctx context.Context, marshaler runtime.Marshaler, client ABitOfEverythingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq ABitOfEverything
var metadata runtime.ServerMetadata
@@ -1756,7 +1897,7 @@ func local_request_ABitOfEverythingService_DeepPathEcho_0(ctx context.Context, m
}
func request_ABitOfEverythingService_Timeout_0(ctx context.Context, marshaler runtime.Marshaler, client ABitOfEverythingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq empty.Empty
+ var protoReq emptypb.Empty
var metadata runtime.ServerMetadata
msg, err := client.Timeout(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
@@ -1765,7 +1906,7 @@ func request_ABitOfEverythingService_Timeout_0(ctx context.Context, marshaler ru
}
func local_request_ABitOfEverythingService_Timeout_0(ctx context.Context, marshaler runtime.Marshaler, server ABitOfEverythingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq empty.Empty
+ var protoReq emptypb.Empty
var metadata runtime.ServerMetadata
msg, err := server.Timeout(ctx, &protoReq)
@@ -1774,7 +1915,7 @@ func local_request_ABitOfEverythingService_Timeout_0(ctx context.Context, marsha
}
func request_ABitOfEverythingService_ErrorWithDetails_0(ctx context.Context, marshaler runtime.Marshaler, client ABitOfEverythingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq empty.Empty
+ var protoReq emptypb.Empty
var metadata runtime.ServerMetadata
msg, err := client.ErrorWithDetails(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
@@ -1783,7 +1924,7 @@ func request_ABitOfEverythingService_ErrorWithDetails_0(ctx context.Context, mar
}
func local_request_ABitOfEverythingService_ErrorWithDetails_0(ctx context.Context, marshaler runtime.Marshaler, server ABitOfEverythingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq empty.Empty
+ var protoReq emptypb.Empty
var metadata runtime.ServerMetadata
msg, err := server.ErrorWithDetails(ctx, &protoReq)
@@ -2169,8 +2310,42 @@ func local_request_ABitOfEverythingService_CheckPostQueryParams_0(ctx context.Co
}
+func request_ABitOfEverythingService_OverwriteRequestContentType_0(ctx context.Context, marshaler runtime.Marshaler, client ABitOfEverythingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq Body
+ var metadata runtime.ServerMetadata
+
+ newReader, berr := utilities.IOReaderFactory(req.Body)
+ if berr != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
+ }
+ if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := client.OverwriteRequestContentType(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_ABitOfEverythingService_OverwriteRequestContentType_0(ctx context.Context, marshaler runtime.Marshaler, server ABitOfEverythingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq Body
+ var metadata runtime.ServerMetadata
+
+ newReader, berr := utilities.IOReaderFactory(req.Body)
+ if berr != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
+ }
+ if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := server.OverwriteRequestContentType(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
func request_ABitOfEverythingService_OverwriteResponseContentType_0(ctx context.Context, marshaler runtime.Marshaler, client ABitOfEverythingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq empty.Empty
+ var protoReq emptypb.Empty
var metadata runtime.ServerMetadata
msg, err := client.OverwriteResponseContentType(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
@@ -2179,7 +2354,7 @@ func request_ABitOfEverythingService_OverwriteResponseContentType_0(ctx context.
}
func local_request_ABitOfEverythingService_OverwriteResponseContentType_0(ctx context.Context, marshaler runtime.Marshaler, server ABitOfEverythingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq empty.Empty
+ var protoReq emptypb.Empty
var metadata runtime.ServerMetadata
msg, err := server.OverwriteResponseContentType(ctx, &protoReq)
@@ -2304,7 +2479,7 @@ func local_request_ABitOfEverythingService_CheckExternalNestedPathEnum_0(ctx con
}
func request_ABitOfEverythingService_CheckStatus_0(ctx context.Context, marshaler runtime.Marshaler, client ABitOfEverythingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq empty.Empty
+ var protoReq emptypb.Empty
var metadata runtime.ServerMetadata
msg, err := client.CheckStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
@@ -2313,7 +2488,7 @@ func request_ABitOfEverythingService_CheckStatus_0(ctx context.Context, marshale
}
func local_request_ABitOfEverythingService_CheckStatus_0(ctx context.Context, marshaler runtime.Marshaler, server ABitOfEverythingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq empty.Empty
+ var protoReq emptypb.Empty
var metadata runtime.ServerMetadata
msg, err := server.CheckStatus(ctx, &protoReq)
@@ -2321,119 +2496,521 @@ func local_request_ABitOfEverythingService_CheckStatus_0(ctx context.Context, ma
}
-func request_CamelCaseServiceName_Empty_0(ctx context.Context, marshaler runtime.Marshaler, client CamelCaseServiceNameClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq empty.Empty
+var (
+ filter_ABitOfEverythingService_Exists_0 = &utilities.DoubleArray{Encoding: map[string]int{"uuid": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}
+)
+
+func request_ABitOfEverythingService_Exists_0(ctx context.Context, marshaler runtime.Marshaler, client ABitOfEverythingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ABitOfEverything
var metadata runtime.ServerMetadata
- msg, err := client.Empty(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
- return msg, metadata, err
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
-}
+ val, ok = pathParams["uuid"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uuid")
+ }
-func local_request_CamelCaseServiceName_Empty_0(ctx context.Context, marshaler runtime.Marshaler, server CamelCaseServiceNameServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq empty.Empty
- var metadata runtime.ServerMetadata
+ protoReq.Uuid, err = runtime.String(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uuid", err)
+ }
- msg, err := server.Empty(ctx, &protoReq)
+ if err := req.ParseForm(); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ABitOfEverythingService_Exists_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := client.Exists(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
-// RegisterABitOfEverythingServiceHandlerServer registers the http handlers for service ABitOfEverythingService to "mux".
-// UnaryRPC :call ABitOfEverythingServiceServer directly.
-// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
-// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterABitOfEverythingServiceHandlerFromEndpoint instead.
-func RegisterABitOfEverythingServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ABitOfEverythingServiceServer) error {
+func local_request_ABitOfEverythingService_Exists_0(ctx context.Context, marshaler runtime.Marshaler, server ABitOfEverythingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ABitOfEverything
+ var metadata runtime.ServerMetadata
- mux.Handle("POST", pattern_ABitOfEverythingService_Create_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
- ctx, cancel := context.WithCancel(req.Context())
- defer cancel()
- var stream runtime.ServerTransportStream
- ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/Create")
- if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
- return
- }
- resp, md, err := local_request_ABitOfEverythingService_Create_0(rctx, inboundMarshaler, server, req, pathParams)
- md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
- if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
- return
- }
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
- forward_ABitOfEverythingService_Create_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ val, ok = pathParams["uuid"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uuid")
+ }
- })
+ protoReq.Uuid, err = runtime.String(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uuid", err)
+ }
- mux.Handle("POST", pattern_ABitOfEverythingService_CreateBody_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
- ctx, cancel := context.WithCancel(req.Context())
- defer cancel()
- var stream runtime.ServerTransportStream
- ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/CreateBody")
- if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
- return
- }
- resp, md, err := local_request_ABitOfEverythingService_CreateBody_0(rctx, inboundMarshaler, server, req, pathParams)
- md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
- if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
- return
- }
+ if err := req.ParseForm(); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ABitOfEverythingService_Exists_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
- forward_ABitOfEverythingService_CreateBody_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ msg, err := server.Exists(ctx, &protoReq)
+ return msg, metadata, err
- })
+}
- mux.Handle("POST", pattern_ABitOfEverythingService_CreateBook_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
- ctx, cancel := context.WithCancel(req.Context())
- defer cancel()
- var stream runtime.ServerTransportStream
- ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/CreateBook")
- if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
- return
+var (
+ filter_ABitOfEverythingService_CustomOptionsRequest_0 = &utilities.DoubleArray{Encoding: map[string]int{"uuid": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}
+)
+
+func request_ABitOfEverythingService_CustomOptionsRequest_0(ctx context.Context, marshaler runtime.Marshaler, client ABitOfEverythingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ABitOfEverything
+ var metadata runtime.ServerMetadata
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["uuid"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uuid")
+ }
+
+ protoReq.Uuid, err = runtime.String(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uuid", err)
+ }
+
+ if err := req.ParseForm(); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ABitOfEverythingService_CustomOptionsRequest_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := client.CustomOptionsRequest(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_ABitOfEverythingService_CustomOptionsRequest_0(ctx context.Context, marshaler runtime.Marshaler, server ABitOfEverythingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ABitOfEverything
+ var metadata runtime.ServerMetadata
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["uuid"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uuid")
+ }
+
+ protoReq.Uuid, err = runtime.String(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uuid", err)
+ }
+
+ if err := req.ParseForm(); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ABitOfEverythingService_CustomOptionsRequest_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := server.CustomOptionsRequest(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
+var (
+ filter_ABitOfEverythingService_TraceRequest_0 = &utilities.DoubleArray{Encoding: map[string]int{"uuid": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}
+)
+
+func request_ABitOfEverythingService_TraceRequest_0(ctx context.Context, marshaler runtime.Marshaler, client ABitOfEverythingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ABitOfEverything
+ var metadata runtime.ServerMetadata
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["uuid"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uuid")
+ }
+
+ protoReq.Uuid, err = runtime.String(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uuid", err)
+ }
+
+ if err := req.ParseForm(); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ABitOfEverythingService_TraceRequest_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := client.TraceRequest(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_ABitOfEverythingService_TraceRequest_0(ctx context.Context, marshaler runtime.Marshaler, server ABitOfEverythingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ABitOfEverything
+ var metadata runtime.ServerMetadata
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["uuid"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uuid")
+ }
+
+ protoReq.Uuid, err = runtime.String(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uuid", err)
+ }
+
+ if err := req.ParseForm(); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ABitOfEverythingService_TraceRequest_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := server.TraceRequest(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
+func request_ABitOfEverythingService_PostOneofEnum_0(ctx context.Context, marshaler runtime.Marshaler, client ABitOfEverythingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq oneofenum.OneofEnumMessage
+ var metadata runtime.ServerMetadata
+
+ newReader, berr := utilities.IOReaderFactory(req.Body)
+ if berr != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
+ }
+ if protoReq.One == nil {
+ protoReq.One = &oneofenum.OneofEnumMessage_ExampleEnum{}
+ } else if _, ok := protoReq.One.(*oneofenum.OneofEnumMessage_ExampleEnum); !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "expect type: *oneofenum.OneofEnumMessage_ExampleEnum, but: %t\n", protoReq.One)
+ }
+ if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.One.(*oneofenum.OneofEnumMessage_ExampleEnum).ExampleEnum); err != nil && err != io.EOF {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := client.PostOneofEnum(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_ABitOfEverythingService_PostOneofEnum_0(ctx context.Context, marshaler runtime.Marshaler, server ABitOfEverythingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq oneofenum.OneofEnumMessage
+ var metadata runtime.ServerMetadata
+
+ newReader, berr := utilities.IOReaderFactory(req.Body)
+ if berr != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
+ }
+ if protoReq.One == nil {
+ protoReq.One = &oneofenum.OneofEnumMessage_ExampleEnum{}
+ } else if _, ok := protoReq.One.(*oneofenum.OneofEnumMessage_ExampleEnum); !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "expect type: *oneofenum.OneofEnumMessage_ExampleEnum, but: %t\n", protoReq.One)
+ }
+ if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.One.(*oneofenum.OneofEnumMessage_ExampleEnum).ExampleEnum); err != nil && err != io.EOF {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := server.PostOneofEnum(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
+func request_ABitOfEverythingService_PostRequiredMessageType_0(ctx context.Context, marshaler runtime.Marshaler, client ABitOfEverythingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq RequiredMessageTypeRequest
+ var metadata runtime.ServerMetadata
+
+ newReader, berr := utilities.IOReaderFactory(req.Body)
+ if berr != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
+ }
+ if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := client.PostRequiredMessageType(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_ABitOfEverythingService_PostRequiredMessageType_0(ctx context.Context, marshaler runtime.Marshaler, server ABitOfEverythingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq RequiredMessageTypeRequest
+ var metadata runtime.ServerMetadata
+
+ newReader, berr := utilities.IOReaderFactory(req.Body)
+ if berr != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
+ }
+ if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := server.PostRequiredMessageType(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
+func request_CamelCaseServiceName_Empty_0(ctx context.Context, marshaler runtime.Marshaler, client CamelCaseServiceNameClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq emptypb.Empty
+ var metadata runtime.ServerMetadata
+
+ msg, err := client.Empty(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_CamelCaseServiceName_Empty_0(ctx context.Context, marshaler runtime.Marshaler, server CamelCaseServiceNameServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq emptypb.Empty
+ var metadata runtime.ServerMetadata
+
+ msg, err := server.Empty(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
+func request_SnakeEnumService_SnakeEnum_0(ctx context.Context, marshaler runtime.Marshaler, client SnakeEnumServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq SnakeEnumRequest
+ var metadata runtime.ServerMetadata
+
+ var (
+ val string
+ e int32
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["who"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "who")
+ }
+
+ e, err = runtime.Enum(val, SnakeCase_0Enum_value)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "who", err)
+ }
+
+ protoReq.Who = SnakeCase_0Enum(e)
+
+ val, ok = pathParams["what"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "what")
+ }
+
+ e, err = runtime.Enum(val, SnakeCaseEnum_value)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "what", err)
+ }
+
+ protoReq.What = SnakeCaseEnum(e)
+
+ val, ok = pathParams["where"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "where")
+ }
+
+ e, err = runtime.Enum(val, pathenum.SnakeCaseForImport_value)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "where", err)
+ }
+
+ protoReq.Where = pathenum.SnakeCaseForImport(e)
+
+ msg, err := client.SnakeEnum(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_SnakeEnumService_SnakeEnum_0(ctx context.Context, marshaler runtime.Marshaler, server SnakeEnumServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq SnakeEnumRequest
+ var metadata runtime.ServerMetadata
+
+ var (
+ val string
+ e int32
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["who"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "who")
+ }
+
+ e, err = runtime.Enum(val, SnakeCase_0Enum_value)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "who", err)
+ }
+
+ protoReq.Who = SnakeCase_0Enum(e)
+
+ val, ok = pathParams["what"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "what")
+ }
+
+ e, err = runtime.Enum(val, SnakeCaseEnum_value)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "what", err)
+ }
+
+ protoReq.What = SnakeCaseEnum(e)
+
+ val, ok = pathParams["where"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "where")
+ }
+
+ e, err = runtime.Enum(val, pathenum.SnakeCaseForImport_value)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "where", err)
+ }
+
+ protoReq.Where = pathenum.SnakeCaseForImport(e)
+
+ msg, err := server.SnakeEnum(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
+// RegisterABitOfEverythingServiceHandlerServer registers the http handlers for service ABitOfEverythingService to "mux".
+// UnaryRPC :call ABitOfEverythingServiceServer directly.
+// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
+// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterABitOfEverythingServiceHandlerFromEndpoint instead.
+func RegisterABitOfEverythingServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ABitOfEverythingServiceServer) error {
+
+ mux.Handle("POST", pattern_ABitOfEverythingService_Create_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/Create", runtime.WithHTTPPathPattern("/v1/example/a_bit_of_everything/{float_value}/{double_value}/{int64_value}/separator/{uint64_value}/{int32_value}/{fixed64_value}/{fixed32_value}/{bool_value}/{string_value=strprefix/*}/{uint32_value}/{sfixed32_value}/{sfixed64_value}/{sint32_value}/{sint64_value}/{nonConventionalNameValue}/{enum_value}/{path_enum_value}/{nested_path_enum_value}/{enum_value_annotation}"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
}
- resp, md, err := local_request_ABitOfEverythingService_CreateBook_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_ABitOfEverythingService_Create_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_ABitOfEverythingService_Create_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("POST", pattern_ABitOfEverythingService_CreateBody_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/CreateBody", runtime.WithHTTPPathPattern("/v1/example/a_bit_of_everything"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
+ resp, md, err := local_request_ABitOfEverythingService_CreateBody_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
- forward_ABitOfEverythingService_CreateBook_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ABitOfEverythingService_CreateBody_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle("PATCH", pattern_ABitOfEverythingService_UpdateBook_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("POST", pattern_ABitOfEverythingService_CreateBook_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/UpdateBook")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/CreateBook", runtime.WithHTTPPathPattern("/v1/{parent=publishers/*}/books"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_ABitOfEverythingService_UpdateBook_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_ABitOfEverythingService_CreateBook_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_ABitOfEverythingService_CreateBook_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("PATCH", pattern_ABitOfEverythingService_UpdateBook_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/UpdateBook", runtime.WithHTTPPathPattern("/v1/{book.name=publishers/*/books/*}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
+ resp, md, err := local_request_ABitOfEverythingService_UpdateBook_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
- forward_ABitOfEverythingService_UpdateBook_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ABitOfEverythingService_UpdateBook_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -2443,20 +3020,72 @@ func RegisterABitOfEverythingServiceHandlerServer(ctx context.Context, mux *runt
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/Lookup")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/Lookup", runtime.WithHTTPPathPattern("/v1/example/a_bit_of_everything/{uuid}"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_ABitOfEverythingService_Lookup_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_ABitOfEverythingService_Lookup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("POST", pattern_ABitOfEverythingService_Custom_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/Custom", runtime.WithHTTPPathPattern("/v1/example/a_bit_of_everything/{uuid}:custom"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_ABitOfEverythingService_Lookup_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_ABitOfEverythingService_Custom_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_ABitOfEverythingService_Custom_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("POST", pattern_ABitOfEverythingService_DoubleColon_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/DoubleColon", runtime.WithHTTPPathPattern("/v1/example/a_bit_of_everything/{uuid}:custom:custom"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
+ resp, md, err := local_request_ABitOfEverythingService_DoubleColon_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
- forward_ABitOfEverythingService_Lookup_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ABitOfEverythingService_DoubleColon_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -2466,20 +3095,22 @@ func RegisterABitOfEverythingServiceHandlerServer(ctx context.Context, mux *runt
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/Update")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/Update", runtime.WithHTTPPathPattern("/v1/example/a_bit_of_everything/{uuid}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_ABitOfEverythingService_Update_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_ABitOfEverythingService_Update_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ABitOfEverythingService_Update_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ABitOfEverythingService_Update_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -2489,20 +3120,22 @@ func RegisterABitOfEverythingServiceHandlerServer(ctx context.Context, mux *runt
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/UpdateV2")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/UpdateV2", runtime.WithHTTPPathPattern("/v2/example/a_bit_of_everything/{abe.uuid}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_ABitOfEverythingService_UpdateV2_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_ABitOfEverythingService_UpdateV2_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ABitOfEverythingService_UpdateV2_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ABitOfEverythingService_UpdateV2_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -2512,20 +3145,22 @@ func RegisterABitOfEverythingServiceHandlerServer(ctx context.Context, mux *runt
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/UpdateV2")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/UpdateV2", runtime.WithHTTPPathPattern("/v2/example/a_bit_of_everything/{abe.uuid}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_ABitOfEverythingService_UpdateV2_1(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_ABitOfEverythingService_UpdateV2_1(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ABitOfEverythingService_UpdateV2_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ABitOfEverythingService_UpdateV2_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -2535,20 +3170,22 @@ func RegisterABitOfEverythingServiceHandlerServer(ctx context.Context, mux *runt
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/UpdateV2")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/UpdateV2", runtime.WithHTTPPathPattern("/v2a/example/a_bit_of_everything/{abe.uuid}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_ABitOfEverythingService_UpdateV2_2(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_ABitOfEverythingService_UpdateV2_2(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ABitOfEverythingService_UpdateV2_2(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ABitOfEverythingService_UpdateV2_2(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -2558,20 +3195,22 @@ func RegisterABitOfEverythingServiceHandlerServer(ctx context.Context, mux *runt
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/Delete")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/Delete", runtime.WithHTTPPathPattern("/v1/example/a_bit_of_everything/{uuid}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_ABitOfEverythingService_Delete_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_ABitOfEverythingService_Delete_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ABitOfEverythingService_Delete_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ABitOfEverythingService_Delete_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -2581,20 +3220,22 @@ func RegisterABitOfEverythingServiceHandlerServer(ctx context.Context, mux *runt
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/GetQuery")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/GetQuery", runtime.WithHTTPPathPattern("/v1/example/a_bit_of_everything/query/{uuid}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_ABitOfEverythingService_GetQuery_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_ABitOfEverythingService_GetQuery_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ABitOfEverythingService_GetQuery_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ABitOfEverythingService_GetQuery_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -2604,397 +3245,615 @@ func RegisterABitOfEverythingServiceHandlerServer(ctx context.Context, mux *runt
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/GetRepeatedQuery")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/GetRepeatedQuery", runtime.WithHTTPPathPattern("/v1/example/a_bit_of_everything_repeated/{path_repeated_float_value}/{path_repeated_double_value}/{path_repeated_int64_value}/{path_repeated_uint64_value}/{path_repeated_int32_value}/{path_repeated_fixed64_value}/{path_repeated_fixed32_value}/{path_repeated_bool_value}/{path_repeated_string_value}/{path_repeated_bytes_value}/{path_repeated_uint32_value}/{path_repeated_enum_value}/{path_repeated_sfixed32_value}/{path_repeated_sfixed64_value}/{path_repeated_sint32_value}/{path_repeated_sint64_value}"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_ABitOfEverythingService_GetRepeatedQuery_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_ABitOfEverythingService_GetRepeatedQuery_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("GET", pattern_ABitOfEverythingService_Echo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/Echo", runtime.WithHTTPPathPattern("/v1/example/a_bit_of_everything/echo/{value}"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_ABitOfEverythingService_Echo_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_ABitOfEverythingService_Echo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("POST", pattern_ABitOfEverythingService_Echo_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/Echo", runtime.WithHTTPPathPattern("/v2/example/echo"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_ABitOfEverythingService_Echo_1(annotatedContext, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_ABitOfEverythingService_Echo_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("GET", pattern_ABitOfEverythingService_Echo_2, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/Echo", runtime.WithHTTPPathPattern("/v2/example/echo"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_ABitOfEverythingService_Echo_2(annotatedContext, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_ABitOfEverythingService_Echo_2(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("POST", pattern_ABitOfEverythingService_DeepPathEcho_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/DeepPathEcho", runtime.WithHTTPPathPattern("/v1/example/deep_path/{single_nested.name}"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_ABitOfEverythingService_DeepPathEcho_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_ABitOfEverythingService_DeepPathEcho_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("GET", pattern_ABitOfEverythingService_Timeout_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/Timeout", runtime.WithHTTPPathPattern("/v2/example/timeout"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_ABitOfEverythingService_Timeout_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_ABitOfEverythingService_Timeout_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("GET", pattern_ABitOfEverythingService_ErrorWithDetails_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/ErrorWithDetails", runtime.WithHTTPPathPattern("/v2/example/errorwithdetails"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_ABitOfEverythingService_ErrorWithDetails_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_ABitOfEverythingService_ErrorWithDetails_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("POST", pattern_ABitOfEverythingService_GetMessageWithBody_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/GetMessageWithBody", runtime.WithHTTPPathPattern("/v2/example/withbody/{id}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_ABitOfEverythingService_GetRepeatedQuery_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_ABitOfEverythingService_GetMessageWithBody_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ABitOfEverythingService_GetRepeatedQuery_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ABitOfEverythingService_GetMessageWithBody_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle("GET", pattern_ABitOfEverythingService_Echo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("POST", pattern_ABitOfEverythingService_PostWithEmptyBody_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/Echo")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/PostWithEmptyBody", runtime.WithHTTPPathPattern("/v2/example/postwithemptybody/{name}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_ABitOfEverythingService_Echo_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_ABitOfEverythingService_PostWithEmptyBody_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ABitOfEverythingService_Echo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ABitOfEverythingService_PostWithEmptyBody_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle("POST", pattern_ABitOfEverythingService_Echo_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("GET", pattern_ABitOfEverythingService_CheckGetQueryParams_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/Echo")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/CheckGetQueryParams", runtime.WithHTTPPathPattern("/v1/example/a_bit_of_everything/params/get/{single_nested.name}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_ABitOfEverythingService_Echo_1(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_ABitOfEverythingService_CheckGetQueryParams_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ABitOfEverythingService_Echo_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ABitOfEverythingService_CheckGetQueryParams_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle("GET", pattern_ABitOfEverythingService_Echo_2, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("GET", pattern_ABitOfEverythingService_CheckNestedEnumGetQueryParams_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/Echo")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/CheckNestedEnumGetQueryParams", runtime.WithHTTPPathPattern("/v1/example/a_bit_of_everything/params/get/nested_enum/{single_nested.ok}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_ABitOfEverythingService_Echo_2(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_ABitOfEverythingService_CheckNestedEnumGetQueryParams_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ABitOfEverythingService_Echo_2(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ABitOfEverythingService_CheckNestedEnumGetQueryParams_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle("POST", pattern_ABitOfEverythingService_DeepPathEcho_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("POST", pattern_ABitOfEverythingService_CheckPostQueryParams_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/DeepPathEcho")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/CheckPostQueryParams", runtime.WithHTTPPathPattern("/v1/example/a_bit_of_everything/params/post/{string_value}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_ABitOfEverythingService_DeepPathEcho_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_ABitOfEverythingService_CheckPostQueryParams_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ABitOfEverythingService_DeepPathEcho_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ABitOfEverythingService_CheckPostQueryParams_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle("GET", pattern_ABitOfEverythingService_Timeout_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("POST", pattern_ABitOfEverythingService_OverwriteRequestContentType_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/Timeout")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/OverwriteRequestContentType", runtime.WithHTTPPathPattern("/v2/example/overwriterequestcontenttype"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_ABitOfEverythingService_Timeout_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_ABitOfEverythingService_OverwriteRequestContentType_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ABitOfEverythingService_Timeout_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ABitOfEverythingService_OverwriteRequestContentType_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle("GET", pattern_ABitOfEverythingService_ErrorWithDetails_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("GET", pattern_ABitOfEverythingService_OverwriteResponseContentType_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/ErrorWithDetails")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/OverwriteResponseContentType", runtime.WithHTTPPathPattern("/v2/example/overwriteresponsecontenttype"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_ABitOfEverythingService_ErrorWithDetails_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_ABitOfEverythingService_OverwriteResponseContentType_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ABitOfEverythingService_ErrorWithDetails_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ABitOfEverythingService_OverwriteResponseContentType_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle("POST", pattern_ABitOfEverythingService_GetMessageWithBody_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("GET", pattern_ABitOfEverythingService_CheckExternalPathEnum_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/GetMessageWithBody")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/CheckExternalPathEnum", runtime.WithHTTPPathPattern("/v2/{value}:check"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_ABitOfEverythingService_GetMessageWithBody_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_ABitOfEverythingService_CheckExternalPathEnum_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ABitOfEverythingService_GetMessageWithBody_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ABitOfEverythingService_CheckExternalPathEnum_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle("POST", pattern_ABitOfEverythingService_PostWithEmptyBody_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("GET", pattern_ABitOfEverythingService_CheckExternalNestedPathEnum_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/PostWithEmptyBody")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/CheckExternalNestedPathEnum", runtime.WithHTTPPathPattern("/v3/{value}:check"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_ABitOfEverythingService_PostWithEmptyBody_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_ABitOfEverythingService_CheckExternalNestedPathEnum_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ABitOfEverythingService_PostWithEmptyBody_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ABitOfEverythingService_CheckExternalNestedPathEnum_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle("GET", pattern_ABitOfEverythingService_CheckGetQueryParams_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("GET", pattern_ABitOfEverythingService_CheckStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/CheckGetQueryParams")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/CheckStatus", runtime.WithHTTPPathPattern("/v1/example/checkStatus"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_ABitOfEverythingService_CheckGetQueryParams_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_ABitOfEverythingService_CheckStatus_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ABitOfEverythingService_CheckGetQueryParams_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ABitOfEverythingService_CheckStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle("GET", pattern_ABitOfEverythingService_CheckNestedEnumGetQueryParams_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("HEAD", pattern_ABitOfEverythingService_Exists_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/CheckNestedEnumGetQueryParams")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/Exists", runtime.WithHTTPPathPattern("/v1/example/a_bit_of_everything/{uuid}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_ABitOfEverythingService_CheckNestedEnumGetQueryParams_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_ABitOfEverythingService_Exists_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ABitOfEverythingService_CheckNestedEnumGetQueryParams_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ABitOfEverythingService_Exists_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle("POST", pattern_ABitOfEverythingService_CheckPostQueryParams_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("OPTIONS", pattern_ABitOfEverythingService_CustomOptionsRequest_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/CheckPostQueryParams")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/CustomOptionsRequest", runtime.WithHTTPPathPattern("/v1/example/a_bit_of_everything/{uuid}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_ABitOfEverythingService_CheckPostQueryParams_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_ABitOfEverythingService_CustomOptionsRequest_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ABitOfEverythingService_CheckPostQueryParams_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ABitOfEverythingService_CustomOptionsRequest_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle("GET", pattern_ABitOfEverythingService_OverwriteResponseContentType_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("TRACE", pattern_ABitOfEverythingService_TraceRequest_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/OverwriteResponseContentType")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/TraceRequest", runtime.WithHTTPPathPattern("/v1/example/a_bit_of_everything/{uuid}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_ABitOfEverythingService_OverwriteResponseContentType_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_ABitOfEverythingService_TraceRequest_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ABitOfEverythingService_OverwriteResponseContentType_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ABitOfEverythingService_TraceRequest_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle("GET", pattern_ABitOfEverythingService_CheckExternalPathEnum_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("POST", pattern_ABitOfEverythingService_PostOneofEnum_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/CheckExternalPathEnum")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/PostOneofEnum", runtime.WithHTTPPathPattern("/v1/example/oneofenum"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_ABitOfEverythingService_CheckExternalPathEnum_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_ABitOfEverythingService_PostOneofEnum_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ABitOfEverythingService_CheckExternalPathEnum_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ABitOfEverythingService_PostOneofEnum_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle("GET", pattern_ABitOfEverythingService_CheckExternalNestedPathEnum_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("POST", pattern_ABitOfEverythingService_PostRequiredMessageType_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/CheckExternalNestedPathEnum")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/PostRequiredMessageType", runtime.WithHTTPPathPattern("/v1/example/requiredmessagetype"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_ABitOfEverythingService_CheckExternalNestedPathEnum_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_ABitOfEverythingService_PostRequiredMessageType_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ABitOfEverythingService_CheckExternalNestedPathEnum_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ABitOfEverythingService_PostRequiredMessageType_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle("GET", pattern_ABitOfEverythingService_CheckStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ return nil
+}
+
+// RegisterCamelCaseServiceNameHandlerServer registers the http handlers for service CamelCaseServiceName to "mux".
+// UnaryRPC :call CamelCaseServiceNameServer directly.
+// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
+// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterCamelCaseServiceNameHandlerFromEndpoint instead.
+func RegisterCamelCaseServiceNameHandlerServer(ctx context.Context, mux *runtime.ServeMux, server CamelCaseServiceNameServer) error {
+
+ mux.Handle("GET", pattern_CamelCaseServiceName_Empty_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/CheckStatus")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.CamelCaseServiceName/Empty", runtime.WithHTTPPathPattern("/v2/example/empty"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_ABitOfEverythingService_CheckStatus_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_CamelCaseServiceName_Empty_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ABitOfEverythingService_CheckStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_CamelCaseServiceName_Empty_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
-// RegisterCamelCaseServiceNameHandlerServer registers the http handlers for service CamelCaseServiceName to "mux".
-// UnaryRPC :call CamelCaseServiceNameServer directly.
+// RegisterSnakeEnumServiceHandlerServer registers the http handlers for service SnakeEnumService to "mux".
+// UnaryRPC :call SnakeEnumServiceServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
-// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterCamelCaseServiceNameHandlerFromEndpoint instead.
-func RegisterCamelCaseServiceNameHandlerServer(ctx context.Context, mux *runtime.ServeMux, server CamelCaseServiceNameServer) error {
+// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterSnakeEnumServiceHandlerFromEndpoint instead.
+func RegisterSnakeEnumServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SnakeEnumServiceServer) error {
- mux.Handle("GET", pattern_CamelCaseServiceName_Empty_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("GET", pattern_SnakeEnumService_SnakeEnum_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.CamelCaseServiceName/Empty")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.SnakeEnumService/SnakeEnum", runtime.WithHTTPPathPattern("/v1/example/snake/{who}/{what}/{where}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_CamelCaseServiceName_Empty_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_SnakeEnumService_SnakeEnum_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_CamelCaseServiceName_Empty_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_SnakeEnumService_SnakeEnum_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -3043,19 +3902,21 @@ func RegisterABitOfEverythingServiceHandlerClient(ctx context.Context, mux *runt
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/Create")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/Create", runtime.WithHTTPPathPattern("/v1/example/a_bit_of_everything/{float_value}/{double_value}/{int64_value}/separator/{uint64_value}/{int32_value}/{fixed64_value}/{fixed32_value}/{bool_value}/{string_value=strprefix/*}/{uint32_value}/{sfixed32_value}/{sfixed64_value}/{sint32_value}/{sint64_value}/{nonConventionalNameValue}/{enum_value}/{path_enum_value}/{nested_path_enum_value}/{enum_value_annotation}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_ABitOfEverythingService_Create_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_ABitOfEverythingService_Create_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ABitOfEverythingService_Create_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ABitOfEverythingService_Create_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -3063,19 +3924,21 @@ func RegisterABitOfEverythingServiceHandlerClient(ctx context.Context, mux *runt
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/CreateBody")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/CreateBody", runtime.WithHTTPPathPattern("/v1/example/a_bit_of_everything"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_ABitOfEverythingService_CreateBody_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_ABitOfEverythingService_CreateBody_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ABitOfEverythingService_CreateBody_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ABitOfEverythingService_CreateBody_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -3083,19 +3946,21 @@ func RegisterABitOfEverythingServiceHandlerClient(ctx context.Context, mux *runt
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/CreateBook")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/CreateBook", runtime.WithHTTPPathPattern("/v1/{parent=publishers/*}/books"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_ABitOfEverythingService_CreateBook_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_ABitOfEverythingService_CreateBook_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ABitOfEverythingService_CreateBook_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ABitOfEverythingService_CreateBook_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -3103,19 +3968,21 @@ func RegisterABitOfEverythingServiceHandlerClient(ctx context.Context, mux *runt
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/UpdateBook")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/UpdateBook", runtime.WithHTTPPathPattern("/v1/{book.name=publishers/*/books/*}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_ABitOfEverythingService_UpdateBook_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_ABitOfEverythingService_UpdateBook_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ABitOfEverythingService_UpdateBook_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ABitOfEverythingService_UpdateBook_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -3123,19 +3990,65 @@ func RegisterABitOfEverythingServiceHandlerClient(ctx context.Context, mux *runt
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/Lookup")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/Lookup", runtime.WithHTTPPathPattern("/v1/example/a_bit_of_everything/{uuid}"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_ABitOfEverythingService_Lookup_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_ABitOfEverythingService_Lookup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("POST", pattern_ABitOfEverythingService_Custom_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/Custom", runtime.WithHTTPPathPattern("/v1/example/a_bit_of_everything/{uuid}:custom"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_ABitOfEverythingService_Lookup_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_ABitOfEverythingService_Custom_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_ABitOfEverythingService_Custom_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("POST", pattern_ABitOfEverythingService_DoubleColon_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/DoubleColon", runtime.WithHTTPPathPattern("/v1/example/a_bit_of_everything/{uuid}:custom:custom"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
+ resp, md, err := request_ABitOfEverythingService_DoubleColon_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
- forward_ABitOfEverythingService_Lookup_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ABitOfEverythingService_DoubleColon_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -3143,19 +4056,21 @@ func RegisterABitOfEverythingServiceHandlerClient(ctx context.Context, mux *runt
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/Update")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/Update", runtime.WithHTTPPathPattern("/v1/example/a_bit_of_everything/{uuid}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_ABitOfEverythingService_Update_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_ABitOfEverythingService_Update_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ABitOfEverythingService_Update_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ABitOfEverythingService_Update_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -3163,19 +4078,21 @@ func RegisterABitOfEverythingServiceHandlerClient(ctx context.Context, mux *runt
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/UpdateV2")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/UpdateV2", runtime.WithHTTPPathPattern("/v2/example/a_bit_of_everything/{abe.uuid}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_ABitOfEverythingService_UpdateV2_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_ABitOfEverythingService_UpdateV2_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ABitOfEverythingService_UpdateV2_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ABitOfEverythingService_UpdateV2_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -3183,19 +4100,21 @@ func RegisterABitOfEverythingServiceHandlerClient(ctx context.Context, mux *runt
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/UpdateV2")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/UpdateV2", runtime.WithHTTPPathPattern("/v2/example/a_bit_of_everything/{abe.uuid}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_ABitOfEverythingService_UpdateV2_1(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_ABitOfEverythingService_UpdateV2_1(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ABitOfEverythingService_UpdateV2_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ABitOfEverythingService_UpdateV2_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -3203,19 +4122,21 @@ func RegisterABitOfEverythingServiceHandlerClient(ctx context.Context, mux *runt
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/UpdateV2")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/UpdateV2", runtime.WithHTTPPathPattern("/v2a/example/a_bit_of_everything/{abe.uuid}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_ABitOfEverythingService_UpdateV2_2(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_ABitOfEverythingService_UpdateV2_2(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ABitOfEverythingService_UpdateV2_2(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ABitOfEverythingService_UpdateV2_2(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -3223,19 +4144,21 @@ func RegisterABitOfEverythingServiceHandlerClient(ctx context.Context, mux *runt
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/Delete")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/Delete", runtime.WithHTTPPathPattern("/v1/example/a_bit_of_everything/{uuid}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_ABitOfEverythingService_Delete_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_ABitOfEverythingService_Delete_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ABitOfEverythingService_Delete_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ABitOfEverythingService_Delete_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -3243,19 +4166,21 @@ func RegisterABitOfEverythingServiceHandlerClient(ctx context.Context, mux *runt
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/GetQuery")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/GetQuery", runtime.WithHTTPPathPattern("/v1/example/a_bit_of_everything/query/{uuid}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_ABitOfEverythingService_GetQuery_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_ABitOfEverythingService_GetQuery_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ABitOfEverythingService_GetQuery_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ABitOfEverythingService_GetQuery_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -3263,19 +4188,21 @@ func RegisterABitOfEverythingServiceHandlerClient(ctx context.Context, mux *runt
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/GetRepeatedQuery")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/GetRepeatedQuery", runtime.WithHTTPPathPattern("/v1/example/a_bit_of_everything_repeated/{path_repeated_float_value}/{path_repeated_double_value}/{path_repeated_int64_value}/{path_repeated_uint64_value}/{path_repeated_int32_value}/{path_repeated_fixed64_value}/{path_repeated_fixed32_value}/{path_repeated_bool_value}/{path_repeated_string_value}/{path_repeated_bytes_value}/{path_repeated_uint32_value}/{path_repeated_enum_value}/{path_repeated_sfixed32_value}/{path_repeated_sfixed64_value}/{path_repeated_sint32_value}/{path_repeated_sint64_value}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_ABitOfEverythingService_GetRepeatedQuery_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_ABitOfEverythingService_GetRepeatedQuery_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ABitOfEverythingService_GetRepeatedQuery_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ABitOfEverythingService_GetRepeatedQuery_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -3283,19 +4210,21 @@ func RegisterABitOfEverythingServiceHandlerClient(ctx context.Context, mux *runt
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/Echo")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/Echo", runtime.WithHTTPPathPattern("/v1/example/a_bit_of_everything/echo/{value}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_ABitOfEverythingService_Echo_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_ABitOfEverythingService_Echo_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ABitOfEverythingService_Echo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ABitOfEverythingService_Echo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -3303,19 +4232,21 @@ func RegisterABitOfEverythingServiceHandlerClient(ctx context.Context, mux *runt
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/Echo")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/Echo", runtime.WithHTTPPathPattern("/v2/example/echo"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_ABitOfEverythingService_Echo_1(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_ABitOfEverythingService_Echo_1(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ABitOfEverythingService_Echo_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ABitOfEverythingService_Echo_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -3323,19 +4254,21 @@ func RegisterABitOfEverythingServiceHandlerClient(ctx context.Context, mux *runt
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/Echo")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/Echo", runtime.WithHTTPPathPattern("/v2/example/echo"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_ABitOfEverythingService_Echo_2(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_ABitOfEverythingService_Echo_2(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ABitOfEverythingService_Echo_2(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ABitOfEverythingService_Echo_2(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -3343,19 +4276,21 @@ func RegisterABitOfEverythingServiceHandlerClient(ctx context.Context, mux *runt
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/DeepPathEcho")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/DeepPathEcho", runtime.WithHTTPPathPattern("/v1/example/deep_path/{single_nested.name}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_ABitOfEverythingService_DeepPathEcho_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_ABitOfEverythingService_DeepPathEcho_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ABitOfEverythingService_DeepPathEcho_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ABitOfEverythingService_DeepPathEcho_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -3363,19 +4298,21 @@ func RegisterABitOfEverythingServiceHandlerClient(ctx context.Context, mux *runt
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/Timeout")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/Timeout", runtime.WithHTTPPathPattern("/v2/example/timeout"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_ABitOfEverythingService_Timeout_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_ABitOfEverythingService_Timeout_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ABitOfEverythingService_Timeout_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ABitOfEverythingService_Timeout_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -3383,19 +4320,21 @@ func RegisterABitOfEverythingServiceHandlerClient(ctx context.Context, mux *runt
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/ErrorWithDetails")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/ErrorWithDetails", runtime.WithHTTPPathPattern("/v2/example/errorwithdetails"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_ABitOfEverythingService_ErrorWithDetails_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_ABitOfEverythingService_ErrorWithDetails_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ABitOfEverythingService_ErrorWithDetails_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ABitOfEverythingService_ErrorWithDetails_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -3403,19 +4342,21 @@ func RegisterABitOfEverythingServiceHandlerClient(ctx context.Context, mux *runt
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/GetMessageWithBody")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/GetMessageWithBody", runtime.WithHTTPPathPattern("/v2/example/withbody/{id}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_ABitOfEverythingService_GetMessageWithBody_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_ABitOfEverythingService_GetMessageWithBody_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ABitOfEverythingService_GetMessageWithBody_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ABitOfEverythingService_GetMessageWithBody_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -3423,19 +4364,21 @@ func RegisterABitOfEverythingServiceHandlerClient(ctx context.Context, mux *runt
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/PostWithEmptyBody")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/PostWithEmptyBody", runtime.WithHTTPPathPattern("/v2/example/postwithemptybody/{name}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_ABitOfEverythingService_PostWithEmptyBody_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_ABitOfEverythingService_PostWithEmptyBody_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ABitOfEverythingService_PostWithEmptyBody_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ABitOfEverythingService_PostWithEmptyBody_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -3443,19 +4386,21 @@ func RegisterABitOfEverythingServiceHandlerClient(ctx context.Context, mux *runt
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/CheckGetQueryParams")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/CheckGetQueryParams", runtime.WithHTTPPathPattern("/v1/example/a_bit_of_everything/params/get/{single_nested.name}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_ABitOfEverythingService_CheckGetQueryParams_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_ABitOfEverythingService_CheckGetQueryParams_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ABitOfEverythingService_CheckGetQueryParams_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ABitOfEverythingService_CheckGetQueryParams_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -3463,19 +4408,21 @@ func RegisterABitOfEverythingServiceHandlerClient(ctx context.Context, mux *runt
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/CheckNestedEnumGetQueryParams")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/CheckNestedEnumGetQueryParams", runtime.WithHTTPPathPattern("/v1/example/a_bit_of_everything/params/get/nested_enum/{single_nested.ok}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_ABitOfEverythingService_CheckNestedEnumGetQueryParams_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_ABitOfEverythingService_CheckNestedEnumGetQueryParams_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ABitOfEverythingService_CheckNestedEnumGetQueryParams_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ABitOfEverythingService_CheckNestedEnumGetQueryParams_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -3483,19 +4430,43 @@ func RegisterABitOfEverythingServiceHandlerClient(ctx context.Context, mux *runt
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/CheckPostQueryParams")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/CheckPostQueryParams", runtime.WithHTTPPathPattern("/v1/example/a_bit_of_everything/params/post/{string_value}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_ABitOfEverythingService_CheckPostQueryParams_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_ABitOfEverythingService_CheckPostQueryParams_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_ABitOfEverythingService_CheckPostQueryParams_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("POST", pattern_ABitOfEverythingService_OverwriteRequestContentType_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/OverwriteRequestContentType", runtime.WithHTTPPathPattern("/v2/example/overwriterequestcontenttype"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
+ resp, md, err := request_ABitOfEverythingService_OverwriteRequestContentType_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
- forward_ABitOfEverythingService_CheckPostQueryParams_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ABitOfEverythingService_OverwriteRequestContentType_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -3503,19 +4474,21 @@ func RegisterABitOfEverythingServiceHandlerClient(ctx context.Context, mux *runt
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/OverwriteResponseContentType")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/OverwriteResponseContentType", runtime.WithHTTPPathPattern("/v2/example/overwriteresponsecontenttype"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_ABitOfEverythingService_OverwriteResponseContentType_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_ABitOfEverythingService_OverwriteResponseContentType_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ABitOfEverythingService_OverwriteResponseContentType_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ABitOfEverythingService_OverwriteResponseContentType_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -3523,19 +4496,21 @@ func RegisterABitOfEverythingServiceHandlerClient(ctx context.Context, mux *runt
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/CheckExternalPathEnum")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/CheckExternalPathEnum", runtime.WithHTTPPathPattern("/v2/{value}:check"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_ABitOfEverythingService_CheckExternalPathEnum_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_ABitOfEverythingService_CheckExternalPathEnum_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ABitOfEverythingService_CheckExternalPathEnum_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ABitOfEverythingService_CheckExternalPathEnum_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -3543,19 +4518,21 @@ func RegisterABitOfEverythingServiceHandlerClient(ctx context.Context, mux *runt
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/CheckExternalNestedPathEnum")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/CheckExternalNestedPathEnum", runtime.WithHTTPPathPattern("/v3/{value}:check"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_ABitOfEverythingService_CheckExternalNestedPathEnum_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_ABitOfEverythingService_CheckExternalNestedPathEnum_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ABitOfEverythingService_CheckExternalNestedPathEnum_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ABitOfEverythingService_CheckExternalNestedPathEnum_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -3563,19 +4540,131 @@ func RegisterABitOfEverythingServiceHandlerClient(ctx context.Context, mux *runt
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/CheckStatus")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/CheckStatus", runtime.WithHTTPPathPattern("/v1/example/checkStatus"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_ABitOfEverythingService_CheckStatus_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_ABitOfEverythingService_CheckStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("HEAD", pattern_ABitOfEverythingService_Exists_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/Exists", runtime.WithHTTPPathPattern("/v1/example/a_bit_of_everything/{uuid}"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_ABitOfEverythingService_Exists_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_ABitOfEverythingService_Exists_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("OPTIONS", pattern_ABitOfEverythingService_CustomOptionsRequest_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/CustomOptionsRequest", runtime.WithHTTPPathPattern("/v1/example/a_bit_of_everything/{uuid}"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_ABitOfEverythingService_CustomOptionsRequest_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_ABitOfEverythingService_CustomOptionsRequest_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("TRACE", pattern_ABitOfEverythingService_TraceRequest_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/TraceRequest", runtime.WithHTTPPathPattern("/v1/example/a_bit_of_everything/{uuid}"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_ABitOfEverythingService_TraceRequest_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_ABitOfEverythingService_TraceRequest_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("POST", pattern_ABitOfEverythingService_PostOneofEnum_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/PostOneofEnum", runtime.WithHTTPPathPattern("/v1/example/oneofenum"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_ABitOfEverythingService_CheckStatus_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_ABitOfEverythingService_PostOneofEnum_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_ABitOfEverythingService_PostOneofEnum_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("POST", pattern_ABitOfEverythingService_PostRequiredMessageType_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/PostRequiredMessageType", runtime.WithHTTPPathPattern("/v1/example/requiredmessagetype"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
+ resp, md, err := request_ABitOfEverythingService_PostRequiredMessageType_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
- forward_ABitOfEverythingService_CheckStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ABitOfEverythingService_PostRequiredMessageType_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -3593,6 +4682,10 @@ var (
pattern_ABitOfEverythingService_Lookup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v1", "example", "a_bit_of_everything", "uuid"}, ""))
+ pattern_ABitOfEverythingService_Custom_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v1", "example", "a_bit_of_everything", "uuid"}, "custom"))
+
+ pattern_ABitOfEverythingService_DoubleColon_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v1", "example", "a_bit_of_everything", "uuid"}, "custom:custom"))
+
pattern_ABitOfEverythingService_Update_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v1", "example", "a_bit_of_everything", "uuid"}, ""))
pattern_ABitOfEverythingService_UpdateV2_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v2", "example", "a_bit_of_everything", "abe.uuid"}, ""))
@@ -3629,13 +4722,25 @@ var (
pattern_ABitOfEverythingService_CheckPostQueryParams_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"v1", "example", "a_bit_of_everything", "params", "post", "string_value"}, ""))
+ pattern_ABitOfEverythingService_OverwriteRequestContentType_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v2", "example", "overwriterequestcontenttype"}, ""))
+
pattern_ABitOfEverythingService_OverwriteResponseContentType_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v2", "example", "overwriteresponsecontenttype"}, ""))
pattern_ABitOfEverythingService_CheckExternalPathEnum_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"v2", "value"}, "check"))
- pattern_ABitOfEverythingService_CheckExternalNestedPathEnum_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"v2", "value"}, "check"))
+ pattern_ABitOfEverythingService_CheckExternalNestedPathEnum_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"v3", "value"}, "check"))
pattern_ABitOfEverythingService_CheckStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "example", "checkStatus"}, ""))
+
+ pattern_ABitOfEverythingService_Exists_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v1", "example", "a_bit_of_everything", "uuid"}, ""))
+
+ pattern_ABitOfEverythingService_CustomOptionsRequest_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v1", "example", "a_bit_of_everything", "uuid"}, ""))
+
+ pattern_ABitOfEverythingService_TraceRequest_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v1", "example", "a_bit_of_everything", "uuid"}, ""))
+
+ pattern_ABitOfEverythingService_PostOneofEnum_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "example", "oneofenum"}, ""))
+
+ pattern_ABitOfEverythingService_PostRequiredMessageType_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "example", "requiredmessagetype"}, ""))
)
var (
@@ -3649,6 +4754,10 @@ var (
forward_ABitOfEverythingService_Lookup_0 = runtime.ForwardResponseMessage
+ forward_ABitOfEverythingService_Custom_0 = runtime.ForwardResponseMessage
+
+ forward_ABitOfEverythingService_DoubleColon_0 = runtime.ForwardResponseMessage
+
forward_ABitOfEverythingService_Update_0 = runtime.ForwardResponseMessage
forward_ABitOfEverythingService_UpdateV2_0 = runtime.ForwardResponseMessage
@@ -3685,6 +4794,8 @@ var (
forward_ABitOfEverythingService_CheckPostQueryParams_0 = runtime.ForwardResponseMessage
+ forward_ABitOfEverythingService_OverwriteRequestContentType_0 = runtime.ForwardResponseMessage
+
forward_ABitOfEverythingService_OverwriteResponseContentType_0 = runtime.ForwardResponseMessage
forward_ABitOfEverythingService_CheckExternalPathEnum_0 = runtime.ForwardResponseMessage
@@ -3692,6 +4803,16 @@ var (
forward_ABitOfEverythingService_CheckExternalNestedPathEnum_0 = runtime.ForwardResponseMessage
forward_ABitOfEverythingService_CheckStatus_0 = runtime.ForwardResponseMessage
+
+ forward_ABitOfEverythingService_Exists_0 = runtime.ForwardResponseMessage
+
+ forward_ABitOfEverythingService_CustomOptionsRequest_0 = runtime.ForwardResponseMessage
+
+ forward_ABitOfEverythingService_TraceRequest_0 = runtime.ForwardResponseMessage
+
+ forward_ABitOfEverythingService_PostOneofEnum_0 = runtime.ForwardResponseMessage
+
+ forward_ABitOfEverythingService_PostRequiredMessageType_0 = runtime.ForwardResponseMessage
)
// RegisterCamelCaseServiceNameHandlerFromEndpoint is same as RegisterCamelCaseServiceNameHandler but
@@ -3736,19 +4857,21 @@ func RegisterCamelCaseServiceNameHandlerClient(ctx context.Context, mux *runtime
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.CamelCaseServiceName/Empty")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.CamelCaseServiceName/Empty", runtime.WithHTTPPathPattern("/v2/example/empty"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_CamelCaseServiceName_Empty_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_CamelCaseServiceName_Empty_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_CamelCaseServiceName_Empty_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_CamelCaseServiceName_Empty_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -3762,3 +4885,74 @@ var (
var (
forward_CamelCaseServiceName_Empty_0 = runtime.ForwardResponseMessage
)
+
+// RegisterSnakeEnumServiceHandlerFromEndpoint is same as RegisterSnakeEnumServiceHandler but
+// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
+func RegisterSnakeEnumServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
+ conn, err := grpc.Dial(endpoint, opts...)
+ if err != nil {
+ return err
+ }
+ defer func() {
+ if err != nil {
+ if cerr := conn.Close(); cerr != nil {
+ grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
+ }
+ return
+ }
+ go func() {
+ <-ctx.Done()
+ if cerr := conn.Close(); cerr != nil {
+ grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
+ }
+ }()
+ }()
+
+ return RegisterSnakeEnumServiceHandler(ctx, mux, conn)
+}
+
+// RegisterSnakeEnumServiceHandler registers the http handlers for service SnakeEnumService to "mux".
+// The handlers forward requests to the grpc endpoint over "conn".
+func RegisterSnakeEnumServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
+ return RegisterSnakeEnumServiceHandlerClient(ctx, mux, NewSnakeEnumServiceClient(conn))
+}
+
+// RegisterSnakeEnumServiceHandlerClient registers the http handlers for service SnakeEnumService
+// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SnakeEnumServiceClient".
+// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SnakeEnumServiceClient"
+// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
+// "SnakeEnumServiceClient" to call the correct interceptors.
+func RegisterSnakeEnumServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SnakeEnumServiceClient) error {
+
+ mux.Handle("GET", pattern_SnakeEnumService_SnakeEnum_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.SnakeEnumService/SnakeEnum", runtime.WithHTTPPathPattern("/v1/example/snake/{who}/{what}/{where}"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_SnakeEnumService_SnakeEnum_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_SnakeEnumService_SnakeEnum_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ return nil
+}
+
+var (
+ pattern_SnakeEnumService_SnakeEnum_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"v1", "example", "snake", "who", "what", "where"}, ""))
+)
+
+var (
+ forward_SnakeEnumService_SnakeEnum_0 = runtime.ForwardResponseMessage
+)
diff --git a/examples/internal/proto/examplepb/a_bit_of_everything.proto b/examples/internal/proto/examplepb/a_bit_of_everything.proto
index 965eae5be59..84798dbab1b 100644
--- a/examples/internal/proto/examplepb/a_bit_of_everything.proto
+++ b/examples/internal/proto/examplepb/a_bit_of_everything.proto
@@ -1,386 +1,473 @@
syntax = "proto3";
-option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/examplepb";
+
package grpc.gateway.examples.internal.proto.examplepb;
-import "google/api/annotations.proto";
-import "google/api/field_behavior.proto";
-import "google/protobuf/field_mask.proto";
-import "google/protobuf/empty.proto";
-import "google/protobuf/duration.proto";
-import "google/protobuf/wrappers.proto";
+import "examples/internal/proto/oneofenum/oneof_enum.proto";
import "examples/internal/proto/pathenum/path_enum.proto";
import "examples/internal/proto/sub/message.proto";
import "examples/internal/proto/sub2/message.proto";
+import "google/api/annotations.proto";
+import "google/api/field_behavior.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
import "google/protobuf/timestamp.proto";
+import "google/protobuf/wrappers.proto";
import "google/rpc/status.proto";
import "protoc-gen-openapiv2/options/annotations.proto";
+option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/examplepb";
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
- info: {
- title: "A Bit of Everything";
- version: "1.0";
- contact: {
- name: "gRPC-Gateway project";
- url: "https://github.com/grpc-ecosystem/grpc-gateway";
- email: "none@example.com";
- };
- license: {
- name: "BSD 3-Clause License";
- url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/master/LICENSE.txt";
- };
- extensions: {
- key: "x-something-something";
- value {
- string_value: "yadda";
- }
- }
- };
- // Overwriting host entry breaks tests, so this is not done here.
- external_docs: {
- url: "https://github.com/grpc-ecosystem/grpc-gateway";
- description: "More about gRPC-Gateway";
- }
- schemes: HTTP;
- schemes: HTTPS;
- schemes: WSS;
- consumes: "application/json";
- consumes: "application/x-foo-mime";
- produces: "application/json";
- produces: "application/x-foo-mime";
- security_definitions: {
- security: {
- key: "BasicAuth";
- value: {
- type: TYPE_BASIC;
- }
- }
- security: {
- key: "ApiKeyAuth";
- value: {
- type: TYPE_API_KEY;
- in: IN_HEADER;
- name: "X-API-Key";
- extensions: {
- key: "x-amazon-apigateway-authtype";
- value {
- string_value: "oauth2";
- }
- }
- extensions: {
- key: "x-amazon-apigateway-authorizer";
- value {
- struct_value {
- fields {
- key: "type";
- value {
- string_value: "token";
- }
- }
- fields {
- key: "authorizerResultTtlInSeconds";
- value {
- number_value: 60;
- }
- }
- }
- }
- }
- }
- }
- security: {
- key: "OAuth2";
- value: {
- type: TYPE_OAUTH2;
- flow: FLOW_ACCESS_CODE;
- authorization_url: "https://example.com/oauth/authorize";
- token_url: "https://example.com/oauth/token";
- scopes: {
- scope: {
- key: "read";
- value: "Grants read access";
- }
- scope: {
- key: "write";
- value: "Grants write access";
- }
- scope: {
- key: "admin";
- value: "Grants read and write access to administrative information";
- }
- }
- }
- }
- }
- security: {
- security_requirement: {
- key: "BasicAuth";
- value: {};
- }
- security_requirement: {
- key: "ApiKeyAuth";
- value: {};
- }
- }
- security: {
- security_requirement: {
- key: "OAuth2";
- value: {
- scope: "read";
- scope: "write";
- }
- }
- security_requirement: {
- key: "ApiKeyAuth";
- value: {};
- }
- }
- responses: {
- key: "403";
- value: {
- description: "Returned when the user does not have permission to access the resource.";
- }
- }
- responses: {
- key: "404";
- value: {
- description: "Returned when the resource does not exist.";
- schema: {
- json_schema: {
- type: STRING;
- }
- }
- }
- }
- responses: {
- key: "418";
- value: {
- description: "I'm a teapot.";
- schema: {
- json_schema: {
- ref: ".grpc.gateway.examples.internal.proto.examplepb.NumericEnum";
- }
- }
- }
- }
- responses: {
- key: "500";
- value: {
- description: "Server error";
- headers: {
- key: "X-Correlation-Id"
- value: {
- description: "Unique event identifier for server requests"
- type: "string"
- format: "uuid"
- default: "\"2438ac3c-37eb-4902-adef-ed16b4431030\""
- pattern: "^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"
- }
- };
- schema: {
- json_schema: {
- ref: ".grpc.gateway.examples.internal.proto.examplepb.ErrorResponse";
- }
- }
- }
- }
- extensions: {
- key: "x-grpc-gateway-foo";
- value {
- string_value: "bar";
- }
- }
- extensions: {
- key: "x-grpc-gateway-baz-list";
- value {
- list_value: {
- values: {
- string_value: "one";
- }
- values: {
- bool_value: true;
- }
- }
- }
- }
+ info: {
+ title: "A Bit of Everything";
+ version: "1.0";
+ contact: {
+ name: "gRPC-Gateway project";
+ url: "https://github.com/grpc-ecosystem/grpc-gateway";
+ email: "none@example.com";
+ };
+ license: {
+ name: "BSD 3-Clause License";
+ url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/master/LICENSE.txt";
+ };
+ extensions: {
+ key: "x-something-something";
+ value {
+ string_value: "yadda";
+ }
+ }
+ };
+ // Overwriting host entry breaks tests, so this is not done here.
+ external_docs: {
+ url: "https://github.com/grpc-ecosystem/grpc-gateway";
+ description: "More about gRPC-Gateway";
+ }
+ schemes: HTTP;
+ schemes: HTTPS;
+ schemes: WSS;
+ consumes: "application/json";
+ consumes: "application/x-foo-mime";
+ produces: "application/json";
+ produces: "application/x-foo-mime";
+ security_definitions: {
+ security: {
+ key: "BasicAuth";
+ value: {
+ type: TYPE_BASIC;
+ }
+ }
+ security: {
+ key: "ApiKeyAuth";
+ value: {
+ type: TYPE_API_KEY;
+ in: IN_HEADER;
+ name: "X-API-Key";
+ extensions: {
+ key: "x-amazon-apigateway-authtype";
+ value {
+ string_value: "oauth2";
+ }
+ }
+ extensions: {
+ key: "x-amazon-apigateway-authorizer";
+ value {
+ struct_value {
+ fields {
+ key: "type";
+ value {
+ string_value: "token";
+ }
+ }
+ fields {
+ key: "authorizerResultTtlInSeconds";
+ value {
+ number_value: 60;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ security: {
+ key: "OAuth2";
+ value: {
+ type: TYPE_OAUTH2;
+ flow: FLOW_ACCESS_CODE;
+ authorization_url: "https://example.com/oauth/authorize";
+ token_url: "https://example.com/oauth/token";
+ scopes: {
+ scope: {
+ key: "read";
+ value: "Grants read access";
+ }
+ scope: {
+ key: "write";
+ value: "Grants write access";
+ }
+ scope: {
+ key: "admin";
+ value: "Grants read and write access to administrative information";
+ }
+ }
+ }
+ }
+ }
+ security: {
+ security_requirement: {
+ key: "BasicAuth";
+ value: {};
+ }
+ security_requirement: {
+ key: "ApiKeyAuth";
+ value: {};
+ }
+ }
+ security: {
+ security_requirement: {
+ key: "OAuth2";
+ value: {
+ scope: "read";
+ scope: "write";
+ }
+ }
+ security_requirement: {
+ key: "ApiKeyAuth";
+ value: {};
+ }
+ }
+ responses: {
+ key: "403";
+ value: {
+ description: "Returned when the user does not have permission to access the resource.";
+ }
+ }
+ responses: {
+ key: "404";
+ value: {
+ description: "Returned when the resource does not exist.";
+ schema: {
+ json_schema: {
+ type: STRING;
+ }
+ }
+ }
+ }
+ responses: {
+ key: "418";
+ value: {
+ description: "I'm a teapot.";
+ schema: {
+ json_schema: {
+ ref: ".grpc.gateway.examples.internal.proto.examplepb.NumericEnum";
+ }
+ }
+ }
+ }
+ responses: {
+ key: "500";
+ value: {
+ description: "Server error";
+ headers: {
+ key: "X-Correlation-Id"
+ value: {
+ description: "Unique event identifier for server requests"
+ type: "string"
+ format: "uuid"
+ default: "\"2438ac3c-37eb-4902-adef-ed16b4431030\""
+ pattern: "^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$"
+ }
+ };
+ schema: {
+ json_schema: {
+ ref: ".grpc.gateway.examples.internal.proto.examplepb.ErrorResponse";
+ }
+ }
+ }
+ }
+ tags: {
+ name: "echo rpc"
+ description: "Echo Rpc description"
+ extensions: {
+ key: "x-traitTag";
+ value {
+ bool_value: true;
+ }
+ }
+ }
+ extensions: {
+ key: "x-grpc-gateway-foo";
+ value {
+ string_value: "bar";
+ }
+ }
+ extensions: {
+ key: "x-grpc-gateway-baz-list";
+ value {
+ list_value: {
+ values: {
+ string_value: "one";
+ }
+ values: {
+ bool_value: true;
+ }
+ }
+ }
+ }
};
-message ErrorResponse{
- string correlationId = 1 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
- pattern: "^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$",
- title: "x-correlation-id",
- description: "Unique event identifier for server requests",
- format: "uuid",
- example: "\"2438ac3c-37eb-4902-adef-ed16b4431030\""
- }];
- ErrorObject error = 2;
+message ErrorResponse {
+ string correlationId = 1 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
+ pattern: "^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$",
+ title: "x-correlation-id",
+ description: "Unique event identifier for server requests",
+ format: "uuid",
+ example: "\"2438ac3c-37eb-4902-adef-ed16b4431030\""
+ }];
+ ErrorObject error = 2;
}
-message ErrorObject{
- int32 code = 1 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
- pattern: "^[0-9]$",
- title: "code",
- description: "Response code",
- format: "integer"
- }];
- string message = 2 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
- pattern: "^[a-zA-Z0-9]{1, 32}$",
- title: "message",
- description: "Response message"
- }];
+message ErrorObject {
+ int32 code = 1 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
+ pattern: "^[0-9]$",
+ title: "code",
+ description: "Response code",
+ format: "integer"
+ }];
+ string message = 2 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
+ pattern: "^[a-zA-Z0-9]{1, 32}$",
+ title: "message",
+ description: "Response message"
+ }];
}
-
// Intentionally complicated message type to cover many features of Protobuf.
message ABitOfEverything {
- option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
- json_schema: {
- title: "A bit of everything"
- description: "Intentionaly complicated message type to cover many features of Protobuf."
- required: ["uuid", "int64_value", "double_value"]
- }
- external_docs: {
- url: "https://github.com/grpc-ecosystem/grpc-gateway";
- description: "Find out more about ABitOfEverything";
- }
- example: "{\"int64_value\": 12, \"double_value\": 12.3}"
- };
-
- // Nested is nested type.
- message Nested {
- option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
- example: "{\"ok\": \"TRUE\"}"
- };
- // name is nested field.
- string name = 1;
- uint32 amount = 2;
- // DeepEnum is one or zero.
- enum DeepEnum {
- // FALSE is false.
- FALSE = 0;
- // TRUE is true.
- TRUE = 1;
- }
-
- // DeepEnum comment.
- DeepEnum ok = 3 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "DeepEnum description."}];
- }
- Nested single_nested = 25;
-
- string uuid = 1 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {pattern: "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", min_length: 1}];
- repeated Nested nested = 2;
- float float_value = 3 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "Float value field", default: "0.2", required: ['float_value']}];
- double double_value = 4;
- int64 int64_value = 5;
- uint64 uint64_value = 6;
- int32 int32_value = 7;
- fixed64 fixed64_value = 8;
- fixed32 fixed32_value = 9;
- bool bool_value = 10;
- string string_value = 11;
- bytes bytes_value = 29;
- uint32 uint32_value = 13;
- NumericEnum enum_value = 14;
- pathenum.PathEnum path_enum_value = 30;
- pathenum.MessagePathEnum.NestedPathEnum nested_path_enum_value = 31;
- sfixed32 sfixed32_value = 15;
- sfixed64 sfixed64_value = 16;
- sint32 sint32_value = 17;
- sint64 sint64_value = 18;
- repeated string repeated_string_value = 19;
- oneof oneof_value {
- google.protobuf.Empty oneof_empty = 20;
- string oneof_string = 21;
- }
-
- map map_value = 22;
- map mapped_string_value = 23;
- map mapped_nested_value = 24;
-
- string nonConventionalNameValue = 26;
-
- google.protobuf.Timestamp timestamp_value = 27;
-
- // repeated enum value. it is comma-separated in query
- repeated NumericEnum repeated_enum_value = 28;
-
- // repeated numeric enum comment (This comment is overridden by the field annotation)
- repeated NumericEnum repeated_enum_annotation = 32 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {title: "Repeated numeric enum title", description: "Repeated numeric enum description."}];
-
- // numeric enum comment (This comment is overridden by the field annotation)
- NumericEnum enum_value_annotation = 33 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {title: "Numeric enum title", description: "Numeric enum description."}];
-
- // repeated string comment (This comment is overridden by the field annotation)
- repeated string repeated_string_annotation = 34 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {title: "Repeated string title", description: "Repeated string description."}];
-
- // repeated nested object comment (This comment is overridden by the field annotation)
- repeated Nested repeated_nested_annotation = 35 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {title: "Repeated nested object title", description: "Repeated nested object description."}];
-
- // nested object comments (This comment is overridden by the field annotation)
- Nested nested_annotation = 36 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {title: "Nested object title", description: "Nested object description."}];
-
- int64 int64_override_type = 37 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {type: INTEGER}];
-
- // mark a field as required in Open API definition
- string required_string_via_field_behavior_annotation = 38 [(google.api.field_behavior) = REQUIRED];
-
- // mark a field as readonly in Open API definition
- string output_only_string_via_field_behavior_annotation = 39 [(google.api.field_behavior) = OUTPUT_ONLY];
-
- optional string optional_string_value = 40;
+ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
+ json_schema: {
+ title: "A bit of everything"
+ description: "Intentionally complicated message type to cover many features of Protobuf."
+ required: [
+ "uuid",
+ "int64_value",
+ "double_value",
+ "required_field_schema_json_name"
+ ]
+ extensions: {
+ key: "x-a-bit-of-everything-foo";
+ value {
+ string_value: "bar";
+ }
+ }
+ }
+ external_docs: {
+ url: "https://github.com/grpc-ecosystem/grpc-gateway";
+ description: "Find out more about ABitOfEverything";
+ }
+ example: "{\"int64_value\": 12, \"double_value\": 12.3}"
+ };
+
+ // Nested is nested type.
+ message Nested {
+ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
+ example: "{\"ok\": \"TRUE\"}"
+ };
+ // name is nested field.
+ string name = 1;
+ uint32 amount = 2;
+ // DeepEnum is one or zero.
+ enum DeepEnum {
+ // FALSE is false.
+ FALSE = 0;
+ // TRUE is true.
+ TRUE = 1;
+ }
+
+ // DeepEnum comment.
+ DeepEnum ok = 3 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
+ description: "DeepEnum description."
+ }];
+ }
+ Nested single_nested = 25;
+
+ string uuid = 1 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
+ pattern: "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}",
+ min_length: 1,
+ field_configuration: {
+ path_param_name: "uuidName"
+ },
+ extensions: {
+ key: "x-internal";
+ value {
+ bool_value: true
+ }
+ }
+ }];
+ repeated Nested nested = 2;
+ float float_value = 3 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
+ description: "Float value field",
+ default: "0.2",
+ required: [
+ "float_value"
+ ]
+ }];
+ double double_value = 4;
+ int64 int64_value = 5;
+ uint64 uint64_value = 6;
+ int32 int32_value = 7;
+ fixed64 fixed64_value = 8;
+ fixed32 fixed32_value = 9;
+ bool bool_value = 10;
+ string string_value = 11;
+ bytes bytes_value = 29;
+ uint32 uint32_value = 13;
+ NumericEnum enum_value = 14;
+ pathenum.PathEnum path_enum_value = 30;
+ pathenum.MessagePathEnum.NestedPathEnum nested_path_enum_value = 31;
+ sfixed32 sfixed32_value = 15;
+ sfixed64 sfixed64_value = 16;
+ sint32 sint32_value = 17;
+ sint64 sint64_value = 18;
+ repeated string repeated_string_value = 19;
+ oneof oneof_value {
+ google.protobuf.Empty oneof_empty = 20;
+ string oneof_string = 21;
+ }
+
+ map map_value = 22;
+ map mapped_string_value = 23;
+ map mapped_nested_value = 24;
+
+ string nonConventionalNameValue = 26;
+
+ google.protobuf.Timestamp timestamp_value = 27;
+
+ // repeated enum value. it is comma-separated in query
+ repeated NumericEnum repeated_enum_value = 28;
+
+ // repeated numeric enum comment (This comment is overridden by the field annotation)
+ repeated NumericEnum repeated_enum_annotation = 32 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
+ title: "Repeated numeric enum title",
+ description: "Repeated numeric enum description."
+ }];
+
+ // numeric enum comment (This comment is overridden by the field annotation)
+ NumericEnum enum_value_annotation = 33 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
+ title: "Numeric enum title",
+ description: "Numeric enum description."
+ }];
+
+ // repeated string comment (This comment is overridden by the field annotation)
+ repeated string repeated_string_annotation = 34 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
+ title: "Repeated string title",
+ description: "Repeated string description."
+ }];
+
+ // repeated nested object comment (This comment is overridden by the field annotation)
+ repeated Nested repeated_nested_annotation = 35 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
+ title: "Repeated nested object title",
+ description: "Repeated nested object description."
+ }];
+
+ // nested object comments (This comment is overridden by the field annotation)
+ Nested nested_annotation = 36 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
+ title: "Nested object title",
+ description: "Nested object description."
+ }];
+
+ int64 int64_override_type = 37 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
+ type: INTEGER
+ }];
+
+ // mark a field as required in Open API definition
+ string required_string_via_field_behavior_annotation = 38 [(google.api.field_behavior) = REQUIRED];
+
+ // mark a field as readonly in Open API definition
+ string output_only_string_via_field_behavior_annotation = 39 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ optional string optional_string_value = 40;
+
+ // Test openapiv2 generation of repeated fields
+ repeated string product_id = 41 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
+ pattern: "^[0-9]+$"
+ max_length: 19
+ min_length: 1
+ description: "Only digits are allowed."
+ }];
+
+ // Test openapiv2 generation of required fields with annotation and jsonschema to reproduce
+ string optional_string_field = 42;
+ string required_string_field_1 = 43 [(google.api.field_behavior) = REQUIRED];
+ string required_string_field_2 = 44 [(google.api.field_behavior) = REQUIRED];
+
+ // Test openapiv2 handling of required json_name fields
+ string required_field_behavior_json_name = 45 [
+ json_name = "required_field_behavior_json_name_custom",
+ (google.api.field_behavior) = REQUIRED
+ ];
+ string required_field_schema_json_name = 46 [json_name = "required_field_schema_json_name_custom"];
+
+ string trailing_only = 47; // Trailing only
+ string trailing_only_dot = 48; // Trailing only dot.
+ // Leading both
+ string trailing_both = 49; // Trailing both.
+ // Leading multiline
+ //
+ // This is an example of a multi-line comment.
+ string trailing_multiline = 50; // Trailing multiline.
}
// ABitOfEverythingRepeated is used to validate repeated path parameter functionality
message ABitOfEverythingRepeated {
- option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
- example: "{\"path_repeated_bool_value\": [true, true, false, true], \"path_repeated_int32_value\": [1, 2, 3]}"
- };
-
- // repeated values. they are comma-separated in path
- repeated float path_repeated_float_value = 1;
- repeated double path_repeated_double_value = 2;
- repeated int64 path_repeated_int64_value = 3;
- repeated uint64 path_repeated_uint64_value = 4;
- repeated int32 path_repeated_int32_value = 5;
- repeated fixed64 path_repeated_fixed64_value = 6;
- repeated fixed32 path_repeated_fixed32_value = 7;
- repeated bool path_repeated_bool_value = 8;
- repeated string path_repeated_string_value = 9;
- repeated bytes path_repeated_bytes_value = 10;
- repeated uint32 path_repeated_uint32_value = 11;
- repeated NumericEnum path_repeated_enum_value = 12;
- repeated sfixed32 path_repeated_sfixed32_value = 13;
- repeated sfixed64 path_repeated_sfixed64_value = 14;
- repeated sint32 path_repeated_sint32_value = 15;
- repeated sint64 path_repeated_sint64_value = 16;
+ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
+ example: "{\"path_repeated_bool_value\": [true, true, false, true], \"path_repeated_int32_value\": [1, 2, 3]}"
+ };
+
+ // repeated values. they are comma-separated in path
+ repeated float path_repeated_float_value = 1;
+ repeated double path_repeated_double_value = 2;
+ repeated int64 path_repeated_int64_value = 3;
+ repeated uint64 path_repeated_uint64_value = 4;
+ repeated int32 path_repeated_int32_value = 5;
+ repeated fixed64 path_repeated_fixed64_value = 6;
+ repeated fixed32 path_repeated_fixed32_value = 7;
+ repeated bool path_repeated_bool_value = 8;
+ repeated string path_repeated_string_value = 9;
+ repeated bytes path_repeated_bytes_value = 10;
+ repeated uint32 path_repeated_uint32_value = 11;
+ repeated NumericEnum path_repeated_enum_value = 12;
+ repeated sfixed32 path_repeated_sfixed32_value = 13;
+ repeated sfixed64 path_repeated_sfixed64_value = 14;
+ repeated sint32 path_repeated_sint32_value = 15;
+ repeated sint64 path_repeated_sint64_value = 16;
}
message CheckStatusResponse {
- google.rpc.Status status = 1;
+ google.rpc.Status status = 1;
}
message Body {
- string name = 1;
+ string name = 1;
}
message MessageWithBody {
- string id = 1;
- Body data = 2;
+ string id = 1;
+ Body data = 2;
}
-
// NumericEnum is one or zero.
enum NumericEnum {
- // ZERO means 0
- ZERO = 0;
- // ONE means 1
- ONE = 1;
+ // ZERO means 0
+ ZERO = 0;
+ // ONE means 1
+ ONE = 1;
}
// UpdateV2Request request for update includes the message and the update mask
message UpdateV2Request {
- ABitOfEverything abe = 1;
- // The paths to update.
- google.protobuf.FieldMask update_mask = 2;
+ ABitOfEverything abe = 1;
+ // The paths to update.
+ google.protobuf.FieldMask update_mask = 2;
}
// An example resource type from AIP-123 used to test the behavior described in
@@ -388,18 +475,18 @@ message UpdateV2Request {
//
// See: https://google.aip.dev/123
message Book {
- // The resource name of the book.
- //
- // Format: `publishers/{publisher}/books/{book}`
- //
- // Example: `publishers/1257894000000000000/books/my-book`
- string name = 1;
-
- // Output only. The book's ID.
- string id = 2;
-
- // Output only. Creation time of the book.
- google.protobuf.Timestamp create_time = 3;
+ // The resource name of the book.
+ //
+ // Format: `publishers/{publisher}/books/{book}`
+ //
+ // Example: `publishers/1257894000000000000/books/my-book`
+ string name = 1;
+
+ // Output only. The book's ID.
+ string id = 2;
+
+ // Output only. Creation time of the book.
+ google.protobuf.Timestamp create_time = 3;
}
// A standard Create message from AIP-133 with a user-specified ID.
@@ -408,293 +495,401 @@ message Book {
//
// See: https://google.aip.dev/133#user-specified-ids
message CreateBookRequest {
- // The publisher in which to create the book.
- //
- // Format: `publishers/{publisher}`
- //
- // Example: `publishers/1257894000000000000`
- string parent = 1;
-
- // The book to create.
- Book book = 2;
-
- // The ID to use for the book.
- //
- // This must start with an alphanumeric character.
- string book_id = 3;
+ // The publisher in which to create the book.
+ //
+ // Format: `publishers/{publisher}`
+ //
+ // Example: `publishers/1257894000000000000`
+ string parent = 1;
+
+ // The book to create.
+ Book book = 2;
+
+ // The ID to use for the book.
+ //
+ // This must start with an alphanumeric character.
+ string book_id = 3;
}
// A standard Update message from AIP-134
//
// See: https://google.aip.dev/134#request-message
message UpdateBookRequest {
- // The book to update.
- //
- // The book's `name` field is used to identify the book to be updated.
- // Format: publishers/{publisher}/books/{book}
- Book book = 1 [(google.api.field_behavior) = REQUIRED];
-
- // The list of fields to be updated.
- google.protobuf.FieldMask update_mask = 2;
-
- // If set to true, and the book is not found, a new book will be created.
- // In this situation, `update_mask` is ignored.
- bool allow_missing = 3;
-
+ // The book to update.
+ //
+ // The book's `name` field is used to identify the book to be updated.
+ // Format: publishers/{publisher}/books/{book}
+ Book book = 1 [(google.api.field_behavior) = REQUIRED];
+
+ // The list of fields to be updated.
+ google.protobuf.FieldMask update_mask = 2;
+
+ // If set to true, and the book is not found, a new book will be created.
+ // In this situation, `update_mask` is ignored.
+ bool allow_missing = 3;
}
// ABitOfEverything service is used to validate that APIs with complicated
// proto messages and URL templates are still processed correctly.
service ABitOfEverythingService {
-
- option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_tag) = {
- description: "ABitOfEverythingService description -- which should not be used in place of the documentation comment!"
- external_docs: {
- url: "https://github.com/grpc-ecosystem/grpc-gateway";
- description: "Find out more about EchoService";
- }
- };
-
- // Create a new ABitOfEverything
- //
- // This API creates a new ABitOfEverything
- rpc Create(ABitOfEverything) returns (ABitOfEverything) {
- option (google.api.http) = {
- post: "/v1/example/a_bit_of_everything/{float_value}/{double_value}/{int64_value}/separator/{uint64_value}/{int32_value}/{fixed64_value}/{fixed32_value}/{bool_value}/{string_value=strprefix/*}/{uint32_value}/{sfixed32_value}/{sfixed64_value}/{sint32_value}/{sint64_value}/{nonConventionalNameValue}/{enum_value}/{path_enum_value}/{nested_path_enum_value}/{enum_value_annotation}"
- };
- }
- rpc CreateBody(ABitOfEverything) returns (ABitOfEverything) {
- option (google.api.http) = {
- post: "/v1/example/a_bit_of_everything"
- body: "*"
- };
- }
- // Create a book.
- rpc CreateBook(CreateBookRequest) returns (Book) {
- option (google.api.http) = {
- post: "/v1/{parent=publishers/*}/books"
- body: "book"
- };
- }
- rpc UpdateBook(UpdateBookRequest) returns (Book) {
- option (google.api.http) = {
- patch: "/v1/{book.name=publishers/*/books/*}"
- body: "book"
- };
- }
- rpc Lookup(grpc.gateway.examples.internal.proto.sub2.IdMessage) returns (ABitOfEverything) {
- option (google.api.http) = {
- get: "/v1/example/a_bit_of_everything/{uuid}"
- };
- }
- rpc Update(ABitOfEverything) returns (google.protobuf.Empty) {
- option (google.api.http) = {
- put: "/v1/example/a_bit_of_everything/{uuid}"
- body: "*"
- };
- }
- rpc UpdateV2(UpdateV2Request) returns (google.protobuf.Empty) {
- option (google.api.http) = {
- put: "/v2/example/a_bit_of_everything/{abe.uuid}"
- body: "abe"
- additional_bindings: [
- {
- patch: "/v2/example/a_bit_of_everything/{abe.uuid}"
- body: "abe"
- },
- {
- patch: "/v2a/example/a_bit_of_everything/{abe.uuid}"
- body: "*"
- }
- ]
- };
- }
-
- rpc Delete(grpc.gateway.examples.internal.proto.sub2.IdMessage) returns (google.protobuf.Empty) {
- option (google.api.http) = {
- delete: "/v1/example/a_bit_of_everything/{uuid}"
- };
- option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
- security: {
- security_requirement: {
- key: "ApiKeyAuth";
- value: {}
- }
- security_requirement: {
- key: "OAuth2";
- value: {
- scope: "read";
- scope: "write";
- }
- }
- }
- extensions: {
- key: "x-irreversible";
- value {
- bool_value: true;
- }
- }
- };
- }
- rpc GetQuery(ABitOfEverything) returns (google.protobuf.Empty) {
- option (google.api.http) = {
- get: "/v1/example/a_bit_of_everything/query/{uuid}"
- };
- option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
- deprecated: true // For testing purposes.
- external_docs: {
- url: "https://github.com/grpc-ecosystem/grpc-gateway";
- description: "Find out more about GetQuery";
- }
- security: {
- }
- };
- }
- rpc GetRepeatedQuery(ABitOfEverythingRepeated) returns (ABitOfEverythingRepeated) {
- option (google.api.http) = {
- get: "/v1/example/a_bit_of_everything_repeated/{path_repeated_float_value}/{path_repeated_double_value}/{path_repeated_int64_value}/{path_repeated_uint64_value}/{path_repeated_int32_value}/{path_repeated_fixed64_value}/{path_repeated_fixed32_value}/{path_repeated_bool_value}/{path_repeated_string_value}/{path_repeated_bytes_value}/{path_repeated_uint32_value}/{path_repeated_enum_value}/{path_repeated_sfixed32_value}/{path_repeated_sfixed64_value}/{path_repeated_sint32_value}/{path_repeated_sint64_value}"
- };
- }
- // Echo allows posting a StringMessage value.
- //
- // It also exposes multiple bindings.
- //
- // This makes it useful when validating that the OpenAPI v2 API
- // description exposes documentation correctly on all paths
- // defined as additional_bindings in the proto.
- rpc Echo(grpc.gateway.examples.internal.proto.sub.StringMessage) returns (grpc.gateway.examples.internal.proto.sub.StringMessage) {
- option (google.api.http) = {
- get: "/v1/example/a_bit_of_everything/echo/{value}"
- additional_bindings {
- post: "/v2/example/echo"
- body: "value"
- }
- additional_bindings {
- get: "/v2/example/echo"
- }
- };
- option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
- description: "Description Echo";
- summary: "Summary: Echo rpc";
- tags: "echo rpc";
- external_docs: {
- url: "https://github.com/grpc-ecosystem/grpc-gateway";
- description: "Find out more Echo";
- }
- responses: {
- key: "200"
- value: {
- examples: {
- key: "application/json"
- value: '{"value": "the input value"}'
- }
- }
- }
- responses: {
- key: "503";
- value: {
- description: "Returned when the resource is temporarily unavailable.";
- extensions: {
- key: "x-number";
- value {
- number_value: 100;
- }
- }
- }
- }
- responses: {
- // Overwrites global definition.
- key: "404";
- value: {
- description: "Returned when the resource does not exist.";
- schema: {
- json_schema: {
- type: INTEGER;
- }
- }
- }
- }
- };
- }
- rpc DeepPathEcho(ABitOfEverything) returns (ABitOfEverything) {
- option (google.api.http) = {
- post: "/v1/example/deep_path/{single_nested.name}"
- body: "*"
- };
- }
- rpc NoBindings(google.protobuf.Duration) returns (google.protobuf.Empty) {}
- rpc Timeout(google.protobuf.Empty) returns (google.protobuf.Empty) {
- option (google.api.http) = {
- get: "/v2/example/timeout",
- };
- }
- rpc ErrorWithDetails(google.protobuf.Empty) returns (google.protobuf.Empty) {
- option (google.api.http) = {
- get: "/v2/example/errorwithdetails",
- };
- }
- rpc GetMessageWithBody(MessageWithBody) returns (google.protobuf.Empty) {
- option (google.api.http) = {
- post: "/v2/example/withbody/{id}",
- body: "data"
- };
- }
- rpc PostWithEmptyBody(Body) returns (google.protobuf.Empty) {
- option (google.api.http) = {
- post: "/v2/example/postwithemptybody/{name}",
- body: "*"
- };
- }
- rpc CheckGetQueryParams(ABitOfEverything) returns (ABitOfEverything) {
- option (google.api.http) = {
- get: "/v1/example/a_bit_of_everything/params/get/{single_nested.name}"
- };
- }
- rpc CheckNestedEnumGetQueryParams(ABitOfEverything) returns (ABitOfEverything) {
- option (google.api.http) = {
- get: "/v1/example/a_bit_of_everything/params/get/nested_enum/{single_nested.ok}"
- };
- }
- rpc CheckPostQueryParams(ABitOfEverything) returns (ABitOfEverything) {
- option (google.api.http) = {
- post: "/v1/example/a_bit_of_everything/params/post/{string_value}"
- body: "single_nested"
- };
- }
- rpc OverwriteResponseContentType(google.protobuf.Empty) returns (google.protobuf.StringValue) {
- option (google.api.http) = {
- get: "/v2/example/overwriteresponsecontenttype"
- };
- option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
- produces: "application/text"
- };
- }
- rpc CheckExternalPathEnum(pathenum.MessageWithPathEnum) returns (google.protobuf.Empty) {
- option (google.api.http) = {
- get: "/v2/{value}:check"
- };
- }
- rpc CheckExternalNestedPathEnum(pathenum.MessageWithNestedPathEnum) returns (google.protobuf.Empty) {
- option (google.api.http) = {
- get: "/v2/{value}:check"
- };
- }
-
- rpc CheckStatus(google.protobuf.Empty) returns (CheckStatusResponse) {
- option (google.api.http) = {
- get: "/v1/example/checkStatus"
- };
- }
+ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_tag) = {
+ description: "ABitOfEverythingService description -- which should not be used in place of the documentation comment!"
+ external_docs: {
+ url: "https://github.com/grpc-ecosystem/grpc-gateway";
+ description: "Find out more about EchoService";
+ }
+ };
+
+ // Create a new ABitOfEverything
+ //
+ // This API creates a new ABitOfEverything
+ rpc Create(ABitOfEverything) returns (ABitOfEverything) {
+ option (google.api.http) = {
+ post: "/v1/example/a_bit_of_everything/{float_value}/{double_value}/{int64_value}/separator/{uint64_value}/{int32_value}/{fixed64_value}/{fixed32_value}/{bool_value}/{string_value=strprefix/*}/{uint32_value}/{sfixed32_value}/{sfixed64_value}/{sint32_value}/{sint64_value}/{nonConventionalNameValue}/{enum_value}/{path_enum_value}/{nested_path_enum_value}/{enum_value_annotation}"
+ };
+ }
+ rpc CreateBody(ABitOfEverything) returns (ABitOfEverything) {
+ option (google.api.http) = {
+ post: "/v1/example/a_bit_of_everything"
+ body: "*"
+ };
+ }
+ // Create a book.
+ rpc CreateBook(CreateBookRequest) returns (Book) {
+ option (google.api.http) = {
+ post: "/v1/{parent=publishers/*}/books"
+ body: "book"
+ };
+ }
+ rpc UpdateBook(UpdateBookRequest) returns (Book) {
+ option (google.api.http) = {
+ patch: "/v1/{book.name=publishers/*/books/*}"
+ body: "book"
+ };
+ }
+ rpc Lookup(grpc.gateway.examples.internal.proto.sub2.IdMessage) returns (ABitOfEverything) {
+ option (google.api.http) = {
+ get: "/v1/example/a_bit_of_everything/{uuid}"
+ };
+ }
+ rpc Custom(ABitOfEverything) returns (ABitOfEverything) {
+ option (google.api.http) = {
+ post: "/v1/example/a_bit_of_everything/{uuid}:custom"
+ };
+ }
+ rpc DoubleColon(ABitOfEverything) returns (ABitOfEverything) {
+ option (google.api.http) = {
+ post: "/v1/example/a_bit_of_everything/{uuid}:custom:custom"
+ };
+ }
+ rpc Update(ABitOfEverything) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ put: "/v1/example/a_bit_of_everything/{uuid}"
+ body: "*"
+ };
+ }
+ rpc UpdateV2(UpdateV2Request) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ put: "/v2/example/a_bit_of_everything/{abe.uuid}"
+ body: "abe"
+ additional_bindings: [
+ {
+ patch: "/v2/example/a_bit_of_everything/{abe.uuid}"
+ body: "abe"
+ },
+ {
+ patch: "/v2a/example/a_bit_of_everything/{abe.uuid}"
+ body: "*"
+ }
+ ]
+ };
+ }
+
+ rpc Delete(grpc.gateway.examples.internal.proto.sub2.IdMessage) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1/example/a_bit_of_everything/{uuid}"
+ };
+ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
+ security: {
+ security_requirement: {
+ key: "ApiKeyAuth";
+ value: {}
+ }
+ security_requirement: {
+ key: "OAuth2";
+ value: {
+ scope: "read";
+ scope: "write";
+ }
+ }
+ }
+ extensions: {
+ key: "x-irreversible";
+ value {
+ bool_value: true;
+ }
+ }
+ };
+ }
+ rpc GetQuery(ABitOfEverything) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ get: "/v1/example/a_bit_of_everything/query/{uuid}"
+ };
+ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
+ deprecated: true // For testing purposes.
+ external_docs: {
+ url: "https://github.com/grpc-ecosystem/grpc-gateway";
+ description: "Find out more about GetQuery";
+ }
+ security: {}
+ };
+ }
+ rpc GetRepeatedQuery(ABitOfEverythingRepeated) returns (ABitOfEverythingRepeated) {
+ option (google.api.http) = {
+ get: "/v1/example/a_bit_of_everything_repeated/{path_repeated_float_value}/{path_repeated_double_value}/{path_repeated_int64_value}/{path_repeated_uint64_value}/{path_repeated_int32_value}/{path_repeated_fixed64_value}/{path_repeated_fixed32_value}/{path_repeated_bool_value}/{path_repeated_string_value}/{path_repeated_bytes_value}/{path_repeated_uint32_value}/{path_repeated_enum_value}/{path_repeated_sfixed32_value}/{path_repeated_sfixed64_value}/{path_repeated_sint32_value}/{path_repeated_sint64_value}"
+ };
+ }
+ // Echo allows posting a StringMessage value.
+ //
+ // It also exposes multiple bindings.
+ //
+ // This makes it useful when validating that the OpenAPI v2 API
+ // description exposes documentation correctly on all paths
+ // defined as additional_bindings in the proto.
+ rpc Echo(grpc.gateway.examples.internal.proto.sub.StringMessage) returns (grpc.gateway.examples.internal.proto.sub.StringMessage) {
+ option (google.api.http) = {
+ get: "/v1/example/a_bit_of_everything/echo/{value}"
+ additional_bindings {
+ post: "/v2/example/echo"
+ body: "value"
+ }
+ additional_bindings {
+ get: "/v2/example/echo"
+ }
+ };
+ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
+ description: "Description Echo";
+ summary: "Summary: Echo rpc";
+ tags: "echo rpc";
+ external_docs: {
+ url: "https://github.com/grpc-ecosystem/grpc-gateway";
+ description: "Find out more Echo";
+ }
+ responses: {
+ key: "200"
+ value: {
+ examples: {
+ key: "application/json"
+ value: "{\"value\": \"the input value\"}"
+ }
+ }
+ }
+ responses: {
+ key: "503";
+ value: {
+ description: "Returned when the resource is temporarily unavailable.";
+ extensions: {
+ key: "x-number";
+ value {
+ number_value: 100;
+ }
+ }
+ }
+ }
+ responses: {
+ // Overwrites global definition.
+ key: "404";
+ value: {
+ description: "Returned when the resource does not exist.";
+ schema: {
+ json_schema: {
+ type: INTEGER;
+ }
+ }
+ }
+ }
+ };
+ }
+ rpc DeepPathEcho(ABitOfEverything) returns (ABitOfEverything) {
+ option (google.api.http) = {
+ post: "/v1/example/deep_path/{single_nested.name}"
+ body: "*"
+ };
+ }
+ rpc NoBindings(google.protobuf.Duration) returns (google.protobuf.Empty) {}
+ rpc Timeout(google.protobuf.Empty) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ get: "/v2/example/timeout",
+ };
+ }
+ rpc ErrorWithDetails(google.protobuf.Empty) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ get: "/v2/example/errorwithdetails",
+ };
+ }
+ rpc GetMessageWithBody(MessageWithBody) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ post: "/v2/example/withbody/{id}",
+ body: "data"
+ };
+ }
+ rpc PostWithEmptyBody(Body) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ post: "/v2/example/postwithemptybody/{name}",
+ body: "*"
+ };
+ }
+ rpc CheckGetQueryParams(ABitOfEverything) returns (ABitOfEverything) {
+ option (google.api.http) = {
+ get: "/v1/example/a_bit_of_everything/params/get/{single_nested.name}"
+ };
+ }
+ rpc CheckNestedEnumGetQueryParams(ABitOfEverything) returns (ABitOfEverything) {
+ option (google.api.http) = {
+ get: "/v1/example/a_bit_of_everything/params/get/nested_enum/{single_nested.ok}"
+ };
+ }
+ rpc CheckPostQueryParams(ABitOfEverything) returns (ABitOfEverything) {
+ option (google.api.http) = {
+ post: "/v1/example/a_bit_of_everything/params/post/{string_value}"
+ body: "single_nested"
+ };
+ }
+ rpc OverwriteRequestContentType(Body) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ post: "/v2/example/overwriterequestcontenttype"
+ body: "*"
+ };
+ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
+ consumes: "application/x-bar-mime"
+ };
+ }
+ rpc OverwriteResponseContentType(google.protobuf.Empty) returns (google.protobuf.StringValue) {
+ option (google.api.http) = {
+ get: "/v2/example/overwriteresponsecontenttype"
+ };
+ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
+ produces: "application/text"
+ };
+ }
+ rpc CheckExternalPathEnum(pathenum.MessageWithPathEnum) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ get: "/v2/{value}:check"
+ };
+ }
+ rpc CheckExternalNestedPathEnum(pathenum.MessageWithNestedPathEnum) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ get: "/v3/{value}:check"
+ };
+ }
+
+ rpc CheckStatus(google.protobuf.Empty) returns (CheckStatusResponse) {
+ option (google.api.http) = {
+ get: "/v1/example/checkStatus"
+ };
+ }
+
+ rpc Exists(ABitOfEverything) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ custom: {
+ kind: "HEAD",
+ path: "/v1/example/a_bit_of_everything/{uuid}"
+ }
+ };
+ }
+
+ rpc CustomOptionsRequest(ABitOfEverything) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ custom: {
+ kind: "OPTIONS",
+ path: "/v1/example/a_bit_of_everything/{uuid}"
+ }
+ };
+ }
+
+ rpc TraceRequest(ABitOfEverything) returns (ABitOfEverything) {
+ option (google.api.http) = {
+ custom: {
+ kind: "TRACE",
+ path: "/v1/example/a_bit_of_everything/{uuid}"
+ }
+ };
+ }
+
+ rpc PostOneofEnum(grpc.gateway.examples.internal.proto.oneofenum.OneofEnumMessage) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ post: "/v1/example/oneofenum"
+ body: "example_enum"
+ };
+ }
+
+ rpc PostRequiredMessageType(RequiredMessageTypeRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ post: "/v1/example/requiredmessagetype"
+ body: "*"
+ };
+ }
}
// camelCase and lowercase service names are valid but not recommended (use TitleCase instead)
service camelCaseServiceName {
- rpc Empty(google.protobuf.Empty) returns (google.protobuf.Empty) {
- option (google.api.http) = {
- get: "/v2/example/empty",
- };
- }
+ rpc Empty(google.protobuf.Empty) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ get: "/v2/example/empty",
+ };
+ }
}
service AnotherServiceWithNoBindings {
- rpc NoBindings(google.protobuf.Empty) returns (google.protobuf.Empty) {}
+ rpc NoBindings(google.protobuf.Empty) returns (google.protobuf.Empty) {}
+}
+
+service SnakeEnumService {
+ rpc SnakeEnum(SnakeEnumRequest) returns (SnakeEnumResponse) {
+ option (google.api.http) = {
+ get: "/v1/example/snake/{who}/{what}/{where}"
+ };
+ }
+}
+
+// Ignoring lint warnings as this enum type exist to validate proper functionality
+// for projects that don't follow these lint rules.
+// buf:lint:ignore ENUM_PASCAL_CASE
+enum snake_case_enum {
+ // buf:lint:ignore ENUM_VALUE_UPPER_SNAKE_CASE
+ value_c = 0;
+ // buf:lint:ignore ENUM_VALUE_UPPER_SNAKE_CASE
+ value_d = 1;
+}
+
+// Ignoring lint warnings as this enum type exist to validate proper functionality
+// for projects that don't follow these lint rules.
+// buf:lint:ignore ENUM_PASCAL_CASE
+enum snake_case_0_enum {
+ // buf:lint:ignore ENUM_VALUE_UPPER_SNAKE_CASE
+ value_e = 0;
+ // buf:lint:ignore ENUM_VALUE_UPPER_SNAKE_CASE
+ value_f = 1;
+}
+
+message SnakeEnumRequest {
+ snake_case_enum what = 1;
+ snake_case_0_enum who = 2;
+ pathenum.snake_case_for_import where = 3;
+}
+
+message SnakeEnumResponse {}
+
+// Required message type -> OpenAPI
+// https://github.com/grpc-ecosystem/grpc-gateway/issues/2837
+message RequiredMessageTypeRequest {
+ string id = 1 [(google.api.field_behavior) = REQUIRED];
+ Foo foo = 2 [(google.api.field_behavior) = REQUIRED];
+}
+
+message Foo {
+ Bar bar = 1 [(google.api.field_behavior) = REQUIRED];
+}
+
+message Bar {
+ string id = 1 [(google.api.field_behavior) = REQUIRED];
}
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 8fa007da96c..7d869067a13 100644
--- a/examples/internal/proto/examplepb/a_bit_of_everything.swagger.json
+++ b/examples/internal/proto/examplepb/a_bit_of_everything.swagger.json
@@ -28,6 +28,14 @@
},
{
"name": "AnotherServiceWithNoBindings"
+ },
+ {
+ "name": "SnakeEnumService"
+ },
+ {
+ "name": "echo rpc",
+ "description": "Echo Rpc description",
+ "x-traitTag": true
}
],
"schemes": [
@@ -87,6 +95,7 @@
"parameters": [
{
"name": "body",
+ "description": "Intentionally complicated message type to cover many features of Protobuf.",
"in": "body",
"required": true,
"schema": {
@@ -237,8 +246,10 @@
{
"name": "uuid",
"in": "query",
- "required": false,
- "type": "string"
+ "required": true,
+ "type": "string",
+ "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}",
+ "x-internal": true
},
{
"name": "floatValue",
@@ -252,14 +263,14 @@
{
"name": "doubleValue",
"in": "query",
- "required": false,
+ "required": true,
"type": "number",
"format": "double"
},
{
"name": "int64Value",
"in": "query",
- "required": false,
+ "required": true,
"type": "string",
"format": "int64"
},
@@ -410,7 +421,7 @@
},
{
"name": "repeatedEnumValue",
- "description": "repeated enum value. it is comma-separated in query.\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1",
+ "description": "repeated enum value. it is comma-separated in query\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1",
"in": "query",
"required": false,
"type": "array",
@@ -425,7 +436,7 @@
},
{
"name": "repeatedEnumAnnotation",
- "description": "Repeated numeric enum title. Repeated numeric enum description.\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1",
+ "description": "Repeated numeric enum title\n\nRepeated numeric enum description.\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1",
"in": "query",
"required": false,
"type": "array",
@@ -440,7 +451,7 @@
},
{
"name": "enumValueAnnotation",
- "description": "Numeric enum title. Numeric enum description.\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1",
+ "description": "Numeric enum title\n\nNumeric enum description.\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1",
"in": "query",
"required": false,
"type": "string",
@@ -452,7 +463,7 @@
},
{
"name": "repeatedStringAnnotation",
- "description": "Repeated string title. Repeated string description.",
+ "description": "Repeated string title\n\nRepeated string description.",
"in": "query",
"required": false,
"type": "array",
@@ -484,14 +495,14 @@
},
{
"name": "requiredStringViaFieldBehaviorAnnotation",
- "description": "mark a field as required in Open API definition.",
+ "description": "mark a field as required in Open API definition",
"in": "query",
"required": true,
"type": "string"
},
{
"name": "outputOnlyStringViaFieldBehaviorAnnotation",
- "description": "mark a field as readonly in Open API definition.",
+ "description": "mark a field as readonly in Open API definition",
"in": "query",
"required": false,
"type": "string"
@@ -501,6 +512,80 @@
"in": "query",
"required": false,
"type": "string"
+ },
+ {
+ "name": "productId",
+ "description": "Test openapiv2 generation of repeated fields\n\nOnly digits are allowed.",
+ "in": "query",
+ "required": false,
+ "type": "array",
+ "items": {
+ "type": "string",
+ "maxLength": 19,
+ "minLength": 1,
+ "pattern": "^[0-9]+$"
+ },
+ "collectionFormat": "multi"
+ },
+ {
+ "name": "optionalStringField",
+ "description": "Test openapiv2 generation of required fields with annotation and jsonschema to reproduce",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "requiredStringField1",
+ "in": "query",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "requiredStringField2",
+ "in": "query",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "required_field_behavior_json_name_custom",
+ "description": "Test openapiv2 handling of required json_name fields",
+ "in": "query",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "required_field_schema_json_name_custom",
+ "in": "query",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "trailingOnly",
+ "description": "Trailing only",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "trailingOnlyDot",
+ "description": "Trailing only dot.",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "trailingBoth",
+ "description": "Leading both\n\nTrailing both.",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "trailingMultiline",
+ "description": "Leading multiline\n\nThis is an example of a multi-line comment.\n\nTrailing multiline.",
+ "in": "query",
+ "required": false,
+ "type": "string"
}
],
"tags": [
@@ -578,8 +663,10 @@
{
"name": "uuid",
"in": "query",
- "required": false,
- "type": "string"
+ "required": true,
+ "type": "string",
+ "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}",
+ "x-internal": true
},
{
"name": "floatValue",
@@ -593,14 +680,14 @@
{
"name": "doubleValue",
"in": "query",
- "required": false,
+ "required": true,
"type": "number",
"format": "double"
},
{
"name": "int64Value",
"in": "query",
- "required": false,
+ "required": true,
"type": "string",
"format": "int64"
},
@@ -751,7 +838,7 @@
},
{
"name": "repeatedEnumValue",
- "description": "repeated enum value. it is comma-separated in query.\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1",
+ "description": "repeated enum value. it is comma-separated in query\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1",
"in": "query",
"required": false,
"type": "array",
@@ -766,7 +853,7 @@
},
{
"name": "repeatedEnumAnnotation",
- "description": "Repeated numeric enum title. Repeated numeric enum description.\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1",
+ "description": "Repeated numeric enum title\n\nRepeated numeric enum description.\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1",
"in": "query",
"required": false,
"type": "array",
@@ -781,7 +868,7 @@
},
{
"name": "enumValueAnnotation",
- "description": "Numeric enum title. Numeric enum description.\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1",
+ "description": "Numeric enum title\n\nNumeric enum description.\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1",
"in": "query",
"required": false,
"type": "string",
@@ -793,7 +880,7 @@
},
{
"name": "repeatedStringAnnotation",
- "description": "Repeated string title. Repeated string description.",
+ "description": "Repeated string title\n\nRepeated string description.",
"in": "query",
"required": false,
"type": "array",
@@ -830,14 +917,14 @@
},
{
"name": "requiredStringViaFieldBehaviorAnnotation",
- "description": "mark a field as required in Open API definition.",
+ "description": "mark a field as required in Open API definition",
"in": "query",
"required": true,
"type": "string"
},
{
"name": "outputOnlyStringViaFieldBehaviorAnnotation",
- "description": "mark a field as readonly in Open API definition.",
+ "description": "mark a field as readonly in Open API definition",
"in": "query",
"required": false,
"type": "string"
@@ -847,6 +934,80 @@
"in": "query",
"required": false,
"type": "string"
+ },
+ {
+ "name": "productId",
+ "description": "Test openapiv2 generation of repeated fields\n\nOnly digits are allowed.",
+ "in": "query",
+ "required": false,
+ "type": "array",
+ "items": {
+ "type": "string",
+ "maxLength": 19,
+ "minLength": 1,
+ "pattern": "^[0-9]+$"
+ },
+ "collectionFormat": "multi"
+ },
+ {
+ "name": "optionalStringField",
+ "description": "Test openapiv2 generation of required fields with annotation and jsonschema to reproduce",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "requiredStringField1",
+ "in": "query",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "requiredStringField2",
+ "in": "query",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "required_field_behavior_json_name_custom",
+ "description": "Test openapiv2 handling of required json_name fields",
+ "in": "query",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "required_field_schema_json_name_custom",
+ "in": "query",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "trailingOnly",
+ "description": "Trailing only",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "trailingOnlyDot",
+ "description": "Trailing only dot.",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "trailingBoth",
+ "description": "Leading both\n\nTrailing both.",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "trailingMultiline",
+ "description": "Leading multiline\n\nThis is an example of a multi-line comment.\n\nTrailing multiline.",
+ "in": "query",
+ "required": false,
+ "type": "string"
}
],
"tags": [
@@ -902,7 +1063,7 @@
"type": "string"
},
{
- "name": "body",
+ "name": "singleNested",
"in": "body",
"required": true,
"schema": {
@@ -912,8 +1073,10 @@
{
"name": "uuid",
"in": "query",
- "required": false,
- "type": "string"
+ "required": true,
+ "type": "string",
+ "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}",
+ "x-internal": true
},
{
"name": "floatValue",
@@ -927,14 +1090,14 @@
{
"name": "doubleValue",
"in": "query",
- "required": false,
+ "required": true,
"type": "number",
"format": "double"
},
{
"name": "int64Value",
"in": "query",
- "required": false,
+ "required": true,
"type": "string",
"format": "int64"
},
@@ -1079,7 +1242,7 @@
},
{
"name": "repeatedEnumValue",
- "description": "repeated enum value. it is comma-separated in query.\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1",
+ "description": "repeated enum value. it is comma-separated in query\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1",
"in": "query",
"required": false,
"type": "array",
@@ -1094,7 +1257,7 @@
},
{
"name": "repeatedEnumAnnotation",
- "description": "Repeated numeric enum title. Repeated numeric enum description.\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1",
+ "description": "Repeated numeric enum title\n\nRepeated numeric enum description.\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1",
"in": "query",
"required": false,
"type": "array",
@@ -1109,7 +1272,7 @@
},
{
"name": "enumValueAnnotation",
- "description": "Numeric enum title. Numeric enum description.\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1",
+ "description": "Numeric enum title\n\nNumeric enum description.\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1",
"in": "query",
"required": false,
"type": "string",
@@ -1121,7 +1284,7 @@
},
{
"name": "repeatedStringAnnotation",
- "description": "Repeated string title. Repeated string description.",
+ "description": "Repeated string title\n\nRepeated string description.",
"in": "query",
"required": false,
"type": "array",
@@ -1165,14 +1328,14 @@
},
{
"name": "requiredStringViaFieldBehaviorAnnotation",
- "description": "mark a field as required in Open API definition.",
+ "description": "mark a field as required in Open API definition",
"in": "query",
"required": true,
"type": "string"
},
{
"name": "outputOnlyStringViaFieldBehaviorAnnotation",
- "description": "mark a field as readonly in Open API definition.",
+ "description": "mark a field as readonly in Open API definition",
"in": "query",
"required": false,
"type": "string"
@@ -1182,6 +1345,80 @@
"in": "query",
"required": false,
"type": "string"
+ },
+ {
+ "name": "productId",
+ "description": "Test openapiv2 generation of repeated fields\n\nOnly digits are allowed.",
+ "in": "query",
+ "required": false,
+ "type": "array",
+ "items": {
+ "type": "string",
+ "maxLength": 19,
+ "minLength": 1,
+ "pattern": "^[0-9]+$"
+ },
+ "collectionFormat": "multi"
+ },
+ {
+ "name": "optionalStringField",
+ "description": "Test openapiv2 generation of required fields with annotation and jsonschema to reproduce",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "requiredStringField1",
+ "in": "query",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "requiredStringField2",
+ "in": "query",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "required_field_behavior_json_name_custom",
+ "description": "Test openapiv2 handling of required json_name fields",
+ "in": "query",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "required_field_schema_json_name_custom",
+ "in": "query",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "trailingOnly",
+ "description": "Trailing only",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "trailingOnlyDot",
+ "description": "Trailing only dot.",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "trailingBoth",
+ "description": "Leading both\n\nTrailing both.",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "trailingMultiline",
+ "description": "Leading multiline\n\nThis is an example of a multi-line comment.\n\nTrailing multiline.",
+ "in": "query",
+ "required": false,
+ "type": "string"
}
],
"tags": [
@@ -1189,13 +1426,14 @@
]
}
},
- "/v1/example/a_bit_of_everything/query/{uuid}": {
+ "/v1/example/a_bit_of_everything/query/{uuidName}": {
"get": {
"operationId": "ABitOfEverythingService_GetQuery",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
+ "type": "object",
"properties": {}
}
},
@@ -1231,10 +1469,11 @@
},
"parameters": [
{
- "name": "uuid",
+ "name": "uuidName",
"in": "path",
"required": true,
- "type": "string"
+ "type": "string",
+ "x-internal": true
},
{
"name": "singleNested.name",
@@ -1274,14 +1513,14 @@
{
"name": "doubleValue",
"in": "query",
- "required": false,
+ "required": true,
"type": "number",
"format": "double"
},
{
"name": "int64Value",
"in": "query",
- "required": false,
+ "required": true,
"type": "string",
"format": "int64"
},
@@ -1432,7 +1671,7 @@
},
{
"name": "repeatedEnumValue",
- "description": "repeated enum value. it is comma-separated in query.\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1",
+ "description": "repeated enum value. it is comma-separated in query\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1",
"in": "query",
"required": false,
"type": "array",
@@ -1447,7 +1686,7 @@
},
{
"name": "repeatedEnumAnnotation",
- "description": "Repeated numeric enum title. Repeated numeric enum description.\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1",
+ "description": "Repeated numeric enum title\n\nRepeated numeric enum description.\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1",
"in": "query",
"required": false,
"type": "array",
@@ -1462,7 +1701,7 @@
},
{
"name": "enumValueAnnotation",
- "description": "Numeric enum title. Numeric enum description.\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1",
+ "description": "Numeric enum title\n\nNumeric enum description.\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1",
"in": "query",
"required": false,
"type": "string",
@@ -1474,7 +1713,7 @@
},
{
"name": "repeatedStringAnnotation",
- "description": "Repeated string title. Repeated string description.",
+ "description": "Repeated string title\n\nRepeated string description.",
"in": "query",
"required": false,
"type": "array",
@@ -1518,14 +1757,14 @@
},
{
"name": "requiredStringViaFieldBehaviorAnnotation",
- "description": "mark a field as required in Open API definition.",
+ "description": "mark a field as required in Open API definition",
"in": "query",
"required": true,
"type": "string"
},
{
"name": "outputOnlyStringViaFieldBehaviorAnnotation",
- "description": "mark a field as readonly in Open API definition.",
+ "description": "mark a field as readonly in Open API definition",
"in": "query",
"required": false,
"type": "string"
@@ -1535,6 +1774,80 @@
"in": "query",
"required": false,
"type": "string"
+ },
+ {
+ "name": "productId",
+ "description": "Test openapiv2 generation of repeated fields\n\nOnly digits are allowed.",
+ "in": "query",
+ "required": false,
+ "type": "array",
+ "items": {
+ "type": "string",
+ "maxLength": 19,
+ "minLength": 1,
+ "pattern": "^[0-9]+$"
+ },
+ "collectionFormat": "multi"
+ },
+ {
+ "name": "optionalStringField",
+ "description": "Test openapiv2 generation of required fields with annotation and jsonschema to reproduce",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "requiredStringField1",
+ "in": "query",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "requiredStringField2",
+ "in": "query",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "required_field_behavior_json_name_custom",
+ "description": "Test openapiv2 handling of required json_name fields",
+ "in": "query",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "required_field_schema_json_name_custom",
+ "in": "query",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "trailingOnly",
+ "description": "Trailing only",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "trailingOnlyDot",
+ "description": "Trailing only dot.",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "trailingBoth",
+ "description": "Leading both\n\nTrailing both.",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "trailingMultiline",
+ "description": "Leading multiline\n\nThis is an example of a multi-line comment.\n\nTrailing multiline.",
+ "in": "query",
+ "required": false,
+ "type": "string"
}
],
"tags": [
@@ -1652,7 +1965,8 @@
"name": "stringValue",
"in": "path",
"required": true,
- "type": "string"
+ "type": "string",
+ "pattern": "strprefix/[^/]+"
},
{
"name": "uint32Value",
@@ -1735,21 +2049,2337 @@
"ZERO",
"ONE"
]
- }
+ },
+ {
+ "name": "singleNested.name",
+ "description": "name is nested field.",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "singleNested.amount",
+ "in": "query",
+ "required": false,
+ "type": "integer",
+ "format": "int64"
+ },
+ {
+ "name": "singleNested.ok",
+ "description": "DeepEnum description.\n\n - FALSE: FALSE is false.\n - TRUE: TRUE is true.",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "enum": [
+ "FALSE",
+ "TRUE"
+ ],
+ "default": "FALSE"
+ },
+ {
+ "name": "uuid",
+ "in": "query",
+ "required": true,
+ "type": "string",
+ "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}",
+ "x-internal": true
+ },
+ {
+ "name": "bytesValue",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "byte"
+ },
+ {
+ "name": "repeatedStringValue",
+ "in": "query",
+ "required": false,
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "collectionFormat": "multi"
+ },
+ {
+ "name": "oneofString",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "timestampValue",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "date-time"
+ },
+ {
+ "name": "repeatedEnumValue",
+ "description": "repeated enum value. it is comma-separated in query\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1",
+ "in": "query",
+ "required": false,
+ "type": "array",
+ "items": {
+ "type": "string",
+ "enum": [
+ "ZERO",
+ "ONE"
+ ]
+ },
+ "collectionFormat": "multi"
+ },
+ {
+ "name": "repeatedEnumAnnotation",
+ "description": "Repeated numeric enum title\n\nRepeated numeric enum description.\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1",
+ "in": "query",
+ "required": false,
+ "type": "array",
+ "items": {
+ "type": "string",
+ "enum": [
+ "ZERO",
+ "ONE"
+ ]
+ },
+ "collectionFormat": "multi"
+ },
+ {
+ "name": "repeatedStringAnnotation",
+ "description": "Repeated string title\n\nRepeated string description.",
+ "in": "query",
+ "required": false,
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "collectionFormat": "multi"
+ },
+ {
+ "name": "nestedAnnotation.name",
+ "description": "name is nested field.",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "nestedAnnotation.amount",
+ "in": "query",
+ "required": false,
+ "type": "integer",
+ "format": "int64"
+ },
+ {
+ "name": "nestedAnnotation.ok",
+ "description": "DeepEnum description.\n\n - FALSE: FALSE is false.\n - TRUE: TRUE is true.",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "enum": [
+ "FALSE",
+ "TRUE"
+ ],
+ "default": "FALSE"
+ },
+ {
+ "name": "int64OverrideType",
+ "in": "query",
+ "required": false,
+ "type": "integer",
+ "format": "int64"
+ },
+ {
+ "name": "requiredStringViaFieldBehaviorAnnotation",
+ "description": "mark a field as required in Open API definition",
+ "in": "query",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "outputOnlyStringViaFieldBehaviorAnnotation",
+ "description": "mark a field as readonly in Open API definition",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "optionalStringValue",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "productId",
+ "description": "Test openapiv2 generation of repeated fields\n\nOnly digits are allowed.",
+ "in": "query",
+ "required": false,
+ "type": "array",
+ "items": {
+ "type": "string",
+ "maxLength": 19,
+ "minLength": 1,
+ "pattern": "^[0-9]+$"
+ },
+ "collectionFormat": "multi"
+ },
+ {
+ "name": "optionalStringField",
+ "description": "Test openapiv2 generation of required fields with annotation and jsonschema to reproduce",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "requiredStringField1",
+ "in": "query",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "requiredStringField2",
+ "in": "query",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "required_field_behavior_json_name_custom",
+ "description": "Test openapiv2 handling of required json_name fields",
+ "in": "query",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "required_field_schema_json_name_custom",
+ "in": "query",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "trailingOnly",
+ "description": "Trailing only",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "trailingOnlyDot",
+ "description": "Trailing only dot.",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "trailingBoth",
+ "description": "Leading both\n\nTrailing both.",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "trailingMultiline",
+ "description": "Leading multiline\n\nThis is an example of a multi-line comment.\n\nTrailing multiline.",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ }
+ ],
+ "tags": [
+ "ABitOfEverythingService"
+ ]
+ }
+ },
+ "/v1/example/a_bit_of_everything/{uuidName}": {
+ "put": {
+ "operationId": "ABitOfEverythingService_Update",
+ "responses": {
+ "200": {
+ "description": "A successful response.",
+ "schema": {
+ "type": "object",
+ "properties": {}
+ }
+ },
+ "403": {
+ "description": "Returned when the user does not have permission to access the resource.",
+ "schema": {}
+ },
+ "404": {
+ "description": "Returned when the resource does not exist.",
+ "schema": {
+ "type": "string",
+ "format": "string"
+ }
+ },
+ "418": {
+ "description": "I'm a teapot.",
+ "schema": {
+ "$ref": "#/definitions/examplepbNumericEnum"
+ }
+ },
+ "500": {
+ "description": "Server error",
+ "schema": {
+ "$ref": "#/definitions/examplepbErrorResponse"
+ }
+ },
+ "default": {
+ "description": "An unexpected error response.",
+ "schema": {
+ "$ref": "#/definitions/rpcStatus"
+ }
+ }
+ },
+ "parameters": [
+ {
+ "name": "uuidName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "x-internal": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "type": "object",
+ "example": {
+ "int64_value": 12,
+ "double_value": 12.3
+ },
+ "properties": {
+ "singleNested": {
+ "$ref": "#/definitions/ABitOfEverythingNested"
+ },
+ "nested": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/ABitOfEverythingNested"
+ }
+ },
+ "floatValue": {
+ "type": "number",
+ "format": "float",
+ "default": "0.2",
+ "description": "Float value field"
+ },
+ "doubleValue": {
+ "type": "number",
+ "format": "double"
+ },
+ "int64Value": {
+ "type": "string",
+ "format": "int64"
+ },
+ "uint64Value": {
+ "type": "string",
+ "format": "uint64"
+ },
+ "int32Value": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "fixed64Value": {
+ "type": "string",
+ "format": "uint64"
+ },
+ "fixed32Value": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "boolValue": {
+ "type": "boolean"
+ },
+ "stringValue": {
+ "type": "string"
+ },
+ "bytesValue": {
+ "type": "string",
+ "format": "byte"
+ },
+ "uint32Value": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "enumValue": {
+ "$ref": "#/definitions/examplepbNumericEnum"
+ },
+ "pathEnumValue": {
+ "$ref": "#/definitions/pathenumPathEnum"
+ },
+ "nestedPathEnumValue": {
+ "$ref": "#/definitions/MessagePathEnumNestedPathEnum"
+ },
+ "sfixed32Value": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "sfixed64Value": {
+ "type": "string",
+ "format": "int64"
+ },
+ "sint32Value": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "sint64Value": {
+ "type": "string",
+ "format": "int64"
+ },
+ "repeatedStringValue": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "oneofEmpty": {
+ "type": "object",
+ "properties": {}
+ },
+ "oneofString": {
+ "type": "string"
+ },
+ "mapValue": {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/definitions/examplepbNumericEnum"
+ }
+ },
+ "mappedStringValue": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ "mappedNestedValue": {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/definitions/ABitOfEverythingNested"
+ }
+ },
+ "nonConventionalNameValue": {
+ "type": "string"
+ },
+ "timestampValue": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "repeatedEnumValue": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/examplepbNumericEnum"
+ },
+ "title": "repeated enum value. it is comma-separated in query"
+ },
+ "repeatedEnumAnnotation": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/examplepbNumericEnum"
+ },
+ "description": "Repeated numeric enum description.",
+ "title": "Repeated numeric enum title"
+ },
+ "enumValueAnnotation": {
+ "$ref": "#/definitions/examplepbNumericEnum",
+ "description": "Numeric enum description.",
+ "title": "Numeric enum title"
+ },
+ "repeatedStringAnnotation": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "Repeated string description.",
+ "title": "Repeated string title"
+ },
+ "repeatedNestedAnnotation": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/ABitOfEverythingNested"
+ },
+ "description": "Repeated nested object description.",
+ "title": "Repeated nested object title"
+ },
+ "nestedAnnotation": {
+ "$ref": "#/definitions/ABitOfEverythingNested",
+ "description": "Nested object description.",
+ "title": "Nested object title"
+ },
+ "int64OverrideType": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "requiredStringViaFieldBehaviorAnnotation": {
+ "type": "string",
+ "title": "mark a field as required in Open API definition"
+ },
+ "outputOnlyStringViaFieldBehaviorAnnotation": {
+ "type": "string",
+ "title": "mark a field as readonly in Open API definition",
+ "readOnly": true
+ },
+ "optionalStringValue": {
+ "type": "string"
+ },
+ "productId": {
+ "type": "array",
+ "items": {
+ "type": "string",
+ "maxLength": 19,
+ "minLength": 1,
+ "pattern": "^[0-9]+$"
+ },
+ "description": "Only digits are allowed.",
+ "title": "Test openapiv2 generation of repeated fields"
+ },
+ "optionalStringField": {
+ "type": "string",
+ "title": "Test openapiv2 generation of required fields with annotation and jsonschema to reproduce"
+ },
+ "requiredStringField1": {
+ "type": "string"
+ },
+ "requiredStringField2": {
+ "type": "string"
+ },
+ "required_field_behavior_json_name_custom": {
+ "type": "string",
+ "title": "Test openapiv2 handling of required json_name fields"
+ },
+ "required_field_schema_json_name_custom": {
+ "type": "string"
+ },
+ "trailingOnly": {
+ "type": "string",
+ "title": "Trailing only"
+ },
+ "trailingOnlyDot": {
+ "type": "string",
+ "description": "Trailing only dot."
+ },
+ "trailingBoth": {
+ "type": "string",
+ "description": "Trailing both.",
+ "title": "Leading both"
+ },
+ "trailingMultiline": {
+ "type": "string",
+ "description": "This is an example of a multi-line comment.\n\nTrailing multiline.",
+ "title": "Leading multiline"
+ }
+ },
+ "description": "Intentionally complicated message type to cover many features of Protobuf.",
+ "title": "A bit of everything",
+ "externalDocs": {
+ "description": "Find out more about ABitOfEverything",
+ "url": "https://github.com/grpc-ecosystem/grpc-gateway"
+ },
+ "required": [
+ "int64Value",
+ "doubleValue",
+ "required_field_schema_json_name_custom",
+ "floatValue",
+ "requiredStringViaFieldBehaviorAnnotation",
+ "requiredStringField1",
+ "requiredStringField2",
+ "required_field_behavior_json_name_custom"
+ ],
+ "x-a-bit-of-everything-foo": "bar"
+ }
+ }
+ ],
+ "tags": [
+ "ABitOfEverythingService"
+ ]
+ },
+ "head": {
+ "operationId": "ABitOfEverythingService_Exists",
+ "responses": {
+ "200": {
+ "description": "A successful response.",
+ "schema": {
+ "type": "object",
+ "properties": {}
+ }
+ },
+ "default": {
+ "description": "An unexpected error response.",
+ "schema": {
+ "$ref": "#/definitions/rpcStatus"
+ }
+ }
+ },
+ "parameters": [
+ {
+ "name": "uuidName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "x-internal": true
+ },
+ {
+ "name": "singleNested.name",
+ "description": "name is nested field.",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "singleNested.amount",
+ "in": "query",
+ "required": false,
+ "type": "integer",
+ "format": "int64"
+ },
+ {
+ "name": "singleNested.ok",
+ "description": "DeepEnum description.\n\n - FALSE: FALSE is false.\n - TRUE: TRUE is true.",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "enum": [
+ "FALSE",
+ "TRUE"
+ ],
+ "default": "FALSE"
+ },
+ {
+ "name": "floatValue",
+ "description": "Float value field",
+ "in": "query",
+ "required": true,
+ "type": "number",
+ "format": "float",
+ "default": "0.2"
+ },
+ {
+ "name": "doubleValue",
+ "in": "query",
+ "required": true,
+ "type": "number",
+ "format": "double"
+ },
+ {
+ "name": "int64Value",
+ "in": "query",
+ "required": true,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "uint64Value",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "uint64"
+ },
+ {
+ "name": "int32Value",
+ "in": "query",
+ "required": false,
+ "type": "integer",
+ "format": "int32"
+ },
+ {
+ "name": "fixed64Value",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "uint64"
+ },
+ {
+ "name": "fixed32Value",
+ "in": "query",
+ "required": false,
+ "type": "integer",
+ "format": "int64"
+ },
+ {
+ "name": "boolValue",
+ "in": "query",
+ "required": false,
+ "type": "boolean"
+ },
+ {
+ "name": "stringValue",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "bytesValue",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "byte"
+ },
+ {
+ "name": "uint32Value",
+ "in": "query",
+ "required": false,
+ "type": "integer",
+ "format": "int64"
+ },
+ {
+ "name": "enumValue",
+ "description": " - ZERO: ZERO means 0\n - ONE: ONE means 1",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "enum": [
+ "ZERO",
+ "ONE"
+ ],
+ "default": "ZERO"
+ },
+ {
+ "name": "pathEnumValue",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "enum": [
+ "ABC",
+ "DEF"
+ ],
+ "default": "ABC"
+ },
+ {
+ "name": "nestedPathEnumValue",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "enum": [
+ "GHI",
+ "JKL"
+ ],
+ "default": "GHI"
+ },
+ {
+ "name": "sfixed32Value",
+ "in": "query",
+ "required": false,
+ "type": "integer",
+ "format": "int32"
+ },
+ {
+ "name": "sfixed64Value",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "sint32Value",
+ "in": "query",
+ "required": false,
+ "type": "integer",
+ "format": "int32"
+ },
+ {
+ "name": "sint64Value",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "repeatedStringValue",
+ "in": "query",
+ "required": false,
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "collectionFormat": "multi"
+ },
+ {
+ "name": "oneofString",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "nonConventionalNameValue",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "timestampValue",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "date-time"
+ },
+ {
+ "name": "repeatedEnumValue",
+ "description": "repeated enum value. it is comma-separated in query\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1",
+ "in": "query",
+ "required": false,
+ "type": "array",
+ "items": {
+ "type": "string",
+ "enum": [
+ "ZERO",
+ "ONE"
+ ]
+ },
+ "collectionFormat": "multi"
+ },
+ {
+ "name": "repeatedEnumAnnotation",
+ "description": "Repeated numeric enum title\n\nRepeated numeric enum description.\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1",
+ "in": "query",
+ "required": false,
+ "type": "array",
+ "items": {
+ "type": "string",
+ "enum": [
+ "ZERO",
+ "ONE"
+ ]
+ },
+ "collectionFormat": "multi"
+ },
+ {
+ "name": "enumValueAnnotation",
+ "description": "Numeric enum title\n\nNumeric enum description.\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "enum": [
+ "ZERO",
+ "ONE"
+ ],
+ "default": "ZERO"
+ },
+ {
+ "name": "repeatedStringAnnotation",
+ "description": "Repeated string title\n\nRepeated string description.",
+ "in": "query",
+ "required": false,
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "collectionFormat": "multi"
+ },
+ {
+ "name": "nestedAnnotation.name",
+ "description": "name is nested field.",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "nestedAnnotation.amount",
+ "in": "query",
+ "required": false,
+ "type": "integer",
+ "format": "int64"
+ },
+ {
+ "name": "nestedAnnotation.ok",
+ "description": "DeepEnum description.\n\n - FALSE: FALSE is false.\n - TRUE: TRUE is true.",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "enum": [
+ "FALSE",
+ "TRUE"
+ ],
+ "default": "FALSE"
+ },
+ {
+ "name": "int64OverrideType",
+ "in": "query",
+ "required": false,
+ "type": "integer",
+ "format": "int64"
+ },
+ {
+ "name": "requiredStringViaFieldBehaviorAnnotation",
+ "description": "mark a field as required in Open API definition",
+ "in": "query",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "outputOnlyStringViaFieldBehaviorAnnotation",
+ "description": "mark a field as readonly in Open API definition",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "optionalStringValue",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "productId",
+ "description": "Test openapiv2 generation of repeated fields\n\nOnly digits are allowed.",
+ "in": "query",
+ "required": false,
+ "type": "array",
+ "items": {
+ "type": "string",
+ "maxLength": 19,
+ "minLength": 1,
+ "pattern": "^[0-9]+$"
+ },
+ "collectionFormat": "multi"
+ },
+ {
+ "name": "optionalStringField",
+ "description": "Test openapiv2 generation of required fields with annotation and jsonschema to reproduce",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "requiredStringField1",
+ "in": "query",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "requiredStringField2",
+ "in": "query",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "required_field_behavior_json_name_custom",
+ "description": "Test openapiv2 handling of required json_name fields",
+ "in": "query",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "required_field_schema_json_name_custom",
+ "in": "query",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "trailingOnly",
+ "description": "Trailing only",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "trailingOnlyDot",
+ "description": "Trailing only dot.",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "trailingBoth",
+ "description": "Leading both\n\nTrailing both.",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "trailingMultiline",
+ "description": "Leading multiline\n\nThis is an example of a multi-line comment.\n\nTrailing multiline.",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ }
+ ],
+ "tags": [
+ "ABitOfEverythingService"
+ ]
+ },
+ "options": {
+ "operationId": "ABitOfEverythingService_CustomOptionsRequest",
+ "responses": {
+ "200": {
+ "description": "A successful response.",
+ "schema": {
+ "type": "object",
+ "properties": {}
+ }
+ },
+ "default": {
+ "description": "An unexpected error response.",
+ "schema": {
+ "$ref": "#/definitions/rpcStatus"
+ }
+ }
+ },
+ "parameters": [
+ {
+ "name": "uuidName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "x-internal": true
+ },
+ {
+ "name": "singleNested.name",
+ "description": "name is nested field.",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "singleNested.amount",
+ "in": "query",
+ "required": false,
+ "type": "integer",
+ "format": "int64"
+ },
+ {
+ "name": "singleNested.ok",
+ "description": "DeepEnum description.\n\n - FALSE: FALSE is false.\n - TRUE: TRUE is true.",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "enum": [
+ "FALSE",
+ "TRUE"
+ ],
+ "default": "FALSE"
+ },
+ {
+ "name": "floatValue",
+ "description": "Float value field",
+ "in": "query",
+ "required": true,
+ "type": "number",
+ "format": "float",
+ "default": "0.2"
+ },
+ {
+ "name": "doubleValue",
+ "in": "query",
+ "required": true,
+ "type": "number",
+ "format": "double"
+ },
+ {
+ "name": "int64Value",
+ "in": "query",
+ "required": true,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "uint64Value",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "uint64"
+ },
+ {
+ "name": "int32Value",
+ "in": "query",
+ "required": false,
+ "type": "integer",
+ "format": "int32"
+ },
+ {
+ "name": "fixed64Value",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "uint64"
+ },
+ {
+ "name": "fixed32Value",
+ "in": "query",
+ "required": false,
+ "type": "integer",
+ "format": "int64"
+ },
+ {
+ "name": "boolValue",
+ "in": "query",
+ "required": false,
+ "type": "boolean"
+ },
+ {
+ "name": "stringValue",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "bytesValue",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "byte"
+ },
+ {
+ "name": "uint32Value",
+ "in": "query",
+ "required": false,
+ "type": "integer",
+ "format": "int64"
+ },
+ {
+ "name": "enumValue",
+ "description": " - ZERO: ZERO means 0\n - ONE: ONE means 1",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "enum": [
+ "ZERO",
+ "ONE"
+ ],
+ "default": "ZERO"
+ },
+ {
+ "name": "pathEnumValue",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "enum": [
+ "ABC",
+ "DEF"
+ ],
+ "default": "ABC"
+ },
+ {
+ "name": "nestedPathEnumValue",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "enum": [
+ "GHI",
+ "JKL"
+ ],
+ "default": "GHI"
+ },
+ {
+ "name": "sfixed32Value",
+ "in": "query",
+ "required": false,
+ "type": "integer",
+ "format": "int32"
+ },
+ {
+ "name": "sfixed64Value",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "sint32Value",
+ "in": "query",
+ "required": false,
+ "type": "integer",
+ "format": "int32"
+ },
+ {
+ "name": "sint64Value",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "repeatedStringValue",
+ "in": "query",
+ "required": false,
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "collectionFormat": "multi"
+ },
+ {
+ "name": "oneofString",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "nonConventionalNameValue",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "timestampValue",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "date-time"
+ },
+ {
+ "name": "repeatedEnumValue",
+ "description": "repeated enum value. it is comma-separated in query\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1",
+ "in": "query",
+ "required": false,
+ "type": "array",
+ "items": {
+ "type": "string",
+ "enum": [
+ "ZERO",
+ "ONE"
+ ]
+ },
+ "collectionFormat": "multi"
+ },
+ {
+ "name": "repeatedEnumAnnotation",
+ "description": "Repeated numeric enum title\n\nRepeated numeric enum description.\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1",
+ "in": "query",
+ "required": false,
+ "type": "array",
+ "items": {
+ "type": "string",
+ "enum": [
+ "ZERO",
+ "ONE"
+ ]
+ },
+ "collectionFormat": "multi"
+ },
+ {
+ "name": "enumValueAnnotation",
+ "description": "Numeric enum title\n\nNumeric enum description.\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "enum": [
+ "ZERO",
+ "ONE"
+ ],
+ "default": "ZERO"
+ },
+ {
+ "name": "repeatedStringAnnotation",
+ "description": "Repeated string title\n\nRepeated string description.",
+ "in": "query",
+ "required": false,
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "collectionFormat": "multi"
+ },
+ {
+ "name": "nestedAnnotation.name",
+ "description": "name is nested field.",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "nestedAnnotation.amount",
+ "in": "query",
+ "required": false,
+ "type": "integer",
+ "format": "int64"
+ },
+ {
+ "name": "nestedAnnotation.ok",
+ "description": "DeepEnum description.\n\n - FALSE: FALSE is false.\n - TRUE: TRUE is true.",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "enum": [
+ "FALSE",
+ "TRUE"
+ ],
+ "default": "FALSE"
+ },
+ {
+ "name": "int64OverrideType",
+ "in": "query",
+ "required": false,
+ "type": "integer",
+ "format": "int64"
+ },
+ {
+ "name": "requiredStringViaFieldBehaviorAnnotation",
+ "description": "mark a field as required in Open API definition",
+ "in": "query",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "outputOnlyStringViaFieldBehaviorAnnotation",
+ "description": "mark a field as readonly in Open API definition",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "optionalStringValue",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "productId",
+ "description": "Test openapiv2 generation of repeated fields\n\nOnly digits are allowed.",
+ "in": "query",
+ "required": false,
+ "type": "array",
+ "items": {
+ "type": "string",
+ "maxLength": 19,
+ "minLength": 1,
+ "pattern": "^[0-9]+$"
+ },
+ "collectionFormat": "multi"
+ },
+ {
+ "name": "optionalStringField",
+ "description": "Test openapiv2 generation of required fields with annotation and jsonschema to reproduce",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "requiredStringField1",
+ "in": "query",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "requiredStringField2",
+ "in": "query",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "required_field_behavior_json_name_custom",
+ "description": "Test openapiv2 handling of required json_name fields",
+ "in": "query",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "required_field_schema_json_name_custom",
+ "in": "query",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "trailingOnly",
+ "description": "Trailing only",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "trailingOnlyDot",
+ "description": "Trailing only dot.",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "trailingBoth",
+ "description": "Leading both\n\nTrailing both.",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "trailingMultiline",
+ "description": "Leading multiline\n\nThis is an example of a multi-line comment.\n\nTrailing multiline.",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ }
+ ],
+ "tags": [
+ "ABitOfEverythingService"
+ ]
+ }
+ },
+ "/v1/example/a_bit_of_everything/{uuidName}:custom": {
+ "post": {
+ "operationId": "ABitOfEverythingService_Custom",
+ "responses": {
+ "200": {
+ "description": "A successful response.",
+ "schema": {
+ "$ref": "#/definitions/examplepbABitOfEverything"
+ }
+ },
+ "403": {
+ "description": "Returned when the user does not have permission to access the resource.",
+ "schema": {}
+ },
+ "404": {
+ "description": "Returned when the resource does not exist.",
+ "schema": {
+ "type": "string",
+ "format": "string"
+ }
+ },
+ "418": {
+ "description": "I'm a teapot.",
+ "schema": {
+ "$ref": "#/definitions/examplepbNumericEnum"
+ }
+ },
+ "500": {
+ "description": "Server error",
+ "schema": {
+ "$ref": "#/definitions/examplepbErrorResponse"
+ }
+ },
+ "default": {
+ "description": "An unexpected error response.",
+ "schema": {
+ "$ref": "#/definitions/rpcStatus"
+ }
+ }
+ },
+ "parameters": [
+ {
+ "name": "uuidName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "x-internal": true
+ },
+ {
+ "name": "singleNested.name",
+ "description": "name is nested field.",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "singleNested.amount",
+ "in": "query",
+ "required": false,
+ "type": "integer",
+ "format": "int64"
+ },
+ {
+ "name": "singleNested.ok",
+ "description": "DeepEnum description.\n\n - FALSE: FALSE is false.\n - TRUE: TRUE is true.",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "enum": [
+ "FALSE",
+ "TRUE"
+ ],
+ "default": "FALSE"
+ },
+ {
+ "name": "floatValue",
+ "description": "Float value field",
+ "in": "query",
+ "required": true,
+ "type": "number",
+ "format": "float",
+ "default": "0.2"
+ },
+ {
+ "name": "doubleValue",
+ "in": "query",
+ "required": true,
+ "type": "number",
+ "format": "double"
+ },
+ {
+ "name": "int64Value",
+ "in": "query",
+ "required": true,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "uint64Value",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "uint64"
+ },
+ {
+ "name": "int32Value",
+ "in": "query",
+ "required": false,
+ "type": "integer",
+ "format": "int32"
+ },
+ {
+ "name": "fixed64Value",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "uint64"
+ },
+ {
+ "name": "fixed32Value",
+ "in": "query",
+ "required": false,
+ "type": "integer",
+ "format": "int64"
+ },
+ {
+ "name": "boolValue",
+ "in": "query",
+ "required": false,
+ "type": "boolean"
+ },
+ {
+ "name": "stringValue",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "bytesValue",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "byte"
+ },
+ {
+ "name": "uint32Value",
+ "in": "query",
+ "required": false,
+ "type": "integer",
+ "format": "int64"
+ },
+ {
+ "name": "enumValue",
+ "description": " - ZERO: ZERO means 0\n - ONE: ONE means 1",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "enum": [
+ "ZERO",
+ "ONE"
+ ],
+ "default": "ZERO"
+ },
+ {
+ "name": "pathEnumValue",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "enum": [
+ "ABC",
+ "DEF"
+ ],
+ "default": "ABC"
+ },
+ {
+ "name": "nestedPathEnumValue",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "enum": [
+ "GHI",
+ "JKL"
+ ],
+ "default": "GHI"
+ },
+ {
+ "name": "sfixed32Value",
+ "in": "query",
+ "required": false,
+ "type": "integer",
+ "format": "int32"
+ },
+ {
+ "name": "sfixed64Value",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "sint32Value",
+ "in": "query",
+ "required": false,
+ "type": "integer",
+ "format": "int32"
+ },
+ {
+ "name": "sint64Value",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "repeatedStringValue",
+ "in": "query",
+ "required": false,
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "collectionFormat": "multi"
+ },
+ {
+ "name": "oneofString",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "nonConventionalNameValue",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "timestampValue",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "date-time"
+ },
+ {
+ "name": "repeatedEnumValue",
+ "description": "repeated enum value. it is comma-separated in query\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1",
+ "in": "query",
+ "required": false,
+ "type": "array",
+ "items": {
+ "type": "string",
+ "enum": [
+ "ZERO",
+ "ONE"
+ ]
+ },
+ "collectionFormat": "multi"
+ },
+ {
+ "name": "repeatedEnumAnnotation",
+ "description": "Repeated numeric enum title\n\nRepeated numeric enum description.\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1",
+ "in": "query",
+ "required": false,
+ "type": "array",
+ "items": {
+ "type": "string",
+ "enum": [
+ "ZERO",
+ "ONE"
+ ]
+ },
+ "collectionFormat": "multi"
+ },
+ {
+ "name": "enumValueAnnotation",
+ "description": "Numeric enum title\n\nNumeric enum description.\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "enum": [
+ "ZERO",
+ "ONE"
+ ],
+ "default": "ZERO"
+ },
+ {
+ "name": "repeatedStringAnnotation",
+ "description": "Repeated string title\n\nRepeated string description.",
+ "in": "query",
+ "required": false,
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "collectionFormat": "multi"
+ },
+ {
+ "name": "nestedAnnotation.name",
+ "description": "name is nested field.",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "nestedAnnotation.amount",
+ "in": "query",
+ "required": false,
+ "type": "integer",
+ "format": "int64"
+ },
+ {
+ "name": "nestedAnnotation.ok",
+ "description": "DeepEnum description.\n\n - FALSE: FALSE is false.\n - TRUE: TRUE is true.",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "enum": [
+ "FALSE",
+ "TRUE"
+ ],
+ "default": "FALSE"
+ },
+ {
+ "name": "int64OverrideType",
+ "in": "query",
+ "required": false,
+ "type": "integer",
+ "format": "int64"
+ },
+ {
+ "name": "requiredStringViaFieldBehaviorAnnotation",
+ "description": "mark a field as required in Open API definition",
+ "in": "query",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "outputOnlyStringViaFieldBehaviorAnnotation",
+ "description": "mark a field as readonly in Open API definition",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "optionalStringValue",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "productId",
+ "description": "Test openapiv2 generation of repeated fields\n\nOnly digits are allowed.",
+ "in": "query",
+ "required": false,
+ "type": "array",
+ "items": {
+ "type": "string",
+ "maxLength": 19,
+ "minLength": 1,
+ "pattern": "^[0-9]+$"
+ },
+ "collectionFormat": "multi"
+ },
+ {
+ "name": "optionalStringField",
+ "description": "Test openapiv2 generation of required fields with annotation and jsonschema to reproduce",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "requiredStringField1",
+ "in": "query",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "requiredStringField2",
+ "in": "query",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "required_field_behavior_json_name_custom",
+ "description": "Test openapiv2 handling of required json_name fields",
+ "in": "query",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "required_field_schema_json_name_custom",
+ "in": "query",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "trailingOnly",
+ "description": "Trailing only",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "trailingOnlyDot",
+ "description": "Trailing only dot.",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "trailingBoth",
+ "description": "Leading both\n\nTrailing both.",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "trailingMultiline",
+ "description": "Leading multiline\n\nThis is an example of a multi-line comment.\n\nTrailing multiline.",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ }
+ ],
+ "tags": [
+ "ABitOfEverythingService"
+ ]
+ }
+ },
+ "/v1/example/a_bit_of_everything/{uuidName}:custom:custom": {
+ "post": {
+ "operationId": "ABitOfEverythingService_DoubleColon",
+ "responses": {
+ "200": {
+ "description": "A successful response.",
+ "schema": {
+ "$ref": "#/definitions/examplepbABitOfEverything"
+ }
+ },
+ "403": {
+ "description": "Returned when the user does not have permission to access the resource.",
+ "schema": {}
+ },
+ "404": {
+ "description": "Returned when the resource does not exist.",
+ "schema": {
+ "type": "string",
+ "format": "string"
+ }
+ },
+ "418": {
+ "description": "I'm a teapot.",
+ "schema": {
+ "$ref": "#/definitions/examplepbNumericEnum"
+ }
+ },
+ "500": {
+ "description": "Server error",
+ "schema": {
+ "$ref": "#/definitions/examplepbErrorResponse"
+ }
+ },
+ "default": {
+ "description": "An unexpected error response.",
+ "schema": {
+ "$ref": "#/definitions/rpcStatus"
+ }
+ }
+ },
+ "parameters": [
+ {
+ "name": "uuidName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "x-internal": true
+ },
+ {
+ "name": "singleNested.name",
+ "description": "name is nested field.",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "singleNested.amount",
+ "in": "query",
+ "required": false,
+ "type": "integer",
+ "format": "int64"
+ },
+ {
+ "name": "singleNested.ok",
+ "description": "DeepEnum description.\n\n - FALSE: FALSE is false.\n - TRUE: TRUE is true.",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "enum": [
+ "FALSE",
+ "TRUE"
+ ],
+ "default": "FALSE"
+ },
+ {
+ "name": "floatValue",
+ "description": "Float value field",
+ "in": "query",
+ "required": true,
+ "type": "number",
+ "format": "float",
+ "default": "0.2"
+ },
+ {
+ "name": "doubleValue",
+ "in": "query",
+ "required": true,
+ "type": "number",
+ "format": "double"
+ },
+ {
+ "name": "int64Value",
+ "in": "query",
+ "required": true,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "uint64Value",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "uint64"
+ },
+ {
+ "name": "int32Value",
+ "in": "query",
+ "required": false,
+ "type": "integer",
+ "format": "int32"
+ },
+ {
+ "name": "fixed64Value",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "uint64"
+ },
+ {
+ "name": "fixed32Value",
+ "in": "query",
+ "required": false,
+ "type": "integer",
+ "format": "int64"
+ },
+ {
+ "name": "boolValue",
+ "in": "query",
+ "required": false,
+ "type": "boolean"
+ },
+ {
+ "name": "stringValue",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "bytesValue",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "byte"
+ },
+ {
+ "name": "uint32Value",
+ "in": "query",
+ "required": false,
+ "type": "integer",
+ "format": "int64"
+ },
+ {
+ "name": "enumValue",
+ "description": " - ZERO: ZERO means 0\n - ONE: ONE means 1",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "enum": [
+ "ZERO",
+ "ONE"
+ ],
+ "default": "ZERO"
+ },
+ {
+ "name": "pathEnumValue",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "enum": [
+ "ABC",
+ "DEF"
+ ],
+ "default": "ABC"
+ },
+ {
+ "name": "nestedPathEnumValue",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "enum": [
+ "GHI",
+ "JKL"
+ ],
+ "default": "GHI"
+ },
+ {
+ "name": "sfixed32Value",
+ "in": "query",
+ "required": false,
+ "type": "integer",
+ "format": "int32"
+ },
+ {
+ "name": "sfixed64Value",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "sint32Value",
+ "in": "query",
+ "required": false,
+ "type": "integer",
+ "format": "int32"
+ },
+ {
+ "name": "sint64Value",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "repeatedStringValue",
+ "in": "query",
+ "required": false,
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "collectionFormat": "multi"
+ },
+ {
+ "name": "oneofString",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "nonConventionalNameValue",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "timestampValue",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "date-time"
+ },
+ {
+ "name": "repeatedEnumValue",
+ "description": "repeated enum value. it is comma-separated in query\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1",
+ "in": "query",
+ "required": false,
+ "type": "array",
+ "items": {
+ "type": "string",
+ "enum": [
+ "ZERO",
+ "ONE"
+ ]
+ },
+ "collectionFormat": "multi"
+ },
+ {
+ "name": "repeatedEnumAnnotation",
+ "description": "Repeated numeric enum title\n\nRepeated numeric enum description.\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1",
+ "in": "query",
+ "required": false,
+ "type": "array",
+ "items": {
+ "type": "string",
+ "enum": [
+ "ZERO",
+ "ONE"
+ ]
+ },
+ "collectionFormat": "multi"
+ },
+ {
+ "name": "enumValueAnnotation",
+ "description": "Numeric enum title\n\nNumeric enum description.\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "enum": [
+ "ZERO",
+ "ONE"
+ ],
+ "default": "ZERO"
+ },
+ {
+ "name": "repeatedStringAnnotation",
+ "description": "Repeated string title\n\nRepeated string description.",
+ "in": "query",
+ "required": false,
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "collectionFormat": "multi"
+ },
+ {
+ "name": "nestedAnnotation.name",
+ "description": "name is nested field.",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "nestedAnnotation.amount",
+ "in": "query",
+ "required": false,
+ "type": "integer",
+ "format": "int64"
+ },
+ {
+ "name": "nestedAnnotation.ok",
+ "description": "DeepEnum description.\n\n - FALSE: FALSE is false.\n - TRUE: TRUE is true.",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "enum": [
+ "FALSE",
+ "TRUE"
+ ],
+ "default": "FALSE"
+ },
+ {
+ "name": "int64OverrideType",
+ "in": "query",
+ "required": false,
+ "type": "integer",
+ "format": "int64"
+ },
+ {
+ "name": "requiredStringViaFieldBehaviorAnnotation",
+ "description": "mark a field as required in Open API definition",
+ "in": "query",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "outputOnlyStringViaFieldBehaviorAnnotation",
+ "description": "mark a field as readonly in Open API definition",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "optionalStringValue",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "productId",
+ "description": "Test openapiv2 generation of repeated fields\n\nOnly digits are allowed.",
+ "in": "query",
+ "required": false,
+ "type": "array",
+ "items": {
+ "type": "string",
+ "maxLength": 19,
+ "minLength": 1,
+ "pattern": "^[0-9]+$"
+ },
+ "collectionFormat": "multi"
+ },
+ {
+ "name": "optionalStringField",
+ "description": "Test openapiv2 generation of required fields with annotation and jsonschema to reproduce",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "requiredStringField1",
+ "in": "query",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "requiredStringField2",
+ "in": "query",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "required_field_behavior_json_name_custom",
+ "description": "Test openapiv2 handling of required json_name fields",
+ "in": "query",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "required_field_schema_json_name_custom",
+ "in": "query",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "trailingOnly",
+ "description": "Trailing only",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "trailingOnlyDot",
+ "description": "Trailing only dot.",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "trailingBoth",
+ "description": "Leading both\n\nTrailing both.",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "trailingMultiline",
+ "description": "Leading multiline\n\nThis is an example of a multi-line comment.\n\nTrailing multiline.",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ }
+ ],
+ "tags": [
+ "ABitOfEverythingService"
+ ]
+ }
+ },
+ "/v1/example/a_bit_of_everything/{uuid}": {
+ "get": {
+ "operationId": "ABitOfEverythingService_Lookup",
+ "responses": {
+ "200": {
+ "description": "A successful response.",
+ "schema": {
+ "$ref": "#/definitions/examplepbABitOfEverything"
+ }
+ },
+ "403": {
+ "description": "Returned when the user does not have permission to access the resource.",
+ "schema": {}
+ },
+ "404": {
+ "description": "Returned when the resource does not exist.",
+ "schema": {
+ "type": "string",
+ "format": "string"
+ }
+ },
+ "418": {
+ "description": "I'm a teapot.",
+ "schema": {
+ "$ref": "#/definitions/examplepbNumericEnum"
+ }
+ },
+ "500": {
+ "description": "Server error",
+ "schema": {
+ "$ref": "#/definitions/examplepbErrorResponse"
+ }
+ },
+ "default": {
+ "description": "An unexpected error response.",
+ "schema": {
+ "$ref": "#/definitions/rpcStatus"
+ }
+ }
+ },
+ "parameters": [
+ {
+ "name": "uuid",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ }
+ ],
+ "tags": [
+ "ABitOfEverythingService"
+ ]
+ },
+ "delete": {
+ "operationId": "ABitOfEverythingService_Delete",
+ "responses": {
+ "200": {
+ "description": "A successful response.",
+ "schema": {
+ "type": "object",
+ "properties": {}
+ }
+ },
+ "403": {
+ "description": "Returned when the user does not have permission to access the resource.",
+ "schema": {}
+ },
+ "404": {
+ "description": "Returned when the resource does not exist.",
+ "schema": {
+ "type": "string",
+ "format": "string"
+ }
+ },
+ "418": {
+ "description": "I'm a teapot.",
+ "schema": {
+ "$ref": "#/definitions/examplepbNumericEnum"
+ }
+ },
+ "500": {
+ "description": "Server error",
+ "schema": {
+ "$ref": "#/definitions/examplepbErrorResponse"
+ }
+ },
+ "default": {
+ "description": "An unexpected error response.",
+ "schema": {
+ "$ref": "#/definitions/rpcStatus"
+ }
+ }
+ },
+ "parameters": [
+ {
+ "name": "uuid",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ }
],
"tags": [
"ABitOfEverythingService"
- ]
+ ],
+ "security": [
+ {
+ "ApiKeyAuth": [],
+ "OAuth2": [
+ "read",
+ "write"
+ ]
+ }
+ ],
+ "x-irreversible": true
}
},
- "/v1/example/a_bit_of_everything/{uuid}": {
+ "/v1/example/a_bit_of_everything_repeated/{pathRepeatedFloatValue}/{pathRepeatedDoubleValue}/{pathRepeatedInt64Value}/{pathRepeatedUint64Value}/{pathRepeatedInt32Value}/{pathRepeatedFixed64Value}/{pathRepeatedFixed32Value}/{pathRepeatedBoolValue}/{pathRepeatedStringValue}/{pathRepeatedBytesValue}/{pathRepeatedUint32Value}/{pathRepeatedEnumValue}/{pathRepeatedSfixed32Value}/{pathRepeatedSfixed64Value}/{pathRepeatedSint32Value}/{pathRepeatedSint64Value}": {
"get": {
- "operationId": "ABitOfEverythingService_Lookup",
+ "operationId": "ABitOfEverythingService_GetRepeatedQuery",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
- "$ref": "#/definitions/examplepbABitOfEverything"
+ "$ref": "#/definitions/examplepbABitOfEverythingRepeated"
}
},
"403": {
@@ -1784,23 +4414,213 @@
},
"parameters": [
{
- "name": "uuid",
+ "name": "pathRepeatedFloatValue",
+ "description": "repeated values. they are comma-separated in path",
"in": "path",
"required": true,
- "type": "string"
+ "type": "array",
+ "items": {
+ "type": "number",
+ "format": "float"
+ },
+ "collectionFormat": "csv",
+ "minItems": 1
+ },
+ {
+ "name": "pathRepeatedDoubleValue",
+ "in": "path",
+ "required": true,
+ "type": "array",
+ "items": {
+ "type": "number",
+ "format": "double"
+ },
+ "collectionFormat": "csv",
+ "minItems": 1
+ },
+ {
+ "name": "pathRepeatedInt64Value",
+ "in": "path",
+ "required": true,
+ "type": "array",
+ "items": {
+ "type": "string",
+ "format": "int64"
+ },
+ "collectionFormat": "csv",
+ "minItems": 1
+ },
+ {
+ "name": "pathRepeatedUint64Value",
+ "in": "path",
+ "required": true,
+ "type": "array",
+ "items": {
+ "type": "string",
+ "format": "uint64"
+ },
+ "collectionFormat": "csv",
+ "minItems": 1
+ },
+ {
+ "name": "pathRepeatedInt32Value",
+ "in": "path",
+ "required": true,
+ "type": "array",
+ "items": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "collectionFormat": "csv",
+ "minItems": 1
+ },
+ {
+ "name": "pathRepeatedFixed64Value",
+ "in": "path",
+ "required": true,
+ "type": "array",
+ "items": {
+ "type": "string",
+ "format": "uint64"
+ },
+ "collectionFormat": "csv",
+ "minItems": 1
+ },
+ {
+ "name": "pathRepeatedFixed32Value",
+ "in": "path",
+ "required": true,
+ "type": "array",
+ "items": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "collectionFormat": "csv",
+ "minItems": 1
+ },
+ {
+ "name": "pathRepeatedBoolValue",
+ "in": "path",
+ "required": true,
+ "type": "array",
+ "items": {
+ "type": "boolean"
+ },
+ "collectionFormat": "csv",
+ "minItems": 1
+ },
+ {
+ "name": "pathRepeatedStringValue",
+ "in": "path",
+ "required": true,
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "collectionFormat": "csv",
+ "minItems": 1
+ },
+ {
+ "name": "pathRepeatedBytesValue",
+ "in": "path",
+ "required": true,
+ "type": "array",
+ "items": {
+ "type": "string",
+ "format": "byte"
+ },
+ "collectionFormat": "csv",
+ "minItems": 1
+ },
+ {
+ "name": "pathRepeatedUint32Value",
+ "in": "path",
+ "required": true,
+ "type": "array",
+ "items": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "collectionFormat": "csv",
+ "minItems": 1
+ },
+ {
+ "name": "pathRepeatedEnumValue",
+ "in": "path",
+ "required": true,
+ "type": "array",
+ "items": {
+ "type": "string",
+ "enum": [
+ "ZERO",
+ "ONE"
+ ]
+ },
+ "collectionFormat": "csv",
+ "minItems": 1
+ },
+ {
+ "name": "pathRepeatedSfixed32Value",
+ "in": "path",
+ "required": true,
+ "type": "array",
+ "items": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "collectionFormat": "csv",
+ "minItems": 1
+ },
+ {
+ "name": "pathRepeatedSfixed64Value",
+ "in": "path",
+ "required": true,
+ "type": "array",
+ "items": {
+ "type": "string",
+ "format": "int64"
+ },
+ "collectionFormat": "csv",
+ "minItems": 1
+ },
+ {
+ "name": "pathRepeatedSint32Value",
+ "in": "path",
+ "required": true,
+ "type": "array",
+ "items": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "collectionFormat": "csv",
+ "minItems": 1
+ },
+ {
+ "name": "pathRepeatedSint64Value",
+ "in": "path",
+ "required": true,
+ "type": "array",
+ "items": {
+ "type": "string",
+ "format": "int64"
+ },
+ "collectionFormat": "csv",
+ "minItems": 1
}
],
"tags": [
"ABitOfEverythingService"
]
- },
- "delete": {
- "operationId": "ABitOfEverythingService_Delete",
+ }
+ },
+ "/v1/example/checkStatus": {
+ "get": {
+ "operationId": "ABitOfEverythingService_CheckStatus",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
- "properties": {}
+ "$ref": "#/definitions/examplepbCheckStatusResponse"
}
},
"403": {
@@ -1830,38 +4650,22 @@
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
- }
- }
- },
- "parameters": [
- {
- "name": "uuid",
- "in": "path",
- "required": true,
- "type": "string"
+ }
}
- ],
+ },
"tags": [
"ABitOfEverythingService"
- ],
- "security": [
- {
- "ApiKeyAuth": [],
- "OAuth2": [
- "read",
- "write"
- ]
- }
- ],
- "x-irreversible": true
- },
- "put": {
- "operationId": "ABitOfEverythingService_Update",
+ ]
+ }
+ },
+ "/v1/example/deep_path/{singleNested.name}": {
+ "post": {
+ "operationId": "ABitOfEverythingService_DeepPathEcho",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
- "properties": {}
+ "$ref": "#/definitions/examplepbABitOfEverything"
}
},
"403": {
@@ -1896,7 +4700,8 @@
},
"parameters": [
{
- "name": "uuid",
+ "name": "singleNested.name",
+ "description": "name is nested field.",
"in": "path",
"required": true,
"type": "string"
@@ -1913,7 +4718,27 @@
},
"properties": {
"singleNested": {
- "$ref": "#/definitions/ABitOfEverythingNested"
+ "type": "object",
+ "example": {
+ "ok": "TRUE"
+ },
+ "properties": {
+ "amount": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "ok": {
+ "$ref": "#/definitions/NestedDeepEnum",
+ "description": "DeepEnum description."
+ }
+ },
+ "description": "Nested is nested type."
+ },
+ "uuid": {
+ "type": "string",
+ "minLength": 1,
+ "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}",
+ "x-internal": true
},
"nested": {
"type": "array",
@@ -1925,10 +4750,7 @@
"type": "number",
"format": "float",
"default": "0.2",
- "description": "Float value field",
- "required": [
- "float_value"
- ]
+ "description": "Float value field"
},
"doubleValue": {
"type": "number",
@@ -2000,6 +4822,7 @@
}
},
"oneofEmpty": {
+ "type": "object",
"properties": {}
},
"oneofString": {
@@ -2077,10 +4900,7 @@
},
"requiredStringViaFieldBehaviorAnnotation": {
"type": "string",
- "title": "mark a field as required in Open API definition",
- "required": [
- "required_string_via_field_behavior_annotation"
- ]
+ "title": "mark a field as required in Open API definition"
},
"outputOnlyStringViaFieldBehaviorAnnotation": {
"type": "string",
@@ -2089,20 +4909,72 @@
},
"optionalStringValue": {
"type": "string"
+ },
+ "productId": {
+ "type": "array",
+ "items": {
+ "type": "string",
+ "maxLength": 19,
+ "minLength": 1,
+ "pattern": "^[0-9]+$"
+ },
+ "description": "Only digits are allowed.",
+ "title": "Test openapiv2 generation of repeated fields"
+ },
+ "optionalStringField": {
+ "type": "string",
+ "title": "Test openapiv2 generation of required fields with annotation and jsonschema to reproduce"
+ },
+ "requiredStringField1": {
+ "type": "string"
+ },
+ "requiredStringField2": {
+ "type": "string"
+ },
+ "required_field_behavior_json_name_custom": {
+ "type": "string",
+ "title": "Test openapiv2 handling of required json_name fields"
+ },
+ "required_field_schema_json_name_custom": {
+ "type": "string"
+ },
+ "trailingOnly": {
+ "type": "string",
+ "title": "Trailing only"
+ },
+ "trailingOnlyDot": {
+ "type": "string",
+ "description": "Trailing only dot."
+ },
+ "trailingBoth": {
+ "type": "string",
+ "description": "Trailing both.",
+ "title": "Leading both"
+ },
+ "trailingMultiline": {
+ "type": "string",
+ "description": "This is an example of a multi-line comment.\n\nTrailing multiline.",
+ "title": "Leading multiline"
}
},
- "description": "Intentionaly complicated message type to cover many features of Protobuf.",
+ "description": "Intentionally complicated message type to cover many features of Protobuf.",
"title": "A bit of everything",
"externalDocs": {
"description": "Find out more about ABitOfEverything",
"url": "https://github.com/grpc-ecosystem/grpc-gateway"
},
"required": [
+ "uuid",
"int64Value",
"doubleValue",
+ "required_field_schema_json_name_custom",
"floatValue",
- "requiredStringViaFieldBehaviorAnnotation"
- ]
+ "requiredStringViaFieldBehaviorAnnotation",
+ "requiredStringField1",
+ "requiredStringField2",
+ "required_field_behavior_json_name_custom"
+ ],
+ "x-a-bit-of-everything-foo": "bar"
}
}
],
@@ -2111,240 +4983,55 @@
]
}
},
- "/v1/example/a_bit_of_everything_repeated/{pathRepeatedFloatValue}/{pathRepeatedDoubleValue}/{pathRepeatedInt64Value}/{pathRepeatedUint64Value}/{pathRepeatedInt32Value}/{pathRepeatedFixed64Value}/{pathRepeatedFixed32Value}/{pathRepeatedBoolValue}/{pathRepeatedStringValue}/{pathRepeatedBytesValue}/{pathRepeatedUint32Value}/{pathRepeatedEnumValue}/{pathRepeatedSfixed32Value}/{pathRepeatedSfixed64Value}/{pathRepeatedSint32Value}/{pathRepeatedSint64Value}": {
- "get": {
- "operationId": "ABitOfEverythingService_GetRepeatedQuery",
- "responses": {
- "200": {
- "description": "A successful response.",
- "schema": {
- "$ref": "#/definitions/examplepbABitOfEverythingRepeated"
- }
- },
- "403": {
- "description": "Returned when the user does not have permission to access the resource.",
- "schema": {}
- },
- "404": {
- "description": "Returned when the resource does not exist.",
- "schema": {
- "type": "string",
- "format": "string"
- }
- },
- "418": {
- "description": "I'm a teapot.",
- "schema": {
- "$ref": "#/definitions/examplepbNumericEnum"
- }
- },
- "500": {
- "description": "Server error",
- "schema": {
- "$ref": "#/definitions/examplepbErrorResponse"
- }
- },
- "default": {
- "description": "An unexpected error response.",
- "schema": {
- "$ref": "#/definitions/rpcStatus"
- }
- }
- },
- "parameters": [
- {
- "name": "pathRepeatedFloatValue",
- "description": "repeated values. they are comma-separated in path",
- "in": "path",
- "required": true,
- "type": "array",
- "items": {
- "type": "number",
- "format": "float"
- },
- "collectionFormat": "csv",
- "minItems": 1
- },
- {
- "name": "pathRepeatedDoubleValue",
- "in": "path",
- "required": true,
- "type": "array",
- "items": {
- "type": "number",
- "format": "double"
- },
- "collectionFormat": "csv",
- "minItems": 1
- },
- {
- "name": "pathRepeatedInt64Value",
- "in": "path",
- "required": true,
- "type": "array",
- "items": {
- "type": "string",
- "format": "int64"
- },
- "collectionFormat": "csv",
- "minItems": 1
- },
- {
- "name": "pathRepeatedUint64Value",
- "in": "path",
- "required": true,
- "type": "array",
- "items": {
- "type": "string",
- "format": "uint64"
- },
- "collectionFormat": "csv",
- "minItems": 1
- },
- {
- "name": "pathRepeatedInt32Value",
- "in": "path",
- "required": true,
- "type": "array",
- "items": {
- "type": "integer",
- "format": "int32"
- },
- "collectionFormat": "csv",
- "minItems": 1
- },
- {
- "name": "pathRepeatedFixed64Value",
- "in": "path",
- "required": true,
- "type": "array",
- "items": {
- "type": "string",
- "format": "uint64"
- },
- "collectionFormat": "csv",
- "minItems": 1
- },
- {
- "name": "pathRepeatedFixed32Value",
- "in": "path",
- "required": true,
- "type": "array",
- "items": {
- "type": "integer",
- "format": "int64"
- },
- "collectionFormat": "csv",
- "minItems": 1
- },
- {
- "name": "pathRepeatedBoolValue",
- "in": "path",
- "required": true,
- "type": "array",
- "items": {
- "type": "boolean"
- },
- "collectionFormat": "csv",
- "minItems": 1
- },
- {
- "name": "pathRepeatedStringValue",
- "in": "path",
- "required": true,
- "type": "array",
- "items": {
- "type": "string"
- },
- "collectionFormat": "csv",
- "minItems": 1
- },
- {
- "name": "pathRepeatedBytesValue",
- "in": "path",
- "required": true,
- "type": "array",
- "items": {
- "type": "string",
- "format": "byte"
- },
- "collectionFormat": "csv",
- "minItems": 1
- },
- {
- "name": "pathRepeatedUint32Value",
- "in": "path",
- "required": true,
- "type": "array",
- "items": {
- "type": "integer",
- "format": "int64"
- },
- "collectionFormat": "csv",
- "minItems": 1
- },
- {
- "name": "pathRepeatedEnumValue",
- "in": "path",
- "required": true,
- "type": "array",
- "items": {
- "type": "string",
- "enum": [
- "ZERO",
- "ONE"
- ]
- },
- "collectionFormat": "csv",
- "minItems": 1
- },
- {
- "name": "pathRepeatedSfixed32Value",
- "in": "path",
- "required": true,
- "type": "array",
- "items": {
- "type": "integer",
- "format": "int32"
- },
- "collectionFormat": "csv",
- "minItems": 1
+ "/v1/example/oneofenum": {
+ "post": {
+ "operationId": "ABitOfEverythingService_PostOneofEnum",
+ "responses": {
+ "200": {
+ "description": "A successful response.",
+ "schema": {
+ "type": "object",
+ "properties": {}
+ }
},
- {
- "name": "pathRepeatedSfixed64Value",
- "in": "path",
- "required": true,
- "type": "array",
- "items": {
+ "403": {
+ "description": "Returned when the user does not have permission to access the resource.",
+ "schema": {}
+ },
+ "404": {
+ "description": "Returned when the resource does not exist.",
+ "schema": {
"type": "string",
- "format": "int64"
- },
- "collectionFormat": "csv",
- "minItems": 1
+ "format": "string"
+ }
},
- {
- "name": "pathRepeatedSint32Value",
- "in": "path",
- "required": true,
- "type": "array",
- "items": {
- "type": "integer",
- "format": "int32"
- },
- "collectionFormat": "csv",
- "minItems": 1
+ "418": {
+ "description": "I'm a teapot.",
+ "schema": {
+ "$ref": "#/definitions/examplepbNumericEnum"
+ }
+ },
+ "500": {
+ "description": "Server error",
+ "schema": {
+ "$ref": "#/definitions/examplepbErrorResponse"
+ }
},
+ "default": {
+ "description": "An unexpected error response.",
+ "schema": {
+ "$ref": "#/definitions/rpcStatus"
+ }
+ }
+ },
+ "parameters": [
{
- "name": "pathRepeatedSint64Value",
- "in": "path",
+ "name": "exampleEnum",
+ "in": "body",
"required": true,
- "type": "array",
- "items": {
- "type": "string",
- "format": "int64"
- },
- "collectionFormat": "csv",
- "minItems": 1
+ "schema": {
+ "$ref": "#/definitions/oneofenumExampleEnum"
+ }
}
],
"tags": [
@@ -2352,14 +5039,15 @@
]
}
},
- "/v1/example/checkStatus": {
- "get": {
- "operationId": "ABitOfEverythingService_CheckStatus",
+ "/v1/example/requiredmessagetype": {
+ "post": {
+ "operationId": "ABitOfEverythingService_PostRequiredMessageType",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
- "$ref": "#/definitions/examplepbCheckStatusResponse"
+ "type": "object",
+ "properties": {}
}
},
"403": {
@@ -2392,19 +5080,29 @@
}
}
},
+ "parameters": [
+ {
+ "name": "body",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/examplepbRequiredMessageTypeRequest"
+ }
+ }
+ ],
"tags": [
"ABitOfEverythingService"
]
}
},
- "/v1/example/deep_path/{singleNested.name}": {
- "post": {
- "operationId": "ABitOfEverythingService_DeepPathEcho",
+ "/v1/example/snake/{who}/{what}/{where}": {
+ "get": {
+ "operationId": "SnakeEnumService_SnakeEnum",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
- "$ref": "#/definitions/examplepbABitOfEverything"
+ "$ref": "#/definitions/examplepbSnakeEnumResponse"
}
},
"403": {
@@ -2439,27 +5137,42 @@
},
"parameters": [
{
- "name": "singleNested.name",
- "description": "name is nested field.",
+ "name": "who",
"in": "path",
"required": true,
- "type": "string"
+ "type": "string",
+ "enum": [
+ "value_e",
+ "value_f"
+ ]
},
{
- "name": "body",
- "in": "body",
+ "name": "what",
+ "in": "path",
"required": true,
- "schema": {
- "$ref": "#/definitions/examplepbABitOfEverything"
- }
+ "type": "string",
+ "enum": [
+ "value_c",
+ "value_d"
+ ]
+ },
+ {
+ "name": "where",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "enum": [
+ "value_x",
+ "value_y"
+ ]
}
],
"tags": [
- "ABitOfEverythingService"
+ "SnakeEnumService"
]
}
},
- "/v1/{book.name=publishers/*/books/*}": {
+ "/v1/{book.name}": {
"patch": {
"operationId": "ABitOfEverythingService_UpdateBook",
"responses": {
@@ -2505,15 +5218,31 @@
"description": "The resource name of the book.\n\nFormat: `publishers/{publisher}/books/{book}`\n\nExample: `publishers/1257894000000000000/books/my-book`",
"in": "path",
"required": true,
- "type": "string"
+ "type": "string",
+ "pattern": "publishers/[^/]+/books/[^/]+"
},
{
- "name": "body",
+ "name": "book",
"description": "The book to update.\n\nThe book's `name` field is used to identify the book to be updated.\nFormat: publishers/{publisher}/books/{book}",
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/examplepbBook"
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Output only. The book's ID.",
+ "readOnly": true
+ },
+ "createTime": {
+ "type": "string",
+ "format": "date-time",
+ "description": "Output only. Creation time of the book.",
+ "readOnly": true
+ }
+ },
+ "description": "The book's `name` field is used to identify the book to be updated.\nFormat: publishers/{publisher}/books/{book}",
+ "title": "The book to update."
}
},
{
@@ -2536,7 +5265,7 @@
]
}
},
- "/v1/{parent=publishers/*}/books": {
+ "/v1/{parent}/books": {
"post": {
"summary": "Create a book.",
"operationId": "ABitOfEverythingService_CreateBook",
@@ -2583,10 +5312,11 @@
"description": "The publisher in which to create the book.\n\nFormat: `publishers/{publisher}`\n\nExample: `publishers/1257894000000000000`",
"in": "path",
"required": true,
- "type": "string"
+ "type": "string",
+ "pattern": "publishers/[^/]+"
},
{
- "name": "body",
+ "name": "book",
"description": "The book to create.",
"in": "body",
"required": true,
@@ -2607,13 +5337,14 @@
]
}
},
- "/v2/example/a_bit_of_everything/{abe.uuid}": {
+ "/v2/example/a_bit_of_everything/{uuidName}": {
"put": {
"operationId": "ABitOfEverythingService_UpdateV2",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
+ "type": "object",
"properties": {}
}
},
@@ -2649,17 +5380,261 @@
},
"parameters": [
{
- "name": "abe.uuid",
+ "name": "uuidName",
"in": "path",
"required": true,
- "type": "string"
+ "type": "string",
+ "x-internal": true
},
{
- "name": "body",
+ "name": "abe",
+ "description": "A bit of everything\n\nIntentionally complicated message type to cover many features of Protobuf.",
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/examplepbABitOfEverything"
+ "type": "object",
+ "example": {
+ "int64_value": 12,
+ "double_value": 12.3
+ },
+ "properties": {
+ "singleNested": {
+ "$ref": "#/definitions/ABitOfEverythingNested"
+ },
+ "nested": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/ABitOfEverythingNested"
+ }
+ },
+ "floatValue": {
+ "type": "number",
+ "format": "float",
+ "default": "0.2",
+ "description": "Float value field"
+ },
+ "doubleValue": {
+ "type": "number",
+ "format": "double"
+ },
+ "int64Value": {
+ "type": "string",
+ "format": "int64"
+ },
+ "uint64Value": {
+ "type": "string",
+ "format": "uint64"
+ },
+ "int32Value": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "fixed64Value": {
+ "type": "string",
+ "format": "uint64"
+ },
+ "fixed32Value": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "boolValue": {
+ "type": "boolean"
+ },
+ "stringValue": {
+ "type": "string"
+ },
+ "bytesValue": {
+ "type": "string",
+ "format": "byte"
+ },
+ "uint32Value": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "enumValue": {
+ "$ref": "#/definitions/examplepbNumericEnum"
+ },
+ "pathEnumValue": {
+ "$ref": "#/definitions/pathenumPathEnum"
+ },
+ "nestedPathEnumValue": {
+ "$ref": "#/definitions/MessagePathEnumNestedPathEnum"
+ },
+ "sfixed32Value": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "sfixed64Value": {
+ "type": "string",
+ "format": "int64"
+ },
+ "sint32Value": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "sint64Value": {
+ "type": "string",
+ "format": "int64"
+ },
+ "repeatedStringValue": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "oneofEmpty": {
+ "type": "object",
+ "properties": {}
+ },
+ "oneofString": {
+ "type": "string"
+ },
+ "mapValue": {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/definitions/examplepbNumericEnum"
+ }
+ },
+ "mappedStringValue": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ "mappedNestedValue": {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/definitions/ABitOfEverythingNested"
+ }
+ },
+ "nonConventionalNameValue": {
+ "type": "string"
+ },
+ "timestampValue": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "repeatedEnumValue": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/examplepbNumericEnum"
+ },
+ "title": "repeated enum value. it is comma-separated in query"
+ },
+ "repeatedEnumAnnotation": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/examplepbNumericEnum"
+ },
+ "description": "Repeated numeric enum description.",
+ "title": "Repeated numeric enum title"
+ },
+ "enumValueAnnotation": {
+ "$ref": "#/definitions/examplepbNumericEnum",
+ "description": "Numeric enum description.",
+ "title": "Numeric enum title"
+ },
+ "repeatedStringAnnotation": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "Repeated string description.",
+ "title": "Repeated string title"
+ },
+ "repeatedNestedAnnotation": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/ABitOfEverythingNested"
+ },
+ "description": "Repeated nested object description.",
+ "title": "Repeated nested object title"
+ },
+ "nestedAnnotation": {
+ "$ref": "#/definitions/ABitOfEverythingNested",
+ "description": "Nested object description.",
+ "title": "Nested object title"
+ },
+ "int64OverrideType": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "requiredStringViaFieldBehaviorAnnotation": {
+ "type": "string",
+ "title": "mark a field as required in Open API definition"
+ },
+ "outputOnlyStringViaFieldBehaviorAnnotation": {
+ "type": "string",
+ "title": "mark a field as readonly in Open API definition",
+ "readOnly": true
+ },
+ "optionalStringValue": {
+ "type": "string"
+ },
+ "productId": {
+ "type": "array",
+ "items": {
+ "type": "string",
+ "maxLength": 19,
+ "minLength": 1,
+ "pattern": "^[0-9]+$"
+ },
+ "description": "Only digits are allowed.",
+ "title": "Test openapiv2 generation of repeated fields"
+ },
+ "optionalStringField": {
+ "type": "string",
+ "title": "Test openapiv2 generation of required fields with annotation and jsonschema to reproduce"
+ },
+ "requiredStringField1": {
+ "type": "string"
+ },
+ "requiredStringField2": {
+ "type": "string"
+ },
+ "required_field_behavior_json_name_custom": {
+ "type": "string",
+ "title": "Test openapiv2 handling of required json_name fields"
+ },
+ "required_field_schema_json_name_custom": {
+ "type": "string"
+ },
+ "trailingOnly": {
+ "type": "string",
+ "title": "Trailing only"
+ },
+ "trailingOnlyDot": {
+ "type": "string",
+ "description": "Trailing only dot."
+ },
+ "trailingBoth": {
+ "type": "string",
+ "description": "Trailing both.",
+ "title": "Leading both"
+ },
+ "trailingMultiline": {
+ "type": "string",
+ "description": "This is an example of a multi-line comment.\n\nTrailing multiline.",
+ "title": "Leading multiline"
+ }
+ },
+ "description": "Intentionally complicated message type to cover many features of Protobuf.",
+ "title": "A bit of everything",
+ "externalDocs": {
+ "description": "Find out more about ABitOfEverything",
+ "url": "https://github.com/grpc-ecosystem/grpc-gateway"
+ },
+ "required": [
+ "int64Value",
+ "doubleValue",
+ "required_field_schema_json_name_custom",
+ "floatValue",
+ "requiredStringViaFieldBehaviorAnnotation",
+ "requiredStringField1",
+ "requiredStringField2",
+ "required_field_behavior_json_name_custom"
+ ],
+ "x-a-bit-of-everything-foo": "bar"
}
},
{
@@ -2680,6 +5655,7 @@
"200": {
"description": "A successful response.",
"schema": {
+ "type": "object",
"properties": {}
}
},
@@ -2715,17 +5691,261 @@
},
"parameters": [
{
- "name": "abe.uuid",
+ "name": "uuidName",
"in": "path",
"required": true,
- "type": "string"
+ "type": "string",
+ "x-internal": true
},
{
- "name": "body",
+ "name": "abe",
+ "description": "A bit of everything\n\nIntentionally complicated message type to cover many features of Protobuf.",
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/examplepbABitOfEverything"
+ "type": "object",
+ "example": {
+ "int64_value": 12,
+ "double_value": 12.3
+ },
+ "properties": {
+ "singleNested": {
+ "$ref": "#/definitions/ABitOfEverythingNested"
+ },
+ "nested": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/ABitOfEverythingNested"
+ }
+ },
+ "floatValue": {
+ "type": "number",
+ "format": "float",
+ "default": "0.2",
+ "description": "Float value field"
+ },
+ "doubleValue": {
+ "type": "number",
+ "format": "double"
+ },
+ "int64Value": {
+ "type": "string",
+ "format": "int64"
+ },
+ "uint64Value": {
+ "type": "string",
+ "format": "uint64"
+ },
+ "int32Value": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "fixed64Value": {
+ "type": "string",
+ "format": "uint64"
+ },
+ "fixed32Value": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "boolValue": {
+ "type": "boolean"
+ },
+ "stringValue": {
+ "type": "string"
+ },
+ "bytesValue": {
+ "type": "string",
+ "format": "byte"
+ },
+ "uint32Value": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "enumValue": {
+ "$ref": "#/definitions/examplepbNumericEnum"
+ },
+ "pathEnumValue": {
+ "$ref": "#/definitions/pathenumPathEnum"
+ },
+ "nestedPathEnumValue": {
+ "$ref": "#/definitions/MessagePathEnumNestedPathEnum"
+ },
+ "sfixed32Value": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "sfixed64Value": {
+ "type": "string",
+ "format": "int64"
+ },
+ "sint32Value": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "sint64Value": {
+ "type": "string",
+ "format": "int64"
+ },
+ "repeatedStringValue": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "oneofEmpty": {
+ "type": "object",
+ "properties": {}
+ },
+ "oneofString": {
+ "type": "string"
+ },
+ "mapValue": {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/definitions/examplepbNumericEnum"
+ }
+ },
+ "mappedStringValue": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ "mappedNestedValue": {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/definitions/ABitOfEverythingNested"
+ }
+ },
+ "nonConventionalNameValue": {
+ "type": "string"
+ },
+ "timestampValue": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "repeatedEnumValue": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/examplepbNumericEnum"
+ },
+ "title": "repeated enum value. it is comma-separated in query"
+ },
+ "repeatedEnumAnnotation": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/examplepbNumericEnum"
+ },
+ "description": "Repeated numeric enum description.",
+ "title": "Repeated numeric enum title"
+ },
+ "enumValueAnnotation": {
+ "$ref": "#/definitions/examplepbNumericEnum",
+ "description": "Numeric enum description.",
+ "title": "Numeric enum title"
+ },
+ "repeatedStringAnnotation": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "Repeated string description.",
+ "title": "Repeated string title"
+ },
+ "repeatedNestedAnnotation": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/ABitOfEverythingNested"
+ },
+ "description": "Repeated nested object description.",
+ "title": "Repeated nested object title"
+ },
+ "nestedAnnotation": {
+ "$ref": "#/definitions/ABitOfEverythingNested",
+ "description": "Nested object description.",
+ "title": "Nested object title"
+ },
+ "int64OverrideType": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "requiredStringViaFieldBehaviorAnnotation": {
+ "type": "string",
+ "title": "mark a field as required in Open API definition"
+ },
+ "outputOnlyStringViaFieldBehaviorAnnotation": {
+ "type": "string",
+ "title": "mark a field as readonly in Open API definition",
+ "readOnly": true
+ },
+ "optionalStringValue": {
+ "type": "string"
+ },
+ "productId": {
+ "type": "array",
+ "items": {
+ "type": "string",
+ "maxLength": 19,
+ "minLength": 1,
+ "pattern": "^[0-9]+$"
+ },
+ "description": "Only digits are allowed.",
+ "title": "Test openapiv2 generation of repeated fields"
+ },
+ "optionalStringField": {
+ "type": "string",
+ "title": "Test openapiv2 generation of required fields with annotation and jsonschema to reproduce"
+ },
+ "requiredStringField1": {
+ "type": "string"
+ },
+ "requiredStringField2": {
+ "type": "string"
+ },
+ "required_field_behavior_json_name_custom": {
+ "type": "string",
+ "title": "Test openapiv2 handling of required json_name fields"
+ },
+ "required_field_schema_json_name_custom": {
+ "type": "string"
+ },
+ "trailingOnly": {
+ "type": "string",
+ "title": "Trailing only"
+ },
+ "trailingOnlyDot": {
+ "type": "string",
+ "description": "Trailing only dot."
+ },
+ "trailingBoth": {
+ "type": "string",
+ "description": "Trailing both.",
+ "title": "Leading both"
+ },
+ "trailingMultiline": {
+ "type": "string",
+ "description": "This is an example of a multi-line comment.\n\nTrailing multiline.",
+ "title": "Leading multiline"
+ }
+ },
+ "description": "Intentionally complicated message type to cover many features of Protobuf.",
+ "title": "A bit of everything",
+ "externalDocs": {
+ "description": "Find out more about ABitOfEverything",
+ "url": "https://github.com/grpc-ecosystem/grpc-gateway"
+ },
+ "required": [
+ "int64Value",
+ "doubleValue",
+ "required_field_schema_json_name_custom",
+ "floatValue",
+ "requiredStringViaFieldBehaviorAnnotation",
+ "requiredStringField1",
+ "requiredStringField2",
+ "required_field_behavior_json_name_custom"
+ ],
+ "x-a-bit-of-everything-foo": "bar"
}
},
{
@@ -2862,7 +6082,7 @@
},
"parameters": [
{
- "name": "body",
+ "name": "value",
"in": "body",
"required": true,
"schema": {
@@ -2886,6 +6106,7 @@
"200": {
"description": "A successful response.",
"schema": {
+ "type": "object",
"properties": {}
}
},
@@ -2931,6 +6152,53 @@
"200": {
"description": "A successful response.",
"schema": {
+ "type": "object",
+ "properties": {}
+ }
+ },
+ "403": {
+ "description": "Returned when the user does not have permission to access the resource.",
+ "schema": {}
+ },
+ "404": {
+ "description": "Returned when the resource does not exist.",
+ "schema": {
+ "type": "string",
+ "format": "string"
+ }
+ },
+ "418": {
+ "description": "I'm a teapot.",
+ "schema": {
+ "$ref": "#/definitions/examplepbNumericEnum"
+ }
+ },
+ "500": {
+ "description": "Server error",
+ "schema": {
+ "$ref": "#/definitions/examplepbErrorResponse"
+ }
+ },
+ "default": {
+ "description": "An unexpected error response.",
+ "schema": {
+ "$ref": "#/definitions/rpcStatus"
+ }
+ }
+ },
+ "tags": [
+ "ABitOfEverythingService"
+ ]
+ }
+ },
+ "/v2/example/overwriterequestcontenttype": {
+ "post": {
+ "operationId": "ABitOfEverythingService_OverwriteRequestContentType",
+ "responses": {
+ "200": {
+ "description": "A successful response.",
+ "schema": {
+ "type": "object",
"properties": {}
}
},
@@ -2964,8 +6232,21 @@
}
}
},
+ "parameters": [
+ {
+ "name": "body",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/examplepbBody"
+ }
+ }
+ ],
"tags": [
"ABitOfEverythingService"
+ ],
+ "consumes": [
+ "application/x-bar-mime"
]
}
},
@@ -3024,6 +6305,7 @@
"200": {
"description": "A successful response.",
"schema": {
+ "type": "object",
"properties": {}
}
},
@@ -3085,6 +6367,7 @@
"200": {
"description": "A successful response.",
"schema": {
+ "type": "object",
"properties": {}
}
},
@@ -3130,6 +6413,7 @@
"200": {
"description": "A successful response.",
"schema": {
+ "type": "object",
"properties": {}
}
},
@@ -3171,7 +6455,7 @@
"type": "string"
},
{
- "name": "body",
+ "name": "data",
"in": "body",
"required": true,
"schema": {
@@ -3186,11 +6470,12 @@
},
"/v2/{value}:check": {
"get": {
- "operationId": "ABitOfEverythingService_CheckExternalNestedPathEnum",
+ "operationId": "ABitOfEverythingService_CheckExternalPathEnum",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
+ "type": "object",
"properties": {}
}
},
@@ -3231,8 +6516,8 @@
"required": true,
"type": "string",
"enum": [
- "GHI",
- "JKL"
+ "ABC",
+ "DEF"
]
}
],
@@ -3241,13 +6526,14 @@
]
}
},
- "/v2a/example/a_bit_of_everything/{abe.uuid}": {
+ "/v2a/example/a_bit_of_everything/{uuidName}": {
"patch": {
"operationId": "ABitOfEverythingService_UpdateV23",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
+ "type": "object",
"properties": {}
}
},
@@ -3283,19 +6569,330 @@
},
"parameters": [
{
- "name": "abe.uuid",
+ "name": "uuidName",
"in": "path",
"required": true,
- "type": "string"
+ "type": "string",
+ "x-internal": true
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/examplepbUpdateV2Request"
+ "type": "object",
+ "properties": {
+ "abe": {
+ "type": "object",
+ "example": {
+ "int64_value": 12,
+ "double_value": 12.3
+ },
+ "properties": {
+ "singleNested": {
+ "$ref": "#/definitions/ABitOfEverythingNested"
+ },
+ "nested": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/ABitOfEverythingNested"
+ }
+ },
+ "floatValue": {
+ "type": "number",
+ "format": "float",
+ "default": "0.2",
+ "description": "Float value field"
+ },
+ "doubleValue": {
+ "type": "number",
+ "format": "double"
+ },
+ "int64Value": {
+ "type": "string",
+ "format": "int64"
+ },
+ "uint64Value": {
+ "type": "string",
+ "format": "uint64"
+ },
+ "int32Value": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "fixed64Value": {
+ "type": "string",
+ "format": "uint64"
+ },
+ "fixed32Value": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "boolValue": {
+ "type": "boolean"
+ },
+ "stringValue": {
+ "type": "string"
+ },
+ "bytesValue": {
+ "type": "string",
+ "format": "byte"
+ },
+ "uint32Value": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "enumValue": {
+ "$ref": "#/definitions/examplepbNumericEnum"
+ },
+ "pathEnumValue": {
+ "$ref": "#/definitions/pathenumPathEnum"
+ },
+ "nestedPathEnumValue": {
+ "$ref": "#/definitions/MessagePathEnumNestedPathEnum"
+ },
+ "sfixed32Value": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "sfixed64Value": {
+ "type": "string",
+ "format": "int64"
+ },
+ "sint32Value": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "sint64Value": {
+ "type": "string",
+ "format": "int64"
+ },
+ "repeatedStringValue": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "oneofEmpty": {
+ "type": "object",
+ "properties": {}
+ },
+ "oneofString": {
+ "type": "string"
+ },
+ "mapValue": {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/definitions/examplepbNumericEnum"
+ }
+ },
+ "mappedStringValue": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ "mappedNestedValue": {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/definitions/ABitOfEverythingNested"
+ }
+ },
+ "nonConventionalNameValue": {
+ "type": "string"
+ },
+ "timestampValue": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "repeatedEnumValue": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/examplepbNumericEnum"
+ },
+ "title": "repeated enum value. it is comma-separated in query"
+ },
+ "repeatedEnumAnnotation": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/examplepbNumericEnum"
+ },
+ "description": "Repeated numeric enum description.",
+ "title": "Repeated numeric enum title"
+ },
+ "enumValueAnnotation": {
+ "$ref": "#/definitions/examplepbNumericEnum",
+ "description": "Numeric enum description.",
+ "title": "Numeric enum title"
+ },
+ "repeatedStringAnnotation": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "Repeated string description.",
+ "title": "Repeated string title"
+ },
+ "repeatedNestedAnnotation": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/ABitOfEverythingNested"
+ },
+ "description": "Repeated nested object description.",
+ "title": "Repeated nested object title"
+ },
+ "nestedAnnotation": {
+ "$ref": "#/definitions/ABitOfEverythingNested",
+ "description": "Nested object description.",
+ "title": "Nested object title"
+ },
+ "int64OverrideType": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "requiredStringViaFieldBehaviorAnnotation": {
+ "type": "string",
+ "title": "mark a field as required in Open API definition"
+ },
+ "outputOnlyStringViaFieldBehaviorAnnotation": {
+ "type": "string",
+ "title": "mark a field as readonly in Open API definition",
+ "readOnly": true
+ },
+ "optionalStringValue": {
+ "type": "string"
+ },
+ "productId": {
+ "type": "array",
+ "items": {
+ "type": "string",
+ "maxLength": 19,
+ "minLength": 1,
+ "pattern": "^[0-9]+$"
+ },
+ "description": "Only digits are allowed.",
+ "title": "Test openapiv2 generation of repeated fields"
+ },
+ "optionalStringField": {
+ "type": "string",
+ "title": "Test openapiv2 generation of required fields with annotation and jsonschema to reproduce"
+ },
+ "requiredStringField1": {
+ "type": "string"
+ },
+ "requiredStringField2": {
+ "type": "string"
+ },
+ "required_field_behavior_json_name_custom": {
+ "type": "string",
+ "title": "Test openapiv2 handling of required json_name fields"
+ },
+ "required_field_schema_json_name_custom": {
+ "type": "string"
+ },
+ "trailingOnly": {
+ "type": "string",
+ "title": "Trailing only"
+ },
+ "trailingOnlyDot": {
+ "type": "string",
+ "description": "Trailing only dot."
+ },
+ "trailingBoth": {
+ "type": "string",
+ "description": "Trailing both.",
+ "title": "Leading both"
+ },
+ "trailingMultiline": {
+ "type": "string",
+ "description": "This is an example of a multi-line comment.\n\nTrailing multiline.",
+ "title": "Leading multiline"
+ }
+ },
+ "description": "Intentionally complicated message type to cover many features of Protobuf.",
+ "title": "A bit of everything",
+ "externalDocs": {
+ "description": "Find out more about ABitOfEverything",
+ "url": "https://github.com/grpc-ecosystem/grpc-gateway"
+ },
+ "x-a-bit-of-everything-foo": "bar"
+ },
+ "updateMask": {
+ "type": "string",
+ "description": "The paths to update."
+ }
+ },
+ "title": "UpdateV2Request request for update includes the message and the update mask",
+ "required": [
+ "int64Value",
+ "doubleValue",
+ "required_field_schema_json_name_custom",
+ "floatValue",
+ "requiredStringViaFieldBehaviorAnnotation",
+ "requiredStringField1",
+ "requiredStringField2",
+ "required_field_behavior_json_name_custom"
+ ]
+ }
+ }
+ ],
+ "tags": [
+ "ABitOfEverythingService"
+ ]
+ }
+ },
+ "/v3/{value}:check": {
+ "get": {
+ "operationId": "ABitOfEverythingService_CheckExternalNestedPathEnum",
+ "responses": {
+ "200": {
+ "description": "A successful response.",
+ "schema": {
+ "type": "object",
+ "properties": {}
+ }
+ },
+ "403": {
+ "description": "Returned when the user does not have permission to access the resource.",
+ "schema": {}
+ },
+ "404": {
+ "description": "Returned when the resource does not exist.",
+ "schema": {
+ "type": "string",
+ "format": "string"
+ }
+ },
+ "418": {
+ "description": "I'm a teapot.",
+ "schema": {
+ "$ref": "#/definitions/examplepbNumericEnum"
+ }
+ },
+ "500": {
+ "description": "Server error",
+ "schema": {
+ "$ref": "#/definitions/examplepbErrorResponse"
+ }
+ },
+ "default": {
+ "description": "An unexpected error response.",
+ "schema": {
+ "$ref": "#/definitions/rpcStatus"
}
}
+ },
+ "parameters": [
+ {
+ "name": "value",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "enum": [
+ "GHI",
+ "JKL"
+ ]
+ }
],
"tags": [
"ABitOfEverythingService"
@@ -3355,7 +6952,8 @@
"uuid": {
"type": "string",
"minLength": 1,
- "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}"
+ "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}",
+ "x-internal": true
},
"nested": {
"type": "array",
@@ -3367,10 +6965,7 @@
"type": "number",
"format": "float",
"default": "0.2",
- "description": "Float value field",
- "required": [
- "float_value"
- ]
+ "description": "Float value field"
},
"doubleValue": {
"type": "number",
@@ -3442,6 +7037,7 @@
}
},
"oneofEmpty": {
+ "type": "object",
"properties": {}
},
"oneofString": {
@@ -3519,10 +7115,7 @@
},
"requiredStringViaFieldBehaviorAnnotation": {
"type": "string",
- "title": "mark a field as required in Open API definition",
- "required": [
- "required_string_via_field_behavior_annotation"
- ]
+ "title": "mark a field as required in Open API definition"
},
"outputOnlyStringViaFieldBehaviorAnnotation": {
"type": "string",
@@ -3531,9 +7124,55 @@
},
"optionalStringValue": {
"type": "string"
+ },
+ "productId": {
+ "type": "array",
+ "items": {
+ "type": "string",
+ "maxLength": 19,
+ "minLength": 1,
+ "pattern": "^[0-9]+$"
+ },
+ "description": "Only digits are allowed.",
+ "title": "Test openapiv2 generation of repeated fields"
+ },
+ "optionalStringField": {
+ "type": "string",
+ "title": "Test openapiv2 generation of required fields with annotation and jsonschema to reproduce"
+ },
+ "requiredStringField1": {
+ "type": "string"
+ },
+ "requiredStringField2": {
+ "type": "string"
+ },
+ "required_field_behavior_json_name_custom": {
+ "type": "string",
+ "title": "Test openapiv2 handling of required json_name fields"
+ },
+ "required_field_schema_json_name_custom": {
+ "type": "string"
+ },
+ "trailingOnly": {
+ "type": "string",
+ "title": "Trailing only"
+ },
+ "trailingOnlyDot": {
+ "type": "string",
+ "description": "Trailing only dot."
+ },
+ "trailingBoth": {
+ "type": "string",
+ "description": "Trailing both.",
+ "title": "Leading both"
+ },
+ "trailingMultiline": {
+ "type": "string",
+ "description": "This is an example of a multi-line comment.\n\nTrailing multiline.",
+ "title": "Leading multiline"
}
},
- "description": "Intentionaly complicated message type to cover many features of Protobuf.",
+ "description": "Intentionally complicated message type to cover many features of Protobuf.",
"title": "A bit of everything",
"externalDocs": {
"description": "Find out more about ABitOfEverything",
@@ -3543,9 +7182,14 @@
"uuid",
"int64Value",
"doubleValue",
+ "required_field_schema_json_name_custom",
"floatValue",
- "requiredStringViaFieldBehaviorAnnotation"
- ]
+ "requiredStringViaFieldBehaviorAnnotation",
+ "requiredStringField1",
+ "requiredStringField2",
+ "required_field_behavior_json_name_custom"
+ ],
+ "x-a-bit-of-everything-foo": "bar"
},
"examplepbABitOfEverythingRepeated": {
"type": "object",
@@ -3676,6 +7320,17 @@
},
"title": "ABitOfEverythingRepeated is used to validate repeated path parameter functionality"
},
+ "examplepbBar": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "id"
+ ]
+ },
"examplepbBody": {
"type": "object",
"properties": {
@@ -3747,6 +7402,17 @@
}
}
},
+ "examplepbFoo": {
+ "type": "object",
+ "properties": {
+ "bar": {
+ "$ref": "#/definitions/examplepbBar"
+ }
+ },
+ "required": [
+ "bar"
+ ]
+ },
"examplepbNumericEnum": {
"type": "string",
"enum": [
@@ -3756,18 +7422,52 @@
"default": "ZERO",
"description": "NumericEnum is one or zero.\n\n - ZERO: ZERO means 0\n - ONE: ONE means 1"
},
- "examplepbUpdateV2Request": {
+ "examplepbRequiredMessageTypeRequest": {
"type": "object",
"properties": {
- "abe": {
- "$ref": "#/definitions/examplepbABitOfEverything"
+ "id": {
+ "type": "string"
},
- "updateMask": {
- "type": "string",
- "description": "The paths to update."
+ "foo": {
+ "$ref": "#/definitions/examplepbFoo"
}
},
- "title": "UpdateV2Request request for update includes the message and the update mask"
+ "title": "Required message type -\u003e OpenAPI\nhttps://github.com/grpc-ecosystem/grpc-gateway/issues/2837",
+ "required": [
+ "id",
+ "foo"
+ ]
+ },
+ "examplepbSnakeEnumResponse": {
+ "type": "object"
+ },
+ "examplepbsnake_case_0_enum": {
+ "type": "string",
+ "enum": [
+ "value_e",
+ "value_f"
+ ],
+ "default": "value_e",
+ "description": "- value_e: buf:lint:ignore ENUM_VALUE_UPPER_SNAKE_CASE\n - value_f: buf:lint:ignore ENUM_VALUE_UPPER_SNAKE_CASE",
+ "title": "Ignoring lint warnings as this enum type exist to validate proper functionality\nfor projects that don't follow these lint rules.\nbuf:lint:ignore ENUM_PASCAL_CASE"
+ },
+ "examplepbsnake_case_enum": {
+ "type": "string",
+ "enum": [
+ "value_c",
+ "value_d"
+ ],
+ "default": "value_c",
+ "description": "- value_c: buf:lint:ignore ENUM_VALUE_UPPER_SNAKE_CASE\n - value_d: buf:lint:ignore ENUM_VALUE_UPPER_SNAKE_CASE",
+ "title": "Ignoring lint warnings as this enum type exist to validate proper functionality\nfor projects that don't follow these lint rules.\nbuf:lint:ignore ENUM_PASCAL_CASE"
+ },
+ "oneofenumExampleEnum": {
+ "type": "string",
+ "enum": [
+ "EXAMPLE_ENUM_UNSPECIFIED",
+ "EXAMPLE_ENUM_FIRST"
+ ],
+ "default": "EXAMPLE_ENUM_UNSPECIFIED"
},
"pathenumPathEnum": {
"type": "string",
@@ -3777,20 +7477,26 @@
],
"default": "ABC"
},
+ "pathenumsnake_case_for_import": {
+ "type": "string",
+ "enum": [
+ "value_x",
+ "value_y"
+ ],
+ "default": "value_x",
+ "description": "- value_x: buf:lint:ignore ENUM_VALUE_UPPER_SNAKE_CASE\n - value_y: buf:lint:ignore ENUM_VALUE_UPPER_SNAKE_CASE",
+ "title": "Ignoring lint warnings as this enum type exist to validate proper functionality\nfor projects that don't follow these lint rules.\nbuf:lint:ignore ENUM_PASCAL_CASE"
+ },
"protobufAny": {
"type": "object",
"properties": {
- "typeUrl": {
+ "@type": {
"type": "string",
"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",
- "format": "byte",
- "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\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 }"
+ "additionalProperties": {},
+ "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 := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(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 }"
},
"rpcStatus": {
"type": "object",
diff --git a/examples/internal/proto/examplepb/a_bit_of_everything_grpc.pb.go b/examples/internal/proto/examplepb/a_bit_of_everything_grpc.pb.go
index dd4d017c60a..846cba4da89 100644
--- a/examples/internal/proto/examplepb/a_bit_of_everything_grpc.pb.go
+++ b/examples/internal/proto/examplepb/a_bit_of_everything_grpc.pb.go
@@ -4,19 +4,21 @@ package examplepb
import (
context "context"
- duration "github.com/golang/protobuf/ptypes/duration"
- empty "github.com/golang/protobuf/ptypes/empty"
- wrappers "github.com/golang/protobuf/ptypes/wrappers"
+ oneofenum "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/oneofenum"
pathenum "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/pathenum"
sub "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/sub"
sub2 "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/sub2"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
+ durationpb "google.golang.org/protobuf/types/known/durationpb"
+ emptypb "google.golang.org/protobuf/types/known/emptypb"
+ wrapperspb "google.golang.org/protobuf/types/known/wrapperspb"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
+// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// ABitOfEverythingServiceClient is the client API for ABitOfEverythingService service.
@@ -32,10 +34,12 @@ type ABitOfEverythingServiceClient interface {
CreateBook(ctx context.Context, in *CreateBookRequest, opts ...grpc.CallOption) (*Book, error)
UpdateBook(ctx context.Context, in *UpdateBookRequest, opts ...grpc.CallOption) (*Book, error)
Lookup(ctx context.Context, in *sub2.IdMessage, opts ...grpc.CallOption) (*ABitOfEverything, error)
- Update(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*empty.Empty, error)
- UpdateV2(ctx context.Context, in *UpdateV2Request, opts ...grpc.CallOption) (*empty.Empty, error)
- Delete(ctx context.Context, in *sub2.IdMessage, opts ...grpc.CallOption) (*empty.Empty, error)
- GetQuery(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*empty.Empty, error)
+ Custom(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*ABitOfEverything, error)
+ DoubleColon(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*ABitOfEverything, error)
+ Update(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*emptypb.Empty, error)
+ UpdateV2(ctx context.Context, in *UpdateV2Request, opts ...grpc.CallOption) (*emptypb.Empty, error)
+ Delete(ctx context.Context, in *sub2.IdMessage, opts ...grpc.CallOption) (*emptypb.Empty, error)
+ GetQuery(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*emptypb.Empty, error)
GetRepeatedQuery(ctx context.Context, in *ABitOfEverythingRepeated, opts ...grpc.CallOption) (*ABitOfEverythingRepeated, error)
// Echo allows posting a StringMessage value.
//
@@ -46,18 +50,24 @@ type ABitOfEverythingServiceClient interface {
// defined as additional_bindings in the proto.
Echo(ctx context.Context, in *sub.StringMessage, opts ...grpc.CallOption) (*sub.StringMessage, error)
DeepPathEcho(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*ABitOfEverything, error)
- NoBindings(ctx context.Context, in *duration.Duration, opts ...grpc.CallOption) (*empty.Empty, error)
- Timeout(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error)
- ErrorWithDetails(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error)
- GetMessageWithBody(ctx context.Context, in *MessageWithBody, opts ...grpc.CallOption) (*empty.Empty, error)
- PostWithEmptyBody(ctx context.Context, in *Body, opts ...grpc.CallOption) (*empty.Empty, error)
+ NoBindings(ctx context.Context, in *durationpb.Duration, opts ...grpc.CallOption) (*emptypb.Empty, error)
+ Timeout(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
+ ErrorWithDetails(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
+ GetMessageWithBody(ctx context.Context, in *MessageWithBody, opts ...grpc.CallOption) (*emptypb.Empty, error)
+ PostWithEmptyBody(ctx context.Context, in *Body, opts ...grpc.CallOption) (*emptypb.Empty, error)
CheckGetQueryParams(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*ABitOfEverything, error)
CheckNestedEnumGetQueryParams(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*ABitOfEverything, error)
CheckPostQueryParams(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*ABitOfEverything, error)
- OverwriteResponseContentType(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*wrappers.StringValue, error)
- CheckExternalPathEnum(ctx context.Context, in *pathenum.MessageWithPathEnum, opts ...grpc.CallOption) (*empty.Empty, error)
- CheckExternalNestedPathEnum(ctx context.Context, in *pathenum.MessageWithNestedPathEnum, opts ...grpc.CallOption) (*empty.Empty, error)
- CheckStatus(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*CheckStatusResponse, error)
+ OverwriteRequestContentType(ctx context.Context, in *Body, opts ...grpc.CallOption) (*emptypb.Empty, error)
+ OverwriteResponseContentType(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*wrapperspb.StringValue, error)
+ CheckExternalPathEnum(ctx context.Context, in *pathenum.MessageWithPathEnum, opts ...grpc.CallOption) (*emptypb.Empty, error)
+ CheckExternalNestedPathEnum(ctx context.Context, in *pathenum.MessageWithNestedPathEnum, opts ...grpc.CallOption) (*emptypb.Empty, error)
+ CheckStatus(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*CheckStatusResponse, error)
+ Exists(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*emptypb.Empty, error)
+ CustomOptionsRequest(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*emptypb.Empty, error)
+ TraceRequest(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*ABitOfEverything, error)
+ PostOneofEnum(ctx context.Context, in *oneofenum.OneofEnumMessage, opts ...grpc.CallOption) (*emptypb.Empty, error)
+ PostRequiredMessageType(ctx context.Context, in *RequiredMessageTypeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}
type aBitOfEverythingServiceClient struct {
@@ -113,8 +123,26 @@ func (c *aBitOfEverythingServiceClient) Lookup(ctx context.Context, in *sub2.IdM
return out, nil
}
-func (c *aBitOfEverythingServiceClient) Update(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*empty.Empty, error) {
- out := new(empty.Empty)
+func (c *aBitOfEverythingServiceClient) Custom(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*ABitOfEverything, error) {
+ out := new(ABitOfEverything)
+ err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/Custom", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *aBitOfEverythingServiceClient) DoubleColon(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*ABitOfEverything, error) {
+ out := new(ABitOfEverything)
+ err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/DoubleColon", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *aBitOfEverythingServiceClient) Update(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*emptypb.Empty, error) {
+ out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/Update", in, out, opts...)
if err != nil {
return nil, err
@@ -122,8 +150,8 @@ func (c *aBitOfEverythingServiceClient) Update(ctx context.Context, in *ABitOfEv
return out, nil
}
-func (c *aBitOfEverythingServiceClient) UpdateV2(ctx context.Context, in *UpdateV2Request, opts ...grpc.CallOption) (*empty.Empty, error) {
- out := new(empty.Empty)
+func (c *aBitOfEverythingServiceClient) UpdateV2(ctx context.Context, in *UpdateV2Request, opts ...grpc.CallOption) (*emptypb.Empty, error) {
+ out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/UpdateV2", in, out, opts...)
if err != nil {
return nil, err
@@ -131,8 +159,8 @@ func (c *aBitOfEverythingServiceClient) UpdateV2(ctx context.Context, in *Update
return out, nil
}
-func (c *aBitOfEverythingServiceClient) Delete(ctx context.Context, in *sub2.IdMessage, opts ...grpc.CallOption) (*empty.Empty, error) {
- out := new(empty.Empty)
+func (c *aBitOfEverythingServiceClient) Delete(ctx context.Context, in *sub2.IdMessage, opts ...grpc.CallOption) (*emptypb.Empty, error) {
+ out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/Delete", in, out, opts...)
if err != nil {
return nil, err
@@ -140,8 +168,8 @@ func (c *aBitOfEverythingServiceClient) Delete(ctx context.Context, in *sub2.IdM
return out, nil
}
-func (c *aBitOfEverythingServiceClient) GetQuery(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*empty.Empty, error) {
- out := new(empty.Empty)
+func (c *aBitOfEverythingServiceClient) GetQuery(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*emptypb.Empty, error) {
+ out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/GetQuery", in, out, opts...)
if err != nil {
return nil, err
@@ -176,8 +204,8 @@ func (c *aBitOfEverythingServiceClient) DeepPathEcho(ctx context.Context, in *AB
return out, nil
}
-func (c *aBitOfEverythingServiceClient) NoBindings(ctx context.Context, in *duration.Duration, opts ...grpc.CallOption) (*empty.Empty, error) {
- out := new(empty.Empty)
+func (c *aBitOfEverythingServiceClient) NoBindings(ctx context.Context, in *durationpb.Duration, opts ...grpc.CallOption) (*emptypb.Empty, error) {
+ out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/NoBindings", in, out, opts...)
if err != nil {
return nil, err
@@ -185,8 +213,8 @@ func (c *aBitOfEverythingServiceClient) NoBindings(ctx context.Context, in *dura
return out, nil
}
-func (c *aBitOfEverythingServiceClient) Timeout(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error) {
- out := new(empty.Empty)
+func (c *aBitOfEverythingServiceClient) Timeout(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) {
+ out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/Timeout", in, out, opts...)
if err != nil {
return nil, err
@@ -194,8 +222,8 @@ func (c *aBitOfEverythingServiceClient) Timeout(ctx context.Context, in *empty.E
return out, nil
}
-func (c *aBitOfEverythingServiceClient) ErrorWithDetails(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error) {
- out := new(empty.Empty)
+func (c *aBitOfEverythingServiceClient) ErrorWithDetails(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) {
+ out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/ErrorWithDetails", in, out, opts...)
if err != nil {
return nil, err
@@ -203,8 +231,8 @@ func (c *aBitOfEverythingServiceClient) ErrorWithDetails(ctx context.Context, in
return out, nil
}
-func (c *aBitOfEverythingServiceClient) GetMessageWithBody(ctx context.Context, in *MessageWithBody, opts ...grpc.CallOption) (*empty.Empty, error) {
- out := new(empty.Empty)
+func (c *aBitOfEverythingServiceClient) GetMessageWithBody(ctx context.Context, in *MessageWithBody, opts ...grpc.CallOption) (*emptypb.Empty, error) {
+ out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/GetMessageWithBody", in, out, opts...)
if err != nil {
return nil, err
@@ -212,8 +240,8 @@ func (c *aBitOfEverythingServiceClient) GetMessageWithBody(ctx context.Context,
return out, nil
}
-func (c *aBitOfEverythingServiceClient) PostWithEmptyBody(ctx context.Context, in *Body, opts ...grpc.CallOption) (*empty.Empty, error) {
- out := new(empty.Empty)
+func (c *aBitOfEverythingServiceClient) PostWithEmptyBody(ctx context.Context, in *Body, opts ...grpc.CallOption) (*emptypb.Empty, error) {
+ out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/PostWithEmptyBody", in, out, opts...)
if err != nil {
return nil, err
@@ -248,8 +276,17 @@ func (c *aBitOfEverythingServiceClient) CheckPostQueryParams(ctx context.Context
return out, nil
}
-func (c *aBitOfEverythingServiceClient) OverwriteResponseContentType(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*wrappers.StringValue, error) {
- out := new(wrappers.StringValue)
+func (c *aBitOfEverythingServiceClient) OverwriteRequestContentType(ctx context.Context, in *Body, opts ...grpc.CallOption) (*emptypb.Empty, error) {
+ out := new(emptypb.Empty)
+ err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/OverwriteRequestContentType", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *aBitOfEverythingServiceClient) OverwriteResponseContentType(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*wrapperspb.StringValue, error) {
+ out := new(wrapperspb.StringValue)
err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/OverwriteResponseContentType", in, out, opts...)
if err != nil {
return nil, err
@@ -257,8 +294,8 @@ func (c *aBitOfEverythingServiceClient) OverwriteResponseContentType(ctx context
return out, nil
}
-func (c *aBitOfEverythingServiceClient) CheckExternalPathEnum(ctx context.Context, in *pathenum.MessageWithPathEnum, opts ...grpc.CallOption) (*empty.Empty, error) {
- out := new(empty.Empty)
+func (c *aBitOfEverythingServiceClient) CheckExternalPathEnum(ctx context.Context, in *pathenum.MessageWithPathEnum, opts ...grpc.CallOption) (*emptypb.Empty, error) {
+ out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/CheckExternalPathEnum", in, out, opts...)
if err != nil {
return nil, err
@@ -266,8 +303,8 @@ func (c *aBitOfEverythingServiceClient) CheckExternalPathEnum(ctx context.Contex
return out, nil
}
-func (c *aBitOfEverythingServiceClient) CheckExternalNestedPathEnum(ctx context.Context, in *pathenum.MessageWithNestedPathEnum, opts ...grpc.CallOption) (*empty.Empty, error) {
- out := new(empty.Empty)
+func (c *aBitOfEverythingServiceClient) CheckExternalNestedPathEnum(ctx context.Context, in *pathenum.MessageWithNestedPathEnum, opts ...grpc.CallOption) (*emptypb.Empty, error) {
+ out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/CheckExternalNestedPathEnum", in, out, opts...)
if err != nil {
return nil, err
@@ -275,7 +312,7 @@ func (c *aBitOfEverythingServiceClient) CheckExternalNestedPathEnum(ctx context.
return out, nil
}
-func (c *aBitOfEverythingServiceClient) CheckStatus(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*CheckStatusResponse, error) {
+func (c *aBitOfEverythingServiceClient) CheckStatus(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*CheckStatusResponse, error) {
out := new(CheckStatusResponse)
err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/CheckStatus", in, out, opts...)
if err != nil {
@@ -284,6 +321,51 @@ func (c *aBitOfEverythingServiceClient) CheckStatus(ctx context.Context, in *emp
return out, nil
}
+func (c *aBitOfEverythingServiceClient) Exists(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*emptypb.Empty, error) {
+ out := new(emptypb.Empty)
+ err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/Exists", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *aBitOfEverythingServiceClient) CustomOptionsRequest(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*emptypb.Empty, error) {
+ out := new(emptypb.Empty)
+ err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/CustomOptionsRequest", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *aBitOfEverythingServiceClient) TraceRequest(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*ABitOfEverything, error) {
+ out := new(ABitOfEverything)
+ err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/TraceRequest", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *aBitOfEverythingServiceClient) PostOneofEnum(ctx context.Context, in *oneofenum.OneofEnumMessage, opts ...grpc.CallOption) (*emptypb.Empty, error) {
+ out := new(emptypb.Empty)
+ err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/PostOneofEnum", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *aBitOfEverythingServiceClient) PostRequiredMessageType(ctx context.Context, in *RequiredMessageTypeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
+ out := new(emptypb.Empty)
+ err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/PostRequiredMessageType", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
// ABitOfEverythingServiceServer is the server API for ABitOfEverythingService service.
// All implementations should embed UnimplementedABitOfEverythingServiceServer
// for forward compatibility
@@ -297,10 +379,12 @@ type ABitOfEverythingServiceServer interface {
CreateBook(context.Context, *CreateBookRequest) (*Book, error)
UpdateBook(context.Context, *UpdateBookRequest) (*Book, error)
Lookup(context.Context, *sub2.IdMessage) (*ABitOfEverything, error)
- Update(context.Context, *ABitOfEverything) (*empty.Empty, error)
- UpdateV2(context.Context, *UpdateV2Request) (*empty.Empty, error)
- Delete(context.Context, *sub2.IdMessage) (*empty.Empty, error)
- GetQuery(context.Context, *ABitOfEverything) (*empty.Empty, error)
+ Custom(context.Context, *ABitOfEverything) (*ABitOfEverything, error)
+ DoubleColon(context.Context, *ABitOfEverything) (*ABitOfEverything, error)
+ Update(context.Context, *ABitOfEverything) (*emptypb.Empty, error)
+ UpdateV2(context.Context, *UpdateV2Request) (*emptypb.Empty, error)
+ Delete(context.Context, *sub2.IdMessage) (*emptypb.Empty, error)
+ GetQuery(context.Context, *ABitOfEverything) (*emptypb.Empty, error)
GetRepeatedQuery(context.Context, *ABitOfEverythingRepeated) (*ABitOfEverythingRepeated, error)
// Echo allows posting a StringMessage value.
//
@@ -311,18 +395,24 @@ type ABitOfEverythingServiceServer interface {
// defined as additional_bindings in the proto.
Echo(context.Context, *sub.StringMessage) (*sub.StringMessage, error)
DeepPathEcho(context.Context, *ABitOfEverything) (*ABitOfEverything, error)
- NoBindings(context.Context, *duration.Duration) (*empty.Empty, error)
- Timeout(context.Context, *empty.Empty) (*empty.Empty, error)
- ErrorWithDetails(context.Context, *empty.Empty) (*empty.Empty, error)
- GetMessageWithBody(context.Context, *MessageWithBody) (*empty.Empty, error)
- PostWithEmptyBody(context.Context, *Body) (*empty.Empty, error)
+ NoBindings(context.Context, *durationpb.Duration) (*emptypb.Empty, error)
+ Timeout(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
+ ErrorWithDetails(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
+ GetMessageWithBody(context.Context, *MessageWithBody) (*emptypb.Empty, error)
+ PostWithEmptyBody(context.Context, *Body) (*emptypb.Empty, error)
CheckGetQueryParams(context.Context, *ABitOfEverything) (*ABitOfEverything, error)
CheckNestedEnumGetQueryParams(context.Context, *ABitOfEverything) (*ABitOfEverything, error)
CheckPostQueryParams(context.Context, *ABitOfEverything) (*ABitOfEverything, error)
- OverwriteResponseContentType(context.Context, *empty.Empty) (*wrappers.StringValue, error)
- CheckExternalPathEnum(context.Context, *pathenum.MessageWithPathEnum) (*empty.Empty, error)
- CheckExternalNestedPathEnum(context.Context, *pathenum.MessageWithNestedPathEnum) (*empty.Empty, error)
- CheckStatus(context.Context, *empty.Empty) (*CheckStatusResponse, error)
+ OverwriteRequestContentType(context.Context, *Body) (*emptypb.Empty, error)
+ OverwriteResponseContentType(context.Context, *emptypb.Empty) (*wrapperspb.StringValue, error)
+ CheckExternalPathEnum(context.Context, *pathenum.MessageWithPathEnum) (*emptypb.Empty, error)
+ CheckExternalNestedPathEnum(context.Context, *pathenum.MessageWithNestedPathEnum) (*emptypb.Empty, error)
+ CheckStatus(context.Context, *emptypb.Empty) (*CheckStatusResponse, error)
+ Exists(context.Context, *ABitOfEverything) (*emptypb.Empty, error)
+ CustomOptionsRequest(context.Context, *ABitOfEverything) (*emptypb.Empty, error)
+ TraceRequest(context.Context, *ABitOfEverything) (*ABitOfEverything, error)
+ PostOneofEnum(context.Context, *oneofenum.OneofEnumMessage) (*emptypb.Empty, error)
+ PostRequiredMessageType(context.Context, *RequiredMessageTypeRequest) (*emptypb.Empty, error)
}
// UnimplementedABitOfEverythingServiceServer should be embedded to have forward compatible implementations.
@@ -344,16 +434,22 @@ func (UnimplementedABitOfEverythingServiceServer) UpdateBook(context.Context, *U
func (UnimplementedABitOfEverythingServiceServer) Lookup(context.Context, *sub2.IdMessage) (*ABitOfEverything, error) {
return nil, status.Errorf(codes.Unimplemented, "method Lookup not implemented")
}
-func (UnimplementedABitOfEverythingServiceServer) Update(context.Context, *ABitOfEverything) (*empty.Empty, error) {
+func (UnimplementedABitOfEverythingServiceServer) Custom(context.Context, *ABitOfEverything) (*ABitOfEverything, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method Custom not implemented")
+}
+func (UnimplementedABitOfEverythingServiceServer) DoubleColon(context.Context, *ABitOfEverything) (*ABitOfEverything, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method DoubleColon not implemented")
+}
+func (UnimplementedABitOfEverythingServiceServer) Update(context.Context, *ABitOfEverything) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method Update not implemented")
}
-func (UnimplementedABitOfEverythingServiceServer) UpdateV2(context.Context, *UpdateV2Request) (*empty.Empty, error) {
+func (UnimplementedABitOfEverythingServiceServer) UpdateV2(context.Context, *UpdateV2Request) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateV2 not implemented")
}
-func (UnimplementedABitOfEverythingServiceServer) Delete(context.Context, *sub2.IdMessage) (*empty.Empty, error) {
+func (UnimplementedABitOfEverythingServiceServer) Delete(context.Context, *sub2.IdMessage) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
}
-func (UnimplementedABitOfEverythingServiceServer) GetQuery(context.Context, *ABitOfEverything) (*empty.Empty, error) {
+func (UnimplementedABitOfEverythingServiceServer) GetQuery(context.Context, *ABitOfEverything) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetQuery not implemented")
}
func (UnimplementedABitOfEverythingServiceServer) GetRepeatedQuery(context.Context, *ABitOfEverythingRepeated) (*ABitOfEverythingRepeated, error) {
@@ -365,19 +461,19 @@ func (UnimplementedABitOfEverythingServiceServer) Echo(context.Context, *sub.Str
func (UnimplementedABitOfEverythingServiceServer) DeepPathEcho(context.Context, *ABitOfEverything) (*ABitOfEverything, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeepPathEcho not implemented")
}
-func (UnimplementedABitOfEverythingServiceServer) NoBindings(context.Context, *duration.Duration) (*empty.Empty, error) {
+func (UnimplementedABitOfEverythingServiceServer) NoBindings(context.Context, *durationpb.Duration) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method NoBindings not implemented")
}
-func (UnimplementedABitOfEverythingServiceServer) Timeout(context.Context, *empty.Empty) (*empty.Empty, error) {
+func (UnimplementedABitOfEverythingServiceServer) Timeout(context.Context, *emptypb.Empty) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method Timeout not implemented")
}
-func (UnimplementedABitOfEverythingServiceServer) ErrorWithDetails(context.Context, *empty.Empty) (*empty.Empty, error) {
+func (UnimplementedABitOfEverythingServiceServer) ErrorWithDetails(context.Context, *emptypb.Empty) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method ErrorWithDetails not implemented")
}
-func (UnimplementedABitOfEverythingServiceServer) GetMessageWithBody(context.Context, *MessageWithBody) (*empty.Empty, error) {
+func (UnimplementedABitOfEverythingServiceServer) GetMessageWithBody(context.Context, *MessageWithBody) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetMessageWithBody not implemented")
}
-func (UnimplementedABitOfEverythingServiceServer) PostWithEmptyBody(context.Context, *Body) (*empty.Empty, error) {
+func (UnimplementedABitOfEverythingServiceServer) PostWithEmptyBody(context.Context, *Body) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method PostWithEmptyBody not implemented")
}
func (UnimplementedABitOfEverythingServiceServer) CheckGetQueryParams(context.Context, *ABitOfEverything) (*ABitOfEverything, error) {
@@ -389,18 +485,36 @@ func (UnimplementedABitOfEverythingServiceServer) CheckNestedEnumGetQueryParams(
func (UnimplementedABitOfEverythingServiceServer) CheckPostQueryParams(context.Context, *ABitOfEverything) (*ABitOfEverything, error) {
return nil, status.Errorf(codes.Unimplemented, "method CheckPostQueryParams not implemented")
}
-func (UnimplementedABitOfEverythingServiceServer) OverwriteResponseContentType(context.Context, *empty.Empty) (*wrappers.StringValue, error) {
+func (UnimplementedABitOfEverythingServiceServer) OverwriteRequestContentType(context.Context, *Body) (*emptypb.Empty, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method OverwriteRequestContentType not implemented")
+}
+func (UnimplementedABitOfEverythingServiceServer) OverwriteResponseContentType(context.Context, *emptypb.Empty) (*wrapperspb.StringValue, error) {
return nil, status.Errorf(codes.Unimplemented, "method OverwriteResponseContentType not implemented")
}
-func (UnimplementedABitOfEverythingServiceServer) CheckExternalPathEnum(context.Context, *pathenum.MessageWithPathEnum) (*empty.Empty, error) {
+func (UnimplementedABitOfEverythingServiceServer) CheckExternalPathEnum(context.Context, *pathenum.MessageWithPathEnum) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method CheckExternalPathEnum not implemented")
}
-func (UnimplementedABitOfEverythingServiceServer) CheckExternalNestedPathEnum(context.Context, *pathenum.MessageWithNestedPathEnum) (*empty.Empty, error) {
+func (UnimplementedABitOfEverythingServiceServer) CheckExternalNestedPathEnum(context.Context, *pathenum.MessageWithNestedPathEnum) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method CheckExternalNestedPathEnum not implemented")
}
-func (UnimplementedABitOfEverythingServiceServer) CheckStatus(context.Context, *empty.Empty) (*CheckStatusResponse, error) {
+func (UnimplementedABitOfEverythingServiceServer) CheckStatus(context.Context, *emptypb.Empty) (*CheckStatusResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CheckStatus not implemented")
}
+func (UnimplementedABitOfEverythingServiceServer) Exists(context.Context, *ABitOfEverything) (*emptypb.Empty, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method Exists not implemented")
+}
+func (UnimplementedABitOfEverythingServiceServer) CustomOptionsRequest(context.Context, *ABitOfEverything) (*emptypb.Empty, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method CustomOptionsRequest not implemented")
+}
+func (UnimplementedABitOfEverythingServiceServer) TraceRequest(context.Context, *ABitOfEverything) (*ABitOfEverything, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method TraceRequest not implemented")
+}
+func (UnimplementedABitOfEverythingServiceServer) PostOneofEnum(context.Context, *oneofenum.OneofEnumMessage) (*emptypb.Empty, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method PostOneofEnum not implemented")
+}
+func (UnimplementedABitOfEverythingServiceServer) PostRequiredMessageType(context.Context, *RequiredMessageTypeRequest) (*emptypb.Empty, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method PostRequiredMessageType not implemented")
+}
// UnsafeABitOfEverythingServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ABitOfEverythingServiceServer will
@@ -409,8 +523,8 @@ type UnsafeABitOfEverythingServiceServer interface {
mustEmbedUnimplementedABitOfEverythingServiceServer()
}
-func RegisterABitOfEverythingServiceServer(s *grpc.Server, srv ABitOfEverythingServiceServer) {
- s.RegisterService(&_ABitOfEverythingService_serviceDesc, srv)
+func RegisterABitOfEverythingServiceServer(s grpc.ServiceRegistrar, srv ABitOfEverythingServiceServer) {
+ s.RegisterService(&ABitOfEverythingService_ServiceDesc, srv)
}
func _ABitOfEverythingService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
@@ -503,6 +617,42 @@ func _ABitOfEverythingService_Lookup_Handler(srv interface{}, ctx context.Contex
return interceptor(ctx, in, info, handler)
}
+func _ABitOfEverythingService_Custom_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ABitOfEverything)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ABitOfEverythingServiceServer).Custom(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/Custom",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ABitOfEverythingServiceServer).Custom(ctx, req.(*ABitOfEverything))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _ABitOfEverythingService_DoubleColon_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ABitOfEverything)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ABitOfEverythingServiceServer).DoubleColon(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/DoubleColon",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ABitOfEverythingServiceServer).DoubleColon(ctx, req.(*ABitOfEverything))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
func _ABitOfEverythingService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ABitOfEverything)
if err := dec(in); err != nil {
@@ -630,7 +780,7 @@ func _ABitOfEverythingService_DeepPathEcho_Handler(srv interface{}, ctx context.
}
func _ABitOfEverythingService_NoBindings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(duration.Duration)
+ in := new(durationpb.Duration)
if err := dec(in); err != nil {
return nil, err
}
@@ -642,13 +792,13 @@ func _ABitOfEverythingService_NoBindings_Handler(srv interface{}, ctx context.Co
FullMethod: "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/NoBindings",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(ABitOfEverythingServiceServer).NoBindings(ctx, req.(*duration.Duration))
+ return srv.(ABitOfEverythingServiceServer).NoBindings(ctx, req.(*durationpb.Duration))
}
return interceptor(ctx, in, info, handler)
}
func _ABitOfEverythingService_Timeout_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(empty.Empty)
+ in := new(emptypb.Empty)
if err := dec(in); err != nil {
return nil, err
}
@@ -660,13 +810,13 @@ func _ABitOfEverythingService_Timeout_Handler(srv interface{}, ctx context.Conte
FullMethod: "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/Timeout",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(ABitOfEverythingServiceServer).Timeout(ctx, req.(*empty.Empty))
+ return srv.(ABitOfEverythingServiceServer).Timeout(ctx, req.(*emptypb.Empty))
}
return interceptor(ctx, in, info, handler)
}
func _ABitOfEverythingService_ErrorWithDetails_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(empty.Empty)
+ in := new(emptypb.Empty)
if err := dec(in); err != nil {
return nil, err
}
@@ -678,7 +828,7 @@ func _ABitOfEverythingService_ErrorWithDetails_Handler(srv interface{}, ctx cont
FullMethod: "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/ErrorWithDetails",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(ABitOfEverythingServiceServer).ErrorWithDetails(ctx, req.(*empty.Empty))
+ return srv.(ABitOfEverythingServiceServer).ErrorWithDetails(ctx, req.(*emptypb.Empty))
}
return interceptor(ctx, in, info, handler)
}
@@ -773,8 +923,26 @@ func _ABitOfEverythingService_CheckPostQueryParams_Handler(srv interface{}, ctx
return interceptor(ctx, in, info, handler)
}
+func _ABitOfEverythingService_OverwriteRequestContentType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(Body)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ABitOfEverythingServiceServer).OverwriteRequestContentType(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/OverwriteRequestContentType",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ABitOfEverythingServiceServer).OverwriteRequestContentType(ctx, req.(*Body))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
func _ABitOfEverythingService_OverwriteResponseContentType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(empty.Empty)
+ in := new(emptypb.Empty)
if err := dec(in); err != nil {
return nil, err
}
@@ -786,7 +954,7 @@ func _ABitOfEverythingService_OverwriteResponseContentType_Handler(srv interface
FullMethod: "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/OverwriteResponseContentType",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(ABitOfEverythingServiceServer).OverwriteResponseContentType(ctx, req.(*empty.Empty))
+ return srv.(ABitOfEverythingServiceServer).OverwriteResponseContentType(ctx, req.(*emptypb.Empty))
}
return interceptor(ctx, in, info, handler)
}
@@ -828,7 +996,7 @@ func _ABitOfEverythingService_CheckExternalNestedPathEnum_Handler(srv interface{
}
func _ABitOfEverythingService_CheckStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(empty.Empty)
+ in := new(emptypb.Empty)
if err := dec(in); err != nil {
return nil, err
}
@@ -840,12 +1008,105 @@ func _ABitOfEverythingService_CheckStatus_Handler(srv interface{}, ctx context.C
FullMethod: "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/CheckStatus",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(ABitOfEverythingServiceServer).CheckStatus(ctx, req.(*empty.Empty))
+ return srv.(ABitOfEverythingServiceServer).CheckStatus(ctx, req.(*emptypb.Empty))
}
return interceptor(ctx, in, info, handler)
}
-var _ABitOfEverythingService_serviceDesc = grpc.ServiceDesc{
+func _ABitOfEverythingService_Exists_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ABitOfEverything)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ABitOfEverythingServiceServer).Exists(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/Exists",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ABitOfEverythingServiceServer).Exists(ctx, req.(*ABitOfEverything))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _ABitOfEverythingService_CustomOptionsRequest_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ABitOfEverything)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ABitOfEverythingServiceServer).CustomOptionsRequest(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/CustomOptionsRequest",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ABitOfEverythingServiceServer).CustomOptionsRequest(ctx, req.(*ABitOfEverything))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _ABitOfEverythingService_TraceRequest_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ABitOfEverything)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ABitOfEverythingServiceServer).TraceRequest(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/TraceRequest",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ABitOfEverythingServiceServer).TraceRequest(ctx, req.(*ABitOfEverything))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _ABitOfEverythingService_PostOneofEnum_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(oneofenum.OneofEnumMessage)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ABitOfEverythingServiceServer).PostOneofEnum(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/PostOneofEnum",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ABitOfEverythingServiceServer).PostOneofEnum(ctx, req.(*oneofenum.OneofEnumMessage))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _ABitOfEverythingService_PostRequiredMessageType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(RequiredMessageTypeRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ABitOfEverythingServiceServer).PostRequiredMessageType(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService/PostRequiredMessageType",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ABitOfEverythingServiceServer).PostRequiredMessageType(ctx, req.(*RequiredMessageTypeRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+// ABitOfEverythingService_ServiceDesc is the grpc.ServiceDesc for ABitOfEverythingService service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var ABitOfEverythingService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "grpc.gateway.examples.internal.proto.examplepb.ABitOfEverythingService",
HandlerType: (*ABitOfEverythingServiceServer)(nil),
Methods: []grpc.MethodDesc{
@@ -869,6 +1130,14 @@ var _ABitOfEverythingService_serviceDesc = grpc.ServiceDesc{
MethodName: "Lookup",
Handler: _ABitOfEverythingService_Lookup_Handler,
},
+ {
+ MethodName: "Custom",
+ Handler: _ABitOfEverythingService_Custom_Handler,
+ },
+ {
+ MethodName: "DoubleColon",
+ Handler: _ABitOfEverythingService_DoubleColon_Handler,
+ },
{
MethodName: "Update",
Handler: _ABitOfEverythingService_Update_Handler,
@@ -929,6 +1198,10 @@ var _ABitOfEverythingService_serviceDesc = grpc.ServiceDesc{
MethodName: "CheckPostQueryParams",
Handler: _ABitOfEverythingService_CheckPostQueryParams_Handler,
},
+ {
+ MethodName: "OverwriteRequestContentType",
+ Handler: _ABitOfEverythingService_OverwriteRequestContentType_Handler,
+ },
{
MethodName: "OverwriteResponseContentType",
Handler: _ABitOfEverythingService_OverwriteResponseContentType_Handler,
@@ -945,6 +1218,26 @@ var _ABitOfEverythingService_serviceDesc = grpc.ServiceDesc{
MethodName: "CheckStatus",
Handler: _ABitOfEverythingService_CheckStatus_Handler,
},
+ {
+ MethodName: "Exists",
+ Handler: _ABitOfEverythingService_Exists_Handler,
+ },
+ {
+ MethodName: "CustomOptionsRequest",
+ Handler: _ABitOfEverythingService_CustomOptionsRequest_Handler,
+ },
+ {
+ MethodName: "TraceRequest",
+ Handler: _ABitOfEverythingService_TraceRequest_Handler,
+ },
+ {
+ MethodName: "PostOneofEnum",
+ Handler: _ABitOfEverythingService_PostOneofEnum_Handler,
+ },
+ {
+ MethodName: "PostRequiredMessageType",
+ Handler: _ABitOfEverythingService_PostRequiredMessageType_Handler,
+ },
},
Streams: []grpc.StreamDesc{},
Metadata: "examples/internal/proto/examplepb/a_bit_of_everything.proto",
@@ -954,7 +1247,7 @@ var _ABitOfEverythingService_serviceDesc = grpc.ServiceDesc{
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type CamelCaseServiceNameClient interface {
- Empty(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error)
+ Empty(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
}
type camelCaseServiceNameClient struct {
@@ -965,8 +1258,8 @@ func NewCamelCaseServiceNameClient(cc grpc.ClientConnInterface) CamelCaseService
return &camelCaseServiceNameClient{cc}
}
-func (c *camelCaseServiceNameClient) Empty(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error) {
- out := new(empty.Empty)
+func (c *camelCaseServiceNameClient) Empty(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) {
+ out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.proto.examplepb.camelCaseServiceName/Empty", in, out, opts...)
if err != nil {
return nil, err
@@ -978,14 +1271,14 @@ func (c *camelCaseServiceNameClient) Empty(ctx context.Context, in *empty.Empty,
// All implementations should embed UnimplementedCamelCaseServiceNameServer
// for forward compatibility
type CamelCaseServiceNameServer interface {
- Empty(context.Context, *empty.Empty) (*empty.Empty, error)
+ Empty(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
}
// UnimplementedCamelCaseServiceNameServer should be embedded to have forward compatible implementations.
type UnimplementedCamelCaseServiceNameServer struct {
}
-func (UnimplementedCamelCaseServiceNameServer) Empty(context.Context, *empty.Empty) (*empty.Empty, error) {
+func (UnimplementedCamelCaseServiceNameServer) Empty(context.Context, *emptypb.Empty) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method Empty not implemented")
}
@@ -996,12 +1289,12 @@ type UnsafeCamelCaseServiceNameServer interface {
mustEmbedUnimplementedCamelCaseServiceNameServer()
}
-func RegisterCamelCaseServiceNameServer(s *grpc.Server, srv CamelCaseServiceNameServer) {
- s.RegisterService(&_CamelCaseServiceName_serviceDesc, srv)
+func RegisterCamelCaseServiceNameServer(s grpc.ServiceRegistrar, srv CamelCaseServiceNameServer) {
+ s.RegisterService(&CamelCaseServiceName_ServiceDesc, srv)
}
func _CamelCaseServiceName_Empty_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(empty.Empty)
+ in := new(emptypb.Empty)
if err := dec(in); err != nil {
return nil, err
}
@@ -1013,12 +1306,15 @@ func _CamelCaseServiceName_Empty_Handler(srv interface{}, ctx context.Context, d
FullMethod: "/grpc.gateway.examples.internal.proto.examplepb.camelCaseServiceName/Empty",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(CamelCaseServiceNameServer).Empty(ctx, req.(*empty.Empty))
+ return srv.(CamelCaseServiceNameServer).Empty(ctx, req.(*emptypb.Empty))
}
return interceptor(ctx, in, info, handler)
}
-var _CamelCaseServiceName_serviceDesc = grpc.ServiceDesc{
+// CamelCaseServiceName_ServiceDesc is the grpc.ServiceDesc for CamelCaseServiceName service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var CamelCaseServiceName_ServiceDesc = grpc.ServiceDesc{
ServiceName: "grpc.gateway.examples.internal.proto.examplepb.camelCaseServiceName",
HandlerType: (*CamelCaseServiceNameServer)(nil),
Methods: []grpc.MethodDesc{
@@ -1035,7 +1331,7 @@ var _CamelCaseServiceName_serviceDesc = grpc.ServiceDesc{
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type AnotherServiceWithNoBindingsClient interface {
- NoBindings(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error)
+ NoBindings(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
}
type anotherServiceWithNoBindingsClient struct {
@@ -1046,8 +1342,8 @@ func NewAnotherServiceWithNoBindingsClient(cc grpc.ClientConnInterface) AnotherS
return &anotherServiceWithNoBindingsClient{cc}
}
-func (c *anotherServiceWithNoBindingsClient) NoBindings(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error) {
- out := new(empty.Empty)
+func (c *anotherServiceWithNoBindingsClient) NoBindings(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) {
+ out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.proto.examplepb.AnotherServiceWithNoBindings/NoBindings", in, out, opts...)
if err != nil {
return nil, err
@@ -1059,14 +1355,14 @@ func (c *anotherServiceWithNoBindingsClient) NoBindings(ctx context.Context, in
// All implementations should embed UnimplementedAnotherServiceWithNoBindingsServer
// for forward compatibility
type AnotherServiceWithNoBindingsServer interface {
- NoBindings(context.Context, *empty.Empty) (*empty.Empty, error)
+ NoBindings(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
}
// UnimplementedAnotherServiceWithNoBindingsServer should be embedded to have forward compatible implementations.
type UnimplementedAnotherServiceWithNoBindingsServer struct {
}
-func (UnimplementedAnotherServiceWithNoBindingsServer) NoBindings(context.Context, *empty.Empty) (*empty.Empty, error) {
+func (UnimplementedAnotherServiceWithNoBindingsServer) NoBindings(context.Context, *emptypb.Empty) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method NoBindings not implemented")
}
@@ -1077,12 +1373,12 @@ type UnsafeAnotherServiceWithNoBindingsServer interface {
mustEmbedUnimplementedAnotherServiceWithNoBindingsServer()
}
-func RegisterAnotherServiceWithNoBindingsServer(s *grpc.Server, srv AnotherServiceWithNoBindingsServer) {
- s.RegisterService(&_AnotherServiceWithNoBindings_serviceDesc, srv)
+func RegisterAnotherServiceWithNoBindingsServer(s grpc.ServiceRegistrar, srv AnotherServiceWithNoBindingsServer) {
+ s.RegisterService(&AnotherServiceWithNoBindings_ServiceDesc, srv)
}
func _AnotherServiceWithNoBindings_NoBindings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(empty.Empty)
+ in := new(emptypb.Empty)
if err := dec(in); err != nil {
return nil, err
}
@@ -1094,12 +1390,15 @@ func _AnotherServiceWithNoBindings_NoBindings_Handler(srv interface{}, ctx conte
FullMethod: "/grpc.gateway.examples.internal.proto.examplepb.AnotherServiceWithNoBindings/NoBindings",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(AnotherServiceWithNoBindingsServer).NoBindings(ctx, req.(*empty.Empty))
+ return srv.(AnotherServiceWithNoBindingsServer).NoBindings(ctx, req.(*emptypb.Empty))
}
return interceptor(ctx, in, info, handler)
}
-var _AnotherServiceWithNoBindings_serviceDesc = grpc.ServiceDesc{
+// AnotherServiceWithNoBindings_ServiceDesc is the grpc.ServiceDesc for AnotherServiceWithNoBindings service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var AnotherServiceWithNoBindings_ServiceDesc = grpc.ServiceDesc{
ServiceName: "grpc.gateway.examples.internal.proto.examplepb.AnotherServiceWithNoBindings",
HandlerType: (*AnotherServiceWithNoBindingsServer)(nil),
Methods: []grpc.MethodDesc{
@@ -1111,3 +1410,87 @@ var _AnotherServiceWithNoBindings_serviceDesc = grpc.ServiceDesc{
Streams: []grpc.StreamDesc{},
Metadata: "examples/internal/proto/examplepb/a_bit_of_everything.proto",
}
+
+// SnakeEnumServiceClient is the client API for SnakeEnumService service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
+type SnakeEnumServiceClient interface {
+ SnakeEnum(ctx context.Context, in *SnakeEnumRequest, opts ...grpc.CallOption) (*SnakeEnumResponse, error)
+}
+
+type snakeEnumServiceClient struct {
+ cc grpc.ClientConnInterface
+}
+
+func NewSnakeEnumServiceClient(cc grpc.ClientConnInterface) SnakeEnumServiceClient {
+ return &snakeEnumServiceClient{cc}
+}
+
+func (c *snakeEnumServiceClient) SnakeEnum(ctx context.Context, in *SnakeEnumRequest, opts ...grpc.CallOption) (*SnakeEnumResponse, error) {
+ out := new(SnakeEnumResponse)
+ err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.proto.examplepb.SnakeEnumService/SnakeEnum", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+// SnakeEnumServiceServer is the server API for SnakeEnumService service.
+// All implementations should embed UnimplementedSnakeEnumServiceServer
+// for forward compatibility
+type SnakeEnumServiceServer interface {
+ SnakeEnum(context.Context, *SnakeEnumRequest) (*SnakeEnumResponse, error)
+}
+
+// UnimplementedSnakeEnumServiceServer should be embedded to have forward compatible implementations.
+type UnimplementedSnakeEnumServiceServer struct {
+}
+
+func (UnimplementedSnakeEnumServiceServer) SnakeEnum(context.Context, *SnakeEnumRequest) (*SnakeEnumResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method SnakeEnum not implemented")
+}
+
+// UnsafeSnakeEnumServiceServer may be embedded to opt out of forward compatibility for this service.
+// Use of this interface is not recommended, as added methods to SnakeEnumServiceServer will
+// result in compilation errors.
+type UnsafeSnakeEnumServiceServer interface {
+ mustEmbedUnimplementedSnakeEnumServiceServer()
+}
+
+func RegisterSnakeEnumServiceServer(s grpc.ServiceRegistrar, srv SnakeEnumServiceServer) {
+ s.RegisterService(&SnakeEnumService_ServiceDesc, srv)
+}
+
+func _SnakeEnumService_SnakeEnum_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(SnakeEnumRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(SnakeEnumServiceServer).SnakeEnum(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/grpc.gateway.examples.internal.proto.examplepb.SnakeEnumService/SnakeEnum",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(SnakeEnumServiceServer).SnakeEnum(ctx, req.(*SnakeEnumRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+// SnakeEnumService_ServiceDesc is the grpc.ServiceDesc for SnakeEnumService service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var SnakeEnumService_ServiceDesc = grpc.ServiceDesc{
+ ServiceName: "grpc.gateway.examples.internal.proto.examplepb.SnakeEnumService",
+ HandlerType: (*SnakeEnumServiceServer)(nil),
+ Methods: []grpc.MethodDesc{
+ {
+ MethodName: "SnakeEnum",
+ Handler: _SnakeEnumService_SnakeEnum_Handler,
+ },
+ },
+ Streams: []grpc.StreamDesc{},
+ Metadata: "examples/internal/proto/examplepb/a_bit_of_everything.proto",
+}
diff --git a/examples/internal/proto/examplepb/echo_service.pb.go b/examples/internal/proto/examplepb/echo_service.pb.go
index b5d81c5cb09..abfd52677fc 100644
--- a/examples/internal/proto/examplepb/echo_service.pb.go
+++ b/examples/internal/proto/examplepb/echo_service.pb.go
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.26.0
-// protoc v3.13.0
+// protoc-gen-go v1.27.1
+// protoc (unknown)
// source: examples/internal/proto/examplepb/echo_service.proto
// Echo Service
@@ -12,11 +12,11 @@
package examplepb
import (
- _struct "github.com/golang/protobuf/ptypes/struct"
_ "google.golang.org/genproto/googleapis/api/annotations"
- field_mask "google.golang.org/genproto/protobuf/field_mask"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb"
+ structpb "google.golang.org/protobuf/types/known/structpb"
reflect "reflect"
sync "sync"
)
@@ -263,8 +263,8 @@ type DynamicMessage struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- StructField *_struct.Struct `protobuf:"bytes,1,opt,name=struct_field,json=structField,proto3" json:"struct_field,omitempty"`
- ValueField *_struct.Value `protobuf:"bytes,2,opt,name=value_field,json=valueField,proto3" json:"value_field,omitempty"`
+ StructField *structpb.Struct `protobuf:"bytes,1,opt,name=struct_field,json=structField,proto3" json:"struct_field,omitempty"`
+ ValueField *structpb.Value `protobuf:"bytes,2,opt,name=value_field,json=valueField,proto3" json:"value_field,omitempty"`
}
func (x *DynamicMessage) Reset() {
@@ -299,14 +299,14 @@ func (*DynamicMessage) Descriptor() ([]byte, []int) {
return file_examples_internal_proto_examplepb_echo_service_proto_rawDescGZIP(), []int{2}
}
-func (x *DynamicMessage) GetStructField() *_struct.Struct {
+func (x *DynamicMessage) GetStructField() *structpb.Struct {
if x != nil {
return x.StructField
}
return nil
}
-func (x *DynamicMessage) GetValueField() *_struct.Value {
+func (x *DynamicMessage) GetValueField() *structpb.Value {
if x != nil {
return x.ValueField
}
@@ -318,8 +318,8 @@ type DynamicMessageUpdate struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- Body *DynamicMessage `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"`
- UpdateMask *field_mask.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
+ Body *DynamicMessage `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"`
+ UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
}
func (x *DynamicMessageUpdate) Reset() {
@@ -361,7 +361,7 @@ func (x *DynamicMessageUpdate) GetBody() *DynamicMessage {
return nil
}
-func (x *DynamicMessageUpdate) GetUpdateMask() *field_mask.FieldMask {
+func (x *DynamicMessageUpdate) GetUpdateMask() *fieldmaskpb.FieldMask {
if x != nil {
return x.UpdateMask
}
@@ -425,7 +425,7 @@ var file_examples_internal_proto_examplepb_echo_service_proto_rawDesc = []byte{
0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67,
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46,
0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65,
- 0x4d, 0x61, 0x73, 0x6b, 0x32, 0xe7, 0x06, 0x0a, 0x0b, 0x45, 0x63, 0x68, 0x6f, 0x53, 0x65, 0x72,
+ 0x4d, 0x61, 0x73, 0x6b, 0x32, 0xc3, 0x08, 0x0a, 0x0b, 0x45, 0x63, 0x68, 0x6f, 0x53, 0x65, 0x72,
0x76, 0x69, 0x63, 0x65, 0x12, 0xbc, 0x02, 0x0a, 0x04, 0x45, 0x63, 0x68, 0x6f, 0x12, 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,
@@ -435,18 +435,18 @@ var file_examples_internal_proto_examplepb_echo_service_proto_rawDesc = []byte{
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, 0x53, 0x69,
0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xb5, 0x01, 0x82, 0xd3,
- 0xe4, 0x93, 0x02, 0xae, 0x01, 0x22, 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70,
- 0x6c, 0x65, 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x5a, 0x1d, 0x12, 0x1b,
- 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x65, 0x63, 0x68, 0x6f,
- 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x2f, 0x7b, 0x6e, 0x75, 0x6d, 0x7d, 0x5a, 0x24, 0x12, 0x22, 0x2f,
- 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x2f,
- 0x7b, 0x69, 0x64, 0x7d, 0x2f, 0x7b, 0x6e, 0x75, 0x6d, 0x7d, 0x2f, 0x7b, 0x6c, 0x61, 0x6e, 0x67,
- 0x7d, 0x5a, 0x31, 0x12, 0x2f, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65,
- 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x31, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x2f, 0x7b, 0x6c, 0x69, 0x6e,
- 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x7d, 0x2f, 0x7b, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x6e,
- 0x6f, 0x74, 0x65, 0x7d, 0x5a, 0x1d, 0x12, 0x1b, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d,
- 0x70, 0x6c, 0x65, 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x32, 0x2f, 0x7b, 0x6e, 0x6f, 0x2e, 0x6e, 0x6f,
- 0x74, 0x65, 0x7d, 0x12, 0xaa, 0x01, 0x0a, 0x08, 0x45, 0x63, 0x68, 0x6f, 0x42, 0x6f, 0x64, 0x79,
+ 0xe4, 0x93, 0x02, 0xae, 0x01, 0x5a, 0x1d, 0x12, 0x1b, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61,
+ 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x2f, 0x7b,
+ 0x6e, 0x75, 0x6d, 0x7d, 0x5a, 0x24, 0x12, 0x22, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d,
+ 0x70, 0x6c, 0x65, 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x2f, 0x7b, 0x6e,
+ 0x75, 0x6d, 0x7d, 0x2f, 0x7b, 0x6c, 0x61, 0x6e, 0x67, 0x7d, 0x5a, 0x31, 0x12, 0x2f, 0x2f, 0x76,
+ 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x31, 0x2f,
+ 0x7b, 0x69, 0x64, 0x7d, 0x2f, 0x7b, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x7d, 0x2f,
+ 0x7b, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x6e, 0x6f, 0x74, 0x65, 0x7d, 0x5a, 0x1d, 0x12,
+ 0x1b, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x65, 0x63, 0x68,
+ 0x6f, 0x32, 0x2f, 0x7b, 0x6e, 0x6f, 0x2e, 0x6e, 0x6f, 0x74, 0x65, 0x7d, 0x22, 0x15, 0x2f, 0x76,
+ 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x2f, 0x7b,
+ 0x69, 0x64, 0x7d, 0x12, 0xcc, 0x01, 0x0a, 0x08, 0x45, 0x63, 0x68, 0x6f, 0x42, 0x6f, 0x64, 0x79,
0x12, 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,
@@ -454,38 +454,52 @@ var file_examples_internal_proto_examplepb_echo_service_proto_rawDesc = []byte{
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, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x20,
- 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x22, 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d,
- 0x70, 0x6c, 0x65, 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x3a, 0x01, 0x2a,
- 0x12, 0xab, 0x01, 0x0a, 0x0a, 0x45, 0x63, 0x68, 0x6f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12,
- 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, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x3d,
+ 0x2e, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x42,
+ 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3c, 0x3a, 0x01, 0x2a, 0x5a, 0x20, 0x3a, 0x02, 0x6e, 0x6f, 0x1a,
+ 0x1a, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x65, 0x63, 0x68,
+ 0x6f, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x22, 0x15, 0x2f, 0x76, 0x31,
+ 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x5f, 0x62, 0x6f,
+ 0x64, 0x79, 0x12, 0xab, 0x01, 0x0a, 0x0a, 0x45, 0x63, 0x68, 0x6f, 0x44, 0x65, 0x6c, 0x65, 0x74,
+ 0x65, 0x12, 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, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
+ 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, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22,
+ 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x2a, 0x17, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61,
+ 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65,
+ 0x12, 0xbd, 0x01, 0x0a, 0x09, 0x45, 0x63, 0x68, 0x6f, 0x50, 0x61, 0x74, 0x63, 0x68, 0x12, 0x44,
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,
- 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x1f, 0x82,
- 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x2a, 0x17, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70,
- 0x6c, 0x65, 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0xbd,
- 0x01, 0x0a, 0x09, 0x45, 0x63, 0x68, 0x6f, 0x50, 0x61, 0x74, 0x63, 0x68, 0x12, 0x44, 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, 0x44, 0x79,
- 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x55, 0x70, 0x64, 0x61,
- 0x74, 0x65, 0x1a, 0x44, 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, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4d, 0x65, 0x73, 0x73, 0x61,
- 0x67, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e,
- 0x32, 0x16, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x65, 0x63,
- 0x68, 0x6f, 0x5f, 0x70, 0x61, 0x74, 0x63, 0x68, 0x3a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x42, 0x4d,
- 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, 0x62, 0x06, 0x70,
- 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x55, 0x70,
+ 0x64, 0x61, 0x74, 0x65, 0x1a, 0x44, 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, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4d, 0x65, 0x73,
+ 0x73, 0x61, 0x67, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93,
+ 0x02, 0x1e, 0x3a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x32, 0x16, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78,
+ 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x5f, 0x70, 0x61, 0x74, 0x63, 0x68,
+ 0x12, 0xb7, 0x01, 0x0a, 0x10, 0x45, 0x63, 0x68, 0x6f, 0x55, 0x6e, 0x61, 0x75, 0x74, 0x68, 0x6f,
+ 0x72, 0x69, 0x7a, 0x65, 0x64, 0x12, 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, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x65, 0x73,
+ 0x73, 0x61, 0x67, 0x65, 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, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73,
+ 0x61, 0x67, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x12, 0x1d, 0x2f, 0x76, 0x31,
+ 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x5f, 0x75, 0x6e,
+ 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x42, 0x4d, 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, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x33,
}
var (
@@ -502,13 +516,13 @@ func file_examples_internal_proto_examplepb_echo_service_proto_rawDescGZIP() []b
var file_examples_internal_proto_examplepb_echo_service_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_examples_internal_proto_examplepb_echo_service_proto_goTypes = []interface{}{
- (*Embedded)(nil), // 0: grpc.gateway.examples.internal.proto.examplepb.Embedded
- (*SimpleMessage)(nil), // 1: grpc.gateway.examples.internal.proto.examplepb.SimpleMessage
- (*DynamicMessage)(nil), // 2: grpc.gateway.examples.internal.proto.examplepb.DynamicMessage
- (*DynamicMessageUpdate)(nil), // 3: grpc.gateway.examples.internal.proto.examplepb.DynamicMessageUpdate
- (*_struct.Struct)(nil), // 4: google.protobuf.Struct
- (*_struct.Value)(nil), // 5: google.protobuf.Value
- (*field_mask.FieldMask)(nil), // 6: google.protobuf.FieldMask
+ (*Embedded)(nil), // 0: grpc.gateway.examples.internal.proto.examplepb.Embedded
+ (*SimpleMessage)(nil), // 1: grpc.gateway.examples.internal.proto.examplepb.SimpleMessage
+ (*DynamicMessage)(nil), // 2: grpc.gateway.examples.internal.proto.examplepb.DynamicMessage
+ (*DynamicMessageUpdate)(nil), // 3: grpc.gateway.examples.internal.proto.examplepb.DynamicMessageUpdate
+ (*structpb.Struct)(nil), // 4: google.protobuf.Struct
+ (*structpb.Value)(nil), // 5: google.protobuf.Value
+ (*fieldmaskpb.FieldMask)(nil), // 6: google.protobuf.FieldMask
}
var file_examples_internal_proto_examplepb_echo_service_proto_depIdxs = []int32{
0, // 0: grpc.gateway.examples.internal.proto.examplepb.SimpleMessage.status:type_name -> grpc.gateway.examples.internal.proto.examplepb.Embedded
@@ -521,12 +535,14 @@ var file_examples_internal_proto_examplepb_echo_service_proto_depIdxs = []int32{
1, // 7: grpc.gateway.examples.internal.proto.examplepb.EchoService.EchoBody:input_type -> grpc.gateway.examples.internal.proto.examplepb.SimpleMessage
1, // 8: grpc.gateway.examples.internal.proto.examplepb.EchoService.EchoDelete:input_type -> grpc.gateway.examples.internal.proto.examplepb.SimpleMessage
3, // 9: grpc.gateway.examples.internal.proto.examplepb.EchoService.EchoPatch:input_type -> grpc.gateway.examples.internal.proto.examplepb.DynamicMessageUpdate
- 1, // 10: grpc.gateway.examples.internal.proto.examplepb.EchoService.Echo:output_type -> grpc.gateway.examples.internal.proto.examplepb.SimpleMessage
- 1, // 11: grpc.gateway.examples.internal.proto.examplepb.EchoService.EchoBody:output_type -> grpc.gateway.examples.internal.proto.examplepb.SimpleMessage
- 1, // 12: grpc.gateway.examples.internal.proto.examplepb.EchoService.EchoDelete:output_type -> grpc.gateway.examples.internal.proto.examplepb.SimpleMessage
- 3, // 13: grpc.gateway.examples.internal.proto.examplepb.EchoService.EchoPatch:output_type -> grpc.gateway.examples.internal.proto.examplepb.DynamicMessageUpdate
- 10, // [10:14] is the sub-list for method output_type
- 6, // [6:10] is the sub-list for method input_type
+ 1, // 10: grpc.gateway.examples.internal.proto.examplepb.EchoService.EchoUnauthorized:input_type -> grpc.gateway.examples.internal.proto.examplepb.SimpleMessage
+ 1, // 11: grpc.gateway.examples.internal.proto.examplepb.EchoService.Echo:output_type -> grpc.gateway.examples.internal.proto.examplepb.SimpleMessage
+ 1, // 12: grpc.gateway.examples.internal.proto.examplepb.EchoService.EchoBody:output_type -> grpc.gateway.examples.internal.proto.examplepb.SimpleMessage
+ 1, // 13: grpc.gateway.examples.internal.proto.examplepb.EchoService.EchoDelete:output_type -> grpc.gateway.examples.internal.proto.examplepb.SimpleMessage
+ 3, // 14: grpc.gateway.examples.internal.proto.examplepb.EchoService.EchoPatch:output_type -> grpc.gateway.examples.internal.proto.examplepb.DynamicMessageUpdate
+ 1, // 15: grpc.gateway.examples.internal.proto.examplepb.EchoService.EchoUnauthorized:output_type -> grpc.gateway.examples.internal.proto.examplepb.SimpleMessage
+ 11, // [11:16] is the sub-list for method output_type
+ 6, // [6:11] is the sub-list for method input_type
6, // [6:6] is the sub-list for extension type_name
6, // [6:6] is the sub-list for extension extendee
0, // [0:6] is the sub-list for field type_name
diff --git a/examples/internal/proto/examplepb/echo_service.pb.gw.go b/examples/internal/proto/examplepb/echo_service.pb.gw.go
index 7208f20b55d..8911d98d0ff 100644
--- a/examples/internal/proto/examplepb/echo_service.pb.gw.go
+++ b/examples/internal/proto/examplepb/echo_service.pb.gw.go
@@ -535,6 +535,102 @@ func local_request_EchoService_EchoBody_0(ctx context.Context, marshaler runtime
}
+var (
+ filter_EchoService_EchoBody_1 = &utilities.DoubleArray{Encoding: map[string]int{"no": 0, "id": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}}
+)
+
+func request_EchoService_EchoBody_1(ctx context.Context, marshaler runtime.Marshaler, client EchoServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq SimpleMessage
+ var metadata runtime.ServerMetadata
+
+ newReader, berr := utilities.IOReaderFactory(req.Body)
+ if berr != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
+ }
+ if protoReq.Ext == nil {
+ protoReq.Ext = &SimpleMessage_No{}
+ } else if _, ok := protoReq.Ext.(*SimpleMessage_No); !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "expect type: *SimpleMessage_No, but: %t\n", protoReq.Ext)
+ }
+ if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Ext.(*SimpleMessage_No).No); err != nil && err != io.EOF {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["id"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id")
+ }
+
+ protoReq.Id, err = runtime.String(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
+ }
+
+ if err := req.ParseForm(); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_EchoService_EchoBody_1); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := client.EchoBody(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_EchoService_EchoBody_1(ctx context.Context, marshaler runtime.Marshaler, server EchoServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq SimpleMessage
+ var metadata runtime.ServerMetadata
+
+ newReader, berr := utilities.IOReaderFactory(req.Body)
+ if berr != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
+ }
+ if protoReq.Ext == nil {
+ protoReq.Ext = &SimpleMessage_No{}
+ } else if _, ok := protoReq.Ext.(*SimpleMessage_No); !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "expect type: *SimpleMessage_No, but: %t\n", protoReq.Ext)
+ }
+ if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Ext.(*SimpleMessage_No).No); err != nil && err != io.EOF {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["id"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id")
+ }
+
+ protoReq.Id, err = runtime.String(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
+ }
+
+ if err := req.ParseForm(); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_EchoService_EchoBody_1); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := server.EchoBody(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
var (
filter_EchoService_EchoDelete_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
)
@@ -637,6 +733,42 @@ func local_request_EchoService_EchoPatch_0(ctx context.Context, marshaler runtim
}
+var (
+ filter_EchoService_EchoUnauthorized_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
+)
+
+func request_EchoService_EchoUnauthorized_0(ctx context.Context, marshaler runtime.Marshaler, client EchoServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq SimpleMessage
+ var metadata runtime.ServerMetadata
+
+ if err := req.ParseForm(); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_EchoService_EchoUnauthorized_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := client.EchoUnauthorized(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_EchoService_EchoUnauthorized_0(ctx context.Context, marshaler runtime.Marshaler, server EchoServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq SimpleMessage
+ var metadata runtime.ServerMetadata
+
+ if err := req.ParseForm(); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_EchoService_EchoUnauthorized_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := server.EchoUnauthorized(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
// RegisterEchoServiceHandlerServer registers the http handlers for service EchoService to "mux".
// UnaryRPC :call EchoServiceServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
@@ -649,20 +781,22 @@ func RegisterEchoServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.EchoService/Echo")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.EchoService/Echo", runtime.WithHTTPPathPattern("/v1/example/echo/{id}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_EchoService_Echo_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_EchoService_Echo_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_EchoService_Echo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_EchoService_Echo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -672,20 +806,22 @@ func RegisterEchoServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.EchoService/Echo")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.EchoService/Echo", runtime.WithHTTPPathPattern("/v1/example/echo/{id}/{num}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_EchoService_Echo_1(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_EchoService_Echo_1(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_EchoService_Echo_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_EchoService_Echo_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -695,20 +831,22 @@ func RegisterEchoServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.EchoService/Echo")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.EchoService/Echo", runtime.WithHTTPPathPattern("/v1/example/echo/{id}/{num}/{lang}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_EchoService_Echo_2(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_EchoService_Echo_2(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_EchoService_Echo_2(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_EchoService_Echo_2(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -718,20 +856,22 @@ func RegisterEchoServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.EchoService/Echo")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.EchoService/Echo", runtime.WithHTTPPathPattern("/v1/example/echo1/{id}/{line_num}/{status.note}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_EchoService_Echo_3(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_EchoService_Echo_3(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_EchoService_Echo_3(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_EchoService_Echo_3(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -741,20 +881,22 @@ func RegisterEchoServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.EchoService/Echo")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.EchoService/Echo", runtime.WithHTTPPathPattern("/v1/example/echo2/{no.note}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_EchoService_Echo_4(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_EchoService_Echo_4(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_EchoService_Echo_4(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_EchoService_Echo_4(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -764,20 +906,47 @@ func RegisterEchoServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.EchoService/EchoBody")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.EchoService/EchoBody", runtime.WithHTTPPathPattern("/v1/example/echo_body"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_EchoService_EchoBody_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_EchoService_EchoBody_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_EchoService_EchoBody_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("PUT", pattern_EchoService_EchoBody_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.EchoService/EchoBody", runtime.WithHTTPPathPattern("/v1/example/echo_body/{id}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
+ resp, md, err := local_request_EchoService_EchoBody_1(annotatedContext, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
- forward_EchoService_EchoBody_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_EchoService_EchoBody_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -787,20 +956,22 @@ func RegisterEchoServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.EchoService/EchoDelete")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.EchoService/EchoDelete", runtime.WithHTTPPathPattern("/v1/example/echo_delete"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_EchoService_EchoDelete_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_EchoService_EchoDelete_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_EchoService_EchoDelete_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_EchoService_EchoDelete_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -810,20 +981,47 @@ func RegisterEchoServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.EchoService/EchoPatch")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.EchoService/EchoPatch", runtime.WithHTTPPathPattern("/v1/example/echo_patch"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_EchoService_EchoPatch_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_EchoService_EchoPatch_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_EchoService_EchoPatch_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("GET", pattern_EchoService_EchoUnauthorized_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.EchoService/EchoUnauthorized", runtime.WithHTTPPathPattern("/v1/example/echo_unauthorized"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
+ resp, md, err := local_request_EchoService_EchoUnauthorized_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
- forward_EchoService_EchoPatch_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_EchoService_EchoUnauthorized_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -872,19 +1070,21 @@ func RegisterEchoServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.EchoService/Echo")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.EchoService/Echo", runtime.WithHTTPPathPattern("/v1/example/echo/{id}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_EchoService_Echo_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_EchoService_Echo_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_EchoService_Echo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_EchoService_Echo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -892,19 +1092,21 @@ func RegisterEchoServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.EchoService/Echo")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.EchoService/Echo", runtime.WithHTTPPathPattern("/v1/example/echo/{id}/{num}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_EchoService_Echo_1(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_EchoService_Echo_1(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_EchoService_Echo_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_EchoService_Echo_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -912,19 +1114,21 @@ func RegisterEchoServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.EchoService/Echo")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.EchoService/Echo", runtime.WithHTTPPathPattern("/v1/example/echo/{id}/{num}/{lang}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_EchoService_Echo_2(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_EchoService_Echo_2(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_EchoService_Echo_2(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_EchoService_Echo_2(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -932,19 +1136,21 @@ func RegisterEchoServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.EchoService/Echo")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.EchoService/Echo", runtime.WithHTTPPathPattern("/v1/example/echo1/{id}/{line_num}/{status.note}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_EchoService_Echo_3(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_EchoService_Echo_3(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_EchoService_Echo_3(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_EchoService_Echo_3(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -952,19 +1158,21 @@ func RegisterEchoServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.EchoService/Echo")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.EchoService/Echo", runtime.WithHTTPPathPattern("/v1/example/echo2/{no.note}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_EchoService_Echo_4(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_EchoService_Echo_4(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_EchoService_Echo_4(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_EchoService_Echo_4(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -972,19 +1180,43 @@ func RegisterEchoServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.EchoService/EchoBody")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.EchoService/EchoBody", runtime.WithHTTPPathPattern("/v1/example/echo_body"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_EchoService_EchoBody_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_EchoService_EchoBody_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_EchoService_EchoBody_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("PUT", pattern_EchoService_EchoBody_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.EchoService/EchoBody", runtime.WithHTTPPathPattern("/v1/example/echo_body/{id}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
+ resp, md, err := request_EchoService_EchoBody_1(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
- forward_EchoService_EchoBody_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_EchoService_EchoBody_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -992,19 +1224,21 @@ func RegisterEchoServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.EchoService/EchoDelete")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.EchoService/EchoDelete", runtime.WithHTTPPathPattern("/v1/example/echo_delete"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_EchoService_EchoDelete_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_EchoService_EchoDelete_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_EchoService_EchoDelete_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_EchoService_EchoDelete_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -1012,19 +1246,43 @@ func RegisterEchoServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.EchoService/EchoPatch")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.EchoService/EchoPatch", runtime.WithHTTPPathPattern("/v1/example/echo_patch"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_EchoService_EchoPatch_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_EchoService_EchoPatch_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_EchoService_EchoPatch_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("GET", pattern_EchoService_EchoUnauthorized_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.EchoService/EchoUnauthorized", runtime.WithHTTPPathPattern("/v1/example/echo_unauthorized"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
+ resp, md, err := request_EchoService_EchoUnauthorized_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
- forward_EchoService_EchoPatch_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_EchoService_EchoUnauthorized_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -1044,9 +1302,13 @@ var (
pattern_EchoService_EchoBody_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "example", "echo_body"}, ""))
+ pattern_EchoService_EchoBody_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v1", "example", "echo_body", "id"}, ""))
+
pattern_EchoService_EchoDelete_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "example", "echo_delete"}, ""))
pattern_EchoService_EchoPatch_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "example", "echo_patch"}, ""))
+
+ pattern_EchoService_EchoUnauthorized_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "example", "echo_unauthorized"}, ""))
)
var (
@@ -1062,7 +1324,11 @@ var (
forward_EchoService_EchoBody_0 = runtime.ForwardResponseMessage
+ forward_EchoService_EchoBody_1 = runtime.ForwardResponseMessage
+
forward_EchoService_EchoDelete_0 = runtime.ForwardResponseMessage
forward_EchoService_EchoPatch_0 = runtime.ForwardResponseMessage
+
+ forward_EchoService_EchoUnauthorized_0 = runtime.ForwardResponseMessage
)
diff --git a/examples/internal/proto/examplepb/echo_service.proto b/examples/internal/proto/examplepb/echo_service.proto
index cf0e8567412..7295b6976eb 100644
--- a/examples/internal/proto/examplepb/echo_service.proto
+++ b/examples/internal/proto/examplepb/echo_service.proto
@@ -1,5 +1,4 @@
syntax = "proto3";
-option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/examplepb";
// Echo Service
//
@@ -11,83 +10,97 @@ import "google/api/annotations.proto";
import "google/protobuf/field_mask.proto";
import "google/protobuf/struct.proto";
+option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/examplepb";
+
// Embedded represents a message embedded in SimpleMessage.
message Embedded {
- oneof mark {
- int64 progress = 1;
- string note = 2;
- }
+ oneof mark {
+ int64 progress = 1;
+ string note = 2;
+ }
}
// SimpleMessage represents a simple message sent to the Echo service.
message SimpleMessage {
- // Id represents the message identifier.
- string id = 1;
- int64 num = 2;
- oneof code {
- int64 line_num = 3;
- string lang = 4;
- }
- Embedded status = 5;
- oneof ext {
- int64 en = 6;
- Embedded no = 7;
- }
+ // Id represents the message identifier.
+ string id = 1;
+ int64 num = 2;
+ oneof code {
+ int64 line_num = 3;
+ string lang = 4;
+ }
+ Embedded status = 5;
+ oneof ext {
+ int64 en = 6;
+ Embedded no = 7;
+ }
}
// DynamicMessage represents a message which can have its structure
// built dynamically using Struct and Values.
message DynamicMessage {
- google.protobuf.Struct struct_field = 1;
- google.protobuf.Value value_field = 2;
+ google.protobuf.Struct struct_field = 1;
+ google.protobuf.Value value_field = 2;
}
message DynamicMessageUpdate {
- DynamicMessage body = 1;
- google.protobuf.FieldMask update_mask = 2;
+ DynamicMessage body = 1;
+ google.protobuf.FieldMask update_mask = 2;
}
// Echo service responds to incoming echo requests.
service EchoService {
- // Echo method receives a simple message and returns it.
- //
- // The message posted as the id parameter will also be
- // returned.
- rpc Echo(SimpleMessage) returns (SimpleMessage) {
- option (google.api.http) = {
- post: "/v1/example/echo/{id}"
- additional_bindings {
- get: "/v1/example/echo/{id}/{num}"
- }
- additional_bindings {
- get: "/v1/example/echo/{id}/{num}/{lang}"
- }
- additional_bindings {
- get: "/v1/example/echo1/{id}/{line_num}/{status.note}"
- }
- additional_bindings {
- get: "/v1/example/echo2/{no.note}"
- }
- };
- }
- // EchoBody method receives a simple message and returns it.
- rpc EchoBody(SimpleMessage) returns (SimpleMessage) {
- option (google.api.http) = {
- post: "/v1/example/echo_body"
- body: "*"
- };
- }
- // EchoDelete method receives a simple message and returns it.
- rpc EchoDelete(SimpleMessage) returns (SimpleMessage) {
- option (google.api.http) = {
- delete: "/v1/example/echo_delete"
- };
- }
- // EchoPatch method receives a NonStandardUpdateRequest and returns it.
- rpc EchoPatch(DynamicMessageUpdate) returns (DynamicMessageUpdate) {
- option (google.api.http) = {
- patch: "/v1/example/echo_patch"
- body: "body"
- };
- }
+ // Echo method receives a simple message and returns it.
+ //
+ // The message posted as the id parameter will also be
+ // returned.
+ rpc Echo(SimpleMessage) returns (SimpleMessage) {
+ option (google.api.http) = {
+ post: "/v1/example/echo/{id}"
+ additional_bindings {
+ get: "/v1/example/echo/{id}/{num}"
+ }
+ additional_bindings {
+ get: "/v1/example/echo/{id}/{num}/{lang}"
+ }
+ additional_bindings {
+ get: "/v1/example/echo1/{id}/{line_num}/{status.note}"
+ }
+ additional_bindings {
+ get: "/v1/example/echo2/{no.note}"
+ }
+ };
+ }
+ // EchoBody method receives a simple message and returns it.
+ rpc EchoBody(SimpleMessage) returns (SimpleMessage) {
+ option (google.api.http) = {
+ post: "/v1/example/echo_body"
+ body: "*"
+ additional_bindings {
+ put: "/v1/example/echo_body/{id}"
+ body: "no"
+ }
+ };
+ }
+ // EchoDelete method receives a simple message and returns it.
+ rpc EchoDelete(SimpleMessage) returns (SimpleMessage) {
+ option (google.api.http) = {
+ delete: "/v1/example/echo_delete"
+ };
+ }
+ // EchoPatch method receives a NonStandardUpdateRequest and returns it.
+ rpc EchoPatch(DynamicMessageUpdate) returns (DynamicMessageUpdate) {
+ option (google.api.http) = {
+ patch: "/v1/example/echo_patch"
+ body: "body"
+ };
+ }
+ // EchoUnauthorized method receives a simple message and returns it. It must
+ // always return a google.rpc.Code of `UNAUTHENTICATED` and a HTTP Status code
+ // of 401.
+ rpc EchoUnauthorized(SimpleMessage) returns (SimpleMessage) {
+ option (google.api.http) = {
+ get: "/v1/example/echo_unauthorized"
+ };
+ }
}
diff --git a/examples/internal/proto/examplepb/echo_service.swagger.json b/examples/internal/proto/examplepb/echo_service.swagger.json
index 56d237f68ef..20d4864eac6 100644
--- a/examples/internal/proto/examplepb/echo_service.swagger.json
+++ b/examples/internal/proto/examplepb/echo_service.swagger.json
@@ -43,6 +43,59 @@
"in": "path",
"required": true,
"type": "string"
+ },
+ {
+ "name": "num",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "lineNum",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "lang",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "status.progress",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "status.note",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "en",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "no.progress",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "no.note",
+ "in": "query",
+ "required": false,
+ "type": "string"
}
],
"tags": [
@@ -403,6 +456,7 @@
"parameters": [
{
"name": "body",
+ "description": "SimpleMessage represents a simple message sent to the Echo service.",
"in": "body",
"required": true,
"schema": {
@@ -415,6 +469,86 @@
]
}
},
+ "/v1/example/echo_body/{id}": {
+ "put": {
+ "summary": "EchoBody method receives a simple message and returns it.",
+ "operationId": "EchoService_EchoBody2",
+ "responses": {
+ "200": {
+ "description": "A successful response.",
+ "schema": {
+ "$ref": "#/definitions/examplepbSimpleMessage"
+ }
+ },
+ "default": {
+ "description": "An unexpected error response.",
+ "schema": {
+ "$ref": "#/definitions/rpcStatus"
+ }
+ }
+ },
+ "parameters": [
+ {
+ "name": "id",
+ "description": "Id represents the message identifier.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "no",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/examplepbEmbedded"
+ }
+ },
+ {
+ "name": "num",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "lineNum",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "lang",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "status.progress",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "status.note",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "en",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ }
+ ],
+ "tags": [
+ "EchoService"
+ ]
+ }
+ },
"/v1/example/echo_delete": {
"delete": {
"summary": "EchoDelete method receives a simple message and returns it.",
@@ -538,6 +672,91 @@
"EchoService"
]
}
+ },
+ "/v1/example/echo_unauthorized": {
+ "get": {
+ "summary": "EchoUnauthorized method receives a simple message and returns it. It must\nalways return a google.rpc.Code of `UNAUTHENTICATED` and a HTTP Status code\nof 401.",
+ "operationId": "EchoService_EchoUnauthorized",
+ "responses": {
+ "200": {
+ "description": "A successful response.",
+ "schema": {
+ "$ref": "#/definitions/examplepbSimpleMessage"
+ }
+ },
+ "default": {
+ "description": "An unexpected error response.",
+ "schema": {
+ "$ref": "#/definitions/rpcStatus"
+ }
+ }
+ },
+ "parameters": [
+ {
+ "name": "id",
+ "description": "Id represents the message identifier.",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "num",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "lineNum",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "lang",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "status.progress",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "status.note",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "en",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "no.progress",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "no.note",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ }
+ ],
+ "tags": [
+ "EchoService"
+ ]
+ }
}
},
"definitions": {
@@ -547,9 +766,7 @@
"structField": {
"type": "object"
},
- "valueField": {
- "type": "object"
- }
+ "valueField": {}
},
"description": "DynamicMessage represents a message which can have its structure\nbuilt dynamically using Struct and Values."
},
@@ -611,17 +828,13 @@
"protobufAny": {
"type": "object",
"properties": {
- "typeUrl": {
+ "@type": {
"type": "string",
"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",
- "format": "byte",
- "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\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 }"
+ "additionalProperties": {},
+ "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 := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(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 }"
},
"protobufNullValue": {
"type": "string",
diff --git a/examples/internal/proto/examplepb/echo_service_grpc.pb.go b/examples/internal/proto/examplepb/echo_service_grpc.pb.go
index 36e2c2e74f6..fe72dad84c8 100644
--- a/examples/internal/proto/examplepb/echo_service_grpc.pb.go
+++ b/examples/internal/proto/examplepb/echo_service_grpc.pb.go
@@ -11,6 +11,7 @@ import (
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
+// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// EchoServiceClient is the client API for EchoService service.
@@ -28,6 +29,10 @@ type EchoServiceClient interface {
EchoDelete(ctx context.Context, in *SimpleMessage, opts ...grpc.CallOption) (*SimpleMessage, error)
// EchoPatch method receives a NonStandardUpdateRequest and returns it.
EchoPatch(ctx context.Context, in *DynamicMessageUpdate, opts ...grpc.CallOption) (*DynamicMessageUpdate, error)
+ // EchoUnauthorized method receives a simple message and returns it. It must
+ // always return a google.rpc.Code of `UNAUTHENTICATED` and a HTTP Status code
+ // of 401.
+ EchoUnauthorized(ctx context.Context, in *SimpleMessage, opts ...grpc.CallOption) (*SimpleMessage, error)
}
type echoServiceClient struct {
@@ -74,6 +79,15 @@ func (c *echoServiceClient) EchoPatch(ctx context.Context, in *DynamicMessageUpd
return out, nil
}
+func (c *echoServiceClient) EchoUnauthorized(ctx context.Context, in *SimpleMessage, opts ...grpc.CallOption) (*SimpleMessage, error) {
+ out := new(SimpleMessage)
+ err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.proto.examplepb.EchoService/EchoUnauthorized", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
// EchoServiceServer is the server API for EchoService service.
// All implementations should embed UnimplementedEchoServiceServer
// for forward compatibility
@@ -89,6 +103,10 @@ type EchoServiceServer interface {
EchoDelete(context.Context, *SimpleMessage) (*SimpleMessage, error)
// EchoPatch method receives a NonStandardUpdateRequest and returns it.
EchoPatch(context.Context, *DynamicMessageUpdate) (*DynamicMessageUpdate, error)
+ // EchoUnauthorized method receives a simple message and returns it. It must
+ // always return a google.rpc.Code of `UNAUTHENTICATED` and a HTTP Status code
+ // of 401.
+ EchoUnauthorized(context.Context, *SimpleMessage) (*SimpleMessage, error)
}
// UnimplementedEchoServiceServer should be embedded to have forward compatible implementations.
@@ -107,6 +125,9 @@ func (UnimplementedEchoServiceServer) EchoDelete(context.Context, *SimpleMessage
func (UnimplementedEchoServiceServer) EchoPatch(context.Context, *DynamicMessageUpdate) (*DynamicMessageUpdate, error) {
return nil, status.Errorf(codes.Unimplemented, "method EchoPatch not implemented")
}
+func (UnimplementedEchoServiceServer) EchoUnauthorized(context.Context, *SimpleMessage) (*SimpleMessage, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method EchoUnauthorized not implemented")
+}
// UnsafeEchoServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to EchoServiceServer will
@@ -115,8 +136,8 @@ type UnsafeEchoServiceServer interface {
mustEmbedUnimplementedEchoServiceServer()
}
-func RegisterEchoServiceServer(s *grpc.Server, srv EchoServiceServer) {
- s.RegisterService(&_EchoService_serviceDesc, srv)
+func RegisterEchoServiceServer(s grpc.ServiceRegistrar, srv EchoServiceServer) {
+ s.RegisterService(&EchoService_ServiceDesc, srv)
}
func _EchoService_Echo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
@@ -191,7 +212,28 @@ func _EchoService_EchoPatch_Handler(srv interface{}, ctx context.Context, dec fu
return interceptor(ctx, in, info, handler)
}
-var _EchoService_serviceDesc = grpc.ServiceDesc{
+func _EchoService_EchoUnauthorized_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(SimpleMessage)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(EchoServiceServer).EchoUnauthorized(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/grpc.gateway.examples.internal.proto.examplepb.EchoService/EchoUnauthorized",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(EchoServiceServer).EchoUnauthorized(ctx, req.(*SimpleMessage))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+// EchoService_ServiceDesc is the grpc.ServiceDesc for EchoService service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var EchoService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "grpc.gateway.examples.internal.proto.examplepb.EchoService",
HandlerType: (*EchoServiceServer)(nil),
Methods: []grpc.MethodDesc{
@@ -211,6 +253,10 @@ var _EchoService_serviceDesc = grpc.ServiceDesc{
MethodName: "EchoPatch",
Handler: _EchoService_EchoPatch_Handler,
},
+ {
+ MethodName: "EchoUnauthorized",
+ Handler: _EchoService_EchoUnauthorized_Handler,
+ },
},
Streams: []grpc.StreamDesc{},
Metadata: "examples/internal/proto/examplepb/echo_service.proto",
diff --git a/examples/internal/proto/examplepb/flow_combination.pb.go b/examples/internal/proto/examplepb/flow_combination.pb.go
index 30b7bc2a2c7..60e754b45fc 100644
--- a/examples/internal/proto/examplepb/flow_combination.pb.go
+++ b/examples/internal/proto/examplepb/flow_combination.pb.go
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.26.0
-// protoc v3.13.0
+// protoc-gen-go v1.27.1
+// protoc (unknown)
// source: examples/internal/proto/examplepb/flow_combination.proto
package examplepb
@@ -310,7 +310,7 @@ var file_examples_internal_proto_examplepb_flow_combination_proto_rawDesc = []by
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, 0x55, 0x6e, 0x61, 0x72, 0x79, 0x50, 0x72, 0x6f,
- 0x74, 0x6f, 0x52, 0x01, 0x61, 0x32, 0xf9, 0x11, 0x0a, 0x0f, 0x46, 0x6c, 0x6f, 0x77, 0x43, 0x6f,
+ 0x74, 0x6f, 0x52, 0x01, 0x61, 0x32, 0xfd, 0x11, 0x0a, 0x0f, 0x46, 0x6c, 0x6f, 0x77, 0x43, 0x6f,
0x6d, 0x62, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x9d, 0x01, 0x0a, 0x0b, 0x52, 0x70,
0x63, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x70, 0x63, 0x12, 0x3a, 0x2e, 0x67, 0x72, 0x70, 0x63,
0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65,
@@ -362,19 +362,19 @@ var file_examples_internal_proto_examplepb_flow_combination_proto_rawDesc = []by
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, 0x6d, 0x70, 0x74, 0x79, 0x50, 0x72,
- 0x6f, 0x74, 0x6f, 0x22, 0xc1, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0xba, 0x01, 0x22, 0x0d, 0x2f,
- 0x72, 0x70, 0x63, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x2f, 0x72, 0x70, 0x63, 0x3a, 0x01, 0x2a, 0x5a,
- 0x1b, 0x22, 0x19, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x61, 0x74, 0x68, 0x2f, 0x7b, 0x61, 0x7d,
- 0x2f, 0x7b, 0x62, 0x7d, 0x2f, 0x7b, 0x63, 0x7d, 0x2f, 0x72, 0x70, 0x63, 0x5a, 0x10, 0x22, 0x0e,
- 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x72, 0x70, 0x63, 0x5a, 0x1f,
- 0x22, 0x1a, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x2f, 0x70, 0x61, 0x74, 0x68,
- 0x2f, 0x7b, 0x61, 0x7d, 0x2f, 0x7b, 0x62, 0x7d, 0x2f, 0x72, 0x70, 0x63, 0x3a, 0x01, 0x63, 0x5a,
- 0x18, 0x22, 0x13, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x2f, 0x71, 0x75, 0x65,
- 0x72, 0x79, 0x2f, 0x72, 0x70, 0x63, 0x3a, 0x01, 0x63, 0x5a, 0x21, 0x22, 0x1c, 0x2f, 0x72, 0x70,
- 0x63, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x2f, 0x70, 0x61, 0x74, 0x68, 0x2f, 0x7b, 0x61, 0x7d, 0x2f,
- 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x72, 0x70, 0x63, 0x3a, 0x01, 0x63, 0x5a, 0x19, 0x22, 0x17,
- 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x61, 0x74, 0x68, 0x2f, 0x7b, 0x61, 0x7d, 0x2f, 0x71, 0x75,
- 0x65, 0x72, 0x79, 0x2f, 0x72, 0x70, 0x63, 0x12, 0xbd, 0x01, 0x0a, 0x16, 0x52, 0x70, 0x63, 0x50,
+ 0x6f, 0x74, 0x6f, 0x22, 0xc1, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0xba, 0x01, 0x3a, 0x01, 0x2a,
+ 0x5a, 0x1b, 0x22, 0x19, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x61, 0x74, 0x68, 0x2f, 0x7b, 0x61,
+ 0x7d, 0x2f, 0x7b, 0x62, 0x7d, 0x2f, 0x7b, 0x63, 0x7d, 0x2f, 0x72, 0x70, 0x63, 0x5a, 0x10, 0x22,
+ 0x0e, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x72, 0x70, 0x63, 0x5a,
+ 0x1f, 0x3a, 0x01, 0x63, 0x22, 0x1a, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x2f,
+ 0x70, 0x61, 0x74, 0x68, 0x2f, 0x7b, 0x61, 0x7d, 0x2f, 0x7b, 0x62, 0x7d, 0x2f, 0x72, 0x70, 0x63,
+ 0x5a, 0x18, 0x3a, 0x01, 0x63, 0x22, 0x13, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x62, 0x6f, 0x64, 0x79,
+ 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x72, 0x70, 0x63, 0x5a, 0x21, 0x3a, 0x01, 0x63, 0x22,
+ 0x1c, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x2f, 0x70, 0x61, 0x74, 0x68, 0x2f,
+ 0x7b, 0x61, 0x7d, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x72, 0x70, 0x63, 0x5a, 0x19, 0x22,
+ 0x17, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x61, 0x74, 0x68, 0x2f, 0x7b, 0x61, 0x7d, 0x2f, 0x71,
+ 0x75, 0x65, 0x72, 0x79, 0x2f, 0x72, 0x70, 0x63, 0x22, 0x0d, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x62,
+ 0x6f, 0x64, 0x79, 0x2f, 0x72, 0x70, 0x63, 0x12, 0xbd, 0x01, 0x0a, 0x16, 0x52, 0x70, 0x63, 0x50,
0x61, 0x74, 0x68, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x52,
0x70, 0x63, 0x12, 0x41, 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,
@@ -386,7 +386,7 @@ var file_examples_internal_proto_examplepb_flow_combination_proto_rawDesc = []by
0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x74,
0x6f, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x22, 0x1c, 0x2f, 0x72, 0x70, 0x63, 0x2f,
0x70, 0x61, 0x74, 0x68, 0x2d, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x2f, 0x7b, 0x61, 0x2e, 0x73,
- 0x74, 0x72, 0x7d, 0x2f, 0x72, 0x70, 0x63, 0x12, 0xfb, 0x01, 0x0a, 0x10, 0x52, 0x70, 0x63, 0x50,
+ 0x74, 0x72, 0x7d, 0x2f, 0x72, 0x70, 0x63, 0x12, 0xfd, 0x01, 0x0a, 0x10, 0x52, 0x70, 0x63, 0x50,
0x61, 0x74, 0x68, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x52, 0x70, 0x63, 0x12, 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,
@@ -395,71 +395,71 @@ var file_examples_internal_proto_examplepb_flow_combination_proto_rawDesc = []by
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, 0x6d, 0x70, 0x74, 0x79,
- 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x68, 0x22, 0x20, 0x2f,
- 0x72, 0x70, 0x63, 0x2f, 0x70, 0x61, 0x74, 0x68, 0x2d, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x2f,
- 0x7b, 0x61, 0x2e, 0x73, 0x74, 0x72, 0x7d, 0x2f, 0x7b, 0x62, 0x7d, 0x2f, 0x72, 0x70, 0x63, 0x3a,
- 0x01, 0x63, 0x5a, 0x1e, 0x22, 0x1c, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x61, 0x74, 0x68, 0x2d,
- 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x2f, 0x7b, 0x61, 0x2e, 0x73, 0x74, 0x72, 0x7d, 0x2f, 0x72,
- 0x70, 0x63, 0x5a, 0x21, 0x22, 0x1c, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x61, 0x74, 0x68, 0x2d,
- 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x2f, 0x7b, 0x61, 0x2e, 0x73, 0x74, 0x72, 0x7d, 0x2f, 0x72,
- 0x70, 0x63, 0x3a, 0x01, 0x63, 0x12, 0xe5, 0x02, 0x0a, 0x0d, 0x52, 0x70, 0x63, 0x42, 0x6f, 0x64,
- 0x79, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 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, 0x4e, 0x6f, 0x6e, 0x45, 0x6d, 0x70, 0x74,
- 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x3a, 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, 0x6d, 0x70, 0x74, 0x79, 0x50, 0x72, 0x6f,
- 0x74, 0x6f, 0x22, 0xd6, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0xcf, 0x01, 0x22, 0x10, 0x2f, 0x72,
- 0x70, 0x63, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x3a, 0x01,
+ 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x70, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x6a, 0x3a, 0x01, 0x63,
+ 0x5a, 0x1f, 0x22, 0x1d, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x61, 0x74, 0x68, 0x2d, 0x6e, 0x65,
+ 0x73, 0x74, 0x65, 0x64, 0x31, 0x2f, 0x7b, 0x61, 0x2e, 0x73, 0x74, 0x72, 0x7d, 0x2f, 0x72, 0x70,
+ 0x63, 0x5a, 0x22, 0x3a, 0x01, 0x63, 0x22, 0x1d, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x61, 0x74,
+ 0x68, 0x2d, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x32, 0x2f, 0x7b, 0x61, 0x2e, 0x73, 0x74, 0x72,
+ 0x7d, 0x2f, 0x72, 0x70, 0x63, 0x22, 0x20, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x61, 0x74, 0x68,
+ 0x2d, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x2f, 0x7b, 0x61, 0x2e, 0x73, 0x74, 0x72, 0x7d, 0x2f,
+ 0x7b, 0x62, 0x7d, 0x2f, 0x72, 0x70, 0x63, 0x12, 0xe5, 0x02, 0x0a, 0x0d, 0x52, 0x70, 0x63, 0x42,
+ 0x6f, 0x64, 0x79, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 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, 0x4e, 0x6f, 0x6e, 0x45, 0x6d,
+ 0x70, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x3a, 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, 0x6d, 0x70, 0x74, 0x79, 0x50,
+ 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd6, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0xcf, 0x01, 0x3a, 0x01,
0x2a, 0x5a, 0x1e, 0x22, 0x1c, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x61, 0x74, 0x68, 0x2f, 0x7b,
0x61, 0x7d, 0x2f, 0x7b, 0x62, 0x7d, 0x2f, 0x7b, 0x63, 0x7d, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61,
0x6d, 0x5a, 0x13, 0x22, 0x11, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f,
- 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5a, 0x22, 0x22, 0x1d, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x62,
- 0x6f, 0x64, 0x79, 0x2f, 0x70, 0x61, 0x74, 0x68, 0x2f, 0x7b, 0x61, 0x7d, 0x2f, 0x7b, 0x62, 0x7d,
- 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x3a, 0x01, 0x63, 0x5a, 0x1b, 0x22, 0x16, 0x2f, 0x72,
- 0x70, 0x63, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x73, 0x74,
- 0x72, 0x65, 0x61, 0x6d, 0x3a, 0x01, 0x63, 0x5a, 0x24, 0x22, 0x1f, 0x2f, 0x72, 0x70, 0x63, 0x2f,
- 0x62, 0x6f, 0x64, 0x79, 0x2f, 0x70, 0x61, 0x74, 0x68, 0x2f, 0x7b, 0x61, 0x7d, 0x2f, 0x71, 0x75,
- 0x65, 0x72, 0x79, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x3a, 0x01, 0x63, 0x5a, 0x1c, 0x22,
+ 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5a, 0x22, 0x3a, 0x01, 0x63, 0x22, 0x1d, 0x2f, 0x72, 0x70,
+ 0x63, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x2f, 0x70, 0x61, 0x74, 0x68, 0x2f, 0x7b, 0x61, 0x7d, 0x2f,
+ 0x7b, 0x62, 0x7d, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5a, 0x1b, 0x3a, 0x01, 0x63, 0x22,
+ 0x16, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79,
+ 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5a, 0x24, 0x3a, 0x01, 0x63, 0x22, 0x1f, 0x2f, 0x72,
+ 0x70, 0x63, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x2f, 0x70, 0x61, 0x74, 0x68, 0x2f, 0x7b, 0x61, 0x7d,
+ 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5a, 0x1c, 0x22,
0x1a, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x61, 0x74, 0x68, 0x2f, 0x7b, 0x61, 0x7d, 0x2f, 0x71,
- 0x75, 0x65, 0x72, 0x79, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x30, 0x01, 0x12, 0xc5, 0x01,
- 0x0a, 0x19, 0x52, 0x70, 0x63, 0x50, 0x61, 0x74, 0x68, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x4e,
- 0x65, 0x73, 0x74, 0x65, 0x64, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x41, 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, 0x53, 0x69, 0x6e,
- 0x67, 0x6c, 0x65, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x3a,
- 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, 0x6d, 0x70, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93,
- 0x02, 0x21, 0x22, 0x1f, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x61, 0x74, 0x68, 0x2d, 0x6e, 0x65,
- 0x73, 0x74, 0x65, 0x64, 0x2f, 0x7b, 0x61, 0x2e, 0x73, 0x74, 0x72, 0x7d, 0x2f, 0x73, 0x74, 0x72,
- 0x65, 0x61, 0x6d, 0x30, 0x01, 0x12, 0x89, 0x02, 0x0a, 0x13, 0x52, 0x70, 0x63, 0x50, 0x61, 0x74,
- 0x68, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x3b, 0x2e,
+ 0x75, 0x65, 0x72, 0x79, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x22, 0x10, 0x2f, 0x72, 0x70,
+ 0x63, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x30, 0x01, 0x12,
+ 0xc5, 0x01, 0x0a, 0x19, 0x52, 0x70, 0x63, 0x50, 0x61, 0x74, 0x68, 0x53, 0x69, 0x6e, 0x67, 0x6c,
+ 0x65, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x41, 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,
- 0x65, 0x73, 0x74, 0x65, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x3a, 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, 0x6d, 0x70, 0x74,
- 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x77, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x71, 0x22, 0x23,
+ 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x53,
+ 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f,
+ 0x1a, 0x3a, 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, 0x6d, 0x70, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x27, 0x82, 0xd3,
+ 0xe4, 0x93, 0x02, 0x21, 0x22, 0x1f, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x61, 0x74, 0x68, 0x2d,
+ 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x2f, 0x7b, 0x61, 0x2e, 0x73, 0x74, 0x72, 0x7d, 0x2f, 0x73,
+ 0x74, 0x72, 0x65, 0x61, 0x6d, 0x30, 0x01, 0x12, 0x8b, 0x02, 0x0a, 0x13, 0x52, 0x70, 0x63, 0x50,
+ 0x61, 0x74, 0x68, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12,
+ 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, 0x65, 0x73, 0x74, 0x65, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x3a, 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, 0x6d,
+ 0x70, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x79, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x73,
+ 0x3a, 0x01, 0x63, 0x5a, 0x22, 0x22, 0x20, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x61, 0x74, 0x68,
+ 0x2d, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x31, 0x2f, 0x7b, 0x61, 0x2e, 0x73, 0x74, 0x72, 0x7d,
+ 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5a, 0x25, 0x3a, 0x01, 0x63, 0x22, 0x20, 0x2f, 0x72,
+ 0x70, 0x63, 0x2f, 0x70, 0x61, 0x74, 0x68, 0x2d, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x32, 0x2f,
+ 0x7b, 0x61, 0x2e, 0x73, 0x74, 0x72, 0x7d, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x22, 0x23,
0x2f, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x61, 0x74, 0x68, 0x2d, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64,
0x2f, 0x7b, 0x61, 0x2e, 0x73, 0x74, 0x72, 0x7d, 0x2f, 0x7b, 0x62, 0x7d, 0x2f, 0x73, 0x74, 0x72,
- 0x65, 0x61, 0x6d, 0x3a, 0x01, 0x63, 0x5a, 0x21, 0x22, 0x1f, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x70,
- 0x61, 0x74, 0x68, 0x2d, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x2f, 0x7b, 0x61, 0x2e, 0x73, 0x74,
- 0x72, 0x7d, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5a, 0x24, 0x22, 0x1f, 0x2f, 0x72, 0x70,
- 0x63, 0x2f, 0x70, 0x61, 0x74, 0x68, 0x2d, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x2f, 0x7b, 0x61,
- 0x2e, 0x73, 0x74, 0x72, 0x7d, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x3a, 0x01, 0x63, 0x30,
- 0x01, 0x42, 0x4d, 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,
- 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x65, 0x61, 0x6d, 0x30, 0x01, 0x42, 0x4d, 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, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
diff --git a/examples/internal/proto/examplepb/flow_combination.pb.gw.go b/examples/internal/proto/examplepb/flow_combination.pb.gw.go
index ee9e1158fdc..f4c092226c1 100644
--- a/examples/internal/proto/examplepb/flow_combination.pb.gw.go
+++ b/examples/internal/proto/examplepb/flow_combination.pb.gw.go
@@ -134,15 +134,6 @@ func request_FlowCombination_StreamEmptyStream_0(ctx context.Context, marshaler
}
return nil
}
- if err := handleSend(); err != nil {
- if cerr := stream.CloseSend(); cerr != nil {
- grpclog.Infof("Failed to terminate client stream: %v", cerr)
- }
- if err == io.EOF {
- return stream, metadata, nil
- }
- return nil, metadata, err
- }
go func() {
for {
if err := handleSend(); err != nil {
@@ -1463,20 +1454,22 @@ func RegisterFlowCombinationHandlerServer(ctx context.Context, mux *runtime.Serv
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcEmptyRpc")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcEmptyRpc", runtime.WithHTTPPathPattern("/rpc/empty/rpc"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_FlowCombination_RpcEmptyRpc_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_FlowCombination_RpcEmptyRpc_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_FlowCombination_RpcEmptyRpc_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_FlowCombination_RpcEmptyRpc_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -1507,20 +1500,22 @@ func RegisterFlowCombinationHandlerServer(ctx context.Context, mux *runtime.Serv
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcBodyRpc")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcBodyRpc", runtime.WithHTTPPathPattern("/rpc/body/rpc"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_FlowCombination_RpcBodyRpc_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_FlowCombination_RpcBodyRpc_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_FlowCombination_RpcBodyRpc_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_FlowCombination_RpcBodyRpc_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -1530,20 +1525,22 @@ func RegisterFlowCombinationHandlerServer(ctx context.Context, mux *runtime.Serv
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcBodyRpc")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcBodyRpc", runtime.WithHTTPPathPattern("/rpc/path/{a}/{b}/{c}/rpc"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_FlowCombination_RpcBodyRpc_1(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_FlowCombination_RpcBodyRpc_1(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_FlowCombination_RpcBodyRpc_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_FlowCombination_RpcBodyRpc_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -1553,20 +1550,22 @@ func RegisterFlowCombinationHandlerServer(ctx context.Context, mux *runtime.Serv
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcBodyRpc")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcBodyRpc", runtime.WithHTTPPathPattern("/rpc/query/rpc"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_FlowCombination_RpcBodyRpc_2(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_FlowCombination_RpcBodyRpc_2(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_FlowCombination_RpcBodyRpc_2(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_FlowCombination_RpcBodyRpc_2(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -1576,20 +1575,22 @@ func RegisterFlowCombinationHandlerServer(ctx context.Context, mux *runtime.Serv
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcBodyRpc")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcBodyRpc", runtime.WithHTTPPathPattern("/rpc/body/path/{a}/{b}/rpc"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_FlowCombination_RpcBodyRpc_3(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_FlowCombination_RpcBodyRpc_3(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_FlowCombination_RpcBodyRpc_3(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_FlowCombination_RpcBodyRpc_3(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -1599,20 +1600,22 @@ func RegisterFlowCombinationHandlerServer(ctx context.Context, mux *runtime.Serv
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcBodyRpc")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcBodyRpc", runtime.WithHTTPPathPattern("/rpc/body/query/rpc"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_FlowCombination_RpcBodyRpc_4(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_FlowCombination_RpcBodyRpc_4(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_FlowCombination_RpcBodyRpc_4(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_FlowCombination_RpcBodyRpc_4(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -1622,20 +1625,22 @@ func RegisterFlowCombinationHandlerServer(ctx context.Context, mux *runtime.Serv
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcBodyRpc")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcBodyRpc", runtime.WithHTTPPathPattern("/rpc/body/path/{a}/query/rpc"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_FlowCombination_RpcBodyRpc_5(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_FlowCombination_RpcBodyRpc_5(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_FlowCombination_RpcBodyRpc_5(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_FlowCombination_RpcBodyRpc_5(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -1645,20 +1650,22 @@ func RegisterFlowCombinationHandlerServer(ctx context.Context, mux *runtime.Serv
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcBodyRpc")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcBodyRpc", runtime.WithHTTPPathPattern("/rpc/path/{a}/query/rpc"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_FlowCombination_RpcBodyRpc_6(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_FlowCombination_RpcBodyRpc_6(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_FlowCombination_RpcBodyRpc_6(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_FlowCombination_RpcBodyRpc_6(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -1668,20 +1675,22 @@ func RegisterFlowCombinationHandlerServer(ctx context.Context, mux *runtime.Serv
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcPathSingleNestedRpc")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcPathSingleNestedRpc", runtime.WithHTTPPathPattern("/rpc/path-nested/{a.str}/rpc"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_FlowCombination_RpcPathSingleNestedRpc_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_FlowCombination_RpcPathSingleNestedRpc_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_FlowCombination_RpcPathSingleNestedRpc_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_FlowCombination_RpcPathSingleNestedRpc_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -1691,20 +1700,22 @@ func RegisterFlowCombinationHandlerServer(ctx context.Context, mux *runtime.Serv
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcPathNestedRpc")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcPathNestedRpc", runtime.WithHTTPPathPattern("/rpc/path-nested/{a.str}/{b}/rpc"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_FlowCombination_RpcPathNestedRpc_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_FlowCombination_RpcPathNestedRpc_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_FlowCombination_RpcPathNestedRpc_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_FlowCombination_RpcPathNestedRpc_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -1714,20 +1725,22 @@ func RegisterFlowCombinationHandlerServer(ctx context.Context, mux *runtime.Serv
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcPathNestedRpc")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcPathNestedRpc", runtime.WithHTTPPathPattern("/rpc/path-nested1/{a.str}/rpc"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_FlowCombination_RpcPathNestedRpc_1(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_FlowCombination_RpcPathNestedRpc_1(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_FlowCombination_RpcPathNestedRpc_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_FlowCombination_RpcPathNestedRpc_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -1737,20 +1750,22 @@ func RegisterFlowCombinationHandlerServer(ctx context.Context, mux *runtime.Serv
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcPathNestedRpc")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcPathNestedRpc", runtime.WithHTTPPathPattern("/rpc/path-nested2/{a.str}/rpc"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_FlowCombination_RpcPathNestedRpc_2(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_FlowCombination_RpcPathNestedRpc_2(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_FlowCombination_RpcPathNestedRpc_2(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_FlowCombination_RpcPathNestedRpc_2(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -1876,19 +1891,21 @@ func RegisterFlowCombinationHandlerClient(ctx context.Context, mux *runtime.Serv
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcEmptyRpc")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcEmptyRpc", runtime.WithHTTPPathPattern("/rpc/empty/rpc"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_FlowCombination_RpcEmptyRpc_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_FlowCombination_RpcEmptyRpc_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_FlowCombination_RpcEmptyRpc_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_FlowCombination_RpcEmptyRpc_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -1896,19 +1913,21 @@ func RegisterFlowCombinationHandlerClient(ctx context.Context, mux *runtime.Serv
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcEmptyStream")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcEmptyStream", runtime.WithHTTPPathPattern("/rpc/empty/stream"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_FlowCombination_RpcEmptyStream_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_FlowCombination_RpcEmptyStream_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_FlowCombination_RpcEmptyStream_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
+ forward_FlowCombination_RpcEmptyStream_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
})
@@ -1916,19 +1935,21 @@ func RegisterFlowCombinationHandlerClient(ctx context.Context, mux *runtime.Serv
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/StreamEmptyRpc")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/StreamEmptyRpc", runtime.WithHTTPPathPattern("/stream/empty/rpc"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_FlowCombination_StreamEmptyRpc_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_FlowCombination_StreamEmptyRpc_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_FlowCombination_StreamEmptyRpc_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_FlowCombination_StreamEmptyRpc_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -1936,19 +1957,21 @@ func RegisterFlowCombinationHandlerClient(ctx context.Context, mux *runtime.Serv
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/StreamEmptyStream")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/StreamEmptyStream", runtime.WithHTTPPathPattern("/stream/empty/stream"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_FlowCombination_StreamEmptyStream_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_FlowCombination_StreamEmptyStream_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_FlowCombination_StreamEmptyStream_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
+ forward_FlowCombination_StreamEmptyStream_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
})
@@ -1956,19 +1979,21 @@ func RegisterFlowCombinationHandlerClient(ctx context.Context, mux *runtime.Serv
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcBodyRpc")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcBodyRpc", runtime.WithHTTPPathPattern("/rpc/body/rpc"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_FlowCombination_RpcBodyRpc_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_FlowCombination_RpcBodyRpc_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_FlowCombination_RpcBodyRpc_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_FlowCombination_RpcBodyRpc_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -1976,19 +2001,21 @@ func RegisterFlowCombinationHandlerClient(ctx context.Context, mux *runtime.Serv
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcBodyRpc")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcBodyRpc", runtime.WithHTTPPathPattern("/rpc/path/{a}/{b}/{c}/rpc"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_FlowCombination_RpcBodyRpc_1(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_FlowCombination_RpcBodyRpc_1(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_FlowCombination_RpcBodyRpc_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_FlowCombination_RpcBodyRpc_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -1996,19 +2023,21 @@ func RegisterFlowCombinationHandlerClient(ctx context.Context, mux *runtime.Serv
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcBodyRpc")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcBodyRpc", runtime.WithHTTPPathPattern("/rpc/query/rpc"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_FlowCombination_RpcBodyRpc_2(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_FlowCombination_RpcBodyRpc_2(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_FlowCombination_RpcBodyRpc_2(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_FlowCombination_RpcBodyRpc_2(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -2016,19 +2045,21 @@ func RegisterFlowCombinationHandlerClient(ctx context.Context, mux *runtime.Serv
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcBodyRpc")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcBodyRpc", runtime.WithHTTPPathPattern("/rpc/body/path/{a}/{b}/rpc"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_FlowCombination_RpcBodyRpc_3(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_FlowCombination_RpcBodyRpc_3(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_FlowCombination_RpcBodyRpc_3(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_FlowCombination_RpcBodyRpc_3(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -2036,19 +2067,21 @@ func RegisterFlowCombinationHandlerClient(ctx context.Context, mux *runtime.Serv
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcBodyRpc")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcBodyRpc", runtime.WithHTTPPathPattern("/rpc/body/query/rpc"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_FlowCombination_RpcBodyRpc_4(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_FlowCombination_RpcBodyRpc_4(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_FlowCombination_RpcBodyRpc_4(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_FlowCombination_RpcBodyRpc_4(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -2056,19 +2089,21 @@ func RegisterFlowCombinationHandlerClient(ctx context.Context, mux *runtime.Serv
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcBodyRpc")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcBodyRpc", runtime.WithHTTPPathPattern("/rpc/body/path/{a}/query/rpc"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_FlowCombination_RpcBodyRpc_5(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_FlowCombination_RpcBodyRpc_5(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_FlowCombination_RpcBodyRpc_5(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_FlowCombination_RpcBodyRpc_5(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -2076,19 +2111,21 @@ func RegisterFlowCombinationHandlerClient(ctx context.Context, mux *runtime.Serv
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcBodyRpc")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcBodyRpc", runtime.WithHTTPPathPattern("/rpc/path/{a}/query/rpc"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_FlowCombination_RpcBodyRpc_6(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_FlowCombination_RpcBodyRpc_6(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_FlowCombination_RpcBodyRpc_6(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_FlowCombination_RpcBodyRpc_6(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -2096,19 +2133,21 @@ func RegisterFlowCombinationHandlerClient(ctx context.Context, mux *runtime.Serv
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcPathSingleNestedRpc")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcPathSingleNestedRpc", runtime.WithHTTPPathPattern("/rpc/path-nested/{a.str}/rpc"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_FlowCombination_RpcPathSingleNestedRpc_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_FlowCombination_RpcPathSingleNestedRpc_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_FlowCombination_RpcPathSingleNestedRpc_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_FlowCombination_RpcPathSingleNestedRpc_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -2116,19 +2155,21 @@ func RegisterFlowCombinationHandlerClient(ctx context.Context, mux *runtime.Serv
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcPathNestedRpc")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcPathNestedRpc", runtime.WithHTTPPathPattern("/rpc/path-nested/{a.str}/{b}/rpc"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_FlowCombination_RpcPathNestedRpc_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_FlowCombination_RpcPathNestedRpc_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_FlowCombination_RpcPathNestedRpc_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_FlowCombination_RpcPathNestedRpc_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -2136,19 +2177,21 @@ func RegisterFlowCombinationHandlerClient(ctx context.Context, mux *runtime.Serv
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcPathNestedRpc")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcPathNestedRpc", runtime.WithHTTPPathPattern("/rpc/path-nested1/{a.str}/rpc"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_FlowCombination_RpcPathNestedRpc_1(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_FlowCombination_RpcPathNestedRpc_1(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_FlowCombination_RpcPathNestedRpc_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_FlowCombination_RpcPathNestedRpc_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -2156,19 +2199,21 @@ func RegisterFlowCombinationHandlerClient(ctx context.Context, mux *runtime.Serv
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcPathNestedRpc")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcPathNestedRpc", runtime.WithHTTPPathPattern("/rpc/path-nested2/{a.str}/rpc"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_FlowCombination_RpcPathNestedRpc_2(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_FlowCombination_RpcPathNestedRpc_2(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_FlowCombination_RpcPathNestedRpc_2(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_FlowCombination_RpcPathNestedRpc_2(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -2176,19 +2221,21 @@ func RegisterFlowCombinationHandlerClient(ctx context.Context, mux *runtime.Serv
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcBodyStream")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcBodyStream", runtime.WithHTTPPathPattern("/rpc/body/stream"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_FlowCombination_RpcBodyStream_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_FlowCombination_RpcBodyStream_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_FlowCombination_RpcBodyStream_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
+ forward_FlowCombination_RpcBodyStream_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
})
@@ -2196,19 +2243,21 @@ func RegisterFlowCombinationHandlerClient(ctx context.Context, mux *runtime.Serv
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcBodyStream")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcBodyStream", runtime.WithHTTPPathPattern("/rpc/path/{a}/{b}/{c}/stream"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_FlowCombination_RpcBodyStream_1(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_FlowCombination_RpcBodyStream_1(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_FlowCombination_RpcBodyStream_1(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
+ forward_FlowCombination_RpcBodyStream_1(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
})
@@ -2216,19 +2265,21 @@ func RegisterFlowCombinationHandlerClient(ctx context.Context, mux *runtime.Serv
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcBodyStream")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcBodyStream", runtime.WithHTTPPathPattern("/rpc/query/stream"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_FlowCombination_RpcBodyStream_2(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_FlowCombination_RpcBodyStream_2(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_FlowCombination_RpcBodyStream_2(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
+ forward_FlowCombination_RpcBodyStream_2(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
})
@@ -2236,19 +2287,21 @@ func RegisterFlowCombinationHandlerClient(ctx context.Context, mux *runtime.Serv
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcBodyStream")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcBodyStream", runtime.WithHTTPPathPattern("/rpc/body/path/{a}/{b}/stream"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_FlowCombination_RpcBodyStream_3(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_FlowCombination_RpcBodyStream_3(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_FlowCombination_RpcBodyStream_3(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
+ forward_FlowCombination_RpcBodyStream_3(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
})
@@ -2256,19 +2309,21 @@ func RegisterFlowCombinationHandlerClient(ctx context.Context, mux *runtime.Serv
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcBodyStream")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcBodyStream", runtime.WithHTTPPathPattern("/rpc/body/query/stream"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_FlowCombination_RpcBodyStream_4(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_FlowCombination_RpcBodyStream_4(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_FlowCombination_RpcBodyStream_4(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
+ forward_FlowCombination_RpcBodyStream_4(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
})
@@ -2276,19 +2331,21 @@ func RegisterFlowCombinationHandlerClient(ctx context.Context, mux *runtime.Serv
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcBodyStream")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcBodyStream", runtime.WithHTTPPathPattern("/rpc/body/path/{a}/query/stream"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_FlowCombination_RpcBodyStream_5(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_FlowCombination_RpcBodyStream_5(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_FlowCombination_RpcBodyStream_5(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
+ forward_FlowCombination_RpcBodyStream_5(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
})
@@ -2296,19 +2353,21 @@ func RegisterFlowCombinationHandlerClient(ctx context.Context, mux *runtime.Serv
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcBodyStream")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcBodyStream", runtime.WithHTTPPathPattern("/rpc/path/{a}/query/stream"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_FlowCombination_RpcBodyStream_6(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_FlowCombination_RpcBodyStream_6(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_FlowCombination_RpcBodyStream_6(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
+ forward_FlowCombination_RpcBodyStream_6(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
})
@@ -2316,19 +2375,21 @@ func RegisterFlowCombinationHandlerClient(ctx context.Context, mux *runtime.Serv
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcPathSingleNestedStream")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcPathSingleNestedStream", runtime.WithHTTPPathPattern("/rpc/path-nested/{a.str}/stream"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_FlowCombination_RpcPathSingleNestedStream_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_FlowCombination_RpcPathSingleNestedStream_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_FlowCombination_RpcPathSingleNestedStream_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
+ forward_FlowCombination_RpcPathSingleNestedStream_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
})
@@ -2336,19 +2397,21 @@ func RegisterFlowCombinationHandlerClient(ctx context.Context, mux *runtime.Serv
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcPathNestedStream")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcPathNestedStream", runtime.WithHTTPPathPattern("/rpc/path-nested/{a.str}/{b}/stream"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_FlowCombination_RpcPathNestedStream_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_FlowCombination_RpcPathNestedStream_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_FlowCombination_RpcPathNestedStream_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
+ forward_FlowCombination_RpcPathNestedStream_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
})
@@ -2356,19 +2419,21 @@ func RegisterFlowCombinationHandlerClient(ctx context.Context, mux *runtime.Serv
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcPathNestedStream")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcPathNestedStream", runtime.WithHTTPPathPattern("/rpc/path-nested1/{a.str}/stream"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_FlowCombination_RpcPathNestedStream_1(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_FlowCombination_RpcPathNestedStream_1(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_FlowCombination_RpcPathNestedStream_1(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
+ forward_FlowCombination_RpcPathNestedStream_1(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
})
@@ -2376,19 +2441,21 @@ func RegisterFlowCombinationHandlerClient(ctx context.Context, mux *runtime.Serv
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcPathNestedStream")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcPathNestedStream", runtime.WithHTTPPathPattern("/rpc/path-nested2/{a.str}/stream"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_FlowCombination_RpcPathNestedStream_2(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_FlowCombination_RpcPathNestedStream_2(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_FlowCombination_RpcPathNestedStream_2(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
+ forward_FlowCombination_RpcPathNestedStream_2(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
})
@@ -2422,9 +2489,9 @@ var (
pattern_FlowCombination_RpcPathNestedRpc_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 1, 0, 4, 1, 5, 3, 2, 0}, []string{"rpc", "path-nested", "a.str", "b"}, ""))
- pattern_FlowCombination_RpcPathNestedRpc_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 0}, []string{"rpc", "path-nested", "a.str"}, ""))
+ pattern_FlowCombination_RpcPathNestedRpc_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 0}, []string{"rpc", "path-nested1", "a.str"}, ""))
- pattern_FlowCombination_RpcPathNestedRpc_2 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 0}, []string{"rpc", "path-nested", "a.str"}, ""))
+ pattern_FlowCombination_RpcPathNestedRpc_2 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 0}, []string{"rpc", "path-nested2", "a.str"}, ""))
pattern_FlowCombination_RpcBodyStream_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"rpc", "body", "stream"}, ""))
@@ -2444,9 +2511,9 @@ var (
pattern_FlowCombination_RpcPathNestedStream_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"rpc", "path-nested", "a.str", "b", "stream"}, ""))
- pattern_FlowCombination_RpcPathNestedStream_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"rpc", "path-nested", "a.str", "stream"}, ""))
+ pattern_FlowCombination_RpcPathNestedStream_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"rpc", "path-nested1", "a.str", "stream"}, ""))
- pattern_FlowCombination_RpcPathNestedStream_2 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"rpc", "path-nested", "a.str", "stream"}, ""))
+ pattern_FlowCombination_RpcPathNestedStream_2 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"rpc", "path-nested2", "a.str", "stream"}, ""))
)
var (
diff --git a/examples/internal/proto/examplepb/flow_combination.proto b/examples/internal/proto/examplepb/flow_combination.proto
index 2375ec75f08..59a351d331f 100644
--- a/examples/internal/proto/examplepb/flow_combination.proto
+++ b/examples/internal/proto/examplepb/flow_combination.proto
@@ -1,168 +1,170 @@
syntax = "proto3";
-option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/examplepb";
+
package grpc.gateway.examples.internal.proto.examplepb;
import "google/api/annotations.proto";
+option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/examplepb";
+
message EmptyProto {}
message NonEmptyProto {
- string a = 1;
- string b = 2;
- string c = 3;
+ string a = 1;
+ string b = 2;
+ string c = 3;
}
message UnaryProto {
- string str = 1;
+ string str = 1;
}
message NestedProto {
- UnaryProto a = 1;
- string b = 2;
- string c = 3;
+ UnaryProto a = 1;
+ string b = 2;
+ string c = 3;
}
message SingleNestedProto {
- UnaryProto a = 1;
+ UnaryProto a = 1;
}
service FlowCombination {
- rpc RpcEmptyRpc(EmptyProto) returns (EmptyProto) {
- option (google.api.http) = {
- post: "/rpc/empty/rpc"
- };
- }
- rpc RpcEmptyStream(EmptyProto) returns (stream EmptyProto) {
- option (google.api.http) = {
- post: "/rpc/empty/stream"
- };
- }
- rpc StreamEmptyRpc(stream EmptyProto) returns (EmptyProto) {
- option (google.api.http) = {
- post: "/stream/empty/rpc"
- };
- }
- rpc StreamEmptyStream(stream EmptyProto) returns (stream EmptyProto) {
- option (google.api.http) = {
- post: "/stream/empty/stream"
- };
- }
+ rpc RpcEmptyRpc(EmptyProto) returns (EmptyProto) {
+ option (google.api.http) = {
+ post: "/rpc/empty/rpc"
+ };
+ }
+ rpc RpcEmptyStream(EmptyProto) returns (stream EmptyProto) {
+ option (google.api.http) = {
+ post: "/rpc/empty/stream"
+ };
+ }
+ rpc StreamEmptyRpc(stream EmptyProto) returns (EmptyProto) {
+ option (google.api.http) = {
+ post: "/stream/empty/rpc"
+ };
+ }
+ rpc StreamEmptyStream(stream EmptyProto) returns (stream EmptyProto) {
+ option (google.api.http) = {
+ post: "/stream/empty/stream"
+ };
+ }
- rpc RpcBodyRpc(NonEmptyProto) returns (EmptyProto) {
- option (google.api.http) = {
- // w/ body; w/o path; w/o query
- post: "/rpc/body/rpc"
- body: "*"
+ rpc RpcBodyRpc(NonEmptyProto) returns (EmptyProto) {
+ option (google.api.http) = {
+ // w/ body; w/o path; w/o query
+ post: "/rpc/body/rpc"
+ body: "*"
- // w/o body; w/ path; w/o query
- additional_bindings {
- post: "/rpc/path/{a}/{b}/{c}/rpc"
- }
- // w/o body; w/o path; w/ query
- additional_bindings {
- post: "/rpc/query/rpc"
- }
- // w/ body; w/ path; w/o query
- additional_bindings {
- post: "/rpc/body/path/{a}/{b}/rpc"
- body: "c"
- }
- // w/ body; w/o path; w/ query
- additional_bindings {
- post: "/rpc/body/query/rpc"
- body: "c"
- }
- // w/ body; w/ path; w/ query
- additional_bindings {
- post: "/rpc/body/path/{a}/query/rpc"
- body: "c"
- }
- // w/o body; w/ path; w/ query
- additional_bindings {
- post: "/rpc/path/{a}/query/rpc"
- }
- };
- }
- rpc RpcPathSingleNestedRpc(SingleNestedProto) returns (EmptyProto) {
- option (google.api.http) = {
- // w/o body; w/ path (IsNestedProto3); w/o query
- post: "/rpc/path-nested/{a.str}/rpc"
- };
- }
- rpc RpcPathNestedRpc(NestedProto) returns (EmptyProto) {
- option (google.api.http) = {
- // w/ body; w/ path (IsNestedProto3); w/o query
- post: "/rpc/path-nested/{a.str}/{b}/rpc"
- body: "c"
+ // w/o body; w/ path; w/o query
+ additional_bindings {
+ post: "/rpc/path/{a}/{b}/{c}/rpc"
+ }
+ // w/o body; w/o path; w/ query
+ additional_bindings {
+ post: "/rpc/query/rpc"
+ }
+ // w/ body; w/ path; w/o query
+ additional_bindings {
+ post: "/rpc/body/path/{a}/{b}/rpc"
+ body: "c"
+ }
+ // w/ body; w/o path; w/ query
+ additional_bindings {
+ post: "/rpc/body/query/rpc"
+ body: "c"
+ }
+ // w/ body; w/ path; w/ query
+ additional_bindings {
+ post: "/rpc/body/path/{a}/query/rpc"
+ body: "c"
+ }
+ // w/o body; w/ path; w/ query
+ additional_bindings {
+ post: "/rpc/path/{a}/query/rpc"
+ }
+ };
+ }
+ rpc RpcPathSingleNestedRpc(SingleNestedProto) returns (EmptyProto) {
+ option (google.api.http) = {
+ // w/o body; w/ path (IsNestedProto3); w/o query
+ post: "/rpc/path-nested/{a.str}/rpc"
+ };
+ }
+ rpc RpcPathNestedRpc(NestedProto) returns (EmptyProto) {
+ option (google.api.http) = {
+ // w/ body; w/ path (IsNestedProto3); w/o query
+ post: "/rpc/path-nested/{a.str}/{b}/rpc"
+ body: "c"
- // w/o body; w/ path (IsNestedProto3); w/ query
- additional_bindings {
- post: "/rpc/path-nested/{a.str}/rpc"
- }
- // w/ body; w/ path (IsNestedProto3); w/ query
- additional_bindings {
- post: "/rpc/path-nested/{a.str}/rpc"
- body: "c"
- }
- };
- }
+ // w/o body; w/ path (IsNestedProto3); w/ query
+ additional_bindings {
+ post: "/rpc/path-nested1/{a.str}/rpc"
+ }
+ // w/ body; w/ path (IsNestedProto3); w/ query
+ additional_bindings {
+ post: "/rpc/path-nested2/{a.str}/rpc"
+ body: "c"
+ }
+ };
+ }
- rpc RpcBodyStream(NonEmptyProto) returns (stream EmptyProto) {
- option (google.api.http) = {
- // w/ body; w/o path; w/o query
- post: "/rpc/body/stream"
- body: "*"
+ rpc RpcBodyStream(NonEmptyProto) returns (stream EmptyProto) {
+ option (google.api.http) = {
+ // w/ body; w/o path; w/o query
+ post: "/rpc/body/stream"
+ body: "*"
- // w/o body; w/ path; w/o query
- additional_bindings {
- post: "/rpc/path/{a}/{b}/{c}/stream"
- }
- // w/o body; w/o path; w/ query
- additional_bindings {
- post: "/rpc/query/stream"
- }
- // w/ body; w/ path; w/o query
- additional_bindings {
- post: "/rpc/body/path/{a}/{b}/stream"
- body: "c"
- }
- // w/ body; w/o path; w/ query
- additional_bindings {
- post: "/rpc/body/query/stream"
- body: "c"
- }
- // w/ body; w/ path; w/ query
- additional_bindings {
- post: "/rpc/body/path/{a}/query/stream"
- body: "c"
- }
- // w/o body; w/ path; w/ query
- additional_bindings {
- post: "/rpc/path/{a}/query/stream"
- }
- };
- }
- rpc RpcPathSingleNestedStream(SingleNestedProto) returns (stream EmptyProto) {
- option (google.api.http) = {
- // w/o body; w/ path (IsNestedProto3); w/o query
- post: "/rpc/path-nested/{a.str}/stream"
- };
- }
- rpc RpcPathNestedStream(NestedProto) returns (stream EmptyProto) {
- option (google.api.http) = {
- // w/ body; w/ path (IsNestedProto3); w/o query
- post: "/rpc/path-nested/{a.str}/{b}/stream"
- body: "c"
+ // w/o body; w/ path; w/o query
+ additional_bindings {
+ post: "/rpc/path/{a}/{b}/{c}/stream"
+ }
+ // w/o body; w/o path; w/ query
+ additional_bindings {
+ post: "/rpc/query/stream"
+ }
+ // w/ body; w/ path; w/o query
+ additional_bindings {
+ post: "/rpc/body/path/{a}/{b}/stream"
+ body: "c"
+ }
+ // w/ body; w/o path; w/ query
+ additional_bindings {
+ post: "/rpc/body/query/stream"
+ body: "c"
+ }
+ // w/ body; w/ path; w/ query
+ additional_bindings {
+ post: "/rpc/body/path/{a}/query/stream"
+ body: "c"
+ }
+ // w/o body; w/ path; w/ query
+ additional_bindings {
+ post: "/rpc/path/{a}/query/stream"
+ }
+ };
+ }
+ rpc RpcPathSingleNestedStream(SingleNestedProto) returns (stream EmptyProto) {
+ option (google.api.http) = {
+ // w/o body; w/ path (IsNestedProto3); w/o query
+ post: "/rpc/path-nested/{a.str}/stream"
+ };
+ }
+ rpc RpcPathNestedStream(NestedProto) returns (stream EmptyProto) {
+ option (google.api.http) = {
+ // w/ body; w/ path (IsNestedProto3); w/o query
+ post: "/rpc/path-nested/{a.str}/{b}/stream"
+ body: "c"
- // w/o body; w/ path (IsNestedProto3); w/ query
- additional_bindings {
- post: "/rpc/path-nested/{a.str}/stream"
- }
- // w/ body; w/ path (IsNestedProto3); w/ query
- additional_bindings {
- post: "/rpc/path-nested/{a.str}/stream"
- body: "c"
- }
- };
- }
+ // w/o body; w/ path (IsNestedProto3); w/ query
+ additional_bindings {
+ post: "/rpc/path-nested1/{a.str}/stream"
+ }
+ // w/ body; w/ path (IsNestedProto3); w/ query
+ additional_bindings {
+ post: "/rpc/path-nested2/{a.str}/stream"
+ body: "c"
+ }
+ };
+ }
}
diff --git a/examples/internal/proto/examplepb/flow_combination.swagger.json b/examples/internal/proto/examplepb/flow_combination.swagger.json
index 128107a8e82..11f0b44bcdc 100644
--- a/examples/internal/proto/examplepb/flow_combination.swagger.json
+++ b/examples/internal/proto/examplepb/flow_combination.swagger.json
@@ -41,7 +41,7 @@
"type": "string"
},
{
- "name": "body",
+ "name": "c",
"in": "body",
"required": true,
"schema": {
@@ -94,7 +94,7 @@
"type": "string"
},
{
- "name": "body",
+ "name": "c",
"in": "body",
"required": true,
"schema": {
@@ -144,7 +144,7 @@
"type": "string"
},
{
- "name": "body",
+ "name": "c",
"in": "body",
"required": true,
"schema": {
@@ -197,7 +197,7 @@
"type": "string"
},
{
- "name": "body",
+ "name": "c",
"in": "body",
"required": true,
"schema": {
@@ -229,7 +229,7 @@
},
"parameters": [
{
- "name": "body",
+ "name": "c",
"in": "body",
"required": true,
"schema": {
@@ -282,7 +282,7 @@
},
"parameters": [
{
- "name": "body",
+ "name": "c",
"in": "body",
"required": true,
"schema": {
@@ -435,7 +435,7 @@
},
"/rpc/path-nested/{a.str}/rpc": {
"post": {
- "operationId": "FlowCombination_RpcPathNestedRpc3",
+ "operationId": "FlowCombination_RpcPathSingleNestedRpc",
"responses": {
"200": {
"description": "A successful response.",
@@ -456,20 +456,89 @@
"in": "path",
"required": true,
"type": "string"
+ }
+ ],
+ "tags": [
+ "FlowCombination"
+ ]
+ }
+ },
+ "/rpc/path-nested/{a.str}/stream": {
+ "post": {
+ "operationId": "FlowCombination_RpcPathSingleNestedStream",
+ "responses": {
+ "200": {
+ "description": "A successful response.(streaming responses)",
+ "schema": {
+ "type": "object",
+ "properties": {
+ "result": {
+ "$ref": "#/definitions/examplepbEmptyProto"
+ },
+ "error": {
+ "$ref": "#/definitions/rpcStatus"
+ }
+ },
+ "title": "Stream result of examplepbEmptyProto"
+ }
},
+ "default": {
+ "description": "An unexpected error response.",
+ "schema": {
+ "$ref": "#/definitions/rpcStatus"
+ }
+ }
+ },
+ "parameters": [
{
- "name": "body",
- "in": "body",
+ "name": "a.str",
+ "in": "path",
"required": true,
+ "type": "string"
+ }
+ ],
+ "tags": [
+ "FlowCombination"
+ ]
+ }
+ },
+ "/rpc/path-nested/{a.str}/{b}/rpc": {
+ "post": {
+ "operationId": "FlowCombination_RpcPathNestedRpc",
+ "responses": {
+ "200": {
+ "description": "A successful response.",
"schema": {
- "type": "string"
+ "$ref": "#/definitions/examplepbEmptyProto"
}
},
+ "default": {
+ "description": "An unexpected error response.",
+ "schema": {
+ "$ref": "#/definitions/rpcStatus"
+ }
+ }
+ },
+ "parameters": [
+ {
+ "name": "a.str",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
{
"name": "b",
- "in": "query",
- "required": false,
+ "in": "path",
+ "required": true,
"type": "string"
+ },
+ {
+ "name": "c",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
}
],
"tags": [
@@ -477,9 +546,9 @@
]
}
},
- "/rpc/path-nested/{a.str}/stream": {
+ "/rpc/path-nested/{a.str}/{b}/stream": {
"post": {
- "operationId": "FlowCombination_RpcPathNestedStream3",
+ "operationId": "FlowCombination_RpcPathNestedStream",
"responses": {
"200": {
"description": "A successful response.(streaming responses)",
@@ -511,18 +580,60 @@
"type": "string"
},
{
- "name": "body",
+ "name": "b",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "c",
"in": "body",
"required": true,
"schema": {
"type": "string"
}
+ }
+ ],
+ "tags": [
+ "FlowCombination"
+ ]
+ }
+ },
+ "/rpc/path-nested1/{a.str}/rpc": {
+ "post": {
+ "operationId": "FlowCombination_RpcPathNestedRpc2",
+ "responses": {
+ "200": {
+ "description": "A successful response.",
+ "schema": {
+ "$ref": "#/definitions/examplepbEmptyProto"
+ }
+ },
+ "default": {
+ "description": "An unexpected error response.",
+ "schema": {
+ "$ref": "#/definitions/rpcStatus"
+ }
+ }
+ },
+ "parameters": [
+ {
+ "name": "a.str",
+ "in": "path",
+ "required": true,
+ "type": "string"
},
{
"name": "b",
"in": "query",
"required": false,
"type": "string"
+ },
+ {
+ "name": "c",
+ "in": "query",
+ "required": false,
+ "type": "string"
}
],
"tags": [
@@ -530,14 +641,23 @@
]
}
},
- "/rpc/path-nested/{a.str}/{b}/rpc": {
+ "/rpc/path-nested1/{a.str}/stream": {
"post": {
- "operationId": "FlowCombination_RpcPathNestedRpc",
+ "operationId": "FlowCombination_RpcPathNestedStream2",
"responses": {
"200": {
- "description": "A successful response.",
+ "description": "A successful response.(streaming responses)",
"schema": {
- "$ref": "#/definitions/examplepbEmptyProto"
+ "type": "object",
+ "properties": {
+ "result": {
+ "$ref": "#/definitions/examplepbEmptyProto"
+ },
+ "error": {
+ "$ref": "#/definitions/rpcStatus"
+ }
+ },
+ "title": "Stream result of examplepbEmptyProto"
}
},
"default": {
@@ -556,17 +676,59 @@
},
{
"name": "b",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "c",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ }
+ ],
+ "tags": [
+ "FlowCombination"
+ ]
+ }
+ },
+ "/rpc/path-nested2/{a.str}/rpc": {
+ "post": {
+ "operationId": "FlowCombination_RpcPathNestedRpc3",
+ "responses": {
+ "200": {
+ "description": "A successful response.",
+ "schema": {
+ "$ref": "#/definitions/examplepbEmptyProto"
+ }
+ },
+ "default": {
+ "description": "An unexpected error response.",
+ "schema": {
+ "$ref": "#/definitions/rpcStatus"
+ }
+ }
+ },
+ "parameters": [
+ {
+ "name": "a.str",
"in": "path",
"required": true,
"type": "string"
},
{
- "name": "body",
+ "name": "c",
"in": "body",
"required": true,
"schema": {
"type": "string"
}
+ },
+ {
+ "name": "b",
+ "in": "query",
+ "required": false,
+ "type": "string"
}
],
"tags": [
@@ -574,9 +736,9 @@
]
}
},
- "/rpc/path-nested/{a.str}/{b}/stream": {
+ "/rpc/path-nested2/{a.str}/stream": {
"post": {
- "operationId": "FlowCombination_RpcPathNestedStream",
+ "operationId": "FlowCombination_RpcPathNestedStream3",
"responses": {
"200": {
"description": "A successful response.(streaming responses)",
@@ -608,18 +770,18 @@
"type": "string"
},
{
- "name": "b",
- "in": "path",
- "required": true,
- "type": "string"
- },
- {
- "name": "body",
+ "name": "c",
"in": "body",
"required": true,
"schema": {
"type": "string"
}
+ },
+ {
+ "name": "b",
+ "in": "query",
+ "required": false,
+ "type": "string"
}
],
"tags": [
@@ -650,6 +812,18 @@
"in": "path",
"required": true,
"type": "string"
+ },
+ {
+ "name": "b",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "c",
+ "in": "query",
+ "required": false,
+ "type": "string"
}
],
"tags": [
@@ -689,6 +863,18 @@
"in": "path",
"required": true,
"type": "string"
+ },
+ {
+ "name": "b",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "c",
+ "in": "query",
+ "required": false,
+ "type": "string"
}
],
"tags": [
@@ -806,6 +992,26 @@
}
}
},
+ "parameters": [
+ {
+ "name": "a",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "b",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "c",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ }
+ ],
"tags": [
"FlowCombination"
]
@@ -837,6 +1043,26 @@
}
}
},
+ "parameters": [
+ {
+ "name": "a",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "b",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "c",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ }
+ ],
"tags": [
"FlowCombination"
]
@@ -925,17 +1151,13 @@
"protobufAny": {
"type": "object",
"properties": {
- "typeUrl": {
+ "@type": {
"type": "string",
"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",
- "format": "byte",
- "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\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 }"
+ "additionalProperties": {},
+ "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 := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(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 }"
},
"rpcStatus": {
"type": "object",
diff --git a/examples/internal/proto/examplepb/flow_combination_grpc.pb.go b/examples/internal/proto/examplepb/flow_combination_grpc.pb.go
index 7d3775ecdf9..e1bb90a95c9 100644
--- a/examples/internal/proto/examplepb/flow_combination_grpc.pb.go
+++ b/examples/internal/proto/examplepb/flow_combination_grpc.pb.go
@@ -11,6 +11,7 @@ import (
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
+// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// FlowCombinationClient is the client API for FlowCombination service.
@@ -47,7 +48,7 @@ func (c *flowCombinationClient) RpcEmptyRpc(ctx context.Context, in *EmptyProto,
}
func (c *flowCombinationClient) RpcEmptyStream(ctx context.Context, in *EmptyProto, opts ...grpc.CallOption) (FlowCombination_RpcEmptyStreamClient, error) {
- stream, err := c.cc.NewStream(ctx, &_FlowCombination_serviceDesc.Streams[0], "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcEmptyStream", opts...)
+ stream, err := c.cc.NewStream(ctx, &FlowCombination_ServiceDesc.Streams[0], "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcEmptyStream", opts...)
if err != nil {
return nil, err
}
@@ -79,7 +80,7 @@ func (x *flowCombinationRpcEmptyStreamClient) Recv() (*EmptyProto, error) {
}
func (c *flowCombinationClient) StreamEmptyRpc(ctx context.Context, opts ...grpc.CallOption) (FlowCombination_StreamEmptyRpcClient, error) {
- stream, err := c.cc.NewStream(ctx, &_FlowCombination_serviceDesc.Streams[1], "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/StreamEmptyRpc", opts...)
+ stream, err := c.cc.NewStream(ctx, &FlowCombination_ServiceDesc.Streams[1], "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/StreamEmptyRpc", opts...)
if err != nil {
return nil, err
}
@@ -113,7 +114,7 @@ func (x *flowCombinationStreamEmptyRpcClient) CloseAndRecv() (*EmptyProto, error
}
func (c *flowCombinationClient) StreamEmptyStream(ctx context.Context, opts ...grpc.CallOption) (FlowCombination_StreamEmptyStreamClient, error) {
- stream, err := c.cc.NewStream(ctx, &_FlowCombination_serviceDesc.Streams[2], "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/StreamEmptyStream", opts...)
+ stream, err := c.cc.NewStream(ctx, &FlowCombination_ServiceDesc.Streams[2], "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/StreamEmptyStream", opts...)
if err != nil {
return nil, err
}
@@ -171,7 +172,7 @@ func (c *flowCombinationClient) RpcPathNestedRpc(ctx context.Context, in *Nested
}
func (c *flowCombinationClient) RpcBodyStream(ctx context.Context, in *NonEmptyProto, opts ...grpc.CallOption) (FlowCombination_RpcBodyStreamClient, error) {
- stream, err := c.cc.NewStream(ctx, &_FlowCombination_serviceDesc.Streams[3], "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcBodyStream", opts...)
+ stream, err := c.cc.NewStream(ctx, &FlowCombination_ServiceDesc.Streams[3], "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcBodyStream", opts...)
if err != nil {
return nil, err
}
@@ -203,7 +204,7 @@ func (x *flowCombinationRpcBodyStreamClient) Recv() (*EmptyProto, error) {
}
func (c *flowCombinationClient) RpcPathSingleNestedStream(ctx context.Context, in *SingleNestedProto, opts ...grpc.CallOption) (FlowCombination_RpcPathSingleNestedStreamClient, error) {
- stream, err := c.cc.NewStream(ctx, &_FlowCombination_serviceDesc.Streams[4], "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcPathSingleNestedStream", opts...)
+ stream, err := c.cc.NewStream(ctx, &FlowCombination_ServiceDesc.Streams[4], "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcPathSingleNestedStream", opts...)
if err != nil {
return nil, err
}
@@ -235,7 +236,7 @@ func (x *flowCombinationRpcPathSingleNestedStreamClient) Recv() (*EmptyProto, er
}
func (c *flowCombinationClient) RpcPathNestedStream(ctx context.Context, in *NestedProto, opts ...grpc.CallOption) (FlowCombination_RpcPathNestedStreamClient, error) {
- stream, err := c.cc.NewStream(ctx, &_FlowCombination_serviceDesc.Streams[5], "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcPathNestedStream", opts...)
+ stream, err := c.cc.NewStream(ctx, &FlowCombination_ServiceDesc.Streams[5], "/grpc.gateway.examples.internal.proto.examplepb.FlowCombination/RpcPathNestedStream", opts...)
if err != nil {
return nil, err
}
@@ -324,8 +325,8 @@ type UnsafeFlowCombinationServer interface {
mustEmbedUnimplementedFlowCombinationServer()
}
-func RegisterFlowCombinationServer(s *grpc.Server, srv FlowCombinationServer) {
- s.RegisterService(&_FlowCombination_serviceDesc, srv)
+func RegisterFlowCombinationServer(s grpc.ServiceRegistrar, srv FlowCombinationServer) {
+ s.RegisterService(&FlowCombination_ServiceDesc, srv)
}
func _FlowCombination_RpcEmptyRpc_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
@@ -536,7 +537,10 @@ func (x *flowCombinationRpcPathNestedStreamServer) Send(m *EmptyProto) error {
return x.ServerStream.SendMsg(m)
}
-var _FlowCombination_serviceDesc = grpc.ServiceDesc{
+// FlowCombination_ServiceDesc is the grpc.ServiceDesc for FlowCombination service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var FlowCombination_ServiceDesc = grpc.ServiceDesc{
ServiceName: "grpc.gateway.examples.internal.proto.examplepb.FlowCombination",
HandlerType: (*FlowCombinationServer)(nil),
Methods: []grpc.MethodDesc{
diff --git a/examples/internal/proto/examplepb/generate_unbound_methods.buf.gen.yaml b/examples/internal/proto/examplepb/generate_unbound_methods.buf.gen.yaml
index 3964e3681c3..1809d1fab0b 100644
--- a/examples/internal/proto/examplepb/generate_unbound_methods.buf.gen.yaml
+++ b/examples/internal/proto/examplepb/generate_unbound_methods.buf.gen.yaml
@@ -1,4 +1,4 @@
-version: v1beta1
+version: v1
plugins:
- name: grpc-gateway
out: .
diff --git a/examples/internal/proto/examplepb/generate_unbound_methods.pb.go b/examples/internal/proto/examplepb/generate_unbound_methods.pb.go
index 305c44ec563..7f75a15a9d0 100644
--- a/examples/internal/proto/examplepb/generate_unbound_methods.pb.go
+++ b/examples/internal/proto/examplepb/generate_unbound_methods.pb.go
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.26.0
-// protoc v3.13.0
+// protoc-gen-go v1.27.1
+// protoc (unknown)
// source: examples/internal/proto/examplepb/generate_unbound_methods.proto
// Generate Unannotated Methods Echo Service
@@ -13,9 +13,9 @@
package examplepb
import (
- duration "github.com/golang/protobuf/ptypes/duration"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ durationpb "google.golang.org/protobuf/types/known/durationpb"
reflect "reflect"
sync "sync"
)
@@ -34,9 +34,9 @@ type GenerateUnboundMethodsSimpleMessage struct {
unknownFields protoimpl.UnknownFields
// Id represents the message identifier.
- Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
- Num int64 `protobuf:"varint,2,opt,name=num,proto3" json:"num,omitempty"`
- Duration *duration.Duration `protobuf:"bytes,3,opt,name=duration,proto3" json:"duration,omitempty"`
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ Num int64 `protobuf:"varint,2,opt,name=num,proto3" json:"num,omitempty"`
+ Duration *durationpb.Duration `protobuf:"bytes,3,opt,name=duration,proto3" json:"duration,omitempty"`
}
func (x *GenerateUnboundMethodsSimpleMessage) Reset() {
@@ -85,7 +85,7 @@ func (x *GenerateUnboundMethodsSimpleMessage) GetNum() int64 {
return 0
}
-func (x *GenerateUnboundMethodsSimpleMessage) GetDuration() *duration.Duration {
+func (x *GenerateUnboundMethodsSimpleMessage) GetDuration() *durationpb.Duration {
if x != nil {
return x.Duration
}
@@ -172,7 +172,7 @@ func file_examples_internal_proto_examplepb_generate_unbound_methods_proto_rawDe
var file_examples_internal_proto_examplepb_generate_unbound_methods_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_examples_internal_proto_examplepb_generate_unbound_methods_proto_goTypes = []interface{}{
(*GenerateUnboundMethodsSimpleMessage)(nil), // 0: grpc.gateway.examples.internal.proto.examplepb.GenerateUnboundMethodsSimpleMessage
- (*duration.Duration)(nil), // 1: google.protobuf.Duration
+ (*durationpb.Duration)(nil), // 1: google.protobuf.Duration
}
var file_examples_internal_proto_examplepb_generate_unbound_methods_proto_depIdxs = []int32{
1, // 0: grpc.gateway.examples.internal.proto.examplepb.GenerateUnboundMethodsSimpleMessage.duration:type_name -> google.protobuf.Duration
diff --git a/examples/internal/proto/examplepb/generate_unbound_methods.pb.gw.go b/examples/internal/proto/examplepb/generate_unbound_methods.pb.gw.go
index 092073963d5..2a2fd881502 100644
--- a/examples/internal/proto/examplepb/generate_unbound_methods.pb.gw.go
+++ b/examples/internal/proto/examplepb/generate_unbound_methods.pb.gw.go
@@ -145,20 +145,22 @@ func RegisterGenerateUnboundMethodsEchoServiceHandlerServer(ctx context.Context,
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.GenerateUnboundMethodsEchoService/Echo")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.GenerateUnboundMethodsEchoService/Echo", runtime.WithHTTPPathPattern("/grpc.gateway.examples.internal.proto.examplepb.GenerateUnboundMethodsEchoService/Echo"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_GenerateUnboundMethodsEchoService_Echo_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_GenerateUnboundMethodsEchoService_Echo_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_GenerateUnboundMethodsEchoService_Echo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_GenerateUnboundMethodsEchoService_Echo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -168,20 +170,22 @@ func RegisterGenerateUnboundMethodsEchoServiceHandlerServer(ctx context.Context,
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.GenerateUnboundMethodsEchoService/EchoBody")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.GenerateUnboundMethodsEchoService/EchoBody", runtime.WithHTTPPathPattern("/grpc.gateway.examples.internal.proto.examplepb.GenerateUnboundMethodsEchoService/EchoBody"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_GenerateUnboundMethodsEchoService_EchoBody_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_GenerateUnboundMethodsEchoService_EchoBody_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_GenerateUnboundMethodsEchoService_EchoBody_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_GenerateUnboundMethodsEchoService_EchoBody_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -191,20 +195,22 @@ func RegisterGenerateUnboundMethodsEchoServiceHandlerServer(ctx context.Context,
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.GenerateUnboundMethodsEchoService/EchoDelete")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.GenerateUnboundMethodsEchoService/EchoDelete", runtime.WithHTTPPathPattern("/grpc.gateway.examples.internal.proto.examplepb.GenerateUnboundMethodsEchoService/EchoDelete"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_GenerateUnboundMethodsEchoService_EchoDelete_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_GenerateUnboundMethodsEchoService_EchoDelete_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_GenerateUnboundMethodsEchoService_EchoDelete_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_GenerateUnboundMethodsEchoService_EchoDelete_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -253,19 +259,21 @@ func RegisterGenerateUnboundMethodsEchoServiceHandlerClient(ctx context.Context,
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.GenerateUnboundMethodsEchoService/Echo")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.GenerateUnboundMethodsEchoService/Echo", runtime.WithHTTPPathPattern("/grpc.gateway.examples.internal.proto.examplepb.GenerateUnboundMethodsEchoService/Echo"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_GenerateUnboundMethodsEchoService_Echo_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_GenerateUnboundMethodsEchoService_Echo_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_GenerateUnboundMethodsEchoService_Echo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_GenerateUnboundMethodsEchoService_Echo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -273,19 +281,21 @@ func RegisterGenerateUnboundMethodsEchoServiceHandlerClient(ctx context.Context,
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.GenerateUnboundMethodsEchoService/EchoBody")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.GenerateUnboundMethodsEchoService/EchoBody", runtime.WithHTTPPathPattern("/grpc.gateway.examples.internal.proto.examplepb.GenerateUnboundMethodsEchoService/EchoBody"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_GenerateUnboundMethodsEchoService_EchoBody_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_GenerateUnboundMethodsEchoService_EchoBody_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_GenerateUnboundMethodsEchoService_EchoBody_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_GenerateUnboundMethodsEchoService_EchoBody_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -293,19 +303,21 @@ func RegisterGenerateUnboundMethodsEchoServiceHandlerClient(ctx context.Context,
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.GenerateUnboundMethodsEchoService/EchoDelete")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.GenerateUnboundMethodsEchoService/EchoDelete", runtime.WithHTTPPathPattern("/grpc.gateway.examples.internal.proto.examplepb.GenerateUnboundMethodsEchoService/EchoDelete"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_GenerateUnboundMethodsEchoService_EchoDelete_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_GenerateUnboundMethodsEchoService_EchoDelete_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_GenerateUnboundMethodsEchoService_EchoDelete_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_GenerateUnboundMethodsEchoService_EchoDelete_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
diff --git a/examples/internal/proto/examplepb/generate_unbound_methods.proto b/examples/internal/proto/examplepb/generate_unbound_methods.proto
index 1c67993a2dc..51bb21f3962 100644
--- a/examples/internal/proto/examplepb/generate_unbound_methods.proto
+++ b/examples/internal/proto/examplepb/generate_unbound_methods.proto
@@ -1,5 +1,4 @@
syntax = "proto3";
-option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/examplepb";
// Generate Unannotated Methods Echo Service
// Similar to echo_service.proto but without annotations and without external configuration.
@@ -11,25 +10,27 @@ package grpc.gateway.examples.internal.proto.examplepb;
// Do not need annotations.proto, can still use well known types as usual
import "google/protobuf/duration.proto";
+option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/examplepb";
+
// GenerateUnboundMethodsSimpleMessage represents a simple message sent to the unannotated GenerateUnboundMethodsEchoService service.
message GenerateUnboundMethodsSimpleMessage {
- // Id represents the message identifier.
- string id = 1;
- int64 num = 2;
- google.protobuf.Duration duration = 3;
+ // Id represents the message identifier.
+ string id = 1;
+ int64 num = 2;
+ google.protobuf.Duration duration = 3;
}
// GenerateUnboundMethodsEchoService service responds to incoming echo requests.
service GenerateUnboundMethodsEchoService {
- // Echo method receives a simple message and returns it.
- //
- // The message posted as the id parameter will also be
- // returned.
- rpc Echo(GenerateUnboundMethodsSimpleMessage) returns (GenerateUnboundMethodsSimpleMessage);
+ // Echo method receives a simple message and returns it.
+ //
+ // The message posted as the id parameter will also be
+ // returned.
+ rpc Echo(GenerateUnboundMethodsSimpleMessage) returns (GenerateUnboundMethodsSimpleMessage);
+
+ // EchoBody method receives a simple message and returns it.
+ rpc EchoBody(GenerateUnboundMethodsSimpleMessage) returns (GenerateUnboundMethodsSimpleMessage);
- // EchoBody method receives a simple message and returns it.
- rpc EchoBody(GenerateUnboundMethodsSimpleMessage) returns (GenerateUnboundMethodsSimpleMessage);
-
- // EchoDelete method receives a simple message and returns it.
- rpc EchoDelete(GenerateUnboundMethodsSimpleMessage) returns (GenerateUnboundMethodsSimpleMessage);
+ // EchoDelete method receives a simple message and returns it.
+ rpc EchoDelete(GenerateUnboundMethodsSimpleMessage) returns (GenerateUnboundMethodsSimpleMessage);
}
diff --git a/examples/internal/proto/examplepb/generate_unbound_methods.swagger.json b/examples/internal/proto/examplepb/generate_unbound_methods.swagger.json
index 4adb8a74a2a..521865a52de 100644
--- a/examples/internal/proto/examplepb/generate_unbound_methods.swagger.json
+++ b/examples/internal/proto/examplepb/generate_unbound_methods.swagger.json
@@ -39,6 +39,7 @@
"parameters": [
{
"name": "body",
+ "description": "GenerateUnboundMethodsSimpleMessage represents a simple message sent to the unannotated GenerateUnboundMethodsEchoService service.",
"in": "body",
"required": true,
"schema": {
@@ -72,6 +73,7 @@
"parameters": [
{
"name": "body",
+ "description": "GenerateUnboundMethodsSimpleMessage represents a simple message sent to the unannotated GenerateUnboundMethodsEchoService service.",
"in": "body",
"required": true,
"schema": {
@@ -105,6 +107,7 @@
"parameters": [
{
"name": "body",
+ "description": "GenerateUnboundMethodsSimpleMessage represents a simple message sent to the unannotated GenerateUnboundMethodsEchoService service.",
"in": "body",
"required": true,
"schema": {
@@ -139,14 +142,11 @@
"protobufAny": {
"type": "object",
"properties": {
- "typeUrl": {
+ "@type": {
"type": "string"
- },
- "value": {
- "type": "string",
- "format": "byte"
}
- }
+ },
+ "additionalProperties": {}
},
"rpcStatus": {
"type": "object",
diff --git a/examples/internal/proto/examplepb/generate_unbound_methods_grpc.pb.go b/examples/internal/proto/examplepb/generate_unbound_methods_grpc.pb.go
index cf2fd9fc3b4..3ee17a66351 100644
--- a/examples/internal/proto/examplepb/generate_unbound_methods_grpc.pb.go
+++ b/examples/internal/proto/examplepb/generate_unbound_methods_grpc.pb.go
@@ -11,6 +11,7 @@ import (
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
+// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// GenerateUnboundMethodsEchoServiceClient is the client API for GenerateUnboundMethodsEchoService service.
@@ -99,8 +100,8 @@ type UnsafeGenerateUnboundMethodsEchoServiceServer interface {
mustEmbedUnimplementedGenerateUnboundMethodsEchoServiceServer()
}
-func RegisterGenerateUnboundMethodsEchoServiceServer(s *grpc.Server, srv GenerateUnboundMethodsEchoServiceServer) {
- s.RegisterService(&_GenerateUnboundMethodsEchoService_serviceDesc, srv)
+func RegisterGenerateUnboundMethodsEchoServiceServer(s grpc.ServiceRegistrar, srv GenerateUnboundMethodsEchoServiceServer) {
+ s.RegisterService(&GenerateUnboundMethodsEchoService_ServiceDesc, srv)
}
func _GenerateUnboundMethodsEchoService_Echo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
@@ -157,7 +158,10 @@ func _GenerateUnboundMethodsEchoService_EchoDelete_Handler(srv interface{}, ctx
return interceptor(ctx, in, info, handler)
}
-var _GenerateUnboundMethodsEchoService_serviceDesc = grpc.ServiceDesc{
+// GenerateUnboundMethodsEchoService_ServiceDesc is the grpc.ServiceDesc for GenerateUnboundMethodsEchoService service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var GenerateUnboundMethodsEchoService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "grpc.gateway.examples.internal.proto.examplepb.GenerateUnboundMethodsEchoService",
HandlerType: (*GenerateUnboundMethodsEchoServiceServer)(nil),
Methods: []grpc.MethodDesc{
diff --git a/examples/internal/proto/examplepb/generated_input.proto b/examples/internal/proto/examplepb/generated_input.proto
index bd4ab5fb247..2bda2e7b1bf 100644
--- a/examples/internal/proto/examplepb/generated_input.proto
+++ b/examples/internal/proto/examplepb/generated_input.proto
@@ -1,20 +1,21 @@
syntax = "proto3";
-option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/examplepb";
+
package grpc.gateway.examples.internal.proto.examplepb;
+import "examples/internal/proto/examplepb/a_bit_of_everything.proto";
import "google/api/annotations.proto";
import "google/protobuf/empty.proto";
-import "examples/internal/proto/examplepb/a_bit_of_everything.proto";
+
+option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/examplepb";
// This file is run through a genrule.
// Defines some more operations to be added to ABitOfEverythingService
service GeneratedService {
- rpc Create(ABitOfEverything) returns (google.protobuf.Empty) {
- option (google.api.http) = {
- post: "/v1/example/a_bit_of_everything/generated_create"
- body: "*"
- };
- }
-
+ rpc Create(ABitOfEverything) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ post: "/v1/example/a_bit_of_everything/generated_create"
+ body: "*"
+ };
+ }
}
diff --git a/examples/internal/proto/examplepb/generated_input.swagger.json b/examples/internal/proto/examplepb/generated_input.swagger.json
index 7c199c35036..9bd39c3155a 100644
--- a/examples/internal/proto/examplepb/generated_input.swagger.json
+++ b/examples/internal/proto/examplepb/generated_input.swagger.json
@@ -23,6 +23,7 @@
"200": {
"description": "A successful response.",
"schema": {
+ "type": "object",
"properties": {}
}
},
@@ -36,6 +37,7 @@
"parameters": [
{
"name": "body",
+ "description": "Intentionally complicated message type to cover many features of Protobuf.",
"in": "body",
"required": true,
"schema": {
@@ -101,7 +103,8 @@
"uuid": {
"type": "string",
"minLength": 1,
- "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}"
+ "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}",
+ "x-internal": true
},
"nested": {
"type": "array",
@@ -113,10 +116,7 @@
"type": "number",
"format": "float",
"default": "0.2",
- "description": "Float value field",
- "required": [
- "float_value"
- ]
+ "description": "Float value field"
},
"doubleValue": {
"type": "number",
@@ -188,6 +188,7 @@
}
},
"oneofEmpty": {
+ "type": "object",
"properties": {}
},
"oneofString": {
@@ -265,10 +266,7 @@
},
"requiredStringViaFieldBehaviorAnnotation": {
"type": "string",
- "title": "mark a field as required in Open API definition",
- "required": [
- "required_string_via_field_behavior_annotation"
- ]
+ "title": "mark a field as required in Open API definition"
},
"outputOnlyStringViaFieldBehaviorAnnotation": {
"type": "string",
@@ -277,9 +275,55 @@
},
"optionalStringValue": {
"type": "string"
+ },
+ "productId": {
+ "type": "array",
+ "items": {
+ "type": "string",
+ "maxLength": 19,
+ "minLength": 1,
+ "pattern": "^[0-9]+$"
+ },
+ "description": "Only digits are allowed.",
+ "title": "Test openapiv2 generation of repeated fields"
+ },
+ "optionalStringField": {
+ "type": "string",
+ "title": "Test openapiv2 generation of required fields with annotation and jsonschema to reproduce"
+ },
+ "requiredStringField1": {
+ "type": "string"
+ },
+ "requiredStringField2": {
+ "type": "string"
+ },
+ "required_field_behavior_json_name_custom": {
+ "type": "string",
+ "title": "Test openapiv2 handling of required json_name fields"
+ },
+ "required_field_schema_json_name_custom": {
+ "type": "string"
+ },
+ "trailingOnly": {
+ "type": "string",
+ "title": "Trailing only"
+ },
+ "trailingOnlyDot": {
+ "type": "string",
+ "description": "Trailing only dot."
+ },
+ "trailingBoth": {
+ "type": "string",
+ "description": "Trailing both.",
+ "title": "Leading both"
+ },
+ "trailingMultiline": {
+ "type": "string",
+ "description": "This is an example of a multi-line comment.\n\nTrailing multiline.",
+ "title": "Leading multiline"
}
},
- "description": "Intentionaly complicated message type to cover many features of Protobuf.",
+ "description": "Intentionally complicated message type to cover many features of Protobuf.",
"title": "A bit of everything",
"externalDocs": {
"description": "Find out more about ABitOfEverything",
@@ -289,9 +333,14 @@
"uuid",
"int64Value",
"doubleValue",
+ "required_field_schema_json_name_custom",
"floatValue",
- "requiredStringViaFieldBehaviorAnnotation"
- ]
+ "requiredStringViaFieldBehaviorAnnotation",
+ "requiredStringField1",
+ "requiredStringField2",
+ "required_field_behavior_json_name_custom"
+ ],
+ "x-a-bit-of-everything-foo": "bar"
},
"examplepbNumericEnum": {
"type": "string",
@@ -313,17 +362,13 @@
"protobufAny": {
"type": "object",
"properties": {
- "typeUrl": {
+ "@type": {
"type": "string",
"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",
- "format": "byte",
- "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\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 }"
+ "additionalProperties": {},
+ "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 := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(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 }"
},
"rpcStatus": {
"type": "object",
diff --git a/examples/internal/proto/examplepb/non_standard_names.pb.go b/examples/internal/proto/examplepb/non_standard_names.pb.go
index df9b59aa799..fa5d46f8f36 100644
--- a/examples/internal/proto/examplepb/non_standard_names.pb.go
+++ b/examples/internal/proto/examplepb/non_standard_names.pb.go
@@ -1,16 +1,16 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.26.0
-// protoc v3.13.0
+// protoc-gen-go v1.27.1
+// protoc (unknown)
// source: examples/internal/proto/examplepb/non_standard_names.proto
package examplepb
import (
_ "google.golang.org/genproto/googleapis/api/annotations"
- field_mask "google.golang.org/genproto/protobuf/field_mask"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb"
reflect "reflect"
sync "sync"
)
@@ -132,8 +132,8 @@ type NonStandardUpdateRequest struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- Body *NonStandardMessage `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"`
- UpdateMask *field_mask.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
+ Body *NonStandardMessage `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"`
+ UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
}
func (x *NonStandardUpdateRequest) Reset() {
@@ -175,7 +175,7 @@ func (x *NonStandardUpdateRequest) GetBody() *NonStandardMessage {
return nil
}
-func (x *NonStandardUpdateRequest) GetUpdateMask() *field_mask.FieldMask {
+func (x *NonStandardUpdateRequest) GetUpdateMask() *fieldmaskpb.FieldMask {
if x != nil {
return x.UpdateMask
}
@@ -293,7 +293,7 @@ type NonStandardWithJSONNamesUpdateRequest struct {
unknownFields protoimpl.UnknownFields
Body *NonStandardMessageWithJSONNames `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"`
- UpdateMask *field_mask.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
+ UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
}
func (x *NonStandardWithJSONNamesUpdateRequest) Reset() {
@@ -335,7 +335,7 @@ func (x *NonStandardWithJSONNamesUpdateRequest) GetBody() *NonStandardMessageWit
return nil
}
-func (x *NonStandardWithJSONNamesUpdateRequest) GetUpdateMask() *field_mask.FieldMask {
+func (x *NonStandardWithJSONNamesUpdateRequest) GetUpdateMask() *fieldmaskpb.FieldMask {
if x != nil {
return x.UpdateMask
}
@@ -635,10 +635,10 @@ var file_examples_internal_proto_examplepb_non_standard_names_proto_rawDesc = []
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, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64,
- 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x2d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x32,
- 0x1f, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x6e, 0x6f, 0x6e,
- 0x5f, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65,
- 0x3a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0xfc, 0x01, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74,
+ 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x2d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x3a,
+ 0x04, 0x62, 0x6f, 0x64, 0x79, 0x32, 0x1f, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70,
+ 0x6c, 0x65, 0x2f, 0x6e, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x2f,
+ 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0xfc, 0x01, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74,
0x65, 0x57, 0x69, 0x74, 0x68, 0x4a, 0x53, 0x4f, 0x4e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x55,
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,
@@ -650,11 +650,11 @@ var file_examples_internal_proto_examplepb_non_standard_names_proto_rawDesc = []
0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x65, 0x78, 0x61,
0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x61,
0x72, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x57, 0x69, 0x74, 0x68, 0x4a, 0x53, 0x4f,
- 0x4e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x3d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x37, 0x32, 0x2f,
- 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x6e, 0x6f, 0x6e, 0x5f,
- 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f,
- 0x77, 0x69, 0x74, 0x68, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x3a,
- 0x04, 0x62, 0x6f, 0x64, 0x79, 0x42, 0x4d, 0x5a, 0x4b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
+ 0x4e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x3d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x37, 0x3a, 0x04,
+ 0x62, 0x6f, 0x64, 0x79, 0x32, 0x2f, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c,
+ 0x65, 0x2f, 0x6e, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x2f, 0x75,
+ 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f,
+ 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x42, 0x4d, 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,
@@ -684,7 +684,7 @@ var file_examples_internal_proto_examplepb_non_standard_names_proto_goTypes = []
(*NonStandardMessage_Thing_SubThing)(nil), // 5: grpc.gateway.examples.internal.proto.examplepb.NonStandardMessage.Thing.SubThing
(*NonStandardMessageWithJSONNames_Thing)(nil), // 6: grpc.gateway.examples.internal.proto.examplepb.NonStandardMessageWithJSONNames.Thing
(*NonStandardMessageWithJSONNames_Thing_SubThing)(nil), // 7: grpc.gateway.examples.internal.proto.examplepb.NonStandardMessageWithJSONNames.Thing.SubThing
- (*field_mask.FieldMask)(nil), // 8: google.protobuf.FieldMask
+ (*fieldmaskpb.FieldMask)(nil), // 8: google.protobuf.FieldMask
}
var file_examples_internal_proto_examplepb_non_standard_names_proto_depIdxs = []int32{
4, // 0: grpc.gateway.examples.internal.proto.examplepb.NonStandardMessage.thing:type_name -> grpc.gateway.examples.internal.proto.examplepb.NonStandardMessage.Thing
diff --git a/examples/internal/proto/examplepb/non_standard_names.pb.gw.go b/examples/internal/proto/examplepb/non_standard_names.pb.gw.go
index 50fae892a29..4d4a0b81993 100644
--- a/examples/internal/proto/examplepb/non_standard_names.pb.gw.go
+++ b/examples/internal/proto/examplepb/non_standard_names.pb.gw.go
@@ -175,20 +175,22 @@ func RegisterNonStandardServiceHandlerServer(ctx context.Context, mux *runtime.S
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.NonStandardService/Update")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.NonStandardService/Update", runtime.WithHTTPPathPattern("/v1/example/non_standard/update"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_NonStandardService_Update_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_NonStandardService_Update_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_NonStandardService_Update_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_NonStandardService_Update_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -198,20 +200,22 @@ func RegisterNonStandardServiceHandlerServer(ctx context.Context, mux *runtime.S
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.NonStandardService/UpdateWithJSONNames")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.NonStandardService/UpdateWithJSONNames", runtime.WithHTTPPathPattern("/v1/example/non_standard/update_with_json_names"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_NonStandardService_UpdateWithJSONNames_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_NonStandardService_UpdateWithJSONNames_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_NonStandardService_UpdateWithJSONNames_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_NonStandardService_UpdateWithJSONNames_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -260,19 +264,21 @@ func RegisterNonStandardServiceHandlerClient(ctx context.Context, mux *runtime.S
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.NonStandardService/Update")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.NonStandardService/Update", runtime.WithHTTPPathPattern("/v1/example/non_standard/update"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_NonStandardService_Update_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_NonStandardService_Update_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_NonStandardService_Update_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_NonStandardService_Update_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -280,19 +286,21 @@ func RegisterNonStandardServiceHandlerClient(ctx context.Context, mux *runtime.S
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.NonStandardService/UpdateWithJSONNames")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.NonStandardService/UpdateWithJSONNames", runtime.WithHTTPPathPattern("/v1/example/non_standard/update_with_json_names"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_NonStandardService_UpdateWithJSONNames_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_NonStandardService_UpdateWithJSONNames_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_NonStandardService_UpdateWithJSONNames_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_NonStandardService_UpdateWithJSONNames_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
diff --git a/examples/internal/proto/examplepb/non_standard_names.proto b/examples/internal/proto/examplepb/non_standard_names.proto
index 1a1a76d1378..3b40cf9f49e 100644
--- a/examples/internal/proto/examplepb/non_standard_names.proto
+++ b/examples/internal/proto/examplepb/non_standard_names.proto
@@ -1,75 +1,77 @@
syntax = "proto3";
-option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/examplepb";
+
package grpc.gateway.examples.internal.proto.examplepb;
import "google/api/annotations.proto";
import "google/protobuf/field_mask.proto";
+option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/examplepb";
+
// NonStandardMessage has oddly named fields.
message NonStandardMessage {
- // Id represents the message identifier.
- string id = 1;
- int64 Num = 2;
- int64 line_num = 3;
- string langIdent = 4;
- string STATUS = 5;
- int64 en_GB = 6;
- string no = 7;
+ // Id represents the message identifier.
+ string id = 1;
+ int64 Num = 2;
+ int64 line_num = 3;
+ string langIdent = 4;
+ string STATUS = 5;
+ int64 en_GB = 6;
+ string no = 7;
- message Thing {
- message SubThing {
- string sub_value = 1;
- }
- SubThing subThing = 1;
+ message Thing {
+ message SubThing {
+ string sub_value = 1;
}
- Thing thing = 8;
+ SubThing subThing = 1;
+ }
+ Thing thing = 8;
}
message NonStandardUpdateRequest {
- NonStandardMessage body = 1;
- google.protobuf.FieldMask update_mask = 2;
+ NonStandardMessage body = 1;
+ google.protobuf.FieldMask update_mask = 2;
}
// NonStandardMessageWithJSONNames maps odd field names to odd JSON names for maximum confusion.
message NonStandardMessageWithJSONNames {
- // Id represents the message identifier.
- string id = 1 [json_name="ID"];
- int64 Num = 2 [json_name="Num"];
- int64 line_num = 3 [json_name="LineNum"];
- string langIdent = 4 [json_name="langIdent"];
- string STATUS = 5 [json_name="status"];
- int64 en_GB = 6 [json_name="En_GB"];
- string no = 7 [json_name="yes"];
+ // Id represents the message identifier.
+ string id = 1 [json_name = "ID"];
+ int64 Num = 2 [json_name = "Num"];
+ int64 line_num = 3 [json_name = "LineNum"];
+ string langIdent = 4 [json_name = "langIdent"];
+ string STATUS = 5 [json_name = "status"];
+ int64 en_GB = 6 [json_name = "En_GB"];
+ string no = 7 [json_name = "yes"];
- message Thing {
- message SubThing {
- string sub_value = 1 [json_name="sub_Value"];
- }
- SubThing subThing = 1 [json_name="SubThing"];
+ message Thing {
+ message SubThing {
+ string sub_value = 1 [json_name = "sub_Value"];
}
- Thing thing = 8 [json_name="Thingy"];
+ SubThing subThing = 1 [json_name = "SubThing"];
+ }
+ Thing thing = 8 [json_name = "Thingy"];
}
message NonStandardWithJSONNamesUpdateRequest {
- NonStandardMessageWithJSONNames body = 1;
- google.protobuf.FieldMask update_mask = 2;
+ NonStandardMessageWithJSONNames body = 1;
+ google.protobuf.FieldMask update_mask = 2;
}
// NonStandardService responds to incoming messages, applies a field mask and returns the masked response.
service NonStandardService {
- // Apply field mask to empty NonStandardMessage and return result.
- rpc Update(NonStandardUpdateRequest) returns (NonStandardMessage) {
- option (google.api.http) = {
- patch: "/v1/example/non_standard/update"
- body: "body"
- };
- }
+ // Apply field mask to empty NonStandardMessage and return result.
+ rpc Update(NonStandardUpdateRequest) returns (NonStandardMessage) {
+ option (google.api.http) = {
+ patch: "/v1/example/non_standard/update"
+ body: "body"
+ };
+ }
- // Apply field mask to empty NonStandardMessageWithJSONNames and return result.
- rpc UpdateWithJSONNames(NonStandardWithJSONNamesUpdateRequest) returns (NonStandardMessageWithJSONNames) {
- option (google.api.http) = {
- patch: "/v1/example/non_standard/update_with_json_names"
- body: "body"
- };
- }
+ // Apply field mask to empty NonStandardMessageWithJSONNames and return result.
+ rpc UpdateWithJSONNames(NonStandardWithJSONNamesUpdateRequest) returns (NonStandardMessageWithJSONNames) {
+ option (google.api.http) = {
+ patch: "/v1/example/non_standard/update_with_json_names"
+ body: "body"
+ };
+ }
}
diff --git a/examples/internal/proto/examplepb/non_standard_names.swagger.json b/examples/internal/proto/examplepb/non_standard_names.swagger.json
index bc44971a5cb..5531792f4b9 100644
--- a/examples/internal/proto/examplepb/non_standard_names.swagger.json
+++ b/examples/internal/proto/examplepb/non_standard_names.swagger.json
@@ -199,17 +199,13 @@
"protobufAny": {
"type": "object",
"properties": {
- "typeUrl": {
+ "@type": {
"type": "string",
"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",
- "format": "byte",
- "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\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 }"
+ "additionalProperties": {},
+ "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 := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(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 }"
},
"rpcStatus": {
"type": "object",
diff --git a/examples/internal/proto/examplepb/non_standard_names_grpc.pb.go b/examples/internal/proto/examplepb/non_standard_names_grpc.pb.go
index 4bac30b23cb..0b561dbdb51 100644
--- a/examples/internal/proto/examplepb/non_standard_names_grpc.pb.go
+++ b/examples/internal/proto/examplepb/non_standard_names_grpc.pb.go
@@ -11,6 +11,7 @@ import (
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
+// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// NonStandardServiceClient is the client API for NonStandardService service.
@@ -77,8 +78,8 @@ type UnsafeNonStandardServiceServer interface {
mustEmbedUnimplementedNonStandardServiceServer()
}
-func RegisterNonStandardServiceServer(s *grpc.Server, srv NonStandardServiceServer) {
- s.RegisterService(&_NonStandardService_serviceDesc, srv)
+func RegisterNonStandardServiceServer(s grpc.ServiceRegistrar, srv NonStandardServiceServer) {
+ s.RegisterService(&NonStandardService_ServiceDesc, srv)
}
func _NonStandardService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
@@ -117,7 +118,10 @@ func _NonStandardService_UpdateWithJSONNames_Handler(srv interface{}, ctx contex
return interceptor(ctx, in, info, handler)
}
-var _NonStandardService_serviceDesc = grpc.ServiceDesc{
+// NonStandardService_ServiceDesc is the grpc.ServiceDesc for NonStandardService service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var NonStandardService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "grpc.gateway.examples.internal.proto.examplepb.NonStandardService",
HandlerType: (*NonStandardServiceServer)(nil),
Methods: []grpc.MethodDesc{
diff --git a/examples/internal/proto/examplepb/openapi_merge.buf.gen.yaml b/examples/internal/proto/examplepb/openapi_merge.buf.gen.yaml
index c2fa05fa045..042a099fdfd 100644
--- a/examples/internal/proto/examplepb/openapi_merge.buf.gen.yaml
+++ b/examples/internal/proto/examplepb/openapi_merge.buf.gen.yaml
@@ -1,4 +1,4 @@
-version: v1beta1
+version: v1
plugins:
- name: openapiv2
out: .
diff --git a/examples/internal/proto/examplepb/openapi_merge.swagger.json b/examples/internal/proto/examplepb/openapi_merge.swagger.json
index 9b504281867..86bbe5c7c3b 100644
--- a/examples/internal/proto/examplepb/openapi_merge.swagger.json
+++ b/examples/internal/proto/examplepb/openapi_merge.swagger.json
@@ -45,6 +45,7 @@
"parameters": [
{
"name": "body",
+ "description": "InMessageA represents a message to ServiceA and ServiceC.",
"in": "body",
"required": true,
"schema": {
@@ -79,6 +80,7 @@
"parameters": [
{
"name": "body",
+ "description": "OutMessageA represents a message returned from ServiceA.",
"in": "body",
"required": true,
"schema": {
@@ -113,6 +115,7 @@
"parameters": [
{
"name": "body",
+ "description": "InMessageB represents a message to ServiceB.",
"in": "body",
"required": true,
"schema": {
@@ -147,6 +150,7 @@
"parameters": [
{
"name": "body",
+ "description": "OutMessageB represents a message returned from ServiceB.",
"in": "body",
"required": true,
"schema": {
@@ -181,6 +185,7 @@
"parameters": [
{
"name": "body",
+ "description": "InMessageA represents a message to ServiceA and ServiceC.",
"in": "body",
"required": true,
"schema": {
@@ -215,6 +220,7 @@
"parameters": [
{
"name": "body",
+ "description": "OutMessageA represents a message returned from ServiceA.",
"in": "body",
"required": true,
"schema": {
@@ -288,14 +294,11 @@
"protobufAny": {
"type": "object",
"properties": {
- "typeUrl": {
+ "@type": {
"type": "string"
- },
- "value": {
- "type": "string",
- "format": "byte"
}
- }
+ },
+ "additionalProperties": {}
},
"rpcStatus": {
"type": "object",
diff --git a/examples/internal/proto/examplepb/openapi_merge_a.pb.go b/examples/internal/proto/examplepb/openapi_merge_a.pb.go
index 102000eb7d6..fd1b30f0bbb 100644
--- a/examples/internal/proto/examplepb/openapi_merge_a.pb.go
+++ b/examples/internal/proto/examplepb/openapi_merge_a.pb.go
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.26.0
-// protoc v3.13.0
+// protoc-gen-go v1.27.1
+// protoc (unknown)
// source: examples/internal/proto/examplepb/openapi_merge_a.proto
// Merging Services
@@ -199,8 +199,8 @@ var file_examples_internal_proto_examplepb_openapi_merge_a_proto_rawDesc = []byt
0x79, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72,
0x6e, 0x61, 0x6c, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x4f, 0x75,
0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x41, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02,
- 0x14, 0x22, 0x0f, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x61,
- 0x2f, 0x31, 0x3a, 0x01, 0x2a, 0x12, 0x94, 0x01, 0x0a, 0x09, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64,
+ 0x14, 0x3a, 0x01, 0x2a, 0x22, 0x0f, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c,
+ 0x65, 0x2f, 0x61, 0x2f, 0x31, 0x12, 0x94, 0x01, 0x0a, 0x09, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64,
0x54, 0x77, 0x6f, 0x12, 0x35, 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, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x4f,
@@ -208,8 +208,8 @@ var file_examples_internal_proto_examplepb_openapi_merge_a_proto_rawDesc = []byt
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, 0x65, 0x78, 0x61, 0x6d,
0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x49, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x41,
- 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x22, 0x0f, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78,
- 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x61, 0x2f, 0x32, 0x3a, 0x01, 0x2a, 0x32, 0xb8, 0x02, 0x0a,
+ 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x3a, 0x01, 0x2a, 0x22, 0x0f, 0x2f, 0x76, 0x31,
+ 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x61, 0x2f, 0x32, 0x32, 0xb8, 0x02, 0x0a,
0x08, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x12, 0x94, 0x01, 0x0a, 0x09, 0x4d, 0x65,
0x74, 0x68, 0x6f, 0x64, 0x4f, 0x6e, 0x65, 0x12, 0x34, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67,
0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2e,
@@ -218,8 +218,8 @@ var file_examples_internal_proto_examplepb_openapi_merge_a_proto_rawDesc = []byt
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, 0x65,
0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x4f, 0x75, 0x74, 0x4d, 0x65, 0x73, 0x73,
- 0x61, 0x67, 0x65, 0x43, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x22, 0x0f, 0x2f, 0x76,
- 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x63, 0x2f, 0x31, 0x3a, 0x01, 0x2a,
+ 0x61, 0x67, 0x65, 0x43, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x3a, 0x01, 0x2a, 0x22,
+ 0x0f, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x63, 0x2f, 0x31,
0x12, 0x94, 0x01, 0x0a, 0x09, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x54, 0x77, 0x6f, 0x12, 0x35,
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,
@@ -228,8 +228,8 @@ var file_examples_internal_proto_examplepb_openapi_merge_a_proto_rawDesc = []byt
0x65, 0x77, 0x61, 0x79, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x69, 0x6e,
0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62,
0x2e, 0x49, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x41, 0x22, 0x1a, 0x82, 0xd3, 0xe4,
- 0x93, 0x02, 0x14, 0x22, 0x0f, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65,
- 0x2f, 0x63, 0x2f, 0x32, 0x3a, 0x01, 0x2a, 0x42, 0x4d, 0x5a, 0x4b, 0x67, 0x69, 0x74, 0x68, 0x75,
+ 0x93, 0x02, 0x14, 0x3a, 0x01, 0x2a, 0x22, 0x0f, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d,
+ 0x70, 0x6c, 0x65, 0x2f, 0x63, 0x2f, 0x32, 0x42, 0x4d, 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,
diff --git a/examples/internal/proto/examplepb/openapi_merge_a.pb.gw.go b/examples/internal/proto/examplepb/openapi_merge_a.pb.gw.go
index f0d18addafa..c8ea65183de 100644
--- a/examples/internal/proto/examplepb/openapi_merge_a.pb.gw.go
+++ b/examples/internal/proto/examplepb/openapi_merge_a.pb.gw.go
@@ -179,20 +179,22 @@ func RegisterServiceAHandlerServer(ctx context.Context, mux *runtime.ServeMux, s
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.examplepb.ServiceA/MethodOne")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.examplepb.ServiceA/MethodOne", runtime.WithHTTPPathPattern("/v1/example/a/1"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_ServiceA_MethodOne_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_ServiceA_MethodOne_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ServiceA_MethodOne_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ServiceA_MethodOne_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -202,20 +204,22 @@ func RegisterServiceAHandlerServer(ctx context.Context, mux *runtime.ServeMux, s
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.examplepb.ServiceA/MethodTwo")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.examplepb.ServiceA/MethodTwo", runtime.WithHTTPPathPattern("/v1/example/a/2"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_ServiceA_MethodTwo_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_ServiceA_MethodTwo_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ServiceA_MethodTwo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ServiceA_MethodTwo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -234,20 +238,22 @@ func RegisterServiceCHandlerServer(ctx context.Context, mux *runtime.ServeMux, s
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.examplepb.ServiceC/MethodOne")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.examplepb.ServiceC/MethodOne", runtime.WithHTTPPathPattern("/v1/example/c/1"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_ServiceC_MethodOne_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_ServiceC_MethodOne_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ServiceC_MethodOne_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ServiceC_MethodOne_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -257,20 +263,22 @@ func RegisterServiceCHandlerServer(ctx context.Context, mux *runtime.ServeMux, s
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.examplepb.ServiceC/MethodTwo")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.examplepb.ServiceC/MethodTwo", runtime.WithHTTPPathPattern("/v1/example/c/2"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_ServiceC_MethodTwo_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_ServiceC_MethodTwo_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ServiceC_MethodTwo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ServiceC_MethodTwo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -319,19 +327,21 @@ func RegisterServiceAHandlerClient(ctx context.Context, mux *runtime.ServeMux, c
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.examplepb.ServiceA/MethodOne")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.examplepb.ServiceA/MethodOne", runtime.WithHTTPPathPattern("/v1/example/a/1"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_ServiceA_MethodOne_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_ServiceA_MethodOne_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ServiceA_MethodOne_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ServiceA_MethodOne_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -339,19 +349,21 @@ func RegisterServiceAHandlerClient(ctx context.Context, mux *runtime.ServeMux, c
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.examplepb.ServiceA/MethodTwo")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.examplepb.ServiceA/MethodTwo", runtime.WithHTTPPathPattern("/v1/example/a/2"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_ServiceA_MethodTwo_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_ServiceA_MethodTwo_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ServiceA_MethodTwo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ServiceA_MethodTwo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -412,19 +424,21 @@ func RegisterServiceCHandlerClient(ctx context.Context, mux *runtime.ServeMux, c
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.examplepb.ServiceC/MethodOne")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.examplepb.ServiceC/MethodOne", runtime.WithHTTPPathPattern("/v1/example/c/1"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_ServiceC_MethodOne_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_ServiceC_MethodOne_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ServiceC_MethodOne_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ServiceC_MethodOne_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -432,19 +446,21 @@ func RegisterServiceCHandlerClient(ctx context.Context, mux *runtime.ServeMux, c
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.examplepb.ServiceC/MethodTwo")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.examplepb.ServiceC/MethodTwo", runtime.WithHTTPPathPattern("/v1/example/c/2"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_ServiceC_MethodTwo_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_ServiceC_MethodTwo_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ServiceC_MethodTwo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ServiceC_MethodTwo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
diff --git a/examples/internal/proto/examplepb/openapi_merge_a.proto b/examples/internal/proto/examplepb/openapi_merge_a.proto
index 007ecd70031..de4f7c52802 100644
--- a/examples/internal/proto/examplepb/openapi_merge_a.proto
+++ b/examples/internal/proto/examplepb/openapi_merge_a.proto
@@ -1,7 +1,5 @@
syntax = "proto3";
-option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/examplepb";
-
// Merging Services
//
// This is an example of merging two proto files.
@@ -9,6 +7,8 @@ package grpc.gateway.examples.internal.examplepb;
import "google/api/annotations.proto";
+option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/examplepb";
+
// InMessageA represents a message to ServiceA and ServiceC.
message InMessageA {
// Here is the explanation about InMessageA.values
diff --git a/examples/internal/proto/examplepb/openapi_merge_a.swagger.json b/examples/internal/proto/examplepb/openapi_merge_a.swagger.json
index 242824822e9..a0942f2d805 100644
--- a/examples/internal/proto/examplepb/openapi_merge_a.swagger.json
+++ b/examples/internal/proto/examplepb/openapi_merge_a.swagger.json
@@ -42,6 +42,7 @@
"parameters": [
{
"name": "body",
+ "description": "InMessageA represents a message to ServiceA and ServiceC.",
"in": "body",
"required": true,
"schema": {
@@ -76,6 +77,7 @@
"parameters": [
{
"name": "body",
+ "description": "OutMessageA represents a message returned from ServiceA.",
"in": "body",
"required": true,
"schema": {
@@ -110,6 +112,7 @@
"parameters": [
{
"name": "body",
+ "description": "InMessageA represents a message to ServiceA and ServiceC.",
"in": "body",
"required": true,
"schema": {
@@ -144,6 +147,7 @@
"parameters": [
{
"name": "body",
+ "description": "OutMessageA represents a message returned from ServiceA.",
"in": "body",
"required": true,
"schema": {
@@ -194,17 +198,13 @@
"protobufAny": {
"type": "object",
"properties": {
- "typeUrl": {
+ "@type": {
"type": "string",
"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",
- "format": "byte",
- "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\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 }"
+ "additionalProperties": {},
+ "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 := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(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 }"
},
"rpcStatus": {
"type": "object",
diff --git a/examples/internal/proto/examplepb/openapi_merge_a_grpc.pb.go b/examples/internal/proto/examplepb/openapi_merge_a_grpc.pb.go
index 9ce0b09c4da..bd17301ea02 100644
--- a/examples/internal/proto/examplepb/openapi_merge_a_grpc.pb.go
+++ b/examples/internal/proto/examplepb/openapi_merge_a_grpc.pb.go
@@ -11,6 +11,7 @@ import (
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
+// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// ServiceAClient is the client API for ServiceA service.
@@ -85,8 +86,8 @@ type UnsafeServiceAServer interface {
mustEmbedUnimplementedServiceAServer()
}
-func RegisterServiceAServer(s *grpc.Server, srv ServiceAServer) {
- s.RegisterService(&_ServiceA_serviceDesc, srv)
+func RegisterServiceAServer(s grpc.ServiceRegistrar, srv ServiceAServer) {
+ s.RegisterService(&ServiceA_ServiceDesc, srv)
}
func _ServiceA_MethodOne_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
@@ -125,7 +126,10 @@ func _ServiceA_MethodTwo_Handler(srv interface{}, ctx context.Context, dec func(
return interceptor(ctx, in, info, handler)
}
-var _ServiceA_serviceDesc = grpc.ServiceDesc{
+// ServiceA_ServiceDesc is the grpc.ServiceDesc for ServiceA service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var ServiceA_ServiceDesc = grpc.ServiceDesc{
ServiceName: "grpc.gateway.examples.internal.examplepb.ServiceA",
HandlerType: (*ServiceAServer)(nil),
Methods: []grpc.MethodDesc{
@@ -214,8 +218,8 @@ type UnsafeServiceCServer interface {
mustEmbedUnimplementedServiceCServer()
}
-func RegisterServiceCServer(s *grpc.Server, srv ServiceCServer) {
- s.RegisterService(&_ServiceC_serviceDesc, srv)
+func RegisterServiceCServer(s grpc.ServiceRegistrar, srv ServiceCServer) {
+ s.RegisterService(&ServiceC_ServiceDesc, srv)
}
func _ServiceC_MethodOne_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
@@ -254,7 +258,10 @@ func _ServiceC_MethodTwo_Handler(srv interface{}, ctx context.Context, dec func(
return interceptor(ctx, in, info, handler)
}
-var _ServiceC_serviceDesc = grpc.ServiceDesc{
+// ServiceC_ServiceDesc is the grpc.ServiceDesc for ServiceC service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var ServiceC_ServiceDesc = grpc.ServiceDesc{
ServiceName: "grpc.gateway.examples.internal.examplepb.ServiceC",
HandlerType: (*ServiceCServer)(nil),
Methods: []grpc.MethodDesc{
diff --git a/examples/internal/proto/examplepb/openapi_merge_b.pb.go b/examples/internal/proto/examplepb/openapi_merge_b.pb.go
index 2fd9abaca8b..07e6dda7d59 100644
--- a/examples/internal/proto/examplepb/openapi_merge_b.pb.go
+++ b/examples/internal/proto/examplepb/openapi_merge_b.pb.go
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.26.0
-// protoc v3.13.0
+// protoc-gen-go v1.27.1
+// protoc (unknown)
// source: examples/internal/proto/examplepb/openapi_merge_b.proto
// Merging Services
@@ -147,8 +147,8 @@ var file_examples_internal_proto_examplepb_openapi_merge_b_proto_rawDesc = []byt
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, 0x65,
0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x4f, 0x75, 0x74, 0x4d, 0x65, 0x73, 0x73,
- 0x61, 0x67, 0x65, 0x42, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x22, 0x0f, 0x2f, 0x76,
- 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x62, 0x2f, 0x31, 0x3a, 0x01, 0x2a,
+ 0x61, 0x67, 0x65, 0x42, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x3a, 0x01, 0x2a, 0x22,
+ 0x0f, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x62, 0x2f, 0x31,
0x12, 0x94, 0x01, 0x0a, 0x09, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x54, 0x77, 0x6f, 0x12, 0x35,
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,
@@ -157,8 +157,8 @@ var file_examples_internal_proto_examplepb_openapi_merge_b_proto_rawDesc = []byt
0x65, 0x77, 0x61, 0x79, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x69, 0x6e,
0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62,
0x2e, 0x49, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x22, 0x1a, 0x82, 0xd3, 0xe4,
- 0x93, 0x02, 0x14, 0x22, 0x0f, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65,
- 0x2f, 0x62, 0x2f, 0x32, 0x3a, 0x01, 0x2a, 0x42, 0x4d, 0x5a, 0x4b, 0x67, 0x69, 0x74, 0x68, 0x75,
+ 0x93, 0x02, 0x14, 0x3a, 0x01, 0x2a, 0x22, 0x0f, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d,
+ 0x70, 0x6c, 0x65, 0x2f, 0x62, 0x2f, 0x32, 0x42, 0x4d, 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,
diff --git a/examples/internal/proto/examplepb/openapi_merge_b.pb.gw.go b/examples/internal/proto/examplepb/openapi_merge_b.pb.gw.go
index ff1431529fd..b5e32a02d81 100644
--- a/examples/internal/proto/examplepb/openapi_merge_b.pb.gw.go
+++ b/examples/internal/proto/examplepb/openapi_merge_b.pb.gw.go
@@ -111,20 +111,22 @@ func RegisterServiceBHandlerServer(ctx context.Context, mux *runtime.ServeMux, s
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.examplepb.ServiceB/MethodOne")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.examplepb.ServiceB/MethodOne", runtime.WithHTTPPathPattern("/v1/example/b/1"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_ServiceB_MethodOne_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_ServiceB_MethodOne_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ServiceB_MethodOne_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ServiceB_MethodOne_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -134,20 +136,22 @@ func RegisterServiceBHandlerServer(ctx context.Context, mux *runtime.ServeMux, s
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.examplepb.ServiceB/MethodTwo")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.examplepb.ServiceB/MethodTwo", runtime.WithHTTPPathPattern("/v1/example/b/2"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_ServiceB_MethodTwo_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_ServiceB_MethodTwo_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ServiceB_MethodTwo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ServiceB_MethodTwo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -196,19 +200,21 @@ func RegisterServiceBHandlerClient(ctx context.Context, mux *runtime.ServeMux, c
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.examplepb.ServiceB/MethodOne")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.examplepb.ServiceB/MethodOne", runtime.WithHTTPPathPattern("/v1/example/b/1"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_ServiceB_MethodOne_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_ServiceB_MethodOne_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ServiceB_MethodOne_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ServiceB_MethodOne_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -216,19 +222,21 @@ func RegisterServiceBHandlerClient(ctx context.Context, mux *runtime.ServeMux, c
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.examplepb.ServiceB/MethodTwo")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.examplepb.ServiceB/MethodTwo", runtime.WithHTTPPathPattern("/v1/example/b/2"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_ServiceB_MethodTwo_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_ServiceB_MethodTwo_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ServiceB_MethodTwo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_ServiceB_MethodTwo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
diff --git a/examples/internal/proto/examplepb/openapi_merge_b.proto b/examples/internal/proto/examplepb/openapi_merge_b.proto
index 0be7b3e62d9..8390a23f4f9 100644
--- a/examples/internal/proto/examplepb/openapi_merge_b.proto
+++ b/examples/internal/proto/examplepb/openapi_merge_b.proto
@@ -1,7 +1,5 @@
syntax = "proto3";
-option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/examplepb";
-
// Merging Services
//
// This is an example of merging two proto files.
@@ -9,36 +7,38 @@ package grpc.gateway.examples.internal.examplepb;
import "google/api/annotations.proto";
+option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/examplepb";
+
// InMessageB represents a message to ServiceB.
message InMessageB {
- // Here is the explanation about InMessageB.values
- string value = 1;
+ // Here is the explanation about InMessageB.values
+ string value = 1;
}
// OutMessageB represents a message returned from ServiceB.
message OutMessageB {
- // Here is the explanation about OutMessageB.value
- repeated string values = 1;
+ // Here is the explanation about OutMessageB.value
+ repeated string values = 1;
}
// ServiceB service responds to incoming merge requests.
service ServiceB {
- // ServiceB.MethodOne receives InMessageB and returns OutMessageB
- //
- // Here is the detail explanation about ServiceB.MethodOne.
- rpc MethodOne(InMessageB) returns (OutMessageB) {
- option (google.api.http) = {
+ // ServiceB.MethodOne receives InMessageB and returns OutMessageB
+ //
+ // Here is the detail explanation about ServiceB.MethodOne.
+ rpc MethodOne(InMessageB) returns (OutMessageB) {
+ option (google.api.http) = {
post: "/v1/example/b/1"
body: "*"
- };
- }
- // ServiceB.MethodTwo receives OutMessageB and returns InMessageB
- //
- // Here is the detail explanation about ServiceB.MethodTwo.
- rpc MethodTwo(OutMessageB) returns (InMessageB) {
- option (google.api.http) = {
+ };
+ }
+ // ServiceB.MethodTwo receives OutMessageB and returns InMessageB
+ //
+ // Here is the detail explanation about ServiceB.MethodTwo.
+ rpc MethodTwo(OutMessageB) returns (InMessageB) {
+ option (google.api.http) = {
post: "/v1/example/b/2"
body: "*"
- };
- }
+ };
+ }
}
diff --git a/examples/internal/proto/examplepb/openapi_merge_b.swagger.json b/examples/internal/proto/examplepb/openapi_merge_b.swagger.json
index f9f2d99230c..a746e271188 100644
--- a/examples/internal/proto/examplepb/openapi_merge_b.swagger.json
+++ b/examples/internal/proto/examplepb/openapi_merge_b.swagger.json
@@ -39,6 +39,7 @@
"parameters": [
{
"name": "body",
+ "description": "InMessageB represents a message to ServiceB.",
"in": "body",
"required": true,
"schema": {
@@ -73,6 +74,7 @@
"parameters": [
{
"name": "body",
+ "description": "OutMessageB represents a message returned from ServiceB.",
"in": "body",
"required": true,
"schema": {
@@ -113,17 +115,13 @@
"protobufAny": {
"type": "object",
"properties": {
- "typeUrl": {
+ "@type": {
"type": "string",
"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",
- "format": "byte",
- "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\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 }"
+ "additionalProperties": {},
+ "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 := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(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 }"
},
"rpcStatus": {
"type": "object",
diff --git a/examples/internal/proto/examplepb/openapi_merge_b_grpc.pb.go b/examples/internal/proto/examplepb/openapi_merge_b_grpc.pb.go
index f04585c0beb..50db8acff29 100644
--- a/examples/internal/proto/examplepb/openapi_merge_b_grpc.pb.go
+++ b/examples/internal/proto/examplepb/openapi_merge_b_grpc.pb.go
@@ -11,6 +11,7 @@ import (
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
+// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// ServiceBClient is the client API for ServiceB service.
@@ -85,8 +86,8 @@ type UnsafeServiceBServer interface {
mustEmbedUnimplementedServiceBServer()
}
-func RegisterServiceBServer(s *grpc.Server, srv ServiceBServer) {
- s.RegisterService(&_ServiceB_serviceDesc, srv)
+func RegisterServiceBServer(s grpc.ServiceRegistrar, srv ServiceBServer) {
+ s.RegisterService(&ServiceB_ServiceDesc, srv)
}
func _ServiceB_MethodOne_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
@@ -125,7 +126,10 @@ func _ServiceB_MethodTwo_Handler(srv interface{}, ctx context.Context, dec func(
return interceptor(ctx, in, info, handler)
}
-var _ServiceB_serviceDesc = grpc.ServiceDesc{
+// ServiceB_ServiceDesc is the grpc.ServiceDesc for ServiceB service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var ServiceB_ServiceDesc = grpc.ServiceDesc{
ServiceName: "grpc.gateway.examples.internal.examplepb.ServiceB",
HandlerType: (*ServiceBServer)(nil),
Methods: []grpc.MethodDesc{
diff --git a/examples/internal/proto/examplepb/response_body_service.pb.go b/examples/internal/proto/examplepb/response_body_service.pb.go
index 8b38a963961..c6e9e822459 100644
--- a/examples/internal/proto/examplepb/response_body_service.pb.go
+++ b/examples/internal/proto/examplepb/response_body_service.pb.go
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.26.0
-// protoc v3.13.0
+// protoc-gen-go v1.27.1
+// protoc (unknown)
// source: examples/internal/proto/examplepb/response_body_service.proto
package examplepb
@@ -421,9 +421,9 @@ var file_examples_internal_proto_examplepb_response_body_service_proto_rawDesc =
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, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42,
- 0x6f, 0x64, 0x79, 0x4f, 0x75, 0x74, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x12, 0x14,
- 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x62, 0x6f, 0x64, 0x79, 0x2f, 0x7b, 0x64,
- 0x61, 0x74, 0x61, 0x7d, 0x62, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0xc7,
+ 0x6f, 0x64, 0x79, 0x4f, 0x75, 0x74, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x62, 0x08,
+ 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x62, 0x6f, 0x64, 0x79, 0x2f, 0x7b, 0x64, 0x61, 0x74, 0x61, 0x7d, 0x12, 0xc7,
0x01, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42,
0x6f, 0x64, 0x69, 0x65, 0x73, 0x12, 0x3e, 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,
@@ -434,9 +434,9 @@ var file_examples_internal_proto_examplepb_response_body_service_proto_rawDesc =
0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x65, 0x78, 0x61,
0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x6f, 0x64, 0x79, 0x4f, 0x75, 0x74, 0x22, 0x28,
- 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x16, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
- 0x65, 0x62, 0x6f, 0x64, 0x69, 0x65, 0x73, 0x2f, 0x7b, 0x64, 0x61, 0x74, 0x61, 0x7d, 0x62, 0x08,
- 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0xc7, 0x01, 0x0a, 0x13, 0x4c, 0x69, 0x73,
+ 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x62, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x12, 0x16, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x62, 0x6f, 0x64, 0x69, 0x65,
+ 0x73, 0x2f, 0x7b, 0x64, 0x61, 0x74, 0x61, 0x7d, 0x12, 0xc7, 0x01, 0x0a, 0x13, 0x4c, 0x69, 0x73,
0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73,
0x12, 0x3e, 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,
@@ -447,9 +447,9 @@ var file_examples_internal_proto_examplepb_response_body_service_proto_rawDesc =
0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70,
0x62, 0x2e, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02,
- 0x21, 0x12, 0x17, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x74, 0x72, 0x69,
- 0x6e, 0x67, 0x73, 0x2f, 0x7b, 0x64, 0x61, 0x74, 0x61, 0x7d, 0x62, 0x06, 0x76, 0x61, 0x6c, 0x75,
- 0x65, 0x73, 0x12, 0xc9, 0x01, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x21, 0x62, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x17, 0x2f, 0x72, 0x65, 0x73, 0x70,
+ 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x7b, 0x64, 0x61, 0x74,
+ 0x61, 0x7d, 0x12, 0xc9, 0x01, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x42, 0x6f, 0x64, 0x79, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x3e, 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,
@@ -459,9 +459,9 @@ var file_examples_internal_proto_examplepb_response_body_service_proto_rawDesc =
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, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x6f, 0x64, 0x79, 0x4f, 0x75, 0x74, 0x22, 0x2d, 0x82,
- 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x12, 0x1b, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
- 0x62, 0x6f, 0x64, 0x79, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2f, 0x7b, 0x64, 0x61, 0x74,
- 0x61, 0x7d, 0x62, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x42, 0x4d,
+ 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x62, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
+ 0x1b, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x62, 0x6f, 0x64, 0x79, 0x2f, 0x73,
+ 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2f, 0x7b, 0x64, 0x61, 0x74, 0x61, 0x7d, 0x30, 0x01, 0x42, 0x4d,
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,
diff --git a/examples/internal/proto/examplepb/response_body_service.pb.gw.go b/examples/internal/proto/examplepb/response_body_service.pb.gw.go
index 95f549313c0..ac13e0916a1 100644
--- a/examples/internal/proto/examplepb/response_body_service.pb.gw.go
+++ b/examples/internal/proto/examplepb/response_body_service.pb.gw.go
@@ -233,20 +233,22 @@ func RegisterResponseBodyServiceHandlerServer(ctx context.Context, mux *runtime.
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ResponseBodyService/GetResponseBody")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ResponseBodyService/GetResponseBody", runtime.WithHTTPPathPattern("/responsebody/{data}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_ResponseBodyService_GetResponseBody_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_ResponseBodyService_GetResponseBody_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ResponseBodyService_GetResponseBody_0(ctx, mux, outboundMarshaler, w, req, response_ResponseBodyService_GetResponseBody_0{resp}, mux.GetForwardResponseOptions()...)
+ forward_ResponseBodyService_GetResponseBody_0(annotatedContext, mux, outboundMarshaler, w, req, response_ResponseBodyService_GetResponseBody_0{resp}, mux.GetForwardResponseOptions()...)
})
@@ -256,20 +258,22 @@ func RegisterResponseBodyServiceHandlerServer(ctx context.Context, mux *runtime.
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ResponseBodyService/ListResponseBodies")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ResponseBodyService/ListResponseBodies", runtime.WithHTTPPathPattern("/responsebodies/{data}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_ResponseBodyService_ListResponseBodies_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_ResponseBodyService_ListResponseBodies_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ResponseBodyService_ListResponseBodies_0(ctx, mux, outboundMarshaler, w, req, response_ResponseBodyService_ListResponseBodies_0{resp}, mux.GetForwardResponseOptions()...)
+ forward_ResponseBodyService_ListResponseBodies_0(annotatedContext, mux, outboundMarshaler, w, req, response_ResponseBodyService_ListResponseBodies_0{resp}, mux.GetForwardResponseOptions()...)
})
@@ -279,20 +283,22 @@ func RegisterResponseBodyServiceHandlerServer(ctx context.Context, mux *runtime.
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ResponseBodyService/ListResponseStrings")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ResponseBodyService/ListResponseStrings", runtime.WithHTTPPathPattern("/responsestrings/{data}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_ResponseBodyService_ListResponseStrings_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_ResponseBodyService_ListResponseStrings_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ResponseBodyService_ListResponseStrings_0(ctx, mux, outboundMarshaler, w, req, response_ResponseBodyService_ListResponseStrings_0{resp}, mux.GetForwardResponseOptions()...)
+ forward_ResponseBodyService_ListResponseStrings_0(annotatedContext, mux, outboundMarshaler, w, req, response_ResponseBodyService_ListResponseStrings_0{resp}, mux.GetForwardResponseOptions()...)
})
@@ -348,19 +354,21 @@ func RegisterResponseBodyServiceHandlerClient(ctx context.Context, mux *runtime.
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ResponseBodyService/GetResponseBody")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ResponseBodyService/GetResponseBody", runtime.WithHTTPPathPattern("/responsebody/{data}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_ResponseBodyService_GetResponseBody_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_ResponseBodyService_GetResponseBody_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ResponseBodyService_GetResponseBody_0(ctx, mux, outboundMarshaler, w, req, response_ResponseBodyService_GetResponseBody_0{resp}, mux.GetForwardResponseOptions()...)
+ forward_ResponseBodyService_GetResponseBody_0(annotatedContext, mux, outboundMarshaler, w, req, response_ResponseBodyService_GetResponseBody_0{resp}, mux.GetForwardResponseOptions()...)
})
@@ -368,19 +376,21 @@ func RegisterResponseBodyServiceHandlerClient(ctx context.Context, mux *runtime.
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ResponseBodyService/ListResponseBodies")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ResponseBodyService/ListResponseBodies", runtime.WithHTTPPathPattern("/responsebodies/{data}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_ResponseBodyService_ListResponseBodies_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_ResponseBodyService_ListResponseBodies_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ResponseBodyService_ListResponseBodies_0(ctx, mux, outboundMarshaler, w, req, response_ResponseBodyService_ListResponseBodies_0{resp}, mux.GetForwardResponseOptions()...)
+ forward_ResponseBodyService_ListResponseBodies_0(annotatedContext, mux, outboundMarshaler, w, req, response_ResponseBodyService_ListResponseBodies_0{resp}, mux.GetForwardResponseOptions()...)
})
@@ -388,19 +398,21 @@ func RegisterResponseBodyServiceHandlerClient(ctx context.Context, mux *runtime.
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ResponseBodyService/ListResponseStrings")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ResponseBodyService/ListResponseStrings", runtime.WithHTTPPathPattern("/responsestrings/{data}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_ResponseBodyService_ListResponseStrings_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_ResponseBodyService_ListResponseStrings_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ResponseBodyService_ListResponseStrings_0(ctx, mux, outboundMarshaler, w, req, response_ResponseBodyService_ListResponseStrings_0{resp}, mux.GetForwardResponseOptions()...)
+ forward_ResponseBodyService_ListResponseStrings_0(annotatedContext, mux, outboundMarshaler, w, req, response_ResponseBodyService_ListResponseStrings_0{resp}, mux.GetForwardResponseOptions()...)
})
@@ -408,19 +420,21 @@ func RegisterResponseBodyServiceHandlerClient(ctx context.Context, mux *runtime.
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ResponseBodyService/GetResponseBodyStream")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.ResponseBodyService/GetResponseBodyStream", runtime.WithHTTPPathPattern("/responsebody/stream/{data}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_ResponseBodyService_GetResponseBodyStream_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_ResponseBodyService_GetResponseBodyStream_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_ResponseBodyService_GetResponseBodyStream_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) {
+ forward_ResponseBodyService_GetResponseBodyStream_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) {
res, err := resp.Recv()
return response_ResponseBodyService_GetResponseBodyStream_0{res}, err
}, mux.GetForwardResponseOptions()...)
diff --git a/examples/internal/proto/examplepb/response_body_service.proto b/examples/internal/proto/examplepb/response_body_service.proto
index 9153b27f62b..31480f8341d 100644
--- a/examples/internal/proto/examplepb/response_body_service.proto
+++ b/examples/internal/proto/examplepb/response_body_service.proto
@@ -1,65 +1,66 @@
syntax = "proto3";
-option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/examplepb";
package grpc.gateway.examples.internal.proto.examplepb;
import "google/api/annotations.proto";
+option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/examplepb";
+
message ResponseBodyIn {
- string data = 1;
+ string data = 1;
}
message ResponseBodyOut {
- message Response {
- string data = 1;
- }
- Response response = 2;
+ message Response {
+ string data = 1;
+ }
+ Response response = 2;
}
message RepeatedResponseBodyOut {
- message Response {
- string data = 1;
- enum ResponseType {
- // UNKNOWN
- UNKNOWN = 0;
- // A is 1
- A = 1;
- // B is 2
- B = 2;
- }
- ResponseType type = 3;
- }
- repeated Response response = 2;
+ message Response {
+ string data = 1;
+ enum ResponseType {
+ // UNKNOWN
+ UNKNOWN = 0;
+ // A is 1
+ A = 1;
+ // B is 2
+ B = 2;
+ }
+ ResponseType type = 3;
+ }
+ repeated Response response = 2;
}
message RepeatedResponseStrings {
- repeated string values = 1;
+ repeated string values = 1;
}
service ResponseBodyService {
- rpc GetResponseBody(ResponseBodyIn) returns (ResponseBodyOut) {
- option (google.api.http) = {
- get : "/responsebody/{data}"
- response_body : "response"
- };
- }
- rpc ListResponseBodies(ResponseBodyIn) returns (RepeatedResponseBodyOut) {
- option (google.api.http) = {
- get : "/responsebodies/{data}"
- response_body : "response"
- };
- }
- rpc ListResponseStrings(ResponseBodyIn) returns (RepeatedResponseStrings) {
- option (google.api.http) = {
- get : "/responsestrings/{data}"
- response_body : "values"
- };
- }
+ rpc GetResponseBody(ResponseBodyIn) returns (ResponseBodyOut) {
+ option (google.api.http) = {
+ get: "/responsebody/{data}"
+ response_body: "response"
+ };
+ }
+ rpc ListResponseBodies(ResponseBodyIn) returns (RepeatedResponseBodyOut) {
+ option (google.api.http) = {
+ get: "/responsebodies/{data}"
+ response_body: "response"
+ };
+ }
+ rpc ListResponseStrings(ResponseBodyIn) returns (RepeatedResponseStrings) {
+ option (google.api.http) = {
+ get: "/responsestrings/{data}"
+ response_body: "values"
+ };
+ }
- rpc GetResponseBodyStream(ResponseBodyIn) returns (stream ResponseBodyOut) {
- option (google.api.http) = {
- get : "/responsebody/stream/{data}"
- response_body : "response"
- };
- }
+ rpc GetResponseBodyStream(ResponseBodyIn) returns (stream ResponseBodyOut) {
+ option (google.api.http) = {
+ get: "/responsebody/stream/{data}"
+ response_body: "response"
+ };
+ }
}
diff --git a/examples/internal/proto/examplepb/response_body_service.swagger.json b/examples/internal/proto/examplepb/response_body_service.swagger.json
index ce1e5e19d60..12c5022f1d2 100644
--- a/examples/internal/proto/examplepb/response_body_service.swagger.json
+++ b/examples/internal/proto/examplepb/response_body_service.swagger.json
@@ -215,17 +215,13 @@
"protobufAny": {
"type": "object",
"properties": {
- "typeUrl": {
+ "@type": {
"type": "string",
"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",
- "format": "byte",
- "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\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 }"
+ "additionalProperties": {},
+ "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 := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(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 }"
},
"rpcStatus": {
"type": "object",
diff --git a/examples/internal/proto/examplepb/response_body_service_grpc.pb.go b/examples/internal/proto/examplepb/response_body_service_grpc.pb.go
index 946c1fb338e..162063d7768 100644
--- a/examples/internal/proto/examplepb/response_body_service_grpc.pb.go
+++ b/examples/internal/proto/examplepb/response_body_service_grpc.pb.go
@@ -11,6 +11,7 @@ import (
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
+// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// ResponseBodyServiceClient is the client API for ResponseBodyService service.
@@ -59,7 +60,7 @@ func (c *responseBodyServiceClient) ListResponseStrings(ctx context.Context, in
}
func (c *responseBodyServiceClient) GetResponseBodyStream(ctx context.Context, in *ResponseBodyIn, opts ...grpc.CallOption) (ResponseBodyService_GetResponseBodyStreamClient, error) {
- stream, err := c.cc.NewStream(ctx, &_ResponseBodyService_serviceDesc.Streams[0], "/grpc.gateway.examples.internal.proto.examplepb.ResponseBodyService/GetResponseBodyStream", opts...)
+ stream, err := c.cc.NewStream(ctx, &ResponseBodyService_ServiceDesc.Streams[0], "/grpc.gateway.examples.internal.proto.examplepb.ResponseBodyService/GetResponseBodyStream", opts...)
if err != nil {
return nil, err
}
@@ -124,8 +125,8 @@ type UnsafeResponseBodyServiceServer interface {
mustEmbedUnimplementedResponseBodyServiceServer()
}
-func RegisterResponseBodyServiceServer(s *grpc.Server, srv ResponseBodyServiceServer) {
- s.RegisterService(&_ResponseBodyService_serviceDesc, srv)
+func RegisterResponseBodyServiceServer(s grpc.ServiceRegistrar, srv ResponseBodyServiceServer) {
+ s.RegisterService(&ResponseBodyService_ServiceDesc, srv)
}
func _ResponseBodyService_GetResponseBody_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
@@ -203,7 +204,10 @@ func (x *responseBodyServiceGetResponseBodyStreamServer) Send(m *ResponseBodyOut
return x.ServerStream.SendMsg(m)
}
-var _ResponseBodyService_serviceDesc = grpc.ServiceDesc{
+// ResponseBodyService_ServiceDesc is the grpc.ServiceDesc for ResponseBodyService service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var ResponseBodyService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "grpc.gateway.examples.internal.proto.examplepb.ResponseBodyService",
HandlerType: (*ResponseBodyServiceServer)(nil),
Methods: []grpc.MethodDesc{
diff --git a/examples/internal/proto/examplepb/standalone_echo_service.buf.gen.yaml b/examples/internal/proto/examplepb/standalone_echo_service.buf.gen.yaml
index 561551b399b..867387579ee 100644
--- a/examples/internal/proto/examplepb/standalone_echo_service.buf.gen.yaml
+++ b/examples/internal/proto/examplepb/standalone_echo_service.buf.gen.yaml
@@ -1,4 +1,4 @@
-version: v1beta1
+version: v1
plugins:
- name: grpc-gateway
out: .
diff --git a/examples/internal/proto/examplepb/stream.pb.go b/examples/internal/proto/examplepb/stream.pb.go
index 8c80c6c67d5..ff9c0d54747 100644
--- a/examples/internal/proto/examplepb/stream.pb.go
+++ b/examples/internal/proto/examplepb/stream.pb.go
@@ -1,18 +1,18 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.26.0
-// protoc v3.13.0
+// protoc-gen-go v1.27.1
+// protoc (unknown)
// source: examples/internal/proto/examplepb/stream.proto
package examplepb
import (
- empty "github.com/golang/protobuf/ptypes/empty"
sub "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/sub"
_ "google.golang.org/genproto/googleapis/api/annotations"
httpbody "google.golang.org/genproto/googleapis/api/httpbody"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ emptypb "google.golang.org/protobuf/types/known/emptypb"
reflect "reflect"
)
@@ -32,18 +32,18 @@ var file_examples_internal_proto_examplepb_stream_proto_rawDesc = []byte{
0x12, 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,
- 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e,
- 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19,
- 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x62,
- 0x6f, 0x64, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
- 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79,
- 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x3b, 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, 0x2f, 0x61, 0x5f, 0x62, 0x69, 0x74, 0x5f,
- 0x6f, 0x66, 0x5f, 0x65, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72,
- 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x69, 0x6e,
- 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x75, 0x62,
- 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xc7,
+ 0x1a, 0x3b, 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, 0x2f, 0x61, 0x5f, 0x62, 0x69, 0x74, 0x5f, 0x6f, 0x66, 0x5f, 0x65, 0x76, 0x65,
+ 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x65,
+ 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c,
+ 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x75, 0x62, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61,
+ 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+ 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61,
+ 0x70, 0x69, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x62, 0x6f, 0x64, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
+ 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xc7,
0x04, 0x0a, 0x0d, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
0x12, 0x99, 0x01, 0x0a, 0x0a, 0x42, 0x75, 0x6c, 0x6b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12,
0x40, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x65,
@@ -52,9 +52,9 @@ var file_examples_internal_proto_examplepb_stream_proto_rawDesc = []byte{
0x2e, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e,
0x67, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, 0x02,
- 0x29, 0x22, 0x24, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x61,
- 0x5f, 0x62, 0x69, 0x74, 0x5f, 0x6f, 0x66, 0x5f, 0x65, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69,
- 0x6e, 0x67, 0x2f, 0x62, 0x75, 0x6c, 0x6b, 0x3a, 0x01, 0x2a, 0x28, 0x01, 0x12, 0x8b, 0x01, 0x0a,
+ 0x29, 0x3a, 0x01, 0x2a, 0x22, 0x24, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c,
+ 0x65, 0x2f, 0x61, 0x5f, 0x62, 0x69, 0x74, 0x5f, 0x6f, 0x66, 0x5f, 0x65, 0x76, 0x65, 0x72, 0x79,
+ 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x62, 0x75, 0x6c, 0x6b, 0x28, 0x01, 0x12, 0x8b, 0x01, 0x0a,
0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x40, 0x2e,
0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x65, 0x78, 0x61,
@@ -72,9 +72,9 @@ var file_examples_internal_proto_examplepb_stream_proto_rawDesc = []byte{
0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61,
0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x75, 0x62, 0x2e, 0x53, 0x74, 0x72, 0x69,
0x6e, 0x67, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, 0x02,
- 0x29, 0x22, 0x24, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x61,
- 0x5f, 0x62, 0x69, 0x74, 0x5f, 0x6f, 0x66, 0x5f, 0x65, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69,
- 0x6e, 0x67, 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x3a, 0x01, 0x2a, 0x28, 0x01, 0x30, 0x01, 0x12, 0x58,
+ 0x29, 0x3a, 0x01, 0x2a, 0x22, 0x24, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c,
+ 0x65, 0x2f, 0x61, 0x5f, 0x62, 0x69, 0x74, 0x5f, 0x6f, 0x66, 0x5f, 0x65, 0x76, 0x65, 0x72, 0x79,
+ 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x28, 0x01, 0x30, 0x01, 0x12, 0x58,
0x0a, 0x08, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f,
0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70,
0x74, 0x79, 0x1a, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e,
@@ -90,7 +90,7 @@ var file_examples_internal_proto_examplepb_stream_proto_rawDesc = []byte{
var file_examples_internal_proto_examplepb_stream_proto_goTypes = []interface{}{
(*ABitOfEverything)(nil), // 0: grpc.gateway.examples.internal.proto.examplepb.ABitOfEverything
- (*empty.Empty)(nil), // 1: google.protobuf.Empty
+ (*emptypb.Empty)(nil), // 1: google.protobuf.Empty
(*sub.StringMessage)(nil), // 2: grpc.gateway.examples.internal.proto.sub.StringMessage
(*httpbody.HttpBody)(nil), // 3: google.api.HttpBody
}
diff --git a/examples/internal/proto/examplepb/stream.pb.gw.go b/examples/internal/proto/examplepb/stream.pb.gw.go
index 6654f7366ca..ead7cb5c9b2 100644
--- a/examples/internal/proto/examplepb/stream.pb.gw.go
+++ b/examples/internal/proto/examplepb/stream.pb.gw.go
@@ -13,7 +13,6 @@ import (
"io"
"net/http"
- "github.com/golang/protobuf/ptypes/empty"
"github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/sub"
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
"github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
@@ -23,6 +22,7 @@ import (
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/proto"
+ "google.golang.org/protobuf/types/known/emptypb"
)
// Suppress "imported and not used" errors
@@ -78,7 +78,7 @@ func request_StreamService_BulkCreate_0(ctx context.Context, marshaler runtime.M
}
func request_StreamService_List_0(ctx context.Context, marshaler runtime.Marshaler, client StreamServiceClient, req *http.Request, pathParams map[string]string) (StreamService_ListClient, runtime.ServerMetadata, error) {
- var protoReq empty.Empty
+ var protoReq emptypb.Empty
var metadata runtime.ServerMetadata
stream, err := client.List(ctx, &protoReq)
@@ -118,15 +118,6 @@ func request_StreamService_BulkEcho_0(ctx context.Context, marshaler runtime.Mar
}
return nil
}
- if err := handleSend(); err != nil {
- if cerr := stream.CloseSend(); cerr != nil {
- grpclog.Infof("Failed to terminate client stream: %v", cerr)
- }
- if err == io.EOF {
- return stream, metadata, nil
- }
- return nil, metadata, err
- }
go func() {
for {
if err := handleSend(); err != nil {
@@ -147,7 +138,7 @@ func request_StreamService_BulkEcho_0(ctx context.Context, marshaler runtime.Mar
}
func request_StreamService_Download_0(ctx context.Context, marshaler runtime.Marshaler, client StreamServiceClient, req *http.Request, pathParams map[string]string) (StreamService_DownloadClient, runtime.ServerMetadata, error) {
- var protoReq empty.Empty
+ var protoReq emptypb.Empty
var metadata runtime.ServerMetadata
stream, err := client.Download(ctx, &protoReq)
@@ -242,19 +233,21 @@ func RegisterStreamServiceHandlerClient(ctx context.Context, mux *runtime.ServeM
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.StreamService/BulkCreate")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.StreamService/BulkCreate", runtime.WithHTTPPathPattern("/v1/example/a_bit_of_everything/bulk"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_StreamService_BulkCreate_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_StreamService_BulkCreate_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_StreamService_BulkCreate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_StreamService_BulkCreate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -262,19 +255,21 @@ func RegisterStreamServiceHandlerClient(ctx context.Context, mux *runtime.ServeM
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.StreamService/List")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.StreamService/List", runtime.WithHTTPPathPattern("/v1/example/a_bit_of_everything"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_StreamService_List_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_StreamService_List_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_StreamService_List_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
+ forward_StreamService_List_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
})
@@ -282,19 +277,21 @@ func RegisterStreamServiceHandlerClient(ctx context.Context, mux *runtime.ServeM
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.StreamService/BulkEcho")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.StreamService/BulkEcho", runtime.WithHTTPPathPattern("/v1/example/a_bit_of_everything/echo"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_StreamService_BulkEcho_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_StreamService_BulkEcho_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_StreamService_BulkEcho_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
+ forward_StreamService_BulkEcho_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
})
@@ -302,19 +299,21 @@ func RegisterStreamServiceHandlerClient(ctx context.Context, mux *runtime.ServeM
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.StreamService/Download")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.StreamService/Download", runtime.WithHTTPPathPattern("/v1/example/download"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_StreamService_Download_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_StreamService_Download_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_StreamService_Download_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
+ forward_StreamService_Download_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
})
diff --git a/examples/internal/proto/examplepb/stream.proto b/examples/internal/proto/examplepb/stream.proto
index beeae591eee..72f03a12803 100644
--- a/examples/internal/proto/examplepb/stream.proto
+++ b/examples/internal/proto/examplepb/stream.proto
@@ -1,36 +1,38 @@
syntax = "proto3";
-option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/examplepb";
+
package grpc.gateway.examples.internal.proto.examplepb;
+import "examples/internal/proto/examplepb/a_bit_of_everything.proto";
+import "examples/internal/proto/sub/message.proto";
import "google/api/annotations.proto";
import "google/api/httpbody.proto";
import "google/protobuf/empty.proto";
-import "examples/internal/proto/examplepb/a_bit_of_everything.proto";
-import "examples/internal/proto/sub/message.proto";
+
+option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/examplepb";
// Defines some more operations to be added to ABitOfEverythingService
service StreamService {
- rpc BulkCreate(stream ABitOfEverything) returns (google.protobuf.Empty) {
- option (google.api.http) = {
- post: "/v1/example/a_bit_of_everything/bulk"
- body: "*"
- };
- }
- rpc List(google.protobuf.Empty) returns (stream ABitOfEverything) {
- option (google.api.http) = {
- get: "/v1/example/a_bit_of_everything"
- };
- }
- rpc BulkEcho(stream grpc.gateway.examples.internal.proto.sub.StringMessage) returns (stream grpc.gateway.examples.internal.proto.sub.StringMessage) {
- option (google.api.http) = {
- post: "/v1/example/a_bit_of_everything/echo"
- body: "*"
- };
- }
+ rpc BulkCreate(stream ABitOfEverything) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ post: "/v1/example/a_bit_of_everything/bulk"
+ body: "*"
+ };
+ }
+ rpc List(google.protobuf.Empty) returns (stream ABitOfEverything) {
+ option (google.api.http) = {
+ get: "/v1/example/a_bit_of_everything"
+ };
+ }
+ rpc BulkEcho(stream grpc.gateway.examples.internal.proto.sub.StringMessage) returns (stream grpc.gateway.examples.internal.proto.sub.StringMessage) {
+ option (google.api.http) = {
+ post: "/v1/example/a_bit_of_everything/echo"
+ body: "*"
+ };
+ }
- rpc Download(google.protobuf.Empty) returns (stream google.api.HttpBody) {
- option (google.api.http) = {
- get : "/v1/example/download"
- };
- }
+ rpc Download(google.protobuf.Empty) returns (stream google.api.HttpBody) {
+ option (google.api.http) = {
+ get: "/v1/example/download"
+ };
+ }
}
diff --git a/examples/internal/proto/examplepb/stream.swagger.json b/examples/internal/proto/examplepb/stream.swagger.json
index 57fa9ffc806..6ece692db62 100644
--- a/examples/internal/proto/examplepb/stream.swagger.json
+++ b/examples/internal/proto/examplepb/stream.swagger.json
@@ -54,6 +54,7 @@
"200": {
"description": "A successful response.",
"schema": {
+ "type": "object",
"properties": {}
}
},
@@ -67,7 +68,7 @@
"parameters": [
{
"name": "body",
- "description": " (streaming inputs)",
+ "description": "Intentionally complicated message type to cover many features of Protobuf. (streaming inputs)",
"in": "body",
"required": true,
"schema": {
@@ -213,7 +214,7 @@
"description": "Application specific response metadata. Must be set in the first response\nfor streaming APIs."
}
},
- "description": "Message that represents an arbitrary HTTP body. It should only be used for\npayload formats that can't be represented as JSON, such as raw binary or\nan HTML page.\n\n\nThis message can be used both in streaming and non-streaming API methods in\nthe request as well as the response.\n\nIt can be used as a top-level request field, which is convenient if one\nwants to extract parameters from either the URL or HTTP template into the\nrequest fields and also want access to the raw HTTP body.\n\nExample:\n\n message GetResourceRequest {\n // A unique request id.\n string request_id = 1;\n\n // The raw HTTP body is bound to this field.\n google.api.HttpBody http_body = 2;\n }\n\n service ResourceService {\n rpc GetResource(GetResourceRequest) returns (google.api.HttpBody);\n rpc UpdateResource(google.api.HttpBody) returns\n (google.protobuf.Empty);\n }\n\nExample with streaming methods:\n\n service CaldavService {\n rpc GetCalendar(stream google.api.HttpBody)\n returns (stream google.api.HttpBody);\n rpc UpdateCalendar(stream google.api.HttpBody)\n returns (stream google.api.HttpBody);\n }\n\nUse of this type only changes how the request and response bodies are\nhandled, all other features will continue to work unchanged."
+ "description": "Message that represents an arbitrary HTTP body. It should only be used for\npayload formats that can't be represented as JSON, such as raw binary or\nan HTML page.\n\n\nThis message can be used both in streaming and non-streaming API methods in\nthe request as well as the response.\n\nIt can be used as a top-level request field, which is convenient if one\nwants to extract parameters from either the URL or HTTP template into the\nrequest fields and also want access to the raw HTTP body.\n\nExample:\n\n message GetResourceRequest {\n // A unique request id.\n string request_id = 1;\n\n // The raw HTTP body is bound to this field.\n google.api.HttpBody http_body = 2;\n\n }\n\n service ResourceService {\n rpc GetResource(GetResourceRequest)\n returns (google.api.HttpBody);\n rpc UpdateResource(google.api.HttpBody)\n returns (google.protobuf.Empty);\n\n }\n\nExample with streaming methods:\n\n service CaldavService {\n rpc GetCalendar(stream google.api.HttpBody)\n returns (stream google.api.HttpBody);\n rpc UpdateCalendar(stream google.api.HttpBody)\n returns (stream google.api.HttpBody);\n\n }\n\nUse of this type only changes how the request and response bodies are\nhandled, all other features will continue to work unchanged."
},
"examplepbABitOfEverything": {
"type": "object",
@@ -228,7 +229,8 @@
"uuid": {
"type": "string",
"minLength": 1,
- "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}"
+ "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}",
+ "x-internal": true
},
"nested": {
"type": "array",
@@ -240,10 +242,7 @@
"type": "number",
"format": "float",
"default": "0.2",
- "description": "Float value field",
- "required": [
- "float_value"
- ]
+ "description": "Float value field"
},
"doubleValue": {
"type": "number",
@@ -315,6 +314,7 @@
}
},
"oneofEmpty": {
+ "type": "object",
"properties": {}
},
"oneofString": {
@@ -392,10 +392,7 @@
},
"requiredStringViaFieldBehaviorAnnotation": {
"type": "string",
- "title": "mark a field as required in Open API definition",
- "required": [
- "required_string_via_field_behavior_annotation"
- ]
+ "title": "mark a field as required in Open API definition"
},
"outputOnlyStringViaFieldBehaviorAnnotation": {
"type": "string",
@@ -404,9 +401,55 @@
},
"optionalStringValue": {
"type": "string"
+ },
+ "productId": {
+ "type": "array",
+ "items": {
+ "type": "string",
+ "maxLength": 19,
+ "minLength": 1,
+ "pattern": "^[0-9]+$"
+ },
+ "description": "Only digits are allowed.",
+ "title": "Test openapiv2 generation of repeated fields"
+ },
+ "optionalStringField": {
+ "type": "string",
+ "title": "Test openapiv2 generation of required fields with annotation and jsonschema to reproduce"
+ },
+ "requiredStringField1": {
+ "type": "string"
+ },
+ "requiredStringField2": {
+ "type": "string"
+ },
+ "required_field_behavior_json_name_custom": {
+ "type": "string",
+ "title": "Test openapiv2 handling of required json_name fields"
+ },
+ "required_field_schema_json_name_custom": {
+ "type": "string"
+ },
+ "trailingOnly": {
+ "type": "string",
+ "title": "Trailing only"
+ },
+ "trailingOnlyDot": {
+ "type": "string",
+ "description": "Trailing only dot."
+ },
+ "trailingBoth": {
+ "type": "string",
+ "description": "Trailing both.",
+ "title": "Leading both"
+ },
+ "trailingMultiline": {
+ "type": "string",
+ "description": "This is an example of a multi-line comment.\n\nTrailing multiline.",
+ "title": "Leading multiline"
}
},
- "description": "Intentionaly complicated message type to cover many features of Protobuf.",
+ "description": "Intentionally complicated message type to cover many features of Protobuf.",
"title": "A bit of everything",
"externalDocs": {
"description": "Find out more about ABitOfEverything",
@@ -416,9 +459,14 @@
"uuid",
"int64Value",
"doubleValue",
+ "required_field_schema_json_name_custom",
"floatValue",
- "requiredStringViaFieldBehaviorAnnotation"
- ]
+ "requiredStringViaFieldBehaviorAnnotation",
+ "requiredStringField1",
+ "requiredStringField2",
+ "required_field_behavior_json_name_custom"
+ ],
+ "x-a-bit-of-everything-foo": "bar"
},
"examplepbNumericEnum": {
"type": "string",
@@ -440,17 +488,13 @@
"protobufAny": {
"type": "object",
"properties": {
- "typeUrl": {
+ "@type": {
"type": "string",
"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",
- "format": "byte",
- "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\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 }"
+ "additionalProperties": {},
+ "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 := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(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 }"
},
"rpcStatus": {
"type": "object",
diff --git a/examples/internal/proto/examplepb/stream_grpc.pb.go b/examples/internal/proto/examplepb/stream_grpc.pb.go
index 42cb72643eb..0d1d1670f2f 100644
--- a/examples/internal/proto/examplepb/stream_grpc.pb.go
+++ b/examples/internal/proto/examplepb/stream_grpc.pb.go
@@ -4,16 +4,17 @@ package examplepb
import (
context "context"
- empty "github.com/golang/protobuf/ptypes/empty"
sub "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/sub"
httpbody "google.golang.org/genproto/googleapis/api/httpbody"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
+ emptypb "google.golang.org/protobuf/types/known/emptypb"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
+// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// StreamServiceClient is the client API for StreamService service.
@@ -21,9 +22,9 @@ const _ = grpc.SupportPackageIsVersion7
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type StreamServiceClient interface {
BulkCreate(ctx context.Context, opts ...grpc.CallOption) (StreamService_BulkCreateClient, error)
- List(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (StreamService_ListClient, error)
+ List(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (StreamService_ListClient, error)
BulkEcho(ctx context.Context, opts ...grpc.CallOption) (StreamService_BulkEchoClient, error)
- Download(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (StreamService_DownloadClient, error)
+ Download(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (StreamService_DownloadClient, error)
}
type streamServiceClient struct {
@@ -35,7 +36,7 @@ func NewStreamServiceClient(cc grpc.ClientConnInterface) StreamServiceClient {
}
func (c *streamServiceClient) BulkCreate(ctx context.Context, opts ...grpc.CallOption) (StreamService_BulkCreateClient, error) {
- stream, err := c.cc.NewStream(ctx, &_StreamService_serviceDesc.Streams[0], "/grpc.gateway.examples.internal.proto.examplepb.StreamService/BulkCreate", opts...)
+ stream, err := c.cc.NewStream(ctx, &StreamService_ServiceDesc.Streams[0], "/grpc.gateway.examples.internal.proto.examplepb.StreamService/BulkCreate", opts...)
if err != nil {
return nil, err
}
@@ -45,7 +46,7 @@ func (c *streamServiceClient) BulkCreate(ctx context.Context, opts ...grpc.CallO
type StreamService_BulkCreateClient interface {
Send(*ABitOfEverything) error
- CloseAndRecv() (*empty.Empty, error)
+ CloseAndRecv() (*emptypb.Empty, error)
grpc.ClientStream
}
@@ -57,19 +58,19 @@ func (x *streamServiceBulkCreateClient) Send(m *ABitOfEverything) error {
return x.ClientStream.SendMsg(m)
}
-func (x *streamServiceBulkCreateClient) CloseAndRecv() (*empty.Empty, error) {
+func (x *streamServiceBulkCreateClient) CloseAndRecv() (*emptypb.Empty, error) {
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
- m := new(empty.Empty)
+ m := new(emptypb.Empty)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
-func (c *streamServiceClient) List(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (StreamService_ListClient, error) {
- stream, err := c.cc.NewStream(ctx, &_StreamService_serviceDesc.Streams[1], "/grpc.gateway.examples.internal.proto.examplepb.StreamService/List", opts...)
+func (c *streamServiceClient) List(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (StreamService_ListClient, error) {
+ stream, err := c.cc.NewStream(ctx, &StreamService_ServiceDesc.Streams[1], "/grpc.gateway.examples.internal.proto.examplepb.StreamService/List", opts...)
if err != nil {
return nil, err
}
@@ -101,7 +102,7 @@ func (x *streamServiceListClient) Recv() (*ABitOfEverything, error) {
}
func (c *streamServiceClient) BulkEcho(ctx context.Context, opts ...grpc.CallOption) (StreamService_BulkEchoClient, error) {
- stream, err := c.cc.NewStream(ctx, &_StreamService_serviceDesc.Streams[2], "/grpc.gateway.examples.internal.proto.examplepb.StreamService/BulkEcho", opts...)
+ stream, err := c.cc.NewStream(ctx, &StreamService_ServiceDesc.Streams[2], "/grpc.gateway.examples.internal.proto.examplepb.StreamService/BulkEcho", opts...)
if err != nil {
return nil, err
}
@@ -131,8 +132,8 @@ func (x *streamServiceBulkEchoClient) Recv() (*sub.StringMessage, error) {
return m, nil
}
-func (c *streamServiceClient) Download(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (StreamService_DownloadClient, error) {
- stream, err := c.cc.NewStream(ctx, &_StreamService_serviceDesc.Streams[3], "/grpc.gateway.examples.internal.proto.examplepb.StreamService/Download", opts...)
+func (c *streamServiceClient) Download(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (StreamService_DownloadClient, error) {
+ stream, err := c.cc.NewStream(ctx, &StreamService_ServiceDesc.Streams[3], "/grpc.gateway.examples.internal.proto.examplepb.StreamService/Download", opts...)
if err != nil {
return nil, err
}
@@ -168,9 +169,9 @@ func (x *streamServiceDownloadClient) Recv() (*httpbody.HttpBody, error) {
// for forward compatibility
type StreamServiceServer interface {
BulkCreate(StreamService_BulkCreateServer) error
- List(*empty.Empty, StreamService_ListServer) error
+ List(*emptypb.Empty, StreamService_ListServer) error
BulkEcho(StreamService_BulkEchoServer) error
- Download(*empty.Empty, StreamService_DownloadServer) error
+ Download(*emptypb.Empty, StreamService_DownloadServer) error
}
// UnimplementedStreamServiceServer should be embedded to have forward compatible implementations.
@@ -180,13 +181,13 @@ type UnimplementedStreamServiceServer struct {
func (UnimplementedStreamServiceServer) BulkCreate(StreamService_BulkCreateServer) error {
return status.Errorf(codes.Unimplemented, "method BulkCreate not implemented")
}
-func (UnimplementedStreamServiceServer) List(*empty.Empty, StreamService_ListServer) error {
+func (UnimplementedStreamServiceServer) List(*emptypb.Empty, StreamService_ListServer) error {
return status.Errorf(codes.Unimplemented, "method List not implemented")
}
func (UnimplementedStreamServiceServer) BulkEcho(StreamService_BulkEchoServer) error {
return status.Errorf(codes.Unimplemented, "method BulkEcho not implemented")
}
-func (UnimplementedStreamServiceServer) Download(*empty.Empty, StreamService_DownloadServer) error {
+func (UnimplementedStreamServiceServer) Download(*emptypb.Empty, StreamService_DownloadServer) error {
return status.Errorf(codes.Unimplemented, "method Download not implemented")
}
@@ -197,8 +198,8 @@ type UnsafeStreamServiceServer interface {
mustEmbedUnimplementedStreamServiceServer()
}
-func RegisterStreamServiceServer(s *grpc.Server, srv StreamServiceServer) {
- s.RegisterService(&_StreamService_serviceDesc, srv)
+func RegisterStreamServiceServer(s grpc.ServiceRegistrar, srv StreamServiceServer) {
+ s.RegisterService(&StreamService_ServiceDesc, srv)
}
func _StreamService_BulkCreate_Handler(srv interface{}, stream grpc.ServerStream) error {
@@ -206,7 +207,7 @@ func _StreamService_BulkCreate_Handler(srv interface{}, stream grpc.ServerStream
}
type StreamService_BulkCreateServer interface {
- SendAndClose(*empty.Empty) error
+ SendAndClose(*emptypb.Empty) error
Recv() (*ABitOfEverything, error)
grpc.ServerStream
}
@@ -215,7 +216,7 @@ type streamServiceBulkCreateServer struct {
grpc.ServerStream
}
-func (x *streamServiceBulkCreateServer) SendAndClose(m *empty.Empty) error {
+func (x *streamServiceBulkCreateServer) SendAndClose(m *emptypb.Empty) error {
return x.ServerStream.SendMsg(m)
}
@@ -228,7 +229,7 @@ func (x *streamServiceBulkCreateServer) Recv() (*ABitOfEverything, error) {
}
func _StreamService_List_Handler(srv interface{}, stream grpc.ServerStream) error {
- m := new(empty.Empty)
+ m := new(emptypb.Empty)
if err := stream.RecvMsg(m); err != nil {
return err
}
@@ -275,7 +276,7 @@ func (x *streamServiceBulkEchoServer) Recv() (*sub.StringMessage, error) {
}
func _StreamService_Download_Handler(srv interface{}, stream grpc.ServerStream) error {
- m := new(empty.Empty)
+ m := new(emptypb.Empty)
if err := stream.RecvMsg(m); err != nil {
return err
}
@@ -295,7 +296,10 @@ func (x *streamServiceDownloadServer) Send(m *httpbody.HttpBody) error {
return x.ServerStream.SendMsg(m)
}
-var _StreamService_serviceDesc = grpc.ServiceDesc{
+// StreamService_ServiceDesc is the grpc.ServiceDesc for StreamService service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var StreamService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "grpc.gateway.examples.internal.proto.examplepb.StreamService",
HandlerType: (*StreamServiceServer)(nil),
Methods: []grpc.MethodDesc{},
diff --git a/examples/internal/proto/examplepb/unannotated_echo_service.buf.gen.yaml b/examples/internal/proto/examplepb/unannotated_echo_service.buf.gen.yaml
index ffed173013a..6ec699a9736 100644
--- a/examples/internal/proto/examplepb/unannotated_echo_service.buf.gen.yaml
+++ b/examples/internal/proto/examplepb/unannotated_echo_service.buf.gen.yaml
@@ -1,4 +1,4 @@
-version: v1beta1
+version: v1
plugins:
- name: grpc-gateway
out: .
diff --git a/examples/internal/proto/examplepb/unannotated_echo_service.pb.go b/examples/internal/proto/examplepb/unannotated_echo_service.pb.go
index 9ec779f6dbb..1197b91c9dd 100644
--- a/examples/internal/proto/examplepb/unannotated_echo_service.pb.go
+++ b/examples/internal/proto/examplepb/unannotated_echo_service.pb.go
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.26.0
-// protoc v3.13.0
+// protoc-gen-go v1.27.1
+// protoc (unknown)
// source: examples/internal/proto/examplepb/unannotated_echo_service.proto
// Unannotated Echo Service
@@ -15,9 +15,9 @@
package examplepb
import (
- duration "github.com/golang/protobuf/ptypes/duration"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ durationpb "google.golang.org/protobuf/types/known/durationpb"
reflect "reflect"
sync "sync"
)
@@ -117,9 +117,9 @@ type UnannotatedSimpleMessage struct {
unknownFields protoimpl.UnknownFields
// Id represents the message identifier.
- Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
- Num int64 `protobuf:"varint,2,opt,name=num,proto3" json:"num,omitempty"`
- Duration *duration.Duration `protobuf:"bytes,3,opt,name=duration,proto3" json:"duration,omitempty"`
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ Num int64 `protobuf:"varint,2,opt,name=num,proto3" json:"num,omitempty"`
+ Duration *durationpb.Duration `protobuf:"bytes,3,opt,name=duration,proto3" json:"duration,omitempty"`
// Types that are assignable to Code:
// *UnannotatedSimpleMessage_LineNum
// *UnannotatedSimpleMessage_Lang
@@ -177,7 +177,7 @@ func (x *UnannotatedSimpleMessage) GetNum() int64 {
return 0
}
-func (x *UnannotatedSimpleMessage) GetDuration() *duration.Duration {
+func (x *UnannotatedSimpleMessage) GetDuration() *durationpb.Duration {
if x != nil {
return x.Duration
}
@@ -362,7 +362,7 @@ var file_examples_internal_proto_examplepb_unannotated_echo_service_proto_msgTyp
var file_examples_internal_proto_examplepb_unannotated_echo_service_proto_goTypes = []interface{}{
(*UnannotatedEmbedded)(nil), // 0: grpc.gateway.examples.internal.proto.examplepb.UnannotatedEmbedded
(*UnannotatedSimpleMessage)(nil), // 1: grpc.gateway.examples.internal.proto.examplepb.UnannotatedSimpleMessage
- (*duration.Duration)(nil), // 2: google.protobuf.Duration
+ (*durationpb.Duration)(nil), // 2: google.protobuf.Duration
}
var file_examples_internal_proto_examplepb_unannotated_echo_service_proto_depIdxs = []int32{
2, // 0: grpc.gateway.examples.internal.proto.examplepb.UnannotatedSimpleMessage.duration:type_name -> google.protobuf.Duration
diff --git a/examples/internal/proto/examplepb/unannotated_echo_service.pb.gw.go b/examples/internal/proto/examplepb/unannotated_echo_service.pb.gw.go
index 8670a575b47..1f2edb1253a 100644
--- a/examples/internal/proto/examplepb/unannotated_echo_service.pb.gw.go
+++ b/examples/internal/proto/examplepb/unannotated_echo_service.pb.gw.go
@@ -273,20 +273,22 @@ func RegisterUnannotatedEchoServiceHandlerServer(ctx context.Context, mux *runti
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/Echo")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/Echo", runtime.WithHTTPPathPattern("/v1/example/echo/{id}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_UnannotatedEchoService_Echo_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_UnannotatedEchoService_Echo_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_UnannotatedEchoService_Echo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_UnannotatedEchoService_Echo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -296,20 +298,22 @@ func RegisterUnannotatedEchoServiceHandlerServer(ctx context.Context, mux *runti
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/Echo")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/Echo", runtime.WithHTTPPathPattern("/v1/example/echo/{id}/{num}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_UnannotatedEchoService_Echo_1(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_UnannotatedEchoService_Echo_1(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_UnannotatedEchoService_Echo_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_UnannotatedEchoService_Echo_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -319,20 +323,22 @@ func RegisterUnannotatedEchoServiceHandlerServer(ctx context.Context, mux *runti
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/EchoBody")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/EchoBody", runtime.WithHTTPPathPattern("/v1/example/echo_body"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_UnannotatedEchoService_EchoBody_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_UnannotatedEchoService_EchoBody_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_UnannotatedEchoService_EchoBody_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_UnannotatedEchoService_EchoBody_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -342,20 +348,22 @@ func RegisterUnannotatedEchoServiceHandlerServer(ctx context.Context, mux *runti
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/EchoDelete")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/EchoDelete", runtime.WithHTTPPathPattern("/v1/example/echo_delete"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_UnannotatedEchoService_EchoDelete_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_UnannotatedEchoService_EchoDelete_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_UnannotatedEchoService_EchoDelete_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_UnannotatedEchoService_EchoDelete_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -404,19 +412,21 @@ func RegisterUnannotatedEchoServiceHandlerClient(ctx context.Context, mux *runti
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/Echo")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/Echo", runtime.WithHTTPPathPattern("/v1/example/echo/{id}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_UnannotatedEchoService_Echo_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_UnannotatedEchoService_Echo_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_UnannotatedEchoService_Echo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_UnannotatedEchoService_Echo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -424,19 +434,21 @@ func RegisterUnannotatedEchoServiceHandlerClient(ctx context.Context, mux *runti
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/Echo")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/Echo", runtime.WithHTTPPathPattern("/v1/example/echo/{id}/{num}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_UnannotatedEchoService_Echo_1(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_UnannotatedEchoService_Echo_1(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_UnannotatedEchoService_Echo_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_UnannotatedEchoService_Echo_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -444,19 +456,21 @@ func RegisterUnannotatedEchoServiceHandlerClient(ctx context.Context, mux *runti
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/EchoBody")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/EchoBody", runtime.WithHTTPPathPattern("/v1/example/echo_body"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_UnannotatedEchoService_EchoBody_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_UnannotatedEchoService_EchoBody_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_UnannotatedEchoService_EchoBody_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_UnannotatedEchoService_EchoBody_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -464,19 +478,21 @@ func RegisterUnannotatedEchoServiceHandlerClient(ctx context.Context, mux *runti
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/EchoDelete")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/EchoDelete", runtime.WithHTTPPathPattern("/v1/example/echo_delete"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_UnannotatedEchoService_EchoDelete_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_UnannotatedEchoService_EchoDelete_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_UnannotatedEchoService_EchoDelete_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_UnannotatedEchoService_EchoDelete_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
diff --git a/examples/internal/proto/examplepb/unannotated_echo_service.proto b/examples/internal/proto/examplepb/unannotated_echo_service.proto
index cbe0f375257..fc8fbadb97d 100644
--- a/examples/internal/proto/examplepb/unannotated_echo_service.proto
+++ b/examples/internal/proto/examplepb/unannotated_echo_service.proto
@@ -1,5 +1,4 @@
syntax = "proto3";
-option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/examplepb;examplepb";
// Unannotated Echo Service
// Similar to echo_service.proto but without annotations. See
@@ -13,42 +12,44 @@ package grpc.gateway.examples.internal.proto.examplepb;
// Do not need annotations.proto, can still use well known types as usual
import "google/protobuf/duration.proto";
+option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/examplepb;examplepb";
+
// Embedded represents a message embedded in SimpleMessage.
message UnannotatedEmbedded {
- oneof mark {
- int64 progress = 1;
- string note = 2;
- }
+ oneof mark {
+ int64 progress = 1;
+ string note = 2;
+ }
}
// UnannotatedSimpleMessage represents a simple message sent to the unannotated Echo service.
message UnannotatedSimpleMessage {
- // Id represents the message identifier.
- string id = 1;
- int64 num = 2;
- google.protobuf.Duration duration = 3;
- oneof code {
- int64 line_num = 4;
- string lang = 5;
- }
- UnannotatedEmbedded status = 6;
- oneof ext {
- int64 en = 7;
- UnannotatedEmbedded no = 8;
- }
+ // Id represents the message identifier.
+ string id = 1;
+ int64 num = 2;
+ google.protobuf.Duration duration = 3;
+ oneof code {
+ int64 line_num = 4;
+ string lang = 5;
+ }
+ UnannotatedEmbedded status = 6;
+ oneof ext {
+ int64 en = 7;
+ UnannotatedEmbedded no = 8;
+ }
}
// Echo service responds to incoming echo requests.
service UnannotatedEchoService {
- // Echo method receives a simple message and returns it.
- //
- // The message posted as the id parameter will also be
- // returned.
- rpc Echo(UnannotatedSimpleMessage) returns (UnannotatedSimpleMessage);
-
- // EchoBody method receives a simple message and returns it.
- rpc EchoBody(UnannotatedSimpleMessage) returns (UnannotatedSimpleMessage);
-
- // EchoDelete method receives a simple message and returns it.
- rpc EchoDelete(UnannotatedSimpleMessage) returns (UnannotatedSimpleMessage);
+ // Echo method receives a simple message and returns it.
+ //
+ // The message posted as the id parameter will also be
+ // returned.
+ rpc Echo(UnannotatedSimpleMessage) returns (UnannotatedSimpleMessage);
+
+ // EchoBody method receives a simple message and returns it.
+ rpc EchoBody(UnannotatedSimpleMessage) returns (UnannotatedSimpleMessage);
+
+ // EchoDelete method receives a simple message and returns it.
+ rpc EchoDelete(UnannotatedSimpleMessage) returns (UnannotatedSimpleMessage);
}
diff --git a/examples/internal/proto/examplepb/unannotated_echo_service.swagger.json b/examples/internal/proto/examplepb/unannotated_echo_service.swagger.json
index 83eacefc671..5f0f41e912f 100644
--- a/examples/internal/proto/examplepb/unannotated_echo_service.swagger.json
+++ b/examples/internal/proto/examplepb/unannotated_echo_service.swagger.json
@@ -17,7 +17,21 @@
},
"tags": [
{
- "name": "UnannotatedEchoService"
+ "name": "UnannotatedEchoService",
+ "description": "UnannotatedEchoService description -- which should not be used in place of the documentation comment!",
+ "externalDocs": {
+ "description": "Find out more about UnannotatedEchoService",
+ "url": "https://github.com/grpc-ecosystem/grpc-gateway"
+ }
+ },
+ {
+ "name": "Echo",
+ "description": "Echo description"
+ },
+ {
+ "name": "Internal",
+ "description": "Internal description",
+ "x-traitTag": true
}
],
"schemes": [
@@ -81,6 +95,67 @@
"in": "path",
"required": true,
"type": "string"
+ },
+ {
+ "name": "num",
+ "description": "Int value field",
+ "in": "query",
+ "required": true,
+ "type": "string",
+ "format": "int64",
+ "default": "42"
+ },
+ {
+ "name": "duration",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "lineNum",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "lang",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "status.progress",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "status.note",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "en",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "no.progress",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "no.note",
+ "in": "query",
+ "required": false,
+ "type": "string"
}
],
"tags": [
@@ -243,6 +318,7 @@
"parameters": [
{
"name": "body",
+ "description": "A simple message with many types",
"in": "body",
"required": true,
"schema": {
@@ -388,10 +464,7 @@
"type": "string",
"format": "int64",
"default": "42",
- "description": "Int value field",
- "required": [
- "num"
- ]
+ "description": "Int value field"
},
"duration": {
"type": "string"
@@ -428,14 +501,11 @@
"protobufAny": {
"type": "object",
"properties": {
- "typeUrl": {
+ "@type": {
"type": "string"
- },
- "value": {
- "type": "string",
- "format": "byte"
}
- }
+ },
+ "additionalProperties": {}
},
"rpcStatus": {
"type": "object",
diff --git a/examples/internal/proto/examplepb/unannotated_echo_service.swagger.yaml b/examples/internal/proto/examplepb/unannotated_echo_service.swagger.yaml
index 6329dad9472..3e80d288c17 100644
--- a/examples/internal/proto/examplepb/unannotated_echo_service.swagger.yaml
+++ b/examples/internal/proto/examplepb/unannotated_echo_service.swagger.yaml
@@ -15,6 +15,13 @@ openapiOptions:
version: "1.0"
extensions:
x-something-something: yadda
+ tags:
+ - name: Echo
+ description: Echo description
+ - name: Internal
+ description: Internal description
+ extensions:
+ x-traitTag: true
schemes:
- HTTP
- HTTPS
diff --git a/examples/internal/proto/examplepb/unannotated_echo_service_grpc.pb.go b/examples/internal/proto/examplepb/unannotated_echo_service_grpc.pb.go
index 80166f65c93..ac3b18f18c3 100644
--- a/examples/internal/proto/examplepb/unannotated_echo_service_grpc.pb.go
+++ b/examples/internal/proto/examplepb/unannotated_echo_service_grpc.pb.go
@@ -11,6 +11,7 @@ import (
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
+// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// UnannotatedEchoServiceClient is the client API for UnannotatedEchoService service.
@@ -99,8 +100,8 @@ type UnsafeUnannotatedEchoServiceServer interface {
mustEmbedUnimplementedUnannotatedEchoServiceServer()
}
-func RegisterUnannotatedEchoServiceServer(s *grpc.Server, srv UnannotatedEchoServiceServer) {
- s.RegisterService(&_UnannotatedEchoService_serviceDesc, srv)
+func RegisterUnannotatedEchoServiceServer(s grpc.ServiceRegistrar, srv UnannotatedEchoServiceServer) {
+ s.RegisterService(&UnannotatedEchoService_ServiceDesc, srv)
}
func _UnannotatedEchoService_Echo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
@@ -157,7 +158,10 @@ func _UnannotatedEchoService_EchoDelete_Handler(srv interface{}, ctx context.Con
return interceptor(ctx, in, info, handler)
}
-var _UnannotatedEchoService_serviceDesc = grpc.ServiceDesc{
+// UnannotatedEchoService_ServiceDesc is the grpc.ServiceDesc for UnannotatedEchoService service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var UnannotatedEchoService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService",
HandlerType: (*UnannotatedEchoServiceServer)(nil),
Methods: []grpc.MethodDesc{
diff --git a/examples/internal/proto/examplepb/use_go_template.buf.gen.yaml b/examples/internal/proto/examplepb/use_go_template.buf.gen.yaml
index 029ebddc595..cfbdaa9d272 100644
--- a/examples/internal/proto/examplepb/use_go_template.buf.gen.yaml
+++ b/examples/internal/proto/examplepb/use_go_template.buf.gen.yaml
@@ -1,4 +1,4 @@
-version: v1beta1
+version: v1
plugins:
- name: openapiv2
out: .
diff --git a/examples/internal/proto/examplepb/use_go_template.pb.go b/examples/internal/proto/examplepb/use_go_template.pb.go
index acba76527a7..3d341d14048 100644
--- a/examples/internal/proto/examplepb/use_go_template.pb.go
+++ b/examples/internal/proto/examplepb/use_go_template.pb.go
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.26.0
-// protoc v3.13.0
+// protoc-gen-go v1.27.1
+// protoc (unknown)
// source: examples/internal/proto/examplepb/use_go_template.proto
package examplepb
@@ -296,8 +296,8 @@ var file_examples_internal_proto_examplepb_use_go_template_proto_rawDesc = []byt
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, 0x4c, 0x6f,
0x67, 0x69, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16,
- 0x22, 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x6c, 0x6f,
- 0x67, 0x69, 0x6e, 0x3a, 0x01, 0x2a, 0x12, 0xa3, 0x01, 0x0a, 0x06, 0x4c, 0x6f, 0x67, 0x6f, 0x75,
+ 0x3a, 0x01, 0x2a, 0x22, 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65,
+ 0x2f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0xa3, 0x01, 0x0a, 0x06, 0x4c, 0x6f, 0x67, 0x6f, 0x75,
0x74, 0x12, 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,
@@ -306,8 +306,8 @@ var file_examples_internal_proto_examplepb_use_go_template_proto_rawDesc = []byt
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, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x1d, 0x82,
- 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x22, 0x12, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70,
- 0x6c, 0x65, 0x2f, 0x6c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x3a, 0x01, 0x2a, 0x42, 0x4d, 0x5a, 0x4b,
+ 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x3a, 0x01, 0x2a, 0x22, 0x12, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78,
+ 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x6c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x42, 0x4d, 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,
diff --git a/examples/internal/proto/examplepb/use_go_template.pb.gw.go b/examples/internal/proto/examplepb/use_go_template.pb.gw.go
index 1eaccc6201f..86167f21c29 100644
--- a/examples/internal/proto/examplepb/use_go_template.pb.gw.go
+++ b/examples/internal/proto/examplepb/use_go_template.pb.gw.go
@@ -111,20 +111,22 @@ func RegisterLoginServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.LoginService/Login")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.LoginService/Login", runtime.WithHTTPPathPattern("/v1/example/login"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_LoginService_Login_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_LoginService_Login_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_LoginService_Login_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_LoginService_Login_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -134,20 +136,22 @@ func RegisterLoginServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.LoginService/Logout")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.LoginService/Logout", runtime.WithHTTPPathPattern("/v1/example/logout"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_LoginService_Logout_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_LoginService_Logout_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_LoginService_Logout_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_LoginService_Logout_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -196,19 +200,21 @@ func RegisterLoginServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.LoginService/Login")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.LoginService/Login", runtime.WithHTTPPathPattern("/v1/example/login"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_LoginService_Login_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_LoginService_Login_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_LoginService_Login_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_LoginService_Login_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -216,19 +222,21 @@ func RegisterLoginServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.LoginService/Logout")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.LoginService/Logout", runtime.WithHTTPPathPattern("/v1/example/logout"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_LoginService_Logout_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_LoginService_Logout_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_LoginService_Logout_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_LoginService_Logout_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
diff --git a/examples/internal/proto/examplepb/use_go_template.proto b/examples/internal/proto/examplepb/use_go_template.proto
index dc11abe1342..250e8c1ab32 100644
--- a/examples/internal/proto/examplepb/use_go_template.proto
+++ b/examples/internal/proto/examplepb/use_go_template.proto
@@ -1,85 +1,87 @@
syntax = "proto3";
-option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/examplepb";
+
package grpc.gateway.examples.internal.proto.examplepb;
import "google/api/annotations.proto";
+option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/examplepb";
+
service LoginService {
- // Login
- //
- // {{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service.
- // It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}".
- //
- // ## {{.RequestType.Name}}
- // | Field ID | Name | Type | Description |
- // | ----------- | --------- | --------------------------------------------------------- | ---------------------------- | {{range .RequestType.Fields}}
- // | {{.Number}} | {{.Name}} | {{if eq .Label.String "LABEL_REPEATED"}}[]{{end}}{{.Type}} | {{fieldcomments .Message .}} | {{end}}
- //
- // ## {{.ResponseType.Name}}
- // | Field ID | Name | Type | Description |
- // | ----------- | --------- | ---------------------------------------------------------- | ---------------------------- | {{range .ResponseType.Fields}}
- // | {{.Number}} | {{.Name}} | {{if eq .Label.String "LABEL_REPEATED"}}[]{{end}}{{.Type}} | {{fieldcomments .Message .}} | {{end}}
- rpc Login (LoginRequest) returns (LoginReply) {
- option (google.api.http) = {
- post: "/v1/example/login"
- body: "*"
- };
- }
+ // Login
+ //
+ // {{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service.
+ // It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}".
+ //
+ // ## {{.RequestType.Name}}
+ // | Field ID | Name | Type | Description |
+ // | ----------- | --------- | --------------------------------------------------------- | ---------------------------- | {{range .RequestType.Fields}}
+ // | {{.Number}} | {{.Name}} | {{if eq .Label.String "LABEL_REPEATED"}}[]{{end}}{{.Type}} | {{fieldcomments .Message .}} | {{end}}
+ //
+ // ## {{.ResponseType.Name}}
+ // | Field ID | Name | Type | Description |
+ // | ----------- | --------- | ---------------------------------------------------------- | ---------------------------- | {{range .ResponseType.Fields}}
+ // | {{.Number}} | {{.Name}} | {{if eq .Label.String "LABEL_REPEATED"}}[]{{end}}{{.Type}} | {{fieldcomments .Message .}} | {{end}}
+ rpc Login(LoginRequest) returns (LoginReply) {
+ option (google.api.http) = {
+ post: "/v1/example/login"
+ body: "*"
+ };
+ }
- // Logout
- //
- // {{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service.
- // It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}".
- //
- // ## {{.RequestType.Name}}
- // | Field ID | Name | Type | Description |
- // | ----------- | --------- | --------------------------------------------------------- | ---------------------------- | {{range .RequestType.Fields}}
- // | {{.Number}} | {{.Name}} | {{if eq .Label.String "LABEL_REPEATED"}}[]{{end}}{{.Type}} | {{fieldcomments .Message .}} | {{end}}
- //
- // ## {{.ResponseType.Name}}
- // | Field ID | Name | Type | Description |
- // | ----------- | --------- | ---------------------------------------------------------- | ---------------------------- | {{range .ResponseType.Fields}}
- // | {{.Number}} | {{.Name}} | {{if eq .Label.String "LABEL_REPEATED"}}[]{{end}}{{.Type}} | {{fieldcomments .Message .}} | {{end}}
- rpc Logout (LogoutRequest) returns (LogoutReply) {
- option (google.api.http) = {
- post: "/v1/example/logout"
- body: "*"
- };
- }
+ // Logout
+ //
+ // {{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service.
+ // It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}".
+ //
+ // ## {{.RequestType.Name}}
+ // | Field ID | Name | Type | Description |
+ // | ----------- | --------- | --------------------------------------------------------- | ---------------------------- | {{range .RequestType.Fields}}
+ // | {{.Number}} | {{.Name}} | {{if eq .Label.String "LABEL_REPEATED"}}[]{{end}}{{.Type}} | {{fieldcomments .Message .}} | {{end}}
+ //
+ // ## {{.ResponseType.Name}}
+ // | Field ID | Name | Type | Description |
+ // | ----------- | --------- | ---------------------------------------------------------- | ---------------------------- | {{range .ResponseType.Fields}}
+ // | {{.Number}} | {{.Name}} | {{if eq .Label.String "LABEL_REPEATED"}}[]{{end}}{{.Type}} | {{fieldcomments .Message .}} | {{end}}
+ rpc Logout(LogoutRequest) returns (LogoutReply) {
+ option (google.api.http) = {
+ post: "/v1/example/logout"
+ body: "*"
+ };
+ }
}
message LoginRequest {
- // The entered username
- string username = 1;
- // The entered password
- string password = 2;
+ // The entered username
+ string username = 1;
+ // The entered password
+ string password = 2;
}
message LoginReply {
- string message = 1;
- // Whether you have access or not
- bool access = 2;
+ string message = 1;
+ // Whether you have access or not
+ bool access = 2;
}
message LogoutRequest {
- // The time the logout was registered
- string timeoflogout = 1;
- // This is the title
- //
- // This is the "Description" of field test
- // you can use as many newlines as you want
- //
- //
- // it will still format the same in the table
- int32 test = 2;
- // This is an array
- //
- // It displays that using [] infront of the type
- repeated string stringarray = 3;
+ // The time the logout was registered
+ string timeoflogout = 1;
+ // This is the title
+ //
+ // This is the "Description" of field test
+ // you can use as many newlines as you want
+ //
+ //
+ // it will still format the same in the table
+ int32 test = 2;
+ // This is an array
+ //
+ // It displays that using [] infront of the type
+ repeated string stringarray = 3;
}
message LogoutReply {
- // Message that tells you whether your
- // logout was succesful or not
- string message = 1;
+ // Message that tells you whether your
+ // logout was succesful or not
+ string message = 1;
}
diff --git a/examples/internal/proto/examplepb/use_go_template.swagger.json b/examples/internal/proto/examplepb/use_go_template.swagger.json
index 18975ccfad1..d34b85eb0cc 100644
--- a/examples/internal/proto/examplepb/use_go_template.swagger.json
+++ b/examples/internal/proto/examplepb/use_go_template.swagger.json
@@ -19,7 +19,7 @@
"/v1/example/login": {
"post": {
"summary": "Login",
- "description": "Login is a call with the method(s) POST within the \"LoginService\" service.\nIt takes in \"LoginRequest\" and returns a \"LoginReply\".\n\n## LoginRequest\n| Field ID | Name | Type | Description |\n| ----------- | --------- | --------------------------------------------------------- | ---------------------------- | \n| 1 | username | TYPE_STRING | The entered username | \n| 2 | password | TYPE_STRING | The entered password | \n\n## LoginReply\n| Field ID | Name | Type | Description |\n| ----------- | --------- | ---------------------------------------------------------- | ---------------------------- | \n| 1 | message | TYPE_STRING | | \n| 2 | access | TYPE_BOOL | Whether you have access or not |",
+ "description": "Login is a call with the method(s) POST within the \"LoginService\" service.\nIt takes in \"LoginRequest\" and returns a \"LoginReply\".\n\n## LoginRequest\n| Field ID | Name | Type | Description |\n| ----------- | --------- | --------------------------------------------------------- | ---------------------------- | \n| 1 | username | TYPE_STRING | The entered username | \n| 2 | password | TYPE_STRING | The entered password | \n\n## LoginReply\n| Field ID | Name | Type | Description |\n| ----------- | --------- | ---------------------------------------------------------- | ---------------------------- | \n| 1 | message | TYPE_STRING | | \n| 2 | access | TYPE_BOOL | Whether you have access or not |",
"operationId": "LoginService_Login",
"responses": {
"200": {
@@ -53,7 +53,7 @@
"/v1/example/logout": {
"post": {
"summary": "Logout",
- "description": "Logout is a call with the method(s) POST within the \"LoginService\" service.\nIt takes in \"LogoutRequest\" and returns a \"LogoutReply\".\n\n## LogoutRequest\n| Field ID | Name | Type | Description |\n| ----------- | --------- | --------------------------------------------------------- | ---------------------------- | \n| 1 | timeoflogout | TYPE_STRING | The time the logout was registered | \n| 2 | test | TYPE_INT32 | This is the title\u003cbr\u003e\u003cbr\u003eThis is the \"Description\" of field test\u003cbr\u003eyou can use as many newlines as you want\u003cbr\u003e\u003cbr\u003e\u003cbr\u003eit will still format the same in the table | \n| 3 | stringarray | []TYPE_STRING | This is an array\u003cbr\u003e\u003cbr\u003eIt displays that using [] infront of the type | \n\n## LogoutReply\n| Field ID | Name | Type | Description |\n| ----------- | --------- | ---------------------------------------------------------- | ---------------------------- | \n| 1 | message | TYPE_STRING | Message that tells you whether your\u003cbr\u003elogout was succesful or not |",
+ "description": "Logout is a call with the method(s) POST within the \"LoginService\" service.\nIt takes in \"LogoutRequest\" and returns a \"LogoutReply\".\n\n## LogoutRequest\n| Field ID | Name | Type | Description |\n| ----------- | --------- | --------------------------------------------------------- | ---------------------------- | \n| 1 | timeoflogout | TYPE_STRING | The time the logout was registered | \n| 2 | test | TYPE_INT32 | This is the title\u003cbr\u003e\u003cbr\u003eThis is the \"Description\" of field test\u003cbr\u003eyou can use as many newlines as you want\u003cbr\u003e\u003cbr\u003e\u003cbr\u003eit will still format the same in the table | \n| 3 | stringarray | []TYPE_STRING | This is an array\u003cbr\u003e\u003cbr\u003eIt displays that using [] infront of the type | \n\n## LogoutReply\n| Field ID | Name | Type | Description |\n| ----------- | --------- | ---------------------------------------------------------- | ---------------------------- | \n| 1 | message | TYPE_STRING | Message that tells you whether your\u003cbr\u003elogout was succesful or not |",
"operationId": "LoginService_Logout",
"responses": {
"200": {
@@ -146,14 +146,11 @@
"protobufAny": {
"type": "object",
"properties": {
- "typeUrl": {
+ "@type": {
"type": "string"
- },
- "value": {
- "type": "string",
- "format": "byte"
}
- }
+ },
+ "additionalProperties": {}
},
"rpcStatus": {
"type": "object",
diff --git a/examples/internal/proto/examplepb/use_go_template_grpc.pb.go b/examples/internal/proto/examplepb/use_go_template_grpc.pb.go
index 49e7a11e1ec..e4bea74ce31 100644
--- a/examples/internal/proto/examplepb/use_go_template_grpc.pb.go
+++ b/examples/internal/proto/examplepb/use_go_template_grpc.pb.go
@@ -11,6 +11,7 @@ import (
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
+// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// LoginServiceClient is the client API for LoginService service.
@@ -129,8 +130,8 @@ type UnsafeLoginServiceServer interface {
mustEmbedUnimplementedLoginServiceServer()
}
-func RegisterLoginServiceServer(s *grpc.Server, srv LoginServiceServer) {
- s.RegisterService(&_LoginService_serviceDesc, srv)
+func RegisterLoginServiceServer(s grpc.ServiceRegistrar, srv LoginServiceServer) {
+ s.RegisterService(&LoginService_ServiceDesc, srv)
}
func _LoginService_Login_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
@@ -169,7 +170,10 @@ func _LoginService_Logout_Handler(srv interface{}, ctx context.Context, dec func
return interceptor(ctx, in, info, handler)
}
-var _LoginService_serviceDesc = grpc.ServiceDesc{
+// LoginService_ServiceDesc is the grpc.ServiceDesc for LoginService service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var LoginService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "grpc.gateway.examples.internal.proto.examplepb.LoginService",
HandlerType: (*LoginServiceServer)(nil),
Methods: []grpc.MethodDesc{
diff --git a/examples/internal/proto/examplepb/visibility_rule_echo_service.pb.go b/examples/internal/proto/examplepb/visibility_rule_echo_service.pb.go
new file mode 100644
index 00000000000..8a96f4a92cf
--- /dev/null
+++ b/examples/internal/proto/examplepb/visibility_rule_echo_service.pb.go
@@ -0,0 +1,845 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.27.1
+// protoc (unknown)
+// source: examples/internal/proto/examplepb/visibility_rule_echo_service.proto
+
+// Visibility Rule Echo Service
+// Similar to echo_service.proto but with annotations to change visibility
+// of services, methods, fields and enum values.
+//
+// `google.api.VisibilityRule` annotations are added to customize where they are generated.
+// Combined with the option `visibility_restriction_selectors` overlapping rules will appear in the OpenAPI output.
+// Elements without `google.api.VisibilityRule` annotations will appear as usual in the generated output.
+//
+// These restrictions and selectors are completely arbitrary and you can define whatever values or hierarchies you want.
+// In this example `INTERNAL`, `PREVIEW` are used, but `INTERNAL`, `ALPHA`, `BETA`, `RELEASED`, or anything else could be used if you wish.
+
+package examplepb
+
+import (
+ _ "google.golang.org/genproto/googleapis/api/annotations"
+ _ "google.golang.org/genproto/googleapis/api/visibility"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// EnumInPreviewMethod doesn't define its own visibility restrictions,
+// but is only included in a method marked as "PREVIEW", so it will only
+// appear if `visibility_restriction_selectors` include "PREVIEW".
+type VisibilityRuleEnumInPreviewMethod int32
+
+const (
+ VisibilityRuleEnumInPreviewMethod_VISIBILITY_RULE_ENUM_IN_PREVIEW_METHOD_UNSPECIFIED VisibilityRuleEnumInPreviewMethod = 0
+)
+
+// Enum value maps for VisibilityRuleEnumInPreviewMethod.
+var (
+ VisibilityRuleEnumInPreviewMethod_name = map[int32]string{
+ 0: "VISIBILITY_RULE_ENUM_IN_PREVIEW_METHOD_UNSPECIFIED",
+ }
+ VisibilityRuleEnumInPreviewMethod_value = map[string]int32{
+ "VISIBILITY_RULE_ENUM_IN_PREVIEW_METHOD_UNSPECIFIED": 0,
+ }
+)
+
+func (x VisibilityRuleEnumInPreviewMethod) Enum() *VisibilityRuleEnumInPreviewMethod {
+ p := new(VisibilityRuleEnumInPreviewMethod)
+ *p = x
+ return p
+}
+
+func (x VisibilityRuleEnumInPreviewMethod) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (VisibilityRuleEnumInPreviewMethod) Descriptor() protoreflect.EnumDescriptor {
+ return file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_enumTypes[0].Descriptor()
+}
+
+func (VisibilityRuleEnumInPreviewMethod) Type() protoreflect.EnumType {
+ return &file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_enumTypes[0]
+}
+
+func (x VisibilityRuleEnumInPreviewMethod) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use VisibilityRuleEnumInPreviewMethod.Descriptor instead.
+func (VisibilityRuleEnumInPreviewMethod) EnumDescriptor() ([]byte, []int) {
+ return file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_rawDescGZIP(), []int{0}
+}
+
+type VisibilityRuleSimpleMessage_VisibilityEnum int32
+
+const (
+ VisibilityRuleSimpleMessage_VISIBILITY_ENUM_UNSPECIFIED VisibilityRuleSimpleMessage_VisibilityEnum = 0
+ VisibilityRuleSimpleMessage_VISIBILITY_ENUM_VISIBLE VisibilityRuleSimpleMessage_VisibilityEnum = 1
+ VisibilityRuleSimpleMessage_VISIBILITY_ENUM_INTERNAL VisibilityRuleSimpleMessage_VisibilityEnum = 2
+ VisibilityRuleSimpleMessage_VISIBILITY_ENUM_PREVIEW VisibilityRuleSimpleMessage_VisibilityEnum = 3
+)
+
+// Enum value maps for VisibilityRuleSimpleMessage_VisibilityEnum.
+var (
+ VisibilityRuleSimpleMessage_VisibilityEnum_name = map[int32]string{
+ 0: "VISIBILITY_ENUM_UNSPECIFIED",
+ 1: "VISIBILITY_ENUM_VISIBLE",
+ 2: "VISIBILITY_ENUM_INTERNAL",
+ 3: "VISIBILITY_ENUM_PREVIEW",
+ }
+ VisibilityRuleSimpleMessage_VisibilityEnum_value = map[string]int32{
+ "VISIBILITY_ENUM_UNSPECIFIED": 0,
+ "VISIBILITY_ENUM_VISIBLE": 1,
+ "VISIBILITY_ENUM_INTERNAL": 2,
+ "VISIBILITY_ENUM_PREVIEW": 3,
+ }
+)
+
+func (x VisibilityRuleSimpleMessage_VisibilityEnum) Enum() *VisibilityRuleSimpleMessage_VisibilityEnum {
+ p := new(VisibilityRuleSimpleMessage_VisibilityEnum)
+ *p = x
+ return p
+}
+
+func (x VisibilityRuleSimpleMessage_VisibilityEnum) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (VisibilityRuleSimpleMessage_VisibilityEnum) Descriptor() protoreflect.EnumDescriptor {
+ return file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_enumTypes[1].Descriptor()
+}
+
+func (VisibilityRuleSimpleMessage_VisibilityEnum) Type() protoreflect.EnumType {
+ return &file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_enumTypes[1]
+}
+
+func (x VisibilityRuleSimpleMessage_VisibilityEnum) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use VisibilityRuleSimpleMessage_VisibilityEnum.Descriptor instead.
+func (VisibilityRuleSimpleMessage_VisibilityEnum) EnumDescriptor() ([]byte, []int) {
+ return file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_rawDescGZIP(), []int{1, 0}
+}
+
+// Embedded represents a message embedded in SimpleMessage.
+type VisibilityRuleEmbedded struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Types that are assignable to Mark:
+ // *VisibilityRuleEmbedded_Progress
+ // *VisibilityRuleEmbedded_Note
+ // *VisibilityRuleEmbedded_InternalField
+ // *VisibilityRuleEmbedded_PreviewField
+ Mark isVisibilityRuleEmbedded_Mark `protobuf_oneof:"mark"`
+}
+
+func (x *VisibilityRuleEmbedded) Reset() {
+ *x = VisibilityRuleEmbedded{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *VisibilityRuleEmbedded) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*VisibilityRuleEmbedded) ProtoMessage() {}
+
+func (x *VisibilityRuleEmbedded) ProtoReflect() protoreflect.Message {
+ mi := &file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use VisibilityRuleEmbedded.ProtoReflect.Descriptor instead.
+func (*VisibilityRuleEmbedded) Descriptor() ([]byte, []int) {
+ return file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_rawDescGZIP(), []int{0}
+}
+
+func (m *VisibilityRuleEmbedded) GetMark() isVisibilityRuleEmbedded_Mark {
+ if m != nil {
+ return m.Mark
+ }
+ return nil
+}
+
+func (x *VisibilityRuleEmbedded) GetProgress() int64 {
+ if x, ok := x.GetMark().(*VisibilityRuleEmbedded_Progress); ok {
+ return x.Progress
+ }
+ return 0
+}
+
+func (x *VisibilityRuleEmbedded) GetNote() string {
+ if x, ok := x.GetMark().(*VisibilityRuleEmbedded_Note); ok {
+ return x.Note
+ }
+ return ""
+}
+
+func (x *VisibilityRuleEmbedded) GetInternalField() string {
+ if x, ok := x.GetMark().(*VisibilityRuleEmbedded_InternalField); ok {
+ return x.InternalField
+ }
+ return ""
+}
+
+func (x *VisibilityRuleEmbedded) GetPreviewField() string {
+ if x, ok := x.GetMark().(*VisibilityRuleEmbedded_PreviewField); ok {
+ return x.PreviewField
+ }
+ return ""
+}
+
+type isVisibilityRuleEmbedded_Mark interface {
+ isVisibilityRuleEmbedded_Mark()
+}
+
+type VisibilityRuleEmbedded_Progress struct {
+ Progress int64 `protobuf:"varint,1,opt,name=progress,proto3,oneof"`
+}
+
+type VisibilityRuleEmbedded_Note struct {
+ Note string `protobuf:"bytes,2,opt,name=note,proto3,oneof"`
+}
+
+type VisibilityRuleEmbedded_InternalField struct {
+ InternalField string `protobuf:"bytes,3,opt,name=internal_field,json=internalField,proto3,oneof"`
+}
+
+type VisibilityRuleEmbedded_PreviewField struct {
+ PreviewField string `protobuf:"bytes,4,opt,name=preview_field,json=previewField,proto3,oneof"`
+}
+
+func (*VisibilityRuleEmbedded_Progress) isVisibilityRuleEmbedded_Mark() {}
+
+func (*VisibilityRuleEmbedded_Note) isVisibilityRuleEmbedded_Mark() {}
+
+func (*VisibilityRuleEmbedded_InternalField) isVisibilityRuleEmbedded_Mark() {}
+
+func (*VisibilityRuleEmbedded_PreviewField) isVisibilityRuleEmbedded_Mark() {}
+
+// SimpleMessage represents a simple message sent to the Echo service.
+type VisibilityRuleSimpleMessage struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Id represents the message identifier.
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ Num int64 `protobuf:"varint,2,opt,name=num,proto3" json:"num,omitempty"`
+ // Types that are assignable to Code:
+ // *VisibilityRuleSimpleMessage_LineNum
+ // *VisibilityRuleSimpleMessage_Lang
+ Code isVisibilityRuleSimpleMessage_Code `protobuf_oneof:"code"`
+ Status *VisibilityRuleEmbedded `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"`
+ // Types that are assignable to Ext:
+ // *VisibilityRuleSimpleMessage_En
+ // *VisibilityRuleSimpleMessage_No
+ Ext isVisibilityRuleSimpleMessage_Ext `protobuf_oneof:"ext"`
+ InternalField string `protobuf:"bytes,8,opt,name=internal_field,json=internalField,proto3" json:"internal_field,omitempty"`
+ PreviewField string `protobuf:"bytes,9,opt,name=preview_field,json=previewField,proto3" json:"preview_field,omitempty"`
+ AnEnum VisibilityRuleSimpleMessage_VisibilityEnum `protobuf:"varint,10,opt,name=an_enum,json=anEnum,proto3,enum=grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleSimpleMessage_VisibilityEnum" json:"an_enum,omitempty"`
+}
+
+func (x *VisibilityRuleSimpleMessage) Reset() {
+ *x = VisibilityRuleSimpleMessage{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *VisibilityRuleSimpleMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*VisibilityRuleSimpleMessage) ProtoMessage() {}
+
+func (x *VisibilityRuleSimpleMessage) ProtoReflect() protoreflect.Message {
+ mi := &file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use VisibilityRuleSimpleMessage.ProtoReflect.Descriptor instead.
+func (*VisibilityRuleSimpleMessage) Descriptor() ([]byte, []int) {
+ return file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *VisibilityRuleSimpleMessage) GetId() string {
+ if x != nil {
+ return x.Id
+ }
+ return ""
+}
+
+func (x *VisibilityRuleSimpleMessage) GetNum() int64 {
+ if x != nil {
+ return x.Num
+ }
+ return 0
+}
+
+func (m *VisibilityRuleSimpleMessage) GetCode() isVisibilityRuleSimpleMessage_Code {
+ if m != nil {
+ return m.Code
+ }
+ return nil
+}
+
+func (x *VisibilityRuleSimpleMessage) GetLineNum() int64 {
+ if x, ok := x.GetCode().(*VisibilityRuleSimpleMessage_LineNum); ok {
+ return x.LineNum
+ }
+ return 0
+}
+
+func (x *VisibilityRuleSimpleMessage) GetLang() string {
+ if x, ok := x.GetCode().(*VisibilityRuleSimpleMessage_Lang); ok {
+ return x.Lang
+ }
+ return ""
+}
+
+func (x *VisibilityRuleSimpleMessage) GetStatus() *VisibilityRuleEmbedded {
+ if x != nil {
+ return x.Status
+ }
+ return nil
+}
+
+func (m *VisibilityRuleSimpleMessage) GetExt() isVisibilityRuleSimpleMessage_Ext {
+ if m != nil {
+ return m.Ext
+ }
+ return nil
+}
+
+func (x *VisibilityRuleSimpleMessage) GetEn() int64 {
+ if x, ok := x.GetExt().(*VisibilityRuleSimpleMessage_En); ok {
+ return x.En
+ }
+ return 0
+}
+
+func (x *VisibilityRuleSimpleMessage) GetNo() *VisibilityRuleEmbedded {
+ if x, ok := x.GetExt().(*VisibilityRuleSimpleMessage_No); ok {
+ return x.No
+ }
+ return nil
+}
+
+func (x *VisibilityRuleSimpleMessage) GetInternalField() string {
+ if x != nil {
+ return x.InternalField
+ }
+ return ""
+}
+
+func (x *VisibilityRuleSimpleMessage) GetPreviewField() string {
+ if x != nil {
+ return x.PreviewField
+ }
+ return ""
+}
+
+func (x *VisibilityRuleSimpleMessage) GetAnEnum() VisibilityRuleSimpleMessage_VisibilityEnum {
+ if x != nil {
+ return x.AnEnum
+ }
+ return VisibilityRuleSimpleMessage_VISIBILITY_ENUM_UNSPECIFIED
+}
+
+type isVisibilityRuleSimpleMessage_Code interface {
+ isVisibilityRuleSimpleMessage_Code()
+}
+
+type VisibilityRuleSimpleMessage_LineNum struct {
+ LineNum int64 `protobuf:"varint,3,opt,name=line_num,json=lineNum,proto3,oneof"`
+}
+
+type VisibilityRuleSimpleMessage_Lang struct {
+ Lang string `protobuf:"bytes,4,opt,name=lang,proto3,oneof"`
+}
+
+func (*VisibilityRuleSimpleMessage_LineNum) isVisibilityRuleSimpleMessage_Code() {}
+
+func (*VisibilityRuleSimpleMessage_Lang) isVisibilityRuleSimpleMessage_Code() {}
+
+type isVisibilityRuleSimpleMessage_Ext interface {
+ isVisibilityRuleSimpleMessage_Ext()
+}
+
+type VisibilityRuleSimpleMessage_En struct {
+ En int64 `protobuf:"varint,6,opt,name=en,proto3,oneof"`
+}
+
+type VisibilityRuleSimpleMessage_No struct {
+ No *VisibilityRuleEmbedded `protobuf:"bytes,7,opt,name=no,proto3,oneof"`
+}
+
+func (*VisibilityRuleSimpleMessage_En) isVisibilityRuleSimpleMessage_Ext() {}
+
+func (*VisibilityRuleSimpleMessage_No) isVisibilityRuleSimpleMessage_Ext() {}
+
+// MessageInPreviewMethod doesn't define its own visibility restrictions,
+// but is only included in a method marked as "PREVIEW", so it will only
+// appear if `visibility_restriction_selectors` include "PREVIEW".
+type VisibilityRuleMessageInPreviewMethod struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ SubMessage *VisibilityRuleSubMessageInPreviewMethod `protobuf:"bytes,2,opt,name=sub_message,json=subMessage,proto3" json:"sub_message,omitempty"`
+ Enum VisibilityRuleEnumInPreviewMethod `protobuf:"varint,3,opt,name=enum,proto3,enum=grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleEnumInPreviewMethod" json:"enum,omitempty"`
+}
+
+func (x *VisibilityRuleMessageInPreviewMethod) Reset() {
+ *x = VisibilityRuleMessageInPreviewMethod{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *VisibilityRuleMessageInPreviewMethod) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*VisibilityRuleMessageInPreviewMethod) ProtoMessage() {}
+
+func (x *VisibilityRuleMessageInPreviewMethod) ProtoReflect() protoreflect.Message {
+ mi := &file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use VisibilityRuleMessageInPreviewMethod.ProtoReflect.Descriptor instead.
+func (*VisibilityRuleMessageInPreviewMethod) Descriptor() ([]byte, []int) {
+ return file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *VisibilityRuleMessageInPreviewMethod) GetId() string {
+ if x != nil {
+ return x.Id
+ }
+ return ""
+}
+
+func (x *VisibilityRuleMessageInPreviewMethod) GetSubMessage() *VisibilityRuleSubMessageInPreviewMethod {
+ if x != nil {
+ return x.SubMessage
+ }
+ return nil
+}
+
+func (x *VisibilityRuleMessageInPreviewMethod) GetEnum() VisibilityRuleEnumInPreviewMethod {
+ if x != nil {
+ return x.Enum
+ }
+ return VisibilityRuleEnumInPreviewMethod_VISIBILITY_RULE_ENUM_IN_PREVIEW_METHOD_UNSPECIFIED
+}
+
+// SubMessageInPreviewMethod doesn't define its own visibility restrictions,
+// but is only included in a method marked as "PREVIEW", so it will only
+// appear if `visibility_restriction_selectors` include "PREVIEW".
+type VisibilityRuleSubMessageInPreviewMethod struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+}
+
+func (x *VisibilityRuleSubMessageInPreviewMethod) Reset() {
+ *x = VisibilityRuleSubMessageInPreviewMethod{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *VisibilityRuleSubMessageInPreviewMethod) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*VisibilityRuleSubMessageInPreviewMethod) ProtoMessage() {}
+
+func (x *VisibilityRuleSubMessageInPreviewMethod) ProtoReflect() protoreflect.Message {
+ mi := &file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_msgTypes[3]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use VisibilityRuleSubMessageInPreviewMethod.ProtoReflect.Descriptor instead.
+func (*VisibilityRuleSubMessageInPreviewMethod) Descriptor() ([]byte, []int) {
+ return file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *VisibilityRuleSubMessageInPreviewMethod) GetId() string {
+ if x != nil {
+ return x.Id
+ }
+ return ""
+}
+
+var File_examples_internal_proto_examplepb_visibility_rule_echo_service_proto protoreflect.FileDescriptor
+
+var file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_rawDesc = []byte{
+ 0x0a, 0x44, 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, 0x2f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x72,
+ 0x75, 0x6c, 0x65, 0x5f, 0x65, 0x63, 0x68, 0x6f, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 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, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61,
+ 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69,
+ 0x2f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x22, 0xd0, 0x01, 0x0a, 0x16, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79,
+ 0x52, 0x75, 0x6c, 0x65, 0x45, 0x6d, 0x62, 0x65, 0x64, 0x64, 0x65, 0x64, 0x12, 0x1c, 0x0a, 0x08,
+ 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00,
+ 0x52, 0x08, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, 0x14, 0x0a, 0x04, 0x6e, 0x6f,
+ 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x6f, 0x74, 0x65,
+ 0x12, 0x39, 0x0a, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x66, 0x69, 0x65,
+ 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x10, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0a,
+ 0x12, 0x08, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x48, 0x00, 0x52, 0x0d, 0x69, 0x6e,
+ 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x3f, 0x0a, 0x0d, 0x70,
+ 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x04, 0x20, 0x01,
+ 0x28, 0x09, 0x42, 0x18, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x49, 0x4e, 0x54, 0x45,
+ 0x52, 0x4e, 0x41, 0x4c, 0x2c, 0x50, 0x52, 0x45, 0x56, 0x49, 0x45, 0x57, 0x48, 0x00, 0x52, 0x0c,
+ 0x70, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x06, 0x0a, 0x04,
+ 0x6d, 0x61, 0x72, 0x6b, 0x22, 0xf2, 0x05, 0x0a, 0x1b, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c,
+ 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x65, 0x73,
+ 0x73, 0x61, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6e, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x03, 0x52, 0x03, 0x6e, 0x75, 0x6d, 0x12, 0x1b, 0x0a, 0x08, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x6e,
+ 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x07, 0x6c, 0x69, 0x6e, 0x65,
+ 0x4e, 0x75, 0x6d, 0x12, 0x14, 0x0a, 0x04, 0x6c, 0x61, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28,
+ 0x09, 0x48, 0x00, 0x52, 0x04, 0x6c, 0x61, 0x6e, 0x67, 0x12, 0x5e, 0x0a, 0x06, 0x73, 0x74, 0x61,
+ 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x46, 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, 0x56, 0x69, 0x73, 0x69, 0x62,
+ 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x45, 0x6d, 0x62, 0x65, 0x64, 0x64, 0x65,
+ 0x64, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x10, 0x0a, 0x02, 0x65, 0x6e, 0x18,
+ 0x06, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x02, 0x65, 0x6e, 0x12, 0x58, 0x0a, 0x02, 0x6e,
+ 0x6f, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x46, 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, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c,
+ 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x45, 0x6d, 0x62, 0x65, 0x64, 0x64, 0x65, 0x64, 0x48,
+ 0x01, 0x52, 0x02, 0x6e, 0x6f, 0x12, 0x37, 0x0a, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61,
+ 0x6c, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x10, 0xfa,
+ 0xd2, 0xe4, 0x93, 0x02, 0x0a, 0x12, 0x08, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x52,
+ 0x0d, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x3d,
+ 0x0a, 0x0d, 0x70, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18,
+ 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x49,
+ 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x2c, 0x50, 0x52, 0x45, 0x56, 0x49, 0x45, 0x57, 0x52,
+ 0x0c, 0x70, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x73, 0x0a,
+ 0x07, 0x61, 0x6e, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x5a,
+ 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,
+ 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x53, 0x69,
+ 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x56, 0x69, 0x73, 0x69,
+ 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x06, 0x61, 0x6e, 0x45, 0x6e,
+ 0x75, 0x6d, 0x22, 0xb5, 0x01, 0x0a, 0x0e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74,
+ 0x79, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x1f, 0x0a, 0x1b, 0x56, 0x49, 0x53, 0x49, 0x42, 0x49, 0x4c,
+ 0x49, 0x54, 0x59, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49,
+ 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x56, 0x49, 0x53, 0x49, 0x42, 0x49,
+ 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x56, 0x49, 0x53, 0x49, 0x42, 0x4c,
+ 0x45, 0x10, 0x01, 0x12, 0x2e, 0x0a, 0x18, 0x56, 0x49, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54,
+ 0x59, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x10,
+ 0x02, 0x1a, 0x10, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0a, 0x12, 0x08, 0x49, 0x4e, 0x54, 0x45, 0x52,
+ 0x4e, 0x41, 0x4c, 0x12, 0x35, 0x0a, 0x17, 0x56, 0x49, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54,
+ 0x59, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x50, 0x52, 0x45, 0x56, 0x49, 0x45, 0x57, 0x10, 0x03,
+ 0x1a, 0x18, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e,
+ 0x41, 0x4c, 0x2c, 0x50, 0x52, 0x45, 0x56, 0x49, 0x45, 0x57, 0x42, 0x06, 0x0a, 0x04, 0x63, 0x6f,
+ 0x64, 0x65, 0x42, 0x05, 0x0a, 0x03, 0x65, 0x78, 0x74, 0x22, 0x97, 0x02, 0x0a, 0x24, 0x56, 0x69,
+ 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73,
+ 0x61, 0x67, 0x65, 0x49, 0x6e, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x4d, 0x65, 0x74, 0x68,
+ 0x6f, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02,
+ 0x69, 0x64, 0x12, 0x78, 0x0a, 0x0b, 0x73, 0x75, 0x62, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
+ 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x57, 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, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c,
+ 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x53, 0x75, 0x62, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
+ 0x65, 0x49, 0x6e, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64,
+ 0x52, 0x0a, 0x73, 0x75, 0x62, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x65, 0x0a, 0x04,
+ 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x51, 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, 0x56, 0x69, 0x73, 0x69,
+ 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x45, 0x6e, 0x75, 0x6d, 0x49, 0x6e,
+ 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x04, 0x65,
+ 0x6e, 0x75, 0x6d, 0x22, 0x39, 0x0a, 0x27, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74,
+ 0x79, 0x52, 0x75, 0x6c, 0x65, 0x53, 0x75, 0x62, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49,
+ 0x6e, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x0e,
+ 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x2a, 0x5b,
+ 0x0a, 0x21, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65,
+ 0x45, 0x6e, 0x75, 0x6d, 0x49, 0x6e, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x4d, 0x65, 0x74,
+ 0x68, 0x6f, 0x64, 0x12, 0x36, 0x0a, 0x32, 0x56, 0x49, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54,
+ 0x59, 0x5f, 0x52, 0x55, 0x4c, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x49, 0x4e, 0x5f, 0x50,
+ 0x52, 0x45, 0x56, 0x49, 0x45, 0x57, 0x5f, 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, 0x5f, 0x55, 0x4e,
+ 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x32, 0x9b, 0x07, 0x0a, 0x19,
+ 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x45, 0x63,
+ 0x68, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xbf, 0x01, 0x0a, 0x04, 0x45, 0x63,
+ 0x68, 0x6f, 0x12, 0x4b, 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, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x75,
+ 0x6c, 0x65, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a,
+ 0x4b, 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, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x53,
+ 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x1d, 0x82, 0xd3,
+ 0xe4, 0x93, 0x02, 0x17, 0x22, 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c,
+ 0x65, 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xdb, 0x01, 0x0a, 0x0c,
+ 0x45, 0x63, 0x68, 0x6f, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x12, 0x4b, 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, 0x56, 0x69,
+ 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x53, 0x69, 0x6d, 0x70,
+ 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x4b, 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, 0x56, 0x69, 0x73, 0x69, 0x62,
+ 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4d,
+ 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x31, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0a, 0x12, 0x08,
+ 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x12, 0x19,
+ 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x65, 0x63, 0x68, 0x6f,
+ 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x12, 0xe1, 0x01, 0x0a, 0x0b, 0x45, 0x63,
+ 0x68, 0x6f, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x12, 0x4b, 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, 0x56, 0x69, 0x73, 0x69, 0x62,
+ 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4d,
+ 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x54, 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, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69,
+ 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x50,
+ 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x22, 0x2f, 0xfa, 0xd2,
+ 0xe4, 0x93, 0x02, 0x09, 0x12, 0x07, 0x50, 0x52, 0x45, 0x56, 0x49, 0x45, 0x57, 0x82, 0xd3, 0xe4,
+ 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65,
+ 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x5f, 0x70, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x12, 0xf9, 0x01,
+ 0x0a, 0x16, 0x45, 0x63, 0x68, 0x6f, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x6e,
+ 0x64, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x12, 0x4b, 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, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69,
+ 0x6c, 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x65,
+ 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x4b, 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, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74,
+ 0x79, 0x52, 0x75, 0x6c, 0x65, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61,
+ 0x67, 0x65, 0x22, 0x45, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x49, 0x4e, 0x54, 0x45,
+ 0x52, 0x4e, 0x41, 0x4c, 0x2c, 0x50, 0x52, 0x45, 0x56, 0x49, 0x45, 0x57, 0x82, 0xd3, 0xe4, 0x93,
+ 0x02, 0x27, 0x12, 0x25, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f,
+ 0x65, 0x63, 0x68, 0x6f, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x6e,
+ 0x64, 0x5f, 0x70, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x32, 0x80, 0x02, 0x0a, 0x21, 0x56, 0x69,
+ 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x49, 0x6e, 0x74, 0x65,
+ 0x72, 0x6e, 0x61, 0x6c, 0x45, 0x63, 0x68, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12,
+ 0xc8, 0x01, 0x0a, 0x04, 0x45, 0x63, 0x68, 0x6f, 0x12, 0x4b, 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, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69,
+ 0x6c, 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x65,
+ 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x4b, 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, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74,
+ 0x79, 0x52, 0x75, 0x6c, 0x65, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61,
+ 0x67, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x22, 0x1e, 0x2f, 0x76, 0x31, 0x2f,
+ 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c,
+ 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x1a, 0x10, 0xfa, 0xd2, 0xe4, 0x93,
+ 0x02, 0x0a, 0x12, 0x08, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x42, 0x57, 0x5a, 0x55,
+ 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, 0x3b, 0x65, 0x78, 0x61, 0x6d,
+ 0x70, 0x6c, 0x65, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_rawDescOnce sync.Once
+ file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_rawDescData = file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_rawDesc
+)
+
+func file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_rawDescGZIP() []byte {
+ file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_rawDescOnce.Do(func() {
+ file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_rawDescData)
+ })
+ return file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_rawDescData
+}
+
+var file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
+var file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
+var file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_goTypes = []interface{}{
+ (VisibilityRuleEnumInPreviewMethod)(0), // 0: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleEnumInPreviewMethod
+ (VisibilityRuleSimpleMessage_VisibilityEnum)(0), // 1: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleSimpleMessage.VisibilityEnum
+ (*VisibilityRuleEmbedded)(nil), // 2: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleEmbedded
+ (*VisibilityRuleSimpleMessage)(nil), // 3: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleSimpleMessage
+ (*VisibilityRuleMessageInPreviewMethod)(nil), // 4: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleMessageInPreviewMethod
+ (*VisibilityRuleSubMessageInPreviewMethod)(nil), // 5: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleSubMessageInPreviewMethod
+}
+var file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_depIdxs = []int32{
+ 2, // 0: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleSimpleMessage.status:type_name -> grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleEmbedded
+ 2, // 1: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleSimpleMessage.no:type_name -> grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleEmbedded
+ 1, // 2: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleSimpleMessage.an_enum:type_name -> grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleSimpleMessage.VisibilityEnum
+ 5, // 3: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleMessageInPreviewMethod.sub_message:type_name -> grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleSubMessageInPreviewMethod
+ 0, // 4: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleMessageInPreviewMethod.enum:type_name -> grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleEnumInPreviewMethod
+ 3, // 5: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleEchoService.Echo:input_type -> grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleSimpleMessage
+ 3, // 6: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleEchoService.EchoInternal:input_type -> grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleSimpleMessage
+ 3, // 7: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleEchoService.EchoPreview:input_type -> grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleSimpleMessage
+ 3, // 8: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleEchoService.EchoInternalAndPreview:input_type -> grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleSimpleMessage
+ 3, // 9: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleInternalEchoService.Echo:input_type -> grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleSimpleMessage
+ 3, // 10: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleEchoService.Echo:output_type -> grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleSimpleMessage
+ 3, // 11: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleEchoService.EchoInternal:output_type -> grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleSimpleMessage
+ 4, // 12: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleEchoService.EchoPreview:output_type -> grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleMessageInPreviewMethod
+ 3, // 13: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleEchoService.EchoInternalAndPreview:output_type -> grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleSimpleMessage
+ 3, // 14: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleInternalEchoService.Echo:output_type -> grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleSimpleMessage
+ 10, // [10:15] is the sub-list for method output_type
+ 5, // [5:10] is the sub-list for method input_type
+ 5, // [5:5] is the sub-list for extension type_name
+ 5, // [5:5] is the sub-list for extension extendee
+ 0, // [0:5] is the sub-list for field type_name
+}
+
+func init() { file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_init() }
+func file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_init() {
+ if File_examples_internal_proto_examplepb_visibility_rule_echo_service_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*VisibilityRuleEmbedded); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*VisibilityRuleSimpleMessage); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*VisibilityRuleMessageInPreviewMethod); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*VisibilityRuleSubMessageInPreviewMethod); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_msgTypes[0].OneofWrappers = []interface{}{
+ (*VisibilityRuleEmbedded_Progress)(nil),
+ (*VisibilityRuleEmbedded_Note)(nil),
+ (*VisibilityRuleEmbedded_InternalField)(nil),
+ (*VisibilityRuleEmbedded_PreviewField)(nil),
+ }
+ file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_msgTypes[1].OneofWrappers = []interface{}{
+ (*VisibilityRuleSimpleMessage_LineNum)(nil),
+ (*VisibilityRuleSimpleMessage_Lang)(nil),
+ (*VisibilityRuleSimpleMessage_En)(nil),
+ (*VisibilityRuleSimpleMessage_No)(nil),
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_rawDesc,
+ NumEnums: 2,
+ NumMessages: 4,
+ NumExtensions: 0,
+ NumServices: 2,
+ },
+ GoTypes: file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_goTypes,
+ DependencyIndexes: file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_depIdxs,
+ EnumInfos: file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_enumTypes,
+ MessageInfos: file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_msgTypes,
+ }.Build()
+ File_examples_internal_proto_examplepb_visibility_rule_echo_service_proto = out.File
+ file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_rawDesc = nil
+ file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_goTypes = nil
+ file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_depIdxs = nil
+}
diff --git a/examples/internal/proto/examplepb/visibility_rule_echo_service.pb.gw.go b/examples/internal/proto/examplepb/visibility_rule_echo_service.pb.gw.go
new file mode 100644
index 00000000000..ab5ee42168d
--- /dev/null
+++ b/examples/internal/proto/examplepb/visibility_rule_echo_service.pb.gw.go
@@ -0,0 +1,643 @@
+// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
+// source: examples/internal/proto/examplepb/visibility_rule_echo_service.proto
+
+/*
+Package examplepb is a reverse proxy.
+
+It translates gRPC into RESTful JSON APIs.
+*/
+package examplepb
+
+import (
+ "context"
+ "io"
+ "net/http"
+
+ "github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
+ "github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
+ "google.golang.org/grpc"
+ "google.golang.org/grpc/codes"
+ "google.golang.org/grpc/grpclog"
+ "google.golang.org/grpc/metadata"
+ "google.golang.org/grpc/status"
+ "google.golang.org/protobuf/proto"
+)
+
+// Suppress "imported and not used" errors
+var _ codes.Code
+var _ io.Reader
+var _ status.Status
+var _ = runtime.String
+var _ = utilities.NewDoubleArray
+var _ = metadata.Join
+
+var (
+ filter_VisibilityRuleEchoService_Echo_0 = &utilities.DoubleArray{Encoding: map[string]int{"id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}
+)
+
+func request_VisibilityRuleEchoService_Echo_0(ctx context.Context, marshaler runtime.Marshaler, client VisibilityRuleEchoServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq VisibilityRuleSimpleMessage
+ var metadata runtime.ServerMetadata
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["id"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id")
+ }
+
+ protoReq.Id, err = runtime.String(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
+ }
+
+ if err := req.ParseForm(); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_VisibilityRuleEchoService_Echo_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := client.Echo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_VisibilityRuleEchoService_Echo_0(ctx context.Context, marshaler runtime.Marshaler, server VisibilityRuleEchoServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq VisibilityRuleSimpleMessage
+ var metadata runtime.ServerMetadata
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["id"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id")
+ }
+
+ protoReq.Id, err = runtime.String(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
+ }
+
+ if err := req.ParseForm(); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_VisibilityRuleEchoService_Echo_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := server.Echo(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
+var (
+ filter_VisibilityRuleEchoService_EchoInternal_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
+)
+
+func request_VisibilityRuleEchoService_EchoInternal_0(ctx context.Context, marshaler runtime.Marshaler, client VisibilityRuleEchoServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq VisibilityRuleSimpleMessage
+ var metadata runtime.ServerMetadata
+
+ if err := req.ParseForm(); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_VisibilityRuleEchoService_EchoInternal_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := client.EchoInternal(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_VisibilityRuleEchoService_EchoInternal_0(ctx context.Context, marshaler runtime.Marshaler, server VisibilityRuleEchoServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq VisibilityRuleSimpleMessage
+ var metadata runtime.ServerMetadata
+
+ if err := req.ParseForm(); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_VisibilityRuleEchoService_EchoInternal_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := server.EchoInternal(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
+var (
+ filter_VisibilityRuleEchoService_EchoPreview_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
+)
+
+func request_VisibilityRuleEchoService_EchoPreview_0(ctx context.Context, marshaler runtime.Marshaler, client VisibilityRuleEchoServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq VisibilityRuleSimpleMessage
+ var metadata runtime.ServerMetadata
+
+ if err := req.ParseForm(); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_VisibilityRuleEchoService_EchoPreview_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := client.EchoPreview(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_VisibilityRuleEchoService_EchoPreview_0(ctx context.Context, marshaler runtime.Marshaler, server VisibilityRuleEchoServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq VisibilityRuleSimpleMessage
+ var metadata runtime.ServerMetadata
+
+ if err := req.ParseForm(); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_VisibilityRuleEchoService_EchoPreview_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := server.EchoPreview(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
+var (
+ filter_VisibilityRuleEchoService_EchoInternalAndPreview_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
+)
+
+func request_VisibilityRuleEchoService_EchoInternalAndPreview_0(ctx context.Context, marshaler runtime.Marshaler, client VisibilityRuleEchoServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq VisibilityRuleSimpleMessage
+ var metadata runtime.ServerMetadata
+
+ if err := req.ParseForm(); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_VisibilityRuleEchoService_EchoInternalAndPreview_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := client.EchoInternalAndPreview(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_VisibilityRuleEchoService_EchoInternalAndPreview_0(ctx context.Context, marshaler runtime.Marshaler, server VisibilityRuleEchoServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq VisibilityRuleSimpleMessage
+ var metadata runtime.ServerMetadata
+
+ if err := req.ParseForm(); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_VisibilityRuleEchoService_EchoInternalAndPreview_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := server.EchoInternalAndPreview(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
+var (
+ filter_VisibilityRuleInternalEchoService_Echo_0 = &utilities.DoubleArray{Encoding: map[string]int{"id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}
+)
+
+func request_VisibilityRuleInternalEchoService_Echo_0(ctx context.Context, marshaler runtime.Marshaler, client VisibilityRuleInternalEchoServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq VisibilityRuleSimpleMessage
+ var metadata runtime.ServerMetadata
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["id"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id")
+ }
+
+ protoReq.Id, err = runtime.String(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
+ }
+
+ if err := req.ParseForm(); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_VisibilityRuleInternalEchoService_Echo_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := client.Echo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_VisibilityRuleInternalEchoService_Echo_0(ctx context.Context, marshaler runtime.Marshaler, server VisibilityRuleInternalEchoServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq VisibilityRuleSimpleMessage
+ var metadata runtime.ServerMetadata
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["id"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id")
+ }
+
+ protoReq.Id, err = runtime.String(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
+ }
+
+ if err := req.ParseForm(); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_VisibilityRuleInternalEchoService_Echo_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := server.Echo(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
+// RegisterVisibilityRuleEchoServiceHandlerServer registers the http handlers for service VisibilityRuleEchoService to "mux".
+// UnaryRPC :call VisibilityRuleEchoServiceServer directly.
+// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
+// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterVisibilityRuleEchoServiceHandlerFromEndpoint instead.
+func RegisterVisibilityRuleEchoServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server VisibilityRuleEchoServiceServer) error {
+
+ mux.Handle("POST", pattern_VisibilityRuleEchoService_Echo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleEchoService/Echo", runtime.WithHTTPPathPattern("/v1/example/echo/{id}"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_VisibilityRuleEchoService_Echo_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_VisibilityRuleEchoService_Echo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("GET", pattern_VisibilityRuleEchoService_EchoInternal_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleEchoService/EchoInternal", runtime.WithHTTPPathPattern("/v1/example/echo_internal"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_VisibilityRuleEchoService_EchoInternal_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_VisibilityRuleEchoService_EchoInternal_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("GET", pattern_VisibilityRuleEchoService_EchoPreview_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleEchoService/EchoPreview", runtime.WithHTTPPathPattern("/v1/example/echo_preview"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_VisibilityRuleEchoService_EchoPreview_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_VisibilityRuleEchoService_EchoPreview_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("GET", pattern_VisibilityRuleEchoService_EchoInternalAndPreview_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleEchoService/EchoInternalAndPreview", runtime.WithHTTPPathPattern("/v1/example/echo_internal_and_preview"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_VisibilityRuleEchoService_EchoInternalAndPreview_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_VisibilityRuleEchoService_EchoInternalAndPreview_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ return nil
+}
+
+// RegisterVisibilityRuleInternalEchoServiceHandlerServer registers the http handlers for service VisibilityRuleInternalEchoService to "mux".
+// UnaryRPC :call VisibilityRuleInternalEchoServiceServer directly.
+// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
+// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterVisibilityRuleInternalEchoServiceHandlerFromEndpoint instead.
+func RegisterVisibilityRuleInternalEchoServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server VisibilityRuleInternalEchoServiceServer) error {
+
+ mux.Handle("POST", pattern_VisibilityRuleInternalEchoService_Echo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleInternalEchoService/Echo", runtime.WithHTTPPathPattern("/v1/example/internal/echo/{id}"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_VisibilityRuleInternalEchoService_Echo_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_VisibilityRuleInternalEchoService_Echo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ return nil
+}
+
+// RegisterVisibilityRuleEchoServiceHandlerFromEndpoint is same as RegisterVisibilityRuleEchoServiceHandler but
+// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
+func RegisterVisibilityRuleEchoServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
+ conn, err := grpc.Dial(endpoint, opts...)
+ if err != nil {
+ return err
+ }
+ defer func() {
+ if err != nil {
+ if cerr := conn.Close(); cerr != nil {
+ grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
+ }
+ return
+ }
+ go func() {
+ <-ctx.Done()
+ if cerr := conn.Close(); cerr != nil {
+ grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
+ }
+ }()
+ }()
+
+ return RegisterVisibilityRuleEchoServiceHandler(ctx, mux, conn)
+}
+
+// RegisterVisibilityRuleEchoServiceHandler registers the http handlers for service VisibilityRuleEchoService to "mux".
+// The handlers forward requests to the grpc endpoint over "conn".
+func RegisterVisibilityRuleEchoServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
+ return RegisterVisibilityRuleEchoServiceHandlerClient(ctx, mux, NewVisibilityRuleEchoServiceClient(conn))
+}
+
+// RegisterVisibilityRuleEchoServiceHandlerClient registers the http handlers for service VisibilityRuleEchoService
+// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "VisibilityRuleEchoServiceClient".
+// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "VisibilityRuleEchoServiceClient"
+// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
+// "VisibilityRuleEchoServiceClient" to call the correct interceptors.
+func RegisterVisibilityRuleEchoServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client VisibilityRuleEchoServiceClient) error {
+
+ mux.Handle("POST", pattern_VisibilityRuleEchoService_Echo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleEchoService/Echo", runtime.WithHTTPPathPattern("/v1/example/echo/{id}"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_VisibilityRuleEchoService_Echo_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_VisibilityRuleEchoService_Echo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("GET", pattern_VisibilityRuleEchoService_EchoInternal_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleEchoService/EchoInternal", runtime.WithHTTPPathPattern("/v1/example/echo_internal"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_VisibilityRuleEchoService_EchoInternal_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_VisibilityRuleEchoService_EchoInternal_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("GET", pattern_VisibilityRuleEchoService_EchoPreview_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleEchoService/EchoPreview", runtime.WithHTTPPathPattern("/v1/example/echo_preview"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_VisibilityRuleEchoService_EchoPreview_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_VisibilityRuleEchoService_EchoPreview_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("GET", pattern_VisibilityRuleEchoService_EchoInternalAndPreview_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleEchoService/EchoInternalAndPreview", runtime.WithHTTPPathPattern("/v1/example/echo_internal_and_preview"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_VisibilityRuleEchoService_EchoInternalAndPreview_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_VisibilityRuleEchoService_EchoInternalAndPreview_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ return nil
+}
+
+var (
+ pattern_VisibilityRuleEchoService_Echo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v1", "example", "echo", "id"}, ""))
+
+ pattern_VisibilityRuleEchoService_EchoInternal_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "example", "echo_internal"}, ""))
+
+ pattern_VisibilityRuleEchoService_EchoPreview_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "example", "echo_preview"}, ""))
+
+ pattern_VisibilityRuleEchoService_EchoInternalAndPreview_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "example", "echo_internal_and_preview"}, ""))
+)
+
+var (
+ forward_VisibilityRuleEchoService_Echo_0 = runtime.ForwardResponseMessage
+
+ forward_VisibilityRuleEchoService_EchoInternal_0 = runtime.ForwardResponseMessage
+
+ forward_VisibilityRuleEchoService_EchoPreview_0 = runtime.ForwardResponseMessage
+
+ forward_VisibilityRuleEchoService_EchoInternalAndPreview_0 = runtime.ForwardResponseMessage
+)
+
+// RegisterVisibilityRuleInternalEchoServiceHandlerFromEndpoint is same as RegisterVisibilityRuleInternalEchoServiceHandler but
+// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
+func RegisterVisibilityRuleInternalEchoServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
+ conn, err := grpc.Dial(endpoint, opts...)
+ if err != nil {
+ return err
+ }
+ defer func() {
+ if err != nil {
+ if cerr := conn.Close(); cerr != nil {
+ grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
+ }
+ return
+ }
+ go func() {
+ <-ctx.Done()
+ if cerr := conn.Close(); cerr != nil {
+ grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
+ }
+ }()
+ }()
+
+ return RegisterVisibilityRuleInternalEchoServiceHandler(ctx, mux, conn)
+}
+
+// RegisterVisibilityRuleInternalEchoServiceHandler registers the http handlers for service VisibilityRuleInternalEchoService to "mux".
+// The handlers forward requests to the grpc endpoint over "conn".
+func RegisterVisibilityRuleInternalEchoServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
+ return RegisterVisibilityRuleInternalEchoServiceHandlerClient(ctx, mux, NewVisibilityRuleInternalEchoServiceClient(conn))
+}
+
+// RegisterVisibilityRuleInternalEchoServiceHandlerClient registers the http handlers for service VisibilityRuleInternalEchoService
+// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "VisibilityRuleInternalEchoServiceClient".
+// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "VisibilityRuleInternalEchoServiceClient"
+// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
+// "VisibilityRuleInternalEchoServiceClient" to call the correct interceptors.
+func RegisterVisibilityRuleInternalEchoServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client VisibilityRuleInternalEchoServiceClient) error {
+
+ mux.Handle("POST", pattern_VisibilityRuleInternalEchoService_Echo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleInternalEchoService/Echo", runtime.WithHTTPPathPattern("/v1/example/internal/echo/{id}"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_VisibilityRuleInternalEchoService_Echo_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_VisibilityRuleInternalEchoService_Echo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ return nil
+}
+
+var (
+ pattern_VisibilityRuleInternalEchoService_Echo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"v1", "example", "internal", "echo", "id"}, ""))
+)
+
+var (
+ forward_VisibilityRuleInternalEchoService_Echo_0 = runtime.ForwardResponseMessage
+)
diff --git a/examples/internal/proto/examplepb/visibility_rule_echo_service.proto b/examples/internal/proto/examplepb/visibility_rule_echo_service.proto
new file mode 100644
index 00000000000..06fb642d952
--- /dev/null
+++ b/examples/internal/proto/examplepb/visibility_rule_echo_service.proto
@@ -0,0 +1,129 @@
+syntax = "proto3";
+
+// Visibility Rule Echo Service
+// Similar to echo_service.proto but with annotations to change visibility
+// of services, methods, fields and enum values.
+//
+// `google.api.VisibilityRule` annotations are added to customize where they are generated.
+// Combined with the option `visibility_restriction_selectors` overlapping rules will appear in the OpenAPI output.
+// Elements without `google.api.VisibilityRule` annotations will appear as usual in the generated output.
+//
+// These restrictions and selectors are completely arbitrary and you can define whatever values or hierarchies you want.
+// In this example `INTERNAL`, `PREVIEW` are used, but `INTERNAL`, `ALPHA`, `BETA`, `RELEASED`, or anything else could be used if you wish.
+package grpc.gateway.examples.internal.proto.examplepb;
+
+import "google/api/annotations.proto";
+import "google/api/visibility.proto";
+
+option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/examplepb;examplepb";
+
+// Embedded represents a message embedded in SimpleMessage.
+message VisibilityRuleEmbedded {
+ oneof mark {
+ int64 progress = 1;
+ string note = 2;
+ string internal_field = 3 [(google.api.field_visibility).restriction = "INTERNAL"];
+ string preview_field = 4 [(google.api.field_visibility).restriction = "INTERNAL,PREVIEW"];
+ }
+}
+
+// SimpleMessage represents a simple message sent to the Echo service.
+message VisibilityRuleSimpleMessage {
+ enum VisibilityEnum {
+ VISIBILITY_ENUM_UNSPECIFIED = 0;
+ VISIBILITY_ENUM_VISIBLE = 1;
+ VISIBILITY_ENUM_INTERNAL = 2 [(google.api.value_visibility).restriction = "INTERNAL"];
+ VISIBILITY_ENUM_PREVIEW = 3 [(google.api.value_visibility).restriction = "INTERNAL,PREVIEW"];
+ }
+
+ // Id represents the message identifier.
+ string id = 1;
+ int64 num = 2;
+ oneof code {
+ int64 line_num = 3;
+ string lang = 4;
+ }
+ VisibilityRuleEmbedded status = 5;
+ oneof ext {
+ int64 en = 6;
+ VisibilityRuleEmbedded no = 7;
+ }
+ string internal_field = 8 [(google.api.field_visibility).restriction = "INTERNAL"];
+ string preview_field = 9 [(google.api.field_visibility).restriction = "INTERNAL,PREVIEW"];
+ VisibilityEnum an_enum = 10;
+}
+
+// MessageInPreviewMethod doesn't define its own visibility restrictions,
+// but is only included in a method marked as "PREVIEW", so it will only
+// appear if `visibility_restriction_selectors` include "PREVIEW".
+message VisibilityRuleMessageInPreviewMethod {
+ string id = 1;
+ VisibilityRuleSubMessageInPreviewMethod sub_message = 2;
+ VisibilityRuleEnumInPreviewMethod enum = 3;
+}
+
+// SubMessageInPreviewMethod doesn't define its own visibility restrictions,
+// but is only included in a method marked as "PREVIEW", so it will only
+// appear if `visibility_restriction_selectors` include "PREVIEW".
+message VisibilityRuleSubMessageInPreviewMethod {
+ string id = 1;
+}
+
+// EnumInPreviewMethod doesn't define its own visibility restrictions,
+// but is only included in a method marked as "PREVIEW", so it will only
+// appear if `visibility_restriction_selectors` include "PREVIEW".
+enum VisibilityRuleEnumInPreviewMethod {
+ VISIBILITY_RULE_ENUM_IN_PREVIEW_METHOD_UNSPECIFIED = 0;
+}
+
+// VisibilityRuleEchoService service responds to incoming echo requests.
+// Different services will be available in the swagger documentation depending
+// based on `google.api.VisibilityRule`s and the set `visibility_restriction_selectors`
+// flag when calling protoc-gen-openapiv2.
+service VisibilityRuleEchoService {
+ // Echo method receives a simple message and returns it.
+ // It should always be visible in the open API output.
+ rpc Echo(VisibilityRuleSimpleMessage) returns (VisibilityRuleSimpleMessage) {
+ option (google.api.http) = {
+ post: "/v1/example/echo/{id}"
+ };
+ }
+ // EchoInternal is an internal API that should only be visible in the OpenAPI spec
+ // if `visibility_restriction_selectors` includes "INTERNAL".
+ rpc EchoInternal(VisibilityRuleSimpleMessage) returns (VisibilityRuleSimpleMessage) {
+ option (google.api.method_visibility).restriction = "INTERNAL";
+ option (google.api.http) = {
+ get: "/v1/example/echo_internal"
+ };
+ }
+ // EchoPreview is a preview API that should only be visible in the OpenAPI spec
+ // if `visibility_restriction_selectors` includes "PREVIEW".
+ rpc EchoPreview(VisibilityRuleSimpleMessage) returns (VisibilityRuleMessageInPreviewMethod) {
+ option (google.api.method_visibility).restriction = "PREVIEW";
+ option (google.api.http) = {
+ get: "/v1/example/echo_preview"
+ };
+ }
+ // EchoInternalAndPreview is a internal and preview API that should only be visible in the OpenAPI spec
+ // if `visibility_restriction_selectors` includes "PREVIEW" or "INTERNAL".
+ rpc EchoInternalAndPreview(VisibilityRuleSimpleMessage) returns (VisibilityRuleSimpleMessage) {
+ option (google.api.method_visibility).restriction = "INTERNAL,PREVIEW";
+ option (google.api.http) = {
+ get: "/v1/example/echo_internal_and_preview"
+ };
+ }
+}
+
+// VisibilityRuleInternalEchoService service responds to incoming echo requests.
+// It should only be visible in the OpenAPI spec if `visibility_restriction_selectors` includes "INTERNAL".
+service VisibilityRuleInternalEchoService {
+ option (google.api.api_visibility).restriction = "INTERNAL";
+
+ // Echo method receives a simple message and returns it.
+ // It should not be visible in the open API output.
+ rpc Echo(VisibilityRuleSimpleMessage) returns (VisibilityRuleSimpleMessage) {
+ option (google.api.http) = {
+ post: "/v1/example/internal/echo/{id}"
+ };
+ }
+}
diff --git a/examples/internal/proto/examplepb/visibility_rule_echo_service_grpc.pb.go b/examples/internal/proto/examplepb/visibility_rule_echo_service_grpc.pb.go
new file mode 100644
index 00000000000..09d89c532e3
--- /dev/null
+++ b/examples/internal/proto/examplepb/visibility_rule_echo_service_grpc.pb.go
@@ -0,0 +1,311 @@
+// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
+
+package examplepb
+
+import (
+ context "context"
+ grpc "google.golang.org/grpc"
+ codes "google.golang.org/grpc/codes"
+ status "google.golang.org/grpc/status"
+)
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the grpc package it is being compiled against.
+// Requires gRPC-Go v1.32.0 or later.
+const _ = grpc.SupportPackageIsVersion7
+
+// VisibilityRuleEchoServiceClient is the client API for VisibilityRuleEchoService service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
+type VisibilityRuleEchoServiceClient interface {
+ // Echo method receives a simple message and returns it.
+ // It should always be visible in the open API output.
+ Echo(ctx context.Context, in *VisibilityRuleSimpleMessage, opts ...grpc.CallOption) (*VisibilityRuleSimpleMessage, error)
+ // EchoInternal is an internal API that should only be visible in the OpenAPI spec
+ // if `visibility_restriction_selectors` includes "INTERNAL".
+ EchoInternal(ctx context.Context, in *VisibilityRuleSimpleMessage, opts ...grpc.CallOption) (*VisibilityRuleSimpleMessage, error)
+ // EchoPreview is a preview API that should only be visible in the OpenAPI spec
+ // if `visibility_restriction_selectors` includes "PREVIEW".
+ EchoPreview(ctx context.Context, in *VisibilityRuleSimpleMessage, opts ...grpc.CallOption) (*VisibilityRuleMessageInPreviewMethod, error)
+ // EchoInternalAndPreview is a internal and preview API that should only be visible in the OpenAPI spec
+ // if `visibility_restriction_selectors` includes "PREVIEW" or "INTERNAL".
+ EchoInternalAndPreview(ctx context.Context, in *VisibilityRuleSimpleMessage, opts ...grpc.CallOption) (*VisibilityRuleSimpleMessage, error)
+}
+
+type visibilityRuleEchoServiceClient struct {
+ cc grpc.ClientConnInterface
+}
+
+func NewVisibilityRuleEchoServiceClient(cc grpc.ClientConnInterface) VisibilityRuleEchoServiceClient {
+ return &visibilityRuleEchoServiceClient{cc}
+}
+
+func (c *visibilityRuleEchoServiceClient) Echo(ctx context.Context, in *VisibilityRuleSimpleMessage, opts ...grpc.CallOption) (*VisibilityRuleSimpleMessage, error) {
+ out := new(VisibilityRuleSimpleMessage)
+ err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleEchoService/Echo", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *visibilityRuleEchoServiceClient) EchoInternal(ctx context.Context, in *VisibilityRuleSimpleMessage, opts ...grpc.CallOption) (*VisibilityRuleSimpleMessage, error) {
+ out := new(VisibilityRuleSimpleMessage)
+ err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleEchoService/EchoInternal", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *visibilityRuleEchoServiceClient) EchoPreview(ctx context.Context, in *VisibilityRuleSimpleMessage, opts ...grpc.CallOption) (*VisibilityRuleMessageInPreviewMethod, error) {
+ out := new(VisibilityRuleMessageInPreviewMethod)
+ err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleEchoService/EchoPreview", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *visibilityRuleEchoServiceClient) EchoInternalAndPreview(ctx context.Context, in *VisibilityRuleSimpleMessage, opts ...grpc.CallOption) (*VisibilityRuleSimpleMessage, error) {
+ out := new(VisibilityRuleSimpleMessage)
+ err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleEchoService/EchoInternalAndPreview", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+// VisibilityRuleEchoServiceServer is the server API for VisibilityRuleEchoService service.
+// All implementations should embed UnimplementedVisibilityRuleEchoServiceServer
+// for forward compatibility
+type VisibilityRuleEchoServiceServer interface {
+ // Echo method receives a simple message and returns it.
+ // It should always be visible in the open API output.
+ Echo(context.Context, *VisibilityRuleSimpleMessage) (*VisibilityRuleSimpleMessage, error)
+ // EchoInternal is an internal API that should only be visible in the OpenAPI spec
+ // if `visibility_restriction_selectors` includes "INTERNAL".
+ EchoInternal(context.Context, *VisibilityRuleSimpleMessage) (*VisibilityRuleSimpleMessage, error)
+ // EchoPreview is a preview API that should only be visible in the OpenAPI spec
+ // if `visibility_restriction_selectors` includes "PREVIEW".
+ EchoPreview(context.Context, *VisibilityRuleSimpleMessage) (*VisibilityRuleMessageInPreviewMethod, error)
+ // EchoInternalAndPreview is a internal and preview API that should only be visible in the OpenAPI spec
+ // if `visibility_restriction_selectors` includes "PREVIEW" or "INTERNAL".
+ EchoInternalAndPreview(context.Context, *VisibilityRuleSimpleMessage) (*VisibilityRuleSimpleMessage, error)
+}
+
+// UnimplementedVisibilityRuleEchoServiceServer should be embedded to have forward compatible implementations.
+type UnimplementedVisibilityRuleEchoServiceServer struct {
+}
+
+func (UnimplementedVisibilityRuleEchoServiceServer) Echo(context.Context, *VisibilityRuleSimpleMessage) (*VisibilityRuleSimpleMessage, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method Echo not implemented")
+}
+func (UnimplementedVisibilityRuleEchoServiceServer) EchoInternal(context.Context, *VisibilityRuleSimpleMessage) (*VisibilityRuleSimpleMessage, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method EchoInternal not implemented")
+}
+func (UnimplementedVisibilityRuleEchoServiceServer) EchoPreview(context.Context, *VisibilityRuleSimpleMessage) (*VisibilityRuleMessageInPreviewMethod, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method EchoPreview not implemented")
+}
+func (UnimplementedVisibilityRuleEchoServiceServer) EchoInternalAndPreview(context.Context, *VisibilityRuleSimpleMessage) (*VisibilityRuleSimpleMessage, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method EchoInternalAndPreview not implemented")
+}
+
+// UnsafeVisibilityRuleEchoServiceServer may be embedded to opt out of forward compatibility for this service.
+// Use of this interface is not recommended, as added methods to VisibilityRuleEchoServiceServer will
+// result in compilation errors.
+type UnsafeVisibilityRuleEchoServiceServer interface {
+ mustEmbedUnimplementedVisibilityRuleEchoServiceServer()
+}
+
+func RegisterVisibilityRuleEchoServiceServer(s grpc.ServiceRegistrar, srv VisibilityRuleEchoServiceServer) {
+ s.RegisterService(&VisibilityRuleEchoService_ServiceDesc, srv)
+}
+
+func _VisibilityRuleEchoService_Echo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(VisibilityRuleSimpleMessage)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(VisibilityRuleEchoServiceServer).Echo(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleEchoService/Echo",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(VisibilityRuleEchoServiceServer).Echo(ctx, req.(*VisibilityRuleSimpleMessage))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _VisibilityRuleEchoService_EchoInternal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(VisibilityRuleSimpleMessage)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(VisibilityRuleEchoServiceServer).EchoInternal(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleEchoService/EchoInternal",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(VisibilityRuleEchoServiceServer).EchoInternal(ctx, req.(*VisibilityRuleSimpleMessage))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _VisibilityRuleEchoService_EchoPreview_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(VisibilityRuleSimpleMessage)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(VisibilityRuleEchoServiceServer).EchoPreview(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleEchoService/EchoPreview",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(VisibilityRuleEchoServiceServer).EchoPreview(ctx, req.(*VisibilityRuleSimpleMessage))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _VisibilityRuleEchoService_EchoInternalAndPreview_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(VisibilityRuleSimpleMessage)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(VisibilityRuleEchoServiceServer).EchoInternalAndPreview(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleEchoService/EchoInternalAndPreview",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(VisibilityRuleEchoServiceServer).EchoInternalAndPreview(ctx, req.(*VisibilityRuleSimpleMessage))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+// VisibilityRuleEchoService_ServiceDesc is the grpc.ServiceDesc for VisibilityRuleEchoService service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var VisibilityRuleEchoService_ServiceDesc = grpc.ServiceDesc{
+ ServiceName: "grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleEchoService",
+ HandlerType: (*VisibilityRuleEchoServiceServer)(nil),
+ Methods: []grpc.MethodDesc{
+ {
+ MethodName: "Echo",
+ Handler: _VisibilityRuleEchoService_Echo_Handler,
+ },
+ {
+ MethodName: "EchoInternal",
+ Handler: _VisibilityRuleEchoService_EchoInternal_Handler,
+ },
+ {
+ MethodName: "EchoPreview",
+ Handler: _VisibilityRuleEchoService_EchoPreview_Handler,
+ },
+ {
+ MethodName: "EchoInternalAndPreview",
+ Handler: _VisibilityRuleEchoService_EchoInternalAndPreview_Handler,
+ },
+ },
+ Streams: []grpc.StreamDesc{},
+ Metadata: "examples/internal/proto/examplepb/visibility_rule_echo_service.proto",
+}
+
+// VisibilityRuleInternalEchoServiceClient is the client API for VisibilityRuleInternalEchoService service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
+type VisibilityRuleInternalEchoServiceClient interface {
+ // Echo method receives a simple message and returns it.
+ // It should not be visible in the open API output.
+ Echo(ctx context.Context, in *VisibilityRuleSimpleMessage, opts ...grpc.CallOption) (*VisibilityRuleSimpleMessage, error)
+}
+
+type visibilityRuleInternalEchoServiceClient struct {
+ cc grpc.ClientConnInterface
+}
+
+func NewVisibilityRuleInternalEchoServiceClient(cc grpc.ClientConnInterface) VisibilityRuleInternalEchoServiceClient {
+ return &visibilityRuleInternalEchoServiceClient{cc}
+}
+
+func (c *visibilityRuleInternalEchoServiceClient) Echo(ctx context.Context, in *VisibilityRuleSimpleMessage, opts ...grpc.CallOption) (*VisibilityRuleSimpleMessage, error) {
+ out := new(VisibilityRuleSimpleMessage)
+ err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleInternalEchoService/Echo", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+// VisibilityRuleInternalEchoServiceServer is the server API for VisibilityRuleInternalEchoService service.
+// All implementations should embed UnimplementedVisibilityRuleInternalEchoServiceServer
+// for forward compatibility
+type VisibilityRuleInternalEchoServiceServer interface {
+ // Echo method receives a simple message and returns it.
+ // It should not be visible in the open API output.
+ Echo(context.Context, *VisibilityRuleSimpleMessage) (*VisibilityRuleSimpleMessage, error)
+}
+
+// UnimplementedVisibilityRuleInternalEchoServiceServer should be embedded to have forward compatible implementations.
+type UnimplementedVisibilityRuleInternalEchoServiceServer struct {
+}
+
+func (UnimplementedVisibilityRuleInternalEchoServiceServer) Echo(context.Context, *VisibilityRuleSimpleMessage) (*VisibilityRuleSimpleMessage, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method Echo not implemented")
+}
+
+// UnsafeVisibilityRuleInternalEchoServiceServer may be embedded to opt out of forward compatibility for this service.
+// Use of this interface is not recommended, as added methods to VisibilityRuleInternalEchoServiceServer will
+// result in compilation errors.
+type UnsafeVisibilityRuleInternalEchoServiceServer interface {
+ mustEmbedUnimplementedVisibilityRuleInternalEchoServiceServer()
+}
+
+func RegisterVisibilityRuleInternalEchoServiceServer(s grpc.ServiceRegistrar, srv VisibilityRuleInternalEchoServiceServer) {
+ s.RegisterService(&VisibilityRuleInternalEchoService_ServiceDesc, srv)
+}
+
+func _VisibilityRuleInternalEchoService_Echo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(VisibilityRuleSimpleMessage)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(VisibilityRuleInternalEchoServiceServer).Echo(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleInternalEchoService/Echo",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(VisibilityRuleInternalEchoServiceServer).Echo(ctx, req.(*VisibilityRuleSimpleMessage))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+// VisibilityRuleInternalEchoService_ServiceDesc is the grpc.ServiceDesc for VisibilityRuleInternalEchoService service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var VisibilityRuleInternalEchoService_ServiceDesc = grpc.ServiceDesc{
+ ServiceName: "grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleInternalEchoService",
+ HandlerType: (*VisibilityRuleInternalEchoServiceServer)(nil),
+ Methods: []grpc.MethodDesc{
+ {
+ MethodName: "Echo",
+ Handler: _VisibilityRuleInternalEchoService_Echo_Handler,
+ },
+ },
+ Streams: []grpc.StreamDesc{},
+ Metadata: "examples/internal/proto/examplepb/visibility_rule_echo_service.proto",
+}
diff --git a/examples/internal/proto/examplepb/visibility_rule_internal_echo_service.buf.gen.yaml b/examples/internal/proto/examplepb/visibility_rule_internal_echo_service.buf.gen.yaml
new file mode 100644
index 00000000000..e1209e80deb
--- /dev/null
+++ b/examples/internal/proto/examplepb/visibility_rule_internal_echo_service.buf.gen.yaml
@@ -0,0 +1,6 @@
+version: v1
+plugins:
+ - name: openapiv2
+ out: .
+ opt:
+ - visibility_restriction_selectors=INTERNAL
diff --git a/examples/internal/proto/examplepb/visibility_rule_internal_echo_service.swagger.json b/examples/internal/proto/examplepb/visibility_rule_internal_echo_service.swagger.json
new file mode 100644
index 00000000000..43ca6cd1393
--- /dev/null
+++ b/examples/internal/proto/examplepb/visibility_rule_internal_echo_service.swagger.json
@@ -0,0 +1,658 @@
+{
+ "swagger": "2.0",
+ "info": {
+ "title": "examples/internal/proto/examplepb/visibility_rule_echo_service.proto",
+ "description": "Visibility Rule Echo Service\nSimilar to echo_service.proto but with annotations to change visibility\nof services, methods, fields and enum values.\n\n`google.api.VisibilityRule` annotations are added to customize where they are generated.\nCombined with the option `visibility_restriction_selectors` overlapping rules will appear in the OpenAPI output.\nElements without `google.api.VisibilityRule` annotations will appear as usual in the generated output.\n\nThese restrictions and selectors are completely arbitrary and you can define whatever values or hierarchies you want.\nIn this example `INTERNAL`, `PREVIEW` are used, but `INTERNAL`, `ALPHA`, `BETA`, `RELEASED`, or anything else could be used if you wish.",
+ "version": "version not set"
+ },
+ "tags": [
+ {
+ "name": "VisibilityRuleEchoService"
+ },
+ {
+ "name": "VisibilityRuleInternalEchoService"
+ }
+ ],
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "paths": {
+ "/v1/example/echo/{id}": {
+ "post": {
+ "summary": "Echo method receives a simple message and returns it.\nIt should always be visible in the open API output.",
+ "operationId": "VisibilityRuleEchoService_Echo",
+ "responses": {
+ "200": {
+ "description": "A successful response.",
+ "schema": {
+ "$ref": "#/definitions/examplepbVisibilityRuleSimpleMessage"
+ }
+ },
+ "default": {
+ "description": "An unexpected error response.",
+ "schema": {
+ "$ref": "#/definitions/rpcStatus"
+ }
+ }
+ },
+ "parameters": [
+ {
+ "name": "id",
+ "description": "Id represents the message identifier.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "num",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "lineNum",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "lang",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "status.progress",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "status.note",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "status.internalField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "status.previewField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "en",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "no.progress",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "no.note",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "no.internalField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "no.previewField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "internalField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "previewField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "anEnum",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "enum": [
+ "VISIBILITY_ENUM_UNSPECIFIED",
+ "VISIBILITY_ENUM_VISIBLE",
+ "VISIBILITY_ENUM_INTERNAL",
+ "VISIBILITY_ENUM_PREVIEW"
+ ],
+ "default": "VISIBILITY_ENUM_UNSPECIFIED"
+ }
+ ],
+ "tags": [
+ "VisibilityRuleEchoService"
+ ]
+ }
+ },
+ "/v1/example/echo_internal": {
+ "get": {
+ "summary": "EchoInternal is an internal API that should only be visible in the OpenAPI spec\nif `visibility_restriction_selectors` includes \"INTERNAL\".",
+ "operationId": "VisibilityRuleEchoService_EchoInternal",
+ "responses": {
+ "200": {
+ "description": "A successful response.",
+ "schema": {
+ "$ref": "#/definitions/examplepbVisibilityRuleSimpleMessage"
+ }
+ },
+ "default": {
+ "description": "An unexpected error response.",
+ "schema": {
+ "$ref": "#/definitions/rpcStatus"
+ }
+ }
+ },
+ "parameters": [
+ {
+ "name": "id",
+ "description": "Id represents the message identifier.",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "num",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "lineNum",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "lang",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "status.progress",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "status.note",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "status.internalField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "status.previewField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "en",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "no.progress",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "no.note",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "no.internalField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "no.previewField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "internalField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "previewField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "anEnum",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "enum": [
+ "VISIBILITY_ENUM_UNSPECIFIED",
+ "VISIBILITY_ENUM_VISIBLE",
+ "VISIBILITY_ENUM_INTERNAL",
+ "VISIBILITY_ENUM_PREVIEW"
+ ],
+ "default": "VISIBILITY_ENUM_UNSPECIFIED"
+ }
+ ],
+ "tags": [
+ "VisibilityRuleEchoService"
+ ]
+ }
+ },
+ "/v1/example/echo_internal_and_preview": {
+ "get": {
+ "summary": "EchoInternalAndPreview is a internal and preview API that should only be visible in the OpenAPI spec\nif `visibility_restriction_selectors` includes \"PREVIEW\" or \"INTERNAL\".",
+ "operationId": "VisibilityRuleEchoService_EchoInternalAndPreview",
+ "responses": {
+ "200": {
+ "description": "A successful response.",
+ "schema": {
+ "$ref": "#/definitions/examplepbVisibilityRuleSimpleMessage"
+ }
+ },
+ "default": {
+ "description": "An unexpected error response.",
+ "schema": {
+ "$ref": "#/definitions/rpcStatus"
+ }
+ }
+ },
+ "parameters": [
+ {
+ "name": "id",
+ "description": "Id represents the message identifier.",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "num",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "lineNum",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "lang",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "status.progress",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "status.note",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "status.internalField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "status.previewField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "en",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "no.progress",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "no.note",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "no.internalField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "no.previewField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "internalField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "previewField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "anEnum",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "enum": [
+ "VISIBILITY_ENUM_UNSPECIFIED",
+ "VISIBILITY_ENUM_VISIBLE",
+ "VISIBILITY_ENUM_INTERNAL",
+ "VISIBILITY_ENUM_PREVIEW"
+ ],
+ "default": "VISIBILITY_ENUM_UNSPECIFIED"
+ }
+ ],
+ "tags": [
+ "VisibilityRuleEchoService"
+ ]
+ }
+ },
+ "/v1/example/internal/echo/{id}": {
+ "post": {
+ "summary": "Echo method receives a simple message and returns it.\nIt should not be visible in the open API output.",
+ "operationId": "VisibilityRuleInternalEchoService_Echo",
+ "responses": {
+ "200": {
+ "description": "A successful response.",
+ "schema": {
+ "$ref": "#/definitions/examplepbVisibilityRuleSimpleMessage"
+ }
+ },
+ "default": {
+ "description": "An unexpected error response.",
+ "schema": {
+ "$ref": "#/definitions/rpcStatus"
+ }
+ }
+ },
+ "parameters": [
+ {
+ "name": "id",
+ "description": "Id represents the message identifier.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "num",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "lineNum",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "lang",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "status.progress",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "status.note",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "status.internalField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "status.previewField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "en",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "no.progress",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "no.note",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "no.internalField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "no.previewField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "internalField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "previewField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "anEnum",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "enum": [
+ "VISIBILITY_ENUM_UNSPECIFIED",
+ "VISIBILITY_ENUM_VISIBLE",
+ "VISIBILITY_ENUM_INTERNAL",
+ "VISIBILITY_ENUM_PREVIEW"
+ ],
+ "default": "VISIBILITY_ENUM_UNSPECIFIED"
+ }
+ ],
+ "tags": [
+ "VisibilityRuleInternalEchoService"
+ ]
+ }
+ }
+ },
+ "definitions": {
+ "VisibilityRuleSimpleMessageVisibilityEnum": {
+ "type": "string",
+ "enum": [
+ "VISIBILITY_ENUM_UNSPECIFIED",
+ "VISIBILITY_ENUM_VISIBLE",
+ "VISIBILITY_ENUM_INTERNAL",
+ "VISIBILITY_ENUM_PREVIEW"
+ ],
+ "default": "VISIBILITY_ENUM_UNSPECIFIED"
+ },
+ "examplepbVisibilityRuleEmbedded": {
+ "type": "object",
+ "properties": {
+ "progress": {
+ "type": "string",
+ "format": "int64"
+ },
+ "note": {
+ "type": "string"
+ },
+ "internalField": {
+ "type": "string"
+ },
+ "previewField": {
+ "type": "string"
+ }
+ },
+ "description": "Embedded represents a message embedded in SimpleMessage."
+ },
+ "examplepbVisibilityRuleSimpleMessage": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Id represents the message identifier."
+ },
+ "num": {
+ "type": "string",
+ "format": "int64"
+ },
+ "lineNum": {
+ "type": "string",
+ "format": "int64"
+ },
+ "lang": {
+ "type": "string"
+ },
+ "status": {
+ "$ref": "#/definitions/examplepbVisibilityRuleEmbedded"
+ },
+ "en": {
+ "type": "string",
+ "format": "int64"
+ },
+ "no": {
+ "$ref": "#/definitions/examplepbVisibilityRuleEmbedded"
+ },
+ "internalField": {
+ "type": "string"
+ },
+ "previewField": {
+ "type": "string"
+ },
+ "anEnum": {
+ "$ref": "#/definitions/VisibilityRuleSimpleMessageVisibilityEnum"
+ }
+ },
+ "description": "SimpleMessage represents a simple message sent to the Echo service."
+ },
+ "protobufAny": {
+ "type": "object",
+ "properties": {
+ "@type": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": {}
+ },
+ "rpcStatus": {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "message": {
+ "type": "string"
+ },
+ "details": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/protobufAny"
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/examples/internal/proto/examplepb/visibility_rule_none_echo_service.buf.gen.yaml b/examples/internal/proto/examplepb/visibility_rule_none_echo_service.buf.gen.yaml
new file mode 100644
index 00000000000..23bf378362b
--- /dev/null
+++ b/examples/internal/proto/examplepb/visibility_rule_none_echo_service.buf.gen.yaml
@@ -0,0 +1,4 @@
+version: v1
+plugins:
+ - name: openapiv2
+ out: .
diff --git a/examples/internal/proto/examplepb/visibility_rule_none_echo_service.swagger.json b/examples/internal/proto/examplepb/visibility_rule_none_echo_service.swagger.json
new file mode 100644
index 00000000000..163de829ba7
--- /dev/null
+++ b/examples/internal/proto/examplepb/visibility_rule_none_echo_service.swagger.json
@@ -0,0 +1,201 @@
+{
+ "swagger": "2.0",
+ "info": {
+ "title": "examples/internal/proto/examplepb/visibility_rule_echo_service.proto",
+ "description": "Visibility Rule Echo Service\nSimilar to echo_service.proto but with annotations to change visibility\nof services, methods, fields and enum values.\n\n`google.api.VisibilityRule` annotations are added to customize where they are generated.\nCombined with the option `visibility_restriction_selectors` overlapping rules will appear in the OpenAPI output.\nElements without `google.api.VisibilityRule` annotations will appear as usual in the generated output.\n\nThese restrictions and selectors are completely arbitrary and you can define whatever values or hierarchies you want.\nIn this example `INTERNAL`, `PREVIEW` are used, but `INTERNAL`, `ALPHA`, `BETA`, `RELEASED`, or anything else could be used if you wish.",
+ "version": "version not set"
+ },
+ "tags": [
+ {
+ "name": "VisibilityRuleEchoService"
+ }
+ ],
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "paths": {
+ "/v1/example/echo/{id}": {
+ "post": {
+ "summary": "Echo method receives a simple message and returns it.\nIt should always be visible in the open API output.",
+ "operationId": "VisibilityRuleEchoService_Echo",
+ "responses": {
+ "200": {
+ "description": "A successful response.",
+ "schema": {
+ "$ref": "#/definitions/examplepbVisibilityRuleSimpleMessage"
+ }
+ },
+ "default": {
+ "description": "An unexpected error response.",
+ "schema": {
+ "$ref": "#/definitions/rpcStatus"
+ }
+ }
+ },
+ "parameters": [
+ {
+ "name": "id",
+ "description": "Id represents the message identifier.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "num",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "lineNum",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "lang",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "status.progress",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "status.note",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "en",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "no.progress",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "no.note",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "anEnum",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "enum": [
+ "VISIBILITY_ENUM_UNSPECIFIED",
+ "VISIBILITY_ENUM_VISIBLE"
+ ],
+ "default": "VISIBILITY_ENUM_UNSPECIFIED"
+ }
+ ],
+ "tags": [
+ "VisibilityRuleEchoService"
+ ]
+ }
+ }
+ },
+ "definitions": {
+ "VisibilityRuleSimpleMessageVisibilityEnum": {
+ "type": "string",
+ "enum": [
+ "VISIBILITY_ENUM_UNSPECIFIED",
+ "VISIBILITY_ENUM_VISIBLE"
+ ],
+ "default": "VISIBILITY_ENUM_UNSPECIFIED"
+ },
+ "examplepbVisibilityRuleEmbedded": {
+ "type": "object",
+ "properties": {
+ "progress": {
+ "type": "string",
+ "format": "int64"
+ },
+ "note": {
+ "type": "string"
+ }
+ },
+ "description": "Embedded represents a message embedded in SimpleMessage."
+ },
+ "examplepbVisibilityRuleSimpleMessage": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Id represents the message identifier."
+ },
+ "num": {
+ "type": "string",
+ "format": "int64"
+ },
+ "lineNum": {
+ "type": "string",
+ "format": "int64"
+ },
+ "lang": {
+ "type": "string"
+ },
+ "status": {
+ "$ref": "#/definitions/examplepbVisibilityRuleEmbedded"
+ },
+ "en": {
+ "type": "string",
+ "format": "int64"
+ },
+ "no": {
+ "$ref": "#/definitions/examplepbVisibilityRuleEmbedded"
+ },
+ "anEnum": {
+ "$ref": "#/definitions/VisibilityRuleSimpleMessageVisibilityEnum"
+ }
+ },
+ "description": "SimpleMessage represents a simple message sent to the Echo service."
+ },
+ "protobufAny": {
+ "type": "object",
+ "properties": {
+ "@type": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": {}
+ },
+ "rpcStatus": {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "message": {
+ "type": "string"
+ },
+ "details": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/protobufAny"
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/examples/internal/proto/examplepb/visibility_rule_preview_and_internal_echo_service.buf.gen.yaml b/examples/internal/proto/examplepb/visibility_rule_preview_and_internal_echo_service.buf.gen.yaml
new file mode 100644
index 00000000000..0a2a741b972
--- /dev/null
+++ b/examples/internal/proto/examplepb/visibility_rule_preview_and_internal_echo_service.buf.gen.yaml
@@ -0,0 +1,7 @@
+version: v1
+plugins:
+ - name: openapiv2
+ out: .
+ opt:
+ - visibility_restriction_selectors=PREVIEW
+ - visibility_restriction_selectors=INTERNAL
diff --git a/examples/internal/proto/examplepb/visibility_rule_preview_and_internal_echo_service.swagger.json b/examples/internal/proto/examplepb/visibility_rule_preview_and_internal_echo_service.swagger.json
new file mode 100644
index 00000000000..adac8e77ee8
--- /dev/null
+++ b/examples/internal/proto/examplepb/visibility_rule_preview_and_internal_echo_service.swagger.json
@@ -0,0 +1,824 @@
+{
+ "swagger": "2.0",
+ "info": {
+ "title": "examples/internal/proto/examplepb/visibility_rule_echo_service.proto",
+ "description": "Visibility Rule Echo Service\nSimilar to echo_service.proto but with annotations to change visibility\nof services, methods, fields and enum values.\n\n`google.api.VisibilityRule` annotations are added to customize where they are generated.\nCombined with the option `visibility_restriction_selectors` overlapping rules will appear in the OpenAPI output.\nElements without `google.api.VisibilityRule` annotations will appear as usual in the generated output.\n\nThese restrictions and selectors are completely arbitrary and you can define whatever values or hierarchies you want.\nIn this example `INTERNAL`, `PREVIEW` are used, but `INTERNAL`, `ALPHA`, `BETA`, `RELEASED`, or anything else could be used if you wish.",
+ "version": "version not set"
+ },
+ "tags": [
+ {
+ "name": "VisibilityRuleEchoService"
+ },
+ {
+ "name": "VisibilityRuleInternalEchoService"
+ }
+ ],
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "paths": {
+ "/v1/example/echo/{id}": {
+ "post": {
+ "summary": "Echo method receives a simple message and returns it.\nIt should always be visible in the open API output.",
+ "operationId": "VisibilityRuleEchoService_Echo",
+ "responses": {
+ "200": {
+ "description": "A successful response.",
+ "schema": {
+ "$ref": "#/definitions/examplepbVisibilityRuleSimpleMessage"
+ }
+ },
+ "default": {
+ "description": "An unexpected error response.",
+ "schema": {
+ "$ref": "#/definitions/rpcStatus"
+ }
+ }
+ },
+ "parameters": [
+ {
+ "name": "id",
+ "description": "Id represents the message identifier.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "num",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "lineNum",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "lang",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "status.progress",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "status.note",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "status.internalField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "status.previewField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "en",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "no.progress",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "no.note",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "no.internalField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "no.previewField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "internalField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "previewField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "anEnum",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "enum": [
+ "VISIBILITY_ENUM_UNSPECIFIED",
+ "VISIBILITY_ENUM_VISIBLE",
+ "VISIBILITY_ENUM_INTERNAL",
+ "VISIBILITY_ENUM_PREVIEW"
+ ],
+ "default": "VISIBILITY_ENUM_UNSPECIFIED"
+ }
+ ],
+ "tags": [
+ "VisibilityRuleEchoService"
+ ]
+ }
+ },
+ "/v1/example/echo_internal": {
+ "get": {
+ "summary": "EchoInternal is an internal API that should only be visible in the OpenAPI spec\nif `visibility_restriction_selectors` includes \"INTERNAL\".",
+ "operationId": "VisibilityRuleEchoService_EchoInternal",
+ "responses": {
+ "200": {
+ "description": "A successful response.",
+ "schema": {
+ "$ref": "#/definitions/examplepbVisibilityRuleSimpleMessage"
+ }
+ },
+ "default": {
+ "description": "An unexpected error response.",
+ "schema": {
+ "$ref": "#/definitions/rpcStatus"
+ }
+ }
+ },
+ "parameters": [
+ {
+ "name": "id",
+ "description": "Id represents the message identifier.",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "num",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "lineNum",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "lang",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "status.progress",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "status.note",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "status.internalField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "status.previewField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "en",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "no.progress",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "no.note",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "no.internalField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "no.previewField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "internalField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "previewField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "anEnum",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "enum": [
+ "VISIBILITY_ENUM_UNSPECIFIED",
+ "VISIBILITY_ENUM_VISIBLE",
+ "VISIBILITY_ENUM_INTERNAL",
+ "VISIBILITY_ENUM_PREVIEW"
+ ],
+ "default": "VISIBILITY_ENUM_UNSPECIFIED"
+ }
+ ],
+ "tags": [
+ "VisibilityRuleEchoService"
+ ]
+ }
+ },
+ "/v1/example/echo_internal_and_preview": {
+ "get": {
+ "summary": "EchoInternalAndPreview is a internal and preview API that should only be visible in the OpenAPI spec\nif `visibility_restriction_selectors` includes \"PREVIEW\" or \"INTERNAL\".",
+ "operationId": "VisibilityRuleEchoService_EchoInternalAndPreview",
+ "responses": {
+ "200": {
+ "description": "A successful response.",
+ "schema": {
+ "$ref": "#/definitions/examplepbVisibilityRuleSimpleMessage"
+ }
+ },
+ "default": {
+ "description": "An unexpected error response.",
+ "schema": {
+ "$ref": "#/definitions/rpcStatus"
+ }
+ }
+ },
+ "parameters": [
+ {
+ "name": "id",
+ "description": "Id represents the message identifier.",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "num",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "lineNum",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "lang",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "status.progress",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "status.note",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "status.internalField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "status.previewField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "en",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "no.progress",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "no.note",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "no.internalField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "no.previewField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "internalField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "previewField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "anEnum",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "enum": [
+ "VISIBILITY_ENUM_UNSPECIFIED",
+ "VISIBILITY_ENUM_VISIBLE",
+ "VISIBILITY_ENUM_INTERNAL",
+ "VISIBILITY_ENUM_PREVIEW"
+ ],
+ "default": "VISIBILITY_ENUM_UNSPECIFIED"
+ }
+ ],
+ "tags": [
+ "VisibilityRuleEchoService"
+ ]
+ }
+ },
+ "/v1/example/echo_preview": {
+ "get": {
+ "summary": "EchoPreview is a preview API that should only be visible in the OpenAPI spec\nif `visibility_restriction_selectors` includes \"PREVIEW\".",
+ "operationId": "VisibilityRuleEchoService_EchoPreview",
+ "responses": {
+ "200": {
+ "description": "A successful response.",
+ "schema": {
+ "$ref": "#/definitions/examplepbVisibilityRuleMessageInPreviewMethod"
+ }
+ },
+ "default": {
+ "description": "An unexpected error response.",
+ "schema": {
+ "$ref": "#/definitions/rpcStatus"
+ }
+ }
+ },
+ "parameters": [
+ {
+ "name": "id",
+ "description": "Id represents the message identifier.",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "num",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "lineNum",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "lang",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "status.progress",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "status.note",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "status.internalField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "status.previewField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "en",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "no.progress",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "no.note",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "no.internalField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "no.previewField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "internalField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "previewField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "anEnum",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "enum": [
+ "VISIBILITY_ENUM_UNSPECIFIED",
+ "VISIBILITY_ENUM_VISIBLE",
+ "VISIBILITY_ENUM_INTERNAL",
+ "VISIBILITY_ENUM_PREVIEW"
+ ],
+ "default": "VISIBILITY_ENUM_UNSPECIFIED"
+ }
+ ],
+ "tags": [
+ "VisibilityRuleEchoService"
+ ]
+ }
+ },
+ "/v1/example/internal/echo/{id}": {
+ "post": {
+ "summary": "Echo method receives a simple message and returns it.\nIt should not be visible in the open API output.",
+ "operationId": "VisibilityRuleInternalEchoService_Echo",
+ "responses": {
+ "200": {
+ "description": "A successful response.",
+ "schema": {
+ "$ref": "#/definitions/examplepbVisibilityRuleSimpleMessage"
+ }
+ },
+ "default": {
+ "description": "An unexpected error response.",
+ "schema": {
+ "$ref": "#/definitions/rpcStatus"
+ }
+ }
+ },
+ "parameters": [
+ {
+ "name": "id",
+ "description": "Id represents the message identifier.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "num",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "lineNum",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "lang",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "status.progress",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "status.note",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "status.internalField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "status.previewField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "en",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "no.progress",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "no.note",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "no.internalField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "no.previewField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "internalField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "previewField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "anEnum",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "enum": [
+ "VISIBILITY_ENUM_UNSPECIFIED",
+ "VISIBILITY_ENUM_VISIBLE",
+ "VISIBILITY_ENUM_INTERNAL",
+ "VISIBILITY_ENUM_PREVIEW"
+ ],
+ "default": "VISIBILITY_ENUM_UNSPECIFIED"
+ }
+ ],
+ "tags": [
+ "VisibilityRuleInternalEchoService"
+ ]
+ }
+ }
+ },
+ "definitions": {
+ "VisibilityRuleSimpleMessageVisibilityEnum": {
+ "type": "string",
+ "enum": [
+ "VISIBILITY_ENUM_UNSPECIFIED",
+ "VISIBILITY_ENUM_VISIBLE",
+ "VISIBILITY_ENUM_INTERNAL",
+ "VISIBILITY_ENUM_PREVIEW"
+ ],
+ "default": "VISIBILITY_ENUM_UNSPECIFIED"
+ },
+ "examplepbVisibilityRuleEmbedded": {
+ "type": "object",
+ "properties": {
+ "progress": {
+ "type": "string",
+ "format": "int64"
+ },
+ "note": {
+ "type": "string"
+ },
+ "internalField": {
+ "type": "string"
+ },
+ "previewField": {
+ "type": "string"
+ }
+ },
+ "description": "Embedded represents a message embedded in SimpleMessage."
+ },
+ "examplepbVisibilityRuleEnumInPreviewMethod": {
+ "type": "string",
+ "enum": [
+ "VISIBILITY_RULE_ENUM_IN_PREVIEW_METHOD_UNSPECIFIED"
+ ],
+ "default": "VISIBILITY_RULE_ENUM_IN_PREVIEW_METHOD_UNSPECIFIED",
+ "description": "EnumInPreviewMethod doesn't define its own visibility restrictions,\nbut is only included in a method marked as \"PREVIEW\", so it will only\nappear if `visibility_restriction_selectors` include \"PREVIEW\"."
+ },
+ "examplepbVisibilityRuleMessageInPreviewMethod": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "subMessage": {
+ "$ref": "#/definitions/examplepbVisibilityRuleSubMessageInPreviewMethod"
+ },
+ "enum": {
+ "$ref": "#/definitions/examplepbVisibilityRuleEnumInPreviewMethod"
+ }
+ },
+ "description": "MessageInPreviewMethod doesn't define its own visibility restrictions,\nbut is only included in a method marked as \"PREVIEW\", so it will only\nappear if `visibility_restriction_selectors` include \"PREVIEW\"."
+ },
+ "examplepbVisibilityRuleSimpleMessage": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Id represents the message identifier."
+ },
+ "num": {
+ "type": "string",
+ "format": "int64"
+ },
+ "lineNum": {
+ "type": "string",
+ "format": "int64"
+ },
+ "lang": {
+ "type": "string"
+ },
+ "status": {
+ "$ref": "#/definitions/examplepbVisibilityRuleEmbedded"
+ },
+ "en": {
+ "type": "string",
+ "format": "int64"
+ },
+ "no": {
+ "$ref": "#/definitions/examplepbVisibilityRuleEmbedded"
+ },
+ "internalField": {
+ "type": "string"
+ },
+ "previewField": {
+ "type": "string"
+ },
+ "anEnum": {
+ "$ref": "#/definitions/VisibilityRuleSimpleMessageVisibilityEnum"
+ }
+ },
+ "description": "SimpleMessage represents a simple message sent to the Echo service."
+ },
+ "examplepbVisibilityRuleSubMessageInPreviewMethod": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ }
+ },
+ "description": "SubMessageInPreviewMethod doesn't define its own visibility restrictions,\nbut is only included in a method marked as \"PREVIEW\", so it will only\nappear if `visibility_restriction_selectors` include \"PREVIEW\"."
+ },
+ "protobufAny": {
+ "type": "object",
+ "properties": {
+ "@type": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": {}
+ },
+ "rpcStatus": {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "message": {
+ "type": "string"
+ },
+ "details": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/protobufAny"
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/examples/internal/proto/examplepb/visibility_rule_preview_echo_service.buf.gen.yaml b/examples/internal/proto/examplepb/visibility_rule_preview_echo_service.buf.gen.yaml
new file mode 100644
index 00000000000..c30eae1ee66
--- /dev/null
+++ b/examples/internal/proto/examplepb/visibility_rule_preview_echo_service.buf.gen.yaml
@@ -0,0 +1,6 @@
+version: v1
+plugins:
+ - name: openapiv2
+ out: .
+ opt:
+ - visibility_restriction_selectors=PREVIEW
diff --git a/examples/internal/proto/examplepb/visibility_rule_preview_echo_service.swagger.json b/examples/internal/proto/examplepb/visibility_rule_preview_echo_service.swagger.json
new file mode 100644
index 00000000000..c3ae74b42e1
--- /dev/null
+++ b/examples/internal/proto/examplepb/visibility_rule_preview_echo_service.swagger.json
@@ -0,0 +1,489 @@
+{
+ "swagger": "2.0",
+ "info": {
+ "title": "examples/internal/proto/examplepb/visibility_rule_echo_service.proto",
+ "description": "Visibility Rule Echo Service\nSimilar to echo_service.proto but with annotations to change visibility\nof services, methods, fields and enum values.\n\n`google.api.VisibilityRule` annotations are added to customize where they are generated.\nCombined with the option `visibility_restriction_selectors` overlapping rules will appear in the OpenAPI output.\nElements without `google.api.VisibilityRule` annotations will appear as usual in the generated output.\n\nThese restrictions and selectors are completely arbitrary and you can define whatever values or hierarchies you want.\nIn this example `INTERNAL`, `PREVIEW` are used, but `INTERNAL`, `ALPHA`, `BETA`, `RELEASED`, or anything else could be used if you wish.",
+ "version": "version not set"
+ },
+ "tags": [
+ {
+ "name": "VisibilityRuleEchoService"
+ }
+ ],
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "paths": {
+ "/v1/example/echo/{id}": {
+ "post": {
+ "summary": "Echo method receives a simple message and returns it.\nIt should always be visible in the open API output.",
+ "operationId": "VisibilityRuleEchoService_Echo",
+ "responses": {
+ "200": {
+ "description": "A successful response.",
+ "schema": {
+ "$ref": "#/definitions/examplepbVisibilityRuleSimpleMessage"
+ }
+ },
+ "default": {
+ "description": "An unexpected error response.",
+ "schema": {
+ "$ref": "#/definitions/rpcStatus"
+ }
+ }
+ },
+ "parameters": [
+ {
+ "name": "id",
+ "description": "Id represents the message identifier.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "num",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "lineNum",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "lang",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "status.progress",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "status.note",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "status.previewField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "en",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "no.progress",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "no.note",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "no.previewField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "previewField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "anEnum",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "enum": [
+ "VISIBILITY_ENUM_UNSPECIFIED",
+ "VISIBILITY_ENUM_VISIBLE",
+ "VISIBILITY_ENUM_PREVIEW"
+ ],
+ "default": "VISIBILITY_ENUM_UNSPECIFIED"
+ }
+ ],
+ "tags": [
+ "VisibilityRuleEchoService"
+ ]
+ }
+ },
+ "/v1/example/echo_internal_and_preview": {
+ "get": {
+ "summary": "EchoInternalAndPreview is a internal and preview API that should only be visible in the OpenAPI spec\nif `visibility_restriction_selectors` includes \"PREVIEW\" or \"INTERNAL\".",
+ "operationId": "VisibilityRuleEchoService_EchoInternalAndPreview",
+ "responses": {
+ "200": {
+ "description": "A successful response.",
+ "schema": {
+ "$ref": "#/definitions/examplepbVisibilityRuleSimpleMessage"
+ }
+ },
+ "default": {
+ "description": "An unexpected error response.",
+ "schema": {
+ "$ref": "#/definitions/rpcStatus"
+ }
+ }
+ },
+ "parameters": [
+ {
+ "name": "id",
+ "description": "Id represents the message identifier.",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "num",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "lineNum",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "lang",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "status.progress",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "status.note",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "status.previewField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "en",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "no.progress",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "no.note",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "no.previewField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "previewField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "anEnum",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "enum": [
+ "VISIBILITY_ENUM_UNSPECIFIED",
+ "VISIBILITY_ENUM_VISIBLE",
+ "VISIBILITY_ENUM_PREVIEW"
+ ],
+ "default": "VISIBILITY_ENUM_UNSPECIFIED"
+ }
+ ],
+ "tags": [
+ "VisibilityRuleEchoService"
+ ]
+ }
+ },
+ "/v1/example/echo_preview": {
+ "get": {
+ "summary": "EchoPreview is a preview API that should only be visible in the OpenAPI spec\nif `visibility_restriction_selectors` includes \"PREVIEW\".",
+ "operationId": "VisibilityRuleEchoService_EchoPreview",
+ "responses": {
+ "200": {
+ "description": "A successful response.",
+ "schema": {
+ "$ref": "#/definitions/examplepbVisibilityRuleMessageInPreviewMethod"
+ }
+ },
+ "default": {
+ "description": "An unexpected error response.",
+ "schema": {
+ "$ref": "#/definitions/rpcStatus"
+ }
+ }
+ },
+ "parameters": [
+ {
+ "name": "id",
+ "description": "Id represents the message identifier.",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "num",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "lineNum",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "lang",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "status.progress",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "status.note",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "status.previewField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "en",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "no.progress",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "int64"
+ },
+ {
+ "name": "no.note",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "no.previewField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "previewField",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ },
+ {
+ "name": "anEnum",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "enum": [
+ "VISIBILITY_ENUM_UNSPECIFIED",
+ "VISIBILITY_ENUM_VISIBLE",
+ "VISIBILITY_ENUM_PREVIEW"
+ ],
+ "default": "VISIBILITY_ENUM_UNSPECIFIED"
+ }
+ ],
+ "tags": [
+ "VisibilityRuleEchoService"
+ ]
+ }
+ }
+ },
+ "definitions": {
+ "VisibilityRuleSimpleMessageVisibilityEnum": {
+ "type": "string",
+ "enum": [
+ "VISIBILITY_ENUM_UNSPECIFIED",
+ "VISIBILITY_ENUM_VISIBLE",
+ "VISIBILITY_ENUM_PREVIEW"
+ ],
+ "default": "VISIBILITY_ENUM_UNSPECIFIED"
+ },
+ "examplepbVisibilityRuleEmbedded": {
+ "type": "object",
+ "properties": {
+ "progress": {
+ "type": "string",
+ "format": "int64"
+ },
+ "note": {
+ "type": "string"
+ },
+ "previewField": {
+ "type": "string"
+ }
+ },
+ "description": "Embedded represents a message embedded in SimpleMessage."
+ },
+ "examplepbVisibilityRuleEnumInPreviewMethod": {
+ "type": "string",
+ "enum": [
+ "VISIBILITY_RULE_ENUM_IN_PREVIEW_METHOD_UNSPECIFIED"
+ ],
+ "default": "VISIBILITY_RULE_ENUM_IN_PREVIEW_METHOD_UNSPECIFIED",
+ "description": "EnumInPreviewMethod doesn't define its own visibility restrictions,\nbut is only included in a method marked as \"PREVIEW\", so it will only\nappear if `visibility_restriction_selectors` include \"PREVIEW\"."
+ },
+ "examplepbVisibilityRuleMessageInPreviewMethod": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "subMessage": {
+ "$ref": "#/definitions/examplepbVisibilityRuleSubMessageInPreviewMethod"
+ },
+ "enum": {
+ "$ref": "#/definitions/examplepbVisibilityRuleEnumInPreviewMethod"
+ }
+ },
+ "description": "MessageInPreviewMethod doesn't define its own visibility restrictions,\nbut is only included in a method marked as \"PREVIEW\", so it will only\nappear if `visibility_restriction_selectors` include \"PREVIEW\"."
+ },
+ "examplepbVisibilityRuleSimpleMessage": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Id represents the message identifier."
+ },
+ "num": {
+ "type": "string",
+ "format": "int64"
+ },
+ "lineNum": {
+ "type": "string",
+ "format": "int64"
+ },
+ "lang": {
+ "type": "string"
+ },
+ "status": {
+ "$ref": "#/definitions/examplepbVisibilityRuleEmbedded"
+ },
+ "en": {
+ "type": "string",
+ "format": "int64"
+ },
+ "no": {
+ "$ref": "#/definitions/examplepbVisibilityRuleEmbedded"
+ },
+ "previewField": {
+ "type": "string"
+ },
+ "anEnum": {
+ "$ref": "#/definitions/VisibilityRuleSimpleMessageVisibilityEnum"
+ }
+ },
+ "description": "SimpleMessage represents a simple message sent to the Echo service."
+ },
+ "examplepbVisibilityRuleSubMessageInPreviewMethod": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ }
+ },
+ "description": "SubMessageInPreviewMethod doesn't define its own visibility restrictions,\nbut is only included in a method marked as \"PREVIEW\", so it will only\nappear if `visibility_restriction_selectors` include \"PREVIEW\"."
+ },
+ "protobufAny": {
+ "type": "object",
+ "properties": {
+ "@type": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": {}
+ },
+ "rpcStatus": {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "message": {
+ "type": "string"
+ },
+ "details": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/protobufAny"
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/examples/internal/proto/examplepb/wrappers.pb.go b/examples/internal/proto/examplepb/wrappers.pb.go
index f2329b424da..8803cd7707a 100644
--- a/examples/internal/proto/examplepb/wrappers.pb.go
+++ b/examples/internal/proto/examplepb/wrappers.pb.go
@@ -1,17 +1,17 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.26.0
-// protoc v3.13.0
+// protoc-gen-go v1.27.1
+// protoc (unknown)
// source: examples/internal/proto/examplepb/wrappers.proto
package examplepb
import (
- empty "github.com/golang/protobuf/ptypes/empty"
- wrappers "github.com/golang/protobuf/ptypes/wrappers"
_ "google.golang.org/genproto/googleapis/api/annotations"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ emptypb "google.golang.org/protobuf/types/known/emptypb"
+ wrapperspb "google.golang.org/protobuf/types/known/wrapperspb"
reflect "reflect"
sync "sync"
)
@@ -28,15 +28,15 @@ type Wrappers struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- StringValue *wrappers.StringValue `protobuf:"bytes,1,opt,name=string_value,json=stringValue,proto3" json:"string_value,omitempty"`
- Int32Value *wrappers.Int32Value `protobuf:"bytes,2,opt,name=int32_value,json=int32Value,proto3" json:"int32_value,omitempty"`
- Int64Value *wrappers.Int64Value `protobuf:"bytes,3,opt,name=int64_value,json=int64Value,proto3" json:"int64_value,omitempty"`
- FloatValue *wrappers.FloatValue `protobuf:"bytes,4,opt,name=float_value,json=floatValue,proto3" json:"float_value,omitempty"`
- DoubleValue *wrappers.DoubleValue `protobuf:"bytes,5,opt,name=double_value,json=doubleValue,proto3" json:"double_value,omitempty"`
- BoolValue *wrappers.BoolValue `protobuf:"bytes,6,opt,name=bool_value,json=boolValue,proto3" json:"bool_value,omitempty"`
- Uint32Value *wrappers.UInt32Value `protobuf:"bytes,7,opt,name=uint32_value,json=uint32Value,proto3" json:"uint32_value,omitempty"`
- Uint64Value *wrappers.UInt64Value `protobuf:"bytes,8,opt,name=uint64_value,json=uint64Value,proto3" json:"uint64_value,omitempty"`
- BytesValue *wrappers.BytesValue `protobuf:"bytes,9,opt,name=bytes_value,json=bytesValue,proto3" json:"bytes_value,omitempty"`
+ StringValue *wrapperspb.StringValue `protobuf:"bytes,1,opt,name=string_value,json=stringValue,proto3" json:"string_value,omitempty"`
+ Int32Value *wrapperspb.Int32Value `protobuf:"bytes,2,opt,name=int32_value,json=int32Value,proto3" json:"int32_value,omitempty"`
+ Int64Value *wrapperspb.Int64Value `protobuf:"bytes,3,opt,name=int64_value,json=int64Value,proto3" json:"int64_value,omitempty"`
+ FloatValue *wrapperspb.FloatValue `protobuf:"bytes,4,opt,name=float_value,json=floatValue,proto3" json:"float_value,omitempty"`
+ DoubleValue *wrapperspb.DoubleValue `protobuf:"bytes,5,opt,name=double_value,json=doubleValue,proto3" json:"double_value,omitempty"`
+ BoolValue *wrapperspb.BoolValue `protobuf:"bytes,6,opt,name=bool_value,json=boolValue,proto3" json:"bool_value,omitempty"`
+ Uint32Value *wrapperspb.UInt32Value `protobuf:"bytes,7,opt,name=uint32_value,json=uint32Value,proto3" json:"uint32_value,omitempty"`
+ Uint64Value *wrapperspb.UInt64Value `protobuf:"bytes,8,opt,name=uint64_value,json=uint64Value,proto3" json:"uint64_value,omitempty"`
+ BytesValue *wrapperspb.BytesValue `protobuf:"bytes,9,opt,name=bytes_value,json=bytesValue,proto3" json:"bytes_value,omitempty"`
}
func (x *Wrappers) Reset() {
@@ -71,63 +71,63 @@ func (*Wrappers) Descriptor() ([]byte, []int) {
return file_examples_internal_proto_examplepb_wrappers_proto_rawDescGZIP(), []int{0}
}
-func (x *Wrappers) GetStringValue() *wrappers.StringValue {
+func (x *Wrappers) GetStringValue() *wrapperspb.StringValue {
if x != nil {
return x.StringValue
}
return nil
}
-func (x *Wrappers) GetInt32Value() *wrappers.Int32Value {
+func (x *Wrappers) GetInt32Value() *wrapperspb.Int32Value {
if x != nil {
return x.Int32Value
}
return nil
}
-func (x *Wrappers) GetInt64Value() *wrappers.Int64Value {
+func (x *Wrappers) GetInt64Value() *wrapperspb.Int64Value {
if x != nil {
return x.Int64Value
}
return nil
}
-func (x *Wrappers) GetFloatValue() *wrappers.FloatValue {
+func (x *Wrappers) GetFloatValue() *wrapperspb.FloatValue {
if x != nil {
return x.FloatValue
}
return nil
}
-func (x *Wrappers) GetDoubleValue() *wrappers.DoubleValue {
+func (x *Wrappers) GetDoubleValue() *wrapperspb.DoubleValue {
if x != nil {
return x.DoubleValue
}
return nil
}
-func (x *Wrappers) GetBoolValue() *wrappers.BoolValue {
+func (x *Wrappers) GetBoolValue() *wrapperspb.BoolValue {
if x != nil {
return x.BoolValue
}
return nil
}
-func (x *Wrappers) GetUint32Value() *wrappers.UInt32Value {
+func (x *Wrappers) GetUint32Value() *wrapperspb.UInt32Value {
if x != nil {
return x.Uint32Value
}
return nil
}
-func (x *Wrappers) GetUint64Value() *wrappers.UInt64Value {
+func (x *Wrappers) GetUint64Value() *wrapperspb.UInt64Value {
if x != nil {
return x.Uint64Value
}
return nil
}
-func (x *Wrappers) GetBytesValue() *wrappers.BytesValue {
+func (x *Wrappers) GetBytesValue() *wrapperspb.BytesValue {
if x != nil {
return x.BytesValue
}
@@ -145,10 +145,10 @@ var file_examples_internal_proto_examplepb_wrappers_proto_rawDesc = []byte{
0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65,
0x70, 0x62, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61,
0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
- 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
- 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
- 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc1, 0x04,
+ 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67,
+ 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77,
+ 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc1, 0x04,
0x0a, 0x08, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x12, 0x3f, 0x0a, 0x0c, 0x73, 0x74,
0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
@@ -194,74 +194,74 @@ var file_examples_internal_proto_examplepb_wrappers_proto_rawDesc = []byte{
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, 0x57, 0x72, 0x61, 0x70,
- 0x70, 0x65, 0x72, 0x73, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x22, 0x14, 0x2f, 0x76,
- 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65,
- 0x72, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x6a, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53,
+ 0x70, 0x65, 0x72, 0x73, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x01, 0x2a, 0x22,
+ 0x14, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x77, 0x72, 0x61,
+ 0x70, 0x70, 0x65, 0x72, 0x73, 0x12, 0x6a, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53,
0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f,
0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72,
0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e,
- 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x22, 0x0e,
- 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3a, 0x01,
- 0x2a, 0x12, 0x66, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x33, 0x32,
+ 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x3a, 0x01,
+ 0x2a, 0x22, 0x0e, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e,
+ 0x67, 0x12, 0x66, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x33, 0x32,
0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c,
0x75, 0x65, 0x1a, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22,
- 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x22, 0x0d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x73,
- 0x74, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x3a, 0x01, 0x2a, 0x12, 0x66, 0x0a, 0x10, 0x43, 0x72, 0x65,
+ 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x3a, 0x01, 0x2a, 0x22, 0x0d, 0x2f, 0x76, 0x31, 0x2f,
+ 0x74, 0x65, 0x73, 0x74, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x66, 0x0a, 0x10, 0x43, 0x72, 0x65,
0x61, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1b, 0x2e,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x1b, 0x2e, 0x67, 0x6f, 0x6f,
0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74,
- 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x22,
- 0x0d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x3a, 0x01,
- 0x2a, 0x12, 0x66, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x46, 0x6c, 0x6f, 0x61, 0x74,
+ 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x3a,
+ 0x01, 0x2a, 0x22, 0x0d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x49, 0x6e, 0x74, 0x36,
+ 0x34, 0x12, 0x66, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x46, 0x6c, 0x6f, 0x61, 0x74,
0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x56, 0x61, 0x6c,
0x75, 0x65, 0x1a, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22,
- 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x22, 0x0d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x73,
- 0x74, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0x6a, 0x0a, 0x11, 0x43, 0x72, 0x65,
+ 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x3a, 0x01, 0x2a, 0x22, 0x0d, 0x2f, 0x76, 0x31, 0x2f,
+ 0x74, 0x65, 0x73, 0x74, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x12, 0x6a, 0x0a, 0x11, 0x43, 0x72, 0x65,
0x61, 0x74, 0x65, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1c,
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
0x2e, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x1c, 0x2e, 0x67,
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44,
0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93,
- 0x02, 0x13, 0x22, 0x0e, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x44, 0x6f, 0x75, 0x62,
- 0x6c, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x62, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42,
+ 0x02, 0x13, 0x3a, 0x01, 0x2a, 0x22, 0x0e, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x44,
+ 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x12, 0x62, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42,
0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56,
0x61, 0x6c, 0x75, 0x65, 0x1a, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65,
- 0x22, 0x17, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x22, 0x0c, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65,
- 0x73, 0x74, 0x42, 0x6f, 0x6f, 0x6c, 0x3a, 0x01, 0x2a, 0x12, 0x6a, 0x0a, 0x11, 0x43, 0x72, 0x65,
+ 0x22, 0x17, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x3a, 0x01, 0x2a, 0x22, 0x0c, 0x2f, 0x76, 0x31,
+ 0x2f, 0x74, 0x65, 0x73, 0x74, 0x42, 0x6f, 0x6f, 0x6c, 0x12, 0x6a, 0x0a, 0x11, 0x43, 0x72, 0x65,
0x61, 0x74, 0x65, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1c,
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x1c, 0x2e, 0x67,
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55,
0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93,
- 0x02, 0x13, 0x22, 0x0e, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x55, 0x69, 0x6e, 0x74,
- 0x33, 0x32, 0x3a, 0x01, 0x2a, 0x12, 0x6a, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55,
+ 0x02, 0x13, 0x3a, 0x01, 0x2a, 0x22, 0x0e, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x55,
+ 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x6a, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55,
0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f,
0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e,
0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x36,
- 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x22, 0x0e,
- 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x3a, 0x01,
- 0x2a, 0x12, 0x66, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73,
+ 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x3a, 0x01,
+ 0x2a, 0x22, 0x0e, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x55, 0x69, 0x6e, 0x74, 0x36,
+ 0x34, 0x12, 0x66, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73,
0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x79, 0x74, 0x65, 0x73, 0x56, 0x61, 0x6c,
0x75, 0x65, 0x1a, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x79, 0x74, 0x65, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22,
- 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x22, 0x0d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x73,
- 0x74, 0x42, 0x79, 0x74, 0x65, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x57, 0x0a, 0x0b, 0x43, 0x72, 0x65,
+ 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x3a, 0x01, 0x2a, 0x22, 0x0d, 0x2f, 0x76, 0x31, 0x2f,
+ 0x74, 0x65, 0x73, 0x74, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x57, 0x0a, 0x0b, 0x43, 0x72, 0x65,
0x61, 0x74, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79,
0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12,
- 0x22, 0x0d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x3a,
- 0x01, 0x2a, 0x42, 0x4d, 0x5a, 0x4b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
+ 0x3a, 0x01, 0x2a, 0x22, 0x0d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x45, 0x6d, 0x70,
+ 0x74, 0x79, 0x42, 0x4d, 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,
@@ -283,17 +283,17 @@ func file_examples_internal_proto_examplepb_wrappers_proto_rawDescGZIP() []byte
var file_examples_internal_proto_examplepb_wrappers_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_examples_internal_proto_examplepb_wrappers_proto_goTypes = []interface{}{
- (*Wrappers)(nil), // 0: grpc.gateway.examples.internal.proto.examplepb.Wrappers
- (*wrappers.StringValue)(nil), // 1: google.protobuf.StringValue
- (*wrappers.Int32Value)(nil), // 2: google.protobuf.Int32Value
- (*wrappers.Int64Value)(nil), // 3: google.protobuf.Int64Value
- (*wrappers.FloatValue)(nil), // 4: google.protobuf.FloatValue
- (*wrappers.DoubleValue)(nil), // 5: google.protobuf.DoubleValue
- (*wrappers.BoolValue)(nil), // 6: google.protobuf.BoolValue
- (*wrappers.UInt32Value)(nil), // 7: google.protobuf.UInt32Value
- (*wrappers.UInt64Value)(nil), // 8: google.protobuf.UInt64Value
- (*wrappers.BytesValue)(nil), // 9: google.protobuf.BytesValue
- (*empty.Empty)(nil), // 10: google.protobuf.Empty
+ (*Wrappers)(nil), // 0: grpc.gateway.examples.internal.proto.examplepb.Wrappers
+ (*wrapperspb.StringValue)(nil), // 1: google.protobuf.StringValue
+ (*wrapperspb.Int32Value)(nil), // 2: google.protobuf.Int32Value
+ (*wrapperspb.Int64Value)(nil), // 3: google.protobuf.Int64Value
+ (*wrapperspb.FloatValue)(nil), // 4: google.protobuf.FloatValue
+ (*wrapperspb.DoubleValue)(nil), // 5: google.protobuf.DoubleValue
+ (*wrapperspb.BoolValue)(nil), // 6: google.protobuf.BoolValue
+ (*wrapperspb.UInt32Value)(nil), // 7: google.protobuf.UInt32Value
+ (*wrapperspb.UInt64Value)(nil), // 8: google.protobuf.UInt64Value
+ (*wrapperspb.BytesValue)(nil), // 9: google.protobuf.BytesValue
+ (*emptypb.Empty)(nil), // 10: google.protobuf.Empty
}
var file_examples_internal_proto_examplepb_wrappers_proto_depIdxs = []int32{
1, // 0: grpc.gateway.examples.internal.proto.examplepb.Wrappers.string_value:type_name -> google.protobuf.StringValue
diff --git a/examples/internal/proto/examplepb/wrappers.pb.gw.go b/examples/internal/proto/examplepb/wrappers.pb.gw.go
index 33470d816c0..41047b01aa2 100644
--- a/examples/internal/proto/examplepb/wrappers.pb.gw.go
+++ b/examples/internal/proto/examplepb/wrappers.pb.gw.go
@@ -13,8 +13,6 @@ import (
"io"
"net/http"
- "github.com/golang/protobuf/ptypes/empty"
- "github.com/golang/protobuf/ptypes/wrappers"
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
"github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
"google.golang.org/grpc"
@@ -23,6 +21,8 @@ import (
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/proto"
+ "google.golang.org/protobuf/types/known/emptypb"
+ "google.golang.org/protobuf/types/known/wrapperspb"
)
// Suppress "imported and not used" errors
@@ -68,7 +68,7 @@ func local_request_WrappersService_Create_0(ctx context.Context, marshaler runti
}
func request_WrappersService_CreateStringValue_0(ctx context.Context, marshaler runtime.Marshaler, client WrappersServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq wrappers.StringValue
+ var protoReq wrapperspb.StringValue
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
@@ -85,7 +85,7 @@ func request_WrappersService_CreateStringValue_0(ctx context.Context, marshaler
}
func local_request_WrappersService_CreateStringValue_0(ctx context.Context, marshaler runtime.Marshaler, server WrappersServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq wrappers.StringValue
+ var protoReq wrapperspb.StringValue
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
@@ -102,7 +102,7 @@ func local_request_WrappersService_CreateStringValue_0(ctx context.Context, mars
}
func request_WrappersService_CreateInt32Value_0(ctx context.Context, marshaler runtime.Marshaler, client WrappersServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq wrappers.Int32Value
+ var protoReq wrapperspb.Int32Value
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
@@ -119,7 +119,7 @@ func request_WrappersService_CreateInt32Value_0(ctx context.Context, marshaler r
}
func local_request_WrappersService_CreateInt32Value_0(ctx context.Context, marshaler runtime.Marshaler, server WrappersServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq wrappers.Int32Value
+ var protoReq wrapperspb.Int32Value
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
@@ -136,7 +136,7 @@ func local_request_WrappersService_CreateInt32Value_0(ctx context.Context, marsh
}
func request_WrappersService_CreateInt64Value_0(ctx context.Context, marshaler runtime.Marshaler, client WrappersServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq wrappers.Int64Value
+ var protoReq wrapperspb.Int64Value
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
@@ -153,7 +153,7 @@ func request_WrappersService_CreateInt64Value_0(ctx context.Context, marshaler r
}
func local_request_WrappersService_CreateInt64Value_0(ctx context.Context, marshaler runtime.Marshaler, server WrappersServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq wrappers.Int64Value
+ var protoReq wrapperspb.Int64Value
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
@@ -170,7 +170,7 @@ func local_request_WrappersService_CreateInt64Value_0(ctx context.Context, marsh
}
func request_WrappersService_CreateFloatValue_0(ctx context.Context, marshaler runtime.Marshaler, client WrappersServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq wrappers.FloatValue
+ var protoReq wrapperspb.FloatValue
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
@@ -187,7 +187,7 @@ func request_WrappersService_CreateFloatValue_0(ctx context.Context, marshaler r
}
func local_request_WrappersService_CreateFloatValue_0(ctx context.Context, marshaler runtime.Marshaler, server WrappersServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq wrappers.FloatValue
+ var protoReq wrapperspb.FloatValue
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
@@ -204,7 +204,7 @@ func local_request_WrappersService_CreateFloatValue_0(ctx context.Context, marsh
}
func request_WrappersService_CreateDoubleValue_0(ctx context.Context, marshaler runtime.Marshaler, client WrappersServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq wrappers.DoubleValue
+ var protoReq wrapperspb.DoubleValue
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
@@ -221,7 +221,7 @@ func request_WrappersService_CreateDoubleValue_0(ctx context.Context, marshaler
}
func local_request_WrappersService_CreateDoubleValue_0(ctx context.Context, marshaler runtime.Marshaler, server WrappersServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq wrappers.DoubleValue
+ var protoReq wrapperspb.DoubleValue
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
@@ -238,7 +238,7 @@ func local_request_WrappersService_CreateDoubleValue_0(ctx context.Context, mars
}
func request_WrappersService_CreateBoolValue_0(ctx context.Context, marshaler runtime.Marshaler, client WrappersServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq wrappers.BoolValue
+ var protoReq wrapperspb.BoolValue
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
@@ -255,7 +255,7 @@ func request_WrappersService_CreateBoolValue_0(ctx context.Context, marshaler ru
}
func local_request_WrappersService_CreateBoolValue_0(ctx context.Context, marshaler runtime.Marshaler, server WrappersServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq wrappers.BoolValue
+ var protoReq wrapperspb.BoolValue
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
@@ -272,7 +272,7 @@ func local_request_WrappersService_CreateBoolValue_0(ctx context.Context, marsha
}
func request_WrappersService_CreateUInt32Value_0(ctx context.Context, marshaler runtime.Marshaler, client WrappersServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq wrappers.UInt32Value
+ var protoReq wrapperspb.UInt32Value
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
@@ -289,7 +289,7 @@ func request_WrappersService_CreateUInt32Value_0(ctx context.Context, marshaler
}
func local_request_WrappersService_CreateUInt32Value_0(ctx context.Context, marshaler runtime.Marshaler, server WrappersServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq wrappers.UInt32Value
+ var protoReq wrapperspb.UInt32Value
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
@@ -306,7 +306,7 @@ func local_request_WrappersService_CreateUInt32Value_0(ctx context.Context, mars
}
func request_WrappersService_CreateUInt64Value_0(ctx context.Context, marshaler runtime.Marshaler, client WrappersServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq wrappers.UInt64Value
+ var protoReq wrapperspb.UInt64Value
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
@@ -323,7 +323,7 @@ func request_WrappersService_CreateUInt64Value_0(ctx context.Context, marshaler
}
func local_request_WrappersService_CreateUInt64Value_0(ctx context.Context, marshaler runtime.Marshaler, server WrappersServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq wrappers.UInt64Value
+ var protoReq wrapperspb.UInt64Value
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
@@ -340,7 +340,7 @@ func local_request_WrappersService_CreateUInt64Value_0(ctx context.Context, mars
}
func request_WrappersService_CreateBytesValue_0(ctx context.Context, marshaler runtime.Marshaler, client WrappersServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq wrappers.BytesValue
+ var protoReq wrapperspb.BytesValue
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
@@ -357,7 +357,7 @@ func request_WrappersService_CreateBytesValue_0(ctx context.Context, marshaler r
}
func local_request_WrappersService_CreateBytesValue_0(ctx context.Context, marshaler runtime.Marshaler, server WrappersServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq wrappers.BytesValue
+ var protoReq wrapperspb.BytesValue
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
@@ -374,7 +374,7 @@ func local_request_WrappersService_CreateBytesValue_0(ctx context.Context, marsh
}
func request_WrappersService_CreateEmpty_0(ctx context.Context, marshaler runtime.Marshaler, client WrappersServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq empty.Empty
+ var protoReq emptypb.Empty
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
@@ -391,7 +391,7 @@ func request_WrappersService_CreateEmpty_0(ctx context.Context, marshaler runtim
}
func local_request_WrappersService_CreateEmpty_0(ctx context.Context, marshaler runtime.Marshaler, server WrappersServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq empty.Empty
+ var protoReq emptypb.Empty
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
@@ -419,20 +419,22 @@ func RegisterWrappersServiceHandlerServer(ctx context.Context, mux *runtime.Serv
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/Create")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/Create", runtime.WithHTTPPathPattern("/v1/example/wrappers"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_WrappersService_Create_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_WrappersService_Create_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_WrappersService_Create_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_WrappersService_Create_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -442,20 +444,22 @@ func RegisterWrappersServiceHandlerServer(ctx context.Context, mux *runtime.Serv
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateStringValue")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateStringValue", runtime.WithHTTPPathPattern("/v1/testString"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_WrappersService_CreateStringValue_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_WrappersService_CreateStringValue_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_WrappersService_CreateStringValue_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_WrappersService_CreateStringValue_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -465,20 +469,22 @@ func RegisterWrappersServiceHandlerServer(ctx context.Context, mux *runtime.Serv
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateInt32Value")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateInt32Value", runtime.WithHTTPPathPattern("/v1/testInt32"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_WrappersService_CreateInt32Value_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_WrappersService_CreateInt32Value_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_WrappersService_CreateInt32Value_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_WrappersService_CreateInt32Value_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -488,20 +494,22 @@ func RegisterWrappersServiceHandlerServer(ctx context.Context, mux *runtime.Serv
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateInt64Value")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateInt64Value", runtime.WithHTTPPathPattern("/v1/testInt64"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_WrappersService_CreateInt64Value_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_WrappersService_CreateInt64Value_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_WrappersService_CreateInt64Value_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_WrappersService_CreateInt64Value_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -511,20 +519,22 @@ func RegisterWrappersServiceHandlerServer(ctx context.Context, mux *runtime.Serv
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateFloatValue")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateFloatValue", runtime.WithHTTPPathPattern("/v1/testFloat"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_WrappersService_CreateFloatValue_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_WrappersService_CreateFloatValue_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_WrappersService_CreateFloatValue_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_WrappersService_CreateFloatValue_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -534,20 +544,22 @@ func RegisterWrappersServiceHandlerServer(ctx context.Context, mux *runtime.Serv
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateDoubleValue")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateDoubleValue", runtime.WithHTTPPathPattern("/v1/testDouble"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_WrappersService_CreateDoubleValue_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_WrappersService_CreateDoubleValue_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_WrappersService_CreateDoubleValue_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_WrappersService_CreateDoubleValue_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -557,20 +569,22 @@ func RegisterWrappersServiceHandlerServer(ctx context.Context, mux *runtime.Serv
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateBoolValue")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateBoolValue", runtime.WithHTTPPathPattern("/v1/testBool"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_WrappersService_CreateBoolValue_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_WrappersService_CreateBoolValue_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_WrappersService_CreateBoolValue_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_WrappersService_CreateBoolValue_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -580,20 +594,22 @@ func RegisterWrappersServiceHandlerServer(ctx context.Context, mux *runtime.Serv
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateUInt32Value")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateUInt32Value", runtime.WithHTTPPathPattern("/v1/testUint32"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_WrappersService_CreateUInt32Value_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_WrappersService_CreateUInt32Value_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_WrappersService_CreateUInt32Value_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_WrappersService_CreateUInt32Value_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -603,20 +619,22 @@ func RegisterWrappersServiceHandlerServer(ctx context.Context, mux *runtime.Serv
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateUInt64Value")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateUInt64Value", runtime.WithHTTPPathPattern("/v1/testUint64"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_WrappersService_CreateUInt64Value_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_WrappersService_CreateUInt64Value_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_WrappersService_CreateUInt64Value_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_WrappersService_CreateUInt64Value_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -626,20 +644,22 @@ func RegisterWrappersServiceHandlerServer(ctx context.Context, mux *runtime.Serv
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateBytesValue")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateBytesValue", runtime.WithHTTPPathPattern("/v1/testBytes"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_WrappersService_CreateBytesValue_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_WrappersService_CreateBytesValue_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_WrappersService_CreateBytesValue_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_WrappersService_CreateBytesValue_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -649,20 +669,22 @@ func RegisterWrappersServiceHandlerServer(ctx context.Context, mux *runtime.Serv
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateEmpty")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateEmpty", runtime.WithHTTPPathPattern("/v1/testEmpty"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_WrappersService_CreateEmpty_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_WrappersService_CreateEmpty_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_WrappersService_CreateEmpty_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_WrappersService_CreateEmpty_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -711,19 +733,21 @@ func RegisterWrappersServiceHandlerClient(ctx context.Context, mux *runtime.Serv
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/Create")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/Create", runtime.WithHTTPPathPattern("/v1/example/wrappers"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_WrappersService_Create_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_WrappersService_Create_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_WrappersService_Create_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_WrappersService_Create_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -731,19 +755,21 @@ func RegisterWrappersServiceHandlerClient(ctx context.Context, mux *runtime.Serv
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateStringValue")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateStringValue", runtime.WithHTTPPathPattern("/v1/testString"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_WrappersService_CreateStringValue_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_WrappersService_CreateStringValue_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_WrappersService_CreateStringValue_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_WrappersService_CreateStringValue_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -751,19 +777,21 @@ func RegisterWrappersServiceHandlerClient(ctx context.Context, mux *runtime.Serv
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateInt32Value")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateInt32Value", runtime.WithHTTPPathPattern("/v1/testInt32"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_WrappersService_CreateInt32Value_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_WrappersService_CreateInt32Value_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_WrappersService_CreateInt32Value_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_WrappersService_CreateInt32Value_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -771,19 +799,21 @@ func RegisterWrappersServiceHandlerClient(ctx context.Context, mux *runtime.Serv
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateInt64Value")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateInt64Value", runtime.WithHTTPPathPattern("/v1/testInt64"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_WrappersService_CreateInt64Value_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_WrappersService_CreateInt64Value_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_WrappersService_CreateInt64Value_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_WrappersService_CreateInt64Value_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -791,19 +821,21 @@ func RegisterWrappersServiceHandlerClient(ctx context.Context, mux *runtime.Serv
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateFloatValue")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateFloatValue", runtime.WithHTTPPathPattern("/v1/testFloat"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_WrappersService_CreateFloatValue_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_WrappersService_CreateFloatValue_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_WrappersService_CreateFloatValue_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_WrappersService_CreateFloatValue_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -811,19 +843,21 @@ func RegisterWrappersServiceHandlerClient(ctx context.Context, mux *runtime.Serv
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateDoubleValue")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateDoubleValue", runtime.WithHTTPPathPattern("/v1/testDouble"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_WrappersService_CreateDoubleValue_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_WrappersService_CreateDoubleValue_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_WrappersService_CreateDoubleValue_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_WrappersService_CreateDoubleValue_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -831,19 +865,21 @@ func RegisterWrappersServiceHandlerClient(ctx context.Context, mux *runtime.Serv
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateBoolValue")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateBoolValue", runtime.WithHTTPPathPattern("/v1/testBool"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_WrappersService_CreateBoolValue_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_WrappersService_CreateBoolValue_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_WrappersService_CreateBoolValue_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_WrappersService_CreateBoolValue_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -851,19 +887,21 @@ func RegisterWrappersServiceHandlerClient(ctx context.Context, mux *runtime.Serv
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateUInt32Value")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateUInt32Value", runtime.WithHTTPPathPattern("/v1/testUint32"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_WrappersService_CreateUInt32Value_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_WrappersService_CreateUInt32Value_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_WrappersService_CreateUInt32Value_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_WrappersService_CreateUInt32Value_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -871,19 +909,21 @@ func RegisterWrappersServiceHandlerClient(ctx context.Context, mux *runtime.Serv
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateUInt64Value")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateUInt64Value", runtime.WithHTTPPathPattern("/v1/testUint64"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_WrappersService_CreateUInt64Value_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_WrappersService_CreateUInt64Value_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_WrappersService_CreateUInt64Value_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_WrappersService_CreateUInt64Value_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -891,19 +931,21 @@ func RegisterWrappersServiceHandlerClient(ctx context.Context, mux *runtime.Serv
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateBytesValue")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateBytesValue", runtime.WithHTTPPathPattern("/v1/testBytes"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_WrappersService_CreateBytesValue_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_WrappersService_CreateBytesValue_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_WrappersService_CreateBytesValue_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_WrappersService_CreateBytesValue_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -911,19 +953,21 @@ func RegisterWrappersServiceHandlerClient(ctx context.Context, mux *runtime.Serv
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateEmpty")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateEmpty", runtime.WithHTTPPathPattern("/v1/testEmpty"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_WrappersService_CreateEmpty_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_WrappersService_CreateEmpty_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_WrappersService_CreateEmpty_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_WrappersService_CreateEmpty_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
diff --git a/examples/internal/proto/examplepb/wrappers.proto b/examples/internal/proto/examplepb/wrappers.proto
index 6ba2c6a0bd9..dcbd9d878ec 100644
--- a/examples/internal/proto/examplepb/wrappers.proto
+++ b/examples/internal/proto/examplepb/wrappers.proto
@@ -1,89 +1,91 @@
syntax = "proto3";
-option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/examplepb";
+
package grpc.gateway.examples.internal.proto.examplepb;
import "google/api/annotations.proto";
-import "google/protobuf/wrappers.proto";
import "google/protobuf/empty.proto";
+import "google/protobuf/wrappers.proto";
+
+option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/examplepb";
message Wrappers {
- google.protobuf.StringValue string_value = 1;
- google.protobuf.Int32Value int32_value = 2;
- google.protobuf.Int64Value int64_value = 3;
- google.protobuf.FloatValue float_value = 4;
- google.protobuf.DoubleValue double_value = 5;
- google.protobuf.BoolValue bool_value = 6;
- google.protobuf.UInt32Value uint32_value = 7;
- google.protobuf.UInt64Value uint64_value = 8;
- google.protobuf.BytesValue bytes_value = 9;
+ google.protobuf.StringValue string_value = 1;
+ google.protobuf.Int32Value int32_value = 2;
+ google.protobuf.Int64Value int64_value = 3;
+ google.protobuf.FloatValue float_value = 4;
+ google.protobuf.DoubleValue double_value = 5;
+ google.protobuf.BoolValue bool_value = 6;
+ google.protobuf.UInt32Value uint32_value = 7;
+ google.protobuf.UInt64Value uint64_value = 8;
+ google.protobuf.BytesValue bytes_value = 9;
}
service WrappersService {
- rpc Create(Wrappers) returns (Wrappers) {
- option (google.api.http) = {
- post: "/v1/example/wrappers"
- body: "*"
- };
- }
+ rpc Create(Wrappers) returns (Wrappers) {
+ option (google.api.http) = {
+ post: "/v1/example/wrappers"
+ body: "*"
+ };
+ }
- rpc CreateStringValue(google.protobuf.StringValue) returns (google.protobuf.StringValue) {
- option (google.api.http) = {
- post: "/v1/testString"
- body: "*"
- };
- }
- rpc CreateInt32Value(google.protobuf.Int32Value) returns (google.protobuf.Int32Value) {
- option (google.api.http) = {
- post: "/v1/testInt32"
- body: "*"
- };
- }
- rpc CreateInt64Value(google.protobuf.Int64Value) returns (google.protobuf.Int64Value){
- option (google.api.http) = {
- post: "/v1/testInt64"
- body: "*"
- };
- }
- rpc CreateFloatValue(google.protobuf.FloatValue) returns (google.protobuf.FloatValue){
- option (google.api.http) = {
- post: "/v1/testFloat"
- body: "*"
- };
- }
- rpc CreateDoubleValue(google.protobuf.DoubleValue) returns (google.protobuf.DoubleValue){
- option (google.api.http) = {
- post: "/v1/testDouble"
- body: "*"
- };
- }
- rpc CreateBoolValue(google.protobuf.BoolValue) returns (google.protobuf.BoolValue){
- option (google.api.http) = {
- post: "/v1/testBool"
- body: "*"
- };
- }
- rpc CreateUInt32Value(google.protobuf.UInt32Value) returns (google.protobuf.UInt32Value){
- option (google.api.http) = {
- post: "/v1/testUint32"
- body: "*"
- };
- }
- rpc CreateUInt64Value(google.protobuf.UInt64Value) returns (google.protobuf.UInt64Value){
- option (google.api.http) = {
- post: "/v1/testUint64"
- body: "*"
- };
- }
- rpc CreateBytesValue(google.protobuf.BytesValue) returns (google.protobuf.BytesValue){
- option (google.api.http) = {
- post: "/v1/testBytes"
- body: "*"
- };
- }
- rpc CreateEmpty(google.protobuf.Empty) returns (google.protobuf.Empty){
- option (google.api.http) = {
- post: "/v1/testEmpty"
- body: "*"
- };
- }
+ rpc CreateStringValue(google.protobuf.StringValue) returns (google.protobuf.StringValue) {
+ option (google.api.http) = {
+ post: "/v1/testString"
+ body: "*"
+ };
+ }
+ rpc CreateInt32Value(google.protobuf.Int32Value) returns (google.protobuf.Int32Value) {
+ option (google.api.http) = {
+ post: "/v1/testInt32"
+ body: "*"
+ };
+ }
+ rpc CreateInt64Value(google.protobuf.Int64Value) returns (google.protobuf.Int64Value) {
+ option (google.api.http) = {
+ post: "/v1/testInt64"
+ body: "*"
+ };
+ }
+ rpc CreateFloatValue(google.protobuf.FloatValue) returns (google.protobuf.FloatValue) {
+ option (google.api.http) = {
+ post: "/v1/testFloat"
+ body: "*"
+ };
+ }
+ rpc CreateDoubleValue(google.protobuf.DoubleValue) returns (google.protobuf.DoubleValue) {
+ option (google.api.http) = {
+ post: "/v1/testDouble"
+ body: "*"
+ };
+ }
+ rpc CreateBoolValue(google.protobuf.BoolValue) returns (google.protobuf.BoolValue) {
+ option (google.api.http) = {
+ post: "/v1/testBool"
+ body: "*"
+ };
+ }
+ rpc CreateUInt32Value(google.protobuf.UInt32Value) returns (google.protobuf.UInt32Value) {
+ option (google.api.http) = {
+ post: "/v1/testUint32"
+ body: "*"
+ };
+ }
+ rpc CreateUInt64Value(google.protobuf.UInt64Value) returns (google.protobuf.UInt64Value) {
+ option (google.api.http) = {
+ post: "/v1/testUint64"
+ body: "*"
+ };
+ }
+ rpc CreateBytesValue(google.protobuf.BytesValue) returns (google.protobuf.BytesValue) {
+ option (google.api.http) = {
+ post: "/v1/testBytes"
+ body: "*"
+ };
+ }
+ rpc CreateEmpty(google.protobuf.Empty) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ post: "/v1/testEmpty"
+ body: "*"
+ };
+ }
}
diff --git a/examples/internal/proto/examplepb/wrappers.swagger.json b/examples/internal/proto/examplepb/wrappers.swagger.json
index ca05367e616..44d8b61a897 100644
--- a/examples/internal/proto/examplepb/wrappers.swagger.json
+++ b/examples/internal/proto/examplepb/wrappers.swagger.json
@@ -155,6 +155,7 @@
"200": {
"description": "A successful response.",
"schema": {
+ "type": "object",
"properties": {}
}
},
@@ -171,6 +172,7 @@
"in": "body",
"required": true,
"schema": {
+ "type": "object",
"properties": {}
}
}
@@ -426,17 +428,13 @@
"protobufAny": {
"type": "object",
"properties": {
- "typeUrl": {
+ "@type": {
"type": "string",
"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",
- "format": "byte",
- "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\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 }"
+ "additionalProperties": {},
+ "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 := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(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 }"
},
"rpcStatus": {
"type": "object",
diff --git a/examples/internal/proto/examplepb/wrappers_grpc.pb.go b/examples/internal/proto/examplepb/wrappers_grpc.pb.go
index 3e3b7965bcf..6f3aa5f33ee 100644
--- a/examples/internal/proto/examplepb/wrappers_grpc.pb.go
+++ b/examples/internal/proto/examplepb/wrappers_grpc.pb.go
@@ -4,15 +4,16 @@ package examplepb
import (
context "context"
- empty "github.com/golang/protobuf/ptypes/empty"
- wrappers "github.com/golang/protobuf/ptypes/wrappers"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
+ emptypb "google.golang.org/protobuf/types/known/emptypb"
+ wrapperspb "google.golang.org/protobuf/types/known/wrapperspb"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
+// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// WrappersServiceClient is the client API for WrappersService service.
@@ -20,16 +21,16 @@ const _ = grpc.SupportPackageIsVersion7
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type WrappersServiceClient interface {
Create(ctx context.Context, in *Wrappers, opts ...grpc.CallOption) (*Wrappers, error)
- CreateStringValue(ctx context.Context, in *wrappers.StringValue, opts ...grpc.CallOption) (*wrappers.StringValue, error)
- CreateInt32Value(ctx context.Context, in *wrappers.Int32Value, opts ...grpc.CallOption) (*wrappers.Int32Value, error)
- CreateInt64Value(ctx context.Context, in *wrappers.Int64Value, opts ...grpc.CallOption) (*wrappers.Int64Value, error)
- CreateFloatValue(ctx context.Context, in *wrappers.FloatValue, opts ...grpc.CallOption) (*wrappers.FloatValue, error)
- CreateDoubleValue(ctx context.Context, in *wrappers.DoubleValue, opts ...grpc.CallOption) (*wrappers.DoubleValue, error)
- CreateBoolValue(ctx context.Context, in *wrappers.BoolValue, opts ...grpc.CallOption) (*wrappers.BoolValue, error)
- CreateUInt32Value(ctx context.Context, in *wrappers.UInt32Value, opts ...grpc.CallOption) (*wrappers.UInt32Value, error)
- CreateUInt64Value(ctx context.Context, in *wrappers.UInt64Value, opts ...grpc.CallOption) (*wrappers.UInt64Value, error)
- CreateBytesValue(ctx context.Context, in *wrappers.BytesValue, opts ...grpc.CallOption) (*wrappers.BytesValue, error)
- CreateEmpty(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error)
+ CreateStringValue(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (*wrapperspb.StringValue, error)
+ CreateInt32Value(ctx context.Context, in *wrapperspb.Int32Value, opts ...grpc.CallOption) (*wrapperspb.Int32Value, error)
+ CreateInt64Value(ctx context.Context, in *wrapperspb.Int64Value, opts ...grpc.CallOption) (*wrapperspb.Int64Value, error)
+ CreateFloatValue(ctx context.Context, in *wrapperspb.FloatValue, opts ...grpc.CallOption) (*wrapperspb.FloatValue, error)
+ CreateDoubleValue(ctx context.Context, in *wrapperspb.DoubleValue, opts ...grpc.CallOption) (*wrapperspb.DoubleValue, error)
+ CreateBoolValue(ctx context.Context, in *wrapperspb.BoolValue, opts ...grpc.CallOption) (*wrapperspb.BoolValue, error)
+ CreateUInt32Value(ctx context.Context, in *wrapperspb.UInt32Value, opts ...grpc.CallOption) (*wrapperspb.UInt32Value, error)
+ CreateUInt64Value(ctx context.Context, in *wrapperspb.UInt64Value, opts ...grpc.CallOption) (*wrapperspb.UInt64Value, error)
+ CreateBytesValue(ctx context.Context, in *wrapperspb.BytesValue, opts ...grpc.CallOption) (*wrapperspb.BytesValue, error)
+ CreateEmpty(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
}
type wrappersServiceClient struct {
@@ -49,8 +50,8 @@ func (c *wrappersServiceClient) Create(ctx context.Context, in *Wrappers, opts .
return out, nil
}
-func (c *wrappersServiceClient) CreateStringValue(ctx context.Context, in *wrappers.StringValue, opts ...grpc.CallOption) (*wrappers.StringValue, error) {
- out := new(wrappers.StringValue)
+func (c *wrappersServiceClient) CreateStringValue(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (*wrapperspb.StringValue, error) {
+ out := new(wrapperspb.StringValue)
err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateStringValue", in, out, opts...)
if err != nil {
return nil, err
@@ -58,8 +59,8 @@ func (c *wrappersServiceClient) CreateStringValue(ctx context.Context, in *wrapp
return out, nil
}
-func (c *wrappersServiceClient) CreateInt32Value(ctx context.Context, in *wrappers.Int32Value, opts ...grpc.CallOption) (*wrappers.Int32Value, error) {
- out := new(wrappers.Int32Value)
+func (c *wrappersServiceClient) CreateInt32Value(ctx context.Context, in *wrapperspb.Int32Value, opts ...grpc.CallOption) (*wrapperspb.Int32Value, error) {
+ out := new(wrapperspb.Int32Value)
err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateInt32Value", in, out, opts...)
if err != nil {
return nil, err
@@ -67,8 +68,8 @@ func (c *wrappersServiceClient) CreateInt32Value(ctx context.Context, in *wrappe
return out, nil
}
-func (c *wrappersServiceClient) CreateInt64Value(ctx context.Context, in *wrappers.Int64Value, opts ...grpc.CallOption) (*wrappers.Int64Value, error) {
- out := new(wrappers.Int64Value)
+func (c *wrappersServiceClient) CreateInt64Value(ctx context.Context, in *wrapperspb.Int64Value, opts ...grpc.CallOption) (*wrapperspb.Int64Value, error) {
+ out := new(wrapperspb.Int64Value)
err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateInt64Value", in, out, opts...)
if err != nil {
return nil, err
@@ -76,8 +77,8 @@ func (c *wrappersServiceClient) CreateInt64Value(ctx context.Context, in *wrappe
return out, nil
}
-func (c *wrappersServiceClient) CreateFloatValue(ctx context.Context, in *wrappers.FloatValue, opts ...grpc.CallOption) (*wrappers.FloatValue, error) {
- out := new(wrappers.FloatValue)
+func (c *wrappersServiceClient) CreateFloatValue(ctx context.Context, in *wrapperspb.FloatValue, opts ...grpc.CallOption) (*wrapperspb.FloatValue, error) {
+ out := new(wrapperspb.FloatValue)
err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateFloatValue", in, out, opts...)
if err != nil {
return nil, err
@@ -85,8 +86,8 @@ func (c *wrappersServiceClient) CreateFloatValue(ctx context.Context, in *wrappe
return out, nil
}
-func (c *wrappersServiceClient) CreateDoubleValue(ctx context.Context, in *wrappers.DoubleValue, opts ...grpc.CallOption) (*wrappers.DoubleValue, error) {
- out := new(wrappers.DoubleValue)
+func (c *wrappersServiceClient) CreateDoubleValue(ctx context.Context, in *wrapperspb.DoubleValue, opts ...grpc.CallOption) (*wrapperspb.DoubleValue, error) {
+ out := new(wrapperspb.DoubleValue)
err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateDoubleValue", in, out, opts...)
if err != nil {
return nil, err
@@ -94,8 +95,8 @@ func (c *wrappersServiceClient) CreateDoubleValue(ctx context.Context, in *wrapp
return out, nil
}
-func (c *wrappersServiceClient) CreateBoolValue(ctx context.Context, in *wrappers.BoolValue, opts ...grpc.CallOption) (*wrappers.BoolValue, error) {
- out := new(wrappers.BoolValue)
+func (c *wrappersServiceClient) CreateBoolValue(ctx context.Context, in *wrapperspb.BoolValue, opts ...grpc.CallOption) (*wrapperspb.BoolValue, error) {
+ out := new(wrapperspb.BoolValue)
err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateBoolValue", in, out, opts...)
if err != nil {
return nil, err
@@ -103,8 +104,8 @@ func (c *wrappersServiceClient) CreateBoolValue(ctx context.Context, in *wrapper
return out, nil
}
-func (c *wrappersServiceClient) CreateUInt32Value(ctx context.Context, in *wrappers.UInt32Value, opts ...grpc.CallOption) (*wrappers.UInt32Value, error) {
- out := new(wrappers.UInt32Value)
+func (c *wrappersServiceClient) CreateUInt32Value(ctx context.Context, in *wrapperspb.UInt32Value, opts ...grpc.CallOption) (*wrapperspb.UInt32Value, error) {
+ out := new(wrapperspb.UInt32Value)
err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateUInt32Value", in, out, opts...)
if err != nil {
return nil, err
@@ -112,8 +113,8 @@ func (c *wrappersServiceClient) CreateUInt32Value(ctx context.Context, in *wrapp
return out, nil
}
-func (c *wrappersServiceClient) CreateUInt64Value(ctx context.Context, in *wrappers.UInt64Value, opts ...grpc.CallOption) (*wrappers.UInt64Value, error) {
- out := new(wrappers.UInt64Value)
+func (c *wrappersServiceClient) CreateUInt64Value(ctx context.Context, in *wrapperspb.UInt64Value, opts ...grpc.CallOption) (*wrapperspb.UInt64Value, error) {
+ out := new(wrapperspb.UInt64Value)
err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateUInt64Value", in, out, opts...)
if err != nil {
return nil, err
@@ -121,8 +122,8 @@ func (c *wrappersServiceClient) CreateUInt64Value(ctx context.Context, in *wrapp
return out, nil
}
-func (c *wrappersServiceClient) CreateBytesValue(ctx context.Context, in *wrappers.BytesValue, opts ...grpc.CallOption) (*wrappers.BytesValue, error) {
- out := new(wrappers.BytesValue)
+func (c *wrappersServiceClient) CreateBytesValue(ctx context.Context, in *wrapperspb.BytesValue, opts ...grpc.CallOption) (*wrapperspb.BytesValue, error) {
+ out := new(wrapperspb.BytesValue)
err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateBytesValue", in, out, opts...)
if err != nil {
return nil, err
@@ -130,8 +131,8 @@ func (c *wrappersServiceClient) CreateBytesValue(ctx context.Context, in *wrappe
return out, nil
}
-func (c *wrappersServiceClient) CreateEmpty(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error) {
- out := new(empty.Empty)
+func (c *wrappersServiceClient) CreateEmpty(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) {
+ out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateEmpty", in, out, opts...)
if err != nil {
return nil, err
@@ -144,16 +145,16 @@ func (c *wrappersServiceClient) CreateEmpty(ctx context.Context, in *empty.Empty
// for forward compatibility
type WrappersServiceServer interface {
Create(context.Context, *Wrappers) (*Wrappers, error)
- CreateStringValue(context.Context, *wrappers.StringValue) (*wrappers.StringValue, error)
- CreateInt32Value(context.Context, *wrappers.Int32Value) (*wrappers.Int32Value, error)
- CreateInt64Value(context.Context, *wrappers.Int64Value) (*wrappers.Int64Value, error)
- CreateFloatValue(context.Context, *wrappers.FloatValue) (*wrappers.FloatValue, error)
- CreateDoubleValue(context.Context, *wrappers.DoubleValue) (*wrappers.DoubleValue, error)
- CreateBoolValue(context.Context, *wrappers.BoolValue) (*wrappers.BoolValue, error)
- CreateUInt32Value(context.Context, *wrappers.UInt32Value) (*wrappers.UInt32Value, error)
- CreateUInt64Value(context.Context, *wrappers.UInt64Value) (*wrappers.UInt64Value, error)
- CreateBytesValue(context.Context, *wrappers.BytesValue) (*wrappers.BytesValue, error)
- CreateEmpty(context.Context, *empty.Empty) (*empty.Empty, error)
+ CreateStringValue(context.Context, *wrapperspb.StringValue) (*wrapperspb.StringValue, error)
+ CreateInt32Value(context.Context, *wrapperspb.Int32Value) (*wrapperspb.Int32Value, error)
+ CreateInt64Value(context.Context, *wrapperspb.Int64Value) (*wrapperspb.Int64Value, error)
+ CreateFloatValue(context.Context, *wrapperspb.FloatValue) (*wrapperspb.FloatValue, error)
+ CreateDoubleValue(context.Context, *wrapperspb.DoubleValue) (*wrapperspb.DoubleValue, error)
+ CreateBoolValue(context.Context, *wrapperspb.BoolValue) (*wrapperspb.BoolValue, error)
+ CreateUInt32Value(context.Context, *wrapperspb.UInt32Value) (*wrapperspb.UInt32Value, error)
+ CreateUInt64Value(context.Context, *wrapperspb.UInt64Value) (*wrapperspb.UInt64Value, error)
+ CreateBytesValue(context.Context, *wrapperspb.BytesValue) (*wrapperspb.BytesValue, error)
+ CreateEmpty(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
}
// UnimplementedWrappersServiceServer should be embedded to have forward compatible implementations.
@@ -163,34 +164,34 @@ type UnimplementedWrappersServiceServer struct {
func (UnimplementedWrappersServiceServer) Create(context.Context, *Wrappers) (*Wrappers, error) {
return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
}
-func (UnimplementedWrappersServiceServer) CreateStringValue(context.Context, *wrappers.StringValue) (*wrappers.StringValue, error) {
+func (UnimplementedWrappersServiceServer) CreateStringValue(context.Context, *wrapperspb.StringValue) (*wrapperspb.StringValue, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateStringValue not implemented")
}
-func (UnimplementedWrappersServiceServer) CreateInt32Value(context.Context, *wrappers.Int32Value) (*wrappers.Int32Value, error) {
+func (UnimplementedWrappersServiceServer) CreateInt32Value(context.Context, *wrapperspb.Int32Value) (*wrapperspb.Int32Value, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateInt32Value not implemented")
}
-func (UnimplementedWrappersServiceServer) CreateInt64Value(context.Context, *wrappers.Int64Value) (*wrappers.Int64Value, error) {
+func (UnimplementedWrappersServiceServer) CreateInt64Value(context.Context, *wrapperspb.Int64Value) (*wrapperspb.Int64Value, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateInt64Value not implemented")
}
-func (UnimplementedWrappersServiceServer) CreateFloatValue(context.Context, *wrappers.FloatValue) (*wrappers.FloatValue, error) {
+func (UnimplementedWrappersServiceServer) CreateFloatValue(context.Context, *wrapperspb.FloatValue) (*wrapperspb.FloatValue, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateFloatValue not implemented")
}
-func (UnimplementedWrappersServiceServer) CreateDoubleValue(context.Context, *wrappers.DoubleValue) (*wrappers.DoubleValue, error) {
+func (UnimplementedWrappersServiceServer) CreateDoubleValue(context.Context, *wrapperspb.DoubleValue) (*wrapperspb.DoubleValue, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateDoubleValue not implemented")
}
-func (UnimplementedWrappersServiceServer) CreateBoolValue(context.Context, *wrappers.BoolValue) (*wrappers.BoolValue, error) {
+func (UnimplementedWrappersServiceServer) CreateBoolValue(context.Context, *wrapperspb.BoolValue) (*wrapperspb.BoolValue, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateBoolValue not implemented")
}
-func (UnimplementedWrappersServiceServer) CreateUInt32Value(context.Context, *wrappers.UInt32Value) (*wrappers.UInt32Value, error) {
+func (UnimplementedWrappersServiceServer) CreateUInt32Value(context.Context, *wrapperspb.UInt32Value) (*wrapperspb.UInt32Value, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateUInt32Value not implemented")
}
-func (UnimplementedWrappersServiceServer) CreateUInt64Value(context.Context, *wrappers.UInt64Value) (*wrappers.UInt64Value, error) {
+func (UnimplementedWrappersServiceServer) CreateUInt64Value(context.Context, *wrapperspb.UInt64Value) (*wrapperspb.UInt64Value, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateUInt64Value not implemented")
}
-func (UnimplementedWrappersServiceServer) CreateBytesValue(context.Context, *wrappers.BytesValue) (*wrappers.BytesValue, error) {
+func (UnimplementedWrappersServiceServer) CreateBytesValue(context.Context, *wrapperspb.BytesValue) (*wrapperspb.BytesValue, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateBytesValue not implemented")
}
-func (UnimplementedWrappersServiceServer) CreateEmpty(context.Context, *empty.Empty) (*empty.Empty, error) {
+func (UnimplementedWrappersServiceServer) CreateEmpty(context.Context, *emptypb.Empty) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateEmpty not implemented")
}
@@ -201,8 +202,8 @@ type UnsafeWrappersServiceServer interface {
mustEmbedUnimplementedWrappersServiceServer()
}
-func RegisterWrappersServiceServer(s *grpc.Server, srv WrappersServiceServer) {
- s.RegisterService(&_WrappersService_serviceDesc, srv)
+func RegisterWrappersServiceServer(s grpc.ServiceRegistrar, srv WrappersServiceServer) {
+ s.RegisterService(&WrappersService_ServiceDesc, srv)
}
func _WrappersService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
@@ -224,7 +225,7 @@ func _WrappersService_Create_Handler(srv interface{}, ctx context.Context, dec f
}
func _WrappersService_CreateStringValue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(wrappers.StringValue)
+ in := new(wrapperspb.StringValue)
if err := dec(in); err != nil {
return nil, err
}
@@ -236,13 +237,13 @@ func _WrappersService_CreateStringValue_Handler(srv interface{}, ctx context.Con
FullMethod: "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateStringValue",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(WrappersServiceServer).CreateStringValue(ctx, req.(*wrappers.StringValue))
+ return srv.(WrappersServiceServer).CreateStringValue(ctx, req.(*wrapperspb.StringValue))
}
return interceptor(ctx, in, info, handler)
}
func _WrappersService_CreateInt32Value_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(wrappers.Int32Value)
+ in := new(wrapperspb.Int32Value)
if err := dec(in); err != nil {
return nil, err
}
@@ -254,13 +255,13 @@ func _WrappersService_CreateInt32Value_Handler(srv interface{}, ctx context.Cont
FullMethod: "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateInt32Value",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(WrappersServiceServer).CreateInt32Value(ctx, req.(*wrappers.Int32Value))
+ return srv.(WrappersServiceServer).CreateInt32Value(ctx, req.(*wrapperspb.Int32Value))
}
return interceptor(ctx, in, info, handler)
}
func _WrappersService_CreateInt64Value_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(wrappers.Int64Value)
+ in := new(wrapperspb.Int64Value)
if err := dec(in); err != nil {
return nil, err
}
@@ -272,13 +273,13 @@ func _WrappersService_CreateInt64Value_Handler(srv interface{}, ctx context.Cont
FullMethod: "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateInt64Value",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(WrappersServiceServer).CreateInt64Value(ctx, req.(*wrappers.Int64Value))
+ return srv.(WrappersServiceServer).CreateInt64Value(ctx, req.(*wrapperspb.Int64Value))
}
return interceptor(ctx, in, info, handler)
}
func _WrappersService_CreateFloatValue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(wrappers.FloatValue)
+ in := new(wrapperspb.FloatValue)
if err := dec(in); err != nil {
return nil, err
}
@@ -290,13 +291,13 @@ func _WrappersService_CreateFloatValue_Handler(srv interface{}, ctx context.Cont
FullMethod: "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateFloatValue",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(WrappersServiceServer).CreateFloatValue(ctx, req.(*wrappers.FloatValue))
+ return srv.(WrappersServiceServer).CreateFloatValue(ctx, req.(*wrapperspb.FloatValue))
}
return interceptor(ctx, in, info, handler)
}
func _WrappersService_CreateDoubleValue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(wrappers.DoubleValue)
+ in := new(wrapperspb.DoubleValue)
if err := dec(in); err != nil {
return nil, err
}
@@ -308,13 +309,13 @@ func _WrappersService_CreateDoubleValue_Handler(srv interface{}, ctx context.Con
FullMethod: "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateDoubleValue",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(WrappersServiceServer).CreateDoubleValue(ctx, req.(*wrappers.DoubleValue))
+ return srv.(WrappersServiceServer).CreateDoubleValue(ctx, req.(*wrapperspb.DoubleValue))
}
return interceptor(ctx, in, info, handler)
}
func _WrappersService_CreateBoolValue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(wrappers.BoolValue)
+ in := new(wrapperspb.BoolValue)
if err := dec(in); err != nil {
return nil, err
}
@@ -326,13 +327,13 @@ func _WrappersService_CreateBoolValue_Handler(srv interface{}, ctx context.Conte
FullMethod: "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateBoolValue",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(WrappersServiceServer).CreateBoolValue(ctx, req.(*wrappers.BoolValue))
+ return srv.(WrappersServiceServer).CreateBoolValue(ctx, req.(*wrapperspb.BoolValue))
}
return interceptor(ctx, in, info, handler)
}
func _WrappersService_CreateUInt32Value_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(wrappers.UInt32Value)
+ in := new(wrapperspb.UInt32Value)
if err := dec(in); err != nil {
return nil, err
}
@@ -344,13 +345,13 @@ func _WrappersService_CreateUInt32Value_Handler(srv interface{}, ctx context.Con
FullMethod: "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateUInt32Value",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(WrappersServiceServer).CreateUInt32Value(ctx, req.(*wrappers.UInt32Value))
+ return srv.(WrappersServiceServer).CreateUInt32Value(ctx, req.(*wrapperspb.UInt32Value))
}
return interceptor(ctx, in, info, handler)
}
func _WrappersService_CreateUInt64Value_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(wrappers.UInt64Value)
+ in := new(wrapperspb.UInt64Value)
if err := dec(in); err != nil {
return nil, err
}
@@ -362,13 +363,13 @@ func _WrappersService_CreateUInt64Value_Handler(srv interface{}, ctx context.Con
FullMethod: "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateUInt64Value",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(WrappersServiceServer).CreateUInt64Value(ctx, req.(*wrappers.UInt64Value))
+ return srv.(WrappersServiceServer).CreateUInt64Value(ctx, req.(*wrapperspb.UInt64Value))
}
return interceptor(ctx, in, info, handler)
}
func _WrappersService_CreateBytesValue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(wrappers.BytesValue)
+ in := new(wrapperspb.BytesValue)
if err := dec(in); err != nil {
return nil, err
}
@@ -380,13 +381,13 @@ func _WrappersService_CreateBytesValue_Handler(srv interface{}, ctx context.Cont
FullMethod: "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateBytesValue",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(WrappersServiceServer).CreateBytesValue(ctx, req.(*wrappers.BytesValue))
+ return srv.(WrappersServiceServer).CreateBytesValue(ctx, req.(*wrapperspb.BytesValue))
}
return interceptor(ctx, in, info, handler)
}
func _WrappersService_CreateEmpty_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(empty.Empty)
+ in := new(emptypb.Empty)
if err := dec(in); err != nil {
return nil, err
}
@@ -398,12 +399,15 @@ func _WrappersService_CreateEmpty_Handler(srv interface{}, ctx context.Context,
FullMethod: "/grpc.gateway.examples.internal.proto.examplepb.WrappersService/CreateEmpty",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(WrappersServiceServer).CreateEmpty(ctx, req.(*empty.Empty))
+ return srv.(WrappersServiceServer).CreateEmpty(ctx, req.(*emptypb.Empty))
}
return interceptor(ctx, in, info, handler)
}
-var _WrappersService_serviceDesc = grpc.ServiceDesc{
+// WrappersService_ServiceDesc is the grpc.ServiceDesc for WrappersService service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var WrappersService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "grpc.gateway.examples.internal.proto.examplepb.WrappersService",
HandlerType: (*WrappersServiceServer)(nil),
Methods: []grpc.MethodDesc{
diff --git a/examples/internal/proto/oneofenum/BUILD.bazel b/examples/internal/proto/oneofenum/BUILD.bazel
new file mode 100644
index 00000000000..22e1a938ef7
--- /dev/null
+++ b/examples/internal/proto/oneofenum/BUILD.bazel
@@ -0,0 +1,29 @@
+load("@rules_proto//proto:defs.bzl", "proto_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library")
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+
+package(default_visibility = ["//visibility:public"])
+
+proto_library(
+ name = "oneofenum_proto",
+ srcs = ["oneof_enum.proto"],
+)
+
+go_proto_library(
+ name = "oneofenum_go_proto",
+ compilers = ["//:go_apiv2"],
+ importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/oneofenum",
+ proto = ":oneofenum_proto",
+)
+
+go_library(
+ name = "oneofenum",
+ embed = [":oneofenum_go_proto"],
+ importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/oneofenum",
+)
+
+alias(
+ name = "go_default_library",
+ actual = ":oneofenum",
+ visibility = ["//examples:__subpackages__"],
+)
diff --git a/examples/internal/proto/oneofenum/oneof_enum.pb.go b/examples/internal/proto/oneofenum/oneof_enum.pb.go
new file mode 100644
index 00000000000..3a728cbdaf6
--- /dev/null
+++ b/examples/internal/proto/oneofenum/oneof_enum.pb.go
@@ -0,0 +1,232 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.27.1
+// protoc (unknown)
+// source: examples/internal/proto/oneofenum/oneof_enum.proto
+
+package oneofenum
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type ExampleEnum int32
+
+const (
+ ExampleEnum_EXAMPLE_ENUM_UNSPECIFIED ExampleEnum = 0
+ ExampleEnum_EXAMPLE_ENUM_FIRST ExampleEnum = 1
+)
+
+// Enum value maps for ExampleEnum.
+var (
+ ExampleEnum_name = map[int32]string{
+ 0: "EXAMPLE_ENUM_UNSPECIFIED",
+ 1: "EXAMPLE_ENUM_FIRST",
+ }
+ ExampleEnum_value = map[string]int32{
+ "EXAMPLE_ENUM_UNSPECIFIED": 0,
+ "EXAMPLE_ENUM_FIRST": 1,
+ }
+)
+
+func (x ExampleEnum) Enum() *ExampleEnum {
+ p := new(ExampleEnum)
+ *p = x
+ return p
+}
+
+func (x ExampleEnum) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (ExampleEnum) Descriptor() protoreflect.EnumDescriptor {
+ return file_examples_internal_proto_oneofenum_oneof_enum_proto_enumTypes[0].Descriptor()
+}
+
+func (ExampleEnum) Type() protoreflect.EnumType {
+ return &file_examples_internal_proto_oneofenum_oneof_enum_proto_enumTypes[0]
+}
+
+func (x ExampleEnum) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use ExampleEnum.Descriptor instead.
+func (ExampleEnum) EnumDescriptor() ([]byte, []int) {
+ return file_examples_internal_proto_oneofenum_oneof_enum_proto_rawDescGZIP(), []int{0}
+}
+
+type OneofEnumMessage struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Types that are assignable to One:
+ // *OneofEnumMessage_ExampleEnum
+ One isOneofEnumMessage_One `protobuf_oneof:"one"`
+}
+
+func (x *OneofEnumMessage) Reset() {
+ *x = OneofEnumMessage{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_examples_internal_proto_oneofenum_oneof_enum_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *OneofEnumMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*OneofEnumMessage) ProtoMessage() {}
+
+func (x *OneofEnumMessage) ProtoReflect() protoreflect.Message {
+ mi := &file_examples_internal_proto_oneofenum_oneof_enum_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use OneofEnumMessage.ProtoReflect.Descriptor instead.
+func (*OneofEnumMessage) Descriptor() ([]byte, []int) {
+ return file_examples_internal_proto_oneofenum_oneof_enum_proto_rawDescGZIP(), []int{0}
+}
+
+func (m *OneofEnumMessage) GetOne() isOneofEnumMessage_One {
+ if m != nil {
+ return m.One
+ }
+ return nil
+}
+
+func (x *OneofEnumMessage) GetExampleEnum() ExampleEnum {
+ if x, ok := x.GetOne().(*OneofEnumMessage_ExampleEnum); ok {
+ return x.ExampleEnum
+ }
+ return ExampleEnum_EXAMPLE_ENUM_UNSPECIFIED
+}
+
+type isOneofEnumMessage_One interface {
+ isOneofEnumMessage_One()
+}
+
+type OneofEnumMessage_ExampleEnum struct {
+ ExampleEnum ExampleEnum `protobuf:"varint,1,opt,name=example_enum,json=exampleEnum,proto3,enum=grpc.gateway.examples.internal.proto.oneofenum.ExampleEnum,oneof"`
+}
+
+func (*OneofEnumMessage_ExampleEnum) isOneofEnumMessage_One() {}
+
+var File_examples_internal_proto_oneofenum_oneof_enum_proto protoreflect.FileDescriptor
+
+var file_examples_internal_proto_oneofenum_oneof_enum_proto_rawDesc = []byte{
+ 0x0a, 0x32, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72,
+ 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x65,
+ 0x6e, 0x75, 0x6d, 0x2f, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x12, 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, 0x6f, 0x6e, 0x65, 0x6f, 0x66,
+ 0x65, 0x6e, 0x75, 0x6d, 0x22, 0x7b, 0x0a, 0x10, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x45, 0x6e, 0x75,
+ 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x60, 0x0a, 0x0c, 0x65, 0x78, 0x61, 0x6d,
+ 0x70, 0x6c, 0x65, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 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, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x65, 0x6e, 0x75, 0x6d, 0x2e,
+ 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x0b, 0x65,
+ 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x45, 0x6e, 0x75, 0x6d, 0x42, 0x05, 0x0a, 0x03, 0x6f, 0x6e,
+ 0x65, 0x2a, 0x43, 0x0a, 0x0b, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x45, 0x6e, 0x75, 0x6d,
+ 0x12, 0x1c, 0x0a, 0x18, 0x45, 0x58, 0x41, 0x4d, 0x50, 0x4c, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d,
+ 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x16,
+ 0x0a, 0x12, 0x45, 0x58, 0x41, 0x4d, 0x50, 0x4c, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x46,
+ 0x49, 0x52, 0x53, 0x54, 0x10, 0x01, 0x42, 0x4d, 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, 0x6f, 0x6e, 0x65, 0x6f,
+ 0x66, 0x65, 0x6e, 0x75, 0x6d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_examples_internal_proto_oneofenum_oneof_enum_proto_rawDescOnce sync.Once
+ file_examples_internal_proto_oneofenum_oneof_enum_proto_rawDescData = file_examples_internal_proto_oneofenum_oneof_enum_proto_rawDesc
+)
+
+func file_examples_internal_proto_oneofenum_oneof_enum_proto_rawDescGZIP() []byte {
+ file_examples_internal_proto_oneofenum_oneof_enum_proto_rawDescOnce.Do(func() {
+ file_examples_internal_proto_oneofenum_oneof_enum_proto_rawDescData = protoimpl.X.CompressGZIP(file_examples_internal_proto_oneofenum_oneof_enum_proto_rawDescData)
+ })
+ return file_examples_internal_proto_oneofenum_oneof_enum_proto_rawDescData
+}
+
+var file_examples_internal_proto_oneofenum_oneof_enum_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
+var file_examples_internal_proto_oneofenum_oneof_enum_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_examples_internal_proto_oneofenum_oneof_enum_proto_goTypes = []interface{}{
+ (ExampleEnum)(0), // 0: grpc.gateway.examples.internal.proto.oneofenum.ExampleEnum
+ (*OneofEnumMessage)(nil), // 1: grpc.gateway.examples.internal.proto.oneofenum.OneofEnumMessage
+}
+var file_examples_internal_proto_oneofenum_oneof_enum_proto_depIdxs = []int32{
+ 0, // 0: grpc.gateway.examples.internal.proto.oneofenum.OneofEnumMessage.example_enum:type_name -> grpc.gateway.examples.internal.proto.oneofenum.ExampleEnum
+ 1, // [1:1] is the sub-list for method output_type
+ 1, // [1:1] is the sub-list for method input_type
+ 1, // [1:1] is the sub-list for extension type_name
+ 1, // [1:1] is the sub-list for extension extendee
+ 0, // [0:1] is the sub-list for field type_name
+}
+
+func init() { file_examples_internal_proto_oneofenum_oneof_enum_proto_init() }
+func file_examples_internal_proto_oneofenum_oneof_enum_proto_init() {
+ if File_examples_internal_proto_oneofenum_oneof_enum_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_examples_internal_proto_oneofenum_oneof_enum_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*OneofEnumMessage); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ file_examples_internal_proto_oneofenum_oneof_enum_proto_msgTypes[0].OneofWrappers = []interface{}{
+ (*OneofEnumMessage_ExampleEnum)(nil),
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_examples_internal_proto_oneofenum_oneof_enum_proto_rawDesc,
+ NumEnums: 1,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_examples_internal_proto_oneofenum_oneof_enum_proto_goTypes,
+ DependencyIndexes: file_examples_internal_proto_oneofenum_oneof_enum_proto_depIdxs,
+ EnumInfos: file_examples_internal_proto_oneofenum_oneof_enum_proto_enumTypes,
+ MessageInfos: file_examples_internal_proto_oneofenum_oneof_enum_proto_msgTypes,
+ }.Build()
+ File_examples_internal_proto_oneofenum_oneof_enum_proto = out.File
+ file_examples_internal_proto_oneofenum_oneof_enum_proto_rawDesc = nil
+ file_examples_internal_proto_oneofenum_oneof_enum_proto_goTypes = nil
+ file_examples_internal_proto_oneofenum_oneof_enum_proto_depIdxs = nil
+}
diff --git a/examples/internal/proto/oneofenum/oneof_enum.proto b/examples/internal/proto/oneofenum/oneof_enum.proto
new file mode 100644
index 00000000000..2aae719ec09
--- /dev/null
+++ b/examples/internal/proto/oneofenum/oneof_enum.proto
@@ -0,0 +1,16 @@
+syntax = "proto3";
+
+package grpc.gateway.examples.internal.proto.oneofenum;
+
+option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/oneofenum";
+
+enum ExampleEnum {
+ EXAMPLE_ENUM_UNSPECIFIED = 0;
+ EXAMPLE_ENUM_FIRST = 1;
+}
+
+message OneofEnumMessage {
+ oneof one {
+ ExampleEnum example_enum = 1;
+ }
+}
diff --git a/examples/internal/proto/oneofenum/oneof_enum.swagger.json b/examples/internal/proto/oneofenum/oneof_enum.swagger.json
new file mode 100644
index 00000000000..154d7ba09b2
--- /dev/null
+++ b/examples/internal/proto/oneofenum/oneof_enum.swagger.json
@@ -0,0 +1,43 @@
+{
+ "swagger": "2.0",
+ "info": {
+ "title": "examples/internal/proto/oneofenum/oneof_enum.proto",
+ "version": "version not set"
+ },
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "paths": {},
+ "definitions": {
+ "protobufAny": {
+ "type": "object",
+ "properties": {
+ "@type": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": {}
+ },
+ "rpcStatus": {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "message": {
+ "type": "string"
+ },
+ "details": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/protobufAny"
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/examples/internal/proto/pathenum/BUILD.bazel b/examples/internal/proto/pathenum/BUILD.bazel
index 5f33fab0cf7..4af5489a080 100644
--- a/examples/internal/proto/pathenum/BUILD.bazel
+++ b/examples/internal/proto/pathenum/BUILD.bazel
@@ -17,7 +17,13 @@ go_proto_library(
)
go_library(
- name = "go_default_library",
+ name = "pathenum",
embed = [":pathenum_go_proto"],
importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/pathenum",
)
+
+alias(
+ name = "go_default_library",
+ actual = ":pathenum",
+ visibility = ["//examples:__subpackages__"],
+)
diff --git a/examples/internal/proto/pathenum/path_enum.pb.go b/examples/internal/proto/pathenum/path_enum.pb.go
index 5ccaef4948d..f6add3c00c3 100644
--- a/examples/internal/proto/pathenum/path_enum.pb.go
+++ b/examples/internal/proto/pathenum/path_enum.pb.go
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.26.0
-// protoc v3.13.0
+// protoc-gen-go v1.27.1
+// protoc (unknown)
// source: examples/internal/proto/pathenum/path_enum.proto
package pathenum
@@ -66,6 +66,57 @@ func (PathEnum) EnumDescriptor() ([]byte, []int) {
return file_examples_internal_proto_pathenum_path_enum_proto_rawDescGZIP(), []int{0}
}
+// Ignoring lint warnings as this enum type exist to validate proper functionality
+// for projects that don't follow these lint rules.
+// buf:lint:ignore ENUM_PASCAL_CASE
+type SnakeCaseForImport int32
+
+const (
+ // buf:lint:ignore ENUM_VALUE_UPPER_SNAKE_CASE
+ SnakeCaseForImport_value_x SnakeCaseForImport = 0
+ // buf:lint:ignore ENUM_VALUE_UPPER_SNAKE_CASE
+ SnakeCaseForImport_value_y SnakeCaseForImport = 1
+)
+
+// Enum value maps for SnakeCaseForImport.
+var (
+ SnakeCaseForImport_name = map[int32]string{
+ 0: "value_x",
+ 1: "value_y",
+ }
+ SnakeCaseForImport_value = map[string]int32{
+ "value_x": 0,
+ "value_y": 1,
+ }
+)
+
+func (x SnakeCaseForImport) Enum() *SnakeCaseForImport {
+ p := new(SnakeCaseForImport)
+ *p = x
+ return p
+}
+
+func (x SnakeCaseForImport) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (SnakeCaseForImport) Descriptor() protoreflect.EnumDescriptor {
+ return file_examples_internal_proto_pathenum_path_enum_proto_enumTypes[1].Descriptor()
+}
+
+func (SnakeCaseForImport) Type() protoreflect.EnumType {
+ return &file_examples_internal_proto_pathenum_path_enum_proto_enumTypes[1]
+}
+
+func (x SnakeCaseForImport) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use SnakeCaseForImport.Descriptor instead.
+func (SnakeCaseForImport) EnumDescriptor() ([]byte, []int) {
+ return file_examples_internal_proto_pathenum_path_enum_proto_rawDescGZIP(), []int{1}
+}
+
type MessagePathEnum_NestedPathEnum int32
const (
@@ -96,11 +147,11 @@ func (x MessagePathEnum_NestedPathEnum) String() string {
}
func (MessagePathEnum_NestedPathEnum) Descriptor() protoreflect.EnumDescriptor {
- return file_examples_internal_proto_pathenum_path_enum_proto_enumTypes[1].Descriptor()
+ return file_examples_internal_proto_pathenum_path_enum_proto_enumTypes[2].Descriptor()
}
func (MessagePathEnum_NestedPathEnum) Type() protoreflect.EnumType {
- return &file_examples_internal_proto_pathenum_path_enum_proto_enumTypes[1]
+ return &file_examples_internal_proto_pathenum_path_enum_proto_enumTypes[2]
}
func (x MessagePathEnum_NestedPathEnum) Number() protoreflect.EnumNumber {
@@ -271,13 +322,16 @@ var file_examples_internal_proto_pathenum_path_enum_proto_rawDesc = []byte{
0x50, 0x61, 0x74, 0x68, 0x45, 0x6e, 0x75, 0x6d, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x50,
0x61, 0x74, 0x68, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2a, 0x1c,
0x0a, 0x08, 0x50, 0x61, 0x74, 0x68, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x42,
- 0x43, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x44, 0x45, 0x46, 0x10, 0x01, 0x42, 0x4c, 0x5a, 0x4a,
- 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, 0x70, 0x61, 0x74, 0x68, 0x65, 0x6e, 0x75, 0x6d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x33,
+ 0x43, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x44, 0x45, 0x46, 0x10, 0x01, 0x2a, 0x31, 0x0a, 0x15,
+ 0x73, 0x6e, 0x61, 0x6b, 0x65, 0x5f, 0x63, 0x61, 0x73, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x69,
+ 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x0b, 0x0a, 0x07, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x78,
+ 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x79, 0x10, 0x01, 0x42,
+ 0x4c, 0x5a, 0x4a, 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, 0x70, 0x61, 0x74, 0x68, 0x65, 0x6e, 0x75, 0x6d, 0x62, 0x06, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -292,18 +346,19 @@ func file_examples_internal_proto_pathenum_path_enum_proto_rawDescGZIP() []byte
return file_examples_internal_proto_pathenum_path_enum_proto_rawDescData
}
-var file_examples_internal_proto_pathenum_path_enum_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
+var file_examples_internal_proto_pathenum_path_enum_proto_enumTypes = make([]protoimpl.EnumInfo, 3)
var file_examples_internal_proto_pathenum_path_enum_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_examples_internal_proto_pathenum_path_enum_proto_goTypes = []interface{}{
(PathEnum)(0), // 0: grpc.gateway.examples.internal.pathenum.PathEnum
- (MessagePathEnum_NestedPathEnum)(0), // 1: grpc.gateway.examples.internal.pathenum.MessagePathEnum.NestedPathEnum
- (*MessagePathEnum)(nil), // 2: grpc.gateway.examples.internal.pathenum.MessagePathEnum
- (*MessageWithPathEnum)(nil), // 3: grpc.gateway.examples.internal.pathenum.MessageWithPathEnum
- (*MessageWithNestedPathEnum)(nil), // 4: grpc.gateway.examples.internal.pathenum.MessageWithNestedPathEnum
+ (SnakeCaseForImport)(0), // 1: grpc.gateway.examples.internal.pathenum.snake_case_for_import
+ (MessagePathEnum_NestedPathEnum)(0), // 2: grpc.gateway.examples.internal.pathenum.MessagePathEnum.NestedPathEnum
+ (*MessagePathEnum)(nil), // 3: grpc.gateway.examples.internal.pathenum.MessagePathEnum
+ (*MessageWithPathEnum)(nil), // 4: grpc.gateway.examples.internal.pathenum.MessageWithPathEnum
+ (*MessageWithNestedPathEnum)(nil), // 5: grpc.gateway.examples.internal.pathenum.MessageWithNestedPathEnum
}
var file_examples_internal_proto_pathenum_path_enum_proto_depIdxs = []int32{
0, // 0: grpc.gateway.examples.internal.pathenum.MessageWithPathEnum.value:type_name -> grpc.gateway.examples.internal.pathenum.PathEnum
- 1, // 1: grpc.gateway.examples.internal.pathenum.MessageWithNestedPathEnum.value:type_name -> grpc.gateway.examples.internal.pathenum.MessagePathEnum.NestedPathEnum
+ 2, // 1: grpc.gateway.examples.internal.pathenum.MessageWithNestedPathEnum.value:type_name -> grpc.gateway.examples.internal.pathenum.MessagePathEnum.NestedPathEnum
2, // [2:2] is the sub-list for method output_type
2, // [2:2] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
@@ -359,7 +414,7 @@ func file_examples_internal_proto_pathenum_path_enum_proto_init() {
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_examples_internal_proto_pathenum_path_enum_proto_rawDesc,
- NumEnums: 2,
+ NumEnums: 3,
NumMessages: 3,
NumExtensions: 0,
NumServices: 0,
diff --git a/examples/internal/proto/pathenum/path_enum.proto b/examples/internal/proto/pathenum/path_enum.proto
index a8219949b32..d227044485e 100644
--- a/examples/internal/proto/pathenum/path_enum.proto
+++ b/examples/internal/proto/pathenum/path_enum.proto
@@ -1,23 +1,35 @@
syntax = "proto3";
-option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/pathenum";
+
package grpc.gateway.examples.internal.pathenum;
+option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/pathenum";
+
enum PathEnum {
- ABC = 0;
- DEF = 1;
+ ABC = 0;
+ DEF = 1;
}
message MessagePathEnum {
- enum NestedPathEnum {
- GHI = 0;
- JKL = 1;
- }
+ enum NestedPathEnum {
+ GHI = 0;
+ JKL = 1;
+ }
}
message MessageWithPathEnum {
- PathEnum value = 1;
+ PathEnum value = 1;
}
message MessageWithNestedPathEnum {
- MessagePathEnum.NestedPathEnum value = 1;
+ MessagePathEnum.NestedPathEnum value = 1;
+}
+
+// Ignoring lint warnings as this enum type exist to validate proper functionality
+// for projects that don't follow these lint rules.
+// buf:lint:ignore ENUM_PASCAL_CASE
+enum snake_case_for_import {
+ // buf:lint:ignore ENUM_VALUE_UPPER_SNAKE_CASE
+ value_x = 0;
+ // buf:lint:ignore ENUM_VALUE_UPPER_SNAKE_CASE
+ value_y = 1;
}
diff --git a/examples/internal/proto/pathenum/path_enum.swagger.json b/examples/internal/proto/pathenum/path_enum.swagger.json
index bb34b61b522..3359b9828e3 100644
--- a/examples/internal/proto/pathenum/path_enum.swagger.json
+++ b/examples/internal/proto/pathenum/path_enum.swagger.json
@@ -15,14 +15,11 @@
"protobufAny": {
"type": "object",
"properties": {
- "typeUrl": {
+ "@type": {
"type": "string"
- },
- "value": {
- "type": "string",
- "format": "byte"
}
- }
+ },
+ "additionalProperties": {}
},
"rpcStatus": {
"type": "object",
diff --git a/examples/internal/proto/standalone/BUILD.bazel b/examples/internal/proto/standalone/BUILD.bazel
index f9db127384f..11e664f7c41 100644
--- a/examples/internal/proto/standalone/BUILD.bazel
+++ b/examples/internal/proto/standalone/BUILD.bazel
@@ -1,19 +1,25 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
- name = "go_default_library",
+ name = "standalone",
srcs = ["unannotated_echo_service.pb.gw.go"],
importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/standalone",
visibility = ["//examples:__subpackages__"],
deps = [
- "//examples/internal/proto/examplepb:go_default_library",
- "//runtime:go_default_library",
- "//utilities:go_default_library",
+ "//examples/internal/proto/examplepb",
+ "//runtime",
+ "//utilities",
"@org_golang_google_grpc//:go_default_library",
- "@org_golang_google_grpc//codes:go_default_library",
- "@org_golang_google_grpc//grpclog:go_default_library",
- "@org_golang_google_grpc//metadata:go_default_library",
- "@org_golang_google_grpc//status:go_default_library",
- "@org_golang_google_protobuf//proto:go_default_library",
+ "@org_golang_google_grpc//codes",
+ "@org_golang_google_grpc//grpclog",
+ "@org_golang_google_grpc//metadata",
+ "@org_golang_google_grpc//status",
+ "@org_golang_google_protobuf//proto",
],
)
+
+alias(
+ name = "go_default_library",
+ actual = ":standalone",
+ visibility = ["//examples:__subpackages__"],
+)
diff --git a/examples/internal/proto/standalone/unannotated_echo_service.pb.gw.go b/examples/internal/proto/standalone/unannotated_echo_service.pb.gw.go
index d05cbaef6b4..58058276271 100644
--- a/examples/internal/proto/standalone/unannotated_echo_service.pb.gw.go
+++ b/examples/internal/proto/standalone/unannotated_echo_service.pb.gw.go
@@ -584,20 +584,22 @@ func RegisterUnannotatedEchoServiceHandlerServer(ctx context.Context, mux *runti
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/Echo")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/Echo", runtime.WithHTTPPathPattern("/v2/example/echo/{id}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_UnannotatedEchoService_Echo_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_UnannotatedEchoService_Echo_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_UnannotatedEchoService_Echo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_UnannotatedEchoService_Echo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -607,20 +609,22 @@ func RegisterUnannotatedEchoServiceHandlerServer(ctx context.Context, mux *runti
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/Echo")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/Echo", runtime.WithHTTPPathPattern("/v2/example/echo/{id}/{num}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_UnannotatedEchoService_Echo_1(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_UnannotatedEchoService_Echo_1(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_UnannotatedEchoService_Echo_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_UnannotatedEchoService_Echo_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -630,20 +634,22 @@ func RegisterUnannotatedEchoServiceHandlerServer(ctx context.Context, mux *runti
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/Echo")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/Echo", runtime.WithHTTPPathPattern("/v2/example/echo/{id}/{num}/{lang}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_UnannotatedEchoService_Echo_2(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_UnannotatedEchoService_Echo_2(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_UnannotatedEchoService_Echo_2(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_UnannotatedEchoService_Echo_2(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -653,20 +659,22 @@ func RegisterUnannotatedEchoServiceHandlerServer(ctx context.Context, mux *runti
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/Echo")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/Echo", runtime.WithHTTPPathPattern("/v2/example/echo1/{id}/{line_num}/{status.note}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_UnannotatedEchoService_Echo_3(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_UnannotatedEchoService_Echo_3(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_UnannotatedEchoService_Echo_3(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_UnannotatedEchoService_Echo_3(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -676,20 +684,22 @@ func RegisterUnannotatedEchoServiceHandlerServer(ctx context.Context, mux *runti
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/Echo")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/Echo", runtime.WithHTTPPathPattern("/v2/example/echo2/{no.note}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_UnannotatedEchoService_Echo_4(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_UnannotatedEchoService_Echo_4(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_UnannotatedEchoService_Echo_4(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_UnannotatedEchoService_Echo_4(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -699,20 +709,22 @@ func RegisterUnannotatedEchoServiceHandlerServer(ctx context.Context, mux *runti
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/EchoBody")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/EchoBody", runtime.WithHTTPPathPattern("/v2/example/echo_body"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_UnannotatedEchoService_EchoBody_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_UnannotatedEchoService_EchoBody_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_UnannotatedEchoService_EchoBody_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_UnannotatedEchoService_EchoBody_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -722,20 +734,22 @@ func RegisterUnannotatedEchoServiceHandlerServer(ctx context.Context, mux *runti
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/EchoDelete")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/EchoDelete", runtime.WithHTTPPathPattern("/v2/example/echo_delete"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_UnannotatedEchoService_EchoDelete_0(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_UnannotatedEchoService_EchoDelete_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_UnannotatedEchoService_EchoDelete_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_UnannotatedEchoService_EchoDelete_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -784,19 +798,21 @@ func RegisterUnannotatedEchoServiceHandlerClient(ctx context.Context, mux *runti
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/Echo")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/Echo", runtime.WithHTTPPathPattern("/v2/example/echo/{id}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_UnannotatedEchoService_Echo_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_UnannotatedEchoService_Echo_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_UnannotatedEchoService_Echo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_UnannotatedEchoService_Echo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -804,19 +820,21 @@ func RegisterUnannotatedEchoServiceHandlerClient(ctx context.Context, mux *runti
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/Echo")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/Echo", runtime.WithHTTPPathPattern("/v2/example/echo/{id}/{num}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_UnannotatedEchoService_Echo_1(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_UnannotatedEchoService_Echo_1(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_UnannotatedEchoService_Echo_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_UnannotatedEchoService_Echo_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -824,19 +842,21 @@ func RegisterUnannotatedEchoServiceHandlerClient(ctx context.Context, mux *runti
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/Echo")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/Echo", runtime.WithHTTPPathPattern("/v2/example/echo/{id}/{num}/{lang}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_UnannotatedEchoService_Echo_2(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_UnannotatedEchoService_Echo_2(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_UnannotatedEchoService_Echo_2(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_UnannotatedEchoService_Echo_2(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -844,19 +864,21 @@ func RegisterUnannotatedEchoServiceHandlerClient(ctx context.Context, mux *runti
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/Echo")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/Echo", runtime.WithHTTPPathPattern("/v2/example/echo1/{id}/{line_num}/{status.note}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_UnannotatedEchoService_Echo_3(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_UnannotatedEchoService_Echo_3(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_UnannotatedEchoService_Echo_3(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_UnannotatedEchoService_Echo_3(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -864,19 +886,21 @@ func RegisterUnannotatedEchoServiceHandlerClient(ctx context.Context, mux *runti
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/Echo")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/Echo", runtime.WithHTTPPathPattern("/v2/example/echo2/{no.note}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_UnannotatedEchoService_Echo_4(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_UnannotatedEchoService_Echo_4(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_UnannotatedEchoService_Echo_4(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_UnannotatedEchoService_Echo_4(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -884,19 +908,21 @@ func RegisterUnannotatedEchoServiceHandlerClient(ctx context.Context, mux *runti
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/EchoBody")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/EchoBody", runtime.WithHTTPPathPattern("/v2/example/echo_body"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_UnannotatedEchoService_EchoBody_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_UnannotatedEchoService_EchoBody_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_UnannotatedEchoService_EchoBody_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_UnannotatedEchoService_EchoBody_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -904,19 +930,21 @@ func RegisterUnannotatedEchoServiceHandlerClient(ctx context.Context, mux *runti
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/EchoDelete")
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService/EchoDelete", runtime.WithHTTPPathPattern("/v2/example/echo_delete"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_UnannotatedEchoService_EchoDelete_0(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_UnannotatedEchoService_EchoDelete_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_UnannotatedEchoService_EchoDelete_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_UnannotatedEchoService_EchoDelete_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
diff --git a/examples/internal/proto/sub/BUILD.bazel b/examples/internal/proto/sub/BUILD.bazel
index 6c74d3680fe..5fc4f9ea1dd 100644
--- a/examples/internal/proto/sub/BUILD.bazel
+++ b/examples/internal/proto/sub/BUILD.bazel
@@ -17,7 +17,13 @@ go_proto_library(
)
go_library(
- name = "go_default_library",
+ name = "sub",
embed = [":sub_go_proto"],
importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/sub",
)
+
+alias(
+ name = "go_default_library",
+ actual = ":sub",
+ visibility = ["//examples:__subpackages__"],
+)
diff --git a/examples/internal/proto/sub/message.pb.go b/examples/internal/proto/sub/message.pb.go
index 27dbfacbe7d..fa726581f22 100644
--- a/examples/internal/proto/sub/message.pb.go
+++ b/examples/internal/proto/sub/message.pb.go
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.26.0
-// protoc v3.13.0
+// protoc-gen-go v1.27.1
+// protoc (unknown)
// source: examples/internal/proto/sub/message.proto
package sub
diff --git a/examples/internal/proto/sub/message.proto b/examples/internal/proto/sub/message.proto
index 32768345c79..7b83d406c02 100644
--- a/examples/internal/proto/sub/message.proto
+++ b/examples/internal/proto/sub/message.proto
@@ -1,7 +1,9 @@
syntax = "proto2";
-option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/sub";
+
package grpc.gateway.examples.internal.proto.sub;
+option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/sub";
+
message StringMessage {
- required string value = 1;
+ required string value = 1;
}
diff --git a/examples/internal/proto/sub/message.swagger.json b/examples/internal/proto/sub/message.swagger.json
index 590b213747f..9f88abdcd60 100644
--- a/examples/internal/proto/sub/message.swagger.json
+++ b/examples/internal/proto/sub/message.swagger.json
@@ -15,14 +15,11 @@
"protobufAny": {
"type": "object",
"properties": {
- "typeUrl": {
+ "@type": {
"type": "string"
- },
- "value": {
- "type": "string",
- "format": "byte"
}
- }
+ },
+ "additionalProperties": {}
},
"rpcStatus": {
"type": "object",
diff --git a/examples/internal/proto/sub2/BUILD.bazel b/examples/internal/proto/sub2/BUILD.bazel
index a970fa2dd90..3aa08a47522 100644
--- a/examples/internal/proto/sub2/BUILD.bazel
+++ b/examples/internal/proto/sub2/BUILD.bazel
@@ -17,7 +17,13 @@ go_proto_library(
)
go_library(
- name = "go_default_library",
+ name = "sub2",
embed = [":sub2_go_proto"],
importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/sub2",
)
+
+alias(
+ name = "go_default_library",
+ actual = ":sub2",
+ visibility = ["//examples:__subpackages__"],
+)
diff --git a/examples/internal/proto/sub2/message.pb.go b/examples/internal/proto/sub2/message.pb.go
index e30c70aca37..55f7be3e102 100644
--- a/examples/internal/proto/sub2/message.pb.go
+++ b/examples/internal/proto/sub2/message.pb.go
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.26.0
-// protoc v3.13.0
+// protoc-gen-go v1.27.1
+// protoc (unknown)
// source: examples/internal/proto/sub2/message.proto
package sub2
diff --git a/examples/internal/proto/sub2/message.proto b/examples/internal/proto/sub2/message.proto
index 5ddbbaa1bc4..8c4c0f12e7d 100644
--- a/examples/internal/proto/sub2/message.proto
+++ b/examples/internal/proto/sub2/message.proto
@@ -1,7 +1,9 @@
syntax = "proto3";
-option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/sub2";
+
package grpc.gateway.examples.internal.proto.sub2;
+option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/sub2";
+
message IdMessage {
- string uuid = 1;
+ string uuid = 1;
}
diff --git a/examples/internal/proto/sub2/message.swagger.json b/examples/internal/proto/sub2/message.swagger.json
index 090bc92d0c3..52762d9a71a 100644
--- a/examples/internal/proto/sub2/message.swagger.json
+++ b/examples/internal/proto/sub2/message.swagger.json
@@ -15,14 +15,11 @@
"protobufAny": {
"type": "object",
"properties": {
- "typeUrl": {
+ "@type": {
"type": "string"
- },
- "value": {
- "type": "string",
- "format": "byte"
}
- }
+ },
+ "additionalProperties": {}
},
"rpcStatus": {
"type": "object",
diff --git a/examples/internal/server/BUILD.bazel b/examples/internal/server/BUILD.bazel
index 7bcde5f579b..cc54a6ae5c5 100644
--- a/examples/internal/server/BUILD.bazel
+++ b/examples/internal/server/BUILD.bazel
@@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library")
package(default_visibility = ["//visibility:public"])
go_library(
- name = "go_default_library",
+ name = "server",
srcs = [
"a_bit_of_everything.go",
"echo.go",
@@ -16,26 +16,33 @@ go_library(
],
importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/server",
deps = [
- "//examples/internal/proto/examplepb:go_default_library",
- "//examples/internal/proto/pathenum:go_default_library",
- "//examples/internal/proto/standalone:go_default_library",
- "//examples/internal/proto/sub:go_default_library",
- "//examples/internal/proto/sub2:go_default_library",
- "//runtime:go_default_library",
- "@com_github_golang_glog//:go_default_library",
- "@com_github_rogpeppe_fastuuid//:go_default_library",
+ "//examples/internal/proto/examplepb",
+ "//examples/internal/proto/oneofenum",
+ "//examples/internal/proto/pathenum",
+ "//examples/internal/proto/standalone",
+ "//examples/internal/proto/sub",
+ "//examples/internal/proto/sub2",
+ "//runtime",
+ "@com_github_golang_glog//:glog",
+ "@com_github_rogpeppe_fastuuid//:fastuuid",
"@go_googleapis//google/api:httpbody_go_proto",
"@go_googleapis//google/rpc:errdetails_go_proto",
"@go_googleapis//google/rpc:status_go_proto",
"@io_bazel_rules_go//proto/wkt:field_mask_go_proto",
"@org_golang_google_grpc//:go_default_library",
- "@org_golang_google_grpc//codes:go_default_library",
- "@org_golang_google_grpc//metadata:go_default_library",
- "@org_golang_google_grpc//status:go_default_library",
- "@org_golang_google_protobuf//proto:go_default_library",
- "@org_golang_google_protobuf//reflect/protoreflect:go_default_library",
- "@org_golang_google_protobuf//types/known/durationpb:go_default_library",
- "@org_golang_google_protobuf//types/known/emptypb:go_default_library",
- "@org_golang_google_protobuf//types/known/wrapperspb:go_default_library",
+ "@org_golang_google_grpc//codes",
+ "@org_golang_google_grpc//metadata",
+ "@org_golang_google_grpc//status",
+ "@org_golang_google_protobuf//proto",
+ "@org_golang_google_protobuf//reflect/protoreflect",
+ "@org_golang_google_protobuf//types/known/durationpb",
+ "@org_golang_google_protobuf//types/known/emptypb",
+ "@org_golang_google_protobuf//types/known/wrapperspb",
],
)
+
+alias(
+ name = "go_default_library",
+ actual = ":server",
+ visibility = ["//examples:__subpackages__"],
+)
diff --git a/examples/internal/server/a_bit_of_everything.go b/examples/internal/server/a_bit_of_everything.go
index 0870594d2f1..d129edca2e8 100644
--- a/examples/internal/server/a_bit_of_everything.go
+++ b/examples/internal/server/a_bit_of_everything.go
@@ -9,6 +9,7 @@ import (
"github.com/golang/glog"
examples "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/examplepb"
+ "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/oneofenum"
"github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/pathenum"
"github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/sub"
"github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/sub2"
@@ -187,6 +188,32 @@ func (s *_ABitOfEverythingServer) Download(_ *emptypb.Empty, stream examples.Str
return nil
}
+func (s *_ABitOfEverythingServer) Custom(ctx context.Context, msg *examples.ABitOfEverything) (*examples.ABitOfEverything, error) {
+ s.m.Lock()
+ defer s.m.Unlock()
+
+ glog.Info(msg)
+ if _, ok := s.v[msg.Uuid]; ok {
+ s.v[msg.Uuid] = msg
+ } else {
+ return nil, status.Errorf(codes.NotFound, "not found")
+ }
+ return msg, nil
+}
+
+func (s *_ABitOfEverythingServer) DoubleColon(ctx context.Context, msg *examples.ABitOfEverything) (*examples.ABitOfEverything, error) {
+ s.m.Lock()
+ defer s.m.Unlock()
+
+ glog.Info(msg)
+ if _, ok := s.v[msg.Uuid]; ok {
+ s.v[msg.Uuid] = msg
+ } else {
+ return nil, status.Errorf(codes.NotFound, "not found")
+ }
+ return msg, nil
+}
+
func (s *_ABitOfEverythingServer) Update(ctx context.Context, msg *examples.ABitOfEverything) (*emptypb.Empty, error) {
s.m.Lock()
defer s.m.Unlock()
@@ -308,7 +335,7 @@ func (s *_ABitOfEverythingServer) NoBindings(ctx context.Context, msg *durationp
func (s *_ABitOfEverythingServer) Timeout(ctx context.Context, msg *emptypb.Empty) (*emptypb.Empty, error) {
<-ctx.Done()
- return nil, ctx.Err()
+ return nil, status.FromContextError(ctx.Err()).Err()
}
func (s *_ABitOfEverythingServer) ErrorWithDetails(ctx context.Context, msg *emptypb.Empty) (*emptypb.Empty, error) {
@@ -343,6 +370,10 @@ func (s *_ABitOfEverythingServer) CheckPostQueryParams(ctx context.Context, msg
return msg, nil
}
+func (s *_ABitOfEverythingServer) OverwriteRequestContentType(ctx context.Context, msg *examples.Body) (*emptypb.Empty, error) {
+ return &emptypb.Empty{}, nil
+}
+
func (s *_ABitOfEverythingServer) OverwriteResponseContentType(ctx context.Context, msg *emptypb.Empty) (*wrapperspb.StringValue, error) {
return &wrapperspb.StringValue{}, nil
}
@@ -358,3 +389,33 @@ func (s *_ABitOfEverythingServer) CheckExternalNestedPathEnum(ctx context.Contex
func (s *_ABitOfEverythingServer) CheckStatus(ctx context.Context, empty *emptypb.Empty) (*examples.CheckStatusResponse, error) {
return &examples.CheckStatusResponse{Status: &statuspb.Status{}}, nil
}
+
+func (s *_ABitOfEverythingServer) Exists(ctx context.Context, msg *examples.ABitOfEverything) (*emptypb.Empty, error) {
+ if _, ok := s.v[msg.Uuid]; ok {
+ return new(emptypb.Empty), nil
+ }
+
+ return nil, status.Errorf(codes.NotFound, "not found")
+}
+
+func (s *_ABitOfEverythingServer) CustomOptionsRequest(ctx context.Context, msg *examples.ABitOfEverything) (*emptypb.Empty, error) {
+ err := grpc.SendHeader(ctx, metadata.New(map[string]string{
+ "Allow": "OPTIONS, GET, HEAD, POST, PUT, TRACE",
+ }))
+ if err != nil {
+ return nil, err
+ }
+ return new(emptypb.Empty), nil
+}
+
+func (s *_ABitOfEverythingServer) TraceRequest(ctx context.Context, msg *examples.ABitOfEverything) (*examples.ABitOfEverything, error) {
+ return msg, nil
+}
+
+func (s *_ABitOfEverythingServer) PostOneofEnum(ctx context.Context, msg *oneofenum.OneofEnumMessage) (*emptypb.Empty, error) {
+ return new(emptypb.Empty), nil
+}
+
+func (s *_ABitOfEverythingServer) PostRequiredMessageType(ctx context.Context, req *examples.RequiredMessageTypeRequest) (*emptypb.Empty, error) {
+ return new(emptypb.Empty), nil
+}
diff --git a/examples/internal/server/echo.go b/examples/internal/server/echo.go
index 58501aa31e7..0f795ce52ad 100644
--- a/examples/internal/server/echo.go
+++ b/examples/internal/server/echo.go
@@ -6,7 +6,9 @@ import (
"github.com/golang/glog"
examples "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/examplepb"
"google.golang.org/grpc"
+ "google.golang.org/grpc/codes"
"google.golang.org/grpc/metadata"
+ "google.golang.org/grpc/status"
)
// Implements of EchoServiceServer
@@ -44,3 +46,8 @@ func (s *echoServer) EchoPatch(ctx context.Context, msg *examples.DynamicMessage
glog.Info(msg)
return msg, nil
}
+
+func (s *echoServer) EchoUnauthorized(ctx context.Context, msg *examples.SimpleMessage) (*examples.SimpleMessage, error) {
+ glog.Info(msg)
+ return nil, status.Error(codes.Unauthenticated, "unauthorized err")
+}
diff --git a/go.mod b/go.mod
index 677dc123ddf..37cb00c2ea0 100644
--- a/go.mod
+++ b/go.mod
@@ -1,18 +1,25 @@
module github.com/grpc-ecosystem/grpc-gateway/v2
-go 1.14
+go 1.17
require (
github.com/antihax/optional v1.0.0
- github.com/bufbuild/buf v0.37.0
- github.com/ghodss/yaml v1.0.0
- github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
+ github.com/golang/glog v1.0.0
github.com/golang/protobuf v1.5.2
- github.com/google/go-cmp v0.5.5
+ github.com/google/go-cmp v0.5.9
github.com/rogpeppe/fastuuid v1.2.0
- golang.org/x/oauth2 v0.0.0-20210427180440-81ed05c6b58c
- google.golang.org/genproto v0.0.0-20210426193834-eac7f76ac494
- google.golang.org/grpc v1.37.0
- google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.0.0
- google.golang.org/protobuf v1.26.0
+ golang.org/x/oauth2 v0.2.0
+ golang.org/x/text v0.4.0
+ google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6
+ google.golang.org/grpc v1.51.0
+ google.golang.org/protobuf v1.28.1
+ gopkg.in/yaml.v3 v3.0.1
+)
+
+require (
+ github.com/kr/pretty v0.1.0 // indirect
+ golang.org/x/net v0.2.0 // indirect
+ golang.org/x/sys v0.2.0 // indirect
+ google.golang.org/appengine v1.6.7 // indirect
+ gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect
)
diff --git a/go.sum b/go.sum
index 70355c01b0f..ed07b71948c 100644
--- a/go.sum
+++ b/go.sum
@@ -13,92 +13,395 @@ cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKV
cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs=
cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc=
cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY=
+cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI=
+cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk=
+cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg=
+cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8=
+cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0=
+cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY=
+cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM=
+cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY=
+cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ=
+cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI=
+cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4=
+cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc=
+cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA=
+cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A=
+cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc=
+cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU=
+cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA=
+cloud.google.com/go v0.105.0/go.mod h1:PrLgOJNe5nfE9UMxKxgXj4mD3voiP+YQ6gdt6KMFOKM=
+cloud.google.com/go/accessapproval v1.4.0/go.mod h1:zybIuC3KpDOvotz59lFe5qxRZx6C75OtwbisN56xYB4=
+cloud.google.com/go/accessapproval v1.5.0/go.mod h1:HFy3tuiGvMdcd/u+Cu5b9NkO1pEICJ46IR82PoUdplw=
+cloud.google.com/go/accesscontextmanager v1.3.0/go.mod h1:TgCBehyr5gNMz7ZaH9xubp+CE8dkrszb4oK9CWyvD4o=
+cloud.google.com/go/accesscontextmanager v1.4.0/go.mod h1:/Kjh7BBu/Gh83sv+K60vN9QE5NJcd80sU33vIe2IFPE=
+cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw=
+cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY=
+cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI=
+cloud.google.com/go/analytics v0.12.0/go.mod h1:gkfj9h6XRf9+TS4bmuhPEShsh3hH8PAZzm/41OOhQd4=
+cloud.google.com/go/apigateway v1.3.0/go.mod h1:89Z8Bhpmxu6AmUxuVRg/ECRGReEdiP3vQtk4Z1J9rJk=
+cloud.google.com/go/apigateway v1.4.0/go.mod h1:pHVY9MKGaH9PQ3pJ4YLzoj6U5FUDeDFBllIz7WmzJoc=
+cloud.google.com/go/apigeeconnect v1.3.0/go.mod h1:G/AwXFAKo0gIXkPTVfZDd2qA1TxBXJ3MgMRBQkIi9jc=
+cloud.google.com/go/apigeeconnect v1.4.0/go.mod h1:kV4NwOKqjvt2JYR0AoIWo2QGfoRtn/pkS3QlHp0Ni04=
+cloud.google.com/go/appengine v1.4.0/go.mod h1:CS2NhuBuDXM9f+qscZ6V86m1MIIqPj3WC/UoEuR1Sno=
+cloud.google.com/go/appengine v1.5.0/go.mod h1:TfasSozdkFI0zeoxW3PTBLiNqRmzraodCWatWI9Dmak=
+cloud.google.com/go/area120 v0.5.0/go.mod h1:DE/n4mp+iqVyvxHN41Vf1CR602GiHQjFPusMFW6bGR4=
+cloud.google.com/go/area120 v0.6.0/go.mod h1:39yFJqWVgm0UZqWTOdqkLhjoC7uFfgXRC8g/ZegeAh0=
+cloud.google.com/go/artifactregistry v1.6.0/go.mod h1:IYt0oBPSAGYj/kprzsBjZ/4LnG/zOcHyFHjWPCi6SAQ=
+cloud.google.com/go/artifactregistry v1.7.0/go.mod h1:mqTOFOnGZx8EtSqK/ZWcsm/4U8B77rbcLP6ruDU2Ixk=
+cloud.google.com/go/artifactregistry v1.8.0/go.mod h1:w3GQXkJX8hiKN0v+at4b0qotwijQbYUqF2GWkZzAhC0=
+cloud.google.com/go/artifactregistry v1.9.0/go.mod h1:2K2RqvA2CYvAeARHRkLDhMDJ3OXy26h3XW+3/Jh2uYc=
+cloud.google.com/go/asset v1.5.0/go.mod h1:5mfs8UvcM5wHhqtSv8J1CtxxaQq3AdBxxQi2jGW/K4o=
+cloud.google.com/go/asset v1.7.0/go.mod h1:YbENsRK4+xTiL+Ofoj5Ckf+O17kJtgp3Y3nn4uzZz5s=
+cloud.google.com/go/asset v1.8.0/go.mod h1:mUNGKhiqIdbr8X7KNayoYvyc4HbbFO9URsjbytpUaW0=
+cloud.google.com/go/asset v1.9.0/go.mod h1:83MOE6jEJBMqFKadM9NLRcs80Gdw76qGuHn8m3h8oHQ=
+cloud.google.com/go/asset v1.10.0/go.mod h1:pLz7uokL80qKhzKr4xXGvBQXnzHn5evJAEAtZiIb0wY=
+cloud.google.com/go/assuredworkloads v1.5.0/go.mod h1:n8HOZ6pff6re5KYfBXcFvSViQjDwxFkAkmUFffJRbbY=
+cloud.google.com/go/assuredworkloads v1.6.0/go.mod h1:yo2YOk37Yc89Rsd5QMVECvjaMKymF9OP+QXWlKXUkXw=
+cloud.google.com/go/assuredworkloads v1.7.0/go.mod h1:z/736/oNmtGAyU47reJgGN+KVoYoxeLBoj4XkKYscNI=
+cloud.google.com/go/assuredworkloads v1.8.0/go.mod h1:AsX2cqyNCOvEQC8RMPnoc0yEarXQk6WEKkxYfL6kGIo=
+cloud.google.com/go/assuredworkloads v1.9.0/go.mod h1:kFuI1P78bplYtT77Tb1hi0FMxM0vVpRC7VVoJC3ZoT0=
+cloud.google.com/go/automl v1.5.0/go.mod h1:34EjfoFGMZ5sgJ9EoLsRtdPSNZLcfflJR39VbVNS2M0=
+cloud.google.com/go/automl v1.6.0/go.mod h1:ugf8a6Fx+zP0D59WLhqgTDsQI9w07o64uf/Is3Nh5p8=
+cloud.google.com/go/automl v1.7.0/go.mod h1:RL9MYCCsJEOmt0Wf3z9uzG0a7adTT1fe+aObgSpkCt8=
+cloud.google.com/go/automl v1.8.0/go.mod h1:xWx7G/aPEe/NP+qzYXktoBSDfjO+vnKMGgsApGJJquM=
+cloud.google.com/go/baremetalsolution v0.3.0/go.mod h1:XOrocE+pvK1xFfleEnShBlNAXf+j5blPPxrhjKgnIFc=
+cloud.google.com/go/baremetalsolution v0.4.0/go.mod h1:BymplhAadOO/eBa7KewQ0Ppg4A4Wplbn+PsFKRLo0uI=
+cloud.google.com/go/batch v0.3.0/go.mod h1:TR18ZoAekj1GuirsUsR1ZTKN3FC/4UDnScjT8NXImFE=
+cloud.google.com/go/batch v0.4.0/go.mod h1:WZkHnP43R/QCGQsZ+0JyG4i79ranE2u8xvjq/9+STPE=
+cloud.google.com/go/beyondcorp v0.2.0/go.mod h1:TB7Bd+EEtcw9PCPQhCJtJGjk/7TC6ckmnSFS+xwTfm4=
+cloud.google.com/go/beyondcorp v0.3.0/go.mod h1:E5U5lcrcXMsCuoDNyGrpyTm/hn7ne941Jz2vmksAxW8=
cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=
cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE=
cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc=
cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg=
cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc=
cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ=
+cloud.google.com/go/bigquery v1.42.0/go.mod h1:8dRTJxhtG+vwBKzE5OseQn/hiydoQN3EedCaOdYmxRA=
+cloud.google.com/go/bigquery v1.43.0/go.mod h1:ZMQcXHsl+xmU1z36G2jNGZmKp9zNY5BUua5wDgmNCfw=
+cloud.google.com/go/billing v1.4.0/go.mod h1:g9IdKBEFlItS8bTtlrZdVLWSSdSyFUZKXNS02zKMOZY=
+cloud.google.com/go/billing v1.5.0/go.mod h1:mztb1tBc3QekhjSgmpf/CV4LzWXLzCArwpLmP2Gm88s=
+cloud.google.com/go/billing v1.6.0/go.mod h1:WoXzguj+BeHXPbKfNWkqVtDdzORazmCjraY+vrxcyvI=
+cloud.google.com/go/billing v1.7.0/go.mod h1:q457N3Hbj9lYwwRbnlD7vUpyjq6u5U1RAOArInEiD5Y=
+cloud.google.com/go/binaryauthorization v1.1.0/go.mod h1:xwnoWu3Y84jbuHa0zd526MJYmtnVXn0syOjaJgy4+dM=
+cloud.google.com/go/binaryauthorization v1.2.0/go.mod h1:86WKkJHtRcv5ViNABtYMhhNWRrD1Vpi//uKEy7aYEfI=
+cloud.google.com/go/binaryauthorization v1.3.0/go.mod h1:lRZbKgjDIIQvzYQS1p99A7/U1JqvqeZg0wiI5tp6tg0=
+cloud.google.com/go/binaryauthorization v1.4.0/go.mod h1:tsSPQrBd77VLplV70GUhBf/Zm3FsKmgSqgm4UmiDItk=
+cloud.google.com/go/certificatemanager v1.3.0/go.mod h1:n6twGDvcUBFu9uBgt4eYvvf3sQ6My8jADcOVwHmzadg=
+cloud.google.com/go/certificatemanager v1.4.0/go.mod h1:vowpercVFyqs8ABSmrdV+GiFf2H/ch3KyudYQEMM590=
+cloud.google.com/go/channel v1.8.0/go.mod h1:W5SwCXDJsq/rg3tn3oG0LOxpAo6IMxNa09ngphpSlnk=
+cloud.google.com/go/channel v1.9.0/go.mod h1:jcu05W0my9Vx4mt3/rEHpfxc9eKi9XwsdDL8yBMbKUk=
+cloud.google.com/go/cloudbuild v1.3.0/go.mod h1:WequR4ULxlqvMsjDEEEFnOG5ZSRSgWOywXYDb1vPE6U=
+cloud.google.com/go/cloudbuild v1.4.0/go.mod h1:5Qwa40LHiOXmz3386FrjrYM93rM/hdRr7b53sySrTqA=
+cloud.google.com/go/clouddms v1.3.0/go.mod h1:oK6XsCDdW4Ib3jCCBugx+gVjevp2TMXFtgxvPSee3OM=
+cloud.google.com/go/clouddms v1.4.0/go.mod h1:Eh7sUGCC+aKry14O1NRljhjyrr0NFC0G2cjwX0cByRk=
+cloud.google.com/go/cloudtasks v1.5.0/go.mod h1:fD92REy1x5woxkKEkLdvavGnPJGEn8Uic9nWuLzqCpY=
+cloud.google.com/go/cloudtasks v1.6.0/go.mod h1:C6Io+sxuke9/KNRkbQpihnW93SWDU3uXt92nu85HkYI=
+cloud.google.com/go/cloudtasks v1.7.0/go.mod h1:ImsfdYWwlWNJbdgPIIGJWC+gemEGTBK/SunNQQNCAb4=
+cloud.google.com/go/cloudtasks v1.8.0/go.mod h1:gQXUIwCSOI4yPVK7DgTVFiiP0ZW/eQkydWzwVMdHxrI=
+cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow=
+cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM=
+cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M=
+cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s=
+cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU=
+cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U=
+cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU=
+cloud.google.com/go/compute v1.12.0/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU=
+cloud.google.com/go/compute v1.12.1/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU=
+cloud.google.com/go/compute/metadata v0.1.0/go.mod h1:Z1VN+bulIf6bt4P/C37K4DyZYZEXYonfTBHHFPO/4UU=
+cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k=
+cloud.google.com/go/compute/metadata v0.2.1/go.mod h1:jgHgmJd2RKBGzXqF5LR2EZMGxBkeanZ9wwa75XHJgOM=
+cloud.google.com/go/contactcenterinsights v1.3.0/go.mod h1:Eu2oemoePuEFc/xKFPjbTuPSj0fYJcPls9TFlPNnHHY=
+cloud.google.com/go/contactcenterinsights v1.4.0/go.mod h1:L2YzkGbPsv+vMQMCADxJoT9YiTTnSEd6fEvCeHTYVck=
+cloud.google.com/go/container v1.6.0/go.mod h1:Xazp7GjJSeUYo688S+6J5V+n/t+G5sKBTFkKNudGRxg=
+cloud.google.com/go/container v1.7.0/go.mod h1:Dp5AHtmothHGX3DwwIHPgq45Y8KmNsgN3amoYfxVkLo=
+cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I=
+cloud.google.com/go/containeranalysis v0.6.0/go.mod h1:HEJoiEIu+lEXM+k7+qLCci0h33lX3ZqoYFdmPcoO7s4=
+cloud.google.com/go/datacatalog v1.3.0/go.mod h1:g9svFY6tuR+j+hrTw3J2dNcmI0dzmSiyOzm8kpLq0a0=
+cloud.google.com/go/datacatalog v1.5.0/go.mod h1:M7GPLNQeLfWqeIm3iuiruhPzkt65+Bx8dAKvScX8jvs=
+cloud.google.com/go/datacatalog v1.6.0/go.mod h1:+aEyF8JKg+uXcIdAmmaMUmZ3q1b/lKLtXCmXdnc0lbc=
+cloud.google.com/go/datacatalog v1.7.0/go.mod h1:9mEl4AuDYWw81UGc41HonIHH7/sn52H0/tc8f8ZbZIE=
+cloud.google.com/go/datacatalog v1.8.0/go.mod h1:KYuoVOv9BM8EYz/4eMFxrr4DUKhGIOXxZoKYF5wdISM=
+cloud.google.com/go/dataflow v0.6.0/go.mod h1:9QwV89cGoxjjSR9/r7eFDqqjtvbKxAK2BaYU6PVk9UM=
+cloud.google.com/go/dataflow v0.7.0/go.mod h1:PX526vb4ijFMesO1o202EaUmouZKBpjHsTlCtB4parQ=
+cloud.google.com/go/dataform v0.3.0/go.mod h1:cj8uNliRlHpa6L3yVhDOBrUXH+BPAO1+KFMQQNSThKo=
+cloud.google.com/go/dataform v0.4.0/go.mod h1:fwV6Y4Ty2yIFL89huYlEkwUPtS7YZinZbzzj5S9FzCE=
+cloud.google.com/go/dataform v0.5.0/go.mod h1:GFUYRe8IBa2hcomWplodVmUx/iTL0FrsauObOM3Ipr0=
+cloud.google.com/go/datafusion v1.4.0/go.mod h1:1Zb6VN+W6ALo85cXnM1IKiPw+yQMKMhB9TsTSRDo/38=
+cloud.google.com/go/datafusion v1.5.0/go.mod h1:Kz+l1FGHB0J+4XF2fud96WMmRiq/wj8N9u007vyXZ2w=
+cloud.google.com/go/datalabeling v0.5.0/go.mod h1:TGcJ0G2NzcsXSE/97yWjIZO0bXj0KbVlINXMG9ud42I=
+cloud.google.com/go/datalabeling v0.6.0/go.mod h1:WqdISuk/+WIGeMkpw/1q7bK/tFEZxsrFJOJdY2bXvTQ=
+cloud.google.com/go/dataplex v1.3.0/go.mod h1:hQuRtDg+fCiFgC8j0zV222HvzFQdRd+SVX8gdmFcZzA=
+cloud.google.com/go/dataplex v1.4.0/go.mod h1:X51GfLXEMVJ6UN47ESVqvlsRplbLhcsAt0kZCCKsU0A=
+cloud.google.com/go/dataproc v1.7.0/go.mod h1:CKAlMjII9H90RXaMpSxQ8EU6dQx6iAYNPcYPOkSbi8s=
+cloud.google.com/go/dataproc v1.8.0/go.mod h1:5OW+zNAH0pMpw14JVrPONsxMQYMBqJuzORhIBfBn9uI=
+cloud.google.com/go/dataqna v0.5.0/go.mod h1:90Hyk596ft3zUQ8NkFfvICSIfHFh1Bc7C4cK3vbhkeo=
+cloud.google.com/go/dataqna v0.6.0/go.mod h1:1lqNpM7rqNLVgWBJyk5NF6Uen2PHym0jtVJonplVsDA=
cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=
cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk=
-cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk=
+cloud.google.com/go/datastream v1.2.0/go.mod h1:i/uTP8/fZwgATHS/XFu0TcNUhuA0twZxxQ3EyCUQMwo=
+cloud.google.com/go/datastream v1.3.0/go.mod h1:cqlOX8xlyYF/uxhiKn6Hbv6WjwPPuI9W2M9SAXwaLLQ=
+cloud.google.com/go/datastream v1.4.0/go.mod h1:h9dpzScPhDTs5noEMQVWP8Wx8AFBRyS0s8KWPx/9r0g=
+cloud.google.com/go/datastream v1.5.0/go.mod h1:6TZMMNPwjUqZHBKPQ1wwXpb0d5VDVPl2/XoS5yi88q4=
+cloud.google.com/go/deploy v1.4.0/go.mod h1:5Xghikd4VrmMLNaF6FiRFDlHb59VM59YoDQnOUdsH/c=
+cloud.google.com/go/deploy v1.5.0/go.mod h1:ffgdD0B89tToyW/U/D2eL0jN2+IEV/3EMuXHA0l4r+s=
+cloud.google.com/go/dialogflow v1.15.0/go.mod h1:HbHDWs33WOGJgn6rfzBW1Kv807BE3O1+xGbn59zZWI4=
+cloud.google.com/go/dialogflow v1.16.1/go.mod h1:po6LlzGfK+smoSmTBnbkIZY2w8ffjz/RcGSS+sh1el0=
+cloud.google.com/go/dialogflow v1.17.0/go.mod h1:YNP09C/kXA1aZdBgC/VtXX74G/TKn7XVCcVumTflA+8=
+cloud.google.com/go/dialogflow v1.18.0/go.mod h1:trO7Zu5YdyEuR+BhSNOqJezyFQ3aUzz0njv7sMx/iek=
+cloud.google.com/go/dialogflow v1.19.0/go.mod h1:JVmlG1TwykZDtxtTXujec4tQ+D8SBFMoosgy+6Gn0s0=
+cloud.google.com/go/dlp v1.6.0/go.mod h1:9eyB2xIhpU0sVwUixfBubDoRwP+GjeUoxxeueZmqvmM=
+cloud.google.com/go/dlp v1.7.0/go.mod h1:68ak9vCiMBjbasxeVD17hVPxDEck+ExiHavX8kiHG+Q=
+cloud.google.com/go/documentai v1.7.0/go.mod h1:lJvftZB5NRiFSX4moiye1SMxHx0Bc3x1+p9e/RfXYiU=
+cloud.google.com/go/documentai v1.8.0/go.mod h1:xGHNEB7CtsnySCNrCFdCyyMz44RhFEEX2Q7UD0c5IhU=
+cloud.google.com/go/documentai v1.9.0/go.mod h1:FS5485S8R00U10GhgBC0aNGrJxBP8ZVpEeJ7PQDZd6k=
+cloud.google.com/go/documentai v1.10.0/go.mod h1:vod47hKQIPeCfN2QS/jULIvQTugbmdc0ZvxxfQY1bg4=
+cloud.google.com/go/domains v0.6.0/go.mod h1:T9Rz3GasrpYk6mEGHh4rymIhjlnIuB4ofT1wTxDeT4Y=
+cloud.google.com/go/domains v0.7.0/go.mod h1:PtZeqS1xjnXuRPKE/88Iru/LdfoRyEHYA9nFQf4UKpg=
+cloud.google.com/go/edgecontainer v0.1.0/go.mod h1:WgkZ9tp10bFxqO8BLPqv2LlfmQF1X8lZqwW4r1BTajk=
+cloud.google.com/go/edgecontainer v0.2.0/go.mod h1:RTmLijy+lGpQ7BXuTDa4C4ssxyXT34NIuHIgKuP4s5w=
+cloud.google.com/go/essentialcontacts v1.3.0/go.mod h1:r+OnHa5jfj90qIfZDO/VztSFqbQan7HV75p8sA+mdGI=
+cloud.google.com/go/essentialcontacts v1.4.0/go.mod h1:8tRldvHYsmnBCHdFpvU+GL75oWiBKl80BiqlFh9tp+8=
+cloud.google.com/go/eventarc v1.7.0/go.mod h1:6ctpF3zTnaQCxUjHUdcfgcA1A2T309+omHZth7gDfmc=
+cloud.google.com/go/eventarc v1.8.0/go.mod h1:imbzxkyAU4ubfsaKYdQg04WS1NvncblHEup4kvF+4gw=
+cloud.google.com/go/filestore v1.3.0/go.mod h1:+qbvHGvXU1HaKX2nD0WEPo92TP/8AQuCVEBXNY9z0+w=
+cloud.google.com/go/filestore v1.4.0/go.mod h1:PaG5oDfo9r224f8OYXURtAsY+Fbyq/bLYoINEK8XQAI=
+cloud.google.com/go/functions v1.6.0/go.mod h1:3H1UA3qiIPRWD7PeZKLvHZ9SaQhR26XIJcC0A5GbvAk=
+cloud.google.com/go/functions v1.7.0/go.mod h1:+d+QBcWM+RsrgZfV9xo6KfA1GlzJfxcfZcRPEhDDfzg=
+cloud.google.com/go/functions v1.8.0/go.mod h1:RTZ4/HsQjIqIYP9a9YPbU+QFoQsAlYgrwOXJWHn1POY=
+cloud.google.com/go/functions v1.9.0/go.mod h1:Y+Dz8yGguzO3PpIjhLTbnqV1CWmgQ5UwtlpzoyquQ08=
+cloud.google.com/go/gaming v1.5.0/go.mod h1:ol7rGcxP/qHTRQE/RO4bxkXq+Fix0j6D4LFPzYTIrDM=
+cloud.google.com/go/gaming v1.6.0/go.mod h1:YMU1GEvA39Qt3zWGyAVA9bpYz/yAhTvaQ1t2sK4KPUA=
+cloud.google.com/go/gaming v1.7.0/go.mod h1:LrB8U7MHdGgFG851iHAfqUdLcKBdQ55hzXy9xBJz0+w=
+cloud.google.com/go/gaming v1.8.0/go.mod h1:xAqjS8b7jAVW0KFYeRUxngo9My3f33kFmua++Pi+ggM=
+cloud.google.com/go/gkebackup v0.2.0/go.mod h1:XKvv/4LfG829/B8B7xRkk8zRrOEbKtEam6yNfuQNH60=
+cloud.google.com/go/gkebackup v0.3.0/go.mod h1:n/E671i1aOQvUxT541aTkCwExO/bTer2HDlj4TsBRAo=
+cloud.google.com/go/gkeconnect v0.5.0/go.mod h1:c5lsNAg5EwAy7fkqX/+goqFsU1Da/jQFqArp+wGNr/o=
+cloud.google.com/go/gkeconnect v0.6.0/go.mod h1:Mln67KyU/sHJEBY8kFZ0xTeyPtzbq9StAVvEULYK16A=
+cloud.google.com/go/gkehub v0.9.0/go.mod h1:WYHN6WG8w9bXU0hqNxt8rm5uxnk8IH+lPY9J2TV7BK0=
+cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y977wO+hBH0=
+cloud.google.com/go/gkemulticloud v0.3.0/go.mod h1:7orzy7O0S+5kq95e4Hpn7RysVA7dPs8W/GgfUtsPbrA=
+cloud.google.com/go/gkemulticloud v0.4.0/go.mod h1:E9gxVBnseLWCk24ch+P9+B2CoDFJZTyIgLKSalC7tuI=
+cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc=
+cloud.google.com/go/gsuiteaddons v1.3.0/go.mod h1:EUNK/J1lZEZO8yPtykKxLXI6JSVN2rg9bN8SXOa0bgM=
+cloud.google.com/go/gsuiteaddons v1.4.0/go.mod h1:rZK5I8hht7u7HxFQcFei0+AtfS9uSushomRlg+3ua1o=
+cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY=
+cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc=
+cloud.google.com/go/iam v0.6.0/go.mod h1:+1AH33ueBne5MzYccyMHtEKqLE4/kJOibtffMHDMFMc=
+cloud.google.com/go/iam v0.7.0/go.mod h1:H5Br8wRaDGNc8XP3keLc4unfUUZeyH3Sfl9XpQEYOeg=
+cloud.google.com/go/iap v1.4.0/go.mod h1:RGFwRJdihTINIe4wZ2iCP0zF/qu18ZwyKxrhMhygBEc=
+cloud.google.com/go/iap v1.5.0/go.mod h1:UH/CGgKd4KyohZL5Pt0jSKE4m3FR51qg6FKQ/z/Ix9A=
+cloud.google.com/go/ids v1.1.0/go.mod h1:WIuwCaYVOzHIj2OhN9HAwvW+DBdmUAdcWlFxRl+KubM=
+cloud.google.com/go/ids v1.2.0/go.mod h1:5WXvp4n25S0rA/mQWAg1YEEBBq6/s+7ml1RDCW1IrcY=
+cloud.google.com/go/iot v1.3.0/go.mod h1:r7RGh2B61+B8oz0AGE+J72AhA0G7tdXItODWsaA2oLs=
+cloud.google.com/go/iot v1.4.0/go.mod h1:dIDxPOn0UvNDUMD8Ger7FIaTuvMkj+aGk94RPP0iV+g=
+cloud.google.com/go/kms v1.5.0/go.mod h1:QJS2YY0eJGBg3mnDfuaCyLauWwBJiHRboYxJ++1xJNg=
+cloud.google.com/go/kms v1.6.0/go.mod h1:Jjy850yySiasBUDi6KFUwUv2n1+o7QZFyuUJg6OgjA0=
+cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic=
+cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI=
+cloud.google.com/go/language v1.7.0/go.mod h1:DJ6dYN/W+SQOjF8e1hLQXMF21AkH2w9wiPzPCJa2MIE=
+cloud.google.com/go/language v1.8.0/go.mod h1:qYPVHf7SPoNNiCL2Dr0FfEFNil1qi3pQEyygwpgVKB8=
+cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8=
+cloud.google.com/go/lifesciences v0.6.0/go.mod h1:ddj6tSX/7BOnhxCSd3ZcETvtNr8NZ6t/iPhY2Tyfu08=
+cloud.google.com/go/longrunning v0.1.1/go.mod h1:UUFxuDWkv22EuY93jjmDMFT5GPQKeFVJBIF6QlTqdsE=
+cloud.google.com/go/longrunning v0.3.0/go.mod h1:qth9Y41RRSUE69rDcOn6DdK3HfQfsUI0YSmW3iIlLJc=
+cloud.google.com/go/managedidentities v1.3.0/go.mod h1:UzlW3cBOiPrzucO5qWkNkh0w33KFtBJU281hacNvsdE=
+cloud.google.com/go/managedidentities v1.4.0/go.mod h1:NWSBYbEMgqmbZsLIyKvxrYbtqOsxY1ZrGM+9RgDqInM=
+cloud.google.com/go/mediatranslation v0.5.0/go.mod h1:jGPUhGTybqsPQn91pNXw0xVHfuJ3leR1wj37oU3y1f4=
+cloud.google.com/go/mediatranslation v0.6.0/go.mod h1:hHdBCTYNigsBxshbznuIMFNe5QXEowAuNmmC7h8pu5w=
+cloud.google.com/go/memcache v1.4.0/go.mod h1:rTOfiGZtJX1AaFUrOgsMHX5kAzaTQ8azHiuDoTPzNsE=
+cloud.google.com/go/memcache v1.5.0/go.mod h1:dk3fCK7dVo0cUU2c36jKb4VqKPS22BTkf81Xq617aWM=
+cloud.google.com/go/memcache v1.6.0/go.mod h1:XS5xB0eQZdHtTuTF9Hf8eJkKtR3pVRCcvJwtm68T3rA=
+cloud.google.com/go/memcache v1.7.0/go.mod h1:ywMKfjWhNtkQTxrWxCkCFkoPjLHPW6A7WOTVI8xy3LY=
+cloud.google.com/go/metastore v1.5.0/go.mod h1:2ZNrDcQwghfdtCwJ33nM0+GrBGlVuh8rakL3vdPY3XY=
+cloud.google.com/go/metastore v1.6.0/go.mod h1:6cyQTls8CWXzk45G55x57DVQ9gWg7RiH65+YgPsNh9s=
+cloud.google.com/go/metastore v1.7.0/go.mod h1:s45D0B4IlsINu87/AsWiEVYbLaIMeUSoxlKKDqBGFS8=
+cloud.google.com/go/metastore v1.8.0/go.mod h1:zHiMc4ZUpBiM7twCIFQmJ9JMEkDSyZS9U12uf7wHqSI=
+cloud.google.com/go/monitoring v1.7.0/go.mod h1:HpYse6kkGo//7p6sT0wsIC6IBDET0RhIsnmlA53dvEk=
+cloud.google.com/go/monitoring v1.8.0/go.mod h1:E7PtoMJ1kQXWxPjB6mv2fhC5/15jInuulFdYYtlcvT4=
+cloud.google.com/go/networkconnectivity v1.4.0/go.mod h1:nOl7YL8odKyAOtzNX73/M5/mGZgqqMeryi6UPZTk/rA=
+cloud.google.com/go/networkconnectivity v1.5.0/go.mod h1:3GzqJx7uhtlM3kln0+x5wyFvuVH1pIBJjhCpjzSt75o=
+cloud.google.com/go/networkconnectivity v1.6.0/go.mod h1:OJOoEXW+0LAxHh89nXd64uGG+FbQoeH8DtxCHVOMlaM=
+cloud.google.com/go/networkconnectivity v1.7.0/go.mod h1:RMuSbkdbPwNMQjB5HBWD5MpTBnNm39iAVpC3TmsExt8=
+cloud.google.com/go/networkmanagement v1.4.0/go.mod h1:Q9mdLLRn60AsOrPc8rs8iNV6OHXaGcDdsIQe1ohekq8=
+cloud.google.com/go/networkmanagement v1.5.0/go.mod h1:ZnOeZ/evzUdUsnvRt792H0uYEnHQEMaz+REhhzJRcf4=
+cloud.google.com/go/networksecurity v0.5.0/go.mod h1:xS6fOCoqpVC5zx15Z/MqkfDwH4+m/61A3ODiDV1xmiQ=
+cloud.google.com/go/networksecurity v0.6.0/go.mod h1:Q5fjhTr9WMI5mbpRYEbiexTzROf7ZbDzvzCrNl14nyU=
+cloud.google.com/go/notebooks v1.2.0/go.mod h1:9+wtppMfVPUeJ8fIWPOq1UnATHISkGXGqTkxeieQ6UY=
+cloud.google.com/go/notebooks v1.3.0/go.mod h1:bFR5lj07DtCPC7YAAJ//vHskFBxA5JzYlH68kXVdk34=
+cloud.google.com/go/notebooks v1.4.0/go.mod h1:4QPMngcwmgb6uw7Po99B2xv5ufVoIQ7nOGDyL4P8AgA=
+cloud.google.com/go/notebooks v1.5.0/go.mod h1:q8mwhnP9aR8Hpfnrc5iN5IBhrXUy8S2vuYs+kBJ/gu0=
+cloud.google.com/go/optimization v1.1.0/go.mod h1:5po+wfvX5AQlPznyVEZjGJTMr4+CAkJf2XSTQOOl9l4=
+cloud.google.com/go/optimization v1.2.0/go.mod h1:Lr7SOHdRDENsh+WXVmQhQTrzdu9ybg0NecjHidBq6xs=
+cloud.google.com/go/orchestration v1.3.0/go.mod h1:Sj5tq/JpWiB//X/q3Ngwdl5K7B7Y0KZ7bfv0wL6fqVA=
+cloud.google.com/go/orchestration v1.4.0/go.mod h1:6W5NLFWs2TlniBphAViZEVhrXRSMgUGDfW7vrWKvsBk=
+cloud.google.com/go/orgpolicy v1.4.0/go.mod h1:xrSLIV4RePWmP9P3tBl8S93lTmlAxjm06NSm2UTmKvE=
+cloud.google.com/go/orgpolicy v1.5.0/go.mod h1:hZEc5q3wzwXJaKrsx5+Ewg0u1LxJ51nNFlext7Tanwc=
+cloud.google.com/go/osconfig v1.7.0/go.mod h1:oVHeCeZELfJP7XLxcBGTMBvRO+1nQ5tFG9VQTmYS2Fs=
+cloud.google.com/go/osconfig v1.8.0/go.mod h1:EQqZLu5w5XA7eKizepumcvWx+m8mJUhEwiPqWiZeEdg=
+cloud.google.com/go/osconfig v1.9.0/go.mod h1:Yx+IeIZJ3bdWmzbQU4fxNl8xsZ4amB+dygAwFPlvnNo=
+cloud.google.com/go/osconfig v1.10.0/go.mod h1:uMhCzqC5I8zfD9zDEAfvgVhDS8oIjySWh+l4WK6GnWw=
+cloud.google.com/go/oslogin v1.4.0/go.mod h1:YdgMXWRaElXz/lDk1Na6Fh5orF7gvmJ0FGLIs9LId4E=
+cloud.google.com/go/oslogin v1.5.0/go.mod h1:D260Qj11W2qx/HVF29zBg+0fd6YCSjSqLUkY/qEenQU=
+cloud.google.com/go/oslogin v1.6.0/go.mod h1:zOJ1O3+dTU8WPlGEkFSh7qeHPPSoxrcMbbK1Nm2iX70=
+cloud.google.com/go/oslogin v1.7.0/go.mod h1:e04SN0xO1UNJ1M5GP0vzVBFicIe4O53FOfcixIqTyXo=
+cloud.google.com/go/phishingprotection v0.5.0/go.mod h1:Y3HZknsK9bc9dMi+oE8Bim0lczMU6hrX0UpADuMefr0=
+cloud.google.com/go/phishingprotection v0.6.0/go.mod h1:9Y3LBLgy0kDTcYET8ZH3bq/7qni15yVUoAxiFxnlSUA=
+cloud.google.com/go/policytroubleshooter v1.3.0/go.mod h1:qy0+VwANja+kKrjlQuOzmlvscn4RNsAc0e15GGqfMxg=
+cloud.google.com/go/policytroubleshooter v1.4.0/go.mod h1:DZT4BcRw3QoO8ota9xw/LKtPa8lKeCByYeKTIf/vxdE=
+cloud.google.com/go/privatecatalog v0.5.0/go.mod h1:XgosMUvvPyxDjAVNDYxJ7wBW8//hLDDYmnsNcMGq1K0=
+cloud.google.com/go/privatecatalog v0.6.0/go.mod h1:i/fbkZR0hLN29eEWiiwue8Pb+GforiEIBnV9yrRUOKI=
cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I=
cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw=
cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA=
cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU=
+cloud.google.com/go/recaptchaenterprise v1.3.1/go.mod h1:OdD+q+y4XGeAlxRaMn1Y7/GveP6zmq76byL6tjPE7d4=
+cloud.google.com/go/recaptchaenterprise/v2 v2.1.0/go.mod h1:w9yVqajwroDNTfGuhmOjPDN//rZGySaf6PtFVcSCa7o=
+cloud.google.com/go/recaptchaenterprise/v2 v2.2.0/go.mod h1:/Zu5jisWGeERrd5HnlS3EUGb/D335f9k51B/FVil0jk=
+cloud.google.com/go/recaptchaenterprise/v2 v2.3.0/go.mod h1:O9LwGCjrhGHBQET5CA7dd5NwwNQUErSgEDit1DLNTdo=
+cloud.google.com/go/recaptchaenterprise/v2 v2.4.0/go.mod h1:Am3LHfOuBstrLrNCBrlI5sbwx9LBg3te2N6hGvHn2mE=
+cloud.google.com/go/recaptchaenterprise/v2 v2.5.0/go.mod h1:O8LzcHXN3rz0j+LBC91jrwI3R+1ZSZEWrfL7XHgNo9U=
+cloud.google.com/go/recommendationengine v0.5.0/go.mod h1:E5756pJcVFeVgaQv3WNpImkFP8a+RptV6dDLGPILjvg=
+cloud.google.com/go/recommendationengine v0.6.0/go.mod h1:08mq2umu9oIqc7tDy8sx+MNJdLG0fUi3vaSVbztHgJ4=
+cloud.google.com/go/recommender v1.5.0/go.mod h1:jdoeiBIVrJe9gQjwd759ecLJbxCDED4A6p+mqoqDvTg=
+cloud.google.com/go/recommender v1.6.0/go.mod h1:+yETpm25mcoiECKh9DEScGzIRyDKpZ0cEhWGo+8bo+c=
+cloud.google.com/go/recommender v1.7.0/go.mod h1:XLHs/W+T8olwlGOgfQenXBTbIseGclClff6lhFVe9Bs=
+cloud.google.com/go/recommender v1.8.0/go.mod h1:PkjXrTT05BFKwxaUxQmtIlrtj0kph108r02ZZQ5FE70=
+cloud.google.com/go/redis v1.7.0/go.mod h1:V3x5Jq1jzUcg+UNsRvdmsfuFnit1cfe3Z/PGyq/lm4Y=
+cloud.google.com/go/redis v1.8.0/go.mod h1:Fm2szCDavWzBk2cDKxrkmWBqoCiL1+Ctwq7EyqBCA/A=
+cloud.google.com/go/redis v1.9.0/go.mod h1:HMYQuajvb2D0LvMgZmLDZW8V5aOC/WxstZHiy4g8OiA=
+cloud.google.com/go/redis v1.10.0/go.mod h1:ThJf3mMBQtW18JzGgh41/Wld6vnDDc/F/F35UolRZPM=
+cloud.google.com/go/resourcemanager v1.3.0/go.mod h1:bAtrTjZQFJkiWTPDb1WBjzvc6/kifjj4QBYuKCCoqKA=
+cloud.google.com/go/resourcemanager v1.4.0/go.mod h1:MwxuzkumyTX7/a3n37gmsT3py7LIXwrShilPh3P1tR0=
+cloud.google.com/go/resourcesettings v1.3.0/go.mod h1:lzew8VfESA5DQ8gdlHwMrqZs1S9V87v3oCnKCWoOuQU=
+cloud.google.com/go/resourcesettings v1.4.0/go.mod h1:ldiH9IJpcrlC3VSuCGvjR5of/ezRrOxFtpJoJo5SmXg=
+cloud.google.com/go/retail v1.8.0/go.mod h1:QblKS8waDmNUhghY2TI9O3JLlFk8jybHeV4BF19FrE4=
+cloud.google.com/go/retail v1.9.0/go.mod h1:g6jb6mKuCS1QKnH/dpu7isX253absFl6iE92nHwlBUY=
+cloud.google.com/go/retail v1.10.0/go.mod h1:2gDk9HsL4HMS4oZwz6daui2/jmKvqShXKQuB2RZ+cCc=
+cloud.google.com/go/retail v1.11.0/go.mod h1:MBLk1NaWPmh6iVFSz9MeKG/Psyd7TAgm6y/9L2B4x9Y=
+cloud.google.com/go/run v0.2.0/go.mod h1:CNtKsTA1sDcnqqIFR3Pb5Tq0usWxJJvsWOCPldRU3Do=
+cloud.google.com/go/run v0.3.0/go.mod h1:TuyY1+taHxTjrD0ZFk2iAR+xyOXEA0ztb7U3UNA0zBo=
+cloud.google.com/go/scheduler v1.4.0/go.mod h1:drcJBmxF3aqZJRhmkHQ9b3uSSpQoltBPGPxGAWROx6s=
+cloud.google.com/go/scheduler v1.5.0/go.mod h1:ri073ym49NW3AfT6DZi21vLZrG07GXr5p3H1KxN5QlI=
+cloud.google.com/go/scheduler v1.6.0/go.mod h1:SgeKVM7MIwPn3BqtcBntpLyrIJftQISRrYB5ZtT+KOk=
+cloud.google.com/go/scheduler v1.7.0/go.mod h1:jyCiBqWW956uBjjPMMuX09n3x37mtyPJegEWKxRsn44=
+cloud.google.com/go/secretmanager v1.6.0/go.mod h1:awVa/OXF6IiyaU1wQ34inzQNc4ISIDIrId8qE5QGgKA=
+cloud.google.com/go/secretmanager v1.8.0/go.mod h1:hnVgi/bN5MYHd3Gt0SPuTPPp5ENina1/LxM+2W9U9J4=
+cloud.google.com/go/secretmanager v1.9.0/go.mod h1:b71qH2l1yHmWQHt9LC80akm86mX8AL6X1MA01dW8ht4=
+cloud.google.com/go/security v1.5.0/go.mod h1:lgxGdyOKKjHL4YG3/YwIL2zLqMFCKs0UbQwgyZmfJl4=
+cloud.google.com/go/security v1.7.0/go.mod h1:mZklORHl6Bg7CNnnjLH//0UlAlaXqiG7Lb9PsPXLfD0=
+cloud.google.com/go/security v1.8.0/go.mod h1:hAQOwgmaHhztFhiQ41CjDODdWP0+AE1B3sX4OFlq+GU=
+cloud.google.com/go/security v1.9.0/go.mod h1:6Ta1bO8LXI89nZnmnsZGp9lVoVWXqsVbIq/t9dzI+2Q=
+cloud.google.com/go/security v1.10.0/go.mod h1:QtOMZByJVlibUT2h9afNDWRZ1G96gVywH8T5GUSb9IA=
+cloud.google.com/go/securitycenter v1.13.0/go.mod h1:cv5qNAqjY84FCN6Y9z28WlkKXyWsgLO832YiWwkCWcU=
+cloud.google.com/go/securitycenter v1.14.0/go.mod h1:gZLAhtyKv85n52XYWt6RmeBdydyxfPeTrpToDPw4Auc=
+cloud.google.com/go/securitycenter v1.15.0/go.mod h1:PeKJ0t8MoFmmXLXWm41JidyzI3PJjd8sXWaVqg43WWk=
+cloud.google.com/go/securitycenter v1.16.0/go.mod h1:Q9GMaLQFUD+5ZTabrbujNWLtSLZIZF7SAR0wWECrjdk=
+cloud.google.com/go/servicecontrol v1.4.0/go.mod h1:o0hUSJ1TXJAmi/7fLJAedOovnujSEvjKCAFNXPQ1RaU=
+cloud.google.com/go/servicecontrol v1.5.0/go.mod h1:qM0CnXHhyqKVuiZnGKrIurvVImCs8gmqWsDoqe9sU1s=
+cloud.google.com/go/servicedirectory v1.4.0/go.mod h1:gH1MUaZCgtP7qQiI+F+A+OpeKF/HQWgtAddhTbhL2bs=
+cloud.google.com/go/servicedirectory v1.5.0/go.mod h1:QMKFL0NUySbpZJ1UZs3oFAmdvVxhhxB6eJ/Vlp73dfg=
+cloud.google.com/go/servicedirectory v1.6.0/go.mod h1:pUlbnWsLH9c13yGkxCmfumWEPjsRs1RlmJ4pqiNjVL4=
+cloud.google.com/go/servicedirectory v1.7.0/go.mod h1:5p/U5oyvgYGYejufvxhgwjL8UVXjkuw7q5XcG10wx1U=
+cloud.google.com/go/servicemanagement v1.4.0/go.mod h1:d8t8MDbezI7Z2R1O/wu8oTggo3BI2GKYbdG4y/SJTco=
+cloud.google.com/go/servicemanagement v1.5.0/go.mod h1:XGaCRe57kfqu4+lRxaFEAuqmjzF0r+gWHjWqKqBvKFo=
+cloud.google.com/go/serviceusage v1.3.0/go.mod h1:Hya1cozXM4SeSKTAgGXgj97GlqUvF5JaoXacR1JTP/E=
+cloud.google.com/go/serviceusage v1.4.0/go.mod h1:SB4yxXSaYVuUBYUml6qklyONXNLt83U0Rb+CXyhjEeU=
+cloud.google.com/go/shell v1.3.0/go.mod h1:VZ9HmRjZBsjLGXusm7K5Q5lzzByZmJHf1d0IWHEN5X4=
+cloud.google.com/go/shell v1.4.0/go.mod h1:HDxPzZf3GkDdhExzD/gs8Grqk+dmYcEjGShZgYa9URw=
+cloud.google.com/go/speech v1.6.0/go.mod h1:79tcr4FHCimOp56lwC01xnt/WPJZc4v3gzyT7FoBkCM=
+cloud.google.com/go/speech v1.7.0/go.mod h1:KptqL+BAQIhMsj1kOP2la5DSEEerPDuOP/2mmkhHhZQ=
+cloud.google.com/go/speech v1.8.0/go.mod h1:9bYIl1/tjsAnMgKGHKmBZzXKEkGgtU+MpdDPTE9f7y0=
+cloud.google.com/go/speech v1.9.0/go.mod h1:xQ0jTcmnRFFM2RfX/U+rk6FQNUF6DQlydUSyoooSpco=
cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw=
cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos=
cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk=
cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs=
cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
+cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y=
+cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc=
+cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s=
+cloud.google.com/go/storagetransfer v1.5.0/go.mod h1:dxNzUopWy7RQevYFHewchb29POFv3/AaBgnhqzqiK0w=
+cloud.google.com/go/storagetransfer v1.6.0/go.mod h1:y77xm4CQV/ZhFZH75PLEXY0ROiS7Gh6pSKrM8dJyg6I=
+cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw=
+cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g=
+cloud.google.com/go/talent v1.3.0/go.mod h1:CmcxwJ/PKfRgd1pBjQgU6W3YBwiewmUzQYH5HHmSCmM=
+cloud.google.com/go/talent v1.4.0/go.mod h1:ezFtAgVuRf8jRsvyE6EwmbTK5LKciD4KVnHuDEFmOOA=
+cloud.google.com/go/texttospeech v1.4.0/go.mod h1:FX8HQHA6sEpJ7rCMSfXuzBcysDAuWusNNNvN9FELDd8=
+cloud.google.com/go/texttospeech v1.5.0/go.mod h1:oKPLhR4n4ZdQqWKURdwxMy0uiTS1xU161C8W57Wkea4=
+cloud.google.com/go/tpu v1.3.0/go.mod h1:aJIManG0o20tfDQlRIej44FcwGGl/cD0oiRyMKG19IQ=
+cloud.google.com/go/tpu v1.4.0/go.mod h1:mjZaX8p0VBgllCzF6wcU2ovUXN9TONFLd7iz227X2Xg=
+cloud.google.com/go/trace v1.3.0/go.mod h1:FFUE83d9Ca57C+K8rDl/Ih8LwOzWIV1krKgxg6N0G28=
+cloud.google.com/go/trace v1.4.0/go.mod h1:UG0v8UBqzusp+z63o7FK74SdFE+AXpCLdFb1rshXG+Y=
+cloud.google.com/go/translate v1.3.0/go.mod h1:gzMUwRjvOqj5i69y/LYLd8RrNQk+hOmIXTi9+nb3Djs=
+cloud.google.com/go/translate v1.4.0/go.mod h1:06Dn/ppvLD6WvA5Rhdp029IX2Mi3Mn7fpMRLPvXT5Wg=
+cloud.google.com/go/video v1.8.0/go.mod h1:sTzKFc0bUSByE8Yoh8X0mn8bMymItVGPfTuUBUyRgxk=
+cloud.google.com/go/video v1.9.0/go.mod h1:0RhNKFRF5v92f8dQt0yhaHrEuH95m068JYOvLZYnJSw=
+cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU=
+cloud.google.com/go/videointelligence v1.7.0/go.mod h1:k8pI/1wAhjznARtVT9U1llUaFNPh7muw8QyOUpavru4=
+cloud.google.com/go/videointelligence v1.8.0/go.mod h1:dIcCn4gVDdS7yte/w+koiXn5dWVplOZkE+xwG9FgK+M=
+cloud.google.com/go/videointelligence v1.9.0/go.mod h1:29lVRMPDYHikk3v8EdPSaL8Ku+eMzDljjuvRs105XoU=
+cloud.google.com/go/vision v1.2.0/go.mod h1:SmNwgObm5DpFBme2xpyOyasvBc1aPdjvMk2bBk0tKD0=
+cloud.google.com/go/vision/v2 v2.2.0/go.mod h1:uCdV4PpN1S0jyCyq8sIM42v2Y6zOLkZs+4R9LrGYwFo=
+cloud.google.com/go/vision/v2 v2.3.0/go.mod h1:UO61abBx9QRMFkNBbf1D8B1LXdS2cGiiCRx0vSpZoUo=
+cloud.google.com/go/vision/v2 v2.4.0/go.mod h1:VtI579ll9RpVTrdKdkMzckdnwMyX2JILb+MhPqRbPsY=
+cloud.google.com/go/vision/v2 v2.5.0/go.mod h1:MmaezXOOE+IWa+cS7OhRRLK2cNv1ZL98zhqFFZaaH2E=
+cloud.google.com/go/vmmigration v1.2.0/go.mod h1:IRf0o7myyWFSmVR1ItrBSFLFD/rJkfDCUTO4vLlJvsE=
+cloud.google.com/go/vmmigration v1.3.0/go.mod h1:oGJ6ZgGPQOFdjHuocGcLqX4lc98YQ7Ygq8YQwHh9A7g=
+cloud.google.com/go/vpcaccess v1.4.0/go.mod h1:aQHVbTWDYUR1EbTApSVvMq1EnT57ppDmQzZ3imqIk4w=
+cloud.google.com/go/vpcaccess v1.5.0/go.mod h1:drmg4HLk9NkZpGfCmZ3Tz0Bwnm2+DKqViEpeEpOq0m8=
+cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xXZmFiHmGE=
+cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg=
+cloud.google.com/go/webrisk v1.6.0/go.mod h1:65sW9V9rOosnc9ZY7A7jsy1zoHS5W9IAXv6dGqhMQMc=
+cloud.google.com/go/webrisk v1.7.0/go.mod h1:mVMHgEYH0r337nmt1JyLthzMr6YxwN1aAIEc2fTcq7A=
+cloud.google.com/go/websecurityscanner v1.3.0/go.mod h1:uImdKm2wyeXQevQJXeh8Uun/Ym1VqworNDlBXQevGMo=
+cloud.google.com/go/websecurityscanner v1.4.0/go.mod h1:ebit/Fp0a+FWu5j4JOmJEV8S8CzdTkAS77oDsiSqYWQ=
+cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0=
+cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M=
+cloud.google.com/go/workflows v1.8.0/go.mod h1:ysGhmEajwZxGn1OhGOGKsTXc5PyxOc0vfKf5Af+to4M=
+cloud.google.com/go/workflows v1.9.0/go.mod h1:ZGkj1aFIOd9c8Gerkjjq7OW7I5+l6cSvT3ujaO/WwSA=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
-github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
-github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
-github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
github.com/antihax/optional v1.0.0 h1:xK2lYat7ZLaVVcIuj82J8kIro4V6kDe0AUDFboUCwcg=
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
-github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
-github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
-github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
-github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
-github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
-github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d h1:xDfNPAt8lFiC1UJrqV3uuy861HCTo708pDMbjHHdCas=
-github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4=
-github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
-github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84=
-github.com/bufbuild/buf v0.37.0 h1:11zJVA0D4uJVGOC9h+oOVHrKKoBgMYIqJJ0d1Xt6oeQ=
-github.com/bufbuild/buf v0.37.0/go.mod h1:lQ1m2HkIaGOFba6w/aC3KYBHhKEOESP3gaAEpS3dAFM=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
+github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
+github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
-github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
-github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
-github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
-github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
-github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
-github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
+github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI=
+github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
+github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
+github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
+github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
+github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
-github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
-github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
+github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po=
github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
+github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ=
+github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0=
+github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
-github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
-github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
-github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
-github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
-github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
-github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
-github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
-github.com/gofrs/flock v0.8.0 h1:MSdYClljsF3PbENUUEx85nkWfJSGfzYI9yEBZOJz6CY=
-github.com/gofrs/flock v0.8.0/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU=
-github.com/gofrs/uuid v4.0.0+incompatible h1:1SD/1F5pU8p29ybwgQSwpQk+mwdRrXCYuPhW6m+TnJw=
-github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
-github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
-github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
-github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
-github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
+github.com/golang/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ=
+github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4=
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
-github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY=
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
@@ -107,6 +410,8 @@ github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt
github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=
+github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8=
+github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
@@ -122,8 +427,10 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
+github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM=
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
+github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
@@ -133,12 +440,19 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
+github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
+github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
+github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
+github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
+github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk=
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
@@ -146,167 +460,74 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf
github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
+github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
+github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
+github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
+github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
+github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
+github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
+github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
+github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
+github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8=
+github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8=
+github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg=
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
-github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
-github.com/gordonklaus/ineffassign v0.0.0-20200309095847-7953dde2c7bf/go.mod h1:cuNKsD1zp2v6XfE/orVX2QE1LC+i254ceGcVeDT3pTU=
-github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
-github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
-github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
-github.com/grpc-ecosystem/grpc-gateway v1.9.0 h1:bM6ZAFZmc/wPFaRDi0d5L7hGEZEx/2u+Tmr2evNHDiI=
-github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
-github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q=
-github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8=
-github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
-github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
-github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
-github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM=
-github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
-github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU=
-github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU=
-github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4=
-github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
-github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
-github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90=
+github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0=
+github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM=
+github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM=
+github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM=
+github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c=
+github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo=
+github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY=
+github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4=
+github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo=
+github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
-github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
-github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=
-github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=
-github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
-github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
-github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=
-github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
-github.com/jhump/protoreflect v1.8.1 h1:z7Ciiz3Bz37zSd485fbiTW8ABafIasyOWZI0N9EUUdo=
-github.com/jhump/protoreflect v1.8.1/go.mod h1:7GcYQDdMU/O/BBrl/cX6PNHpXh6cenjd8pneu5yW7Tg=
-github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
-github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
+github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
-github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
-github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
-github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
-github.com/klauspost/compress v1.11.7 h1:0hzRabrMN4tSTvMfnL3SCv1ZGeAP23ynzodBgaHeMeg=
-github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
-github.com/klauspost/pgzip v1.2.5 h1:qnWYvvKqedOF2ulHpMG72XQol4ILEJ8k2wwRl/Km8oE=
-github.com/klauspost/pgzip v1.2.5/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs=
-github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
-github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
-github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
-github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
-github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
-github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
-github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
-github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
-github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
-github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
-github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
-github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg=
-github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY=
-github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
-github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
-github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
-github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
-github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
-github.com/nishanths/predeclared v0.0.0-20200524104333-86fad755b4d3/go.mod h1:nt3d53pc1VYcphSCIaYAJtnPYnr3Zyn8fMq2wvPGPso=
-github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
-github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
-github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
-github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
-github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
-github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
-github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
-github.com/pkg/profile v1.5.0 h1:042Buzk+NhDI+DeSAA62RwJL8VAuZUMQZUjCsRz1Mug=
-github.com/pkg/profile v1.5.0/go.mod h1:qBsxPvzyUincmltOk6iyRVxHYg4adc0OFOv72ZdLa18=
-github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
-github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
-github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso=
-github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
-github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
-github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
-github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
-github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
-github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
-github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
-github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
github.com/rogpeppe/fastuuid v1.2.0 h1:Ppwyp6VYCF1nvBTXL3trRso7mXMlRrw9ooo375wvi2s=
github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
-github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
-github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
-github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
-github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
-github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
-github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
-github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
-github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
-github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
-github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
-github.com/spf13/cobra v1.0.1-0.20201006035406-b97b5ead31f7 h1:O63eWlXlvyw4YdsuatjRIU6emvJ2fqz+PTdMEoxIT2s=
-github.com/spf13/cobra v1.0.1-0.20201006035406-b97b5ead31f7/go.mod h1:yk5b0mALVusDL5fMM6Rd1wgnoO5jUPhwsQ6LQAJTidQ=
-github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
-github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
-github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
-github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
-github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
-github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
-github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
-github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
-github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
-github.com/twitchtv/twirp v7.1.0+incompatible h1:3fNSDoSPyq+fTrifIvGue9XM/tptzuhiGY83rxPVNUg=
-github.com/twitchtv/twirp v7.1.0+incompatible/go.mod h1:RRJoFSAmTEh2weEqWtpPE3vFK5YBhA6bqp2l1kfCC5A=
-github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
-go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
+github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
+github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
-go.opencensus.io v0.22.6 h1:BdkrbWrzDlV9dnbzoP7sfN+dHheJ4J9JOaYxcUDL+ok=
-go.opencensus.io v0.22.6/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=
-go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
-go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
-go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw=
-go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
-go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
-go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU=
-go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
-go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
-go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
-go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
-go.uber.org/zap v1.16.0 h1:uFRZXykJGK9lLY4HtgSw44DnIcAM+kRBP7x5m+NpAOM=
-go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ=
-golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
-golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
+go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
+go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=
+go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
@@ -329,8 +550,8 @@ golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHl
golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs=
golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
-golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 h1:2M3HP5CCK1Si9FQhwnzYhXdG6DXeebvUHFpre8QvbyI=
golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
+golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
@@ -338,14 +559,13 @@ golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY=
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
-golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
@@ -371,17 +591,55 @@ golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81R
golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
+golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
+golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
-golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4 h1:b0LrWgu8+q7z4J+0Y3Umo5q1dL7NXBkKBWkaVkAq17E=
+golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc=
+golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
+golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
+golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
+golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
+golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
+golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
+golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
+golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
+golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
+golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
+golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
+golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
+golang.org/x/net v0.0.0-20221012135044-0b7e1fb9d458/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
+golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
+golang.org/x/net v0.2.0 h1:sZfSu1wtKLGlWI4ZZayP0ck9Y73K1ynO6gqzTdBVdPU=
+golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
-golang.org/x/oauth2 v0.0.0-20210427180440-81ed05c6b58c h1:SgVl/sCtkicsS7psKkje4H9YtjdEl3xsYh7N+5TDHqY=
-golang.org/x/oauth2 v0.0.0-20210427180440-81ed05c6b58c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
+golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
+golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
+golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
+golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
+golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
+golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
+golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
+golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
+golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
+golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
+golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
+golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc=
+golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc=
+golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc=
+golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE=
+golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE=
+golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg=
+golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg=
+golang.org/x/oauth2 v0.0.0-20221006150949-b44042a4b9c1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg=
+golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg=
+golang.org/x/oauth2 v0.2.0 h1:GtQkldQ9m7yvzCL1V+LrYow3Khe0eJH0w7RbX/VbaIU=
+golang.org/x/oauth2 v0.2.0/go.mod h1:Cwn6afJ8jrQwYMxQDTpISoXmXW9I6qF6vDeuuoX3Ibs=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -391,12 +649,13 @@ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -421,32 +680,69 @@ golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4 h1:EZ2mChiOa8udjfp6rRmswTbtZN/QzUQp4ptM4rnjHvc=
golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.2.0 h1:ljd4t30dBnAvMZaQCevtY0xLLD0A+bRZXbgLMLU1F/A=
+golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
+golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
+golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/text v0.3.5 h1:i6eZZ+zk0SOf0xgBpEpPD18qWcJda6q1sxt3S0kzyUQ=
+golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
+golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
+golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg=
+golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
-golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
-golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
@@ -456,9 +752,6 @@ golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgw
golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
@@ -480,19 +773,30 @@ golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWc
golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
-golang.org/x/tools v0.0.0-20200522201501-cb1345f3a375/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
-golang.org/x/tools v0.0.0-20200717024301-6ddee64345a6/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
-golang.org/x/tools v0.1.0 h1:po9/4sTYwZU9lPhi1tOrb4hCv3qrhiQ77LZfGa2OjwY=
+golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE=
+golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
+golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
+golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
+golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
+golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
+golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
+golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
+golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
+golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
+golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8=
+golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8=
+golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8=
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=
google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
@@ -509,13 +813,48 @@ google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M
google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=
google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM=
google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc=
+google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg=
+google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE=
+google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8=
+google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU=
+google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94=
+google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo=
+google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4=
+google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw=
+google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU=
+google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k=
+google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE=
+google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE=
+google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI=
+google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I=
+google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo=
+google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g=
+google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA=
+google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8=
+google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs=
+google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA=
+google.golang.org/api v0.77.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA=
+google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw=
+google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg=
+google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o=
+google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g=
+google.golang.org/api v0.90.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw=
+google.golang.org/api v0.93.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw=
+google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI=
+google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s=
+google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s=
+google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s=
+google.golang.org/api v0.99.0/go.mod h1:1YOf74vkVndF7pG6hIHuINsM7eWwpVTAfNMNiL91A08=
+google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70=
+google.golang.org/api v0.102.0/go.mod h1:3VFl6/fzoA+qNuS1N1/VfXY4LjoXN/wzeIp7TweWwGo=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0=
google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
-google.golang.org/appengine v1.6.6 h1:lMO5rYAqUxkmaj76jAkRUvt5JZgFymx/+Q5Mzfivuhc=
google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
+google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c=
+google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
@@ -539,15 +878,88 @@ google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfG
google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
+google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U=
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA=
google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20210207032614-bba0dbe2a9ea/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20210426193834-eac7f76ac494 h1:KMgpo2lWy1vfrYjtxPAzR0aNWeAR1UdQykt6sj/hpBY=
-google.golang.org/genproto v0.0.0-20210426193834-eac7f76ac494/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A=
+google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20210329143202-679c6ae281ee/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A=
+google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A=
+google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A=
+google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=
+google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=
+google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=
+google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24=
+google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k=
+google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k=
+google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48=
+google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48=
+google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w=
+google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
+google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
+google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
+google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
+google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
+google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
+google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
+google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
+google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
+google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
+google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
+google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
+google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI=
+google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI=
+google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI=
+google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI=
+google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E=
+google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo=
+google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo=
+google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo=
+google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo=
+google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo=
+google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4=
+google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4=
+google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4=
+google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4=
+google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA=
+google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA=
+google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA=
+google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA=
+google.golang.org/genproto v0.0.0-20220628213854-d9e0b6570c03/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA=
+google.golang.org/genproto v0.0.0-20220722212130-b98a9ff5e252/go.mod h1:GkXuJDJ6aQ7lnJcRF+SJVgFdQhypqgl3LB1C9vabdRE=
+google.golang.org/genproto v0.0.0-20220801145646-83ce21fca29f/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc=
+google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk=
+google.golang.org/genproto v0.0.0-20220817144833-d7fd3f11b9b1/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk=
+google.golang.org/genproto v0.0.0-20220822174746-9e6da59bd2fc/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk=
+google.golang.org/genproto v0.0.0-20220829144015-23454907ede3/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk=
+google.golang.org/genproto v0.0.0-20220829175752-36a9c930ecbf/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk=
+google.golang.org/genproto v0.0.0-20220913154956-18f8339a66a5/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo=
+google.golang.org/genproto v0.0.0-20220914142337-ca0e39ece12f/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo=
+google.golang.org/genproto v0.0.0-20220915135415-7fd63a7952de/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo=
+google.golang.org/genproto v0.0.0-20220916172020-2692e8806bfa/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo=
+google.golang.org/genproto v0.0.0-20220919141832-68c03719ef51/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo=
+google.golang.org/genproto v0.0.0-20220920201722-2b89144ce006/go.mod h1:ht8XFiar2npT/g4vkk7O0WYS1sHOHbdujxbEp7CJWbw=
+google.golang.org/genproto v0.0.0-20220926165614-551eb538f295/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI=
+google.golang.org/genproto v0.0.0-20220926220553-6981cbe3cfce/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI=
+google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqwhZAwq4wsRUaVG555sVgsNmIjRtO7t/JH29U=
+google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM=
+google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM=
+google.golang.org/genproto v0.0.0-20221024153911-1573dae28c9c/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s=
+google.golang.org/genproto v0.0.0-20221024183307-1bc688fe9f3e/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s=
+google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c/go.mod h1:CGI5F/G+E5bKwmfYo09AXuVN4dD894kIKUFmVbP2/Fo=
+google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6 h1:a2S6M0+660BgMNl++4JPlcAO/CjkqYItDEZwkoDQK7c=
+google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
@@ -560,13 +972,32 @@ google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKa
google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
+google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
+google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=
google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc=
-google.golang.org/grpc v1.35.0-dev.0.20201218190559-666aea1fb34c/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
+google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8=
+google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
+google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
-google.golang.org/grpc v1.37.0 h1:uSZWeQJX5j11bIQ4AJoj+McDBo29cY1MCoC1wO3ts+c=
google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
-google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.0.0 h1:lQ+dE99pFsb8osbJB3oRfE5eW4Hx6a/lZQr8Jh+eoT4=
-google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.0.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=
+google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
+google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
+google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE=
+google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE=
+google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34=
+google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34=
+google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU=
+google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ=
+google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
+google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
+google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
+google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
+google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI=
+google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI=
+google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI=
+google.golang.org/grpc v1.51.0 h1:E1eGv1FTqoLIdnBCZufiSHgKjlqG6fKFf6pPWtMTh8U=
+google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww=
+google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
@@ -577,34 +1008,27 @@ google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2
google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
-google.golang.org/protobuf v1.25.1-0.20200805231151-a709e31e5d12/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
-google.golang.org/protobuf v1.25.1-0.20201208041424-160c7477e0e8/go.mod h1:hFxJC2f0epmp1elRCiEGJTKAWbwxZ2nvqZdHl3FQXCY=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
-google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
-gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
+google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
+google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
+google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
+google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
-gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
-gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
-gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
-gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=
-gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
-gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
-gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
+gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
-honnef.co/go/tools v0.0.1-2020.1.4 h1:UoveltGrhghAA7ePc+e+QYDHXrBps2PqFZiHkGR/xK8=
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
diff --git a/internal/casing/BUILD.bazel b/internal/casing/BUILD.bazel
index 31481939d36..93de75a48b7 100644
--- a/internal/casing/BUILD.bazel
+++ b/internal/casing/BUILD.bazel
@@ -1,8 +1,20 @@
-load("@io_bazel_rules_go//go:def.bzl", "go_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
go_library(
- name = "go_default_library",
+ name = "casing",
srcs = ["camel.go"],
importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/internal/casing",
visibility = ["//:__subpackages__"],
)
+
+alias(
+ name = "go_default_library",
+ actual = ":casing",
+ visibility = ["//:__subpackages__"],
+)
+
+go_test(
+ name = "casing_test",
+ srcs = ["camel_test.go"],
+ embed = [":casing"],
+)
diff --git a/internal/casing/LICENSE.md b/internal/casing/LICENSE.md
index 0f646931a46..ca708b0f8ab 100644
--- a/internal/casing/LICENSE.md
+++ b/internal/casing/LICENSE.md
@@ -1,4 +1,4 @@
-Copyright 2010 The Go Authors. All rights reserved.
+Copyright 2010, 2019 The Go Authors. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
diff --git a/internal/casing/README.md b/internal/casing/README.md
index 88114463aa8..928e0c70d66 100644
--- a/internal/casing/README.md
+++ b/internal/casing/README.md
@@ -1,5 +1,7 @@
# Case conversion
-This package contains a single function, copied from the
-`github.com/golang/protobuf/protoc-gen-go/generator` package. That
-modules LICENSE is referenced in its entirety in this package.
+This package contains two functions:
+- `Camel` copied from the `github.com/golang/protobuf/protoc-gen-go/generator` package.
+- `JSONCamelCase` copied from the `github.com/protocolbuffers/protobuf-go/internal/strs` package.
+
+Both these modules are licensed by The Go Authors, as reflected in this package's [LICENSE.md].
diff --git a/internal/casing/camel.go b/internal/casing/camel.go
index 8cfef4bf2a6..2b96aec9414 100644
--- a/internal/casing/camel.go
+++ b/internal/casing/camel.go
@@ -1,5 +1,10 @@
package casing
+import (
+ "path/filepath"
+ "strings"
+)
+
// Camel returns the CamelCased name.
//
// This was moved from the now deprecated github.com/golang/protobuf/protoc-gen-go/generator package
@@ -50,6 +55,36 @@ func Camel(s string) string {
return string(t)
}
+// CamelIdentifier returns the CamelCased identifier without affecting the package name/path if any.
+func CamelIdentifier(s string) string {
+ const dot = "."
+ if !strings.Contains(s, dot) {
+ return Camel(s)
+ }
+ identifier := filepath.Ext(s)
+ path := strings.TrimSuffix(s, identifier)
+ identifier = strings.TrimPrefix(identifier, dot)
+ return path + dot + Camel(identifier)
+}
+
+// JSONCamelCase converts a snake_case identifier to a camelCase identifier,
+// according to the protobuf JSON specification.
+func JSONCamelCase(s string) string {
+ var b []byte
+ var wasUnderscore bool
+ for i := 0; i < len(s); i++ { // proto identifiers are always ASCII
+ c := s[i]
+ if c != '_' {
+ if wasUnderscore && isASCIILower(c) {
+ c -= 'a' - 'A' // convert to uppercase
+ }
+ b = append(b, c)
+ }
+ wasUnderscore = c == '_'
+ }
+ return string(b)
+}
+
// And now lots of helper functions.
// Is c an ASCII lower-case letter?
diff --git a/internal/casing/camel_test.go b/internal/casing/camel_test.go
new file mode 100644
index 00000000000..ce910fa4407
--- /dev/null
+++ b/internal/casing/camel_test.go
@@ -0,0 +1,46 @@
+package casing
+
+import "testing"
+
+func TestCamelIdentifier(t *testing.T) {
+ casingTests := []struct {
+ name string
+ input string
+ want string
+ }{
+ {
+ "regular snake case identifier",
+ "snake_case",
+ "SnakeCase",
+ },
+ {
+ "snake case identifier with digit",
+ "snake_case_0_enum",
+ "SnakeCase_0Enum",
+ },
+ {
+ "regular snake case identifier with package",
+ "pathenum.snake_case",
+ "pathenum.SnakeCase",
+ },
+ {
+ "snake case identifier with digit and package",
+ "pathenum.snake_case_0_enum",
+ "pathenum.SnakeCase_0Enum",
+ },
+ {
+ "snake case identifier with digit and multiple dots",
+ "path.pathenum.snake_case_0_enum",
+ "path.pathenum.SnakeCase_0Enum",
+ },
+ }
+
+ for _, ct := range casingTests {
+ t.Run(ct.name, func(t *testing.T) {
+ got := CamelIdentifier(ct.input)
+ if ct.want != got {
+ t.Errorf("want: %s, got: %s", ct.want, got)
+ }
+ })
+ }
+}
diff --git a/internal/codegenerator/BUILD.bazel b/internal/codegenerator/BUILD.bazel
index 473f329a6c2..8766d38f5eb 100644
--- a/internal/codegenerator/BUILD.bazel
+++ b/internal/codegenerator/BUILD.bazel
@@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
package(default_visibility = ["//visibility:public"])
go_library(
- name = "go_default_library",
+ name = "codegenerator",
srcs = [
"doc.go",
"parse_req.go",
@@ -11,20 +11,26 @@ go_library(
],
importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/internal/codegenerator",
deps = [
- "@org_golang_google_protobuf//compiler/protogen:go_default_library",
- "@org_golang_google_protobuf//proto:go_default_library",
- "@org_golang_google_protobuf//types/pluginpb:go_default_library",
+ "@org_golang_google_protobuf//compiler/protogen",
+ "@org_golang_google_protobuf//proto",
+ "@org_golang_google_protobuf//types/pluginpb",
],
)
go_test(
- name = "go_default_test",
+ name = "codegenerator_test",
srcs = ["parse_req_test.go"],
- embed = [":go_default_library"],
deps = [
- "@com_github_google_go_cmp//cmp:go_default_library",
- "@org_golang_google_protobuf//proto:go_default_library",
- "@org_golang_google_protobuf//testing/protocmp:go_default_library",
- "@org_golang_google_protobuf//types/pluginpb:go_default_library",
+ ":codegenerator",
+ "@com_github_google_go_cmp//cmp",
+ "@org_golang_google_protobuf//proto",
+ "@org_golang_google_protobuf//testing/protocmp",
+ "@org_golang_google_protobuf//types/pluginpb",
],
)
+
+alias(
+ name = "go_default_library",
+ actual = ":codegenerator",
+ visibility = ["//:__subpackages__"],
+)
diff --git a/internal/codegenerator/parse_req.go b/internal/codegenerator/parse_req.go
index ca92d8e9985..65749a65a87 100644
--- a/internal/codegenerator/parse_req.go
+++ b/internal/codegenerator/parse_req.go
@@ -3,7 +3,6 @@ package codegenerator
import (
"fmt"
"io"
- "io/ioutil"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/types/pluginpb"
@@ -11,13 +10,13 @@ import (
// ParseRequest parses a code generator request from a proto Message.
func ParseRequest(r io.Reader) (*pluginpb.CodeGeneratorRequest, error) {
- input, err := ioutil.ReadAll(r)
+ input, err := io.ReadAll(r)
if err != nil {
- return nil, fmt.Errorf("failed to read code generator request: %v", err)
+ return nil, fmt.Errorf("failed to read code generator request: %w", err)
}
req := new(pluginpb.CodeGeneratorRequest)
- if err = proto.Unmarshal(input, req); err != nil {
- return nil, fmt.Errorf("failed to unmarshal code generator request: %v", err)
+ if err := proto.Unmarshal(input, req); err != nil {
+ return nil, fmt.Errorf("failed to unmarshal code generator request: %w", err)
}
return req, nil
}
diff --git a/internal/codegenerator/parse_req_test.go b/internal/codegenerator/parse_req_test.go
index 3c0c7971ab6..acc96304d73 100644
--- a/internal/codegenerator/parse_req_test.go
+++ b/internal/codegenerator/parse_req_test.go
@@ -2,7 +2,7 @@ package codegenerator_test
import (
"bytes"
- "fmt"
+ "errors"
"io"
"strings"
"testing"
@@ -66,5 +66,5 @@ type invalidReader struct {
}
func (*invalidReader) Read(p []byte) (int, error) {
- return 0, fmt.Errorf("invalid reader")
+ return 0, errors.New("invalid reader")
}
diff --git a/internal/descriptor/BUILD.bazel b/internal/descriptor/BUILD.bazel
index 672d67451a3..04553bc1a05 100644
--- a/internal/descriptor/BUILD.bazel
+++ b/internal/descriptor/BUILD.bazel
@@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
package(default_visibility = ["//visibility:public"])
go_library(
- name = "go_default_library",
+ name = "descriptor",
srcs = [
"grpc_api_configuration.go",
"openapi_configuration.go",
@@ -13,25 +13,27 @@ go_library(
],
importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/internal/descriptor",
deps = [
- "//internal/casing:go_default_library",
- "//internal/codegenerator:go_default_library",
- "//internal/descriptor/apiconfig:go_default_library",
- "//internal/descriptor/openapiconfig:go_default_library",
- "//internal/httprule:go_default_library",
- "//protoc-gen-openapiv2/options:go_default_library",
- "@com_github_ghodss_yaml//:go_default_library",
- "@com_github_golang_glog//:go_default_library",
+ "//internal/casing",
+ "//internal/codegenerator",
+ "//internal/descriptor/apiconfig",
+ "//internal/descriptor/openapiconfig",
+ "//internal/httprule",
+ "//protoc-gen-openapiv2/options",
+ "@com_github_golang_glog//:glog",
"@go_googleapis//google/api:annotations_go_proto",
- "@org_golang_google_protobuf//compiler/protogen:go_default_library",
- "@org_golang_google_protobuf//encoding/protojson:go_default_library",
- "@org_golang_google_protobuf//proto:go_default_library",
- "@org_golang_google_protobuf//types/descriptorpb:go_default_library",
- "@org_golang_google_protobuf//types/pluginpb:go_default_library",
+ "@in_gopkg_yaml_v3//:yaml_v3",
+ "@org_golang_google_protobuf//compiler/protogen",
+ "@org_golang_google_protobuf//encoding/protojson",
+ "@org_golang_google_protobuf//proto",
+ "@org_golang_google_protobuf//types/descriptorpb",
+ "@org_golang_google_protobuf//types/pluginpb",
+ "@org_golang_x_text//cases",
+ "@org_golang_x_text//language",
],
)
go_test(
- name = "go_default_test",
+ name = "descriptor_test",
size = "small",
srcs = [
"grpc_api_configuration_test.go",
@@ -40,15 +42,21 @@ go_test(
"services_test.go",
"types_test.go",
],
- embed = [":go_default_library"],
+ embed = [":descriptor"],
deps = [
- "//internal/descriptor/openapiconfig:go_default_library",
- "//internal/httprule:go_default_library",
- "//protoc-gen-openapiv2/options:go_default_library",
- "@org_golang_google_protobuf//compiler/protogen:go_default_library",
- "@org_golang_google_protobuf//encoding/prototext:go_default_library",
- "@org_golang_google_protobuf//proto:go_default_library",
- "@org_golang_google_protobuf//types/descriptorpb:go_default_library",
- "@org_golang_google_protobuf//types/pluginpb:go_default_library",
+ "//internal/descriptor/openapiconfig",
+ "//internal/httprule",
+ "//protoc-gen-openapiv2/options",
+ "@org_golang_google_protobuf//compiler/protogen",
+ "@org_golang_google_protobuf//encoding/prototext",
+ "@org_golang_google_protobuf//proto",
+ "@org_golang_google_protobuf//types/descriptorpb",
+ "@org_golang_google_protobuf//types/pluginpb",
],
)
+
+alias(
+ name = "go_default_library",
+ actual = ":descriptor",
+ visibility = ["//:__subpackages__"],
+)
diff --git a/internal/descriptor/apiconfig/BUILD.bazel b/internal/descriptor/apiconfig/BUILD.bazel
index 80dc57a2e3c..9fe7533ca2f 100644
--- a/internal/descriptor/apiconfig/BUILD.bazel
+++ b/internal/descriptor/apiconfig/BUILD.bazel
@@ -23,7 +23,13 @@ go_proto_library(
)
go_library(
- name = "go_default_library",
+ name = "apiconfig",
embed = [":apiconfig_go_proto"],
importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/internal/descriptor/apiconfig",
)
+
+alias(
+ name = "go_default_library",
+ actual = ":apiconfig",
+ visibility = ["//:__subpackages__"],
+)
diff --git a/internal/descriptor/apiconfig/apiconfig.pb.go b/internal/descriptor/apiconfig/apiconfig.pb.go
index 125c5340631..80506dc612e 100644
--- a/internal/descriptor/apiconfig/apiconfig.pb.go
+++ b/internal/descriptor/apiconfig/apiconfig.pb.go
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.26.0
-// protoc v3.13.0
+// protoc-gen-go v1.27.1
+// protoc (unknown)
// source: internal/descriptor/apiconfig/apiconfig.proto
package apiconfig
diff --git a/internal/descriptor/apiconfig/apiconfig.proto b/internal/descriptor/apiconfig/apiconfig.proto
index aeecd777384..b7379dcd8d2 100644
--- a/internal/descriptor/apiconfig/apiconfig.proto
+++ b/internal/descriptor/apiconfig/apiconfig.proto
@@ -2,10 +2,10 @@ syntax = "proto3";
package grpc.gateway.internal.descriptor.apiconfig;
-option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/internal/descriptor/apiconfig";
-
import "google/api/http.proto";
+option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/internal/descriptor/apiconfig";
+
// GrpcAPIService represents a stripped down version of google.api.Service .
// Compare to https://github.com/googleapis/googleapis/blob/master/google/api/service.proto
// The original imports 23 other protobuf files we are not interested in. If a significant
@@ -16,6 +16,6 @@ import "google/api/http.proto";
// available features google supports in their service descriptions. Thanks to backwards
// compatibility guarantees by protobuf it is safe for us to remove the other fields.
message GrpcAPIService {
- // Http Rule.
- google.api.Http http = 1;
+ // Http Rule.
+ google.api.Http http = 1;
}
diff --git a/internal/descriptor/apiconfig/apiconfig.swagger.json b/internal/descriptor/apiconfig/apiconfig.swagger.json
index 685eb474e49..4ce32e78e84 100644
--- a/internal/descriptor/apiconfig/apiconfig.swagger.json
+++ b/internal/descriptor/apiconfig/apiconfig.swagger.json
@@ -15,14 +15,11 @@
"protobufAny": {
"type": "object",
"properties": {
- "typeUrl": {
+ "@type": {
"type": "string"
- },
- "value": {
- "type": "string",
- "format": "byte"
}
- }
+ },
+ "additionalProperties": {}
},
"rpcStatus": {
"type": "object",
diff --git a/internal/descriptor/grpc_api_configuration.go b/internal/descriptor/grpc_api_configuration.go
index c369f93406f..ad6cfa1de07 100644
--- a/internal/descriptor/grpc_api_configuration.go
+++ b/internal/descriptor/grpc_api_configuration.go
@@ -1,19 +1,26 @@
package descriptor
import (
+ "encoding/json"
"fmt"
- "io/ioutil"
+ "os"
"strings"
- "github.com/ghodss/yaml"
"github.com/grpc-ecosystem/grpc-gateway/v2/internal/descriptor/apiconfig"
"google.golang.org/protobuf/encoding/protojson"
+ "gopkg.in/yaml.v3"
)
func loadGrpcAPIServiceFromYAML(yamlFileContents []byte, yamlSourceLogName string) (*apiconfig.GrpcAPIService, error) {
- jsonContents, err := yaml.YAMLToJSON(yamlFileContents)
+ var yamlContents interface{}
+ err := yaml.Unmarshal(yamlFileContents, &yamlContents)
if err != nil {
- return nil, fmt.Errorf("failed to convert gRPC API Configuration from YAML in '%v' to JSON: %v", yamlSourceLogName, err)
+ return nil, fmt.Errorf("failed to parse gRPC API Configuration from YAML in '%v': %v", yamlSourceLogName, err)
+ }
+
+ jsonContents, err := json.Marshal(yamlContents)
+ if err != nil {
+ return nil, err
}
// As our GrpcAPIService is incomplete, accept unknown fields.
@@ -57,9 +64,9 @@ func registerHTTPRulesFromGrpcAPIService(registry *Registry, service *apiconfig.
// Note that for the purposes of the gateway generator we only consider a subset of all
// available features google supports in their service descriptions.
func (r *Registry) LoadGrpcAPIServiceFromYAML(yamlFile string) error {
- yamlFileContents, err := ioutil.ReadFile(yamlFile)
+ yamlFileContents, err := os.ReadFile(yamlFile)
if err != nil {
- return fmt.Errorf("failed to read gRPC API Configuration description from '%v': %v", yamlFile, err)
+ return fmt.Errorf("failed to read gRPC API Configuration description from %q: %w", yamlFile, err)
}
service, err := loadGrpcAPIServiceFromYAML(yamlFileContents, yamlFile)
diff --git a/internal/descriptor/grpc_api_configuration_test.go b/internal/descriptor/grpc_api_configuration_test.go
index 09cf0a80c53..4d8231ec35c 100644
--- a/internal/descriptor/grpc_api_configuration_test.go
+++ b/internal/descriptor/grpc_api_configuration_test.go
@@ -67,8 +67,8 @@ http:
t.Fatal(err)
}
- if !strings.Contains(err.Error(), "line 7") {
- t.Errorf("Expected yaml error to be detected in line 7. Got other error: %v", err)
+ if !strings.Contains(err.Error(), "line 6") {
+ t.Errorf("Expected yaml error to be detected in line 6. Got other error: %v", err)
}
if service != nil {
@@ -147,3 +147,42 @@ http:
t.Errorf("some.other.service has %v additional bindings when it should not have any. Got: %v", len(second.GetAdditionalBindings()), second.GetAdditionalBindings())
}
}
+
+func TestLoadGrpcAPIServiceFromYAMLUnknownKeys(t *testing.T) {
+ service, err := loadGrpcAPIServiceFromYAML([]byte(`
+type: google.api.Service
+config_version: 3
+
+very: key
+much: 1
+
+http:
+ rules:
+ - selector: some.other.service
+ delete: foo
+ invalidkey: yes
+`), "example")
+ if err != nil {
+ t.Fatalf("Failed to load service description from YAML: %v", err)
+ }
+
+ if service == nil {
+ t.Fatal("No service returned")
+ }
+
+ if service.Http == nil {
+ t.Fatal("HTTP is empty")
+ }
+
+ if len(service.Http.GetRules()) != 1 {
+ t.Fatalf("%v service(s) returned when two were expected. Got: %v", len(service.Http.GetRules()), service.Http)
+ }
+
+ first := service.Http.GetRules()[0]
+ if first.GetSelector() != "some.other.service" {
+ t.Errorf("first.selector has unexpected selector '%v'", first.GetSelector())
+ }
+ if first.GetDelete() != "foo" {
+ t.Errorf("first.selector has unexpected delete '%v'", first.GetPost())
+ }
+}
diff --git a/internal/descriptor/openapi_configuration.go b/internal/descriptor/openapi_configuration.go
index 3b5f74965a3..c0a58a671e8 100644
--- a/internal/descriptor/openapi_configuration.go
+++ b/internal/descriptor/openapi_configuration.go
@@ -1,18 +1,24 @@
package descriptor
import (
+ "encoding/json"
"fmt"
- "io/ioutil"
+ "os"
- "github.com/ghodss/yaml"
"github.com/grpc-ecosystem/grpc-gateway/v2/internal/descriptor/openapiconfig"
"google.golang.org/protobuf/encoding/protojson"
+ "gopkg.in/yaml.v3"
)
func loadOpenAPIConfigFromYAML(yamlFileContents []byte, yamlSourceLogName string) (*openapiconfig.OpenAPIConfig, error) {
- jsonContents, err := yaml.YAMLToJSON(yamlFileContents)
+ var yamlContents interface{}
+ if err := yaml.Unmarshal(yamlFileContents, &yamlContents); err != nil {
+ return nil, fmt.Errorf("failed to parse gRPC API Configuration from YAML in %q: %w", yamlSourceLogName, err)
+ }
+
+ jsonContents, err := json.Marshal(yamlContents)
if err != nil {
- return nil, fmt.Errorf("failed to convert OpenAPI Configuration from YAML in '%v' to JSON: %v", yamlSourceLogName, err)
+ return nil, err
}
// Reject unknown fields because OpenAPIConfig is only used here
@@ -22,7 +28,7 @@ func loadOpenAPIConfigFromYAML(yamlFileContents []byte, yamlSourceLogName string
openapiConfiguration := openapiconfig.OpenAPIConfig{}
if err := unmarshaler.Unmarshal(jsonContents, &openapiConfiguration); err != nil {
- return nil, fmt.Errorf("failed to parse gRPC API Configuration from YAML in '%v': %v", yamlSourceLogName, err)
+ return nil, fmt.Errorf("failed to parse OpenAPI Configuration from YAML in '%v': %w", yamlSourceLogName, err)
}
return &openapiConfiguration, nil
@@ -35,7 +41,7 @@ func registerOpenAPIOptions(registry *Registry, openAPIConfig *openapiconfig.Ope
}
if err := registry.RegisterOpenAPIOptions(openAPIConfig.OpenapiOptions); err != nil {
- return fmt.Errorf("failed to register option in %s: %s", yamlSourceLogName, err)
+ return fmt.Errorf("failed to register option in %s: %w", yamlSourceLogName, err)
}
return nil
}
@@ -44,9 +50,9 @@ func registerOpenAPIOptions(registry *Registry, openAPIConfig *openapiconfig.Ope
// and registers the OpenAPI options the given registry.
// This must be done after loading the proto file.
func (r *Registry) LoadOpenAPIConfigFromYAML(yamlFile string) error {
- yamlFileContents, err := ioutil.ReadFile(yamlFile)
+ yamlFileContents, err := os.ReadFile(yamlFile)
if err != nil {
- return fmt.Errorf("failed to read gRPC API Configuration description from '%v': %v", yamlFile, err)
+ return fmt.Errorf("failed to read OpenAPI Configuration description from '%v': %v", yamlFile, err)
}
config, err := loadOpenAPIConfigFromYAML(yamlFileContents, yamlFile)
diff --git a/internal/descriptor/openapi_configuration_test.go b/internal/descriptor/openapi_configuration_test.go
index 977d7e94e1c..94953c859fe 100644
--- a/internal/descriptor/openapi_configuration_test.go
+++ b/internal/descriptor/openapi_configuration_test.go
@@ -28,8 +28,8 @@ file:
t.Fatal(err)
}
- if !strings.Contains(err.Error(), "line 4") {
- t.Errorf("Expected yaml error to be detected in line 4. Got other error: %v", err)
+ if !strings.Contains(err.Error(), "line 3") {
+ t.Errorf("Expected yaml error to be detected in line 3. Got other error: %v", err)
}
if config != nil {
@@ -112,3 +112,20 @@ openapiOptions:
t.Fatalf("expected name to be X-API-Key but got %s", secOpt.Name)
}
}
+
+func TestLoadOpenAPIConfigFromYAMLUnknownKeys(t *testing.T) {
+ _, err := loadOpenAPIConfigFromYAML([]byte(`
+closedapiOptions:
+ get: it?
+openapiOptions:
+ file:
+ - file: test.proto
+ option:
+ schemes:
+ - HTTP
+`), "openapi_options")
+ if err == nil {
+ t.Errorf("Expected invalid key error")
+ }
+
+}
diff --git a/internal/descriptor/openapiconfig/BUILD.bazel b/internal/descriptor/openapiconfig/BUILD.bazel
index 29156c84612..6289833967e 100644
--- a/internal/descriptor/openapiconfig/BUILD.bazel
+++ b/internal/descriptor/openapiconfig/BUILD.bazel
@@ -15,12 +15,18 @@ go_proto_library(
importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/internal/descriptor/openapiconfig",
proto = ":openapiconfig_proto",
visibility = ["//:__subpackages__"],
- deps = ["//protoc-gen-openapiv2/options:go_default_library"],
+ deps = ["//protoc-gen-openapiv2/options"],
)
go_library(
- name = "go_default_library",
+ name = "openapiconfig",
embed = [":openapiconfig_go_proto"],
importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/internal/descriptor/openapiconfig",
visibility = ["//:__subpackages__"],
)
+
+alias(
+ name = "go_default_library",
+ actual = ":openapiconfig",
+ visibility = ["//:__subpackages__"],
+)
diff --git a/internal/descriptor/openapiconfig/openapiconfig.pb.go b/internal/descriptor/openapiconfig/openapiconfig.pb.go
index e0b1010b855..7394255290d 100644
--- a/internal/descriptor/openapiconfig/openapiconfig.pb.go
+++ b/internal/descriptor/openapiconfig/openapiconfig.pb.go
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.26.0
-// protoc v3.13.0
+// protoc-gen-go v1.27.1
+// protoc (unknown)
// source: internal/descriptor/openapiconfig/openapiconfig.proto
package openapiconfig
diff --git a/internal/descriptor/openapiconfig/openapiconfig.proto b/internal/descriptor/openapiconfig/openapiconfig.proto
index f0aa69ee295..17cf86a90c8 100644
--- a/internal/descriptor/openapiconfig/openapiconfig.proto
+++ b/internal/descriptor/openapiconfig/openapiconfig.proto
@@ -2,50 +2,50 @@ syntax = "proto3";
package grpc.gateway.internal.descriptor.openapiconfig;
-option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/internal/descriptor/openapiconfig";
-
import "protoc-gen-openapiv2/options/openapiv2.proto";
+option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/internal/descriptor/openapiconfig";
+
// OpenAPIFileOption represents OpenAPI options on a file
message OpenAPIFileOption {
- string file = 1;
- grpc.gateway.protoc_gen_openapiv2.options.Swagger option = 2;
+ string file = 1;
+ grpc.gateway.protoc_gen_openapiv2.options.Swagger option = 2;
}
// OpenAPIMethodOption represents OpenAPI options on a method
message OpenAPIMethodOption {
- string method = 1;
- grpc.gateway.protoc_gen_openapiv2.options.Operation option = 2;
+ string method = 1;
+ grpc.gateway.protoc_gen_openapiv2.options.Operation option = 2;
}
// OpenAPIMessageOption represents OpenAPI options on a message
message OpenAPIMessageOption {
- string message = 1;
- grpc.gateway.protoc_gen_openapiv2.options.Schema option = 2;
+ string message = 1;
+ grpc.gateway.protoc_gen_openapiv2.options.Schema option = 2;
}
// OpenAPIServiceOption represents OpenAPI options on a service
message OpenAPIServiceOption {
- string service = 1; // ex: Service
- grpc.gateway.protoc_gen_openapiv2.options.Tag option = 2;
+ string service = 1; // ex: Service
+ grpc.gateway.protoc_gen_openapiv2.options.Tag option = 2;
}
// OpenAPIFieldOption represents OpenAPI options on a field
message OpenAPIFieldOption {
- string field = 1;
- grpc.gateway.protoc_gen_openapiv2.options.JSONSchema option = 2;
+ string field = 1;
+ grpc.gateway.protoc_gen_openapiv2.options.JSONSchema option = 2;
}
// OpenAPIOptions represents OpenAPI protobuf options
message OpenAPIOptions {
- repeated OpenAPIFileOption file = 1;
- repeated OpenAPIMethodOption method = 2;
- repeated OpenAPIMessageOption message = 3;
- repeated OpenAPIServiceOption service = 4;
- repeated OpenAPIFieldOption field = 5;
+ repeated OpenAPIFileOption file = 1;
+ repeated OpenAPIMethodOption method = 2;
+ repeated OpenAPIMessageOption message = 3;
+ repeated OpenAPIServiceOption service = 4;
+ repeated OpenAPIFieldOption field = 5;
}
// OpenAPIConfig represents a set of OpenAPI options
message OpenAPIConfig {
- OpenAPIOptions openapi_options = 1;
+ OpenAPIOptions openapi_options = 1;
}
diff --git a/internal/descriptor/openapiconfig/openapiconfig.swagger.json b/internal/descriptor/openapiconfig/openapiconfig.swagger.json
index c5388481f9c..a48ccf64974 100644
--- a/internal/descriptor/openapiconfig/openapiconfig.swagger.json
+++ b/internal/descriptor/openapiconfig/openapiconfig.swagger.json
@@ -15,14 +15,11 @@
"protobufAny": {
"type": "object",
"properties": {
- "typeUrl": {
+ "@type": {
"type": "string"
- },
- "value": {
- "type": "string",
- "format": "byte"
}
- }
+ },
+ "additionalProperties": {}
},
"rpcStatus": {
"type": "object",
diff --git a/internal/descriptor/registry.go b/internal/descriptor/registry.go
index e6f78482ef1..fdb7717fb8a 100644
--- a/internal/descriptor/registry.go
+++ b/internal/descriptor/registry.go
@@ -2,12 +2,15 @@ package descriptor
import (
"fmt"
+ "sort"
"strings"
"github.com/golang/glog"
"github.com/grpc-ecosystem/grpc-gateway/v2/internal/codegenerator"
"github.com/grpc-ecosystem/grpc-gateway/v2/internal/descriptor/openapiconfig"
"github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"
+ "golang.org/x/text/cases"
+ "golang.org/x/text/language"
"google.golang.org/genproto/googleapis/api/annotations"
"google.golang.org/protobuf/compiler/protogen"
"google.golang.org/protobuf/types/descriptorpb"
@@ -46,9 +49,6 @@ type Registry struct {
// mergeFileName target OpenAPI file name after merge
mergeFileName string
- // allowRepeatedFieldsInBody permits repeated field in body field path of `google.api.http` annotation option
- allowRepeatedFieldsInBody bool
-
// includePackageInTags controls whether the package name defined in the `package` directive
// in the proto file can be prepended to the gRPC service name in the `Tags` field of every operation.
includePackageInTags bool
@@ -61,11 +61,18 @@ type Registry struct {
// with gRPC-Gateway response, if it uses json tags for marshaling.
useJSONNamesForFields bool
- // useFQNForOpenAPIName if true OpenAPI names will use the full qualified name (FQN) from proto definition,
- // and generate a dot-separated OpenAPI name concatenating all elements from the proto FQN.
- // If false, the default behavior is to concat the last 2 elements of the FQN if they are unique, otherwise concat
- // all the elements of the FQN without any separator
- useFQNForOpenAPIName bool
+ // openAPINamingStrategy is the naming strategy to use for assigning OpenAPI field and parameter names. This can be one of the following:
+ // - `legacy`: use the legacy naming strategy from protoc-gen-swagger, that generates unique but not necessarily
+ // maximally concise names. Components are concatenated directly, e.g., `MyOuterMessageMyNestedMessage`.
+ // - `simple`: use a simple heuristic for generating unique and concise names. Components are concatenated using
+ // dots as a separator, e.g., `MyOuterMesage.MyNestedMessage` (if `MyNestedMessage` alone is unique,
+ // `MyNestedMessage` will be used as the OpenAPI name).
+ // - `fqn`: always use the fully-qualified name of the proto message (leading dot removed) as the OpenAPI
+ // name.
+ openAPINamingStrategy string
+
+ // visibilityRestrictionSelectors is a map of selectors for `google.api.VisibilityRule`s that will be included in the OpenAPI output.
+ visibilityRestrictionSelectors map[string]bool
// useGoTemplate determines whether you want to use GO templates
// in your protofile comments
@@ -74,6 +81,9 @@ type Registry struct {
// enumsAsInts render enum as integer, as opposed to string
enumsAsInts bool
+ // omitEnumDefaultValue omits default value of enum
+ omitEnumDefaultValue bool
+
// disableDefaultErrors disables the generation of the default error types.
// This is useful for users who have defined custom error handling.
disableDefaultErrors bool
@@ -87,6 +97,9 @@ type Registry struct {
// has no HttpRule annotation.
warnOnUnboundMethods bool
+ // proto3OptionalNullable specifies whether Proto3 Optional fields should be marked as x-nullable.
+ proto3OptionalNullable bool
+
// fileOptions is a mapping of file name to additional OpenAPI file options
fileOptions map[string]*options.Swagger
@@ -112,6 +125,17 @@ type Registry struct {
// recursiveDepth sets the maximum depth of a field parameter
recursiveDepth int
+
+ // annotationMap is used to check for duplicate HTTP annotations
+ annotationMap map[annotationIdentifier]struct{}
+
+ // disableServiceTags disables the generation of service tags.
+ // This is useful if you do not want to expose the names of your backend grpc services.
+ disableServiceTags bool
+
+ // disableDefaultResponses disables the generation of default responses.
+ // Useful if you have to support custom response codes that are not 200.
+ disableDefaultResponses bool
}
type repeatedFieldSeparator struct {
@@ -119,15 +143,23 @@ type repeatedFieldSeparator struct {
sep rune
}
+type annotationIdentifier struct {
+ method string
+ pathTemplate string
+ service *Service
+}
+
// NewRegistry returns a new Registry.
func NewRegistry() *Registry {
return &Registry{
- msgs: make(map[string]*Message),
- enums: make(map[string]*Enum),
- files: make(map[string]*File),
- pkgMap: make(map[string]string),
- pkgAliases: make(map[string]string),
- externalHTTPRules: make(map[string][]*annotations.HttpRule),
+ msgs: make(map[string]*Message),
+ enums: make(map[string]*Enum),
+ files: make(map[string]*File),
+ pkgMap: make(map[string]string),
+ pkgAliases: make(map[string]string),
+ externalHTTPRules: make(map[string][]*annotations.HttpRule),
+ openAPINamingStrategy: "legacy",
+ visibilityRestrictionSelectors: make(map[string]bool),
repeatedPathParamSeparator: repeatedFieldSeparator{
name: "csv",
sep: ',',
@@ -137,6 +169,7 @@ func NewRegistry() *Registry {
messageOptions: make(map[string]*options.Schema),
serviceOptions: make(map[string]*options.Tag),
fieldOptions: make(map[string]*options.JSONSchema),
+ annotationMap: make(map[annotationIdentifier]struct{}),
recursiveDepth: 1000,
}
}
@@ -159,12 +192,18 @@ func (r *Registry) LoadFromPlugin(gen *protogen.Plugin) error {
}
func (r *Registry) load(gen *protogen.Plugin) error {
- for filePath, f := range gen.FilesByPath {
- r.loadFile(filePath, f)
+ filePaths := make([]string, 0, len(gen.FilesByPath))
+ for filePath := range gen.FilesByPath {
+ filePaths = append(filePaths, filePath)
+ }
+ sort.Strings(filePaths)
+
+ for _, filePath := range filePaths {
+ r.loadFile(filePath, gen.FilesByPath[filePath])
}
- for filePath, f := range gen.FilesByPath {
- if !f.Generate {
+ for _, filePath := range filePaths {
+ if !gen.FilesByPath[filePath].Generate {
continue
}
file := r.files[filePath]
@@ -185,7 +224,7 @@ func (r *Registry) loadFile(filePath string, file *protogen.File) {
Name: string(file.GoPackageName),
}
if r.standalone {
- pkg.Alias = "ext" + strings.Title(pkg.Name)
+ pkg.Alias = "ext" + cases.Title(language.AmericanEnglish).String(pkg.Name)
}
if err := r.ReserveGoPackageAlias(pkg.Name, pkg.Path); err != nil {
@@ -424,18 +463,6 @@ func (r *Registry) SetMergeFileName(mergeFileName string) {
r.mergeFileName = mergeFileName
}
-// SetAllowRepeatedFieldsInBody controls whether repeated field can be used
-// in `body` and `response_body` (`google.api.http` annotation option) field path or not
-func (r *Registry) SetAllowRepeatedFieldsInBody(allow bool) {
- r.allowRepeatedFieldsInBody = allow
-}
-
-// IsAllowRepeatedFieldsInBody checks if repeated field can be used
-// in `body` and `response_body` (`google.api.http` annotation option) field path or not
-func (r *Registry) IsAllowRepeatedFieldsInBody() bool {
- return r.allowRepeatedFieldsInBody
-}
-
// SetIncludePackageInTags controls whether the package name defined in the `package` directive
// in the proto file can be prepended to the gRPC service name in the `Tags` field of every operation.
func (r *Registry) SetIncludePackageInTags(allow bool) {
@@ -494,13 +521,15 @@ func (r *Registry) GetUseJSONNamesForFields() bool {
}
// SetUseFQNForOpenAPIName sets useFQNForOpenAPIName
+// Deprecated: use SetOpenAPINamingStrategy instead.
func (r *Registry) SetUseFQNForOpenAPIName(use bool) {
- r.useFQNForOpenAPIName = use
+ r.openAPINamingStrategy = "fqn"
}
// GetUseFQNForOpenAPIName returns useFQNForOpenAPIName
+// Deprecated: Use GetOpenAPINamingStrategy().
func (r *Registry) GetUseFQNForOpenAPIName() bool {
- return r.useFQNForOpenAPIName
+ return r.openAPINamingStrategy == "fqn"
}
// GetMergeFileName return the target merge OpenAPI file name
@@ -508,6 +537,16 @@ func (r *Registry) GetMergeFileName() string {
return r.mergeFileName
}
+// SetOpenAPINamingStrategy sets the naming strategy to be used.
+func (r *Registry) SetOpenAPINamingStrategy(strategy string) {
+ r.openAPINamingStrategy = strategy
+}
+
+// GetOpenAPINamingStrategy retrieves the naming strategy that is in use.
+func (r *Registry) GetOpenAPINamingStrategy() string {
+ return r.openAPINamingStrategy
+}
+
// SetUseGoTemplate sets useGoTemplate
func (r *Registry) SetUseGoTemplate(use bool) {
r.useGoTemplate = use
@@ -528,6 +567,29 @@ func (r *Registry) GetEnumsAsInts() bool {
return r.enumsAsInts
}
+// SetOmitEnumDefaultValue sets omitEnumDefaultValue
+func (r *Registry) SetOmitEnumDefaultValue(omit bool) {
+ r.omitEnumDefaultValue = omit
+}
+
+// GetOmitEnumDefaultValue returns omitEnumDefaultValue
+func (r *Registry) GetOmitEnumDefaultValue() bool {
+ return r.omitEnumDefaultValue
+}
+
+// SetVisibilityRestrictionSelectors sets the visibility restriction selectors.
+func (r *Registry) SetVisibilityRestrictionSelectors(selectors []string) {
+ r.visibilityRestrictionSelectors = make(map[string]bool)
+ for _, selector := range selectors {
+ r.visibilityRestrictionSelectors[strings.TrimSpace(selector)] = true
+ }
+}
+
+// GetVisibilityRestrictionSelectors retrieves he visibility restriction selectors.
+func (r *Registry) GetVisibilityRestrictionSelectors() map[string]bool {
+ return r.visibilityRestrictionSelectors
+}
+
// SetDisableDefaultErrors sets disableDefaultErrors
func (r *Registry) SetDisableDefaultErrors(use bool) {
r.disableDefaultErrors = use
@@ -568,6 +630,16 @@ func (r *Registry) GetOmitPackageDoc() bool {
return r.omitPackageDoc
}
+// SetProto3OptionalNullable set proto3OtionalNullable
+func (r *Registry) SetProto3OptionalNullable(proto3OtionalNullable bool) {
+ r.proto3OptionalNullable = proto3OtionalNullable
+}
+
+// GetProto3OptionalNullable returns proto3OtionalNullable
+func (r *Registry) GetProto3OptionalNullable() bool {
+ return r.proto3OptionalNullable
+}
+
// RegisterOpenAPIOptions registers OpenAPI options
func (r *Registry) RegisterOpenAPIOptions(opts *openapiconfig.OpenAPIOptions) error {
if opts == nil {
@@ -670,3 +742,33 @@ func (r *Registry) FieldName(f *Field) string {
}
return f.GetName()
}
+
+func (r *Registry) CheckDuplicateAnnotation(httpMethod string, httpTemplate string, svc *Service) error {
+ a := annotationIdentifier{method: httpMethod, pathTemplate: httpTemplate, service: svc}
+ _, ok := r.annotationMap[a]
+ if ok {
+ return fmt.Errorf("duplicate annotation: method=%s, template=%s", httpMethod, httpTemplate)
+ }
+ r.annotationMap[a] = struct{}{}
+ return nil
+}
+
+// SetDisableServiceTags sets disableServiceTags
+func (r *Registry) SetDisableServiceTags(use bool) {
+ r.disableServiceTags = use
+}
+
+// GetDisableServiceTags returns disableServiceTags
+func (r *Registry) GetDisableServiceTags() bool {
+ return r.disableServiceTags
+}
+
+// SetDisableDefaultResponses setsdisableDefaultResponses
+func (r *Registry) SetDisableDefaultResponses(use bool) {
+ r.disableDefaultResponses = use
+}
+
+// GetDisableDefaultResponses returns disableDefaultResponses
+func (r *Registry) GetDisableDefaultResponses() bool {
+ return r.disableDefaultResponses
+}
diff --git a/internal/descriptor/services.go b/internal/descriptor/services.go
index f0a96623d00..8936a78222e 100644
--- a/internal/descriptor/services.go
+++ b/internal/descriptor/services.go
@@ -1,6 +1,7 @@
package descriptor
import (
+ "errors"
"fmt"
"strings"
@@ -132,7 +133,7 @@ func (r *Registry) newMethod(svc *Service, md *descriptorpb.MethodDescriptorProt
tmpl := parsed.Compile()
if md.GetClientStreaming() && len(tmpl.Fields) > 0 {
- return nil, fmt.Errorf("cannot use path parameter in client streaming")
+ return nil, errors.New("cannot use path parameter in client streaming")
}
b := &Binding{
@@ -259,13 +260,13 @@ func (r *Registry) newParam(meth *Method, path string) (Parameter, error) {
}
func (r *Registry) newBody(meth *Method, path string) (*Body, error) {
- msg := meth.RequestType
switch path {
case "":
return nil, nil
case "*":
return &Body{FieldPath: nil}, nil
}
+ msg := meth.RequestType
fields, err := r.resolveFieldPath(msg, path, false)
if err != nil {
return nil, err
@@ -325,9 +326,6 @@ func (r *Registry) resolveFieldPath(msg *Message, path string, isPathParam bool)
if f == nil {
return nil, fmt.Errorf("no field %q found in %s", path, root.GetName())
}
- if !(isPathParam || r.allowRepeatedFieldsInBody) && f.GetLabel() == descriptorpb.FieldDescriptorProto_LABEL_REPEATED {
- return nil, fmt.Errorf("repeated field not allowed in field path: %s in %s", f.GetName(), path)
- }
if isPathParam && f.GetProto3Optional() {
return nil, fmt.Errorf("optional field not allowed in field path: %s in %s", f.GetName(), path)
}
diff --git a/internal/descriptor/services_test.go b/internal/descriptor/services_test.go
index 8ce91f13476..cf8e504aaa2 100644
--- a/internal/descriptor/services_test.go
+++ b/internal/descriptor/services_test.go
@@ -1117,7 +1117,7 @@ func TestResolveFieldPath(t *testing.T) {
>
`,
path: "string",
- wantErr: true,
+ wantErr: false,
},
// nested field
{
@@ -1222,7 +1222,7 @@ func TestResolveFieldPath(t *testing.T) {
>
`,
path: "nested.nested2.terminal",
- wantErr: true,
+ wantErr: false,
},
} {
var file descriptorpb.FileDescriptorProto
diff --git a/internal/descriptor/types.go b/internal/descriptor/types.go
index 38223c3c3c0..bb487f4dace 100644
--- a/internal/descriptor/types.go
+++ b/internal/descriptor/types.go
@@ -323,8 +323,14 @@ type Body struct {
// AssignableExpr returns an assignable expression in Go to be used to initialize method request object.
// It starts with "msgExpr", which is the go expression of the method request object.
-func (b Body) AssignableExpr(msgExpr string) string {
- return b.FieldPath.AssignableExpr(msgExpr)
+func (b Body) AssignableExpr(msgExpr string, currentPackage string) string {
+ return b.FieldPath.AssignableExpr(msgExpr, currentPackage)
+}
+
+// AssignableExprPrep returns preparatory statements for an assignable expression to initialize the
+// method request object.
+func (b Body) AssignableExprPrep(msgExpr string, currentPackage string) string {
+ return b.FieldPath.AssignableExprPrep(msgExpr, currentPackage)
}
// FieldPath is a path to a field from a request message.
@@ -356,13 +362,51 @@ func (p FieldPath) IsOptionalProto3() bool {
}
// AssignableExpr is an assignable expression in Go to be used to assign a value to the target field.
-// It starts with "msgExpr", which is the go expression of the method request object.
-func (p FieldPath) AssignableExpr(msgExpr string) string {
+// It starts with "msgExpr", which is the go expression of the method request object. Before using
+// such an expression the prep statements must be emitted first, in case the field path includes
+// a oneof. See FieldPath.AssignableExprPrep.
+func (p FieldPath) AssignableExpr(msgExpr string, currentPackage string) string {
l := len(p)
if l == 0 {
return msgExpr
}
+ components := msgExpr
+ for i, c := range p {
+ // We need to check if the target is not proto3_optional first.
+ // Under the hood, proto3_optional uses oneof to signal to old proto3 clients
+ // that presence is tracked for this field. This oneof is known as a "synthetic" oneof.
+ if !c.Target.GetProto3Optional() && c.Target.OneofIndex != nil {
+ index := c.Target.OneofIndex
+ msg := c.Target.Message
+ oneOfName := casing.Camel(msg.GetOneofDecl()[*index].GetName())
+ oneofFieldName := msg.GoType(currentPackage) + "_" + c.AssignableExpr()
+
+ if c.Target.ForcePrefixedName {
+ oneofFieldName = msg.File.Pkg() + "." + msg.GetName() + "_" + c.AssignableExpr()
+ }
+
+ components = components + "." + oneOfName + ".(*" + oneofFieldName + ")"
+ }
+
+ if i == l-1 {
+ components = components + "." + c.AssignableExpr()
+ continue
+ }
+ components = components + "." + c.ValueExpr()
+ }
+ return components
+}
+
+// AssignableExprPrep returns preparation statements for an assignable expression to assign a value
+// to the target field. The Go expression of the method request object is "msgExpr". This is only
+// needed for field paths that contain oneofs. Otherwise, an empty string is returned.
+func (p FieldPath) AssignableExprPrep(msgExpr string, currentPackage string) string {
+ l := len(p)
+ if l == 0 {
+ return ""
+ }
+
var preparations []string
components := msgExpr
for i, c := range p {
@@ -373,10 +417,10 @@ func (p FieldPath) AssignableExpr(msgExpr string) string {
index := c.Target.OneofIndex
msg := c.Target.Message
oneOfName := casing.Camel(msg.GetOneofDecl()[*index].GetName())
- oneofFieldName := msg.GetName() + "_" + c.AssignableExpr()
+ oneofFieldName := msg.GoType(currentPackage) + "_" + c.AssignableExpr()
if c.Target.ForcePrefixedName {
- oneofFieldName = msg.File.Pkg() + "." + oneofFieldName
+ oneofFieldName = msg.File.Pkg() + "." + msg.GetName() + "_" + c.AssignableExpr()
}
components = components + "." + oneOfName
@@ -397,7 +441,6 @@ func (p FieldPath) AssignableExpr(msgExpr string) string {
components = components + "." + c.ValueExpr()
}
- preparations = append(preparations, components)
return strings.Join(preparations, "\n")
}
diff --git a/internal/descriptor/types_test.go b/internal/descriptor/types_test.go
index 18877643a68..ba9737a17d3 100644
--- a/internal/descriptor/types_test.go
+++ b/internal/descriptor/types_test.go
@@ -185,7 +185,7 @@ func TestFieldPath(t *testing.T) {
Target: nest1.Fields[1],
},
}
- if got, want := fp.AssignableExpr("resp"), "resp.GetNestField().Nest2Field.GetNestField().TerminalField"; got != want {
+ if got, want := fp.AssignableExpr("resp", "example"), "resp.GetNestField().Nest2Field.GetNestField().TerminalField"; got != want {
t.Errorf("fp.AssignableExpr(%q) = %q; want %q", "resp", got, want)
}
@@ -195,12 +195,12 @@ func TestFieldPath(t *testing.T) {
Target: nest2.Fields[1],
},
}
- if got, want := fp2.AssignableExpr("resp"), "resp.Nest2Field.GetNestField().Nest2Field.TerminalField"; got != want {
+ if got, want := fp2.AssignableExpr("resp", "example"), "resp.Nest2Field.GetNestField().Nest2Field.TerminalField"; got != want {
t.Errorf("fp2.AssignableExpr(%q) = %q; want %q", "resp", got, want)
}
var fpEmpty FieldPath
- if got, want := fpEmpty.AssignableExpr("resp"), "resp"; got != want {
+ if got, want := fpEmpty.AssignableExpr("resp", "example"), "resp"; got != want {
t.Errorf("fpEmpty.AssignableExpr(%q) = %q; want %q", "resp", got, want)
}
}
diff --git a/internal/generator/BUILD.bazel b/internal/generator/BUILD.bazel
index 93027afe242..23727ccf564 100644
--- a/internal/generator/BUILD.bazel
+++ b/internal/generator/BUILD.bazel
@@ -3,8 +3,14 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library")
package(default_visibility = ["//visibility:public"])
go_library(
- name = "go_default_library",
+ name = "generator",
srcs = ["generator.go"],
importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/internal/generator",
- deps = ["//internal/descriptor:go_default_library"],
+ deps = ["//internal/descriptor"],
+)
+
+alias(
+ name = "go_default_library",
+ actual = ":generator",
+ visibility = ["//:__subpackages__"],
)
diff --git a/internal/httprule/BUILD.bazel b/internal/httprule/BUILD.bazel
index 5a718b38405..f694f3c0d03 100644
--- a/internal/httprule/BUILD.bazel
+++ b/internal/httprule/BUILD.bazel
@@ -3,27 +3,33 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
package(default_visibility = ["//visibility:public"])
go_library(
- name = "go_default_library",
+ name = "httprule",
srcs = [
"compile.go",
"parse.go",
"types.go",
],
importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule",
- deps = ["//utilities:go_default_library"],
+ deps = ["//utilities"],
)
go_test(
- name = "go_default_test",
+ name = "httprule_test",
size = "small",
srcs = [
"compile_test.go",
"parse_test.go",
"types_test.go",
],
- embed = [":go_default_library"],
+ embed = [":httprule"],
deps = [
- "//utilities:go_default_library",
- "@com_github_golang_glog//:go_default_library",
+ "//utilities",
+ "@com_github_golang_glog//:glog",
],
)
+
+alias(
+ name = "go_default_library",
+ actual = ":httprule",
+ visibility = ["//:__subpackages__"],
+)
diff --git a/internal/httprule/compile.go b/internal/httprule/compile.go
index 162319d3f3b..3cd9372959d 100644
--- a/internal/httprule/compile.go
+++ b/internal/httprule/compile.go
@@ -96,6 +96,10 @@ func (t template) Compile() Template {
if op.str == "" {
ops = append(ops, op.num)
} else {
+ // eof segment literal represents the "/" path pattern
+ if op.str == eof {
+ op.str = ""
+ }
if _, ok := consts[op.str]; !ok {
consts[op.str] = len(pool)
pool = append(pool, op.str)
diff --git a/internal/httprule/compile_test.go b/internal/httprule/compile_test.go
index 2996b99e613..31c38dde045 100644
--- a/internal/httprule/compile_test.go
+++ b/internal/httprule/compile_test.go
@@ -21,6 +21,13 @@ func TestCompile(t *testing.T) {
fields []string
}{
{},
+ {
+ segs: []segment{
+ literal(eof),
+ },
+ ops: []int{int(utilities.OpLitPush), 0},
+ pool: []string{""},
+ },
{
segs: []segment{
wildcard{},
diff --git a/internal/httprule/fuzz.go b/internal/httprule/fuzz.go
index 138f7c12f0e..c056bd3058a 100644
--- a/internal/httprule/fuzz.go
+++ b/internal/httprule/fuzz.go
@@ -1,10 +1,10 @@
+//go:build gofuzz
// +build gofuzz
package httprule
func Fuzz(data []byte) int {
- _, err := Parse(string(data))
- if err != nil {
+ if _, err := Parse(string(data)); err != nil {
return 0
}
return 0
diff --git a/internal/httprule/parse.go b/internal/httprule/parse.go
index 7c7140f1948..52a8561f0f9 100644
--- a/internal/httprule/parse.go
+++ b/internal/httprule/parse.go
@@ -1,6 +1,7 @@
package httprule
import (
+ "errors"
"fmt"
"strings"
)
@@ -118,6 +119,10 @@ type parser struct {
// topLevelSegments is the target of this parser.
func (p *parser) topLevelSegments() ([]segment, error) {
+ if _, err := p.accept(typeEOF); err == nil {
+ p.tokens = p.tokens[:0]
+ return []segment{literal(eof)}, nil
+ }
segs, err := p.segments()
if err != nil {
return nil, err
@@ -160,7 +165,7 @@ func (p *parser) segment() (segment, error) {
v, err := p.variable()
if err != nil {
- return nil, fmt.Errorf("segment neither wildcards, literal or variable: %v", err)
+ return nil, fmt.Errorf("segment neither wildcards, literal or variable: %w", err)
}
return v, err
}
@@ -209,7 +214,7 @@ func (p *parser) fieldPath() (string, error) {
}
components := []string{c}
for {
- if _, err = p.accept("."); err != nil {
+ if _, err := p.accept("."); err != nil {
return strings.Join(components, "."), nil
}
c, err := p.accept(typeIdent)
@@ -233,10 +238,8 @@ const (
typeEOF = termType("$")
)
-const (
- // eof is the terminal symbol which always appears at the end of token sequence.
- eof = "\u0000"
-)
+// eof is the terminal symbol which always appears at the end of token sequence.
+const eof = "\u0000"
// accept tries to accept a token in "p".
// This function consumes a token and returns it if it matches to the specified "term".
@@ -271,11 +274,12 @@ func (p *parser) accept(term termType) (string, error) {
// expectPChars determines if "t" consists of only pchars defined in RFC3986.
//
// https://www.ietf.org/rfc/rfc3986.txt, P.49
-// pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
-// unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
-// sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
-// / "*" / "+" / "," / ";" / "="
-// pct-encoded = "%" HEXDIG HEXDIG
+//
+// pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
+// unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
+// sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
+// / "*" / "+" / "," / ";" / "="
+// pct-encoded = "%" HEXDIG HEXDIG
func expectPChars(t string) error {
const (
init = iota
@@ -329,7 +333,7 @@ func expectPChars(t string) error {
// expectIdent determines if "ident" is a valid identifier in .proto schema ([[:alpha:]_][[:alphanum:]_]*).
func expectIdent(ident string) error {
if ident == "" {
- return fmt.Errorf("empty identifier")
+ return errors.New("empty identifier")
}
for pos, r := range ident {
switch {
diff --git a/internal/httprule/parse_test.go b/internal/httprule/parse_test.go
index df525dc580e..25cca5d8b45 100644
--- a/internal/httprule/parse_test.go
+++ b/internal/httprule/parse_test.go
@@ -1,6 +1,7 @@
package httprule
import (
+ "errors"
"flag"
"fmt"
"reflect"
@@ -140,6 +141,20 @@ func TestParseSegments(t *testing.T) {
tokens []string
want []segment
}{
+ {
+ tokens: []string{eof},
+ want: []segment{
+ literal(eof),
+ },
+ },
+ {
+ // Note: this case will never arise as tokenize() will never return such a sequence of tokens
+ // and even if it does it will be treated as [eof]
+ tokens: []string{eof, "v1", eof},
+ want: []segment{
+ literal(eof),
+ },
+ },
{
tokens: []string{"v1", eof},
want: []segment{
@@ -280,6 +295,84 @@ func TestParseSegments(t *testing.T) {
}
}
+func TestParse(t *testing.T) {
+ for _, spec := range []struct {
+ input string
+ wantFields []string
+ wantOpCodes []int
+ wantPool []string
+ wantVerb string
+ }{
+ {
+ input: "/v1/{name}:bla:baa",
+ wantFields: []string{
+ "name",
+ },
+ wantPool: []string{"v1", "name"},
+ wantVerb: "bla:baa",
+ },
+ {
+ input: "/v1/{name}:",
+ wantFields: []string{
+ "name",
+ },
+ wantPool: []string{"v1", "name"},
+ wantVerb: "",
+ },
+ {
+ input: "/v1/{name=segment/wi:th}",
+ wantFields: []string{
+ "name",
+ },
+ wantPool: []string{"v1", "segment", "wi:th", "name"},
+ wantVerb: "",
+ },
+ } {
+ f, err := Parse(spec.input)
+ if err != nil {
+ t.Errorf("Parse(%q) failed with %v; want success", spec.input, err)
+ continue
+ }
+ tmpl := f.Compile()
+ if !reflect.DeepEqual(tmpl.Fields, spec.wantFields) {
+ t.Errorf("Parse(%q).Fields = %#v; want %#v", spec.input, tmpl.Fields, spec.wantFields)
+ }
+ if !reflect.DeepEqual(tmpl.Pool, spec.wantPool) {
+ t.Errorf("Parse(%q).Pool = %#v; want %#v", spec.input, tmpl.Pool, spec.wantPool)
+ }
+ if tmpl.Template != spec.input {
+ t.Errorf("Parse(%q).Template = %q; want %q", spec.input, tmpl.Template, spec.input)
+ }
+ if tmpl.Verb != spec.wantVerb {
+ t.Errorf("Parse(%q).Verb = %q; want %q", spec.input, tmpl.Verb, spec.wantVerb)
+ }
+ }
+}
+
+func TestParseError(t *testing.T) {
+ for _, spec := range []struct {
+ input string
+ wantError error
+ }{
+ {
+ input: "v1/{name}",
+ wantError: InvalidTemplateError{
+ tmpl: "v1/{name}",
+ msg: "no leading /",
+ },
+ },
+ } {
+ _, err := Parse(spec.input)
+ if err == nil {
+ t.Errorf("Parse(%q) unexpectedly did not fail", spec.input)
+ continue
+ }
+ if !errors.Is(err, spec.wantError) {
+ t.Errorf("Error did not match expected error: got %v wanted %v", err, spec.wantError)
+ }
+ }
+}
+
func TestParseSegmentsWithErrors(t *testing.T) {
err := flag.Set("v", "3")
if err != nil {
@@ -308,10 +401,6 @@ func TestParseSegmentsWithErrors(t *testing.T) {
// invalid percent-encoding
tokens: []string{"a%2z", eof},
},
- {
- // empty segments
- tokens: []string{eof},
- },
{
// unterminated variable
tokens: []string{"{", "name", eof},
diff --git a/protoc-gen-grpc-gateway/BUILD.bazel b/protoc-gen-grpc-gateway/BUILD.bazel
index 34f26313acb..ca8998eaeb7 100644
--- a/protoc-gen-grpc-gateway/BUILD.bazel
+++ b/protoc-gen-grpc-gateway/BUILD.bazel
@@ -1,24 +1,24 @@
-load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library", "go_test")
+load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
load("@io_bazel_rules_go//proto:compiler.bzl", "go_proto_compiler")
package(default_visibility = ["//visibility:private"])
go_library(
- name = "go_default_library",
+ name = "protoc-gen-grpc-gateway_lib",
srcs = ["main.go"],
importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway",
deps = [
- "//internal/codegenerator:go_default_library",
- "//internal/descriptor:go_default_library",
- "//protoc-gen-grpc-gateway/internal/gengateway:go_default_library",
- "@com_github_golang_glog//:go_default_library",
- "@org_golang_google_protobuf//compiler/protogen:go_default_library",
+ "//internal/codegenerator",
+ "//internal/descriptor",
+ "//protoc-gen-grpc-gateway/internal/gengateway",
+ "@com_github_golang_glog//:glog",
+ "@org_golang_google_protobuf//compiler/protogen",
],
)
go_binary(
name = "protoc-gen-grpc-gateway",
- embed = [":go_default_library"],
+ embed = [":protoc-gen-grpc-gateway_lib"],
visibility = ["//visibility:public"],
)
@@ -42,10 +42,3 @@ go_proto_compiler(
"@org_golang_google_protobuf//proto:go_default_library",
],
)
-
-go_test(
- name = "go_default_test",
- srcs = ["main_test.go"],
- embed = [":go_default_library"],
- deps = ["//internal/descriptor:go_default_library"],
-)
diff --git a/protoc-gen-grpc-gateway/internal/gengateway/BUILD.bazel b/protoc-gen-grpc-gateway/internal/gengateway/BUILD.bazel
index 4c9445ab4ce..31ecb812a63 100644
--- a/protoc-gen-grpc-gateway/internal/gengateway/BUILD.bazel
+++ b/protoc-gen-grpc-gateway/internal/gengateway/BUILD.bazel
@@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
package(default_visibility = ["//protoc-gen-grpc-gateway:__subpackages__"])
go_library(
- name = "go_default_library",
+ name = "gengateway",
srcs = [
"doc.go",
"generator.go",
@@ -11,28 +11,34 @@ go_library(
],
importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway/internal/gengateway",
deps = [
- "//internal/casing:go_default_library",
- "//internal/descriptor:go_default_library",
- "//internal/generator:go_default_library",
- "//utilities:go_default_library",
- "@com_github_golang_glog//:go_default_library",
- "@org_golang_google_protobuf//proto:go_default_library",
- "@org_golang_google_protobuf//types/pluginpb:go_default_library",
+ "//internal/casing",
+ "//internal/descriptor",
+ "//internal/generator",
+ "//utilities",
+ "@com_github_golang_glog//:glog",
+ "@org_golang_google_protobuf//proto",
+ "@org_golang_google_protobuf//types/pluginpb",
],
)
go_test(
- name = "go_default_test",
+ name = "gengateway_test",
size = "small",
srcs = [
"generator_test.go",
"template_test.go",
],
- embed = [":go_default_library"],
+ embed = [":gengateway"],
deps = [
- "//internal/descriptor:go_default_library",
- "//internal/httprule:go_default_library",
- "@org_golang_google_protobuf//proto:go_default_library",
- "@org_golang_google_protobuf//types/descriptorpb:go_default_library",
+ "//internal/descriptor",
+ "//internal/httprule",
+ "@org_golang_google_protobuf//proto",
+ "@org_golang_google_protobuf//types/descriptorpb",
],
)
+
+alias(
+ name = "go_default_library",
+ actual = ":gengateway",
+ visibility = ["//protoc-gen-grpc-gateway:__subpackages__"],
+)
diff --git a/protoc-gen-grpc-gateway/internal/gengateway/generator.go b/protoc-gen-grpc-gateway/internal/gengateway/generator.go
index 08efcc0b2c0..849d199af3d 100644
--- a/protoc-gen-grpc-gateway/internal/gengateway/generator.go
+++ b/protoc-gen-grpc-gateway/internal/gengateway/generator.go
@@ -13,9 +13,7 @@ import (
"google.golang.org/protobuf/types/pluginpb"
)
-var (
- errNoTargetService = errors.New("no target service defined in the file")
-)
+var errNoTargetService = errors.New("no target service defined in the file")
type generator struct {
reg *descriptor.Registry
@@ -76,7 +74,7 @@ func (g *generator) Generate(targets []*descriptor.File) ([]*descriptor.Response
glog.V(1).Infof("Processing %s", file.GetName())
code, err := g.generate(file)
- if err == errNoTargetService {
+ if errors.Is(err, errNoTargetService) {
glog.V(1).Infof("%s: %v", file.GetName(), err)
continue
}
diff --git a/protoc-gen-grpc-gateway/internal/gengateway/generator_test.go b/protoc-gen-grpc-gateway/internal/gengateway/generator_test.go
index baa35ee7203..2c5fe023293 100644
--- a/protoc-gen-grpc-gateway/internal/gengateway/generator_test.go
+++ b/protoc-gen-grpc-gateway/internal/gengateway/generator_test.go
@@ -77,6 +77,7 @@ func newExampleFileDescriptorWithGoPkg(gp *descriptor.GoPackage, filenamePrefix
func TestGenerator_Generate(t *testing.T) {
g := new(generator)
+ g.reg = descriptor.NewRegistry()
result, err := g.Generate([]*descriptor.File{
crossLinkFixture(newExampleFileDescriptorWithGoPkg(&descriptor.GoPackage{
Path: "example.com/path/to/example",
diff --git a/protoc-gen-grpc-gateway/internal/gengateway/template.go b/protoc-gen-grpc-gateway/internal/gengateway/template.go
index 028761ffa5a..2b98b861fa0 100644
--- a/protoc-gen-grpc-gateway/internal/gengateway/template.go
+++ b/protoc-gen-grpc-gateway/internal/gengateway/template.go
@@ -28,7 +28,7 @@ type binding struct {
AllowPatchFeature bool
}
-// GetBodyFieldPath returns the binding body's fieldpath.
+// GetBodyFieldPath returns the binding body's field path.
func (b binding) GetBodyFieldPath() string {
if b.Body != nil && len(b.Body.FieldPath) != 0 {
return b.Body.FieldPath.String()
@@ -36,7 +36,7 @@ func (b binding) GetBodyFieldPath() string {
return "*"
}
-// GetBodyFieldPath returns the binding body's struct field name.
+// GetBodyFieldStructName returns the binding body's struct field name.
func (b binding) GetBodyFieldStructName() (string, error) {
if b.Body != nil && len(b.Body.FieldPath) != 0 {
return casing.Camel(b.Body.FieldPath.String()), nil
@@ -170,6 +170,10 @@ func applyTemplate(p param, reg *descriptor.Registry) (string, error) {
methName := casing.Camel(*meth.Name)
meth.Name = &methName
for _, b := range meth.Bindings {
+ if err := reg.CheckDuplicateAnnotation(b.HTTPMethod, b.PathTmpl.Template, svc); err != nil {
+ return "", err
+ }
+
methodWithBindingsSeen = true
if err := handlerTemplate.Execute(w, binding{
Binding: b,
@@ -249,12 +253,12 @@ var _ = metadata.Join
{{end}}
`))
- _ = template.Must(handlerTemplate.New("request-func-signature").Parse(strings.Replace(`
+ _ = template.Must(handlerTemplate.New("request-func-signature").Parse(strings.ReplaceAll(`
{{if .Method.GetServerStreaming}}
func request_{{.Method.Service.GetName}}_{{.Method.GetName}}_{{.Index}}(ctx context.Context, marshaler runtime.Marshaler, client {{.Method.Service.InstanceName}}Client, req *http.Request, pathParams map[string]string) ({{.Method.Service.InstanceName}}_{{.Method.GetName}}Client, runtime.ServerMetadata, error)
{{else}}
func request_{{.Method.Service.GetName}}_{{.Method.GetName}}_{{.Index}}(ctx context.Context, marshaler runtime.Marshaler, client {{.Method.Service.InstanceName}}Client, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error)
-{{end}}`, "\n", "", -1)))
+{{end}}`, "\n", "")))
_ = template.Must(handlerTemplate.New("client-streaming-request-func").Parse(`
{{template "request-func-signature" .}} {
@@ -304,7 +308,11 @@ func request_{{.Method.Service.GetName}}_{{.Method.GetName}}_{{.Index}}(ctx cont
}
`))
- _ = template.Must(handlerTemplate.New("client-rpc-request-func").Parse(`
+ funcMap template.FuncMap = map[string]interface{}{
+ "camelIdentifier": casing.CamelIdentifier,
+ }
+
+ _ = template.Must(handlerTemplate.New("client-rpc-request-func").Funcs(funcMap).Parse(`
{{$AllowPatchFeature := .AllowPatchFeature}}
{{if .HasQueryParam}}
var (
@@ -319,7 +327,11 @@ var (
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
- if err := marshaler.NewDecoder(newReader()).Decode(&{{.Body.AssignableExpr "protoReq"}}); err != nil && err != io.EOF {
+ {{- $protoReq := .Body.AssignableExprPrep "protoReq" .Method.Service.File.GoPkg.Path -}}
+ {{- if ne "" $protoReq }}
+ {{printf "%s" $protoReq }}
+ {{- end}}
+ if err := marshaler.NewDecoder(newReader()).Decode(&{{.Body.AssignableExpr "protoReq" .Method.Service.File.GoPkg.Path}}); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
{{- if and $AllowPatchFeature (eq (.HTTPMethod) "PATCH") (.FieldMaskField) (not (eq "*" .GetBodyFieldPath)) }}
@@ -358,18 +370,22 @@ var (
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", {{$param | printf "%q"}}, err)
}
{{if $enum}}
- e{{if $param.IsRepeated}}s{{end}}, err = {{$param.ConvertFuncExpr}}(val{{if $param.IsRepeated}}, {{$binding.Registry.GetRepeatedPathParamSeparator | printf "%c" | printf "%q"}}{{end}}, {{$enum.GoType $param.Method.Service.File.GoPkg.Path}}_value)
+ e{{if $param.IsRepeated}}s{{end}}, err = {{$param.ConvertFuncExpr}}(val{{if $param.IsRepeated}}, {{$binding.Registry.GetRepeatedPathParamSeparator | printf "%c" | printf "%q"}}{{end}}, {{$enum.GoType $param.Method.Service.File.GoPkg.Path | camelIdentifier}}_value)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "could not parse path as enum value, parameter: %s, error: %v", {{$param | printf "%q"}}, err)
}
{{end}}
{{else if $enum}}
- e{{if $param.IsRepeated}}s{{end}}, err = {{$param.ConvertFuncExpr}}(val{{if $param.IsRepeated}}, {{$binding.Registry.GetRepeatedPathParamSeparator | printf "%c" | printf "%q"}}{{end}}, {{$enum.GoType $param.Method.Service.File.GoPkg.Path}}_value)
+ e{{if $param.IsRepeated}}s{{end}}, err = {{$param.ConvertFuncExpr}}(val{{if $param.IsRepeated}}, {{$binding.Registry.GetRepeatedPathParamSeparator | printf "%c" | printf "%q"}}{{end}}, {{$enum.GoType $param.Method.Service.File.GoPkg.Path | camelIdentifier}}_value)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", {{$param | printf "%q"}}, err)
}
{{else}}
- {{$param.AssignableExpr "protoReq"}}, err = {{$param.ConvertFuncExpr}}(val{{if $param.IsRepeated}}, {{$binding.Registry.GetRepeatedPathParamSeparator | printf "%c" | printf "%q"}}{{end}})
+ {{- $protoReq := $param.AssignableExprPrep "protoReq" $binding.Method.Service.File.GoPkg.Path -}}
+ {{- if ne "" $protoReq }}
+ {{printf "%s" $protoReq }}
+ {{- end}}
+ {{$param.AssignableExpr "protoReq" $binding.Method.Service.File.GoPkg.Path}}, err = {{$param.ConvertFuncExpr}}(val{{if $param.IsRepeated}}, {{$binding.Registry.GetRepeatedPathParamSeparator | printf "%c" | printf "%q"}}{{end}})
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", {{$param | printf "%q"}}, err)
}
@@ -379,9 +395,9 @@ var (
for i, v := range es {
s[i] = {{$enum.GoType $param.Method.Service.File.GoPkg.Path}}(v)
}
- {{$param.AssignableExpr "protoReq"}} = s
+ {{$param.AssignableExpr "protoReq" $binding.Method.Service.File.GoPkg.Path}} = s
{{else if $enum}}
- {{$param.AssignableExpr "protoReq"}} = {{$enum.GoType $param.Method.Service.File.GoPkg.Path}}(e)
+ {{$param.AssignableExpr "protoReq" $binding.Method.Service.File.GoPkg.Path}} = {{$enum.GoType $param.Method.Service.File.GoPkg.Path | camelIdentifier}}(e)
{{end}}
{{end}}
{{end}}
@@ -435,15 +451,6 @@ var (
}
return nil
}
- if err := handleSend(); err != nil {
- if cerr := stream.CloseSend(); cerr != nil {
- grpclog.Infof("Failed to terminate client stream: %v", cerr)
- }
- if err == io.EOF {
- return stream, metadata, nil
- }
- return nil, metadata, err
- }
go func() {
for {
if err := handleSend(); err != nil {
@@ -473,13 +480,13 @@ var (
{{end}}
`))
- _ = template.Must(localHandlerTemplate.New("local-request-func-signature").Parse(strings.Replace(`
+ _ = template.Must(localHandlerTemplate.New("local-request-func-signature").Parse(strings.ReplaceAll(`
{{if .Method.GetServerStreaming}}
{{else}}
func local_request_{{.Method.Service.GetName}}_{{.Method.GetName}}_{{.Index}}(ctx context.Context, marshaler runtime.Marshaler, server {{.Method.Service.InstanceName}}Server, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error)
-{{end}}`, "\n", "", -1)))
+{{end}}`, "\n", "")))
- _ = template.Must(localHandlerTemplate.New("local-client-rpc-request-func").Parse(`
+ _ = template.Must(localHandlerTemplate.New("local-client-rpc-request-func").Funcs(funcMap).Parse(`
{{$AllowPatchFeature := .AllowPatchFeature}}
{{template "local-request-func-signature" .}} {
var protoReq {{.Method.RequestType.GoType .Method.Service.File.GoPkg.Path}}
@@ -489,7 +496,11 @@ func local_request_{{.Method.Service.GetName}}_{{.Method.GetName}}_{{.Index}}(ct
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
- if err := marshaler.NewDecoder(newReader()).Decode(&{{.Body.AssignableExpr "protoReq"}}); err != nil && err != io.EOF {
+ {{- $protoReq := .Body.AssignableExprPrep "protoReq" .Method.Service.File.GoPkg.Path -}}
+ {{- if ne "" $protoReq }}
+ {{printf "%s" $protoReq }}
+ {{- end}}
+ if err := marshaler.NewDecoder(newReader()).Decode(&{{.Body.AssignableExpr "protoReq" .Method.Service.File.GoPkg.Path}}); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
{{- if and $AllowPatchFeature (eq (.HTTPMethod) "PATCH") (.FieldMaskField) (not (eq "*" .GetBodyFieldPath)) }}
@@ -528,18 +539,22 @@ func local_request_{{.Method.Service.GetName}}_{{.Method.GetName}}_{{.Index}}(ct
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", {{$param | printf "%q"}}, err)
}
{{if $enum}}
- e{{if $param.IsRepeated}}s{{end}}, err = {{$param.ConvertFuncExpr}}(val{{if $param.IsRepeated}}, {{$binding.Registry.GetRepeatedPathParamSeparator | printf "%c" | printf "%q"}}{{end}}, {{$enum.GoType $param.Method.Service.File.GoPkg.Path}}_value)
+ e{{if $param.IsRepeated}}s{{end}}, err = {{$param.ConvertFuncExpr}}(val{{if $param.IsRepeated}}, {{$binding.Registry.GetRepeatedPathParamSeparator | printf "%c" | printf "%q"}}{{end}}, {{$enum.GoType $param.Method.Service.File.GoPkg.Path | camelIdentifier}}_value)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "could not parse path as enum value, parameter: %s, error: %v", {{$param | printf "%q"}}, err)
}
{{end}}
{{else if $enum}}
- e{{if $param.IsRepeated}}s{{end}}, err = {{$param.ConvertFuncExpr}}(val{{if $param.IsRepeated}}, {{$binding.Registry.GetRepeatedPathParamSeparator | printf "%c" | printf "%q"}}{{end}}, {{$enum.GoType $param.Method.Service.File.GoPkg.Path}}_value)
+ e{{if $param.IsRepeated}}s{{end}}, err = {{$param.ConvertFuncExpr}}(val{{if $param.IsRepeated}}, {{$binding.Registry.GetRepeatedPathParamSeparator | printf "%c" | printf "%q"}}{{end}}, {{$enum.GoType $param.Method.Service.File.GoPkg.Path | camelIdentifier}}_value)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", {{$param | printf "%q"}}, err)
}
{{else}}
- {{$param.AssignableExpr "protoReq"}}, err = {{$param.ConvertFuncExpr}}(val{{if $param.IsRepeated}}, {{$binding.Registry.GetRepeatedPathParamSeparator | printf "%c" | printf "%q"}}{{end}})
+ {{- $protoReq := $param.AssignableExprPrep "protoReq" $binding.Method.Service.File.GoPkg.Path -}}
+ {{- if ne "" $protoReq }}
+ {{printf "%s" $protoReq }}
+ {{- end}}
+ {{$param.AssignableExpr "protoReq" $binding.Method.Service.File.GoPkg.Path}}, err = {{$param.ConvertFuncExpr}}(val{{if $param.IsRepeated}}, {{$binding.Registry.GetRepeatedPathParamSeparator | printf "%c" | printf "%q"}}{{end}})
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", {{$param | printf "%q"}}, err)
}
@@ -550,9 +565,9 @@ func local_request_{{.Method.Service.GetName}}_{{.Method.GetName}}_{{.Index}}(ct
for i, v := range es {
s[i] = {{$enum.GoType $param.Method.Service.File.GoPkg.Path}}(v)
}
- {{$param.AssignableExpr "protoReq"}} = s
+ {{$param.AssignableExpr "protoReq" $binding.Method.Service.File.GoPkg.Path}} = s
{{else if $enum}}
- {{$param.AssignableExpr "protoReq"}} = {{$enum.GoType $param.Method.Service.File.GoPkg.Path}}(e)
+ {{$param.AssignableExpr "protoReq" $binding.Method.Service.File.GoPkg.Path}} = {{$enum.GoType $param.Method.Service.File.GoPkg.Path | camelIdentifier}}(e)
{{end}}
{{end}}
{{end}}
@@ -600,23 +615,29 @@ func Register{{$svc.GetName}}{{$.RegisterFuncSuffix}}Server(ctx context.Context,
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/{{$svc.File.GetPackage}}.{{$svc.GetName}}/{{$m.GetName}}")
+ var err error
+ var annotatedContext context.Context
+ {{- if $b.PathTmpl }}
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/{{$svc.File.GetPackage}}.{{$svc.GetName}}/{{$m.GetName}}", runtime.WithHTTPPathPattern("{{$b.PathTmpl.Template}}"))
+ {{- else -}}
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/{{$svc.File.GetPackage}}.{{$svc.GetName}}/{{$m.GetName}}")
+ {{- end }}
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_{{$svc.GetName}}_{{$m.GetName}}_{{$b.Index}}(rctx, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_{{$svc.GetName}}_{{$m.GetName}}_{{$b.Index}}(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
{{ if $b.ResponseBody }}
- forward_{{$svc.GetName}}_{{$m.GetName}}_{{$b.Index}}(ctx, mux, outboundMarshaler, w, req, response_{{$svc.GetName}}_{{$m.GetName}}_{{$b.Index}}{resp}, mux.GetForwardResponseOptions()...)
+ forward_{{$svc.GetName}}_{{$m.GetName}}_{{$b.Index}}(annotatedContext, mux, outboundMarshaler, w, req, response_{{$svc.GetName}}_{{$m.GetName}}_{{$b.Index}}{resp}, mux.GetForwardResponseOptions()...)
{{ else }}
- forward_{{$svc.GetName}}_{{$m.GetName}}_{{$b.Index}}(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_{{$svc.GetName}}_{{$m.GetName}}_{{$b.Index}}(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
{{end}}
})
{{end}}
@@ -676,31 +697,37 @@ func Register{{$svc.GetName}}{{$.RegisterFuncSuffix}}Client(ctx context.Context,
{{- end }}
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- rctx, err := runtime.AnnotateContext(ctx, mux, req, "/{{$svc.File.GetPackage}}.{{$svc.GetName}}/{{$m.GetName}}")
+ var err error
+ var annotatedContext context.Context
+ {{- if $b.PathTmpl }}
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/{{$svc.File.GetPackage}}.{{$svc.GetName}}/{{$m.GetName}}", runtime.WithHTTPPathPattern("{{$b.PathTmpl.Template}}"))
+ {{- else -}}
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/{{$svc.File.GetPackage}}.{{$svc.GetName}}/{{$m.GetName}}")
+ {{- end }}
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_{{$svc.GetName}}_{{$m.GetName}}_{{$b.Index}}(rctx, inboundMarshaler, client, req, pathParams)
- ctx = runtime.NewServerMetadataContext(ctx, md)
+ resp, md, err := request_{{$svc.GetName}}_{{$m.GetName}}_{{$b.Index}}(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
{{if $m.GetServerStreaming}}
{{ if $b.ResponseBody }}
- forward_{{$svc.GetName}}_{{$m.GetName}}_{{$b.Index}}(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) {
+ forward_{{$svc.GetName}}_{{$m.GetName}}_{{$b.Index}}(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) {
res, err := resp.Recv()
return response_{{$svc.GetName}}_{{$m.GetName}}_{{$b.Index}}{res}, err
}, mux.GetForwardResponseOptions()...)
{{ else }}
- forward_{{$svc.GetName}}_{{$m.GetName}}_{{$b.Index}}(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
+ forward_{{$svc.GetName}}_{{$m.GetName}}_{{$b.Index}}(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
{{end}}
{{else}}
{{ if $b.ResponseBody }}
- forward_{{$svc.GetName}}_{{$m.GetName}}_{{$b.Index}}(ctx, mux, outboundMarshaler, w, req, response_{{$svc.GetName}}_{{$m.GetName}}_{{$b.Index}}{resp}, mux.GetForwardResponseOptions()...)
+ forward_{{$svc.GetName}}_{{$m.GetName}}_{{$b.Index}}(annotatedContext, mux, outboundMarshaler, w, req, response_{{$svc.GetName}}_{{$m.GetName}}_{{$b.Index}}{resp}, mux.GetForwardResponseOptions()...)
{{ else }}
- forward_{{$svc.GetName}}_{{$m.GetName}}_{{$b.Index}}(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_{{$svc.GetName}}_{{$m.GetName}}_{{$b.Index}}(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
{{end}}
{{end}}
})
@@ -718,7 +745,7 @@ type response_{{$svc.GetName}}_{{$m.GetName}}_{{$b.Index}} struct {
func (m response_{{$svc.GetName}}_{{$m.GetName}}_{{$b.Index}}) XXX_ResponseBody() interface{} {
response := m.Message.(*{{$m.ResponseType.GoType $m.Service.File.GoPkg.Path}})
- return {{$b.ResponseBody.AssignableExpr "response"}}
+ return {{$b.ResponseBody.AssignableExpr "response" $m.Service.File.GoPkg.Path}}
}
{{end}}
{{end}}
diff --git a/protoc-gen-grpc-gateway/internal/gengateway/template_test.go b/protoc-gen-grpc-gateway/internal/gengateway/template_test.go
index 48ed03239e9..829c5c57103 100644
--- a/protoc-gen-grpc-gateway/internal/gengateway/template_test.go
+++ b/protoc-gen-grpc-gateway/internal/gengateway/template_test.go
@@ -29,6 +29,14 @@ func crossLinkFixture(f *descriptor.File) *descriptor.File {
return f
}
+func compilePath(t *testing.T, path string) httprule.Template {
+ parsed, err := httprule.Parse(path)
+ if err != nil {
+ t.Fatalf("httprule.Parse(%q) failed with %v; want success", path, err)
+ }
+ return parsed.Compile()
+}
+
func TestApplyTemplateHeader(t *testing.T) {
msgdesc := &descriptorpb.DescriptorProto{
Name: proto.String("ExampleMessage"),
@@ -185,8 +193,9 @@ func TestApplyTemplateRequestWithoutClientStreaming(t *testing.T) {
{
HTTPMethod: "POST",
PathTmpl: httprule.Template{
- Version: 1,
- OpCodes: []int{0, 0},
+ Version: 1,
+ OpCodes: []int{0, 0},
+ Template: "/v1",
},
PathParams: []descriptor.Parameter{
{
@@ -245,7 +254,7 @@ func TestApplyTemplateRequestWithoutClientStreaming(t *testing.T) {
if want := `pattern_ExampleService_Echo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{0, 0}, []string(nil), ""))`; !strings.Contains(got, want) {
t.Errorf("applyTemplate(%#v) = %s; want to contain %s", file, got, want)
}
- if want := `rctx, err := runtime.AnnotateContext(ctx, mux, req, "/example.ExampleService/Echo")`; !strings.Contains(got, want) {
+ if want := `annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/example.ExampleService/Echo", runtime.WithHTTPPathPattern("/v1"))`; !strings.Contains(got, want) {
t.Errorf("applyTemplate(%#v) = %s; want to contain %s", file, got, want)
}
}
@@ -453,7 +462,7 @@ func TestApplyTemplateInProcess(t *testing.T) {
serverStreaming: false,
sigWant: []string{
`func local_request_ExampleService_Echo_0(ctx context.Context, marshaler runtime.Marshaler, server ExampleServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {`,
- `resp, md, err := local_request_ExampleService_Echo_0(rctx, inboundMarshaler, server, req, pathParams)`,
+ `resp, md, err := local_request_ExampleService_Echo_0(annotatedContext, inboundMarshaler, server, req, pathParams)`,
},
},
{
@@ -674,7 +683,7 @@ func TestIdentifierCapitalization(t *testing.T) {
OutputType: proto.String("example_response"),
}
meth2 := &descriptorpb.MethodDescriptorProto{
- Name: proto.String("Exampl_eGet"),
+ Name: proto.String("Exampl_ePost"),
InputType: proto.String("Exam_pleRequest"),
OutputType: proto.String("example_response"),
}
@@ -727,7 +736,7 @@ func TestIdentifierCapitalization(t *testing.T) {
ResponseType: msg2,
Bindings: []*descriptor.Binding{
{
- HTTPMethod: "GET",
+ HTTPMethod: "POST",
Body: &descriptor.Body{FieldPath: nil},
},
},
@@ -745,7 +754,7 @@ func TestIdentifierCapitalization(t *testing.T) {
if want := `msg, err := client.ExampleGe2T(ctx, &protoReq, grpc.Header(&metadata.HeaderMD)`; !strings.Contains(got, want) {
t.Errorf("applyTemplate(%#v) = %s; want to contain %s", file, got, want)
}
- if want := `msg, err := client.ExamplEGet(ctx, &protoReq, grpc.Header(&metadata.HeaderMD)`; !strings.Contains(got, want) {
+ if want := `msg, err := client.ExamplEPost(ctx, &protoReq, grpc.Header(&metadata.HeaderMD)`; !strings.Contains(got, want) {
t.Errorf("applyTemplate(%#v) = %s; want to contain %s", file, got, want)
}
if want := `var protoReq ExamPleRequest`; !strings.Contains(got, want) {
@@ -755,3 +764,164 @@ func TestIdentifierCapitalization(t *testing.T) {
t.Errorf("applyTemplate(%#v) = %s; want to contain %s", file, got, want)
}
}
+
+func TestDuplicatePathsInSameService(t *testing.T) {
+ msgdesc := &descriptorpb.DescriptorProto{
+ Name: proto.String("ExampleMessage"),
+ Field: []*descriptorpb.FieldDescriptorProto{
+ {
+ Name: proto.String("nested"),
+ Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(),
+ Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(),
+ TypeName: proto.String(".google.protobuf.StringValue"),
+ Number: proto.Int32(1),
+ },
+ },
+ }
+ meth1 := &descriptorpb.MethodDescriptorProto{
+ Name: proto.String("Echo"),
+ InputType: proto.String("ExampleMessage"),
+ OutputType: proto.String("ExampleMessage"),
+ }
+ meth2 := &descriptorpb.MethodDescriptorProto{
+ Name: proto.String("Echo2"),
+ InputType: proto.String("ExampleMessage"),
+ OutputType: proto.String("ExampleMessage"),
+ }
+ svc := &descriptorpb.ServiceDescriptorProto{
+ Name: proto.String("ExampleService"),
+ Method: []*descriptorpb.MethodDescriptorProto{meth1, meth2},
+ }
+ msg := &descriptor.Message{
+ DescriptorProto: msgdesc,
+ }
+ binding := &descriptor.Binding{
+ Index: 1,
+ PathTmpl: compilePath(t, "/v1/example/echo"),
+ HTTPMethod: "GET",
+ PathParams: nil,
+ Body: nil,
+ }
+ file := descriptor.File{
+ FileDescriptorProto: &descriptorpb.FileDescriptorProto{
+ Name: proto.String("example.proto"),
+ Package: proto.String("example"),
+ MessageType: []*descriptorpb.DescriptorProto{msgdesc},
+ Service: []*descriptorpb.ServiceDescriptorProto{svc},
+ },
+ GoPkg: descriptor.GoPackage{
+ Path: "example.com/path/to/example/example.pb",
+ Name: "example_pb",
+ },
+ Messages: []*descriptor.Message{msg},
+ Services: []*descriptor.Service{
+ {
+ ServiceDescriptorProto: svc,
+ Methods: []*descriptor.Method{
+ {
+ MethodDescriptorProto: meth1,
+ RequestType: msg,
+ ResponseType: msg,
+ Bindings: []*descriptor.Binding{binding},
+ },
+ {
+ MethodDescriptorProto: meth2,
+ RequestType: msg,
+ ResponseType: msg,
+ Bindings: []*descriptor.Binding{binding},
+ },
+ },
+ },
+ },
+ }
+ _, err := applyTemplate(param{File: crossLinkFixture(&file), RegisterFuncSuffix: "Handler", AllowPatchFeature: true}, descriptor.NewRegistry())
+ if err == nil {
+ t.Errorf("applyTemplate(%#v) succeeded; want an error", file)
+ return
+ }
+}
+
+func TestDuplicatePathsInDifferentService(t *testing.T) {
+ msgdesc := &descriptorpb.DescriptorProto{
+ Name: proto.String("ExampleMessage"),
+ Field: []*descriptorpb.FieldDescriptorProto{
+ {
+ Name: proto.String("nested"),
+ Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(),
+ Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(),
+ TypeName: proto.String(".google.protobuf.StringValue"),
+ Number: proto.Int32(1),
+ },
+ },
+ }
+ meth1 := &descriptorpb.MethodDescriptorProto{
+ Name: proto.String("Echo"),
+ InputType: proto.String("ExampleMessage"),
+ OutputType: proto.String("ExampleMessage"),
+ }
+ meth2 := &descriptorpb.MethodDescriptorProto{
+ Name: proto.String("Echo2"),
+ InputType: proto.String("ExampleMessage"),
+ OutputType: proto.String("ExampleMessage"),
+ }
+ svc1 := &descriptorpb.ServiceDescriptorProto{
+ Name: proto.String("ExampleServiceNumberOne"),
+ Method: []*descriptorpb.MethodDescriptorProto{meth1, meth2},
+ }
+ svc2 := &descriptorpb.ServiceDescriptorProto{
+ Name: proto.String("ExampleServiceNumberTwo"),
+ Method: []*descriptorpb.MethodDescriptorProto{meth1, meth2},
+ }
+ msg := &descriptor.Message{
+ DescriptorProto: msgdesc,
+ }
+ binding := &descriptor.Binding{
+ Index: 1,
+ PathTmpl: compilePath(t, "/v1/example/echo"),
+ HTTPMethod: "GET",
+ PathParams: nil,
+ Body: nil,
+ }
+ file := descriptor.File{
+ FileDescriptorProto: &descriptorpb.FileDescriptorProto{
+ Name: proto.String("example.proto"),
+ Package: proto.String("example"),
+ MessageType: []*descriptorpb.DescriptorProto{msgdesc},
+ Service: []*descriptorpb.ServiceDescriptorProto{svc1, svc2},
+ },
+ GoPkg: descriptor.GoPackage{
+ Path: "example.com/path/to/example/example.pb",
+ Name: "example_pb",
+ },
+ Messages: []*descriptor.Message{msg},
+ Services: []*descriptor.Service{
+ {
+ ServiceDescriptorProto: svc1,
+ Methods: []*descriptor.Method{
+ {
+ MethodDescriptorProto: meth1,
+ RequestType: msg,
+ ResponseType: msg,
+ Bindings: []*descriptor.Binding{binding},
+ },
+ },
+ },
+ {
+ ServiceDescriptorProto: svc2,
+ Methods: []*descriptor.Method{
+ {
+ MethodDescriptorProto: meth2,
+ RequestType: msg,
+ ResponseType: msg,
+ Bindings: []*descriptor.Binding{binding},
+ },
+ },
+ },
+ },
+ }
+ _, err := applyTemplate(param{File: crossLinkFixture(&file), RegisterFuncSuffix: "Handler", AllowPatchFeature: true}, descriptor.NewRegistry())
+ if err != nil {
+ t.Errorf("applyTemplate(%#v) failed; want success", file)
+ return
+ }
+}
diff --git a/protoc-gen-grpc-gateway/main.go b/protoc-gen-grpc-gateway/main.go
index a8a7c8760e3..fca2f83fc7c 100644
--- a/protoc-gen-grpc-gateway/main.go
+++ b/protoc-gen-grpc-gateway/main.go
@@ -3,7 +3,8 @@
// HTTP/1 requests gRPC invocation.
// You rarely need to run this program directly. Instead, put this program
// into your $PATH with a name "protoc-gen-grpc-gateway" and run
-// protoc --grpc-gateway_out=output_directory path/to/input.proto
+//
+// protoc --grpc-gateway_out=output_directory path/to/input.proto
//
// See README.md for more details.
package main
@@ -26,7 +27,7 @@ var (
useRequestContext = flag.Bool("request_context", true, "determine whether to use http.Request's context or not")
allowDeleteBody = flag.Bool("allow_delete_body", false, "unless set, HTTP DELETE methods may not have a body")
grpcAPIConfiguration = flag.String("grpc_api_configuration", "", "path to gRPC API Configuration in YAML format")
- allowRepeatedFieldsInBody = flag.Bool("allow_repeated_fields_in_body", false, "allows to use repeated field in `body` and `response_body` field of `google.api.http` annotation option")
+ _ = flag.Bool("allow_repeated_fields_in_body", true, "allows to use repeated field in `body` and `response_body` field of `google.api.http` annotation option. DEPRECATED: the value is ignored and always behaves as `true`.")
repeatedPathParamSeparator = flag.String("repeated_path_param_separator", "csv", "configures how repeated fields should be split. Allowed values are `csv`, `pipes`, `ssv` and `tsv`.")
allowPatchFeature = flag.Bool("allow_patch_feature", true, "determines whether to use PATCH feature involving update masks (using google.protobuf.FieldMask).")
omitPackageDoc = flag.Bool("omit_package_doc", false, "if true, no package comment will be included in the generated code")
@@ -101,32 +102,6 @@ func main() {
})
}
-func parseFlags(reg *descriptor.Registry, parameter string) {
- if parameter == "" {
- return
- }
-
- for _, p := range strings.Split(parameter, ",") {
- spec := strings.SplitN(p, "=", 2)
- if len(spec) == 1 {
- if err := flag.CommandLine.Set(spec[0], ""); err != nil {
- glog.Fatalf("Cannot set flag %s", p)
- }
- continue
- }
-
- name, value := spec[0], spec[1]
-
- if strings.HasPrefix(name, "M") {
- reg.AddPkgMap(name[1:], value)
- continue
- }
- if err := flag.CommandLine.Set(name, value); err != nil {
- glog.Fatalf("Cannot set flag %s", p)
- }
- }
-}
-
func applyFlags(reg *descriptor.Registry) error {
if *grpcAPIConfiguration != "" {
if err := reg.LoadGrpcAPIServiceFromYAML(*grpcAPIConfiguration); err != nil {
@@ -138,7 +113,13 @@ func applyFlags(reg *descriptor.Registry) error {
}
reg.SetStandalone(*standalone)
reg.SetAllowDeleteBody(*allowDeleteBody)
- reg.SetAllowRepeatedFieldsInBody(*allowRepeatedFieldsInBody)
+
+ flag.Visit(func(f *flag.Flag) {
+ if f.Name == "allow_repeated_fields_in_body" {
+ glog.Warning("The `allow_repeated_fields_in_body` flag is deprecated and will always behave as `true`.")
+ }
+ })
+
reg.SetOmitPackageDoc(*omitPackageDoc)
reg.SetWarnOnUnboundMethods(*warnOnUnboundMethods)
reg.SetGenerateUnboundMethods(*generateUnboundMethods)
diff --git a/protoc-gen-grpc-gateway/main_test.go b/protoc-gen-grpc-gateway/main_test.go
deleted file mode 100644
index c7c70b40e0a..00000000000
--- a/protoc-gen-grpc-gateway/main_test.go
+++ /dev/null
@@ -1,31 +0,0 @@
-package main
-
-import (
- "testing"
-
- "github.com/grpc-ecosystem/grpc-gateway/v2/internal/descriptor"
-)
-
-func TestParseFlagsEmptyNoPanic(t *testing.T) {
- reg := descriptor.NewRegistry()
- parseFlags(reg, "")
-}
-
-func TestParseFlags(t *testing.T) {
- reg := descriptor.NewRegistry()
- parseFlags(reg, "allow_repeated_fields_in_body=true")
- if *allowRepeatedFieldsInBody != true {
- t.Errorf("flag allow_repeated_fields_in_body was not set correctly, wanted true got %v", *allowRepeatedFieldsInBody)
- }
-}
-
-func TestParseFlagsMultiple(t *testing.T) {
- reg := descriptor.NewRegistry()
- parseFlags(reg, "allow_repeated_fields_in_body=true,repeated_path_param_separator=csv")
- if *allowRepeatedFieldsInBody != true {
- t.Errorf("flag allow_repeated_fields_in_body was not set correctly, wanted 'true' got '%v'", *allowRepeatedFieldsInBody)
- }
- if *repeatedPathParamSeparator != "csv" {
- t.Errorf("flag importPrefix was not set correctly, wanted 'csv' got '%v'", *repeatedPathParamSeparator)
- }
-}
diff --git a/protoc-gen-openapiv2/BUILD.bazel b/protoc-gen-openapiv2/BUILD.bazel
index 90e711b18d9..6ef372c5a00 100644
--- a/protoc-gen-openapiv2/BUILD.bazel
+++ b/protoc-gen-openapiv2/BUILD.bazel
@@ -3,28 +3,29 @@ load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library", "go_test")
package(default_visibility = ["//visibility:private"])
go_library(
- name = "go_default_library",
+ name = "protoc-gen-openapiv2_lib",
srcs = ["main.go"],
importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2",
deps = [
- "//internal/codegenerator:go_default_library",
- "//internal/descriptor:go_default_library",
- "//protoc-gen-openapiv2/internal/genopenapi:go_default_library",
- "@com_github_golang_glog//:go_default_library",
- "@org_golang_google_protobuf//proto:go_default_library",
- "@org_golang_google_protobuf//types/pluginpb:go_default_library",
+ "//internal/codegenerator",
+ "//internal/descriptor",
+ "//protoc-gen-openapiv2/internal/genopenapi",
+ "//utilities",
+ "@com_github_golang_glog//:glog",
+ "@org_golang_google_protobuf//proto",
+ "@org_golang_google_protobuf//types/pluginpb",
],
)
go_binary(
name = "protoc-gen-openapiv2",
- embed = [":go_default_library"],
+ embed = [":protoc-gen-openapiv2_lib"],
visibility = ["//visibility:public"],
)
go_test(
- name = "go_default_test",
+ name = "protoc-gen-openapiv2_test",
size = "small",
srcs = ["main_test.go"],
- embed = [":go_default_library"],
+ embed = [":protoc-gen-openapiv2_lib"],
)
diff --git a/protoc-gen-openapiv2/defs.bzl b/protoc-gen-openapiv2/defs.bzl
index ea3226762a5..2ecb18716b6 100644
--- a/protoc-gen-openapiv2/defs.bzl
+++ b/protoc-gen-openapiv2/defs.bzl
@@ -27,12 +27,12 @@ def _direct_source_infos(proto_info, provided_sources = []):
source_root = proto_info.proto_source_root
if "." == source_root:
- return [struct(file = src, import_path = src.path) for src in proto_info.direct_sources]
+ return [struct(file = src, import_path = src.path) for src in proto_info.check_deps_sources.to_list()]
offset = len(source_root) + 1 # + '/'.
infos = []
- for src in proto_info.direct_sources:
+ for src in proto_info.check_deps_sources.to_list():
# TODO(yannic): Remove this hack when we drop support for Bazel < 1.0.
local_offset = offset
if src.root.path and not source_root.startswith(src.root.path):
@@ -58,12 +58,18 @@ def _run_proto_gen_openapi(
repeated_path_param_separator,
include_package_in_tags,
fqn_for_openapi_name,
+ openapi_naming_strategy,
use_go_templates,
disable_default_errors,
+ disable_service_tags,
enums_as_ints,
+ omit_enum_default_value,
+ output_format,
simple_operation_ids,
+ proto3_optional_nullable,
openapi_configuration,
- generate_unbound_methods):
+ generate_unbound_methods,
+ visibility_restriction_selectors):
args = actions.args()
args.add("--plugin", "protoc-gen-openapiv2=%s" % protoc_gen_openapiv2.path)
@@ -86,6 +92,9 @@ def _run_proto_gen_openapi(
if fqn_for_openapi_name:
args.add("--openapiv2_opt", "fqn_for_openapi_name=true")
+ if openapi_naming_strategy:
+ args.add("--openapiv2_opt", "openapi_naming_strategy=%s" % openapi_naming_strategy)
+
if generate_unbound_methods:
args.add("--openapiv2_opt", "generate_unbound_methods=true")
@@ -104,9 +113,24 @@ def _run_proto_gen_openapi(
if disable_default_errors:
args.add("--openapiv2_opt", "disable_default_errors=true")
+ if disable_service_tags:
+ args.add("--openapiv2_opt", "disable_service_tags=true")
+
if enums_as_ints:
args.add("--openapiv2_opt", "enums_as_ints=true")
+ if omit_enum_default_value:
+ args.add("--openapiv2_opt", "omit_enum_default_value=true")
+
+ if output_format:
+ args.add("--openapiv2_opt", "output_format=%s" % output_format)
+
+ if proto3_optional_nullable:
+ args.add("--openapiv2_opt", "proto3_optional_nullable=true")
+
+ for visibility_restriction_selector in visibility_restriction_selectors:
+ args.add("--openapiv2_opt", "visibility_restriction_selectors=%s" % visibility_restriction_selector)
+
args.add("--openapiv2_opt", "repeated_path_param_separator=%s" % repeated_path_param_separator)
proto_file_infos = _direct_source_infos(proto_info)
@@ -197,12 +221,18 @@ def _proto_gen_openapi_impl(ctx):
repeated_path_param_separator = ctx.attr.repeated_path_param_separator,
include_package_in_tags = ctx.attr.include_package_in_tags,
fqn_for_openapi_name = ctx.attr.fqn_for_openapi_name,
+ openapi_naming_strategy = ctx.attr.openapi_naming_strategy,
use_go_templates = ctx.attr.use_go_templates,
disable_default_errors = ctx.attr.disable_default_errors,
+ disable_service_tags = ctx.attr.disable_service_tags,
enums_as_ints = ctx.attr.enums_as_ints,
+ omit_enum_default_value = ctx.attr.omit_enum_default_value,
+ output_format = ctx.attr.output_format,
simple_operation_ids = ctx.attr.simple_operation_ids,
+ proto3_optional_nullable = ctx.attr.proto3_optional_nullable,
openapi_configuration = ctx.file.openapi_configuration,
generate_unbound_methods = ctx.attr.generate_unbound_methods,
+ visibility_restriction_selectors = ctx.attr.visibility_restriction_selectors,
),
),
),
@@ -256,6 +286,15 @@ protoc_gen_openapiv2 = rule(
" qualified names from the proto definition" +
" (ie my.package.MyMessage.MyInnerMessage",
),
+ "openapi_naming_strategy": attr.string(
+ default = "",
+ mandatory = False,
+ values = ["", "simple", "legacy", "fqn"],
+ doc = "configures how OpenAPI names are determined." +
+ " Allowed values are `` (empty), `simple`, `legacy` and `fqn`." +
+ " If unset, either `legacy` or `fqn` are selected, depending" +
+ " on the value of the `fqn_for_openapi_name` setting",
+ ),
"use_go_templates": attr.bool(
default = False,
mandatory = False,
@@ -267,17 +306,39 @@ protoc_gen_openapiv2 = rule(
doc = "if set, disables generation of default errors." +
" This is useful if you have defined custom error handling",
),
+ "disable_service_tags": attr.bool(
+ default = False,
+ mandatory = False,
+ doc = "if set, disables generation of service tags." +
+ " This is useful if you do not want to expose the names of your backend grpc services.",
+ ),
"enums_as_ints": attr.bool(
default = False,
mandatory = False,
doc = "whether to render enum values as integers, as opposed to string values",
),
+ "omit_enum_default_value": attr.bool(
+ default = False,
+ mandatory = False,
+ doc = "if set, omit default enum value",
+ ),
+ "output_format": attr.string(
+ default = "json",
+ mandatory = False,
+ values = ["json", "yaml"],
+ doc = "output content format. Allowed values are: `json`, `yaml`",
+ ),
"simple_operation_ids": attr.bool(
default = False,
mandatory = False,
doc = "whether to remove the service prefix in the operationID" +
" generation. Can introduce duplicate operationIDs, use with caution.",
),
+ "proto3_optional_nullable": attr.bool(
+ default = False,
+ mandatory = False,
+ doc = "whether Proto3 Optional fields should be marked as x-nullable",
+ ),
"openapi_configuration": attr.label(
allow_single_file = True,
mandatory = False,
@@ -289,19 +350,26 @@ protoc_gen_openapiv2 = rule(
doc = "generate swagger metadata even for RPC methods that have" +
" no HttpRule annotation",
),
+ "visibility_restriction_selectors": attr.string_list(
+ mandatory = False,
+ doc = "list of `google.api.VisibilityRule` visibility labels to include" +
+ " in the generated output when a visibility annotation is defined." +
+ " Repeat this option to supply multiple values. Elements without" +
+ " visibility annotations are unaffected by this setting.",
+ ),
"_protoc": attr.label(
default = "@com_google_protobuf//:protoc",
executable = True,
- cfg = "host",
+ cfg = "exec",
),
"_well_known_protos": attr.label(
- default = "@com_google_protobuf//:well_known_protos",
+ default = "@com_google_protobuf//:well_known_type_protos",
allow_files = True,
),
"_protoc_gen_openapi": attr.label(
default = Label("//protoc-gen-openapiv2:protoc-gen-openapiv2"),
executable = True,
- cfg = "host",
+ cfg = "exec",
),
},
implementation = _proto_gen_openapi_impl,
diff --git a/protoc-gen-openapiv2/internal/genopenapi/BUILD.bazel b/protoc-gen-openapiv2/internal/genopenapi/BUILD.bazel
index b9c06bc9ec5..847990d5a78 100644
--- a/protoc-gen-openapiv2/internal/genopenapi/BUILD.bazel
+++ b/protoc-gen-openapiv2/internal/genopenapi/BUILD.bazel
@@ -3,58 +3,81 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
package(default_visibility = ["//protoc-gen-openapiv2:__subpackages__"])
go_library(
- name = "go_default_library",
+ name = "genopenapi",
srcs = [
"doc.go",
+ "format.go",
"generator.go",
"helpers.go",
"helpers_go111_old.go",
+ "naming.go",
"template.go",
"types.go",
],
importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/internal/genopenapi",
deps = [
- "//internal/casing:go_default_library",
- "//internal/descriptor:go_default_library",
- "//internal/generator:go_default_library",
- "//protoc-gen-openapiv2/options:go_default_library",
- "@com_github_golang_glog//:go_default_library",
+ "//internal/casing",
+ "//internal/descriptor",
+ "//internal/generator",
+ "//protoc-gen-openapiv2/options",
+ "@com_github_golang_glog//:glog",
"@com_github_golang_protobuf//descriptor:go_default_library_gen",
"@go_googleapis//google/api:annotations_go_proto",
+ "@go_googleapis//google/api:visibility_go_proto",
"@go_googleapis//google/rpc:status_go_proto",
+ "@in_gopkg_yaml_v3//:yaml_v3",
"@io_bazel_rules_go//proto/wkt:any_go_proto",
- "@org_golang_google_protobuf//encoding/protojson:go_default_library",
- "@org_golang_google_protobuf//proto:go_default_library",
- "@org_golang_google_protobuf//types/descriptorpb:go_default_library",
- "@org_golang_google_protobuf//types/known/structpb:go_default_library",
- "@org_golang_google_protobuf//types/pluginpb:go_default_library",
+ "@org_golang_google_protobuf//encoding/protojson",
+ "@org_golang_google_protobuf//proto",
+ "@org_golang_google_protobuf//types/descriptorpb",
+ "@org_golang_google_protobuf//types/known/structpb",
+ "@org_golang_google_protobuf//types/pluginpb",
+ "@org_golang_x_text//cases",
+ "@org_golang_x_text//language",
],
)
go_test(
- name = "go_default_test",
+ name = "genopenapi_test",
size = "small",
srcs = [
"cycle_test.go",
+ "format_test.go",
+ "generator_test.go",
+ "helpers_test.go",
+ "naming_test.go",
"template_test.go",
+ "types_test.go",
],
- embed = [":go_default_library"],
+ embed = [":genopenapi"],
deps = [
- "//internal/descriptor:go_default_library",
- "//internal/descriptor/openapiconfig:go_default_library",
- "//internal/httprule:go_default_library",
- "//protoc-gen-openapiv2/options:go_default_library",
- "//runtime:go_default_library",
- "@com_github_google_go_cmp//cmp:go_default_library",
+ "//internal/descriptor",
+ "//internal/descriptor/openapiconfig",
+ "//internal/httprule",
+ "//protoc-gen-openapiv2/options",
+ "//runtime",
+ "@com_github_google_go_cmp//cmp",
"@go_googleapis//google/api:annotations_go_proto",
+ "@go_googleapis//google/api:visibility_go_proto",
+ "@in_gopkg_yaml_v3//:yaml_v3",
"@io_bazel_rules_go//proto/wkt:field_mask_go_proto",
- "@org_golang_google_protobuf//proto:go_default_library",
- "@org_golang_google_protobuf//reflect/protodesc:go_default_library",
- "@org_golang_google_protobuf//types/descriptorpb:go_default_library",
- "@org_golang_google_protobuf//types/known/durationpb:go_default_library",
- "@org_golang_google_protobuf//types/known/structpb:go_default_library",
- "@org_golang_google_protobuf//types/known/timestamppb:go_default_library",
- "@org_golang_google_protobuf//types/known/wrapperspb:go_default_library",
- "@org_golang_google_protobuf//types/pluginpb:go_default_library",
+ "@org_golang_google_protobuf//encoding/protojson",
+ "@org_golang_google_protobuf//encoding/prototext",
+ "@org_golang_google_protobuf//proto",
+ "@org_golang_google_protobuf//reflect/protodesc",
+ "@org_golang_google_protobuf//types/descriptorpb",
+ "@org_golang_google_protobuf//types/known/anypb",
+ "@org_golang_google_protobuf//types/known/durationpb",
+ "@org_golang_google_protobuf//types/known/emptypb",
+ "@org_golang_google_protobuf//types/known/structpb",
+ "@org_golang_google_protobuf//types/known/timestamppb",
+ "@org_golang_google_protobuf//types/known/wrapperspb",
+ "@org_golang_google_protobuf//types/pluginpb",
],
)
+
+alias(
+ name = "go_default_library",
+ actual = ":genopenapi",
+ visibility = ["//protoc-gen-openapiv2:__subpackages__"],
+)
diff --git a/protoc-gen-openapiv2/internal/genopenapi/format.go b/protoc-gen-openapiv2/internal/genopenapi/format.go
new file mode 100644
index 00000000000..6f0faa8e538
--- /dev/null
+++ b/protoc-gen-openapiv2/internal/genopenapi/format.go
@@ -0,0 +1,46 @@
+package genopenapi
+
+import (
+ "encoding/json"
+ "errors"
+ "io"
+
+ "gopkg.in/yaml.v3"
+)
+
+type Format string
+
+const (
+ FormatJSON Format = "json"
+ FormatYAML Format = "yaml"
+)
+
+type ContentEncoder interface {
+ Encode(v interface{}) (err error)
+}
+
+func (f Format) Validate() error {
+ switch f {
+ case FormatJSON, FormatYAML:
+ return nil
+ default:
+ return errors.New("unknown format: " + string(f))
+ }
+}
+
+func (f Format) NewEncoder(w io.Writer) (ContentEncoder, error) {
+ switch f {
+ case FormatYAML:
+ enc := yaml.NewEncoder(w)
+ enc.SetIndent(2)
+
+ return enc, nil
+ case FormatJSON:
+ enc := json.NewEncoder(w)
+ enc.SetIndent("", " ")
+
+ return enc, nil
+ default:
+ return nil, errors.New("unknown format: " + string(f))
+ }
+}
diff --git a/protoc-gen-openapiv2/internal/genopenapi/format_test.go b/protoc-gen-openapiv2/internal/genopenapi/format_test.go
new file mode 100644
index 00000000000..564aea5d214
--- /dev/null
+++ b/protoc-gen-openapiv2/internal/genopenapi/format_test.go
@@ -0,0 +1,105 @@
+package genopenapi_test
+
+import (
+ "bytes"
+ "encoding/json"
+ "io"
+ "reflect"
+ "testing"
+
+ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/internal/genopenapi"
+ "gopkg.in/yaml.v3"
+)
+
+func TestFormatValidate(t *testing.T) {
+ t.Parallel()
+
+ testCases := [...]struct {
+ Format genopenapi.Format
+ Valid bool
+ }{{
+ Format: genopenapi.FormatJSON,
+ Valid: true,
+ }, {
+ Format: genopenapi.FormatYAML,
+ Valid: true,
+ }, {
+ Format: genopenapi.Format("unknown"),
+ Valid: false,
+ }, {
+ Format: genopenapi.Format(""),
+ Valid: false,
+ }}
+
+ for _, tc := range testCases {
+ tc := tc
+
+ t.Run(string(tc.Format), func(t *testing.T) {
+ t.Parallel()
+
+ err := tc.Format.Validate()
+ switch {
+ case tc.Valid && err != nil:
+ t.Fatalf("expect no validation error, got: %s", err)
+ case !tc.Valid && err == nil:
+ t.Fatal("expect validation error, got nil")
+ }
+ })
+ }
+}
+
+func TestFormatEncode(t *testing.T) {
+ t.Parallel()
+
+ type contentDecoder interface {
+ Decode(v interface{}) error
+ }
+
+ testCases := [...]struct {
+ Format genopenapi.Format
+ NewDecoder func(r io.Reader) contentDecoder
+ }{{
+ Format: genopenapi.FormatJSON,
+ NewDecoder: func(r io.Reader) contentDecoder {
+ return json.NewDecoder(r)
+ },
+ }, {
+ Format: genopenapi.FormatYAML,
+ NewDecoder: func(r io.Reader) contentDecoder {
+ return yaml.NewDecoder(r)
+ },
+ }}
+
+ for _, tc := range testCases {
+ tc := tc
+
+ t.Run(string(tc.Format), func(t *testing.T) {
+ t.Parallel()
+
+ expParams := map[string]string{
+ "hello": "world",
+ }
+
+ var buf bytes.Buffer
+ enc, err := tc.Format.NewEncoder(&buf)
+ if err != nil {
+ t.Fatalf("expect no encoder creating error, got: %s", err)
+ }
+
+ err = enc.Encode(expParams)
+ if err != nil {
+ t.Fatalf("expect no encoding error, got: %s", err)
+ }
+
+ gotParams := make(map[string]string)
+ err = tc.NewDecoder(&buf).Decode(&gotParams)
+ if err != nil {
+ t.Fatalf("expect no decoding error, got: %s", err)
+ }
+
+ if !reflect.DeepEqual(expParams, gotParams) {
+ t.Fatalf("expected: %+v, actual: %+v", expParams, gotParams)
+ }
+ })
+ }
+}
diff --git a/protoc-gen-openapiv2/internal/genopenapi/generator.go b/protoc-gen-openapiv2/internal/genopenapi/generator.go
index 0848b400505..f6b3c27bf31 100644
--- a/protoc-gen-openapiv2/internal/genopenapi/generator.go
+++ b/protoc-gen-openapiv2/internal/genopenapi/generator.go
@@ -23,12 +23,11 @@ import (
legacydescriptor "github.com/golang/protobuf/descriptor"
)
-var (
- errNoTargetService = errors.New("no target service defined in the file")
-)
+var errNoTargetService = errors.New("no target service defined in the file")
type generator struct {
- reg *descriptor.Registry
+ reg *descriptor.Registry
+ format Format
}
type wrapper struct {
@@ -42,8 +41,11 @@ type GeneratorOptions struct {
}
// New returns a new generator which generates grpc gateway files.
-func New(reg *descriptor.Registry) gen.Generator {
- return &generator{reg: reg}
+func New(reg *descriptor.Registry, format Format) gen.Generator {
+ return &generator{
+ reg: reg,
+ format: format,
+ }
}
// Merge a lot of OpenAPI file (wrapper) to single one OpenAPI file
@@ -73,38 +75,164 @@ func mergeTargetFile(targets []*wrapper, mergeFileName string) *wrapper {
// Q: What's up with the alias types here?
// A: We don't want to completely override how these structs are marshaled into
-// JSON, we only want to add fields (see below, extensionMarshalJSON).
-// An infinite recursion would happen if we'd call json.Marshal on the struct
-// that has swaggerObject as an embedded field. To avoid that, we'll create
-// type aliases, and those don't have the custom MarshalJSON methods defined
-// on them. See http://choly.ca/post/go-json-marshalling/ (or, if it ever
-// goes away, use
-// https://web.archive.org/web/20190806073003/http://choly.ca/post/go-json-marshalling/.
+// JSON, we only want to add fields (see below, extensionMarshalJSON).
+// An infinite recursion would happen if we'd call json.Marshal on the struct
+// that has swaggerObject as an embedded field. To avoid that, we'll create
+// type aliases, and those don't have the custom MarshalJSON methods defined
+// on them. See http://choly.ca/post/go-json-marshalling/ (or, if it ever
+// goes away, use
+// https://web.archive.org/web/20190806073003/http://choly.ca/post/go-json-marshalling/.
func (so openapiSwaggerObject) MarshalJSON() ([]byte, error) {
type alias openapiSwaggerObject
return extensionMarshalJSON(alias(so), so.extensions)
}
+// MarshalYAML implements yaml.Marshaler interface.
+//
+// It is required in order to pass extensions inline.
+//
+// Example:
+//
+// extensions: {x-key: x-value}
+// type: string
+//
+// It will be rendered as:
+//
+// x-key: x-value
+// type: string
+//
+// Use generics when the project will be upgraded to go 1.18+.
+func (so openapiSwaggerObject) MarshalYAML() (interface{}, error) {
+ type Alias openapiSwaggerObject
+
+ return struct {
+ Extension map[string]interface{} `yaml:",inline"`
+ Alias `yaml:",inline"`
+ }{
+ Extension: extensionsToMap(so.extensions),
+ Alias: Alias(so),
+ }, nil
+}
+
func (so openapiInfoObject) MarshalJSON() ([]byte, error) {
type alias openapiInfoObject
return extensionMarshalJSON(alias(so), so.extensions)
}
+func (so openapiInfoObject) MarshalYAML() (interface{}, error) {
+ type Alias openapiInfoObject
+
+ return struct {
+ Extension map[string]interface{} `yaml:",inline"`
+ Alias `yaml:",inline"`
+ }{
+ Extension: extensionsToMap(so.extensions),
+ Alias: Alias(so),
+ }, nil
+}
+
func (so openapiSecuritySchemeObject) MarshalJSON() ([]byte, error) {
type alias openapiSecuritySchemeObject
return extensionMarshalJSON(alias(so), so.extensions)
}
+func (so openapiSecuritySchemeObject) MarshalYAML() (interface{}, error) {
+ type Alias openapiSecuritySchemeObject
+
+ return struct {
+ Extension map[string]interface{} `yaml:",inline"`
+ Alias `yaml:",inline"`
+ }{
+ Extension: extensionsToMap(so.extensions),
+ Alias: Alias(so),
+ }, nil
+}
+
func (so openapiOperationObject) MarshalJSON() ([]byte, error) {
type alias openapiOperationObject
return extensionMarshalJSON(alias(so), so.extensions)
}
+func (so openapiOperationObject) MarshalYAML() (interface{}, error) {
+ type Alias openapiOperationObject
+
+ return struct {
+ Extension map[string]interface{} `yaml:",inline"`
+ Alias `yaml:",inline"`
+ }{
+ Extension: extensionsToMap(so.extensions),
+ Alias: Alias(so),
+ }, nil
+}
+
func (so openapiResponseObject) MarshalJSON() ([]byte, error) {
type alias openapiResponseObject
return extensionMarshalJSON(alias(so), so.extensions)
}
+func (so openapiResponseObject) MarshalYAML() (interface{}, error) {
+ type Alias openapiResponseObject
+
+ return struct {
+ Extension map[string]interface{} `yaml:",inline"`
+ Alias `yaml:",inline"`
+ }{
+ Extension: extensionsToMap(so.extensions),
+ Alias: Alias(so),
+ }, nil
+}
+
+func (so openapiSchemaObject) MarshalJSON() ([]byte, error) {
+ type alias openapiSchemaObject
+ return extensionMarshalJSON(alias(so), so.extensions)
+}
+
+func (so openapiSchemaObject) MarshalYAML() (interface{}, error) {
+ type Alias openapiSchemaObject
+
+ return struct {
+ Extension map[string]interface{} `yaml:",inline"`
+ Alias `yaml:",inline"`
+ }{
+ Extension: extensionsToMap(so.extensions),
+ Alias: Alias(so),
+ }, nil
+}
+
+func (so openapiParameterObject) MarshalJSON() ([]byte, error) {
+ type alias openapiParameterObject
+ return extensionMarshalJSON(alias(so), so.extensions)
+}
+
+func (so openapiParameterObject) MarshalYAML() (interface{}, error) {
+ type Alias openapiParameterObject
+
+ return struct {
+ Extension map[string]interface{} `yaml:",inline"`
+ Alias `yaml:",inline"`
+ }{
+ Extension: extensionsToMap(so.extensions),
+ Alias: Alias(so),
+ }, nil
+}
+
+func (so openapiTagObject) MarshalJSON() ([]byte, error) {
+ type alias openapiTagObject
+ return extensionMarshalJSON(alias(so), so.extensions)
+}
+
+func (so openapiTagObject) MarshalYAML() (interface{}, error) {
+ type Alias openapiTagObject
+
+ return struct {
+ Extension map[string]interface{} `yaml:",inline"`
+ Alias `yaml:",inline"`
+ }{
+ Extension: extensionsToMap(so.extensions),
+ Alias: Alias(so),
+ }, nil
+}
+
func extensionMarshalJSON(so interface{}, extensions []extension) ([]byte, error) {
// To append arbitrary keys to the struct we'll render into json,
// we're creating another struct that embeds the original one, and
@@ -143,21 +271,25 @@ func extensionMarshalJSON(so interface{}, extensions []extension) ([]byte, error
}
// encodeOpenAPI converts OpenAPI file obj to pluginpb.CodeGeneratorResponse_File
-func encodeOpenAPI(file *wrapper) (*descriptor.ResponseFile, error) {
- var formatted bytes.Buffer
- enc := json.NewEncoder(&formatted)
- enc.SetIndent("", " ")
+func encodeOpenAPI(file *wrapper, format Format) (*descriptor.ResponseFile, error) {
+ var contentBuf bytes.Buffer
+ enc, err := format.NewEncoder(&contentBuf)
+ if err != nil {
+ return nil, err
+ }
+
if err := enc.Encode(*file.swagger); err != nil {
return nil, err
}
+
name := file.fileName
ext := filepath.Ext(name)
base := strings.TrimSuffix(name, ext)
- output := fmt.Sprintf("%s.swagger.json", base)
+ output := fmt.Sprintf("%s.swagger."+string(format), base)
return &descriptor.ResponseFile{
CodeGeneratorResponse_File: &pluginpb.CodeGeneratorResponse_File{
Name: proto.String(output),
- Content: proto.String(formatted.String()),
+ Content: proto.String(contentBuf.String()),
},
}, nil
}
@@ -192,7 +324,7 @@ func (g *generator) Generate(targets []*descriptor.File) ([]*descriptor.Response
for _, file := range targets {
glog.V(1).Infof("Processing %s", file.GetName())
swagger, err := applyTemplate(param{File: file, reg: g.reg})
- if err == errNoTargetService {
+ if errors.Is(err, errNoTargetService) {
glog.V(1).Infof("%s: %v", file.GetName(), err)
continue
}
@@ -207,17 +339,17 @@ func (g *generator) Generate(targets []*descriptor.File) ([]*descriptor.Response
if g.reg.IsAllowMerge() {
targetOpenAPI := mergeTargetFile(openapis, g.reg.GetMergeFileName())
- f, err := encodeOpenAPI(targetOpenAPI)
+ f, err := encodeOpenAPI(targetOpenAPI, g.format)
if err != nil {
- return nil, fmt.Errorf("failed to encode OpenAPI for %s: %s", g.reg.GetMergeFileName(), err)
+ return nil, fmt.Errorf("failed to encode OpenAPI for %s: %w", g.reg.GetMergeFileName(), err)
}
files = append(files, f)
glog.V(1).Infof("New OpenAPI file will emit")
} else {
for _, file := range openapis {
- f, err := encodeOpenAPI(file)
+ f, err := encodeOpenAPI(file, g.format)
if err != nil {
- return nil, fmt.Errorf("failed to encode OpenAPI for %s: %s", file.fileName, err)
+ return nil, fmt.Errorf("failed to encode OpenAPI for %s: %w", file.fileName, err)
}
files = append(files, f)
glog.V(1).Infof("New OpenAPI file will emit")
@@ -244,3 +376,13 @@ func AddErrorDefs(reg *descriptor.Registry) error {
},
})
}
+
+func extensionsToMap(extensions []extension) map[string]interface{} {
+ m := make(map[string]interface{}, len(extensions))
+
+ for _, v := range extensions {
+ m[v.key] = RawExample(v.value)
+ }
+
+ return m
+}
diff --git a/protoc-gen-openapiv2/internal/genopenapi/generator_test.go b/protoc-gen-openapiv2/internal/genopenapi/generator_test.go
new file mode 100644
index 00000000000..b63915ae10a
--- /dev/null
+++ b/protoc-gen-openapiv2/internal/genopenapi/generator_test.go
@@ -0,0 +1,257 @@
+package genopenapi_test
+
+import (
+ "strings"
+ "testing"
+
+ "github.com/grpc-ecosystem/grpc-gateway/v2/internal/descriptor"
+ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/internal/genopenapi"
+ "gopkg.in/yaml.v3"
+
+ "google.golang.org/protobuf/encoding/prototext"
+ "google.golang.org/protobuf/proto"
+ "google.golang.org/protobuf/types/descriptorpb"
+ "google.golang.org/protobuf/types/pluginpb"
+)
+
+func TestGenerate_YAML(t *testing.T) {
+ t.Parallel()
+
+ req := &pluginpb.CodeGeneratorRequest{
+ ProtoFile: []*descriptorpb.FileDescriptorProto{{
+ Name: proto.String("file.proto"),
+ Package: proto.String("example"),
+ Options: &descriptorpb.FileOptions{
+ GoPackage: proto.String("goexample/v1;goexample"),
+ },
+ }},
+ FileToGenerate: []string{
+ "file.proto",
+ },
+ }
+
+ resp := requireGenerate(t, req, genopenapi.FormatYAML)
+ if len(resp) != 1 {
+ t.Fatalf("invalid count, expected: 1, actual: %d", len(resp))
+ }
+
+ var p map[string]interface{}
+ err := yaml.Unmarshal([]byte(resp[0].GetContent()), &p)
+ if err != nil {
+ t.Fatalf("failed to unmarshall yaml: %s", err)
+ }
+}
+
+func TestGenerateExtension(t *testing.T) {
+ t.Parallel()
+
+ const in = `
+ file_to_generate: "exampleproto/v1/example.proto"
+ parameter: "output_format=yaml,allow_delete_body=true"
+ proto_file: {
+ name: "exampleproto/v1/example.proto"
+ package: "example.v1"
+ message_type: {
+ name: "Foo"
+ field: {
+ name: "bar"
+ number: 1
+ label: LABEL_OPTIONAL
+ type: TYPE_STRING
+ json_name: "bar"
+ options: {
+ [grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field]: {
+ description: "This is bar"
+ extensions: {
+ key: "x-go-default"
+ value: {
+ string_value: "0.5s"
+ }
+ }
+ }
+ }
+ }
+ }
+ service: {
+ name: "TestService"
+ method: {
+ name: "Test"
+ input_type: ".example.v1.Foo"
+ output_type: ".example.v1.Foo"
+ options: {}
+ }
+ }
+ options: {
+ go_package: "exampleproto/v1;exampleproto"
+ }
+ }`
+
+ var req pluginpb.CodeGeneratorRequest
+ if err := prototext.Unmarshal([]byte(in), &req); err != nil {
+ t.Fatalf("failed to marshall yaml: %s", err)
+ }
+
+ formats := [...]genopenapi.Format{
+ genopenapi.FormatJSON,
+ genopenapi.FormatYAML,
+ }
+
+ for _, format := range formats {
+ format := format
+
+ t.Run(string(format), func(t *testing.T) {
+ t.Parallel()
+
+ resp := requireGenerate(t, &req, format)
+ if len(resp) != 1 {
+ t.Fatalf("invalid count, expected: 1, actual: %d", len(resp))
+ }
+
+ content := resp[0].GetContent()
+
+ t.Log(content)
+
+ if !strings.Contains(content, "x-go-default") {
+ t.Fatal("x-go-default not found in content message")
+ }
+ })
+ }
+}
+
+func requireGenerate(
+ tb testing.TB,
+ req *pluginpb.CodeGeneratorRequest,
+ format genopenapi.Format,
+) []*descriptor.ResponseFile {
+ tb.Helper()
+
+ reg := descriptor.NewRegistry()
+
+ if err := reg.Load(req); err != nil {
+ tb.Fatalf("failed to load request: %s", err)
+ }
+
+ var targets []*descriptor.File
+ for _, target := range req.FileToGenerate {
+ f, err := reg.LookupFile(target)
+ if err != nil {
+ tb.Fatalf("failed to lookup file: %s", err)
+ }
+
+ targets = append(targets, f)
+ }
+
+ g := genopenapi.New(reg, format)
+
+ resp, err := g.Generate(targets)
+ switch {
+ case err != nil:
+ tb.Fatalf("failed to generate targets: %s", err)
+ case len(resp) != len(targets):
+ tb.Fatalf("invalid count, expected: %d, actual: %d", len(targets), len(resp))
+ }
+
+ return resp
+}
+
+func TestGeneratedYAMLIndent(t *testing.T) {
+ // It tests https://github.com/grpc-ecosystem/grpc-gateway/issues/2745.
+ const in = `
+ file_to_generate: "exampleproto/v1/exampleproto.proto"
+ parameter: "output_format=yaml,allow_delete_body=true"
+ proto_file: {
+ name: "exampleproto/v1/exampleproto.proto"
+ package: "repro"
+ message_type: {
+ name: "RollupRequest"
+ field: {
+ name: "type"
+ number: 1
+ label: LABEL_OPTIONAL
+ type: TYPE_ENUM
+ type_name: ".repro.RollupType"
+ json_name: "type"
+ }
+ }
+ message_type: {
+ name: "RollupResponse"
+ }
+ enum_type: {
+ name: "RollupType"
+ value: {
+ name: "UNKNOWN_ROLLUP"
+ number: 0
+ }
+ value: {
+ name: "APPLE"
+ number: 1
+ }
+ value: {
+ name: "BANANA"
+ number: 2
+ }
+ value: {
+ name: "CARROT"
+ number: 3
+ }
+ }
+ service: {
+ name: "Repro"
+ method: {
+ name: "GetRollup"
+ input_type: ".repro.RollupRequest"
+ output_type: ".repro.RollupResponse"
+ options: {
+ [google.api.http]: {
+ get: "/rollup"
+ }
+ }
+ }
+ }
+ options: {
+ go_package: "repro/foobar"
+ }
+ source_code_info: {
+ location: {
+ path: 5
+ path: 0
+ path: 2
+ path: 1
+ span: 24
+ span: 4
+ span: 14
+ leading_comments: " Apples are good\n"
+ }
+ location: {
+ path: 5
+ path: 0
+ path: 2
+ path: 3
+ span: 28
+ span: 4
+ span: 15
+ leading_comments: " Carrots are mediocre\n"
+ }
+ }
+ syntax: "proto3"
+ }
+ `
+
+ var req pluginpb.CodeGeneratorRequest
+ if err := prototext.Unmarshal([]byte(in), &req); err != nil {
+ t.Fatalf("failed to marshall yaml: %s", err)
+ }
+
+ resp := requireGenerate(t, &req, genopenapi.FormatYAML)
+ if len(resp) != 1 {
+ t.Fatalf("invalid count, expected: 1, actual: %d", len(resp))
+ }
+
+ content := resp[0].GetContent()
+
+ err := yaml.Unmarshal([]byte(content), map[string]interface{}{})
+ if err != nil {
+ t.Log(content)
+ t.Fatalf("got invalid yaml: %s", err)
+ }
+}
diff --git a/protoc-gen-openapiv2/internal/genopenapi/helpers.go b/protoc-gen-openapiv2/internal/genopenapi/helpers.go
index c53d6802557..37b328c5575 100644
--- a/protoc-gen-openapiv2/internal/genopenapi/helpers.go
+++ b/protoc-gen-openapiv2/internal/genopenapi/helpers.go
@@ -1,9 +1,35 @@
-//+build go1.12
+//go:build go1.12
+// +build go1.12
package genopenapi
-import "strings"
+import (
+ "strings"
+
+ "golang.org/x/text/cases"
+ "golang.org/x/text/language"
+)
func fieldName(k string) string {
- return strings.ReplaceAll(strings.Title(k), "-", "_")
+ return strings.ReplaceAll(cases.Title(language.AmericanEnglish).String(k), "-", "_")
+}
+
+// this method will filter the same fields and return the unique one
+func getUniqueFields(schemaFieldsRequired []string, fieldsRequired []string) []string {
+ var unique []string
+ var index *int
+
+ for j, schemaFieldRequired := range schemaFieldsRequired {
+ index = nil
+ for i, fieldRequired := range fieldsRequired {
+ if schemaFieldRequired == fieldRequired {
+ index = &i
+ break
+ }
+ }
+ if index == nil {
+ unique = append(unique, schemaFieldsRequired[j])
+ }
+ }
+ return unique
}
diff --git a/protoc-gen-openapiv2/internal/genopenapi/helpers_go111_old.go b/protoc-gen-openapiv2/internal/genopenapi/helpers_go111_old.go
index b8db1196508..d2b504a9ab8 100644
--- a/protoc-gen-openapiv2/internal/genopenapi/helpers_go111_old.go
+++ b/protoc-gen-openapiv2/internal/genopenapi/helpers_go111_old.go
@@ -1,4 +1,5 @@
-//+build !go1.12
+//go:build !go1.12
+// +build !go1.12
package genopenapi
diff --git a/protoc-gen-openapiv2/internal/genopenapi/helpers_test.go b/protoc-gen-openapiv2/internal/genopenapi/helpers_test.go
new file mode 100644
index 00000000000..f27f589cb1c
--- /dev/null
+++ b/protoc-gen-openapiv2/internal/genopenapi/helpers_test.go
@@ -0,0 +1,66 @@
+package genopenapi
+
+import (
+ "reflect"
+ "testing"
+)
+
+func Test_getUniqueFields(t *testing.T) {
+ type args struct {
+ schemaFieldsRequired []string
+ fieldsRequired []string
+ }
+ var tests = []struct {
+ name string
+ args args
+ want []string
+ }{
+ {
+ name: "test_1",
+ args: args{
+ schemaFieldsRequired: []string{"Field_1", "Field_2", "Field_3"},
+ fieldsRequired: []string{"Field_2"},
+ },
+ want: []string{"Field_1", "Field_3"},
+ },
+ {
+ name: "test_2",
+ args: args{
+ schemaFieldsRequired: []string{"Field_1", "Field_2", "Field_3"},
+ fieldsRequired: []string{"Field_3"},
+ },
+ want: []string{"Field_1", "Field_2"},
+ },
+ {
+ name: "test_3",
+ args: args{
+ schemaFieldsRequired: []string{"Field_1", "Field_2", "Field_3"},
+ fieldsRequired: []string{"Field_4"},
+ },
+ want: []string{"Field_1", "Field_2", "Field_3"},
+ },
+ {
+ name: "test_4",
+ args: args{
+ schemaFieldsRequired: []string{"Field_1", "Field_2", "Field_3", "Field_4", "Field_5", "Field_6"},
+ fieldsRequired: []string{"Field_6", "Field_4", "Field_1"},
+ },
+ want: []string{"Field_2", "Field_3", "Field_5"},
+ },
+ {
+ name: "test_5",
+ args: args{
+ schemaFieldsRequired: []string{"Field_1", "Field_2", "Field_3"},
+ fieldsRequired: []string{},
+ },
+ want: []string{"Field_1", "Field_2", "Field_3"},
+ },
+ }
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ if got := getUniqueFields(tt.args.schemaFieldsRequired, tt.args.fieldsRequired); !reflect.DeepEqual(got, tt.want) {
+ t.Errorf("getUniqueFields() = %v, want %v", got, tt.want)
+ }
+ })
+ }
+}
diff --git a/protoc-gen-openapiv2/internal/genopenapi/naming.go b/protoc-gen-openapiv2/internal/genopenapi/naming.go
new file mode 100644
index 00000000000..338ea2dcd0f
--- /dev/null
+++ b/protoc-gen-openapiv2/internal/genopenapi/naming.go
@@ -0,0 +1,110 @@
+package genopenapi
+
+import (
+ "reflect"
+ "strings"
+)
+
+// LookupNamingStrategy looks up the given naming strategy and returns the naming
+// strategy function for it. The naming strategy function takes in the list of all
+// fully-qualified proto message names, and returns a mapping from fully-qualified
+// name to OpenAPI name.
+func LookupNamingStrategy(strategyName string) func([]string) map[string]string {
+ switch strings.ToLower(strategyName) {
+ case "fqn":
+ return resolveNamesFQN
+ case "legacy":
+ return resolveNamesLegacy
+ case "simple":
+ return resolveNamesSimple
+ }
+ return nil
+}
+
+// resolveNamesFQN uses the fully-qualified proto message name as the
+// OpenAPI name, stripping the leading dot.
+func resolveNamesFQN(messages []string) map[string]string {
+ uniqueNames := make(map[string]string, len(messages))
+ for _, p := range messages {
+ // strip leading dot from proto fqn
+ uniqueNames[p] = p[1:]
+ }
+ return uniqueNames
+}
+
+// resolveNamesLegacy takes the names of all proto messages and generates unique references by
+// applying the legacy heuristics for deriving unique names: starting from the bottom of the name hierarchy, it
+// determines the minimum number of components necessary to yield a unique name, adds one
+// to that number, and then concatenates those last components with no separator in between
+// to form a unique name.
+//
+// E.g., if the fully qualified name is `.a.b.C.D`, and there are other messages with fully
+// qualified names ending in `.D` but not in `.C.D`, it assigns the unique name `bCD`.
+func resolveNamesLegacy(messages []string) map[string]string {
+ return resolveNamesUniqueWithContext(messages, 1, "")
+}
+
+// resolveNamesSimple takes the names of all proto messages and generates unique references by using a simple
+// heuristic: starting from the bottom of the name hierarchy, it determines the minimum
+// number of components necessary to yield a unique name, and then concatenates those last
+// components with a "." separator in between to form a unique name.
+//
+// E.g., if the fully qualified name is `.a.b.C.D`, and there are other messages with
+// fully qualified names ending in `.D` but not in `.C.D`, it assigns the unique name `C.D`.
+func resolveNamesSimple(messages []string) map[string]string {
+ return resolveNamesUniqueWithContext(messages, 0, ".")
+}
+
+// Take the names of every proto message and generates a unique reference by:
+// first, separating each message name into its components by splitting at dots. Then,
+// take the shortest suffix slice from each components slice that is unique among all
+// messages, and convert it into a component name by taking extraContext additional
+// components into consideration and joining all components with componentSeparator.
+func resolveNamesUniqueWithContext(messages []string, extraContext int, componentSeparator string) map[string]string {
+ packagesByDepth := make(map[int][][]string)
+ uniqueNames := make(map[string]string)
+
+ hierarchy := func(pkg string) []string {
+ return strings.Split(pkg, ".")
+ }
+
+ for _, p := range messages {
+ h := hierarchy(p)
+ for depth := range h {
+ if _, ok := packagesByDepth[depth]; !ok {
+ packagesByDepth[depth] = make([][]string, 0)
+ }
+ packagesByDepth[depth] = append(packagesByDepth[depth], h[len(h)-depth:])
+ }
+ }
+
+ count := func(list [][]string, item []string) int {
+ i := 0
+ for _, element := range list {
+ if reflect.DeepEqual(element, item) {
+ i++
+ }
+ }
+ return i
+ }
+
+ for _, p := range messages {
+ h := hierarchy(p)
+ depth := 0
+ for ; depth < len(h); depth++ {
+ // depth + extraContext > 0 ensures that we only break for values of depth when the
+ // resulting slice of name components is non-empty. Otherwise, we would return the
+ // empty string as the concise unique name is len(messages) == 1 (which is
+ // technically correct).
+ if depth+extraContext > 0 && count(packagesByDepth[depth], h[len(h)-depth:]) == 1 {
+ break
+ }
+ }
+ start := len(h) - depth - extraContext
+ if start < 0 {
+ start = 0
+ }
+ uniqueNames[p] = strings.Join(h[start:], componentSeparator)
+ }
+ return uniqueNames
+}
diff --git a/protoc-gen-openapiv2/internal/genopenapi/naming_test.go b/protoc-gen-openapiv2/internal/genopenapi/naming_test.go
new file mode 100644
index 00000000000..c039510fc60
--- /dev/null
+++ b/protoc-gen-openapiv2/internal/genopenapi/naming_test.go
@@ -0,0 +1,53 @@
+package genopenapi
+
+import "testing"
+
+func TestNaming(t *testing.T) {
+ type expectedNames struct {
+ fqn, legacy, simple string
+ }
+ messageNameToExpected := map[string]expectedNames{
+ ".A": {"A", "A", "A"},
+ ".a.B.C": {"a.B.C", "aBC", "B.C"},
+ ".a.D.C": {"a.D.C", "aDC", "D.C"},
+ ".a.E.F": {"a.E.F", "aEF", "a.E.F"},
+ ".b.E.F": {"b.E.F", "bEF", "b.E.F"},
+ ".c.G.H": {"c.G.H", "GH", "H"},
+ }
+
+ allMessageNames := make([]string, 0, len(messageNameToExpected))
+ for msgName := range messageNameToExpected {
+ allMessageNames = append(allMessageNames, msgName)
+ }
+
+ t.Run("fqn", func(t *testing.T) {
+ uniqueNames := resolveNamesFQN(allMessageNames)
+ for _, msgName := range allMessageNames {
+ expected := messageNameToExpected[msgName].fqn
+ actual := uniqueNames[msgName]
+ if expected != actual {
+ t.Errorf("fqn unique name %q does not match expected name %q", actual, expected)
+ }
+ }
+ })
+ t.Run("legacy", func(t *testing.T) {
+ uniqueNames := resolveNamesLegacy(allMessageNames)
+ for _, msgName := range allMessageNames {
+ expected := messageNameToExpected[msgName].legacy
+ actual := uniqueNames[msgName]
+ if expected != actual {
+ t.Errorf("legacy unique name %q does not match expected name %q", actual, expected)
+ }
+ }
+ })
+ t.Run("simple", func(t *testing.T) {
+ uniqueNames := resolveNamesSimple(allMessageNames)
+ for _, msgName := range allMessageNames {
+ expected := messageNameToExpected[msgName].simple
+ actual := uniqueNames[msgName]
+ if expected != actual {
+ t.Errorf("simple unique name %q does not match expected name %q", actual, expected)
+ }
+ }
+ })
+}
diff --git a/protoc-gen-openapiv2/internal/genopenapi/template.go b/protoc-gen-openapiv2/internal/genopenapi/template.go
index 0ac0d64495c..cb3fedc00b2 100644
--- a/protoc-gen-openapiv2/internal/genopenapi/template.go
+++ b/protoc-gen-openapiv2/internal/genopenapi/template.go
@@ -3,8 +3,8 @@ package genopenapi
import (
"bytes"
"encoding/json"
+ "errors"
"fmt"
- "io/ioutil"
"math"
"net/textproto"
"os"
@@ -22,12 +22,24 @@ import (
"github.com/grpc-ecosystem/grpc-gateway/v2/internal/descriptor"
openapi_options "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"
"google.golang.org/genproto/googleapis/api/annotations"
+ "google.golang.org/genproto/googleapis/api/visibility"
"google.golang.org/protobuf/encoding/protojson"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/types/descriptorpb"
"google.golang.org/protobuf/types/known/structpb"
)
+// The OpenAPI specification does not allow for more than one endpoint with the same HTTP method and path.
+// This prevents multiple gRPC service methods from sharing the same stripped version of the path and method.
+// For example: `GET /v1/{name=organizations/*}/roles` and `GET /v1/{name=users/*}/roles` both get stripped to `GET /v1/{name}/roles`.
+// We must make the URL unique by adding a suffix and an incrementing index to each path parameter
+// to differentiate the endpoints.
+// Since path parameter names do not affect the request contents (i.e. they're replaced in the path)
+// this will be hidden from the real grpc gateway consumer.
+const pathParamUniqueSuffixDeliminator = "_"
+
+const paragraphDeliminator = "\n\n"
+
// wktSchemas are the schemas of well-known-types.
// The schemas must match with the behavior of the JSON unmarshaler in
// https://github.com/protocolbuffers/protobuf-go/blob/v1.25.0/encoding/protojson/well_known_types.go
@@ -76,42 +88,57 @@ var wktSchemas = map[string]schemaCore{
".google.protobuf.BoolValue": {
Type: "boolean",
},
- ".google.protobuf.Empty": {},
- ".google.protobuf.Struct": {
+ ".google.protobuf.Empty": {
Type: "object",
},
- ".google.protobuf.Value": {
+ ".google.protobuf.Struct": {
Type: "object",
},
+ ".google.protobuf.Value": {},
".google.protobuf.ListValue": {
Type: "array",
- Items: (*openapiItemsObject)(&schemaCore{
- Type: "object",
- }),
+ Items: (*openapiItemsObject)(&openapiSchemaObject{
+ schemaCore: schemaCore{
+ Type: "object",
+ }}),
},
".google.protobuf.NullValue": {
Type: "string",
},
}
-func listEnumNames(enum *descriptor.Enum) (names []string) {
+func listEnumNames(reg *descriptor.Registry, enum *descriptor.Enum) (names []string) {
for _, value := range enum.GetValue() {
+ if !isVisible(getEnumValueVisibilityOption(value), reg) {
+ continue
+ }
+ if reg.GetOmitEnumDefaultValue() && value.GetNumber() == 0 {
+ continue
+ }
names = append(names, value.GetName())
}
return names
}
-func listEnumNumbers(enum *descriptor.Enum) (numbers []string) {
+func listEnumNumbers(reg *descriptor.Registry, enum *descriptor.Enum) (numbers []string) {
for _, value := range enum.GetValue() {
+ if reg.GetOmitEnumDefaultValue() && value.GetNumber() == 0 {
+ continue
+ }
+ if !isVisible(getEnumValueVisibilityOption(value), reg) {
+ continue
+ }
numbers = append(numbers, strconv.Itoa(int(value.GetNumber())))
}
return
}
-func getEnumDefault(enum *descriptor.Enum) string {
- for _, value := range enum.GetValue() {
- if value.GetNumber() == 0 {
- return value.GetName()
+func getEnumDefault(reg *descriptor.Registry, enum *descriptor.Enum) string {
+ if !reg.GetOmitEnumDefaultValue() {
+ for _, value := range enum.GetValue() {
+ if value.GetNumber() == 0 {
+ return value.GetName()
+ }
}
}
return ""
@@ -120,6 +147,10 @@ func getEnumDefault(enum *descriptor.Enum) string {
// messageToQueryParameters converts a message to a list of OpenAPI query parameters.
func messageToQueryParameters(message *descriptor.Message, reg *descriptor.Registry, pathParams []descriptor.Parameter, body *descriptor.Body) (params []openapiParameterObject, err error) {
for _, field := range message.Fields {
+ if !isVisible(getFieldVisibilityOption(field), reg) {
+ continue
+ }
+
p, err := queryParams(message, field, "", reg, pathParams, body, reg.GetRecursiveDepth())
if err != nil {
return nil, err
@@ -150,7 +181,7 @@ func newCycleChecker(recursive int) *cycleChecker {
// toleration
func (c *cycleChecker) Check(name string) bool {
count, ok := c.m[name]
- count = count + 1
+ count += 1
isCycle := count > c.count
if isCycle {
@@ -171,7 +202,7 @@ func (c *cycleChecker) Check(name string) bool {
func (c *cycleChecker) Branch() *cycleChecker {
copy := &cycleChecker{
count: c.count,
- m: map[string]int{},
+ m: make(map[string]int, len(c.m)),
}
for k, v := range c.m {
@@ -183,10 +214,12 @@ func (c *cycleChecker) Branch() *cycleChecker {
// nestedQueryParams converts a field to a list of OpenAPI query parameters recursively.
// This function is a helper function for queryParams, that keeps track of cyclical message references
-// through the use of
-// touched map[string]int
+// through the use of
+//
+// touched map[string]int
+//
// If a cycle is discovered, an error is returned, as cyclical data structures are dangerous
-// in query parameters.
+// in query parameters.
func nestedQueryParams(message *descriptor.Message, field *descriptor.Field, prefix string, reg *descriptor.Registry, pathParams []descriptor.Parameter, body *descriptor.Body, cycle *cycleChecker) (params []openapiParameterObject, err error) {
// make sure the parameter is not already listed as a path parameter
for _, pathParam := range pathParams {
@@ -223,19 +256,26 @@ func nestedQueryParams(message *descriptor.Message, field *descriptor.Field, pre
if items != nil && (items.Type == "" || items.Type == "object") && !isEnum {
return nil, nil // TODO: currently, mapping object in query parameter is not supported
}
- desc := schema.Description
- if schema.Title != "" { // merge title because title of parameter object will be ignored
- desc = strings.TrimSpace(schema.Title + ". " + schema.Description)
- }
+ desc := mergeDescription(schema)
// verify if the field is required
required := false
for _, fieldName := range schema.Required {
- if fieldName == field.GetName() {
+ if fieldName == reg.FieldName(field) {
required = true
break
}
}
+ // verify if the field is required in message options
+ if messageSchema, err := extractSchemaOptionFromMessageDescriptor(message.DescriptorProto); err == nil {
+ for _, fieldName := range messageSchema.GetJsonSchema().GetRequired() {
+ // Required fields can be field names or json_name values
+ if fieldName == field.GetJsonName() || fieldName == field.GetName() {
+ required = true
+ break
+ }
+ }
+ }
param := openapiParameterObject{
Description: desc,
@@ -244,7 +284,9 @@ func nestedQueryParams(message *descriptor.Message, field *descriptor.Field, pre
Type: schema.Type,
Items: schema.Items,
Format: schema.Format,
+ Pattern: schema.Pattern,
Required: required,
+ extensions: schema.extensions,
}
if param.Type == "array" {
param.CollectionFormat = "multi"
@@ -259,21 +301,25 @@ func nestedQueryParams(message *descriptor.Message, field *descriptor.Field, pre
}
if items != nil { // array
param.Items = &openapiItemsObject{
- Type: "string",
- Enum: listEnumNames(enum),
+ schemaCore: schemaCore{
+ Type: "string",
+ Enum: listEnumNames(reg, enum),
+ },
}
if reg.GetEnumsAsInts() {
param.Items.Type = "integer"
- param.Items.Enum = listEnumNumbers(enum)
+ param.Items.Enum = listEnumNumbers(reg, enum)
}
} else {
param.Type = "string"
- param.Enum = listEnumNames(enum)
- param.Default = getEnumDefault(enum)
+ param.Enum = listEnumNames(reg, enum)
+ param.Default = getEnumDefault(reg, enum)
if reg.GetEnumsAsInts() {
param.Type = "integer"
- param.Enum = listEnumNumbers(enum)
- param.Default = "0"
+ param.Enum = listEnumNumbers(reg, enum)
+ if !reg.GetOmitEnumDefaultValue() {
+ param.Default = "0"
+ }
}
}
valueComments := enumValueProtoComments(reg, enum)
@@ -291,8 +337,7 @@ func nestedQueryParams(message *descriptor.Message, field *descriptor.Field, pre
}
// Check for cyclical message reference:
- isOK := cycle.Check(*msg.Name)
- if !isOK {
+ if ok := cycle.Check(*msg.Name); !ok {
return nil, fmt.Errorf("exceeded recursive count (%d) for query parameter %q", cycle.count, fieldType)
}
@@ -302,6 +347,10 @@ func nestedQueryParams(message *descriptor.Message, field *descriptor.Field, pre
touchedOut := cycle.Branch()
for _, nestedField := range msg.Fields {
+ if !isVisible(getFieldVisibilityOption(nestedField), reg) {
+ continue
+ }
+
fieldName := reg.FieldName(field)
p, err := nestedQueryParams(msg, nestedField, prefix+fieldName+".", reg, pathParams, body, touchedOut)
if err != nil {
@@ -318,6 +367,10 @@ func findServicesMessagesAndEnumerations(s []*descriptor.Service, reg *descripto
for _, meth := range svc.Methods {
// Request may be fully included in query
{
+ if !isVisible(getMethodVisibilityOption(meth), reg) {
+ continue
+ }
+
swgReqName, ok := fullyQualifiedNameToOpenAPIName(meth.RequestType.FQMN(), reg)
if !ok {
glog.Errorf("couldn't resolve OpenAPI name for FQMN '%v'", meth.RequestType.FQMN())
@@ -350,6 +403,10 @@ func findServicesMessagesAndEnumerations(s []*descriptor.Service, reg *descripto
func findNestedMessagesAndEnumerations(message *descriptor.Message, reg *descriptor.Registry, m messageMap, e enumMap) {
// Iterate over all the fields that
for _, t := range message.Fields {
+ if !isVisible(getFieldVisibilityOption(t), reg) {
+ continue
+ }
+
fieldType := t.GetTypeName()
// If the type is an empty string then it is a proto primitive
if fieldType != "" {
@@ -375,7 +432,7 @@ func skipRenderingRef(refName string) bool {
return ok
}
-func renderMessageAsDefinition(msg *descriptor.Message, reg *descriptor.Registry, customRefs refMap, excludeFields []*descriptor.Field) openapiSchemaObject {
+func renderMessageAsDefinition(msg *descriptor.Message, reg *descriptor.Registry, customRefs refMap, pathParams []descriptor.Parameter) (openapiSchemaObject, error) {
schema := openapiSchemaObject{
schemaCore: schemaCore{
Type: "object",
@@ -383,11 +440,11 @@ func renderMessageAsDefinition(msg *descriptor.Message, reg *descriptor.Registry
}
msgComments := protoComments(reg, msg.File, msg.Outers, "MessageType", int32(msg.Index))
if err := updateOpenAPIDataFromComments(reg, &schema, msg, msgComments, false); err != nil {
- panic(err)
+ return openapiSchemaObject{}, err
}
opts, err := getMessageOpenAPIOption(reg, msg)
if err != nil {
- panic(err)
+ return openapiSchemaObject{}, err
}
if opts != nil {
protoSchema := openapiSchemaFromProtoSchema(opts, reg, customRefs, msg)
@@ -410,6 +467,8 @@ func renderMessageAsDefinition(msg *descriptor.Message, reg *descriptor.Registry
schema.MaxProperties = protoSchema.MaxProperties
schema.MinProperties = protoSchema.MinProperties
schema.Required = protoSchema.Required
+ schema.XNullable = protoSchema.XNullable
+ schema.extensions = protoSchema.extensions
if protoSchema.schemaCore.Type != "" || protoSchema.schemaCore.Ref != "" {
schema.schemaCore = protoSchema.schemaCore
}
@@ -424,47 +483,107 @@ func renderMessageAsDefinition(msg *descriptor.Message, reg *descriptor.Registry
}
}
- schema.Required = filterOutExcludedFields(schema.Required, excludeFields, reg)
+ schema.Required = filterOutExcludedFields(schema.Required, pathParams)
for _, f := range msg.Fields {
- if shouldExcludeField(reg.FieldName(f), excludeFields, reg) {
+ if !isVisible(getFieldVisibilityOption(f), reg) {
continue
}
- fieldValue := schemaOfField(f, reg, customRefs)
+
+ if shouldExcludeField(f.GetName(), pathParams) {
+ continue
+ }
+ subPathParams := subPathParams(f.GetName(), pathParams)
+ fieldSchema, err := renderFieldAsDefinition(f, reg, customRefs, subPathParams)
+ if err != nil {
+ return openapiSchemaObject{}, err
+ }
comments := fieldProtoComments(reg, msg, f)
- if err := updateOpenAPIDataFromComments(reg, &fieldValue, f, comments, false); err != nil {
- panic(err)
+ if err := updateOpenAPIDataFromComments(reg, &fieldSchema, f, comments, false); err != nil {
+ return openapiSchemaObject{}, err
}
if requiredIdx := find(schema.Required, *f.Name); requiredIdx != -1 && reg.GetUseJSONNamesForFields() {
schema.Required[requiredIdx] = f.GetJsonName()
}
- if fieldValue.Required != nil {
- for _, req := range fieldValue.Required {
- if reg.GetUseJSONNamesForFields() {
- schema.Required = append(schema.Required, f.GetJsonName())
- } else {
- schema.Required = append(schema.Required, req)
- }
- }
+ if fieldSchema.Required != nil {
+ schema.Required = getUniqueFields(schema.Required, fieldSchema.Required)
+ schema.Required = append(schema.Required, fieldSchema.Required...)
+ // To avoid populating both the field schema require and message schema require, unset the field schema require.
+ // See issue #2635.
+ fieldSchema.Required = nil
}
- kv := keyVal{Value: fieldValue}
+ kv := keyVal{Value: fieldSchema}
kv.Key = reg.FieldName(f)
if schema.Properties == nil {
schema.Properties = &openapiSchemaObjectProperties{}
}
*schema.Properties = append(*schema.Properties, kv)
}
- return schema
+
+ if msg.FQMN() == ".google.protobuf.Any" {
+ transformAnyForJSON(&schema, reg.GetUseJSONNamesForFields())
+ }
+
+ return schema, nil
}
-func renderMessagesAsDefinition(messages messageMap, d openapiDefinitionsObject, reg *descriptor.Registry, customRefs refMap, excludeFields []*descriptor.Field) {
+func renderFieldAsDefinition(f *descriptor.Field, reg *descriptor.Registry, refs refMap, pathParams []descriptor.Parameter) (openapiSchemaObject, error) {
+ if len(pathParams) == 0 {
+ return schemaOfField(f, reg, refs), nil
+ }
+ location := ""
+ if ix := strings.LastIndex(f.Message.FQMN(), "."); ix > 0 {
+ location = f.Message.FQMN()[0:ix]
+ }
+ msg, err := reg.LookupMsg(location, f.GetTypeName())
+ if err != nil {
+ return openapiSchemaObject{}, err
+ }
+ schema, err := renderMessageAsDefinition(msg, reg, refs, pathParams)
+ if err != nil {
+ return openapiSchemaObject{}, err
+ }
+ comments := fieldProtoComments(reg, f.Message, f)
+ if len(comments) > 0 {
+ // Use title and description from field instead of nested message if present.
+ paragraphs := strings.Split(comments, paragraphDeliminator)
+ schema.Title = strings.TrimSpace(paragraphs[0])
+ schema.Description = strings.TrimSpace(strings.Join(paragraphs[1:], paragraphDeliminator))
+ }
+ return schema, nil
+}
+
+// transformAnyForJSON should be called when the schema object represents a google.protobuf.Any, and will replace the
+// Properties slice with a single value for '@type'. We mutate the incorrectly named field so that we inherit the same
+// documentation as specified on the original field in the protobuf descriptors.
+func transformAnyForJSON(schema *openapiSchemaObject, useJSONNames bool) {
+ var typeFieldName string
+ if useJSONNames {
+ typeFieldName = "typeUrl"
+ } else {
+ typeFieldName = "type_url"
+ }
+
+ for _, property := range *schema.Properties {
+ if property.Key == typeFieldName {
+ schema.AdditionalProperties = &openapiSchemaObject{}
+ schema.Properties = &openapiSchemaObjectProperties{keyVal{
+ Key: "@type",
+ Value: property.Value,
+ }}
+ break
+ }
+ }
+}
+
+func renderMessagesAsDefinition(messages messageMap, d openapiDefinitionsObject, reg *descriptor.Registry, customRefs refMap, pathParams []descriptor.Parameter) error {
for name, msg := range messages {
swgName, ok := fullyQualifiedNameToOpenAPIName(msg.FQMN(), reg)
if !ok {
- panic(fmt.Sprintf("can't resolve OpenAPI name from '%v'", msg.FQMN()))
+ return fmt.Errorf("can't resolve OpenAPI name from '%v'", msg.FQMN())
}
if skipRenderingRef(name) {
continue
@@ -473,22 +592,51 @@ func renderMessagesAsDefinition(messages messageMap, d openapiDefinitionsObject,
if opt := msg.GetOptions(); opt != nil && opt.MapEntry != nil && *opt.MapEntry {
continue
}
- d[swgName] = renderMessageAsDefinition(msg, reg, customRefs, excludeFields)
+ var err error
+ d[swgName], err = renderMessageAsDefinition(msg, reg, customRefs, pathParams)
+ if err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+// isVisible checks if a field/RPC is visible based on the visibility restriction
+// combined with the `visibility_restriction_selectors`.
+// Elements with an overlap on `visibility_restriction_selectors` are visible, those without are not visible.
+// Elements without `google.api.VisibilityRule` annotations entirely are always visible.
+func isVisible(r *visibility.VisibilityRule, reg *descriptor.Registry) bool {
+ if r == nil {
+ return true
+ }
+
+ restrictions := strings.Split(strings.TrimSpace(r.Restriction), ",")
+ // No restrictions results in the element always being visible
+ if len(restrictions) == 0 {
+ return true
+ }
+
+ for _, restriction := range restrictions {
+ if reg.GetVisibilityRestrictionSelectors()[strings.TrimSpace(restriction)] {
+ return true
+ }
}
+
+ return false
}
-func shouldExcludeField(name string, excluded []*descriptor.Field, reg *descriptor.Registry) bool {
- for _, f := range excluded {
- if name == reg.FieldName(f) {
+func shouldExcludeField(name string, excluded []descriptor.Parameter) bool {
+ for _, p := range excluded {
+ if len(p.FieldPath) == 1 && name == p.FieldPath[0].Name {
return true
}
}
return false
}
-func filterOutExcludedFields(fields []string, excluded []*descriptor.Field, reg *descriptor.Registry) []string {
+func filterOutExcludedFields(fields []string, excluded []descriptor.Parameter) []string {
var filtered []string
for _, f := range fields {
- if !shouldExcludeField(f, excluded, reg) {
+ if !shouldExcludeField(f, excluded) {
filtered = append(filtered, f)
}
}
@@ -508,7 +656,11 @@ func schemaOfField(f *descriptor.Field, reg *descriptor.Registry, refs refMap) o
)
fd := f.FieldDescriptorProto
- if m, err := reg.LookupMsg("", f.GetTypeName()); err == nil {
+ location := ""
+ if ix := strings.LastIndex(f.Message.FQMN(), "."); ix > 0 {
+ location = f.Message.FQMN()[0:ix]
+ }
+ if m, err := reg.LookupMsg(location, f.GetTypeName()); err == nil {
if opt := m.GetOptions(); opt != nil && opt.MapEntry != nil && *opt.MapEntry {
fd = m.GetField()[1]
aggregate = object
@@ -524,7 +676,6 @@ func schemaOfField(f *descriptor.Field, reg *descriptor.Registry, refs refMap) o
case descriptorpb.FieldDescriptorProto_TYPE_ENUM, descriptorpb.FieldDescriptorProto_TYPE_MESSAGE, descriptorpb.FieldDescriptorProto_TYPE_GROUP:
if wktSchema, ok := wktSchemas[fd.GetTypeName()]; ok {
core = wktSchema
-
if fd.GetTypeName() == ".google.protobuf.Empty" {
props = &openapiSchemaObjectProperties{}
}
@@ -556,7 +707,7 @@ func schemaOfField(f *descriptor.Field, reg *descriptor.Registry, refs refMap) o
ret = openapiSchemaObject{
schemaCore: schemaCore{
Type: "array",
- Items: (*openapiItemsObject)(&core),
+ Items: (*openapiItemsObject)(&openapiSchemaObject{schemaCore: core}),
},
}
case object:
@@ -578,7 +729,17 @@ func schemaOfField(f *descriptor.Field, reg *descriptor.Registry, refs refMap) o
}
if j, err := getFieldBehaviorOption(reg, f); err == nil {
- updateSwaggerObjectFromFieldBehavior(&ret, j, f)
+ updateSwaggerObjectFromFieldBehavior(&ret, j, reg, f)
+ }
+
+ for i, required := range ret.Required {
+ if required == f.GetName() {
+ ret.Required[i] = reg.FieldName(f)
+ }
+ }
+
+ if reg.GetProto3OptionalNullable() && f.GetProto3Optional() {
+ ret.XNullable = true
}
return ret
@@ -639,13 +800,13 @@ func renderEnumerationsAsDefinition(enums enumMap, d openapiDefinitionsObject, r
for _, enum := range enums {
swgName, ok := fullyQualifiedNameToOpenAPIName(enum.FQEN(), reg)
if !ok {
- panic(fmt.Sprintf("can't resolve OpenAPI name from FQEN '%v'", enum.FQEN()))
+ panic(fmt.Sprintf("can't resolve OpenAPI name from FQEN %q", enum.FQEN()))
}
enumComments := protoComments(reg, enum.File, enum.Outers, "EnumType", int32(enum.Index))
// it may be necessary to sort the result of the GetValue function.
- enumNames := listEnumNames(enum)
- defaultValue := getEnumDefault(enum)
+ enumNames := listEnumNames(reg, enum)
+ defaultValue := getEnumDefault(reg, enum)
valueComments := enumValueProtoComments(reg, enum)
if valueComments != "" {
enumComments = strings.TrimLeft(enumComments+"\n\n "+valueComments, "\n")
@@ -661,7 +822,7 @@ func renderEnumerationsAsDefinition(enums enumMap, d openapiDefinitionsObject, r
enumSchemaObject.Type = "integer"
enumSchemaObject.Format = "int32"
enumSchemaObject.Default = "0"
- enumSchemaObject.Enum = listEnumNumbers(enum)
+ enumSchemaObject.Enum = listEnumNumbers(reg, enum)
}
if err := updateOpenAPIDataFromComments(reg, &enumSchemaObject, enum, enumComments, false); err != nil {
panic(err)
@@ -680,7 +841,7 @@ func fullyQualifiedNameToOpenAPIName(fqn string, reg *descriptor.Registry) (stri
ret, ok := mapping[fqn]
return ret, ok
}
- mapping := resolveFullyQualifiedNameToOpenAPINames(append(reg.GetAllFQMNs(), reg.GetAllFQENs()...), reg.GetUseFQNForOpenAPIName())
+ mapping := resolveFullyQualifiedNameToOpenAPINames(append(reg.GetAllFQMNs(), reg.GetAllFQENs()...), reg.GetOpenAPINamingStrategy())
registriesSeen[reg] = mapping
ret, ok := mapping[fqn]
return ret, ok
@@ -705,65 +866,20 @@ func lookupMsgAndOpenAPIName(location, name string, reg *descriptor.Registry) (*
var registriesSeen = map[*descriptor.Registry]map[string]string{}
var registriesSeenMutex sync.Mutex
-// Take the names of every proto and "uniq-ify" them. The idea is to produce a
-// set of names that meet a couple of conditions. They must be stable, they
-// must be unique, and they must be shorter than the FQN.
-//
-// This likely could be made better. This will always generate the same names
-// but may not always produce optimal names. This is a reasonably close
-// approximation of what they should look like in most cases.
-func resolveFullyQualifiedNameToOpenAPINames(messages []string, useFQNForOpenAPIName bool) map[string]string {
- packagesByDepth := make(map[int][][]string)
- uniqueNames := make(map[string]string)
-
- hierarchy := func(pkg string) []string {
- return strings.Split(pkg, ".")
- }
-
- for _, p := range messages {
- h := hierarchy(p)
- for depth := range h {
- if _, ok := packagesByDepth[depth]; !ok {
- packagesByDepth[depth] = make([][]string, 0)
- }
- packagesByDepth[depth] = append(packagesByDepth[depth], h[len(h)-depth:])
- }
- }
-
- count := func(list [][]string, item []string) int {
- i := 0
- for _, element := range list {
- if reflect.DeepEqual(element, item) {
- i++
- }
- }
- return i
- }
-
- for _, p := range messages {
- if useFQNForOpenAPIName {
- // strip leading dot from proto fqn
- uniqueNames[p] = p[1:]
- } else {
- h := hierarchy(p)
- for depth := 0; depth < len(h); depth++ {
- if count(packagesByDepth[depth], h[len(h)-depth:]) == 1 {
- uniqueNames[p] = strings.Join(h[len(h)-depth-1:], "")
- break
- }
- if depth == len(h)-1 {
- uniqueNames[p] = strings.Join(h, "")
- }
- }
- }
+// Take the names of every proto message and generate a unique reference for each, according to the given strategy.
+func resolveFullyQualifiedNameToOpenAPINames(messages []string, namingStrategy string) map[string]string {
+ strategyFn := LookupNamingStrategy(namingStrategy)
+ if strategyFn == nil {
+ return nil
}
- return uniqueNames
+ return strategyFn(messages)
}
-var canRegexp = regexp.MustCompile("{([a-zA-Z][a-zA-Z0-9_.]*).*}")
+var canRegexp = regexp.MustCompile("{([a-zA-Z][a-zA-Z0-9_.]*)([^}]*)}")
-// OpenAPI expects paths of the form /path/{string_value} but gRPC-Gateway paths are expected to be of the form /path/{string_value=strprefix/*}. This should reformat it correctly.
-func templateToOpenAPIPath(path string, reg *descriptor.Registry, fields []*descriptor.Field, msgs []*descriptor.Message) string {
+// templateToParts will split a URL template as defined by https://github.com/googleapis/googleapis/blob/master/google/api/http.proto
+// into a string slice with each part as an element of the slice for use by `partsToOpenAPIPath` and `partsToRegexpMap`.
+func templateToParts(path string, reg *descriptor.Registry, fields []*descriptor.Field, msgs []*descriptor.Message) []string {
// It seems like the right thing to do here is to just use
// strings.Split(path, "/") but that breaks badly when you hit a url like
// /{my_field=prefix/*}/ and end up with 2 sections representing my_field.
@@ -773,7 +889,8 @@ func templateToOpenAPIPath(path string, reg *descriptor.Registry, fields []*desc
depth := 0
buffer := ""
jsonBuffer := ""
- for _, char := range path {
+pathLoop:
+ for i, char := range path {
switch char {
case '{':
// Push on the stack
@@ -806,6 +923,16 @@ func templateToOpenAPIPath(path string, reg *descriptor.Registry, fields []*desc
}
buffer += string(char)
jsonBuffer += string(char)
+ case ':':
+ if depth == 0 {
+ // As soon as we find a ":" outside a variable,
+ // everything following is a verb
+ parts = append(parts, buffer)
+ buffer = path[i:]
+ break pathLoop
+ }
+ buffer += string(char)
+ jsonBuffer += string(char)
default:
buffer += string(char)
jsonBuffer += string(char)
@@ -815,44 +942,87 @@ func templateToOpenAPIPath(path string, reg *descriptor.Registry, fields []*desc
// Now append the last element to parts
parts = append(parts, buffer)
- // Parts is now an array of segments of the path. Interestingly, since the
- // syntax for this subsection CAN be handled by a regexp since it has no
- // memory.
+ return parts
+}
+
+// partsToOpenAPIPath converts each path part of the form /path/{string_value=strprefix/*} which is defined in
+// https://github.com/googleapis/googleapis/blob/master/google/api/http.proto to the OpenAPI expected form /path/{string_value}.
+// For example this would replace the path segment of "{foo=bar/*}" with "{foo}" or "prefix{bang=bash/**}" with "prefix{bang}".
+// OpenAPI 2 only allows simple path parameters with the constraints on that parameter specified in the OpenAPI
+// schema's "pattern" instead of in the path parameter itself.
+func partsToOpenAPIPath(parts []string, overrides map[string]string) string {
for index, part := range parts {
- // If part is a resource name such as "parent", "name", "user.name", the format info must be retained.
- prefix := canRegexp.ReplaceAllString(part, "$1")
- if isResourceName(prefix) {
- continue
+ part = canRegexp.ReplaceAllString(part, "{$1}")
+ if override, ok := overrides[part]; ok {
+ part = override
}
- parts[index] = canRegexp.ReplaceAllString(part, "{$1}")
+ parts[index] = part
+ }
+ if last := len(parts) - 1; strings.HasPrefix(parts[last], ":") {
+ // Last item is a verb (":" LITERAL).
+ return strings.Join(parts[:last], "/") + parts[last]
}
-
return strings.Join(parts, "/")
}
-func isResourceName(prefix string) bool {
- words := strings.Split(prefix, ".")
- l := len(words)
- field := words[l-1]
- words = strings.Split(field, ":")
- field = words[0]
- return field == "parent" || field == "name"
+// partsToRegexpMap returns a map of parameter name to ECMA 262 patterns
+// which is what the "pattern" field on an OpenAPI parameter expects.
+// See https://swagger.io/specification/v2/ (Parameter Object) and
+// https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3.
+// The expression is generated based on expressions defined by https://github.com/googleapis/googleapis/blob/master/google/api/http.proto
+// "Path Template Syntax" section which allow for a "param_name=foobar/*/bang/**" style expressions inside
+// the path parameter placeholders that indicate constraints on the values of those parameters.
+// This function will scan the split parts of a path template for parameters and
+// outputs a map of the name of the parameter to a ECMA regular expression. See the http.proto file for descriptions
+// of the supported syntax. This function will ignore any path parameters that don't contain a "=" after the
+// parameter name. For supported parameters, we assume "*" represent all characters except "/" as it's
+// intended to match a single path element and we assume "**" matches any character as it's intended to match multiple
+// path elements.
+// For example "{name=organizations/*/roles/*}" would produce the regular expression for the "name" parameter of
+// "organizations/[^/]+/roles/[^/]+" or "{bar=bing/*/bang/**}" would produce the regular expression for the "bar"
+// parameter of "bing/[^/]+/bang/.+".
+//
+// Note that OpenAPI does not actually support path parameters with "/", see https://github.com/OAI/OpenAPI-Specification/issues/892
+func partsToRegexpMap(parts []string) map[string]string {
+ regExps := make(map[string]string)
+ for _, part := range parts {
+ if strings.Contains(part, "/") {
+ glog.Warningf("Path parameter %q contains '/', which is not supported in OpenAPI", part)
+ }
+ if submatch := canRegexp.FindStringSubmatch(part); len(submatch) > 2 {
+ if strings.HasPrefix(submatch[2], "=") { // this part matches the standard and should be made into a regular expression
+ // assume the string's characters other than "**" and "*" are literals (not necessarily a good assumption 100% of the times, but it will support most use cases)
+ regex := submatch[2][1:]
+ regex = strings.ReplaceAll(regex, "**", ".+") // ** implies any character including "/"
+ regex = strings.ReplaceAll(regex, "*", "[^/]+") // * implies any character except "/"
+ regExps[submatch[1]] = regex
+ }
+ }
+ }
+ return regExps
}
-func renderServiceTags(services []*descriptor.Service) []openapiTagObject {
+func renderServiceTags(services []*descriptor.Service, reg *descriptor.Registry) []openapiTagObject {
var tags []openapiTagObject
for _, svc := range services {
+ if !isVisible(getServiceVisibilityOption(svc), reg) {
+ continue
+ }
+ tagName := svc.GetName()
+ if pkg := svc.File.GetPackage(); pkg != "" && reg.IsIncludePackageInTags() {
+ tagName = pkg + "." + tagName
+ }
+
tag := openapiTagObject{
- Name: *svc.Name,
+ Name: tagName,
}
- if proto.HasExtension(svc.Options, openapi_options.E_Openapiv2Tag) {
- ext := proto.GetExtension(svc.Options, openapi_options.E_Openapiv2Tag)
- opts, ok := ext.(*openapi_options.Tag)
- if !ok {
- glog.Errorf("extension is %T; want an OpenAPI Tag object", ext)
- return nil
- }
+ opts, err := getServiceOpenAPIOption(reg, svc)
+ if err != nil {
+ glog.Error(err)
+ return nil
+ }
+ if opts != nil {
tag.Description = opts.Description
if opts.ExternalDocs != nil {
tag.ExternalDocs = &openapiExternalDocumentationObject{
@@ -875,29 +1045,47 @@ func renderServices(services []*descriptor.Service, paths openapiPathsObject, re
lastFile = svc.File
svcBaseIdx = svcIdx
}
+
+ if !isVisible(getServiceVisibilityOption(svc), reg) {
+ continue
+ }
+
for methIdx, meth := range svc.Methods {
+ if !isVisible(getMethodVisibilityOption(meth), reg) {
+ continue
+ }
+
for bIdx, b := range meth.Bindings {
+ operationFunc := operationForMethod(b.HTTPMethod)
// Iterate over all the OpenAPI parameters
parameters := openapiParametersObject{}
+ // split the path template into its parts
+ parts := templateToParts(b.PathTmpl.Template, reg, meth.RequestType.Fields, msgs)
+ // extract any constraints specified in the path placeholders into ECMA regular expressions
+ pathParamRegexpMap := partsToRegexpMap(parts)
+ // Keep track of path parameter overrides
+ var pathParamNames = make(map[string]string)
for _, parameter := range b.PathParams {
var paramType, paramFormat, desc, collectionFormat, defaultValue string
var enumNames []string
var items *openapiItemsObject
var minItems *int
+ var extensions []extension
switch pt := parameter.Target.GetType(); pt {
case descriptorpb.FieldDescriptorProto_TYPE_GROUP, descriptorpb.FieldDescriptorProto_TYPE_MESSAGE:
if descriptor.IsWellKnownType(parameter.Target.GetTypeName()) {
if parameter.IsRepeated() {
- return fmt.Errorf("only primitive and enum types are allowed in repeated path parameters")
+ return errors.New("only primitive and enum types are allowed in repeated path parameters")
}
schema := schemaOfField(parameter.Target, reg, customRefs)
paramType = schema.Type
paramFormat = schema.Format
desc = schema.Description
defaultValue = schema.Default
+ extensions = schema.extensions
} else {
- return fmt.Errorf("only primitive and well-known types are allowed in path parameters")
+ return errors.New("only primitive and well-known types are allowed in path parameters")
}
case descriptorpb.FieldDescriptorProto_TYPE_ENUM:
enum, err := reg.LookupEnum("", parameter.Target.GetTypeName())
@@ -906,15 +1094,16 @@ func renderServices(services []*descriptor.Service, paths openapiPathsObject, re
}
paramType = "string"
paramFormat = ""
- enumNames = listEnumNames(enum)
+ enumNames = listEnumNames(reg, enum)
if reg.GetEnumsAsInts() {
paramType = "integer"
paramFormat = ""
- enumNames = listEnumNumbers(enum)
+ enumNames = listEnumNumbers(reg, enum)
}
schema := schemaOfField(parameter.Target, reg, customRefs)
desc = schema.Description
defaultValue = schema.Default
+ extensions = schema.extensions
default:
var ok bool
paramType, paramFormat, ok = primitiveSchema(pt)
@@ -925,6 +1114,7 @@ func renderServices(services []*descriptor.Service, paths openapiPathsObject, re
schema := schemaOfField(parameter.Target, reg, customRefs)
desc = schema.Description
defaultValue = schema.Default
+ extensions = schema.extensions
}
if parameter.IsRepeated() {
@@ -934,7 +1124,7 @@ func renderServices(services []*descriptor.Service, paths openapiPathsObject, re
core.Enum = enumNames
enumNames = s
}
- items = (*openapiItemsObject)(&core)
+ items = (*openapiItemsObject)(&openapiSchemaObject{schemaCore: core})
paramType = "array"
paramFormat = ""
collectionFormat = reg.GetRepeatedPathParamSeparatorName()
@@ -949,6 +1139,17 @@ func renderServices(services []*descriptor.Service, paths openapiPathsObject, re
if reg.GetUseJSONNamesForFields() {
parameterString = lowerCamelCase(parameterString, meth.RequestType.Fields, msgs)
}
+ var pattern string
+ if regExp, ok := pathParamRegexpMap[parameterString]; ok {
+ pattern = regExp
+ }
+ if fc := getFieldConfiguration(reg, parameter.Target); fc != nil {
+ pathParamName := fc.GetPathParamName()
+ if pathParamName != "" && pathParamName != parameterString {
+ pathParamNames["{"+parameterString+"}"] = "{" + pathParamName + "}"
+ parameterString = pathParamName
+ }
+ }
parameters = append(parameters, openapiParameterObject{
Name: parameterString,
Description: desc,
@@ -962,55 +1163,71 @@ func renderServices(services []*descriptor.Service, paths openapiPathsObject, re
Items: items,
CollectionFormat: collectionFormat,
MinItems: minItems,
+ Pattern: pattern,
+ extensions: extensions,
})
}
// Now check if there is a body parameter
if b.Body != nil {
+ // Recursively render fields as definitions as long as they contain path parameters.
+ // Special case for top level body if we don't have a body field.
var schema openapiSchemaObject
desc := ""
-
+ var bodyFieldName string
+ schema = openapiSchemaObject{
+ schemaCore: schemaCore{},
+ }
if len(b.Body.FieldPath) == 0 {
- schema = openapiSchemaObject{
- schemaCore: schemaCore{},
- }
-
+ // No field for body, use type.
+ bodyFieldName = "body"
wknSchemaCore, isWkn := wktSchemas[meth.RequestType.FQMN()]
- if !isWkn {
- var bodyExcludedFields []*descriptor.Field
- if len(b.PathParams) != 0 {
- for _, p := range b.PathParams {
- // We only support excluding top-level fields captured by path parameters.
- if len(p.FieldPath) == 1 {
- bodyExcludedFields = append(bodyExcludedFields, p.FieldPath[0].Target)
- }
- }
- }
- if len(bodyExcludedFields) != 0 {
- schema = renderMessageAsDefinition(meth.RequestType, reg, customRefs, bodyExcludedFields)
- if schema.Properties == nil || len(*schema.Properties) == 0 {
- glog.Errorf("created a body with 0 properties in the message, this might be unintended: %s", *meth.RequestType)
- }
- } else {
- err := schema.setRefFromFQN(meth.RequestType.FQMN(), reg)
- if err != nil {
- return err
- }
- }
- } else {
+ if isWkn {
schema.schemaCore = wknSchemaCore
-
// Special workaround for Empty: it's well-known type but wknSchemas only returns schema.schemaCore; but we need to set schema.Properties which is a level higher.
if meth.RequestType.FQMN() == ".google.protobuf.Empty" {
schema.Properties = &openapiSchemaObjectProperties{}
}
+ } else {
+ messageSchema, err := renderMessageAsDefinition(meth.RequestType, reg, customRefs, b.PathParams)
+ if err != nil {
+ return err
+ }
+ if len(b.PathParams) == 0 {
+ if err := schema.setRefFromFQN(meth.RequestType.FQMN(), reg); err != nil {
+ return err
+ }
+ desc = messageSchema.Description
+ } else {
+ schema = messageSchema
+ if schema.Properties == nil || len(*schema.Properties) == 0 {
+ glog.Warningf("created a body with 0 properties in the message, this might be unintended: %s", *meth.RequestType)
+ }
+ }
}
} else {
- lastField := b.Body.FieldPath[len(b.Body.FieldPath)-1]
- schema = schemaOfField(lastField.Target, reg, customRefs)
- if schema.Description != "" {
- desc = schema.Description
+ // Body field path is limited to one path component. From google.api.HttpRule.body:
+ // "NOTE: the referred field must be present at the top-level of the request message type."
+ // Ref: https://github.com/googleapis/googleapis/blob/b3397f5febbf21dfc69b875ddabaf76bee765058/google/api/http.proto#L350-L352
+ if len(b.Body.FieldPath) > 1 {
+ return fmt.Errorf("Body of request %q is not a top level field: '%v'.", meth.Service.GetName(), b.Body.FieldPath)
+ }
+ bodyField := b.Body.FieldPath[0]
+ if reg.GetUseJSONNamesForFields() {
+ bodyFieldName = lowerCamelCase(bodyField.Name, meth.RequestType.Fields, msgs)
} else {
- desc = fieldProtoComments(reg, lastField.Target.Message, lastField.Target)
+ bodyFieldName = bodyField.Name
+ }
+ // Align pathParams with body field path.
+ pathParams := subPathParams(bodyField.Name, b.PathParams)
+ var err error
+ schema, err = renderFieldAsDefinition(bodyField.Target, reg, customRefs, pathParams)
+ if err != nil {
+ return err
+ }
+ if schema.Title != "" {
+ desc = mergeDescription(schema)
+ } else {
+ desc = fieldProtoComments(reg, bodyField.Target.Message, bodyField.Target)
}
}
@@ -1018,30 +1235,67 @@ func renderServices(services []*descriptor.Service, paths openapiPathsObject, re
desc += " (streaming inputs)"
}
parameters = append(parameters, openapiParameterObject{
- Name: "body",
+ Name: bodyFieldName,
Description: desc,
In: "body",
Required: true,
Schema: &schema,
})
- // add the parameters to the query string
- queryParams, err := messageToQueryParameters(meth.RequestType, reg, b.PathParams, b.Body)
- if err != nil {
- return err
- }
- parameters = append(parameters, queryParams...)
- } else if b.HTTPMethod == "GET" || b.HTTPMethod == "DELETE" {
- // add the parameters to the query string
- queryParams, err := messageToQueryParameters(meth.RequestType, reg, b.PathParams, b.Body)
- if err != nil {
- return err
- }
- parameters = append(parameters, queryParams...)
}
- pathItemObject, ok := paths[templateToOpenAPIPath(b.PathTmpl.Template, reg, meth.RequestType.Fields, msgs)]
+ // add the parameters to the query string
+ queryParams, err := messageToQueryParameters(meth.RequestType, reg, b.PathParams, b.Body)
+ if err != nil {
+ return err
+ }
+ parameters = append(parameters, queryParams...)
+
+ path := partsToOpenAPIPath(parts, pathParamNames)
+ pathItemObject, ok := paths[path]
if !ok {
pathItemObject = openapiPathItemObject{}
+ } else {
+ // handle case where we have an existing mapping for the same path and method
+ existingOperationObject := operationFunc(&pathItemObject)
+ if existingOperationObject != nil {
+ var firstPathParameter *openapiParameterObject
+ var firstParamIndex int
+ for index, param := range parameters {
+ if param.In == "path" {
+ firstPathParameter = ¶m
+ firstParamIndex = index
+ break
+ }
+ }
+ if firstPathParameter == nil {
+ // Without a path parameter, there is nothing to vary to support multiple mappings of the same path/method.
+ // Previously this did not log an error and only overwrote the mapping, we now log the error but
+ // still overwrite the mapping
+ glog.Errorf("Duplicate mapping for path %s %s", b.HTTPMethod, path)
+ } else {
+ newPathCount := 0
+ var newPath string
+ var newPathElement string
+ // Iterate until there is not an existing operation that matches the same escaped path.
+ // Most of the time this will only be a single iteration, but a large API could technically have
+ // a pretty large amount of these if it used similar patterns for all its functions.
+ for existingOperationObject != nil {
+ newPathCount += 1
+ newPathElement = firstPathParameter.Name + pathParamUniqueSuffixDeliminator + strconv.Itoa(newPathCount)
+ newPath = strings.ReplaceAll(path, "{"+firstPathParameter.Name+"}", "{"+newPathElement+"}")
+ if newPathItemObject, ok := paths[newPath]; ok {
+ existingOperationObject = operationFunc(&newPathItemObject)
+ } else {
+ existingOperationObject = nil
+ }
+ }
+ // update the pathItemObject we are adding to with the new path
+ pathItemObject = paths[newPath]
+ firstPathParameter.Name = newPathElement
+ path = newPath
+ parameters[firstParamIndex] = *firstPathParameter
+ }
+ }
}
methProtoPath := protoPathIndex(reflect.TypeOf((*descriptorpb.ServiceDescriptorProto)(nil)), "Method")
@@ -1059,8 +1313,7 @@ func renderServices(services []*descriptor.Service, paths openapiPathsObject, re
// well, without a definition
wknSchemaCore, isWkn := wktSchemas[meth.ResponseType.FQMN()]
if !isWkn {
- err := responseSchema.setRefFromFQN(meth.ResponseType.FQMN(), reg)
- if err != nil {
+ if err := responseSchema.setRefFromFQN(meth.ResponseType.FQMN(), reg); err != nil {
return err
}
} else {
@@ -1111,22 +1364,27 @@ func renderServices(services []*descriptor.Service, paths openapiPathsObject, re
responseSchema.Ref = ""
}
- tag := svc.GetName()
- if pkg := svc.File.GetPackage(); pkg != "" && reg.IsIncludePackageInTags() {
- tag = pkg + "." + tag
- }
-
operationObject := &openapiOperationObject{
- Tags: []string{tag},
Parameters: parameters,
- Responses: openapiResponsesObject{
- "200": openapiResponseObject{
- Description: desc,
- Schema: responseSchema,
- Headers: openapiHeadersObject{},
- },
- },
+ Responses: openapiResponsesObject{},
+ }
+
+ if !reg.GetDisableDefaultResponses() {
+ operationObject.Responses["200"] = openapiResponseObject{
+ Description: desc,
+ Schema: responseSchema,
+ Headers: openapiHeadersObject{},
+ }
}
+
+ if !reg.GetDisableServiceTags() {
+ tag := svc.GetName()
+ if pkg := svc.File.GetPackage(); pkg != "" && reg.IsIncludePackageInTags() {
+ tag = pkg + "." + tag
+ }
+ operationObject.Tags = []string{tag}
+ }
+
if !reg.GetDisableDefaultErrors() {
errDef, hasErrDef := fullyQualifiedNameToOpenAPIName(".google.rpc.Status", reg)
if hasErrDef {
@@ -1246,11 +1504,43 @@ func renderServices(services []*descriptor.Service, paths openapiPathsObject, re
operationObject.extensions = exts
}
+ if len(opts.Consumes) > 0 {
+ operationObject.Consumes = make([]string, len(opts.Consumes))
+ copy(operationObject.Consumes, opts.Consumes)
+ }
+
if len(opts.Produces) > 0 {
operationObject.Produces = make([]string, len(opts.Produces))
copy(operationObject.Produces, opts.Produces)
}
+ if params := opts.Parameters; params != nil && len(params.Headers) > 0 {
+ for _, header := range params.Headers {
+ param := openapiParameterObject{
+ In: "header",
+ Name: header.Name,
+ Description: header.Description,
+ Required: header.Required,
+ Format: header.Format,
+ }
+
+ switch header.Type {
+ case openapi_options.HeaderParameter_STRING:
+ param.Type = "string"
+ case openapi_options.HeaderParameter_NUMBER:
+ param.Type = "number"
+ case openapi_options.HeaderParameter_INTEGER:
+ param.Type = "integer"
+ case openapi_options.HeaderParameter_BOOLEAN:
+ param.Type = "boolean"
+ default:
+ return fmt.Errorf("invalid header parameter type: %+v", header.Type)
+ }
+
+ operationObject.Parameters = append(operationObject.Parameters, param)
+ }
+ }
+
// TODO(ivucica): add remaining fields of operation object
}
@@ -1265,8 +1555,12 @@ func renderServices(services []*descriptor.Service, paths openapiPathsObject, re
pathItemObject.Put = operationObject
case "PATCH":
pathItemObject.Patch = operationObject
+ case "HEAD":
+ pathItemObject.Head = operationObject
+ case "OPTIONS":
+ pathItemObject.Options = operationObject
}
- paths[templateToOpenAPIPath(b.PathTmpl.Template, reg, meth.RequestType.Fields, msgs)] = pathItemObject
+ paths[path] = pathItemObject
}
}
}
@@ -1275,6 +1569,35 @@ func renderServices(services []*descriptor.Service, paths openapiPathsObject, re
return nil
}
+func mergeDescription(schema openapiSchemaObject) string {
+ desc := schema.Description
+ if schema.Title != "" { // join title because title of parameter object will be ignored
+ desc = strings.TrimSpace(schema.Title + paragraphDeliminator + schema.Description)
+ }
+ return desc
+}
+
+func operationForMethod(httpMethod string) func(*openapiPathItemObject) *openapiOperationObject {
+ switch httpMethod {
+ case "GET":
+ return func(obj *openapiPathItemObject) *openapiOperationObject { return obj.Get }
+ case "POST":
+ return func(obj *openapiPathItemObject) *openapiOperationObject { return obj.Post }
+ case "PUT":
+ return func(obj *openapiPathItemObject) *openapiOperationObject { return obj.Put }
+ case "DELETE":
+ return func(obj *openapiPathItemObject) *openapiOperationObject { return obj.Delete }
+ case "PATCH":
+ return func(obj *openapiPathItemObject) *openapiOperationObject { return obj.Patch }
+ case "HEAD":
+ return func(obj *openapiPathItemObject) *openapiOperationObject { return obj.Head }
+ case "OPTIONS":
+ return func(obj *openapiPathItemObject) *openapiOperationObject { return obj.Options }
+ default:
+ return func(obj *openapiPathItemObject) *openapiOperationObject { return nil }
+ }
+}
+
// This function is called with a param which contains the entire definition of a method.
func applyTemplate(p param) (*openapiSwaggerObject, error) {
// Create the basic template object. This is the object that everything is
@@ -1299,7 +1622,10 @@ func applyTemplate(p param) (*openapiSwaggerObject, error) {
if err := renderServices(p.Services, s.Paths, p.reg, requestResponseRefs, customRefs, p.Messages); err != nil {
panic(err)
}
- s.Tags = append(s.Tags, renderServiceTags(p.Services)...)
+
+ if !p.reg.GetDisableServiceTags() {
+ s.Tags = append(s.Tags, renderServiceTags(p.Services, p.reg)...)
+ }
messages := messageMap{}
streamingMessages := messageMap{}
@@ -1319,20 +1645,22 @@ func applyTemplate(p param) (*openapiSwaggerObject, error) {
// Find all the service's messages and enumerations that are defined (recursively)
// and write request, response and other custom (but referenced) types out as definition objects.
findServicesMessagesAndEnumerations(p.Services, p.reg, messages, streamingMessages, enums, requestResponseRefs)
- renderMessagesAsDefinition(messages, s.Definitions, p.reg, customRefs, nil)
+ if err := renderMessagesAsDefinition(messages, s.Definitions, p.reg, customRefs, nil); err != nil {
+ return nil, err
+ }
renderEnumerationsAsDefinition(enums, s.Definitions, p.reg)
// File itself might have some comments and metadata.
packageProtoPath := protoPathIndex(reflect.TypeOf((*descriptorpb.FileDescriptorProto)(nil)), "Package")
packageComments := protoComments(p.reg, p.File, nil, "Package", packageProtoPath)
if err := updateOpenAPIDataFromComments(p.reg, &s, p, packageComments, true); err != nil {
- panic(err)
+ return nil, err
}
// There may be additional options in the OpenAPI option in the proto.
spb, err := getFileOpenAPIOption(p.reg, p.File)
if err != nil {
- panic(err)
+ return nil, err
}
if spb != nil {
if spb.Swagger != "" {
@@ -1540,19 +1868,43 @@ func applyTemplate(p param) (*openapiSwaggerObject, error) {
s.extensions = exts
}
+ if spb.Tags != nil {
+ for _, v := range spb.Tags {
+ newTag := openapiTagObject{}
+ newTag.Name = v.Name
+ newTag.Description = v.Description
+ if v.ExternalDocs != nil {
+ newTag.ExternalDocs = &openapiExternalDocumentationObject{
+ Description: v.ExternalDocs.Description,
+ URL: v.ExternalDocs.Url,
+ }
+ }
+ if v.Extensions != nil {
+ exts, err := processExtensions(v.Extensions)
+ if err != nil {
+ return nil, err
+ }
+ newTag.extensions = exts
+ }
+ s.Tags = append(s.Tags, newTag)
+ }
+ }
+
// Additional fields on the OpenAPI v2 spec's "OpenAPI" object
// should be added here, once supported in the proto.
}
// Finally add any references added by users that aren't
// otherwise rendered.
- addCustomRefs(s.Definitions, p.reg, customRefs)
+ if err := addCustomRefs(s.Definitions, p.reg, customRefs); err != nil {
+ return nil, err
+ }
return &s, nil
}
func processExtensions(inputExts map[string]*structpb.Value) ([]extension, error) {
- exts := []extension{}
+ exts := make([]extension, 0, len(inputExts))
for k, v := range inputExts {
if !strings.HasPrefix(k, "x-") {
return nil, fmt.Errorf("extension keys need to start with \"x-\": %q", k)
@@ -1567,7 +1919,7 @@ func processExtensions(inputExts map[string]*structpb.Value) ([]extension, error
return exts, nil
}
-func validateHeaderTypeAndFormat(headerType string, format string) error {
+func validateHeaderTypeAndFormat(headerType, format string) error {
// The type of the object. The value MUST be one of "string", "number", "integer", "boolean", or "array"
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#headerObject
// Note: currently not implementing array as we are only implementing this in the operation response context
@@ -1635,50 +1987,40 @@ func validateDefaultValueTypeAndFormat(headerType string, defaultValue string, f
switch format {
case "date-time":
unquoteTime := strings.Trim(defaultValue, `"`)
- _, err := time.Parse(time.RFC3339, unquoteTime)
- if err != nil {
+ if _, err := time.Parse(time.RFC3339, unquoteTime); err != nil {
return fmt.Errorf("the provided default value %q is not a valid RFC3339 date-time string", defaultValue)
}
case "date":
- const (
- layoutRFC3339Date = "2006-01-02"
- )
+ const layoutRFC3339Date = "2006-01-02"
unquoteDate := strings.Trim(defaultValue, `"`)
- _, err := time.Parse(layoutRFC3339Date, unquoteDate)
- if err != nil {
+ if _, err := time.Parse(layoutRFC3339Date, unquoteDate); err != nil {
return fmt.Errorf("the provided default value %q is not a valid RFC3339 date-time string", defaultValue)
}
}
case "number":
- err := isJSONNumber(defaultValue, headerType)
- if err != nil {
+ if err := isJSONNumber(defaultValue, headerType); err != nil {
return err
}
case "integer":
switch format {
case "int32":
- _, err := strconv.ParseInt(defaultValue, 0, 32)
- if err != nil {
+ if _, err := strconv.ParseInt(defaultValue, 0, 32); err != nil {
return fmt.Errorf("the provided default value %q does not match provided format %q", defaultValue, format)
}
case "uint32":
- _, err := strconv.ParseUint(defaultValue, 0, 32)
- if err != nil {
+ if _, err := strconv.ParseUint(defaultValue, 0, 32); err != nil {
return fmt.Errorf("the provided default value %q does not match provided format %q", defaultValue, format)
}
case "int64":
- _, err := strconv.ParseInt(defaultValue, 0, 64)
- if err != nil {
+ if _, err := strconv.ParseInt(defaultValue, 0, 64); err != nil {
return fmt.Errorf("the provided default value %q does not match provided format %q", defaultValue, format)
}
case "uint64":
- _, err := strconv.ParseUint(defaultValue, 0, 64)
- if err != nil {
+ if _, err := strconv.ParseUint(defaultValue, 0, 64); err != nil {
return fmt.Errorf("the provided default value %q does not match provided format %q", defaultValue, format)
}
default:
- _, err := strconv.ParseInt(defaultValue, 0, 64)
- if err != nil {
+ if _, err := strconv.ParseInt(defaultValue, 0, 64); err != nil {
return fmt.Errorf("the provided default value %q does not match provided type %q", defaultValue, headerType)
}
}
@@ -1716,7 +2058,7 @@ func isBool(s string) bool {
}
func processHeaders(inputHdrs map[string]*openapi_options.Header) (openapiHeadersObject, error) {
- hdrs := map[string]openapiHeaderObject{}
+ hdrs := make(map[string]openapiHeaderObject, len(inputHdrs))
for k, v := range inputHdrs {
header := textproto.CanonicalMIMEHeaderKey(k)
ret := openapiHeaderObject{
@@ -1724,17 +2066,15 @@ func processHeaders(inputHdrs map[string]*openapi_options.Header) (openapiHeader
Format: v.Format,
Pattern: v.Pattern,
}
- err := validateHeaderTypeAndFormat(v.Type, v.Format)
- if err != nil {
+ if err := validateHeaderTypeAndFormat(v.Type, v.Format); err != nil {
return nil, err
}
ret.Type = v.Type
if v.Default != "" {
- err := validateDefaultValueTypeAndFormat(v.Type, v.Default, v.Format)
- if err != nil {
+ if err := validateDefaultValueTypeAndFormat(v.Type, v.Default, v.Format); err != nil {
return nil, err
}
- ret.Default = json.RawMessage(v.Default)
+ ret.Default = RawExample(v.Default)
}
hdrs[header] = ret
}
@@ -1787,13 +2127,13 @@ func updateOpenAPIDataFromComments(reg *descriptor.Registry, swaggerObject inter
usingTitle = true
}
- paragraphs := strings.Split(comment, "\n\n")
+ paragraphs := strings.Split(comment, paragraphDeliminator)
// If there is a summary (or summary-equivalent) and it's empty, use the first
// paragraph as summary, and the rest as description.
if summaryValue.CanSet() {
summary := strings.TrimSpace(paragraphs[0])
- description := strings.TrimSpace(strings.Join(paragraphs[1:], "\n\n"))
+ description := strings.TrimSpace(strings.Join(paragraphs[1:], paragraphDeliminator))
if !usingTitle || (len(summary) > 0 && summary[len(summary)-1] != '.') {
// overrides the schema value only if it's empty
// keep the comment precedence when updating the package definition
@@ -1802,7 +2142,7 @@ func updateOpenAPIDataFromComments(reg *descriptor.Registry, swaggerObject inter
}
if len(description) > 0 {
if !descriptionValue.CanSet() {
- return fmt.Errorf("encountered object type with a summary, but no description")
+ return errors.New("encountered object type with a summary, but no description")
}
// overrides the schema value only if it's empty
// keep the comment precedence when updating the package definition
@@ -1818,12 +2158,12 @@ func updateOpenAPIDataFromComments(reg *descriptor.Registry, swaggerObject inter
// whole comment into description if the OpenAPI object description is empty.
if descriptionValue.CanSet() {
if descriptionValue.Len() == 0 || isPackageObject {
- descriptionValue.Set(reflect.ValueOf(strings.Join(paragraphs, "\n\n")))
+ descriptionValue.Set(reflect.ValueOf(strings.Join(paragraphs, paragraphDeliminator)))
}
return nil
}
- return fmt.Errorf("no description nor summary property")
+ return errors.New("no description nor summary property")
}
func fieldProtoComments(reg *descriptor.Registry, msg *descriptor.Message, field *descriptor.Field) string {
@@ -1840,12 +2180,14 @@ func enumValueProtoComments(reg *descriptor.Registry, enum *descriptor.Enum) str
protoPath := protoPathIndex(reflect.TypeOf((*descriptorpb.EnumDescriptorProto)(nil)), "Value")
var comments []string
for idx, value := range enum.GetValue() {
+ if !isVisible(getEnumValueVisibilityOption(value), reg) {
+ continue
+ }
name := value.GetName()
if reg.GetEnumsAsInts() {
name = strconv.Itoa(int(value.GetNumber()))
}
- str := protoComments(reg, enum.File, enum.Outers, "EnumType", int32(enum.Index), protoPath, int32(idx))
- if str != "" {
+ if str := protoComments(reg, enum.File, enum.Outers, "EnumType", int32(enum.Index), protoPath, int32(idx)); str != "" {
comments = append(comments, name+": "+str)
}
}
@@ -1889,7 +2231,15 @@ func protoComments(reg *descriptor.Registry, file *descriptor.File, outers []str
// - determine if every (but first and last) line begins with " "
// - trim every line only if that is the case
// - join by \n
- comments = strings.Replace(comments, "\n ", "\n", -1)
+ comments = strings.ReplaceAll(comments, "\n ", "\n")
+ }
+ if loc.TrailingComments != nil {
+ trailing := strings.TrimSpace(*loc.TrailingComments)
+ if comments == "" {
+ comments = trailing
+ } else {
+ comments += "\n\n" + trailing
+ }
}
return comments
}
@@ -1901,7 +2251,7 @@ func goTemplateComments(comment string, data interface{}, reg *descriptor.Regist
tpl, err := template.New("").Funcs(template.FuncMap{
// Allows importing documentation from a file
"import": func(name string) string {
- file, err := ioutil.ReadFile(name)
+ file, err := os.ReadFile(name)
if err != nil {
return err.Error()
}
@@ -1910,7 +2260,7 @@ func goTemplateComments(comment string, data interface{}, reg *descriptor.Regist
},
// Grabs title and description from a field
"fieldcomments": func(msg *descriptor.Message, field *descriptor.Field) string {
- return strings.Replace(fieldProtoComments(reg, msg, field), "\n", "
", -1)
+ return strings.ReplaceAll(fieldProtoComments(reg, msg, field), "\n", "
")
},
}).Parse(comment)
if err != nil {
@@ -1918,8 +2268,7 @@ func goTemplateComments(comment string, data interface{}, reg *descriptor.Regist
// to make it easier to debug the template error
return err.Error()
}
- err = tpl.Execute(&temp, data)
- if err != nil {
+ if err := tpl.Execute(&temp, data); err != nil {
// If there is an error executing the templating insert the error as string in the comment
// to make it easier to debug the error
return err.Error()
@@ -1996,7 +2345,7 @@ func isProtoPathMatches(paths []int32, outerPaths []int32, typeName string, type
// For example, if we are trying to locate comments related to a field named
// `Address` in a message named `Person`, the path will be:
//
-// [4, a, 2, b]
+// [4, a, 2, b]
//
// While `a` gets determined by the order in which the messages appear in
// the proto file, and `b` is the field index specified in the proto
@@ -2064,6 +2413,23 @@ func extractSchemaOptionFromMessageDescriptor(msg *descriptorpb.DescriptorProto)
return opts, nil
}
+// extractTagOptionFromServiceDescriptor extracts the tag of type
+// openapi_options.Tag from a given proto service's descriptor.
+func extractTagOptionFromServiceDescriptor(svc *descriptorpb.ServiceDescriptorProto) (*openapi_options.Tag, error) {
+ if svc.Options == nil {
+ return nil, nil
+ }
+ if !proto.HasExtension(svc.Options, openapi_options.E_Openapiv2Tag) {
+ return nil, nil
+ }
+ ext := proto.GetExtension(svc.Options, openapi_options.E_Openapiv2Tag)
+ opts, ok := ext.(*openapi_options.Tag)
+ if !ok {
+ return nil, fmt.Errorf("extension is %T; want a Tag", ext)
+ }
+ return opts, nil
+}
+
// extractOpenAPIOptionFromFileDescriptor extracts the message of type
// openapi_options.OpenAPI from a given proto method's descriptor.
func extractOpenAPIOptionFromFileDescriptor(file *descriptorpb.FileDescriptorProto) (*openapi_options.Swagger, error) {
@@ -2111,6 +2477,66 @@ func extractFieldBehaviorFromFieldDescriptor(fd *descriptorpb.FieldDescriptorPro
return opts, nil
}
+func getFieldVisibilityOption(fd *descriptor.Field) *visibility.VisibilityRule {
+ if fd.Options == nil {
+ return nil
+ }
+ if !proto.HasExtension(fd.Options, visibility.E_FieldVisibility) {
+ return nil
+ }
+ ext := proto.GetExtension(fd.Options, visibility.E_FieldVisibility)
+ opts, ok := ext.(*visibility.VisibilityRule)
+ if !ok {
+ return nil
+ }
+ return opts
+}
+
+func getServiceVisibilityOption(fd *descriptor.Service) *visibility.VisibilityRule {
+ if fd.Options == nil {
+ return nil
+ }
+ if !proto.HasExtension(fd.Options, visibility.E_ApiVisibility) {
+ return nil
+ }
+ ext := proto.GetExtension(fd.Options, visibility.E_ApiVisibility)
+ opts, ok := ext.(*visibility.VisibilityRule)
+ if !ok {
+ return nil
+ }
+ return opts
+}
+
+func getMethodVisibilityOption(fd *descriptor.Method) *visibility.VisibilityRule {
+ if fd.Options == nil {
+ return nil
+ }
+ if !proto.HasExtension(fd.Options, visibility.E_MethodVisibility) {
+ return nil
+ }
+ ext := proto.GetExtension(fd.Options, visibility.E_MethodVisibility)
+ opts, ok := ext.(*visibility.VisibilityRule)
+ if !ok {
+ return nil
+ }
+ return opts
+}
+
+func getEnumValueVisibilityOption(fd *descriptorpb.EnumValueDescriptorProto) *visibility.VisibilityRule {
+ if fd.Options == nil {
+ return nil
+ }
+ if !proto.HasExtension(fd.Options, visibility.E_ValueVisibility) {
+ return nil
+ }
+ ext := proto.GetExtension(fd.Options, visibility.E_ValueVisibility)
+ opts, ok := ext.(*visibility.VisibilityRule)
+ if !ok {
+ return nil
+ }
+ return opts
+}
+
func getMethodOpenAPIOption(reg *descriptor.Registry, meth *descriptor.Method) (*openapi_options.Operation, error) {
opts, err := extractOperationOptionFromMethodDescriptor(meth.MethodDescriptorProto)
if err != nil {
@@ -2141,6 +2567,17 @@ func getMessageOpenAPIOption(reg *descriptor.Registry, msg *descriptor.Message)
return opts, nil
}
+func getServiceOpenAPIOption(reg *descriptor.Registry, svc *descriptor.Service) (*openapi_options.Tag, error) {
+ if opts, ok := reg.GetOpenAPIServiceOption(svc.FQSN()); ok {
+ return opts, nil
+ }
+ opts, err := extractTagOptionFromServiceDescriptor(svc.ServiceDescriptorProto)
+ if err != nil {
+ return nil, err
+ }
+ return opts, nil
+}
+
func getFileOpenAPIOption(reg *descriptor.Registry, file *descriptor.File) (*openapi_options.Swagger, error) {
opts, err := extractOpenAPIOptionFromFileDescriptor(file.FileDescriptorProto)
if err != nil {
@@ -2211,46 +2648,70 @@ func updateswaggerObjectFromJSONSchema(s *openapiSchemaObject, j *openapi_option
s.Title = goTemplateComments(s.Title, data, reg)
s.Description = goTemplateComments(s.Description, data, reg)
}
-
- s.ReadOnly = j.GetReadOnly()
- s.MultipleOf = j.GetMultipleOf()
- s.Maximum = j.GetMaximum()
- s.ExclusiveMaximum = j.GetExclusiveMaximum()
- s.Minimum = j.GetMinimum()
- s.ExclusiveMinimum = j.GetExclusiveMinimum()
- s.MaxLength = j.GetMaxLength()
- s.MinLength = j.GetMinLength()
- s.Pattern = j.GetPattern()
- s.Default = j.GetDefault()
+ if s.Type == "array" {
+ s.Items.MaxLength = j.GetMaxLength()
+ s.Items.MinLength = j.GetMinLength()
+ s.Items.Pattern = j.GetPattern()
+ s.Items.Default = j.GetDefault()
+ s.Items.UniqueItems = j.GetUniqueItems()
+ s.Items.MaxProperties = j.GetMaxProperties()
+ s.Items.MinProperties = j.GetMinProperties()
+ s.Items.Required = j.GetRequired()
+ s.Items.Minimum = j.GetMinimum()
+ s.Items.Maximum = j.GetMaximum()
+ s.Items.ReadOnly = j.GetReadOnly()
+ s.Items.MultipleOf = j.GetMultipleOf()
+ s.Items.ExclusiveMaximum = j.GetExclusiveMaximum()
+ s.Items.ExclusiveMinimum = j.GetExclusiveMinimum()
+ s.Items.Enum = j.GetEnum()
+ } else {
+ s.MaxLength = j.GetMaxLength()
+ s.MinLength = j.GetMinLength()
+ s.Pattern = j.GetPattern()
+ s.Default = j.GetDefault()
+ s.UniqueItems = j.GetUniqueItems()
+ s.MaxProperties = j.GetMaxProperties()
+ s.MinProperties = j.GetMinProperties()
+ s.Required = j.GetRequired()
+ s.Minimum = j.GetMinimum()
+ s.Maximum = j.GetMaximum()
+ s.ReadOnly = j.GetReadOnly()
+ s.MultipleOf = j.GetMultipleOf()
+ s.ExclusiveMaximum = j.GetExclusiveMaximum()
+ s.ExclusiveMinimum = j.GetExclusiveMinimum()
+ s.Enum = j.GetEnum()
+ }
s.MaxItems = j.GetMaxItems()
s.MinItems = j.GetMinItems()
- s.UniqueItems = j.GetUniqueItems()
- s.MaxProperties = j.GetMaxProperties()
- s.MinProperties = j.GetMinProperties()
- s.Required = j.GetRequired()
+
s.Enum = j.GetEnum()
+ if j.GetExtensions() != nil {
+ exts, err := processExtensions(j.GetExtensions())
+ if err != nil {
+ panic(err)
+ }
+ s.extensions = exts
+ }
if overrideType := j.GetType(); len(overrideType) > 0 {
s.Type = strings.ToLower(overrideType[0].String())
}
- if j != nil && j.GetExample() != "" {
- s.Example = json.RawMessage(j.GetExample())
+ if j.GetExample() != "" {
+ s.Example = RawExample(j.GetExample())
}
- if j != nil && j.GetFormat() != "" {
+ if j.GetFormat() != "" {
s.Format = j.GetFormat()
}
}
-func updateSwaggerObjectFromFieldBehavior(s *openapiSchemaObject, j []annotations.FieldBehavior, field *descriptor.Field) {
- // Per the JSON Reference syntax: Any members other than "$ref" in a JSON Reference object SHALL be ignored.
- // https://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03#section-3
- if s.Ref != "" {
- return
- }
-
+func updateSwaggerObjectFromFieldBehavior(s *openapiSchemaObject, j []annotations.FieldBehavior, reg *descriptor.Registry, field *descriptor.Field) {
for _, fb := range j {
switch fb {
case annotations.FieldBehavior_REQUIRED:
- s.Required = append(s.Required, *field.Name)
+ if reg.GetUseJSONNamesForFields() {
+ s.Required = append(s.Required, *field.JsonName)
+ } else {
+ s.Required = append(s.Required, *field.Name)
+ }
case annotations.FieldBehavior_OUTPUT_ONLY:
s.ReadOnly = true
case annotations.FieldBehavior_FIELD_BEHAVIOR_UNSPECIFIED:
@@ -2271,7 +2732,7 @@ func openapiSchemaFromProtoSchema(s *openapi_options.Schema, reg *descriptor.Reg
updateswaggerObjectFromJSONSchema(&ret, s.GetJsonSchema(), reg, data)
if s != nil && s.Example != "" {
- ret.Example = json.RawMessage(s.Example)
+ ret.Example = RawExample(s.Example)
}
return ret
@@ -2281,7 +2742,7 @@ func openapiExamplesFromProtoExamples(in map[string]string) map[string]interface
if len(in) == 0 {
return nil
}
- out := make(map[string]interface{})
+ out := make(map[string]interface{}, len(in))
for mimeType, exampleStr := range in {
switch mimeType {
case "application/json":
@@ -2346,16 +2807,16 @@ func protoExternalDocumentationToOpenAPIExternalDocumentation(in *openapi_option
}
}
-func addCustomRefs(d openapiDefinitionsObject, reg *descriptor.Registry, refs refMap) {
+func addCustomRefs(d openapiDefinitionsObject, reg *descriptor.Registry, refs refMap) error {
if len(refs) == 0 {
- return
+ return nil
}
msgMap := make(messageMap)
enumMap := make(enumMap)
for ref := range refs {
swgName, swgOk := fullyQualifiedNameToOpenAPIName(ref, reg)
if !swgOk {
- glog.Errorf("can't resolve OpenAPI name from CustomRef '%v'", ref)
+ glog.Errorf("can't resolve OpenAPI name from CustomRef %q", ref)
continue
}
if _, ok := d[swgName]; ok {
@@ -2376,11 +2837,13 @@ func addCustomRefs(d openapiDefinitionsObject, reg *descriptor.Registry, refs re
// ?? Should be either enum or msg
}
- renderMessagesAsDefinition(msgMap, d, reg, refs, nil)
+ if err := renderMessagesAsDefinition(msgMap, d, reg, refs, nil); err != nil {
+ return err
+ }
renderEnumerationsAsDefinition(enumMap, d, reg)
// Run again in case any new refs were added
- addCustomRefs(d, reg, refs)
+ return addCustomRefs(d, reg, refs)
}
func lowerCamelCase(fieldName string, fields []*descriptor.Field, msgs []*descriptor.Message) string {
@@ -2389,7 +2852,7 @@ func lowerCamelCase(fieldName string, fields []*descriptor.Field, msgs []*descri
return oneField.GetJsonName()
}
}
- messageNameToFieldsToJSONName := make(map[string]map[string]string)
+ messageNameToFieldsToJSONName := make(map[string]map[string]string, len(msgs))
fieldNameToType := make(map[string]string)
for _, msg := range msgs {
fieldNameToJSONName := make(map[string]string)
@@ -2403,7 +2866,7 @@ func lowerCamelCase(fieldName string, fields []*descriptor.Field, msgs []*descri
fieldNames := strings.Split(fieldName, ".")
fieldNamesWithCamelCase := make([]string, 0)
for i := 0; i < len(fieldNames)-1; i++ {
- fieldNamesWithCamelCase = append(fieldNamesWithCamelCase, doCamelCase(string(fieldNames[i])))
+ fieldNamesWithCamelCase = append(fieldNamesWithCamelCase, casing.JSONCamelCase(string(fieldNames[i])))
}
prefix := strings.Join(fieldNamesWithCamelCase, ".")
reservedJSONName := getReservedJSONName(fieldName, messageNameToFieldsToJSONName, fieldNameToType)
@@ -2411,15 +2874,7 @@ func lowerCamelCase(fieldName string, fields []*descriptor.Field, msgs []*descri
return prefix + "." + reservedJSONName
}
}
- return doCamelCase(fieldName)
-}
-
-func doCamelCase(input string) string {
- parameterString := casing.Camel(input)
- builder := &strings.Builder{}
- builder.WriteString(strings.ToLower(string(parameterString[0])))
- builder.WriteString(parameterString[1:])
- return builder.String()
+ return casing.JSONCamelCase(fieldName)
}
func getReservedJSONName(fieldName string, messageNameToFieldsToJSONName map[string]map[string]string, fieldNameToType map[string]string) string {
@@ -2444,3 +2899,27 @@ func find(a []string, x string) int {
}
return -1
}
+
+// Make a deep copy of the outer parameters that has paramName as the first component,
+// but remove the first component of the field path.
+func subPathParams(paramName string, outerParams []descriptor.Parameter) []descriptor.Parameter {
+ var innerParams []descriptor.Parameter
+ for _, p := range outerParams {
+ if len(p.FieldPath) > 1 && p.FieldPath[0].Name == paramName {
+ subParam := descriptor.Parameter{
+ FieldPath: p.FieldPath[1:],
+ Target: p.Target,
+ Method: p.Method,
+ }
+ innerParams = append(innerParams, subParam)
+ }
+ }
+ return innerParams
+}
+
+func getFieldConfiguration(reg *descriptor.Registry, fd *descriptor.Field) *openapi_options.JSONSchema_FieldConfiguration {
+ if j, err := getFieldOpenAPIOption(reg, fd); err == nil {
+ return j.GetFieldConfiguration()
+ }
+ return nil
+}
diff --git a/protoc-gen-openapiv2/internal/genopenapi/template_test.go b/protoc-gen-openapiv2/internal/genopenapi/template_test.go
index 29d018d9856..4f6daf6efb3 100644
--- a/protoc-gen-openapiv2/internal/genopenapi/template_test.go
+++ b/protoc-gen-openapiv2/internal/genopenapi/template_test.go
@@ -1,10 +1,13 @@
package genopenapi
import (
+ "bytes"
"encoding/json"
"errors"
"fmt"
+ "io"
"math"
+ "os"
"reflect"
"strings"
"testing"
@@ -16,11 +19,15 @@ import (
openapi_options "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
"google.golang.org/genproto/googleapis/api/annotations"
+ "google.golang.org/genproto/googleapis/api/visibility"
"google.golang.org/genproto/protobuf/field_mask"
+ "google.golang.org/protobuf/encoding/protojson"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/reflect/protodesc"
"google.golang.org/protobuf/types/descriptorpb"
+ "google.golang.org/protobuf/types/known/anypb"
"google.golang.org/protobuf/types/known/durationpb"
+ "google.golang.org/protobuf/types/known/emptypb"
"google.golang.org/protobuf/types/known/structpb"
"google.golang.org/protobuf/types/known/timestamppb"
"google.golang.org/protobuf/types/known/wrapperspb"
@@ -57,6 +64,33 @@ func reqFromFile(f *descriptor.File) *pluginpb.CodeGeneratorRequest {
}
}
+// captureStderr executes the given function and returns the full string of what
+// was written to os.Stderr during execution and any error the function may have returned
+func captureStderr(f func() error) (string, error) {
+ old := os.Stderr // keep backup of the real stderr
+ r, w, err := os.Pipe()
+ if err != nil {
+ return "", err
+ }
+ os.Stderr = w
+
+ outC := make(chan string)
+ // copy the output in a separate goroutine so printing can't block indefinitely
+ go func() {
+ var buf bytes.Buffer
+ _, _ = io.Copy(&buf, r)
+ outC <- buf.String()
+ }()
+
+ // calling function which stderr we are going to capture:
+ err = f()
+
+ // back to normal state
+ _ = w.Close()
+ os.Stderr = old // restoring the real stderr
+ return <-outC, err
+}
+
func TestMessageToQueryParametersWithEnumAsInt(t *testing.T) {
type test struct {
MsgDescs []*descriptorpb.DescriptorProto
@@ -197,7 +231,193 @@ func TestMessageToQueryParametersWithEnumAsInt(t *testing.T) {
for _, test := range tests {
reg := descriptor.NewRegistry()
reg.SetEnumsAsInts(true)
- msgs := []*descriptor.Message{}
+ var msgs []*descriptor.Message
+ for _, msgdesc := range test.MsgDescs {
+ msgs = append(msgs, &descriptor.Message{DescriptorProto: msgdesc})
+ }
+ file := descriptor.File{
+ FileDescriptorProto: &descriptorpb.FileDescriptorProto{
+ SourceCodeInfo: &descriptorpb.SourceCodeInfo{},
+ Name: proto.String("example.proto"),
+ Package: proto.String("example"),
+ Dependency: []string{},
+ MessageType: test.MsgDescs,
+ Service: []*descriptorpb.ServiceDescriptorProto{},
+ Options: &descriptorpb.FileOptions{
+ GoPackage: proto.String("github.com/grpc-ecosystem/grpc-gateway/runtime/internal/examplepb;example"),
+ },
+ },
+ GoPkg: descriptor.GoPackage{
+ Path: "example.com/path/to/example/example.pb",
+ Name: "example_pb",
+ },
+ Messages: msgs,
+ }
+ err := reg.Load(&pluginpb.CodeGeneratorRequest{
+ ProtoFile: []*descriptorpb.FileDescriptorProto{file.FileDescriptorProto},
+ })
+ if err != nil {
+ t.Fatalf("failed to load code generator request: %v", err)
+ }
+
+ message, err := reg.LookupMsg("", ".example."+test.Message)
+ if err != nil {
+ t.Fatalf("failed to lookup message: %s", err)
+ }
+ params, err := messageToQueryParameters(message, reg, []descriptor.Parameter{}, nil)
+ if err != nil {
+ t.Fatalf("failed to convert message to query parameters: %s", err)
+ }
+ // avoid checking Items for array types
+ for i := range params {
+ params[i].Items = nil
+ }
+ if !reflect.DeepEqual(params, test.Params) {
+ t.Errorf("expected %v, got %v", test.Params, params)
+ }
+ }
+}
+
+func TestMessageToQueryParametersWithOmitEnumDefaultValue(t *testing.T) {
+ type test struct {
+ MsgDescs []*descriptorpb.DescriptorProto
+ Message string
+ Params []openapiParameterObject
+ }
+
+ tests := []test{
+ {
+ MsgDescs: []*descriptorpb.DescriptorProto{
+ {
+ Name: proto.String("ExampleMessage"),
+ Field: []*descriptorpb.FieldDescriptorProto{
+ {
+ Name: proto.String("a"),
+ Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(),
+ Number: proto.Int32(1),
+ },
+ {
+ Name: proto.String("b"),
+ Type: descriptorpb.FieldDescriptorProto_TYPE_DOUBLE.Enum(),
+ Number: proto.Int32(2),
+ },
+ {
+ Name: proto.String("c"),
+ Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(),
+ Label: descriptorpb.FieldDescriptorProto_LABEL_REPEATED.Enum(),
+ Number: proto.Int32(3),
+ },
+ },
+ },
+ },
+ Message: "ExampleMessage",
+ Params: []openapiParameterObject{
+ {
+ Name: "a",
+ In: "query",
+ Required: false,
+ Type: "string",
+ },
+ {
+ Name: "b",
+ In: "query",
+ Required: false,
+ Type: "number",
+ Format: "double",
+ },
+ {
+ Name: "c",
+ In: "query",
+ Required: false,
+ Type: "array",
+ CollectionFormat: "multi",
+ },
+ },
+ },
+ {
+ MsgDescs: []*descriptorpb.DescriptorProto{
+ {
+ Name: proto.String("ExampleMessage"),
+ Field: []*descriptorpb.FieldDescriptorProto{
+ {
+ Name: proto.String("nested"),
+ Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(),
+ TypeName: proto.String(".example.Nested"),
+ Number: proto.Int32(1),
+ },
+ },
+ },
+ {
+ Name: proto.String("Nested"),
+ Field: []*descriptorpb.FieldDescriptorProto{
+ {
+ Name: proto.String("a"),
+ Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(),
+ Number: proto.Int32(1),
+ },
+ {
+ Name: proto.String("deep"),
+ Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(),
+ TypeName: proto.String(".example.Nested.DeepNested"),
+ Number: proto.Int32(2),
+ },
+ },
+ NestedType: []*descriptorpb.DescriptorProto{{
+ Name: proto.String("DeepNested"),
+ Field: []*descriptorpb.FieldDescriptorProto{
+ {
+ Name: proto.String("b"),
+ Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(),
+ Number: proto.Int32(1),
+ },
+ {
+ Name: proto.String("c"),
+ Type: descriptorpb.FieldDescriptorProto_TYPE_ENUM.Enum(),
+ TypeName: proto.String(".example.Nested.DeepNested.DeepEnum"),
+ Number: proto.Int32(2),
+ },
+ },
+ EnumType: []*descriptorpb.EnumDescriptorProto{
+ {
+ Name: proto.String("DeepEnum"),
+ Value: []*descriptorpb.EnumValueDescriptorProto{
+ {Name: proto.String("FALSE"), Number: proto.Int32(0)},
+ {Name: proto.String("TRUE"), Number: proto.Int32(1)},
+ },
+ },
+ },
+ }},
+ },
+ },
+ Message: "ExampleMessage",
+ Params: []openapiParameterObject{
+ {
+ Name: "nested.a",
+ In: "query",
+ Required: false,
+ Type: "string",
+ },
+ {
+ Name: "nested.deep.b",
+ In: "query",
+ Required: false,
+ Type: "string",
+ },
+ {
+ Name: "nested.deep.c",
+ In: "query",
+ Required: false,
+ Type: "string",
+ Enum: []string{"TRUE"},
+ },
+ },
+ },
+ }
+
+ for _, test := range tests {
+ reg := descriptor.NewRegistry()
+ reg.SetOmitEnumDefaultValue(true)
+ var msgs []*descriptor.Message
for _, msgdesc := range test.MsgDescs {
msgs = append(msgs, &descriptor.Message{DescriptorProto: msgdesc})
}
@@ -431,7 +651,7 @@ func TestMessageToQueryParameters(t *testing.T) {
}
// TestMessagetoQueryParametersNoRecursive, is a check that cyclical references between messages
-// are not falsely detected given previous known edge-cases.
+// are not falsely detected given previous known edge-cases.
func TestMessageToQueryParametersNoRecursive(t *testing.T) {
type test struct {
MsgDescs []*descriptorpb.DescriptorProto
@@ -495,7 +715,7 @@ func TestMessageToQueryParametersNoRecursive(t *testing.T) {
Field: []*descriptorpb.FieldDescriptorProto{
{
Name: proto.String("field"),
- //Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(),
+ // Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(),
Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(),
Number: proto.Int32(1),
},
@@ -550,8 +770,8 @@ func TestMessageToQueryParametersNoRecursive(t *testing.T) {
}
// TestMessagetoQueryParametersRecursive, is a check that cyclical references between messages
-// are handled gracefully. The goal is to insure that attempts to add messages with cyclical
-// references to query-parameters returns an error message.
+// are handled gracefully. The goal is to insure that attempts to add messages with cyclical
+// references to query-parameters returns an error message.
func TestMessageToQueryParametersRecursive(t *testing.T) {
type test struct {
MsgDescs []*descriptorpb.DescriptorProto
@@ -680,6 +900,18 @@ func TestMessageToQueryParametersWithJsonName(t *testing.T) {
Params []openapiParameterObject
}
+ var requiredField = []annotations.FieldBehavior{annotations.FieldBehavior_REQUIRED}
+ var requiredFieldOptions = new(descriptorpb.FieldOptions)
+ proto.SetExtension(requiredFieldOptions, annotations.E_FieldBehavior, requiredField)
+
+ messageSchema := &openapi_options.Schema{
+ JsonSchema: &openapi_options.JSONSchema{
+ Required: []string{"test_field_b"},
+ },
+ }
+ messageOption := &descriptorpb.MessageOptions{}
+ proto.SetExtension(messageOption, openapi_options.E_Openapiv2Schema, messageSchema)
+
tests := []test{
{
MsgDescs: []*descriptorpb.DescriptorProto{
@@ -741,6 +973,44 @@ func TestMessageToQueryParametersWithJsonName(t *testing.T) {
},
},
},
+ {
+ MsgDescs: []*descriptorpb.DescriptorProto{
+ {
+ Name: proto.String("ExampleMessage"),
+ Field: []*descriptorpb.FieldDescriptorProto{
+ {
+ Name: proto.String("test_field_a"),
+ Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(),
+ Number: proto.Int32(1),
+ JsonName: proto.String("testFieldACustom"),
+ Options: requiredFieldOptions,
+ },
+ {
+ Name: proto.String("test_field_b"),
+ Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(),
+ Number: proto.Int32(2),
+ JsonName: proto.String("testFieldBCustom"),
+ },
+ },
+ Options: messageOption,
+ },
+ },
+ Message: "ExampleMessage",
+ Params: []openapiParameterObject{
+ {
+ Name: "testFieldACustom",
+ In: "query",
+ Required: true,
+ Type: "string",
+ },
+ {
+ Name: "testFieldBCustom",
+ In: "query",
+ Required: true,
+ Type: "string",
+ },
+ },
+ },
}
for _, test := range tests {
@@ -784,7 +1054,7 @@ func TestMessageToQueryParametersWithJsonName(t *testing.T) {
t.Fatalf("failed to convert message to query parameters: %s", err)
}
if !reflect.DeepEqual(params, test.Params) {
- t.Errorf("expected %v, got %v", test.Params, params)
+ t.Errorf("expected %#v, got %#v", test.Params, params)
}
}
}
@@ -912,31 +1182,153 @@ func TestMessageToQueryParametersWellKnownTypes(t *testing.T) {
}
}
-func TestApplyTemplateSimple(t *testing.T) {
- msgdesc := &descriptorpb.DescriptorProto{
- Name: proto.String("ExampleMessage"),
- }
- meth := &descriptorpb.MethodDescriptorProto{
- Name: proto.String("Example"),
- InputType: proto.String("ExampleMessage"),
- OutputType: proto.String("ExampleMessage"),
- }
- svc := &descriptorpb.ServiceDescriptorProto{
- Name: proto.String("ExampleService"),
- Method: []*descriptorpb.MethodDescriptorProto{meth},
+func TestMessageToQueryParametersWithRequiredField(t *testing.T) {
+ type test struct {
+ MsgDescs []*descriptorpb.DescriptorProto
+ Message string
+ Params []openapiParameterObject
}
- msg := &descriptor.Message{
- DescriptorProto: msgdesc,
+
+ messageSchema := &openapi_options.Schema{
+ JsonSchema: &openapi_options.JSONSchema{
+ Required: []string{"a"},
+ },
}
- file := descriptor.File{
- FileDescriptorProto: &descriptorpb.FileDescriptorProto{
- SourceCodeInfo: &descriptorpb.SourceCodeInfo{},
- Name: proto.String("example.proto"),
- Package: proto.String("example"),
- MessageType: []*descriptorpb.DescriptorProto{msgdesc},
- Service: []*descriptorpb.ServiceDescriptorProto{svc},
- Options: &descriptorpb.FileOptions{
- GoPackage: proto.String("github.com/grpc-ecosystem/grpc-gateway/runtime/internal/examplepb;example"),
+ messageOption := &descriptorpb.MessageOptions{}
+ proto.SetExtension(messageOption, openapi_options.E_Openapiv2Schema, messageSchema)
+
+ fieldSchema := &openapi_options.JSONSchema{Required: []string{"b"}}
+ fieldOption := &descriptorpb.FieldOptions{}
+ proto.SetExtension(fieldOption, openapi_options.E_Openapiv2Field, fieldSchema)
+
+ // TODO(makdon): is nested field's test case necessary here?
+ tests := []test{
+ {
+ MsgDescs: []*descriptorpb.DescriptorProto{
+ {
+ Name: proto.String("ExampleMessage"),
+ Field: []*descriptorpb.FieldDescriptorProto{
+ {
+ Name: proto.String("a"),
+ Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(),
+ Number: proto.Int32(1),
+ },
+ {
+ Name: proto.String("b"),
+ Type: descriptorpb.FieldDescriptorProto_TYPE_DOUBLE.Enum(),
+ Number: proto.Int32(2),
+ Options: fieldOption,
+ },
+ {
+ Name: proto.String("c"),
+ Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(),
+ Label: descriptorpb.FieldDescriptorProto_LABEL_REPEATED.Enum(),
+ Number: proto.Int32(3),
+ },
+ },
+ Options: messageOption,
+ },
+ },
+ Message: "ExampleMessage",
+ Params: []openapiParameterObject{
+ {
+ Name: "a",
+ In: "query",
+ Required: true,
+ Type: "string",
+ },
+ {
+ Name: "b",
+ In: "query",
+ Required: true,
+ Type: "number",
+ Format: "double",
+ },
+ {
+ Name: "c",
+ In: "query",
+ Required: false,
+ Type: "array",
+ CollectionFormat: "multi",
+ },
+ },
+ },
+ }
+
+ for _, test := range tests {
+ reg := descriptor.NewRegistry()
+ msgs := []*descriptor.Message{}
+ for _, msgdesc := range test.MsgDescs {
+ msgs = append(msgs, &descriptor.Message{DescriptorProto: msgdesc})
+ }
+ file := descriptor.File{
+ FileDescriptorProto: &descriptorpb.FileDescriptorProto{
+ SourceCodeInfo: &descriptorpb.SourceCodeInfo{},
+ Name: proto.String("example.proto"),
+ Package: proto.String("example"),
+ Dependency: []string{},
+ MessageType: test.MsgDescs,
+ Service: []*descriptorpb.ServiceDescriptorProto{},
+ Options: &descriptorpb.FileOptions{
+ GoPackage: proto.String("github.com/grpc-ecosystem/grpc-gateway/runtime/internal/examplepb;example"),
+ },
+ },
+ GoPkg: descriptor.GoPackage{
+ Path: "example.com/path/to/example/example.pb",
+ Name: "example_pb",
+ },
+ Messages: msgs,
+ }
+ err := reg.Load(&pluginpb.CodeGeneratorRequest{
+ ProtoFile: []*descriptorpb.FileDescriptorProto{file.FileDescriptorProto},
+ })
+ if err != nil {
+ t.Fatalf("failed to load code generator request: %v", err)
+ }
+
+ message, err := reg.LookupMsg("", ".example."+test.Message)
+ if err != nil {
+ t.Fatalf("failed to lookup message: %s", err)
+ }
+ params, err := messageToQueryParameters(message, reg, []descriptor.Parameter{}, nil)
+ if err != nil {
+ t.Fatalf("failed to convert message to query parameters: %s", err)
+ }
+ // avoid checking Items for array types
+ for i := range params {
+ params[i].Items = nil
+ }
+ if !reflect.DeepEqual(params, test.Params) {
+ t.Errorf("expected %v, got %v", test.Params, params)
+ }
+ }
+}
+
+func TestApplyTemplateSimple(t *testing.T) {
+ msgdesc := &descriptorpb.DescriptorProto{
+ Name: proto.String("ExampleMessage"),
+ }
+ meth := &descriptorpb.MethodDescriptorProto{
+ Name: proto.String("Example"),
+ InputType: proto.String("ExampleMessage"),
+ OutputType: proto.String("ExampleMessage"),
+ }
+ svc := &descriptorpb.ServiceDescriptorProto{
+ Name: proto.String("ExampleService"),
+ Method: []*descriptorpb.MethodDescriptorProto{meth},
+ }
+ msg := &descriptor.Message{
+ DescriptorProto: msgdesc,
+ }
+ file := descriptor.File{
+ FileDescriptorProto: &descriptorpb.FileDescriptorProto{
+ SourceCodeInfo: &descriptorpb.SourceCodeInfo{},
+ Name: proto.String("example.proto"),
+ Package: proto.String("example"),
+ MessageType: []*descriptorpb.DescriptorProto{msgdesc},
+ Service: []*descriptorpb.ServiceDescriptorProto{svc},
+ Options: &descriptorpb.FileOptions{
+ GoPackage: proto.String("github.com/grpc-ecosystem/grpc-gateway/runtime/internal/examplepb;example"),
},
},
GoPkg: descriptor.GoPackage{
@@ -1125,7 +1517,123 @@ func TestApplyTemplateMultiService(t *testing.T) {
}
}
-func TestApplyTemplateOverrideOperationID(t *testing.T) {
+func TestApplyTemplateOpenAPIConfigFromYAML(t *testing.T) {
+ msgdesc := &descriptorpb.DescriptorProto{
+ Name: proto.String("ExampleMessage"),
+ }
+ meth := &descriptorpb.MethodDescriptorProto{
+ Name: proto.String("Example"),
+ InputType: proto.String("ExampleMessage"),
+ OutputType: proto.String("ExampleMessage"),
+ }
+ svc := &descriptorpb.ServiceDescriptorProto{
+ Name: proto.String("ExampleService"),
+ Method: []*descriptorpb.MethodDescriptorProto{meth},
+ }
+ msg := &descriptor.Message{
+ DescriptorProto: msgdesc,
+ }
+ file := descriptor.File{
+ FileDescriptorProto: &descriptorpb.FileDescriptorProto{
+ SourceCodeInfo: &descriptorpb.SourceCodeInfo{},
+ Name: proto.String("example.proto"),
+ Package: proto.String("example"),
+ MessageType: []*descriptorpb.DescriptorProto{msgdesc},
+ Service: []*descriptorpb.ServiceDescriptorProto{svc},
+ Options: &descriptorpb.FileOptions{
+ GoPackage: proto.String("github.com/grpc-ecosystem/grpc-gateway/runtime/internal/examplepb;example"),
+ },
+ },
+ GoPkg: descriptor.GoPackage{
+ Path: "example.com/path/to/example/example.pb",
+ Name: "example_pb",
+ },
+ Messages: []*descriptor.Message{msg},
+ Services: []*descriptor.Service{
+ {
+ ServiceDescriptorProto: svc,
+ Methods: []*descriptor.Method{
+ {
+ MethodDescriptorProto: meth,
+ RequestType: msg,
+ ResponseType: msg,
+ Bindings: []*descriptor.Binding{
+ {
+ HTTPMethod: "GET",
+ Body: &descriptor.Body{FieldPath: nil},
+ PathTmpl: httprule.Template{
+ Version: 1,
+ OpCodes: []int{0, 0},
+ Template: "/v1/echo", // TODO(achew22): Figure out what this should really be
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ }
+ reg := descriptor.NewRegistry()
+ if err := AddErrorDefs(reg); err != nil {
+ t.Errorf("AddErrorDefs(%#v) failed with %v; want success", reg, err)
+ return
+ }
+ fileCL := crossLinkFixture(&file)
+ err := reg.Load(reqFromFile(fileCL))
+ if err != nil {
+ t.Errorf("reg.Load(%#v) failed with %v; want success", file, err)
+ return
+ }
+ openapiOptions := &openapiconfig.OpenAPIOptions{
+ Service: []*openapiconfig.OpenAPIServiceOption{
+ {
+ Service: "example.ExampleService",
+ Option: &openapi_options.Tag{
+ Description: "ExampleService description",
+ ExternalDocs: &openapi_options.ExternalDocumentation{
+ Description: "Find out more about ExampleService",
+ },
+ },
+ },
+ },
+ }
+ if err := reg.RegisterOpenAPIOptions(openapiOptions); err != nil {
+ t.Errorf("reg.RegisterOpenAPIOptions for Service %#v failed with %v; want success", openapiOptions.Service, err)
+ return
+ }
+
+ result, err := applyTemplate(param{File: fileCL, reg: reg})
+ if err != nil {
+ t.Errorf("applyTemplate(%#v) failed with %v; want success", file, err)
+ return
+ }
+ if want, is, name := "ExampleService description", result.Tags[0].Description, "Tags[0].Description"; !reflect.DeepEqual(is, want) {
+ t.Errorf("applyTemplate(%#v).%s = %s want to be %s", file, name, is, want)
+ }
+ if want, is, name := "Find out more about ExampleService", result.Tags[0].ExternalDocs.Description, "Tags[0].ExternalDocs.Description"; !reflect.DeepEqual(is, want) {
+ t.Errorf("applyTemplate(%#v).%s = %s want to be %s", file, name, is, want)
+ }
+
+ reg.SetDisableServiceTags(true)
+
+ res, err := applyTemplate(param{File: fileCL, reg: reg})
+ if err != nil {
+ t.Errorf("applyTemplate(%#v) failed with %v; want success", file, err)
+ return
+ }
+
+ if got, want := len(res.Tags), 0; got != want {
+ t.Fatalf("len(applyTemplate(%#v).Tags) = %d want to be %d", file, got, want)
+ }
+
+ // If there was a failure, print out the input and the json result for debugging.
+ if t.Failed() {
+ t.Errorf("had: %s", file)
+ t.Errorf("got: %s", fmt.Sprint(result))
+ }
+}
+
+func TestApplyTemplateOverrideWithOperation(t *testing.T) {
newFile := func() *descriptor.File {
msgdesc := &descriptorpb.DescriptorProto{
Name: proto.String("ExampleMessage"),
@@ -1209,6 +1717,12 @@ func TestApplyTemplateOverrideOperationID(t *testing.T) {
if want, is := "MyExample", result.Paths["/v1/echo"].Get.OperationID; !reflect.DeepEqual(is, want) {
t.Errorf("applyTemplate(%#v).Paths[0].Get.OperationID = %s want to be %s", *file, is, want)
}
+ if want, is := []string{"application/xml"}, result.Paths["/v1/echo"].Get.Consumes; !reflect.DeepEqual(is, want) {
+ t.Errorf("applyTemplate(%#v).Paths[0].Get.Consumes = %s want to be %s", *file, is, want)
+ }
+ if want, is := []string{"application/json", "application/xml"}, result.Paths["/v1/echo"].Get.Produces; !reflect.DeepEqual(is, want) {
+ t.Errorf("applyTemplate(%#v).Paths[0].Get.Produces = %s want to be %s", *file, is, want)
+ }
// If there was a failure, print out the input and the json result for debugging.
if t.Failed() {
@@ -1219,6 +1733,8 @@ func TestApplyTemplateOverrideOperationID(t *testing.T) {
openapiOperation := openapi_options.Operation{
OperationId: "MyExample",
+ Consumes: []string{"application/xml"},
+ Produces: []string{"application/json", "application/xml"},
}
t.Run("verify override via method option", func(t *testing.T) {
@@ -1326,6 +1842,15 @@ func TestApplyTemplateExtensions(t *testing.T) {
},
},
},
+ Tags: []*openapi_options.Tag{
+ {
+ Name: "test tag",
+ Description: "test tag description",
+ Extensions: map[string]*structpb.Value{
+ "x-traitTag": {Kind: &structpb.Value_BoolValue{BoolValue: true}},
+ },
+ },
+ },
}
openapiOperation := openapi_options.Operation{
Responses: map[string]*openapi_options.Response{
@@ -1428,6 +1953,16 @@ func TestApplyTemplateExtensions(t *testing.T) {
}, response.extensions, "response.Extensions"; !reflect.DeepEqual(is, want) {
t.Errorf("applyTemplate(%#v).%s = %s want to be %s", file, name, is, want)
}
+
+ var tag openapiTagObject
+ for _, v := range result.Tags {
+ tag = v
+ }
+ if want, is, name := []extension{
+ {key: "x-traitTag", value: json.RawMessage("true")},
+ }, tag.extensions, "Tags[0].Extensions"; !reflect.DeepEqual(is, want) {
+ t.Errorf("applyTemplate(%#v).%s = %s want to be %s", file, name, is, want)
+ }
}
t.Run("verify template options set via proto options", func(t *testing.T) {
file := newFile()
@@ -1518,7 +2053,7 @@ func TestApplyTemplateHeaders(t *testing.T) {
}
openapiOperation := openapi_options.Operation{
Responses: map[string]*openapi_options.Response{
- "200": &openapi_options.Response{
+ "200": {
Description: "Testing Headers",
Headers: map[string]*openapi_options.Header{
"string": {
@@ -1590,19 +2125,19 @@ func TestApplyTemplateHeaders(t *testing.T) {
"Boolean": openapiHeaderObject{
Description: "boolean header description",
Type: "boolean",
- Default: json.RawMessage("true"),
+ Default: RawExample("true"),
Pattern: "^true|false$",
},
"Integer": openapiHeaderObject{
Description: "integer header description",
Type: "integer",
- Default: json.RawMessage("0"),
+ Default: RawExample("0"),
Pattern: "^[0-9]$",
},
"Number": openapiHeaderObject{
Description: "number header description",
Type: "number",
- Default: json.RawMessage("1.2"),
+ Default: RawExample("1.2"),
Pattern: "^[-+]?[0-9]*\\.?[0-9]+([eE][-+]?[0-9]+)?$",
},
},
@@ -2080,10 +2615,6 @@ func TestApplyTemplateRequestWithoutClientStreaming(t *testing.T) {
Message: nested,
FieldDescriptorProto: nested.GetField()[0],
}
- boolField := &descriptor.Field{
- Message: nested,
- FieldDescriptorProto: nested.GetField()[1],
- }
file := descriptor.File{
FileDescriptorProto: &descriptorpb.FileDescriptorProto{
SourceCodeInfo: &descriptorpb.SourceCodeInfo{},
@@ -2137,10 +2668,6 @@ func TestApplyTemplateRequestWithoutClientStreaming(t *testing.T) {
Name: "nested",
Target: nestedField,
},
- {
- Name: "bool",
- Target: boolField,
- },
}),
},
},
@@ -2155,12 +2682,14 @@ func TestApplyTemplateRequestWithoutClientStreaming(t *testing.T) {
t.Errorf("AddErrorDefs(%#v) failed with %v; want success", reg, err)
return
}
+ fmt.Fprintln(os.Stderr, "fd", file.FileDescriptorProto)
err := reg.Load(&pluginpb.CodeGeneratorRequest{
ProtoFile: []*descriptorpb.FileDescriptorProto{file.FileDescriptorProto},
})
if err != nil {
t.Fatalf("failed to load code generator request: %v", err)
}
+ fmt.Fprintln(os.Stderr, "AllFQMNs", reg.GetAllFQMNs())
result, err := applyTemplate(param{File: crossLinkFixture(&file), reg: reg})
if err != nil {
t.Errorf("applyTemplate(%#v) failed with %v; want success", file, err)
@@ -2246,10 +2775,6 @@ func TestApplyTemplateRequestWithClientStreaming(t *testing.T) {
Message: nested,
FieldDescriptorProto: nested.GetField()[0],
}
- boolField := &descriptor.Field{
- Message: nested,
- FieldDescriptorProto: nested.GetField()[1],
- }
file := descriptor.File{
FileDescriptorProto: &descriptorpb.FileDescriptorProto{
SourceCodeInfo: &descriptorpb.SourceCodeInfo{},
@@ -2303,10 +2828,6 @@ func TestApplyTemplateRequestWithClientStreaming(t *testing.T) {
Name: "nested",
Target: nestedField,
},
- {
- Name: "bool",
- Target: boolField,
- },
}),
},
},
@@ -2587,110 +3108,363 @@ func TestApplyTemplateRequestWithBodyQueryParameters(t *testing.T) {
createMsg.Fields = []*descriptor.Field{parentField, bookField, bookIDField}
- file := descriptor.File{
- FileDescriptorProto: &descriptorpb.FileDescriptorProto{
- SourceCodeInfo: &descriptorpb.SourceCodeInfo{},
- Name: proto.String("book.proto"),
- MessageType: []*descriptorpb.DescriptorProto{bookDesc, createDesc},
- Service: []*descriptorpb.ServiceDescriptorProto{svc},
- Options: &descriptorpb.FileOptions{
- GoPackage: proto.String("github.com/grpc-ecosystem/grpc-gateway/runtime/internal/examplepb;example"),
- },
- },
- GoPkg: descriptor.GoPackage{
- Path: "example.com/path/to/book.pb",
- Name: "book_pb",
- },
- Messages: []*descriptor.Message{bookMsg, createMsg},
- Services: []*descriptor.Service{
- {
- ServiceDescriptorProto: svc,
- Methods: []*descriptor.Method{
- {
- MethodDescriptorProto: meth,
- RequestType: createMsg,
- ResponseType: bookMsg,
- Bindings: []*descriptor.Binding{
- {
- HTTPMethod: "POST",
- PathTmpl: httprule.Template{
- Version: 1,
- OpCodes: []int{0, 0},
- Template: "/v1/{parent=publishers/*}/books",
- },
- PathParams: []descriptor.Parameter{
- {
- FieldPath: descriptor.FieldPath([]descriptor.FieldPathComponent{
- {
- Name: "parent",
- Target: parentField,
- },
- }),
- Target: parentField,
+ newFile := func() descriptor.File {
+ return descriptor.File{
+ FileDescriptorProto: &descriptorpb.FileDescriptorProto{
+ SourceCodeInfo: &descriptorpb.SourceCodeInfo{},
+ Name: proto.String("book.proto"),
+ MessageType: []*descriptorpb.DescriptorProto{bookDesc, createDesc},
+ Service: []*descriptorpb.ServiceDescriptorProto{svc},
+ Options: &descriptorpb.FileOptions{
+ GoPackage: proto.String("github.com/grpc-ecosystem/grpc-gateway/runtime/internal/examplepb;example"),
+ },
+ },
+ GoPkg: descriptor.GoPackage{
+ Path: "example.com/path/to/book.pb",
+ Name: "book_pb",
+ },
+ Messages: []*descriptor.Message{bookMsg, createMsg},
+ Services: []*descriptor.Service{
+ {
+ ServiceDescriptorProto: svc,
+ Methods: []*descriptor.Method{
+ {
+ MethodDescriptorProto: meth,
+ RequestType: createMsg,
+ ResponseType: bookMsg,
+ Bindings: []*descriptor.Binding{
+ {
+ HTTPMethod: "POST",
+ PathTmpl: httprule.Template{
+ Version: 1,
+ OpCodes: []int{0, 0},
+ Template: "/v1/{parent=publishers/*}/books",
},
- },
- Body: &descriptor.Body{
- FieldPath: descriptor.FieldPath([]descriptor.FieldPathComponent{
+ PathParams: []descriptor.Parameter{
{
- Name: "book",
- Target: bookField,
+ FieldPath: descriptor.FieldPath([]descriptor.FieldPathComponent{
+ {
+ Name: "parent",
+ Target: parentField,
+ },
+ }),
+ Target: parentField,
},
- }),
+ },
+ Body: &descriptor.Body{
+ FieldPath: []descriptor.FieldPathComponent{
+ {
+ Name: "book",
+ Target: bookField,
+ },
+ },
+ },
},
},
},
},
},
},
- },
+ }
}
- reg := descriptor.NewRegistry()
- if err := AddErrorDefs(reg); err != nil {
- t.Errorf("AddErrorDefs(%#v) failed with %v; want success", reg, err)
- return
+ type args struct {
+ file descriptor.File
}
- err := reg.Load(&pluginpb.CodeGeneratorRequest{ProtoFile: []*descriptorpb.FileDescriptorProto{file.FileDescriptorProto}})
- if err != nil {
- t.Errorf("Registry.Load() failed with %v; want success", err)
- return
+ type paramOut struct {
+ Name string
+ In string
+ Required bool
}
- result, err := applyTemplate(param{File: crossLinkFixture(&file), reg: reg})
- if err != nil {
- t.Errorf("applyTemplate(%#v) failed with %v; want success", file, err)
- return
+ tests := []struct {
+ name string
+ args args
+ want []paramOut
+ }{
+ {
+ name: "book_in_body",
+ args: args{file: newFile()},
+ want: []paramOut{
+ {"parent", "path", true},
+ {"book", "body", true},
+ {"book_id", "query", false},
+ },
+ },
+ {
+ name: "book_in_query",
+ args: args{file: func() descriptor.File {
+ f := newFile()
+ f.Services[0].Methods[0].Bindings[0].Body = nil
+ return f
+ }()},
+ want: []paramOut{
+ {"parent", "path", true},
+ {"book", "query", false},
+ {"book_id", "query", false},
+ },
+ },
}
- if _, ok := result.Paths["/v1/{parent=publishers/*}/books"].Post.Responses["200"]; !ok {
- t.Errorf("applyTemplate(%#v).%s = expected 200 response to be defined", file, `result.Paths["/v1/{parent=publishers/*}/books"].Post.Responses["200"]`)
- } else {
- if want, got, name := 3, len(result.Paths["/v1/{parent=publishers/*}/books"].Post.Parameters), `len(result.Paths["/v1/{parent=publishers/*}/books"].Post.Parameters)`; !reflect.DeepEqual(got, want) {
- t.Errorf("applyTemplate(%#v).%s = %d want to be %d", file, name, got, want)
- }
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ reg := descriptor.NewRegistry()
+ if err := AddErrorDefs(reg); err != nil {
+ t.Errorf("AddErrorDefs(%#v) failed with %v; want success", reg, err)
+ return
+ }
+ err := reg.Load(&pluginpb.CodeGeneratorRequest{ProtoFile: []*descriptorpb.FileDescriptorProto{tt.args.file.FileDescriptorProto}})
+ if err != nil {
+ t.Errorf("Registry.Load() failed with %v; want success", err)
+ return
+ }
+ result, err := applyTemplate(param{File: crossLinkFixture(&tt.args.file), reg: reg})
+ if err != nil {
+ t.Errorf("applyTemplate(%#v) failed with %v; want success", tt.args.file, err)
+ return
+ }
+
+ if _, ok := result.Paths["/v1/{parent}/books"].Post.Responses["200"]; !ok {
+ t.Errorf("applyTemplate(%#v).%s = expected 200 response to be defined", tt.args.file, `result.Paths["/v1/{parent}/books"].Post.Responses["200"]`)
+ } else {
+
+ if want, got, name := 3, len(result.Paths["/v1/{parent}/books"].Post.Parameters), `len(result.Paths["/v1/{parent}/books"].Post.Parameters)`; !reflect.DeepEqual(got, want) {
+ t.Errorf("applyTemplate(%#v).%s = %d want to be %d", tt.args.file, name, got, want)
+ }
+
+ for i, want := range tt.want {
+ p := result.Paths["/v1/{parent}/books"].Post.Parameters[i]
+ if got, name := (paramOut{p.Name, p.In, p.Required}), `result.Paths["/v1/{parent}/books"].Post.Parameters[0]`; !reflect.DeepEqual(got, want) {
+ t.Errorf("applyTemplate(%#v).%s = %v want to be %v", tt.args.file, name, got, want)
+ }
+ }
+
+ }
+
+ // If there was a failure, print out the input and the json result for debugging.
+ if t.Failed() {
+ t.Errorf("had: %s", tt.args.file)
+ t.Errorf("got: %s", fmt.Sprint(result))
+ }
+ })
+ }
+
+}
- type param struct {
- Name string
- In string
- Required bool
+// TestApplyTemplateProtobufAny tests that the protobufAny definition is correctly rendered with the @type field and
+// allowing additional properties.
+func TestApplyTemplateProtobufAny(t *testing.T) {
+ // checkProtobufAnyFormat verifies the only property should be @type and additional properties are allowed
+ checkProtobufAnyFormat := func(t *testing.T, protobufAny openapiSchemaObject) {
+ anyPropsJSON, err := protobufAny.Properties.MarshalJSON()
+ if err != nil {
+ t.Errorf("protobufAny.Properties.MarshalJSON(), got error = %v", err)
+ }
+ var anyPropsMap map[string]interface{}
+ if err := json.Unmarshal(anyPropsJSON, &anyPropsMap); err != nil {
+ t.Errorf("json.Unmarshal(), got error = %v", err)
}
- p0 := result.Paths["/v1/{parent=publishers/*}/books"].Post.Parameters[0]
- if want, got, name := (param{"parent", "path", true}), (param{p0.Name, p0.In, p0.Required}), `result.Paths["/v1/{parent=publishers/*}/books"].Post.Parameters[0]`; !reflect.DeepEqual(got, want) {
- t.Errorf("applyTemplate(%#v).%s = %v want to be %v", file, name, got, want)
+ // @type should exist
+ if _, ok := anyPropsMap["@type"]; !ok {
+ t.Errorf("protobufAny.Properties missing key, \"@type\". got = %#v", anyPropsMap)
}
- p1 := result.Paths["/v1/{parent=publishers/*}/books"].Post.Parameters[1]
- if want, got, name := (param{"body", "body", true}), (param{p1.Name, p1.In, p1.Required}), `result.Paths["/v1/{parent=publishers/*}/books"].Post.Parameters[1]`; !reflect.DeepEqual(got, want) {
- t.Errorf("applyTemplate(%#v).%s = %v want to be %v", file, name, got, want)
+
+ // and @type should be the only property
+ if len(anyPropsMap) > 1 {
+ t.Errorf("len(protobufAny.Properties) = %v, want = %v", len(anyPropsMap), 1)
}
- p2 := result.Paths["/v1/{parent=publishers/*}/books"].Post.Parameters[2]
- if want, got, name := (param{"book_id", "query", false}), (param{p2.Name, p2.In, p2.Required}), `result.Paths["/v1/{parent=publishers/*}/books"].Post.Parameters[1]`; !reflect.DeepEqual(got, want) {
- t.Errorf("applyTemplate(%#v).%s = %v want to be %v", file, name, got, want)
+
+ // protobufAny should have additionalProperties allowed
+ if protobufAny.AdditionalProperties == nil {
+ t.Errorf("protobufAny.AdditionalProperties = nil, want not-nil")
}
}
- // If there was a failure, print out the input and the json result for debugging.
- if t.Failed() {
- t.Errorf("had: %s", file)
- t.Errorf("got: %s", fmt.Sprint(result))
+ type args struct {
+ regConfig func(registry *descriptor.Registry)
+ msgContainsAny bool
+ }
+ tests := []struct {
+ name string
+ args args
+ wantNumDefinitions int
+ }{
+ {
+ // our proto schema doesn't directly use protobufAny, but it is implicitly used by rpcStatus being
+ // automatically rendered
+ name: "default_protobufAny_from_rpcStatus",
+ args: args{
+ msgContainsAny: false,
+ },
+ wantNumDefinitions: 4,
+ },
+ {
+ // we have a protobufAny in a message, it should contain a ref inside the custom message
+ name: "protobufAny_referenced_in_message",
+ args: args{
+ msgContainsAny: true,
+ },
+ wantNumDefinitions: 4,
+ },
+ {
+ // we have a protobufAny in a message but with automatic rendering of rpcStatus disabled
+ name: "protobufAny_referenced_in_message_with_default_errors_disabled",
+ args: args{
+ msgContainsAny: true,
+ regConfig: func(reg *descriptor.Registry) {
+ reg.SetDisableDefaultErrors(true)
+ },
+ },
+ wantNumDefinitions: 3,
+ },
+ {
+ // we have a protobufAny in a message but with automatic rendering of responses disabled
+ name: "protobufAny_referenced_in_message_with_default_responses_disabled",
+ args: args{
+ msgContainsAny: true,
+ regConfig: func(reg *descriptor.Registry) {
+ reg.SetDisableDefaultResponses(true)
+ },
+ },
+ wantNumDefinitions: 4,
+ },
+ }
+
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ reqdesc := &descriptorpb.DescriptorProto{
+ Name: proto.String("ExampleMessage"),
+ Field: []*descriptorpb.FieldDescriptorProto{
+ {
+ Name: proto.String("name"),
+ Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(),
+ Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(),
+ Number: proto.Int32(1),
+ },
+ },
+ }
+ respdesc := &descriptorpb.DescriptorProto{
+ Name: proto.String("EmptyMessage"),
+ }
+ meth := &descriptorpb.MethodDescriptorProto{
+ Name: proto.String("Example"),
+ InputType: proto.String("ExampleMessage"),
+ OutputType: proto.String("EmptyMessage"),
+ ClientStreaming: proto.Bool(false),
+ ServerStreaming: proto.Bool(false),
+ }
+ svc := &descriptorpb.ServiceDescriptorProto{
+ Name: proto.String("ExampleService"),
+ Method: []*descriptorpb.MethodDescriptorProto{meth},
+ }
+
+ req := &descriptor.Message{
+ DescriptorProto: reqdesc,
+ }
+ resp := &descriptor.Message{
+ DescriptorProto: respdesc,
+ }
+ file := descriptor.File{
+ FileDescriptorProto: &descriptorpb.FileDescriptorProto{
+ SourceCodeInfo: &descriptorpb.SourceCodeInfo{},
+ Name: proto.String("example.proto"),
+ Package: proto.String("example"),
+ MessageType: []*descriptorpb.DescriptorProto{reqdesc, respdesc},
+ Service: []*descriptorpb.ServiceDescriptorProto{svc},
+ Options: &descriptorpb.FileOptions{
+ GoPackage: proto.String("github.com/grpc-ecosystem/grpc-gateway/runtime/internal/examplepb;example"),
+ },
+ },
+ GoPkg: descriptor.GoPackage{
+ Path: "example.com/path/to/example/example.pb",
+ Name: "example_pb",
+ },
+ Messages: []*descriptor.Message{req, resp},
+ Services: []*descriptor.Service{
+ {
+ ServiceDescriptorProto: svc,
+ Methods: []*descriptor.Method{
+ {
+ MethodDescriptorProto: meth,
+ RequestType: req,
+ ResponseType: resp,
+ },
+ },
+ },
+ },
+ }
+
+ reg := descriptor.NewRegistry()
+ reg.SetGenerateUnboundMethods(true)
+
+ if tt.args.regConfig != nil {
+ tt.args.regConfig(reg)
+ }
+
+ if err := AddErrorDefs(reg); err != nil {
+ t.Errorf("AddErrorDefs(%#v) failed with %v; want success", reg, err)
+ return
+ }
+
+ protoFiles := []*descriptorpb.FileDescriptorProto{
+ file.FileDescriptorProto,
+ }
+
+ if tt.args.msgContainsAny {
+ // add an Any field to the request message
+ reqdesc.Field = append(reqdesc.Field, &descriptorpb.FieldDescriptorProto{
+ Name: proto.String("any_value"),
+ Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(),
+ Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(),
+ TypeName: proto.String(".google.protobuf.Any"),
+ Number: proto.Int32(2),
+ })
+
+ // update the dependencies to import it
+ file.Dependency = append(file.Dependency, "google/protobuf/any.proto")
+
+ anyDescriptorProto := protodesc.ToFileDescriptorProto((&anypb.Any{}).ProtoReflect().Descriptor().ParentFile())
+ anyDescriptorProto.SourceCodeInfo = &descriptorpb.SourceCodeInfo{}
+
+ // prepend the anyDescriptorProto to the protoFiles slice so that the dependency can be resolved
+ protoFiles = append(append(make([]*descriptorpb.FileDescriptorProto, 0, len(protoFiles)+1), anyDescriptorProto), protoFiles[0:]...)
+ }
+
+ err := reg.Load(&pluginpb.CodeGeneratorRequest{
+ ProtoFile: protoFiles,
+ FileToGenerate: []string{file.GetName()},
+ })
+ if err != nil {
+ t.Fatalf("failed to load code generator request: %v", err)
+ }
+
+ target, err := reg.LookupFile(file.GetName())
+ if err != nil {
+ t.Fatalf("failed to lookup file from reg: %v", err)
+ }
+ result, err := applyTemplate(param{File: crossLinkFixture(target), reg: reg})
+ if err != nil {
+ t.Errorf("applyTemplate(%#v) failed with %v; want success", file, err)
+ return
+ }
+
+ if want, got, name := tt.wantNumDefinitions, len(result.Definitions), "len(Definitions)"; !reflect.DeepEqual(got, want) {
+ t.Errorf("applyTemplate(%#v).%s = %d want to be %d", file, name, got, want)
+ }
+
+ protobufAny, ok := result.Definitions["protobufAny"]
+ if !ok {
+ t.Error("expecting Definitions to contain protobufAny")
+ }
+
+ checkProtobufAnyFormat(t, protobufAny)
+
+ // If there was a failure, print out the input and the json result for debugging.
+ if t.Failed() {
+ t.Errorf("had: %s", file)
+ resultJSON, _ := json.Marshal(result)
+ t.Errorf("got: %s", resultJSON)
+ }
+ })
}
}
@@ -2756,7 +3530,7 @@ func TestTemplateWithJsonCamelCase(t *testing.T) {
reg := descriptor.NewRegistry()
reg.SetUseJSONNamesForFields(true)
for _, data := range tests {
- actual := templateToOpenAPIPath(data.input, reg, generateFieldsForJSONReservedName(), generateMsgsForJSONReservedName())
+ actual := templateToOpenAPIPath(data.input, reg, generateFieldsForJSONReservedName(), generateMsgsForJSONReservedName(), make(map[string]string))
if data.expected != actual {
t.Errorf("Expected templateToOpenAPIPath(%v) = %v, actual: %v", data.input, data.expected, actual)
}
@@ -2784,7 +3558,7 @@ func TestTemplateWithoutJsonCamelCase(t *testing.T) {
reg := descriptor.NewRegistry()
reg.SetUseJSONNamesForFields(false)
for _, data := range tests {
- actual := templateToOpenAPIPath(data.input, reg, generateFieldsForJSONReservedName(), generateMsgsForJSONReservedName())
+ actual := templateToOpenAPIPath(data.input, reg, generateFieldsForJSONReservedName(), generateMsgsForJSONReservedName(), make(map[string]string))
if data.expected != actual {
t.Errorf("Expected templateToOpenAPIPath(%v) = %v, actual: %v", data.input, data.expected, actual)
}
@@ -2802,28 +3576,28 @@ func TestTemplateToOpenAPIPath(t *testing.T) {
{"/{test=prefix/that/has/multiple/parts/to/it/*}", "/{test}"},
{"/{test1}/{test2}", "/{test1}/{test2}"},
{"/{test1}/{test2}/", "/{test1}/{test2}/"},
- {"/{name=prefix/*}", "/{name=prefix/*}"},
- {"/{name=prefix1/*/prefix2/*}", "/{name=prefix1/*/prefix2/*}"},
- {"/{user.name=prefix/*}", "/{user.name=prefix/*}"},
- {"/{user.name=prefix1/*/prefix2/*}", "/{user.name=prefix1/*/prefix2/*}"},
- {"/{parent=prefix/*}/children", "/{parent=prefix/*}/children"},
- {"/{name=prefix/*}:customMethod", "/{name=prefix/*}:customMethod"},
- {"/{name=prefix1/*/prefix2/*}:customMethod", "/{name=prefix1/*/prefix2/*}:customMethod"},
- {"/{user.name=prefix/*}:customMethod", "/{user.name=prefix/*}:customMethod"},
- {"/{user.name=prefix1/*/prefix2/*}:customMethod", "/{user.name=prefix1/*/prefix2/*}:customMethod"},
- {"/{parent=prefix/*}/children:customMethod", "/{parent=prefix/*}/children:customMethod"},
+ {"/{name=prefix/*}", "/{name}"},
+ {"/{name=prefix1/*/prefix2/*}", "/{name}"},
+ {"/{user.name=prefix/*}", "/{user.name}"},
+ {"/{user.name=prefix1/*/prefix2/*}", "/{user.name}"},
+ {"/{parent=prefix/*}/children", "/{parent}/children"},
+ {"/{name=prefix/*}:customMethod", "/{name}:customMethod"},
+ {"/{name=prefix1/*/prefix2/*}:customMethod", "/{name}:customMethod"},
+ {"/{user.name=prefix/*}:customMethod", "/{user.name}:customMethod"},
+ {"/{user.name=prefix1/*/prefix2/*}:customMethod", "/{user.name}:customMethod"},
+ {"/{parent=prefix/*}/children:customMethod", "/{parent}/children:customMethod"},
}
reg := descriptor.NewRegistry()
reg.SetUseJSONNamesForFields(false)
for _, data := range tests {
- actual := templateToOpenAPIPath(data.input, reg, generateFieldsForJSONReservedName(), generateMsgsForJSONReservedName())
+ actual := templateToOpenAPIPath(data.input, reg, generateFieldsForJSONReservedName(), generateMsgsForJSONReservedName(), make(map[string]string))
if data.expected != actual {
t.Errorf("Expected templateToOpenAPIPath(%v) = %v, actual: %v", data.input, data.expected, actual)
}
}
reg.SetUseJSONNamesForFields(true)
for _, data := range tests {
- actual := templateToOpenAPIPath(data.input, reg, generateFieldsForJSONReservedName(), generateMsgsForJSONReservedName())
+ actual := templateToOpenAPIPath(data.input, reg, generateFieldsForJSONReservedName(), generateMsgsForJSONReservedName(), make(map[string]string))
if data.expected != actual {
t.Errorf("Expected templateToOpenAPIPath(%v) = %v, actual: %v", data.input, data.expected, actual)
}
@@ -2838,7 +3612,7 @@ func BenchmarkTemplateToOpenAPIPath(b *testing.B) {
reg.SetUseJSONNamesForFields(false)
for i := 0; i < b.N; i++ {
- _ = templateToOpenAPIPath(input, reg, generateFieldsForJSONReservedName(), generateMsgsForJSONReservedName())
+ _ = templateToOpenAPIPath(input, reg, generateFieldsForJSONReservedName(), generateMsgsForJSONReservedName(), make(map[string]string))
}
})
@@ -2847,17 +3621,17 @@ func BenchmarkTemplateToOpenAPIPath(b *testing.B) {
reg.SetUseJSONNamesForFields(true)
for i := 0; i < b.N; i++ {
- _ = templateToOpenAPIPath(input, reg, generateFieldsForJSONReservedName(), generateMsgsForJSONReservedName())
+ _ = templateToOpenAPIPath(input, reg, generateFieldsForJSONReservedName(), generateMsgsForJSONReservedName(), make(map[string]string))
}
})
}
func TestResolveFullyQualifiedNameToOpenAPIName(t *testing.T) {
var tests = []struct {
- input string
- output string
- listOfFQMNs []string
- useFQNForOpenAPIName bool
+ input string
+ output string
+ listOfFQMNs []string
+ namingStrategy string
}{
{
".a.b.C",
@@ -2865,7 +3639,15 @@ func TestResolveFullyQualifiedNameToOpenAPIName(t *testing.T) {
[]string{
".a.b.C",
},
- false,
+ "legacy",
+ },
+ {
+ ".a.b.C",
+ "C",
+ []string{
+ ".a.b.C",
+ },
+ "simple",
},
{
".a.b.C",
@@ -2874,7 +3656,16 @@ func TestResolveFullyQualifiedNameToOpenAPIName(t *testing.T) {
".a.C",
".a.b.C",
},
- false,
+ "legacy",
+ },
+ {
+ ".a.b.C",
+ "b.C",
+ []string{
+ ".a.C",
+ ".a.b.C",
+ },
+ "simple",
},
{
".a.b.C",
@@ -2884,7 +3675,17 @@ func TestResolveFullyQualifiedNameToOpenAPIName(t *testing.T) {
".a.C",
".a.b.C",
},
- false,
+ "legacy",
+ },
+ {
+ ".a.b.C",
+ "b.C",
+ []string{
+ ".C",
+ ".a.C",
+ ".a.b.C",
+ },
+ "simple",
},
{
".a.b.C",
@@ -2894,16 +3695,48 @@ func TestResolveFullyQualifiedNameToOpenAPIName(t *testing.T) {
".a.C",
".a.b.C",
},
- true,
+ "fqn",
},
}
for _, data := range tests {
- names := resolveFullyQualifiedNameToOpenAPINames(data.listOfFQMNs, data.useFQNForOpenAPIName)
+ names := resolveFullyQualifiedNameToOpenAPINames(data.listOfFQMNs, data.namingStrategy)
output := names[data.input]
if output != data.output {
- t.Errorf("Expected fullyQualifiedNameToOpenAPIName(%v) to be %s but got %s",
- data.input, data.output, output)
+ t.Errorf("Expected fullyQualifiedNameToOpenAPIName(%v, %s) to be %s but got %s",
+ data.input, data.namingStrategy, data.output, output)
+ }
+ }
+}
+
+func templateToOpenAPIPath(path string, reg *descriptor.Registry, fields []*descriptor.Field, msgs []*descriptor.Message, pathParamNames map[string]string) string {
+ return partsToOpenAPIPath(templateToParts(path, reg, fields, msgs), pathParamNames)
+}
+
+func templateToRegexpMap(path string, reg *descriptor.Registry, fields []*descriptor.Field, msgs []*descriptor.Message) map[string]string {
+ return partsToRegexpMap(templateToParts(path, reg, fields, msgs))
+}
+
+func TestFQMNToRegexpMap(t *testing.T) {
+ var tests = []struct {
+ input string
+ expected map[string]string
+ }{
+ {"/test", map[string]string{}},
+ {"/{test}", map[string]string{}},
+ {"/{test" + pathParamUniqueSuffixDeliminator + "1=prefix/*}", map[string]string{"test" + pathParamUniqueSuffixDeliminator + "1": "prefix/[^/]+"}},
+ {"/{test=prefix/that/has/multiple/parts/to/it/**}", map[string]string{"test": "prefix/that/has/multiple/parts/to/it/.+"}},
+ {"/{test1=organizations/*}/{test2=divisions/*}", map[string]string{
+ "test1": "organizations/[^/]+",
+ "test2": "divisions/[^/]+",
+ }},
+ {"/v1/{name=projects/*/topics/*}:delete", map[string]string{"name": "projects/[^/]+/topics/[^/]+"}},
+ }
+ reg := descriptor.NewRegistry()
+ for _, data := range tests {
+ actual := templateToRegexpMap(data.input, reg, generateFieldsForJSONReservedName(), generateMsgsForJSONReservedName())
+ if !reflect.DeepEqual(data.expected, actual) {
+ t.Errorf("Expected partsToRegexpMap(%v) = %v, actual: %v", data.input, data.expected, actual)
}
}
}
@@ -2919,18 +3752,19 @@ func TestFQMNtoOpenAPIName(t *testing.T) {
{"/{test=prefix/that/has/multiple/parts/to/it/*}", "/{test}"},
{"/{test1}/{test2}", "/{test1}/{test2}"},
{"/{test1}/{test2}/", "/{test1}/{test2}/"},
+ {"/v1/{name=tests/*}/tests", "/v1/{name}/tests"},
}
reg := descriptor.NewRegistry()
reg.SetUseJSONNamesForFields(false)
for _, data := range tests {
- actual := templateToOpenAPIPath(data.input, reg, generateFieldsForJSONReservedName(), generateMsgsForJSONReservedName())
+ actual := templateToOpenAPIPath(data.input, reg, generateFieldsForJSONReservedName(), generateMsgsForJSONReservedName(), make(map[string]string))
if data.expected != actual {
t.Errorf("Expected templateToOpenAPIPath(%v) = %v, actual: %v", data.input, data.expected, actual)
}
}
reg.SetUseJSONNamesForFields(true)
for _, data := range tests {
- actual := templateToOpenAPIPath(data.input, reg, generateFieldsForJSONReservedName(), generateMsgsForJSONReservedName())
+ actual := templateToOpenAPIPath(data.input, reg, generateFieldsForJSONReservedName(), generateMsgsForJSONReservedName(), make(map[string]string))
if data.expected != actual {
t.Errorf("Expected templateToOpenAPIPath(%v) = %v, actual: %v", data.input, data.expected, actual)
}
@@ -2939,16 +3773,39 @@ func TestFQMNtoOpenAPIName(t *testing.T) {
func TestSchemaOfField(t *testing.T) {
type test struct {
- field *descriptor.Field
- refs refMap
- expected openapiSchemaObject
- openAPIOptions *openapiconfig.OpenAPIOptions
+ field *descriptor.Field
+ refs refMap
+ expected openapiSchemaObject
+ openAPIOptions *openapiconfig.OpenAPIOptions
+ useJSONNamesForFields bool
}
jsonSchema := &openapi_options.JSONSchema{
Title: "field title",
Description: "field description",
}
+ jsonSchemaWithOptions := &openapi_options.JSONSchema{
+ Title: "field title",
+ Description: "field description",
+ MultipleOf: 100,
+ Maximum: 101,
+ ExclusiveMaximum: true,
+ Minimum: 1,
+ ExclusiveMinimum: true,
+ MaxLength: 10,
+ MinLength: 3,
+ Pattern: "[a-z]+",
+ MaxItems: 20,
+ MinItems: 2,
+ UniqueItems: true,
+ MaxProperties: 33,
+ MinProperties: 22,
+ Required: []string{"req"},
+ ReadOnly: true,
+ }
+ jsonSchemaRequired := &openapi_options.JSONSchema{
+ Required: []string{"required_via_json_schema"},
+ }
var fieldOptions = new(descriptorpb.FieldOptions)
proto.SetExtension(fieldOptions, openapi_options.E_Openapiv2Field, jsonSchema)
@@ -2989,11 +3846,29 @@ func TestSchemaOfField(t *testing.T) {
schemaCore: schemaCore{
Type: "array",
Items: &openapiItemsObject{
- Type: "string",
+ schemaCore: schemaCore{
+ Type: "string",
+ },
},
},
},
},
+ {
+ field: &descriptor.Field{
+ FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{
+ Name: proto.String("empty_field"),
+ TypeName: proto.String(".google.protobuf.Empty"),
+ Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(),
+ },
+ },
+ refs: make(refMap),
+ expected: openapiSchemaObject{
+ schemaCore: schemaCore{
+ Type: "object",
+ },
+ Properties: &openapiSchemaObjectProperties{},
+ },
+ },
{
field: &descriptor.Field{
FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{
@@ -3069,7 +3944,9 @@ func TestSchemaOfField(t *testing.T) {
schemaCore: schemaCore{
Type: "array",
Items: &openapiItemsObject{
- Type: "string",
+ schemaCore: schemaCore{
+ Type: "string",
+ },
},
},
},
@@ -3226,9 +4103,7 @@ func TestSchemaOfField(t *testing.T) {
},
refs: make(refMap),
expected: openapiSchemaObject{
- schemaCore: schemaCore{
- Type: "object",
- },
+ schemaCore: schemaCore{},
},
},
{
@@ -3243,9 +4118,9 @@ func TestSchemaOfField(t *testing.T) {
expected: openapiSchemaObject{
schemaCore: schemaCore{
Type: "array",
- Items: (*openapiItemsObject)(&schemaCore{
+ Items: &openapiItemsObject{schemaCore: schemaCore{
Type: "object",
- }),
+ }},
},
},
},
@@ -3313,8 +4188,10 @@ func TestSchemaOfField(t *testing.T) {
refs: make(refMap),
expected: openapiSchemaObject{
schemaCore: schemaCore{
- Type: "array",
- Items: (*openapiItemsObject)(&schemaCore{Type: "string"}),
+ Type: "array",
+ Items: &openapiItemsObject{schemaCore: schemaCore{
+ Type: "string",
+ }},
},
Title: "field title",
Description: "field description",
@@ -3406,8 +4283,10 @@ func TestSchemaOfField(t *testing.T) {
refs: make(refMap),
expected: openapiSchemaObject{
schemaCore: schemaCore{
- Type: "array",
- Items: (*openapiItemsObject)(&schemaCore{Type: "string"}),
+ Type: "array",
+ Items: &openapiItemsObject{schemaCore: schemaCore{
+ Type: "string",
+ }},
},
Title: "field title",
Description: "field description",
@@ -3500,7 +4379,7 @@ func TestSchemaOfField(t *testing.T) {
{
field: &descriptor.Field{
FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{
- Name: proto.String("message_field"),
+ Name: proto.String("required_message_field"),
TypeName: proto.String(".example.Message"),
Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(),
Options: requiredFieldOptions,
@@ -3511,11 +4390,148 @@ func TestSchemaOfField(t *testing.T) {
schemaCore: schemaCore{
Ref: "#/definitions/exampleMessage",
},
+ Required: []string{"required_message_field"},
},
},
- }
- for _, test := range tests {
- reg := descriptor.NewRegistry()
+ {
+ field: &descriptor.Field{
+ FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{
+ Name: proto.String("array_field_option"),
+ Label: descriptorpb.FieldDescriptorProto_LABEL_REPEATED.Enum(),
+ Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(),
+ },
+ },
+ openAPIOptions: &openapiconfig.OpenAPIOptions{
+ Field: []*openapiconfig.OpenAPIFieldOption{
+ {
+ Field: "example.Message.array_field_option",
+ Option: jsonSchemaWithOptions,
+ },
+ },
+ },
+ refs: make(refMap),
+ expected: openapiSchemaObject{
+ schemaCore: schemaCore{
+ Type: "array",
+ Items: &openapiItemsObject{
+ schemaCore: schemaCore{
+ Type: "string",
+ },
+ MultipleOf: 100,
+ Maximum: 101,
+ ExclusiveMaximum: true,
+ Minimum: 1,
+ ExclusiveMinimum: true,
+ MaxLength: 10,
+ MinLength: 3,
+ Pattern: "[a-z]+",
+ UniqueItems: true,
+ MaxProperties: 33,
+ MinProperties: 22,
+ Required: []string{"req"},
+ ReadOnly: true,
+ },
+ },
+ Title: "field title",
+ Description: "field description",
+ MaxItems: 20,
+ MinItems: 2,
+ },
+ },
+ {
+ field: &descriptor.Field{
+ FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{
+ Name: proto.String("array_field_option"),
+ Label: descriptorpb.FieldDescriptorProto_LABEL_REPEATED.Enum(),
+ Type: descriptorpb.FieldDescriptorProto_TYPE_INT64.Enum(),
+ },
+ },
+ openAPIOptions: &openapiconfig.OpenAPIOptions{
+ Field: []*openapiconfig.OpenAPIFieldOption{
+ {
+ Field: "example.Message.array_field_option",
+ Option: jsonSchemaWithOptions,
+ },
+ },
+ },
+ refs: make(refMap),
+ expected: openapiSchemaObject{
+ schemaCore: schemaCore{
+ Type: "array",
+ Items: &openapiItemsObject{
+ schemaCore: schemaCore{
+ Type: "string",
+ Format: "int64",
+ },
+ MultipleOf: 100,
+ Maximum: 101,
+ ExclusiveMaximum: true,
+ Minimum: 1,
+ ExclusiveMinimum: true,
+ MaxLength: 10,
+ MinLength: 3,
+ Pattern: "[a-z]+",
+ UniqueItems: true,
+ MaxProperties: 33,
+ MinProperties: 22,
+ Required: []string{"req"},
+ ReadOnly: true,
+ },
+ },
+ Title: "field title",
+ Description: "field description",
+ MaxItems: 20,
+ MinItems: 2,
+ },
+ },
+ {
+ field: &descriptor.Field{
+ FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{
+ Name: proto.String("required_via_field_behavior_field_json_name"),
+ Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(),
+ JsonName: proto.String("required_field_custom_name"),
+ Options: requiredFieldOptions,
+ },
+ },
+ refs: make(refMap),
+ expected: openapiSchemaObject{
+ schemaCore: schemaCore{
+ Type: "string",
+ },
+ Required: []string{"required_field_custom_name"},
+ },
+ useJSONNamesForFields: true,
+ },
+ {
+ field: &descriptor.Field{
+ FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{
+ Name: proto.String("required_via_json_schema"),
+ Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(),
+ JsonName: proto.String("required_via_json_schema_json_name"),
+ },
+ },
+ openAPIOptions: &openapiconfig.OpenAPIOptions{
+ Field: []*openapiconfig.OpenAPIFieldOption{
+ {
+ Field: "example.Message.required_via_json_schema",
+ Option: jsonSchemaRequired,
+ },
+ },
+ },
+ refs: make(refMap),
+ useJSONNamesForFields: true,
+ expected: openapiSchemaObject{
+ schemaCore: schemaCore{
+ Type: "string",
+ },
+ Required: []string{"required_via_json_schema_json_name"},
+ },
+ },
+ }
+ for _, test := range tests {
+ reg := descriptor.NewRegistry()
+ reg.SetUseJSONNamesForFields(test.useJSONNamesForFields)
+
req := &pluginpb.CodeGeneratorRequest{
ProtoFile: []*descriptorpb.FileDescriptorProto{
{
@@ -3525,6 +4541,7 @@ func TestSchemaOfField(t *testing.T) {
GoPackage: proto.String("third_party/google"),
},
MessageType: []*descriptorpb.DescriptorProto{
+ protodesc.ToDescriptorProto((&emptypb.Empty{}).ProtoReflect().Descriptor()),
protodesc.ToDescriptorProto((&structpb.Struct{}).ProtoReflect().Descriptor()),
protodesc.ToDescriptorProto((&structpb.Value{}).ProtoReflect().Descriptor()),
protodesc.ToDescriptorProto((&structpb.ListValue{}).ProtoReflect().Descriptor()),
@@ -3657,20 +4674,29 @@ func TestRenderMessagesAsDefinition(t *testing.T) {
var fieldBehaviorOutputOnlyOptions = new(descriptorpb.FieldOptions)
proto.SetExtension(fieldBehaviorOutputOnlyOptions, annotations.E_FieldBehavior, fieldBehaviorOutputOnlyField)
+ var fieldVisibilityFieldInternal = &visibility.VisibilityRule{Restriction: "INTERNAL"}
+ var fieldVisibilityInternalOption = new(descriptorpb.FieldOptions)
+ proto.SetExtension(fieldVisibilityInternalOption, visibility.E_FieldVisibility, fieldVisibilityFieldInternal)
+
+ var fieldVisibilityFieldPreview = &visibility.VisibilityRule{Restriction: "INTERNAL,PREVIEW"}
+ var fieldVisibilityPreviewOption = new(descriptorpb.FieldOptions)
+ proto.SetExtension(fieldVisibilityPreviewOption, visibility.E_FieldVisibility, fieldVisibilityFieldPreview)
+
tests := []struct {
- descr string
- msgDescs []*descriptorpb.DescriptorProto
- schema map[string]openapi_options.Schema // per-message schema to add
- defs openapiDefinitionsObject
- openAPIOptions *openapiconfig.OpenAPIOptions
- excludedFields []*descriptor.Field
+ descr string
+ msgDescs []*descriptorpb.DescriptorProto
+ schema map[string]*openapi_options.Schema // per-message schema to add
+ defs openapiDefinitionsObject
+ openAPIOptions *openapiconfig.OpenAPIOptions
+ pathParams []descriptor.Parameter
+ UseJSONNamesForFields bool
}{
{
descr: "no OpenAPI options",
msgDescs: []*descriptorpb.DescriptorProto{
{Name: proto.String("Message")},
},
- schema: map[string]openapi_options.Schema{},
+ schema: map[string]*openapi_options.Schema{},
defs: map[string]openapiSchemaObject{
"Message": {schemaCore: schemaCore{Type: "object"}},
},
@@ -3680,7 +4706,7 @@ func TestRenderMessagesAsDefinition(t *testing.T) {
msgDescs: []*descriptorpb.DescriptorProto{
{Name: proto.String("Message")},
},
- schema: map[string]openapi_options.Schema{
+ schema: map[string]*openapi_options.Schema{
"Message": {
Example: `{"foo":"bar"}`,
},
@@ -3688,7 +4714,7 @@ func TestRenderMessagesAsDefinition(t *testing.T) {
defs: map[string]openapiSchemaObject{
"Message": {schemaCore: schemaCore{
Type: "object",
- Example: json.RawMessage(`{"foo":"bar"}`),
+ Example: RawExample(`{"foo":"bar"}`),
}},
},
},
@@ -3697,7 +4723,7 @@ func TestRenderMessagesAsDefinition(t *testing.T) {
msgDescs: []*descriptorpb.DescriptorProto{
{Name: proto.String("Message")},
},
- schema: map[string]openapi_options.Schema{
+ schema: map[string]*openapi_options.Schema{
"Message": {
Example: `XXXX anything goes XXXX`,
},
@@ -3705,7 +4731,7 @@ func TestRenderMessagesAsDefinition(t *testing.T) {
defs: map[string]openapiSchemaObject{
"Message": {schemaCore: schemaCore{
Type: "object",
- Example: json.RawMessage(`XXXX anything goes XXXX`),
+ Example: RawExample(`XXXX anything goes XXXX`),
}},
},
},
@@ -3714,7 +4740,7 @@ func TestRenderMessagesAsDefinition(t *testing.T) {
msgDescs: []*descriptorpb.DescriptorProto{
{Name: proto.String("Message")},
},
- schema: map[string]openapi_options.Schema{
+ schema: map[string]*openapi_options.Schema{
"Message": {
ExternalDocs: &openapi_options.ExternalDocumentation{
Description: "glorious docs",
@@ -3739,7 +4765,7 @@ func TestRenderMessagesAsDefinition(t *testing.T) {
msgDescs: []*descriptorpb.DescriptorProto{
{Name: proto.String("Message")},
},
- schema: map[string]openapi_options.Schema{
+ schema: map[string]*openapi_options.Schema{
"Message": {
JsonSchema: &openapi_options.JSONSchema{
Title: "title",
@@ -3852,20 +4878,31 @@ func TestRenderMessagesAsDefinition(t *testing.T) {
Name: proto.String("Message"),
Field: []*descriptorpb.FieldDescriptorProto{
{
- Name: proto.String("aRequiredField"),
+ Name: proto.String("FieldOne"),
+ Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(),
+ Number: proto.Int32(1),
+ },
+ {
+ Name: proto.String("FieldTwo"),
Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(),
- Number: proto.Int32(1),
- Options: requiredField,
+ Number: proto.Int32(2),
+ Options: requiredFieldOptions,
+ },
+ {
+ Name: proto.String("FieldThree"),
+ Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(),
+ Number: proto.Int32(3),
+ Options: requiredFieldOptions,
},
},
},
},
- schema: map[string]openapi_options.Schema{
+ schema: map[string]*openapi_options.Schema{
"Message": {
JsonSchema: &openapi_options.JSONSchema{
Title: "title",
Description: "desc",
- Required: []string{"req"},
+ Required: []string{"FieldOne", "FieldTwo"},
},
},
},
@@ -3876,17 +4913,30 @@ func TestRenderMessagesAsDefinition(t *testing.T) {
},
Title: "title",
Description: "desc",
- Required: []string{"req", "aRequiredField"},
+ Required: []string{"FieldOne", "FieldTwo", "FieldThree"},
Properties: &openapiSchemaObjectProperties{
{
- Key: "aRequiredField",
+ Key: "FieldOne",
+ Value: openapiSchemaObject{
+ schemaCore: schemaCore{
+ Type: "string",
+ },
+ },
+ },
+ {
+ Key: "FieldTwo",
+ Value: openapiSchemaObject{
+ schemaCore: schemaCore{
+ Type: "string",
+ },
+ },
+ },
+ {
+ Key: "FieldThree",
Value: openapiSchemaObject{
schemaCore: schemaCore{
Type: "string",
},
- Description: "field description",
- Title: "field title",
- Required: []string{"aRequiredField"},
},
},
},
@@ -3894,31 +4944,25 @@ func TestRenderMessagesAsDefinition(t *testing.T) {
},
},
{
- descr: "JSONSchema with excluded fields",
+ descr: "JSONSchema with required properties",
msgDescs: []*descriptorpb.DescriptorProto{
{
Name: proto.String("Message"),
Field: []*descriptorpb.FieldDescriptorProto{
{
- Name: proto.String("aRequiredField"),
+ Name: proto.String("FieldOne"),
Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(),
- Number: proto.Int32(1),
- Options: requiredField,
- },
- {
- Name: proto.String("anExcludedField"),
- Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(),
- Number: proto.Int32(2),
+ Number: proto.Int32(3),
+ Options: requiredFieldOptions,
},
},
},
},
- schema: map[string]openapi_options.Schema{
+ schema: map[string]*openapi_options.Schema{
"Message": {
JsonSchema: &openapi_options.JSONSchema{
Title: "title",
Description: "desc",
- Required: []string{"req"},
},
},
},
@@ -3929,52 +4973,91 @@ func TestRenderMessagesAsDefinition(t *testing.T) {
},
Title: "title",
Description: "desc",
- Required: []string{"req", "aRequiredField"},
+ Required: []string{"FieldOne"},
Properties: &openapiSchemaObjectProperties{
{
- Key: "aRequiredField",
+ Key: "FieldOne",
Value: openapiSchemaObject{
schemaCore: schemaCore{
Type: "string",
},
- Description: "field description",
- Title: "field title",
- Required: []string{"aRequiredField"},
},
},
},
},
},
- excludedFields: []*descriptor.Field{
+ },
+ {
+ descr: "JSONSchema with required properties by using annotations",
+ msgDescs: []*descriptorpb.DescriptorProto{
{
- FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{
- Name: strPtr("anExcludedField"),
+ Name: proto.String("Message"),
+ Field: []*descriptorpb.FieldDescriptorProto{
+ {
+ Name: proto.String("FieldOne"),
+ Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(),
+ Number: proto.Int32(2),
+ Options: requiredFieldOptions,
+ },
+ },
+ },
+ },
+ schema: map[string]*openapi_options.Schema{
+ "Message": {
+ JsonSchema: &openapi_options.JSONSchema{
+ Title: "title",
+ Description: "desc",
+ },
+ },
+ },
+ defs: map[string]openapiSchemaObject{
+ "Message": {
+ schemaCore: schemaCore{
+ Type: "object",
+ },
+ Title: "title",
+ Description: "desc",
+ Required: []string{"FieldOne"},
+ Properties: &openapiSchemaObjectProperties{
+ {
+ Key: "FieldOne",
+ Value: openapiSchemaObject{
+ schemaCore: schemaCore{
+ Type: "string",
+ },
+ },
+ },
},
},
},
},
{
- descr: "JSONSchema with required properties via field_behavior",
+ descr: "JSONSchema with hidden properties",
msgDescs: []*descriptorpb.DescriptorProto{
{
Name: proto.String("Message"),
Field: []*descriptorpb.FieldDescriptorProto{
{
- Name: proto.String("aRequiredField"),
+ Name: proto.String("aInternalField"),
Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(),
Number: proto.Int32(1),
- Options: requiredFieldOptions,
+ Options: fieldVisibilityInternalOption,
},
{
- Name: proto.String("aOutputOnlyField"),
+ Name: proto.String("aPreviewField"),
Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(),
Number: proto.Int32(2),
- Options: fieldBehaviorOutputOnlyOptions,
+ Options: fieldVisibilityPreviewOption,
+ },
+ {
+ Name: proto.String("aVisibleField"),
+ Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(),
+ Number: proto.Int32(3),
},
},
},
},
- schema: map[string]openapi_options.Schema{
+ schema: map[string]*openapi_options.Schema{
"Message": {
JsonSchema: &openapi_options.JSONSchema{
Title: "title",
@@ -3990,60 +5073,261 @@ func TestRenderMessagesAsDefinition(t *testing.T) {
},
Title: "title",
Description: "desc",
- Required: []string{"req", "aRequiredField"},
+ Required: []string{"req"},
Properties: &openapiSchemaObjectProperties{
{
- Key: "aRequiredField",
+ Key: "aPreviewField",
Value: openapiSchemaObject{
schemaCore: schemaCore{
Type: "string",
},
- Required: []string{"aRequiredField"},
},
},
{
- Key: "aOutputOnlyField",
+ Key: "aVisibleField",
Value: openapiSchemaObject{
schemaCore: schemaCore{
Type: "string",
},
- ReadOnly: true,
},
},
},
},
},
},
- }
-
- for _, test := range tests {
- t.Run(test.descr, func(t *testing.T) {
-
- msgs := []*descriptor.Message{}
- for _, msgdesc := range test.msgDescs {
- msgdesc.Options = &descriptorpb.MessageOptions{}
- msgs = append(msgs, &descriptor.Message{DescriptorProto: msgdesc})
- }
-
- reg := descriptor.NewRegistry()
- file := descriptor.File{
- FileDescriptorProto: &descriptorpb.FileDescriptorProto{
- SourceCodeInfo: &descriptorpb.SourceCodeInfo{},
- Name: proto.String("example.proto"),
- Package: proto.String("example"),
- Dependency: []string{},
- MessageType: test.msgDescs,
- EnumType: []*descriptorpb.EnumDescriptorProto{},
- Service: []*descriptorpb.ServiceDescriptorProto{},
- Options: &descriptorpb.FileOptions{
- GoPackage: proto.String("github.com/grpc-ecosystem/grpc-gateway/runtime/internal/examplepb;example"),
+ {
+ descr: "JSONSchema with path parameters",
+ msgDescs: []*descriptorpb.DescriptorProto{
+ {
+ Name: proto.String("Message"),
+ Field: []*descriptorpb.FieldDescriptorProto{
+ {
+ Name: proto.String("aRequiredField"),
+ Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(),
+ Number: proto.Int32(1),
+ Options: requiredField,
+ },
+ {
+ Name: proto.String("aPathParameter"),
+ Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(),
+ Number: proto.Int32(2),
+ },
},
},
- Messages: msgs,
- }
- err := reg.Load(&pluginpb.CodeGeneratorRequest{
- ProtoFile: []*descriptorpb.FileDescriptorProto{file.FileDescriptorProto},
+ },
+ schema: map[string]*openapi_options.Schema{
+ "Message": {
+ JsonSchema: &openapi_options.JSONSchema{
+ Title: "title",
+ Description: "desc",
+ Required: []string{"req"},
+ },
+ },
+ },
+ defs: map[string]openapiSchemaObject{
+ "Message": {
+ schemaCore: schemaCore{
+ Type: "object",
+ },
+ Title: "title",
+ Description: "desc",
+ Required: []string{"req", "aRequiredField"},
+ Properties: &openapiSchemaObjectProperties{
+ {
+ Key: "aRequiredField",
+ Value: openapiSchemaObject{
+ schemaCore: schemaCore{
+ Type: "string",
+ },
+ Description: "field description",
+ Title: "field title",
+ },
+ },
+ },
+ },
+ },
+ pathParams: []descriptor.Parameter{
+ {
+ FieldPath: descriptor.FieldPath{
+ descriptor.FieldPathComponent{
+ Name: ("aPathParameter"),
+ },
+ },
+ },
+ },
+ },
+ {
+ descr: "JSONSchema with required properties via field_behavior",
+ msgDescs: []*descriptorpb.DescriptorProto{
+ {
+ Name: proto.String("Message"),
+ Field: []*descriptorpb.FieldDescriptorProto{
+ {
+ Name: proto.String("aRequiredField"),
+ Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(),
+ Number: proto.Int32(1),
+ Options: requiredFieldOptions,
+ },
+ {
+ Name: proto.String("aOutputOnlyField"),
+ Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(),
+ Number: proto.Int32(2),
+ Options: fieldBehaviorOutputOnlyOptions,
+ },
+ },
+ },
+ },
+ schema: map[string]*openapi_options.Schema{
+ "Message": {
+ JsonSchema: &openapi_options.JSONSchema{
+ Title: "title",
+ Description: "desc",
+ Required: []string{"req"},
+ },
+ },
+ },
+ defs: map[string]openapiSchemaObject{
+ "Message": {
+ schemaCore: schemaCore{
+ Type: "object",
+ },
+ Title: "title",
+ Description: "desc",
+ Required: []string{"req", "aRequiredField"},
+ Properties: &openapiSchemaObjectProperties{
+ {
+ Key: "aRequiredField",
+ Value: openapiSchemaObject{
+ schemaCore: schemaCore{
+ Type: "string",
+ },
+ },
+ },
+ {
+ Key: "aOutputOnlyField",
+ Value: openapiSchemaObject{
+ schemaCore: schemaCore{
+ Type: "string",
+ },
+ ReadOnly: true,
+ },
+ },
+ },
+ },
+ },
+ },
+ {
+ descr: "JSONSchema with required properties and fields with json_name",
+ msgDescs: []*descriptorpb.DescriptorProto{
+ {
+ Name: proto.String("Message"),
+ Field: []*descriptorpb.FieldDescriptorProto{
+ {
+ Name: proto.String("FieldOne"),
+ Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(),
+ Number: proto.Int32(1),
+ JsonName: proto.String("custom_json_1"),
+ },
+ {
+ Name: proto.String("FieldTwo"),
+ Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(),
+ Number: proto.Int32(2),
+ JsonName: proto.String("custom_json_2"),
+ Options: requiredFieldOptions,
+ },
+ {
+ Name: proto.String("FieldThree"),
+ Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(),
+ Number: proto.Int32(3),
+ JsonName: proto.String("custom_json_3"),
+ Options: requiredFieldOptions,
+ },
+ },
+ },
+ },
+ schema: map[string]*openapi_options.Schema{
+ "Message": {
+ JsonSchema: &openapi_options.JSONSchema{
+ Title: "title",
+ Description: "desc",
+ Required: []string{"FieldOne", "FieldTwo"},
+ },
+ },
+ },
+ defs: map[string]openapiSchemaObject{
+ "Message": {
+ schemaCore: schemaCore{
+ Type: "object",
+ },
+ Title: "title",
+ Description: "desc",
+ Required: []string{"custom_json_1", "custom_json_2", "custom_json_3"},
+ Properties: &openapiSchemaObjectProperties{
+ {
+ Key: "custom_json_1",
+ Value: openapiSchemaObject{
+ schemaCore: schemaCore{
+ Type: "string",
+ },
+ },
+ },
+ {
+ Key: "custom_json_2",
+ Value: openapiSchemaObject{
+ schemaCore: schemaCore{
+ Type: "string",
+ },
+ },
+ },
+ {
+ Key: "custom_json_3",
+ Value: openapiSchemaObject{
+ schemaCore: schemaCore{
+ Type: "string",
+ },
+ },
+ },
+ },
+ },
+ },
+ UseJSONNamesForFields: true,
+ },
+ }
+
+ for _, test := range tests {
+ t.Run(test.descr, func(t *testing.T) {
+
+ msgs := []*descriptor.Message{}
+ for _, msgdesc := range test.msgDescs {
+ msgdesc.Options = &descriptorpb.MessageOptions{}
+ msgs = append(msgs, &descriptor.Message{DescriptorProto: msgdesc})
+ }
+
+ reg := descriptor.NewRegistry()
+ file := descriptor.File{
+ FileDescriptorProto: &descriptorpb.FileDescriptorProto{
+ SourceCodeInfo: &descriptorpb.SourceCodeInfo{},
+ Name: proto.String("example.proto"),
+ Package: proto.String("example"),
+ Dependency: []string{},
+ MessageType: test.msgDescs,
+ EnumType: []*descriptorpb.EnumDescriptorProto{},
+ Service: []*descriptorpb.ServiceDescriptorProto{},
+ Options: &descriptorpb.FileOptions{
+ GoPackage: proto.String("github.com/grpc-ecosystem/grpc-gateway/runtime/internal/examplepb;example"),
+ },
+ },
+ Messages: msgs,
+ }
+ err := reg.Load(&pluginpb.CodeGeneratorRequest{
+ ProtoFile: []*descriptorpb.FileDescriptorProto{file.FileDescriptorProto},
})
+ reg.SetVisibilityRestrictionSelectors([]string{"PREVIEW"})
+
+ if test.UseJSONNamesForFields {
+ reg.SetUseJSONNamesForFields(true)
+ }
+
if err != nil {
t.Fatalf("failed to load code generator request: %v", err)
}
@@ -4058,7 +5342,7 @@ func TestRenderMessagesAsDefinition(t *testing.T) {
msgMap[msg.FQMN()] = msg
if schema, ok := test.schema[name]; ok {
- proto.SetExtension(d.Options, openapi_options.E_Openapiv2Schema, &schema)
+ proto.SetExtension(d.Options, openapi_options.E_Openapiv2Schema, schema)
}
}
@@ -4070,7 +5354,9 @@ func TestRenderMessagesAsDefinition(t *testing.T) {
refs := make(refMap)
actual := make(openapiDefinitionsObject)
- renderMessagesAsDefinition(msgMap, actual, reg, refs, test.excludedFields)
+ if err := renderMessagesAsDefinition(msgMap, actual, reg, refs, test.pathParams); err != nil {
+ t.Errorf("renderMessagesAsDefinition failed with: %s", err)
+ }
if !reflect.DeepEqual(actual, test.defs) {
t.Errorf("Expected renderMessagesAsDefinition() to add defs %+v, not %+v", test.defs, actual)
@@ -4079,10 +5365,6 @@ func TestRenderMessagesAsDefinition(t *testing.T) {
}
}
-func strPtr(s string) *string {
- return &s
-}
-
func TestUpdateOpenAPIDataFromComments(t *testing.T) {
tests := []struct {
@@ -4254,7 +5536,7 @@ func TestMessageOptionsWithGoTemplate(t *testing.T) {
tests := []struct {
descr string
msgDescs []*descriptorpb.DescriptorProto
- schema map[string]openapi_options.Schema // per-message schema to add
+ schema map[string]*openapi_options.Schema // per-message schema to add
defs openapiDefinitionsObject
openAPIOptions *openapiconfig.OpenAPIOptions
useGoTemplate bool
@@ -4264,7 +5546,7 @@ func TestMessageOptionsWithGoTemplate(t *testing.T) {
msgDescs: []*descriptorpb.DescriptorProto{
{Name: proto.String("Message")},
},
- schema: map[string]openapi_options.Schema{
+ schema: map[string]*openapi_options.Schema{
"Message": {
JsonSchema: &openapi_options.JSONSchema{
Title: "{{.Name}}",
@@ -4294,7 +5576,7 @@ func TestMessageOptionsWithGoTemplate(t *testing.T) {
msgDescs: []*descriptorpb.DescriptorProto{
{Name: proto.String("Message")},
},
- schema: map[string]openapi_options.Schema{
+ schema: map[string]*openapi_options.Schema{
"Message": {
JsonSchema: &openapi_options.JSONSchema{
Title: "{{.Name}}",
@@ -4399,7 +5681,7 @@ func TestMessageOptionsWithGoTemplate(t *testing.T) {
msgMap[msg.FQMN()] = msg
if schema, ok := test.schema[name]; ok {
- proto.SetExtension(d.Options, openapi_options.E_Openapiv2Schema, &schema)
+ proto.SetExtension(d.Options, openapi_options.E_Openapiv2Schema, schema)
}
}
@@ -4411,7 +5693,9 @@ func TestMessageOptionsWithGoTemplate(t *testing.T) {
refs := make(refMap)
actual := make(openapiDefinitionsObject)
- renderMessagesAsDefinition(msgMap, actual, reg, refs, nil)
+ if err := renderMessagesAsDefinition(msgMap, actual, reg, refs, nil); err != nil {
+ t.Errorf("renderMessagesAsDefinition failed with: %s", err)
+ }
if !reflect.DeepEqual(actual, test.defs) {
t.Errorf("Expected renderMessagesAsDefinition() to add defs %+v, not %+v", test.defs, actual)
@@ -4509,52 +5793,1163 @@ func TestTemplateWithoutErrorDefinition(t *testing.T) {
}
}
-func Test_getReservedJsonName(t *testing.T) {
- type args struct {
- fieldName string
- messageNameToFieldsToJSONName map[string]map[string]string
- fieldNameToType map[string]string
+func TestTemplateWithInvalidDuplicateOperations(t *testing.T) {
+ msgdesc := &descriptorpb.DescriptorProto{
+ Name: proto.String("ExampleMessage"),
+ Field: []*descriptorpb.FieldDescriptorProto{},
}
- tests := []struct {
- name string
- args args
- want string
- }{
- {
- "test case 1: single dot use case",
- args{
- fieldName: "abc.a_1",
- messageNameToFieldsToJSONName: map[string]map[string]string{
- "Msg": {
- "a_1": "a1JSONNAME",
- "b_1": "b1JSONNAME",
- },
- },
- fieldNameToType: map[string]string{
- "abc": "pkg1.test.Msg",
- "bcd": "pkg1.test.Msg",
- },
- },
- "a1JSONNAME",
- },
- {
- "test case 2: single dot use case with no existing field",
- args{
- fieldName: "abc.d_1",
- messageNameToFieldsToJSONName: map[string]map[string]string{
- "Msg": {
- "a_1": "a1JSONNAME",
- "b_1": "b1JSONNAME",
- },
- },
- fieldNameToType: map[string]string{
- "abc": "pkg1.test.Msg",
- "bcd": "pkg1.test.Msg",
- },
+ meth1 := &descriptorpb.MethodDescriptorProto{
+ Name: proto.String("Method1"),
+ InputType: proto.String("ExampleMessage"),
+ OutputType: proto.String("ExampleMessage"),
+ }
+ meth2 := &descriptorpb.MethodDescriptorProto{
+ Name: proto.String("Method2"),
+ InputType: proto.String("ExampleMessage"),
+ OutputType: proto.String("ExampleMessage"),
+ }
+ svc1 := &descriptorpb.ServiceDescriptorProto{
+ Name: proto.String("Service1"),
+ Method: []*descriptorpb.MethodDescriptorProto{meth1, meth2},
+ }
+
+ msg := &descriptor.Message{
+ DescriptorProto: msgdesc,
+ }
+
+ file := descriptor.File{
+ FileDescriptorProto: &descriptorpb.FileDescriptorProto{
+ SourceCodeInfo: &descriptorpb.SourceCodeInfo{},
+ Name: proto.String("service1.proto"),
+ Package: proto.String("example"),
+ MessageType: []*descriptorpb.DescriptorProto{msgdesc},
+ Service: []*descriptorpb.ServiceDescriptorProto{svc1},
+ Options: &descriptorpb.FileOptions{
+ GoPackage: proto.String("github.com/grpc-ecosystem/grpc-gateway/runtime/internal/examplepb;example"),
},
- "",
},
- {
+ GoPkg: descriptor.GoPackage{
+ Path: "example.com/path/to/example/example.pb",
+ Name: "example_pb",
+ },
+ Messages: []*descriptor.Message{msg},
+ Services: []*descriptor.Service{
+ {
+ ServiceDescriptorProto: svc1,
+ Methods: []*descriptor.Method{
+ {
+ MethodDescriptorProto: meth1,
+ RequestType: msg,
+ ResponseType: msg,
+ Bindings: []*descriptor.Binding{
+ {
+ HTTPMethod: "GET",
+ PathTmpl: httprule.Template{
+ Version: 1,
+ OpCodes: []int{0, 0},
+ Template: "/v1/{name=organizations/*}/roles",
+ },
+ Body: &descriptor.Body{
+ FieldPath: descriptor.FieldPath([]descriptor.FieldPathComponent{}),
+ },
+ },
+ },
+ },
+ {
+ MethodDescriptorProto: meth2,
+ RequestType: msg,
+ ResponseType: msg,
+ Bindings: []*descriptor.Binding{
+ {
+ HTTPMethod: "GET",
+ PathTmpl: httprule.Template{
+ Version: 1,
+ OpCodes: []int{0, 0},
+ Template: "/v1/{name=users/*}/roles",
+ },
+ Body: &descriptor.Body{
+ FieldPath: descriptor.FieldPath([]descriptor.FieldPathComponent{}),
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ }
+ reg := descriptor.NewRegistry()
+ err := reg.Load(&pluginpb.CodeGeneratorRequest{ProtoFile: []*descriptorpb.FileDescriptorProto{file.FileDescriptorProto}})
+ if err != nil {
+ t.Errorf("failed to reg.Load(): %v", err)
+ return
+ }
+ if stdErr, err := captureStderr(func() error {
+ swagger, err := applyTemplate(param{File: crossLinkFixture(&file), reg: reg})
+ if opid := swagger.Paths["/v1/{name}/roles"].Get.OperationID; opid != "Service1_Method2" {
+ t.Errorf("Swagger should use last in wins for the service methods: %s", opid)
+ }
+ return err
+ }); !strings.Contains(stdErr, "Duplicate mapping for path GET /v1/{name}/roles") {
+ t.Errorf("Error for duplicate mapping was incorrect: %s", stdErr)
+ } else if err != nil {
+ t.Error(err)
+ }
+}
+func TestSingleServiceTemplateWithDuplicateHttp1Operations(t *testing.T) {
+ fieldType := descriptorpb.FieldDescriptorProto_TYPE_STRING
+ field1 := &descriptorpb.FieldDescriptorProto{
+ Name: proto.String("name"),
+ Number: proto.Int32(1),
+ Type: &fieldType,
+ }
+
+ getFooMsgDesc := &descriptorpb.DescriptorProto{
+ Name: proto.String("GetFooRequest"),
+ Field: []*descriptorpb.FieldDescriptorProto{
+ field1,
+ },
+ }
+ getFooMsg := &descriptor.Message{
+ DescriptorProto: getFooMsgDesc,
+ }
+ deleteFooMsgDesc := &descriptorpb.DescriptorProto{
+ Name: proto.String("DeleteFooRequest"),
+ Field: []*descriptorpb.FieldDescriptorProto{
+ field1,
+ },
+ }
+ deleteFooMsg := &descriptor.Message{
+ DescriptorProto: deleteFooMsgDesc,
+ }
+ getFoo := &descriptorpb.MethodDescriptorProto{
+ Name: proto.String("GetFoo"),
+ InputType: proto.String("GetFooRequest"),
+ OutputType: proto.String("EmptyMessage"),
+ }
+ deleteFoo := &descriptorpb.MethodDescriptorProto{
+ Name: proto.String("DeleteFoo"),
+ InputType: proto.String("DeleteFooRequest"),
+ OutputType: proto.String("EmptyMessage"),
+ }
+
+ getBarMsgDesc := &descriptorpb.DescriptorProto{
+ Name: proto.String("GetBarRequest"),
+ Field: []*descriptorpb.FieldDescriptorProto{
+ field1,
+ },
+ }
+ getBarMsg := &descriptor.Message{
+ DescriptorProto: getBarMsgDesc,
+ }
+ deleteBarMsgDesc := &descriptorpb.DescriptorProto{
+ Name: proto.String("DeleteBarRequest"),
+ Field: []*descriptorpb.FieldDescriptorProto{
+ field1,
+ },
+ }
+ deleteBarMsg := &descriptor.Message{
+ DescriptorProto: deleteBarMsgDesc,
+ }
+ getBar := &descriptorpb.MethodDescriptorProto{
+ Name: proto.String("GetBar"),
+ InputType: proto.String("GetBarRequest"),
+ OutputType: proto.String("EmptyMessage"),
+ }
+ deleteBar := &descriptorpb.MethodDescriptorProto{
+ Name: proto.String("DeleteBar"),
+ InputType: proto.String("DeleteBarRequest"),
+ OutputType: proto.String("EmptyMessage"),
+ }
+
+ svc1 := &descriptorpb.ServiceDescriptorProto{
+ Name: proto.String("Service1"),
+ Method: []*descriptorpb.MethodDescriptorProto{getFoo, deleteFoo, getBar, deleteBar},
+ }
+
+ emptyMsgDesc := &descriptorpb.DescriptorProto{
+ Name: proto.String("EmptyMessage"),
+ }
+ emptyMsg := &descriptor.Message{
+ DescriptorProto: emptyMsgDesc,
+ }
+
+ file := descriptor.File{
+ FileDescriptorProto: &descriptorpb.FileDescriptorProto{
+ SourceCodeInfo: &descriptorpb.SourceCodeInfo{},
+ Name: proto.String("service1.proto"),
+ Package: proto.String("example"),
+ MessageType: []*descriptorpb.DescriptorProto{getBarMsgDesc, deleteBarMsgDesc, getFooMsgDesc, deleteFooMsgDesc, emptyMsgDesc},
+ Service: []*descriptorpb.ServiceDescriptorProto{svc1},
+ Options: &descriptorpb.FileOptions{
+ GoPackage: proto.String("github.com/grpc-ecosystem/grpc-gateway/runtime/internal/examplepb;example"),
+ },
+ },
+ GoPkg: descriptor.GoPackage{
+ Path: "example.com/path/to/example/example.pb",
+ Name: "example_pb",
+ },
+ Messages: []*descriptor.Message{getFooMsg, deleteFooMsg, getBarMsg, deleteBarMsg, emptyMsg},
+ Services: []*descriptor.Service{
+ {
+ ServiceDescriptorProto: svc1,
+ Methods: []*descriptor.Method{
+ {
+ MethodDescriptorProto: getFoo,
+ RequestType: getFooMsg,
+ ResponseType: getFooMsg,
+ Bindings: []*descriptor.Binding{
+ {
+ HTTPMethod: "GET",
+ PathTmpl: httprule.Template{
+ Version: 1,
+ OpCodes: []int{0, 0},
+ Template: "/v1/{name=foos/*}",
+ },
+ PathParams: []descriptor.Parameter{
+ {
+ Target: &descriptor.Field{
+ FieldDescriptorProto: field1,
+ Message: getFooMsg,
+ },
+ FieldPath: descriptor.FieldPath{
+ {
+ Name: "name",
+ },
+ },
+ },
+ },
+ Body: &descriptor.Body{
+ FieldPath: descriptor.FieldPath([]descriptor.FieldPathComponent{}),
+ },
+ },
+ },
+ },
+ {
+ MethodDescriptorProto: deleteFoo,
+ RequestType: deleteFooMsg,
+ ResponseType: emptyMsg,
+ Bindings: []*descriptor.Binding{
+ {
+ HTTPMethod: "DELETE",
+ PathTmpl: httprule.Template{
+ Version: 1,
+ OpCodes: []int{0, 0},
+ Template: "/v1/{name=foos/*}",
+ },
+ PathParams: []descriptor.Parameter{
+ {
+ Target: &descriptor.Field{
+ FieldDescriptorProto: field1,
+ Message: deleteFooMsg,
+ },
+ FieldPath: descriptor.FieldPath{
+ {
+ Name: "name",
+ },
+ },
+ },
+ },
+ Body: &descriptor.Body{
+ FieldPath: descriptor.FieldPath([]descriptor.FieldPathComponent{}),
+ },
+ },
+ },
+ },
+ {
+ MethodDescriptorProto: getBar,
+ RequestType: getBarMsg,
+ ResponseType: getBarMsg,
+ Bindings: []*descriptor.Binding{
+ {
+ HTTPMethod: "GET",
+ PathTmpl: httprule.Template{
+ Version: 1,
+ OpCodes: []int{0, 0},
+ Template: "/v1/{name=bars/*}",
+ },
+ PathParams: []descriptor.Parameter{
+ {
+ Target: &descriptor.Field{
+ FieldDescriptorProto: field1,
+ Message: getBarMsg,
+ },
+ FieldPath: descriptor.FieldPath{
+ {
+ Name: "name",
+ },
+ },
+ },
+ },
+ Body: &descriptor.Body{
+ FieldPath: descriptor.FieldPath([]descriptor.FieldPathComponent{}),
+ },
+ },
+ },
+ },
+ {
+ MethodDescriptorProto: deleteBar,
+ RequestType: deleteBarMsg,
+ ResponseType: emptyMsg,
+ Bindings: []*descriptor.Binding{
+ {
+ HTTPMethod: "DELETE",
+ PathTmpl: httprule.Template{
+ Version: 1,
+ OpCodes: []int{0, 0},
+ Template: "/v1/{name=bars/*}",
+ },
+ PathParams: []descriptor.Parameter{
+ {
+ Target: &descriptor.Field{
+ FieldDescriptorProto: field1,
+ Message: deleteBarMsg,
+ },
+ FieldPath: descriptor.FieldPath{
+ {
+ Name: "name",
+ },
+ },
+ },
+ },
+ Body: &descriptor.Body{
+ FieldPath: descriptor.FieldPath([]descriptor.FieldPathComponent{}),
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ }
+ reg := descriptor.NewRegistry()
+ err := reg.Load(&pluginpb.CodeGeneratorRequest{ProtoFile: []*descriptorpb.FileDescriptorProto{file.FileDescriptorProto}})
+ if err != nil {
+ t.Fatalf("failed to reg.Load(): %v", err)
+ }
+ result, err := applyTemplate(param{File: crossLinkFixture(&file), reg: reg})
+ if err != nil {
+ t.Fatalf("applyTemplate(%#v) failed with %v; want success", file, err)
+ }
+
+ if got, want := len(result.Paths), 2; got != want {
+ t.Fatalf("Results path length differed, got %d want %d", got, want)
+ }
+
+ firstOpGet := result.Paths["/v1/{name}"].Get
+ if got, want := firstOpGet.OperationID, "Service1_GetFoo"; got != want {
+ t.Fatalf("First operation GET id differed, got %s want %s", got, want)
+ }
+ if got, want := len(firstOpGet.Parameters), 2; got != want {
+ t.Fatalf("First operation GET params length differed, got %d want %d", got, want)
+ }
+ if got, want := firstOpGet.Parameters[0].Name, "name"; got != want {
+ t.Fatalf("First operation GET first param name differed, got %s want %s", got, want)
+ }
+ if got, want := firstOpGet.Parameters[0].Pattern, "foos/[^/]+"; got != want {
+ t.Fatalf("First operation GET first param pattern differed, got %s want %s", got, want)
+ }
+ if got, want := firstOpGet.Parameters[1].In, "body"; got != want {
+ t.Fatalf("First operation GET second param 'in' differed, got %s want %s", got, want)
+ }
+
+ firstOpDelete := result.Paths["/v1/{name}"].Delete
+ if got, want := firstOpDelete.OperationID, "Service1_DeleteFoo"; got != want {
+ t.Fatalf("First operation id DELETE differed, got %s want %s", got, want)
+ }
+ if got, want := len(firstOpDelete.Parameters), 2; got != want {
+ t.Fatalf("First operation DELETE params length differed, got %d want %d", got, want)
+ }
+ if got, want := firstOpDelete.Parameters[0].Name, "name"; got != want {
+ t.Fatalf("First operation DELETE first param name differed, got %s want %s", got, want)
+ }
+ if got, want := firstOpDelete.Parameters[0].Pattern, "foos/[^/]+"; got != want {
+ t.Fatalf("First operation DELETE first param pattern differed, got %s want %s", got, want)
+ }
+ if got, want := firstOpDelete.Parameters[1].In, "body"; got != want {
+ t.Fatalf("First operation DELETE second param 'in' differed, got %s want %s", got, want)
+ }
+
+ secondOpGet := result.Paths["/v1/{name"+pathParamUniqueSuffixDeliminator+"1}"].Get
+ if got, want := secondOpGet.OperationID, "Service1_GetBar"; got != want {
+ t.Fatalf("Second operation id GET differed, got %s want %s", got, want)
+ }
+ if got, want := len(secondOpGet.Parameters), 2; got != want {
+ t.Fatalf("Second operation GET params length differed, got %d want %d", got, want)
+ }
+ if got, want := secondOpGet.Parameters[0].Name, "name"+pathParamUniqueSuffixDeliminator+"1"; got != want {
+ t.Fatalf("Second operation GET first param name differed, got %s want %s", got, want)
+ }
+ if got, want := secondOpGet.Parameters[0].Pattern, "bars/[^/]+"; got != want {
+ t.Fatalf("Second operation GET first param pattern differed, got %s want %s", got, want)
+ }
+ if got, want := secondOpGet.Parameters[1].In, "body"; got != want {
+ t.Fatalf("Second operation GET second param 'in' differed, got %s want %s", got, want)
+ }
+
+ secondOpDelete := result.Paths["/v1/{name"+pathParamUniqueSuffixDeliminator+"1}"].Delete
+ if got, want := secondOpDelete.OperationID, "Service1_DeleteBar"; got != want {
+ t.Fatalf("Second operation id differed, got %s want %s", got, want)
+ }
+ if got, want := len(secondOpDelete.Parameters), 2; got != want {
+ t.Fatalf("Second operation params length differed, got %d want %d", got, want)
+ }
+ if got, want := secondOpDelete.Parameters[0].Name, "name"+pathParamUniqueSuffixDeliminator+"1"; got != want {
+ t.Fatalf("Second operation first param name differed, got %s want %s", got, want)
+ }
+ if got, want := secondOpDelete.Parameters[0].Pattern, "bars/[^/]+"; got != want {
+ t.Fatalf("Second operation first param pattern differed, got %s want %s", got, want)
+ }
+ if got, want := secondOpDelete.Parameters[1].In, "body"; got != want {
+ t.Fatalf("Second operation third param 'in' differed, got %s want %s", got, want)
+ }
+}
+
+func getOperation(pathItem openapiPathItemObject, httpMethod string) *openapiOperationObject {
+ switch httpMethod {
+ case "GET":
+ return pathItem.Get
+ case "POST":
+ return pathItem.Post
+ case "PUT":
+ return pathItem.Put
+ case "DELETE":
+ return pathItem.Delete
+ case "PATCH":
+ return pathItem.Patch
+ case "HEAD":
+ return pathItem.Head
+ case "OPTIONS":
+ return pathItem.Options
+ default:
+ return nil
+ }
+}
+
+func TestSingleServiceTemplateWithDuplicateInAllSupportedHttp1Operations(t *testing.T) {
+ supportedMethods := []string{"GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"}
+
+ for _, method := range supportedMethods {
+ fieldType := descriptorpb.FieldDescriptorProto_TYPE_STRING
+ field1 := &descriptorpb.FieldDescriptorProto{
+ Name: proto.String("name"),
+ Number: proto.Int32(1),
+ Type: &fieldType,
+ }
+
+ methodFooMsgDesc := &descriptorpb.DescriptorProto{
+ Name: proto.String(method + "FooRequest"),
+ Field: []*descriptorpb.FieldDescriptorProto{
+ field1,
+ },
+ }
+ methodFooMsg := &descriptor.Message{
+ DescriptorProto: methodFooMsgDesc,
+ }
+ methodFoo := &descriptorpb.MethodDescriptorProto{
+ Name: proto.String(method + "Foo"),
+ InputType: proto.String(method + "FooRequest"),
+ OutputType: proto.String("EmptyMessage"),
+ }
+
+ methodBarMsgDesc := &descriptorpb.DescriptorProto{
+ Name: proto.String(method + "BarRequest"),
+ Field: []*descriptorpb.FieldDescriptorProto{
+ field1,
+ },
+ }
+ methodBarMsg := &descriptor.Message{
+ DescriptorProto: methodBarMsgDesc,
+ }
+ methodBar := &descriptorpb.MethodDescriptorProto{
+ Name: proto.String(method + "Bar"),
+ InputType: proto.String(method + "BarRequest"),
+ OutputType: proto.String("EmptyMessage"),
+ }
+
+ svc1 := &descriptorpb.ServiceDescriptorProto{
+ Name: proto.String("Service1"),
+ Method: []*descriptorpb.MethodDescriptorProto{methodFoo, methodBar},
+ }
+
+ emptyMsgDesc := &descriptorpb.DescriptorProto{
+ Name: proto.String("EmptyMessage"),
+ }
+ emptyMsg := &descriptor.Message{
+ DescriptorProto: emptyMsgDesc,
+ }
+
+ file := descriptor.File{
+ FileDescriptorProto: &descriptorpb.FileDescriptorProto{
+ SourceCodeInfo: &descriptorpb.SourceCodeInfo{},
+ Name: proto.String("service1.proto"),
+ Package: proto.String("example"),
+ MessageType: []*descriptorpb.DescriptorProto{methodBarMsgDesc, methodFooMsgDesc, emptyMsgDesc},
+ Service: []*descriptorpb.ServiceDescriptorProto{svc1},
+ Options: &descriptorpb.FileOptions{
+ GoPackage: proto.String("github.com/grpc-ecosystem/grpc-gateway/runtime/internal/examplepb;example"),
+ },
+ },
+ GoPkg: descriptor.GoPackage{
+ Path: "example.com/path/to/example/example.pb",
+ Name: "example_pb",
+ },
+ Messages: []*descriptor.Message{methodFooMsg, methodBarMsg, emptyMsg},
+ Services: []*descriptor.Service{
+ {
+ ServiceDescriptorProto: svc1,
+ Methods: []*descriptor.Method{
+ {
+ MethodDescriptorProto: methodFoo,
+ RequestType: methodFooMsg,
+ ResponseType: methodFooMsg,
+ Bindings: []*descriptor.Binding{
+ {
+ HTTPMethod: method,
+ PathTmpl: httprule.Template{
+ Version: 1,
+ OpCodes: []int{0, 0},
+ Template: "/v1/{name=foos/*}",
+ },
+ PathParams: []descriptor.Parameter{
+ {
+ Target: &descriptor.Field{
+ FieldDescriptorProto: field1,
+ Message: methodFooMsg,
+ },
+ FieldPath: descriptor.FieldPath{
+ {
+ Name: "name",
+ },
+ },
+ },
+ },
+ Body: &descriptor.Body{
+ FieldPath: descriptor.FieldPath([]descriptor.FieldPathComponent{}),
+ },
+ },
+ },
+ },
+ {
+ MethodDescriptorProto: methodBar,
+ RequestType: methodBarMsg,
+ ResponseType: methodBarMsg,
+ Bindings: []*descriptor.Binding{
+ {
+ HTTPMethod: method,
+ PathTmpl: httprule.Template{
+ Version: 1,
+ OpCodes: []int{0, 0},
+ Template: "/v1/{name=bars/*}",
+ },
+ PathParams: []descriptor.Parameter{
+ {
+ Target: &descriptor.Field{
+ FieldDescriptorProto: field1,
+ Message: methodBarMsg,
+ },
+ FieldPath: descriptor.FieldPath{
+ {
+ Name: "name",
+ },
+ },
+ },
+ },
+ Body: &descriptor.Body{
+ FieldPath: descriptor.FieldPath([]descriptor.FieldPathComponent{}),
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ }
+ reg := descriptor.NewRegistry()
+ err := reg.Load(&pluginpb.CodeGeneratorRequest{ProtoFile: []*descriptorpb.FileDescriptorProto{file.FileDescriptorProto}})
+ if err != nil {
+ t.Fatalf("failed to reg.Load(): %v", err)
+ }
+ result, err := applyTemplate(param{File: crossLinkFixture(&file), reg: reg})
+ if err != nil {
+ t.Fatalf("applyTemplate(%#v) failed with %v; want success", file, err)
+ }
+
+ if got, want := len(result.Paths), 2; got != want {
+ t.Fatalf("Results path length differed, got %d want %d", got, want)
+ }
+
+ firstOpMethod := getOperation(result.Paths["/v1/{name}"], method)
+ if got, want := firstOpMethod.OperationID, "Service1_"+method+"Foo"; got != want {
+ t.Fatalf("First operation %s id differed, got %s want %s", method, got, want)
+ }
+ if got, want := len(firstOpMethod.Parameters), 2; got != want {
+ t.Fatalf("First operation %s params length differed, got %d want %d", method, got, want)
+ }
+ if got, want := firstOpMethod.Parameters[0].Name, "name"; got != want {
+ t.Fatalf("First operation %s first param name differed, got %s want %s", method, got, want)
+ }
+ if got, want := firstOpMethod.Parameters[0].Pattern, "foos/[^/]+"; got != want {
+ t.Fatalf("First operation %s first param pattern differed, got %s want %s", method, got, want)
+ }
+ if got, want := firstOpMethod.Parameters[1].In, "body"; got != want {
+ t.Fatalf("First operation %s second param 'in' differed, got %s want %s", method, got, want)
+ }
+
+ secondOpMethod := getOperation(result.Paths["/v1/{name"+pathParamUniqueSuffixDeliminator+"1}"], method)
+ if got, want := secondOpMethod.OperationID, "Service1_"+method+"Bar"; got != want {
+ t.Fatalf("Second operation id %s differed, got %s want %s", method, got, want)
+ }
+ if got, want := len(secondOpMethod.Parameters), 2; got != want {
+ t.Fatalf("Second operation %s params length differed, got %d want %d", method, got, want)
+ }
+ if got, want := secondOpMethod.Parameters[0].Name, "name"+pathParamUniqueSuffixDeliminator+"1"; got != want {
+ t.Fatalf("Second operation %s first param name differed, got %s want %s", method, got, want)
+ }
+ if got, want := secondOpMethod.Parameters[0].Pattern, "bars/[^/]+"; got != want {
+ t.Fatalf("Second operation %s first param pattern differed, got %s want %s", method, got, want)
+ }
+ if got, want := secondOpMethod.Parameters[1].In, "body"; got != want {
+ t.Fatalf("Second operation %s second param 'in' differed, got %s want %s", method, got, want)
+ }
+ }
+}
+
+func TestSingleServiceTemplateWithDuplicateHttp1UnsupportedOperations(t *testing.T) {
+ fieldType := descriptorpb.FieldDescriptorProto_TYPE_STRING
+ field1 := &descriptorpb.FieldDescriptorProto{
+ Name: proto.String("name"),
+ Number: proto.Int32(1),
+ Type: &fieldType,
+ }
+
+ unsupportedFooMsgDesc := &descriptorpb.DescriptorProto{
+ Name: proto.String("UnsupportedFooRequest"),
+ Field: []*descriptorpb.FieldDescriptorProto{
+ field1,
+ },
+ }
+ unsupportedFooMsg := &descriptor.Message{
+ DescriptorProto: unsupportedFooMsgDesc,
+ }
+ unsupportedFoo := &descriptorpb.MethodDescriptorProto{
+ Name: proto.String("UnsupportedFoo"),
+ InputType: proto.String("UnsupportedFooRequest"),
+ OutputType: proto.String("EmptyMessage"),
+ }
+
+ unsupportedBarMsgDesc := &descriptorpb.DescriptorProto{
+ Name: proto.String("UnsupportedBarRequest"),
+ Field: []*descriptorpb.FieldDescriptorProto{
+ field1,
+ },
+ }
+ unsupportedBarMsg := &descriptor.Message{
+ DescriptorProto: unsupportedBarMsgDesc,
+ }
+ unsupportedBar := &descriptorpb.MethodDescriptorProto{
+ Name: proto.String("UnsupportedBar"),
+ InputType: proto.String("UnsupportedBarRequest"),
+ OutputType: proto.String("EmptyMessage"),
+ }
+
+ svc1 := &descriptorpb.ServiceDescriptorProto{
+ Name: proto.String("Service1"),
+ Method: []*descriptorpb.MethodDescriptorProto{unsupportedFoo, unsupportedBar},
+ }
+
+ emptyMsgDesc := &descriptorpb.DescriptorProto{
+ Name: proto.String("EmptyMessage"),
+ }
+ emptyMsg := &descriptor.Message{
+ DescriptorProto: emptyMsgDesc,
+ }
+
+ file := descriptor.File{
+ FileDescriptorProto: &descriptorpb.FileDescriptorProto{
+ SourceCodeInfo: &descriptorpb.SourceCodeInfo{},
+ Name: proto.String("service1.proto"),
+ Package: proto.String("example"),
+ MessageType: []*descriptorpb.DescriptorProto{unsupportedBarMsgDesc, unsupportedFooMsgDesc, emptyMsgDesc},
+ Service: []*descriptorpb.ServiceDescriptorProto{svc1},
+ Options: &descriptorpb.FileOptions{
+ GoPackage: proto.String("github.com/grpc-ecosystem/grpc-gateway/runtime/internal/examplepb;example"),
+ },
+ },
+ GoPkg: descriptor.GoPackage{
+ Path: "example.com/path/to/example/example.pb",
+ Name: "example_pb",
+ },
+ Messages: []*descriptor.Message{unsupportedFooMsg, unsupportedBarMsg, emptyMsg},
+ Services: []*descriptor.Service{
+ {
+ ServiceDescriptorProto: svc1,
+ Methods: []*descriptor.Method{
+ {
+ MethodDescriptorProto: unsupportedFoo,
+ RequestType: unsupportedFooMsg,
+ ResponseType: unsupportedFooMsg,
+ Bindings: []*descriptor.Binding{
+ {
+ HTTPMethod: "UNSUPPORTED",
+ PathTmpl: httprule.Template{
+ Version: 1,
+ OpCodes: []int{0, 0},
+ Template: "/v1/{name=foos/*}",
+ },
+ PathParams: []descriptor.Parameter{
+ {
+ Target: &descriptor.Field{
+ FieldDescriptorProto: field1,
+ Message: unsupportedFooMsg,
+ },
+ FieldPath: descriptor.FieldPath{
+ {
+ Name: "name",
+ },
+ },
+ },
+ },
+ Body: &descriptor.Body{
+ FieldPath: descriptor.FieldPath([]descriptor.FieldPathComponent{}),
+ },
+ },
+ },
+ },
+ {
+ MethodDescriptorProto: unsupportedBar,
+ RequestType: unsupportedBarMsg,
+ ResponseType: unsupportedBarMsg,
+ Bindings: []*descriptor.Binding{
+ {
+ HTTPMethod: "UNSUPPORTED",
+ PathTmpl: httprule.Template{
+ Version: 1,
+ OpCodes: []int{0, 0},
+ Template: "/v1/{name=bars/*}",
+ },
+ PathParams: []descriptor.Parameter{
+ {
+ Target: &descriptor.Field{
+ FieldDescriptorProto: field1,
+ Message: unsupportedBarMsg,
+ },
+ FieldPath: descriptor.FieldPath{
+ {
+ Name: "name",
+ },
+ },
+ },
+ },
+ Body: &descriptor.Body{
+ FieldPath: descriptor.FieldPath([]descriptor.FieldPathComponent{}),
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ }
+ reg := descriptor.NewRegistry()
+ err := reg.Load(&pluginpb.CodeGeneratorRequest{ProtoFile: []*descriptorpb.FileDescriptorProto{file.FileDescriptorProto}})
+ if err != nil {
+ t.Fatalf("failed to reg.Load(): %v", err)
+ }
+ result, err := applyTemplate(param{File: crossLinkFixture(&file), reg: reg})
+ if err != nil {
+ t.Fatalf("applyTemplate(%#v) failed with %v; want success", file, err)
+ }
+
+ // Just should not crash, no special handling of unsupported HTTP methods
+ if got, want := len(result.Paths), 1; got != want {
+ t.Fatalf("Results path length differed, got %d want %d", got, want)
+ }
+}
+
+func TestTemplateWithDuplicateHttp1Operations(t *testing.T) {
+ fieldType := descriptorpb.FieldDescriptorProto_TYPE_STRING
+ field1 := &descriptorpb.FieldDescriptorProto{
+ Name: proto.String("name"),
+ Number: proto.Int32(1),
+ Type: &fieldType,
+ }
+ field2 := &descriptorpb.FieldDescriptorProto{
+ Name: proto.String("role"),
+ Number: proto.Int32(2),
+ Type: &fieldType,
+ }
+ msgdesc := &descriptorpb.DescriptorProto{
+ Name: proto.String("ExampleMessage"),
+ Field: []*descriptorpb.FieldDescriptorProto{
+ field1,
+ field2,
+ },
+ }
+ meth1 := &descriptorpb.MethodDescriptorProto{
+ Name: proto.String("Method1"),
+ InputType: proto.String("ExampleMessage"),
+ OutputType: proto.String("ExampleMessage"),
+ }
+ meth2 := &descriptorpb.MethodDescriptorProto{
+ Name: proto.String("Method2"),
+ InputType: proto.String("ExampleMessage"),
+ OutputType: proto.String("ExampleMessage"),
+ }
+ svc1 := &descriptorpb.ServiceDescriptorProto{
+ Name: proto.String("Service1"),
+ Method: []*descriptorpb.MethodDescriptorProto{meth1, meth2},
+ }
+ meth3 := &descriptorpb.MethodDescriptorProto{
+ Name: proto.String("Method3"),
+ InputType: proto.String("ExampleMessage"),
+ OutputType: proto.String("ExampleMessage"),
+ }
+ meth4 := &descriptorpb.MethodDescriptorProto{
+ Name: proto.String("Method4"),
+ InputType: proto.String("ExampleMessage"),
+ OutputType: proto.String("ExampleMessage"),
+ }
+ svc2 := &descriptorpb.ServiceDescriptorProto{
+ Name: proto.String("Service2"),
+ Method: []*descriptorpb.MethodDescriptorProto{meth3, meth4},
+ }
+ msg := &descriptor.Message{
+ DescriptorProto: msgdesc,
+ }
+
+ file := descriptor.File{
+ FileDescriptorProto: &descriptorpb.FileDescriptorProto{
+ SourceCodeInfo: &descriptorpb.SourceCodeInfo{},
+ Name: proto.String("service1.proto"),
+ Package: proto.String("example"),
+ MessageType: []*descriptorpb.DescriptorProto{msgdesc},
+ Service: []*descriptorpb.ServiceDescriptorProto{svc1, svc2},
+ Options: &descriptorpb.FileOptions{
+ GoPackage: proto.String("github.com/grpc-ecosystem/grpc-gateway/runtime/internal/examplepb;example"),
+ },
+ },
+ GoPkg: descriptor.GoPackage{
+ Path: "example.com/path/to/example/example.pb",
+ Name: "example_pb",
+ },
+ Messages: []*descriptor.Message{msg},
+ Services: []*descriptor.Service{
+ {
+ ServiceDescriptorProto: svc1,
+ Methods: []*descriptor.Method{
+ {
+ MethodDescriptorProto: meth1,
+ RequestType: msg,
+ ResponseType: msg,
+ Bindings: []*descriptor.Binding{
+ {
+ HTTPMethod: "GET",
+ PathTmpl: httprule.Template{
+ Version: 1,
+ OpCodes: []int{0, 0},
+ Template: "/v1/{name=organizations/*}/{role=roles/*}",
+ },
+ PathParams: []descriptor.Parameter{
+ {
+ Target: &descriptor.Field{
+ FieldDescriptorProto: field1,
+ Message: msg,
+ },
+ FieldPath: descriptor.FieldPath{
+ {
+ Name: "name",
+ },
+ },
+ },
+ {
+ Target: &descriptor.Field{
+ FieldDescriptorProto: field2,
+ Message: msg,
+ },
+ FieldPath: descriptor.FieldPath{
+ {
+ Name: "role",
+ },
+ },
+ },
+ },
+ Body: &descriptor.Body{
+ FieldPath: descriptor.FieldPath([]descriptor.FieldPathComponent{}),
+ },
+ },
+ },
+ },
+ {
+ MethodDescriptorProto: meth2,
+ RequestType: msg,
+ ResponseType: msg,
+ Bindings: []*descriptor.Binding{
+ {
+ HTTPMethod: "GET",
+ PathTmpl: httprule.Template{
+ Version: 1,
+ OpCodes: []int{0, 0},
+ Template: "/v1/{name=users/*}/{role=roles/*}",
+ },
+ PathParams: []descriptor.Parameter{
+ {
+ Target: &descriptor.Field{
+ FieldDescriptorProto: field1,
+ Message: msg,
+ },
+ FieldPath: descriptor.FieldPath{
+ {
+ Name: "name",
+ },
+ },
+ },
+ {
+ Target: &descriptor.Field{
+ FieldDescriptorProto: field2,
+ Message: msg,
+ },
+ FieldPath: descriptor.FieldPath{
+ {
+ Name: "role",
+ },
+ },
+ },
+ },
+ Body: &descriptor.Body{
+ FieldPath: descriptor.FieldPath([]descriptor.FieldPathComponent{}),
+ },
+ },
+ },
+ },
+ },
+ },
+ {
+ ServiceDescriptorProto: svc2,
+ Methods: []*descriptor.Method{
+ {
+ MethodDescriptorProto: meth3,
+ RequestType: msg,
+ ResponseType: msg,
+ Bindings: []*descriptor.Binding{
+ {
+ HTTPMethod: "GET",
+ PathTmpl: httprule.Template{
+ Version: 1,
+ OpCodes: []int{0, 0},
+ Template: "/v1/{name=users/*}/roles",
+ },
+ PathParams: []descriptor.Parameter{
+ {
+ Target: &descriptor.Field{
+ FieldDescriptorProto: field1,
+ Message: msg,
+ },
+ FieldPath: descriptor.FieldPath{
+ {
+ Name: "name",
+ },
+ },
+ },
+ },
+ Body: &descriptor.Body{
+ FieldPath: descriptor.FieldPath([]descriptor.FieldPathComponent{}),
+ },
+ },
+ },
+ },
+ {
+ MethodDescriptorProto: meth4,
+ RequestType: msg,
+ ResponseType: msg,
+ Bindings: []*descriptor.Binding{
+ {
+ HTTPMethod: "GET",
+ PathTmpl: httprule.Template{
+ Version: 1,
+ OpCodes: []int{0, 0},
+ Template: "/v1/{name=groups/*}/{role=roles/*}",
+ },
+ PathParams: []descriptor.Parameter{
+ {
+ Target: &descriptor.Field{
+ FieldDescriptorProto: field1,
+ Message: msg,
+ },
+ FieldPath: descriptor.FieldPath{
+ {
+ Name: "name",
+ },
+ },
+ },
+ {
+ Target: &descriptor.Field{
+ FieldDescriptorProto: field2,
+ Message: msg,
+ },
+ FieldPath: descriptor.FieldPath{
+ {
+ Name: "role",
+ },
+ },
+ },
+ },
+ Body: &descriptor.Body{
+ FieldPath: descriptor.FieldPath([]descriptor.FieldPathComponent{}),
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ }
+ reg := descriptor.NewRegistry()
+ err := reg.Load(&pluginpb.CodeGeneratorRequest{ProtoFile: []*descriptorpb.FileDescriptorProto{file.FileDescriptorProto}})
+ if err != nil {
+ t.Fatalf("failed to reg.Load(): %v", err)
+ }
+ result, err := applyTemplate(param{File: crossLinkFixture(&file), reg: reg})
+ if err != nil {
+ t.Fatalf("applyTemplate(%#v) failed with %v; want success", file, err)
+ }
+
+ if got, want := len(result.Paths), 4; got != want {
+ t.Fatalf("Results path length differed, got %d want %d", got, want)
+ }
+
+ firstOp := result.Paths["/v1/{name}/{role}"].Get
+ if got, want := firstOp.OperationID, "Service1_Method1"; got != want {
+ t.Fatalf("First operation id differed, got %s want %s", got, want)
+ }
+ if got, want := len(firstOp.Parameters), 3; got != want {
+ t.Fatalf("First operation params length differed, got %d want %d", got, want)
+ }
+ if got, want := firstOp.Parameters[0].Name, "name"; got != want {
+ t.Fatalf("First operation first param name differed, got %s want %s", got, want)
+ }
+ if got, want := firstOp.Parameters[0].Pattern, "organizations/[^/]+"; got != want {
+ t.Fatalf("First operation first param pattern differed, got %s want %s", got, want)
+ }
+ if got, want := firstOp.Parameters[1].Name, "role"; got != want {
+ t.Fatalf("First operation second param name differed, got %s want %s", got, want)
+ }
+ if got, want := firstOp.Parameters[1].Pattern, "roles/[^/]+"; got != want {
+ t.Fatalf("First operation second param pattern differed, got %s want %s", got, want)
+ }
+ if got, want := firstOp.Parameters[2].In, "body"; got != want {
+ t.Fatalf("First operation third param 'in' differed, got %s want %s", got, want)
+ }
+
+ secondOp := result.Paths["/v1/{name"+pathParamUniqueSuffixDeliminator+"1}/{role}"].Get
+ if got, want := secondOp.OperationID, "Service1_Method2"; got != want {
+ t.Fatalf("Second operation id differed, got %s want %s", got, want)
+ }
+ if got, want := len(secondOp.Parameters), 3; got != want {
+ t.Fatalf("Second operation params length differed, got %d want %d", got, want)
+ }
+ if got, want := secondOp.Parameters[0].Name, "name"+pathParamUniqueSuffixDeliminator+"1"; got != want {
+ t.Fatalf("Second operation first param name differed, got %s want %s", got, want)
+ }
+ if got, want := secondOp.Parameters[0].Pattern, "users/[^/]+"; got != want {
+ t.Fatalf("Second operation first param pattern differed, got %s want %s", got, want)
+ }
+ if got, want := secondOp.Parameters[1].Name, "role"; got != want {
+ t.Fatalf("Second operation second param name differed, got %s want %s", got, want)
+ }
+ if got, want := secondOp.Parameters[1].Pattern, "roles/[^/]+"; got != want {
+ t.Fatalf("Second operation second param pattern differed, got %s want %s", got, want)
+ }
+ if got, want := secondOp.Parameters[2].In, "body"; got != want {
+ t.Fatalf("Second operation third param 'in' differed, got %s want %s", got, want)
+ }
+
+ thirdOp := result.Paths["/v1/{name}/roles"].Get
+ if got, want := thirdOp.OperationID, "Service2_Method3"; got != want {
+ t.Fatalf("Third operation id differed, got %s want %s", got, want)
+ }
+ if got, want := len(thirdOp.Parameters), 2; got != want {
+ t.Fatalf("Third operation params length differed, got %d want %d", got, want)
+ }
+ if got, want := thirdOp.Parameters[0].Name, "name"; got != want {
+ t.Fatalf("Third operation first param name differed, got %s want %s", got, want)
+ }
+ if got, want := thirdOp.Parameters[0].Pattern, "users/[^/]+"; got != want {
+ t.Fatalf("Third operation first param pattern differed, got %s want %s", got, want)
+ }
+ if got, want := thirdOp.Parameters[1].In, "body"; got != want {
+ t.Fatalf("Third operation second param 'in' differed, got %s want %s", got, want)
+ }
+
+ forthOp := result.Paths["/v1/{name"+pathParamUniqueSuffixDeliminator+"2}/{role}"].Get
+ if got, want := forthOp.OperationID, "Service2_Method4"; got != want {
+ t.Fatalf("Fourth operation id differed, got %s want %s", got, want)
+ }
+ if got, want := len(forthOp.Parameters), 3; got != want {
+ t.Fatalf("Fourth operation params length differed, got %d want %d", got, want)
+ }
+ if got, want := forthOp.Parameters[0].Name, "name"+pathParamUniqueSuffixDeliminator+"2"; got != want {
+ t.Fatalf("Fourth operation first param name differed, got %s want %s", got, want)
+ }
+ if got, want := forthOp.Parameters[0].Pattern, "groups/[^/]+"; got != want {
+ t.Fatalf("Fourth operation first param pattern differed, got %s want %s", got, want)
+ }
+ if got, want := forthOp.Parameters[1].Name, "role"; got != want {
+ t.Fatalf("Fourth operation second param name differed, got %s want %s", got, want)
+ }
+ if got, want := forthOp.Parameters[1].Pattern, "roles/[^/]+"; got != want {
+ t.Fatalf("Fourth operation second param pattern differed, got %s want %s", got, want)
+ }
+ if got, want := forthOp.Parameters[2].In, "body"; got != want {
+ t.Fatalf("Fourth operation second param 'in' differed, got %s want %s", got, want)
+ }
+}
+
+func Test_getReservedJsonName(t *testing.T) {
+ type args struct {
+ fieldName string
+ messageNameToFieldsToJSONName map[string]map[string]string
+ fieldNameToType map[string]string
+ }
+ tests := []struct {
+ name string
+ args args
+ want string
+ }{
+ {
+ "test case 1: single dot use case",
+ args{
+ fieldName: "abc.a_1",
+ messageNameToFieldsToJSONName: map[string]map[string]string{
+ "Msg": {
+ "a_1": "a1JSONNAME",
+ "b_1": "b1JSONNAME",
+ },
+ },
+ fieldNameToType: map[string]string{
+ "abc": "pkg1.test.Msg",
+ "bcd": "pkg1.test.Msg",
+ },
+ },
+ "a1JSONNAME",
+ },
+ {
+ "test case 2: single dot use case with no existing field",
+ args{
+ fieldName: "abc.d_1",
+ messageNameToFieldsToJSONName: map[string]map[string]string{
+ "Msg": {
+ "a_1": "a1JSONNAME",
+ "b_1": "b1JSONNAME",
+ },
+ },
+ fieldNameToType: map[string]string{
+ "abc": "pkg1.test.Msg",
+ "bcd": "pkg1.test.Msg",
+ },
+ },
+ "",
+ },
+ {
"test case 3: double dot use case",
args{
fieldName: "pkg.abc.a_1",
@@ -4564,70 +6959,1237 @@ func Test_getReservedJsonName(t *testing.T) {
"b_1": "b1JSONNAME",
},
},
- fieldNameToType: map[string]string{
- "abc": "pkg1.test.Msg",
- "bcd": "pkg1.test.Msg",
+ fieldNameToType: map[string]string{
+ "abc": "pkg1.test.Msg",
+ "bcd": "pkg1.test.Msg",
+ },
+ },
+ "a1JSONNAME",
+ },
+ {
+ "test case 4: double dot use case with a not existed field",
+ args{
+ fieldName: "pkg.abc.c_1",
+ messageNameToFieldsToJSONName: map[string]map[string]string{
+ "Msg": {
+ "a_1": "a1JSONNAME",
+ "b_1": "b1JSONNAME",
+ },
+ },
+ fieldNameToType: map[string]string{
+ "abc": "pkg1.test.Msg",
+ "bcd": "pkg1.test.Msg",
+ },
+ },
+ "",
+ },
+ }
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ if got := getReservedJSONName(tt.args.fieldName, tt.args.messageNameToFieldsToJSONName, tt.args.fieldNameToType); got != tt.want {
+ t.Errorf("getReservedJSONName() = %v, want %v", got, tt.want)
+ }
+ })
+ }
+}
+
+func TestParseIncompleteSecurityRequirement(t *testing.T) {
+ swagger := openapi_options.Swagger{
+ Security: []*openapi_options.SecurityRequirement{
+ {
+ SecurityRequirement: map[string]*openapi_options.SecurityRequirement_SecurityRequirementValue{
+ "key": nil,
+ },
+ },
+ },
+ }
+ file := descriptor.File{
+ FileDescriptorProto: &descriptorpb.FileDescriptorProto{
+ SourceCodeInfo: &descriptorpb.SourceCodeInfo{},
+ Name: proto.String("example.proto"),
+ Package: proto.String("example"),
+ Options: &descriptorpb.FileOptions{
+ GoPackage: proto.String("github.com/grpc-ecosystem/grpc-gateway/runtime/internal/examplepb;example"),
+ },
+ },
+ }
+ proto.SetExtension(proto.Message(file.FileDescriptorProto.Options), openapi_options.E_Openapiv2Swagger, &swagger)
+ reg := descriptor.NewRegistry()
+ err := reg.Load(&pluginpb.CodeGeneratorRequest{ProtoFile: []*descriptorpb.FileDescriptorProto{file.FileDescriptorProto}})
+ if err != nil {
+ t.Errorf("failed to reg.Load(): %v", err)
+ return
+ }
+ _, err = applyTemplate(param{File: crossLinkFixture(&file), reg: reg})
+ if err == nil {
+ t.Errorf("applyTemplate(%#v) did not error as expected", file)
+ return
+ }
+}
+
+func TestSubPathParams(t *testing.T) {
+ outerParams := []descriptor.Parameter{
+ {
+ FieldPath: []descriptor.FieldPathComponent{
+ {
+ Name: "prefix",
+ },
+ {
+ Name: "first",
+ },
+ },
+ },
+ {
+ FieldPath: []descriptor.FieldPathComponent{
+ {
+ Name: "prefix",
+ },
+ {
+ Name: "second",
+ },
+ {
+ Name: "deeper",
+ },
+ },
+ },
+ {
+ FieldPath: []descriptor.FieldPathComponent{
+ {
+ Name: "otherprefix",
+ },
+ {
+ Name: "third",
+ },
+ },
+ },
+ }
+ subParams := subPathParams("prefix", outerParams)
+
+ if got, want := len(subParams), 2; got != want {
+ t.Fatalf("Wrong number of path params, got %d want %d", got, want)
+ }
+ if got, want := len(subParams[0].FieldPath), 1; got != want {
+ t.Fatalf("Wrong length of path param 0, got %d want %d", got, want)
+ }
+ if got, want := subParams[0].FieldPath[0].Name, "first"; got != want {
+ t.Fatalf("Wrong path param 0, element 0, got %s want %s", got, want)
+ }
+ if got, want := len(subParams[1].FieldPath), 2; got != want {
+ t.Fatalf("Wrong length of path param 1 got %d want %d", got, want)
+ }
+ if got, want := subParams[1].FieldPath[0].Name, "second"; got != want {
+ t.Fatalf("Wrong path param 1, element 0, got %s want %s", got, want)
+ }
+ if got, want := subParams[1].FieldPath[1].Name, "deeper"; got != want {
+ t.Fatalf("Wrong path param 1, element 1, got %s want %s", got, want)
+ }
+}
+
+func TestRenderServicesParameterDescriptionNoFieldBody(t *testing.T) {
+
+ optionsRaw :=
+ `{
+ "[grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema]": {
+ "jsonSchema": {
+ "title": "aMessage title",
+ "description": "aMessage description"
+ }
+ }
+ }`
+
+ options := &descriptorpb.MessageOptions{}
+ err := protojson.Unmarshal([]byte(optionsRaw), options)
+ if err != nil {
+ t.Fatalf("Error while unmarshalling options: %s", err.Error())
+ }
+
+ aMessageDesc := &descriptorpb.DescriptorProto{
+ Name: proto.String("AMessage"),
+ Field: []*descriptorpb.FieldDescriptorProto{
+ {
+ Name: proto.String("project_id"),
+ Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(),
+ Number: proto.Int32(1),
+ },
+ {
+ Name: proto.String("other_field"),
+ Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(),
+ Number: proto.Int32(2),
+ },
+ },
+ Options: options,
+ }
+ someResponseDesc := &descriptorpb.DescriptorProto{
+ Name: proto.String("SomeResponse"),
+ }
+ aMeth := &descriptorpb.MethodDescriptorProto{
+ Name: proto.String("AMethod"),
+ InputType: proto.String("AMessage"),
+ OutputType: proto.String("SomeResponse"),
+ }
+ svc := &descriptorpb.ServiceDescriptorProto{
+ Name: proto.String("Test"),
+ Method: []*descriptorpb.MethodDescriptorProto{aMeth},
+ }
+ aMessage := &descriptor.Message{
+ DescriptorProto: aMessageDesc,
+ }
+ someResponseMessage := &descriptor.Message{
+ DescriptorProto: someResponseDesc,
+ }
+
+ file := descriptor.File{
+ FileDescriptorProto: &descriptorpb.FileDescriptorProto{
+ SourceCodeInfo: &descriptorpb.SourceCodeInfo{},
+ Package: proto.String("api"),
+ Name: proto.String("test.proto"),
+ MessageType: []*descriptorpb.DescriptorProto{aMessageDesc, someResponseDesc},
+ Service: []*descriptorpb.ServiceDescriptorProto{svc},
+ Options: &descriptorpb.FileOptions{
+ GoPackage: proto.String("github.com/grpc-ecosystem/grpc-gateway/runtime/internal/examplepb;example"),
+ },
+ },
+ GoPkg: descriptor.GoPackage{
+ Path: "example.com/path/to/example/example.pb",
+ Name: "example_pb",
+ },
+ Messages: []*descriptor.Message{aMessage, someResponseMessage},
+ Services: []*descriptor.Service{
+ {
+ ServiceDescriptorProto: svc,
+ Methods: []*descriptor.Method{
+ {
+ MethodDescriptorProto: aMeth,
+ RequestType: aMessage,
+ ResponseType: someResponseMessage,
+ Bindings: []*descriptor.Binding{
+ {
+ HTTPMethod: "POST",
+ PathTmpl: httprule.Template{
+ Version: 1,
+ OpCodes: []int{0, 0},
+ Template: "/v1/projects/someotherpath",
+ },
+ Body: &descriptor.Body{},
+ },
+ },
+ },
+ },
+ },
+ },
+ }
+ reg := descriptor.NewRegistry()
+ reg.SetUseJSONNamesForFields(true)
+ err = reg.Load(&pluginpb.CodeGeneratorRequest{ProtoFile: []*descriptorpb.FileDescriptorProto{file.FileDescriptorProto}})
+ if err != nil {
+ t.Fatalf("failed to reg.Load(): %v", err)
+ }
+ result, err := applyTemplate(param{File: crossLinkFixture(&file), reg: reg})
+ if err != nil {
+ t.Fatalf("applyTemplate(%#v) failed with %v; want success", file, err)
+ }
+
+ got := result.Paths["/v1/projects/someotherpath"].Post.Parameters[0].Description
+ want := "aMessage description"
+
+ if got != want {
+ t.Fatalf("Wrong description for body parameter, got %s want %s", got, want)
+ }
+
+}
+
+func TestRenderServicesWithBodyFieldNameInCamelCase(t *testing.T) {
+ userDesc := &descriptorpb.DescriptorProto{
+ Name: proto.String("User"),
+ Field: []*descriptorpb.FieldDescriptorProto{
+ {
+ Name: proto.String("name"),
+ Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(),
+ Number: proto.Int32(1),
+ },
+ {
+ Name: proto.String("role"),
+ Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(),
+ Number: proto.Int32(2),
+ },
+ },
+ }
+ updateDesc := &descriptorpb.DescriptorProto{
+ Name: proto.String("UpdateUserRequest"),
+ Field: []*descriptorpb.FieldDescriptorProto{
+ {
+ Name: proto.String("user_object"),
+ Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(),
+ TypeName: proto.String(".example.User"),
+ Number: proto.Int32(1),
+ },
+ },
+ }
+ meth := &descriptorpb.MethodDescriptorProto{
+ Name: proto.String("UpdateUser"),
+ InputType: proto.String("UpdateUserRequest"),
+ OutputType: proto.String("User"),
+ }
+ svc := &descriptorpb.ServiceDescriptorProto{
+ Name: proto.String("UserService"),
+ Method: []*descriptorpb.MethodDescriptorProto{meth},
+ }
+ userMsg := &descriptor.Message{
+ DescriptorProto: userDesc,
+ }
+ updateMsg := &descriptor.Message{
+ DescriptorProto: updateDesc,
+ }
+ nameField := &descriptor.Field{
+ Message: userMsg,
+ FieldDescriptorProto: userMsg.GetField()[0],
+ }
+ nameField.JsonName = proto.String("name")
+ roleField := &descriptor.Field{
+ Message: userMsg,
+ FieldDescriptorProto: userMsg.GetField()[1],
+ }
+ roleField.JsonName = proto.String("role")
+ userMsg.Fields = []*descriptor.Field{nameField, roleField}
+ userField := &descriptor.Field{
+ Message: updateMsg,
+ FieldMessage: userMsg,
+ FieldDescriptorProto: updateMsg.GetField()[0],
+ }
+ userField.JsonName = proto.String("userObject")
+ updateMsg.Fields = []*descriptor.Field{userField}
+
+ file := descriptor.File{
+ FileDescriptorProto: &descriptorpb.FileDescriptorProto{
+ SourceCodeInfo: &descriptorpb.SourceCodeInfo{},
+ Package: proto.String("example"),
+ Name: proto.String("user_service.proto"),
+ MessageType: []*descriptorpb.DescriptorProto{userDesc, updateDesc},
+ Service: []*descriptorpb.ServiceDescriptorProto{svc},
+ Options: &descriptorpb.FileOptions{
+ GoPackage: proto.String("github.com/grpc-ecosystem/grpc-gateway/runtime/internal/examplepb;example"),
+ },
+ },
+ GoPkg: descriptor.GoPackage{
+ Path: "example.com/path/to/example/example.pb",
+ Name: "example_pb",
+ },
+ Messages: []*descriptor.Message{userMsg, updateMsg},
+ Services: []*descriptor.Service{
+ {
+ ServiceDescriptorProto: svc,
+ Methods: []*descriptor.Method{
+ {
+ MethodDescriptorProto: meth,
+ RequestType: updateMsg,
+ ResponseType: userMsg,
+ Bindings: []*descriptor.Binding{
+ {
+ HTTPMethod: "POST",
+ PathTmpl: httprule.Template{
+ Version: 1,
+ OpCodes: []int{0, 0},
+ Template: "/v1/users/{user_object.name}",
+ },
+ PathParams: []descriptor.Parameter{
+ {
+ FieldPath: descriptor.FieldPath([]descriptor.FieldPathComponent{
+ {
+ Name: "user_object",
+ },
+ {
+ Name: "name",
+ },
+ }),
+ Target: nameField,
+ },
+ },
+ Body: &descriptor.Body{
+ FieldPath: []descriptor.FieldPathComponent{
+ {
+ Name: "user_object",
+ Target: userField,
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ }
+ reg := descriptor.NewRegistry()
+ reg.SetUseJSONNamesForFields(true)
+ err := reg.Load(&pluginpb.CodeGeneratorRequest{ProtoFile: []*descriptorpb.FileDescriptorProto{file.FileDescriptorProto}})
+ if err != nil {
+ t.Fatalf("failed to reg.Load(): %v", err)
+ }
+ result, err := applyTemplate(param{File: crossLinkFixture(&file), reg: reg})
+ if err != nil {
+ t.Fatalf("applyTemplate(%#v) failed with %v; want success", file, err)
+ }
+
+ paths := GetPaths(result)
+ if got, want := len(paths), 1; got != want {
+ t.Fatalf("Results path length differed, got %d want %d", got, want)
+ }
+
+ if got, want := paths[0], "/v1/users/{userObject.name}"; got != want {
+ t.Fatalf("Wrong results path, got %s want %s", got, want)
+ }
+
+ var operation = *result.Paths["/v1/users/{userObject.name}"].Post
+ if got, want := len(operation.Parameters), 2; got != want {
+ t.Fatalf("Parameters length differed, got %d want %d", got, want)
+ }
+
+ if got, want := operation.Parameters[0].Name, "userObject.name"; got != want {
+ t.Fatalf("Wrong parameter name, got %s want %s", got, want)
+ }
+
+ if got, want := operation.Parameters[0].In, "path"; got != want {
+ t.Fatalf("Wrong parameter location, got %s want %s", got, want)
+ }
+
+ if got, want := operation.Parameters[1].Name, "userObject"; got != want {
+ t.Fatalf("Wrong parameter name, got %s want %s", got, want)
+ }
+
+ if got, want := operation.Parameters[1].In, "body"; got != want {
+ t.Fatalf("Wrong parameter location, got %s want %s", got, want)
+ }
+
+ // The body parameter should be inlined and not contain 'name', as this is a path parameter.
+ schema := operation.Parameters[1].Schema
+ if got, want := schema.Ref, ""; got != want {
+ t.Fatalf("Wrong reference, got %s want %s", got, want)
+ }
+ props := schema.Properties
+ if props == nil {
+ t.Fatal("No properties on body parameter")
+ }
+ if got, want := len(*props), 1; got != want {
+ t.Fatalf("Properties length differed, got %d want %d", got, want)
+ }
+ for _, v := range *props {
+ if got, want := v.Key, "role"; got != want {
+ t.Fatalf("Wrong key for property, got %s want %s", got, want)
+ }
+ }
+}
+
+func TestRenderServicesWithColonInPath(t *testing.T) {
+ jsonSchema := &openapi_options.JSONSchema{
+ FieldConfiguration: &openapi_options.JSONSchema_FieldConfiguration{
+ PathParamName: "overrideField",
+ },
+ }
+ var fieldOptions = new(descriptorpb.FieldOptions)
+ proto.SetExtension(fieldOptions, openapi_options.E_Openapiv2Field, jsonSchema)
+
+ reqDesc := &descriptorpb.DescriptorProto{
+ Name: proto.String("MyRequest"),
+ Field: []*descriptorpb.FieldDescriptorProto{
+ {
+ Name: proto.String("field"),
+ Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(),
+ Number: proto.Int32(1),
+ Options: fieldOptions,
+ },
+ },
+ }
+ resDesc := &descriptorpb.DescriptorProto{
+ Name: proto.String("MyResponse"),
+ Field: []*descriptorpb.FieldDescriptorProto{
+ {
+ Name: proto.String("field"),
+ Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(),
+ Number: proto.Int32(1),
+ },
+ },
+ }
+ meth := &descriptorpb.MethodDescriptorProto{
+ Name: proto.String("MyMethod"),
+ InputType: proto.String("MyRequest"),
+ OutputType: proto.String("MyResponse"),
+ }
+ svc := &descriptorpb.ServiceDescriptorProto{
+ Name: proto.String("MyService"),
+ Method: []*descriptorpb.MethodDescriptorProto{meth},
+ }
+ reqMsg := &descriptor.Message{
+ DescriptorProto: reqDesc,
+ }
+ resMsg := &descriptor.Message{
+ DescriptorProto: resDesc,
+ }
+ reqField := &descriptor.Field{
+ Message: reqMsg,
+ FieldDescriptorProto: reqMsg.GetField()[0],
+ }
+ resField := &descriptor.Field{
+ Message: resMsg,
+ FieldDescriptorProto: resMsg.GetField()[0],
+ }
+ reqField.JsonName = proto.String("field")
+ resField.JsonName = proto.String("field")
+ reqMsg.Fields = []*descriptor.Field{reqField}
+ resMsg.Fields = []*descriptor.Field{resField}
+
+ file := descriptor.File{
+ FileDescriptorProto: &descriptorpb.FileDescriptorProto{
+ SourceCodeInfo: &descriptorpb.SourceCodeInfo{},
+ Package: proto.String("example"),
+ Name: proto.String(",my_service.proto"),
+ MessageType: []*descriptorpb.DescriptorProto{reqDesc, resDesc},
+ Service: []*descriptorpb.ServiceDescriptorProto{svc},
+ Options: &descriptorpb.FileOptions{
+ GoPackage: proto.String("github.com/grpc-ecosystem/grpc-gateway/runtime/internal/examplepb;example"),
+ },
+ },
+ GoPkg: descriptor.GoPackage{
+ Path: "example.com/path/to/example/example.pb",
+ Name: "example_pb",
+ },
+ Messages: []*descriptor.Message{reqMsg, resMsg},
+ Services: []*descriptor.Service{
+ {
+ ServiceDescriptorProto: svc,
+ Methods: []*descriptor.Method{
+ {
+ MethodDescriptorProto: meth,
+ RequestType: reqMsg,
+ ResponseType: resMsg,
+ Bindings: []*descriptor.Binding{
+ {
+ HTTPMethod: "POST",
+ PathTmpl: httprule.Template{
+ Version: 1,
+ OpCodes: []int{0, 0},
+ Template: "/my/{field}:foo",
+ },
+ PathParams: []descriptor.Parameter{
+ {
+ FieldPath: descriptor.FieldPath([]descriptor.FieldPathComponent{
+ {
+ Name: "field",
+ },
+ }),
+ Target: reqField,
+ },
+ },
+ Body: &descriptor.Body{
+ FieldPath: descriptor.FieldPath([]descriptor.FieldPathComponent{}),
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ }
+ reg := descriptor.NewRegistry()
+ reg.SetUseJSONNamesForFields(true)
+ err := reg.Load(&pluginpb.CodeGeneratorRequest{ProtoFile: []*descriptorpb.FileDescriptorProto{file.FileDescriptorProto}})
+ if err != nil {
+ t.Fatalf("failed to reg.Load(): %v", err)
+ }
+ result, err := applyTemplate(param{File: crossLinkFixture(&file), reg: reg})
+ if err != nil {
+ t.Fatalf("applyTemplate(%#v) failed with %v; want success", file, err)
+ }
+
+ paths := GetPaths(result)
+ if got, want := len(paths), 1; got != want {
+ t.Fatalf("Results path length differed, got %d want %d", got, want)
+ }
+
+ if got, want := paths[0], "/my/{overrideField}:foo"; got != want {
+ t.Fatalf("Wrong results path, got %s want %s", got, want)
+ }
+
+ var operation = *result.Paths["/my/{overrideField}:foo"].Post
+ if got, want := len(operation.Parameters), 2; got != want {
+ t.Fatalf("Parameters length differed, got %d want %d", got, want)
+ }
+
+ if got, want := operation.Parameters[0].Name, "overrideField"; got != want {
+ t.Fatalf("Wrong parameter name, got %s want %s", got, want)
+ }
+
+ if got, want := operation.Parameters[0].In, "path"; got != want {
+ t.Fatalf("Wrong parameter location, got %s want %s", got, want)
+ }
+
+ if got, want := operation.Parameters[0].Type, "string"; got != want {
+ t.Fatalf("Wrong parameter type, got %s want %s", got, want)
+ }
+
+ if got, want := operation.Parameters[1].Name, "body"; got != want {
+ t.Fatalf("Wrong parameter name, got %s want %s", got, want)
+ }
+
+ if got, want := operation.Parameters[1].In, "body"; got != want {
+ t.Fatalf("Wrong parameter location, got %s want %s", got, want)
+ }
+}
+
+func TestRenderServicesWithDoubleColonInPath(t *testing.T) {
+ reqDesc := &descriptorpb.DescriptorProto{
+ Name: proto.String("MyRequest"),
+ Field: []*descriptorpb.FieldDescriptorProto{
+ {
+ Name: proto.String("field"),
+ Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(),
+ Number: proto.Int32(1),
+ },
+ },
+ }
+ resDesc := &descriptorpb.DescriptorProto{
+ Name: proto.String("MyResponse"),
+ Field: []*descriptorpb.FieldDescriptorProto{
+ {
+ Name: proto.String("field"),
+ Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(),
+ Number: proto.Int32(1),
+ },
+ },
+ }
+ meth := &descriptorpb.MethodDescriptorProto{
+ Name: proto.String("MyMethod"),
+ InputType: proto.String("MyRequest"),
+ OutputType: proto.String("MyResponse"),
+ }
+ svc := &descriptorpb.ServiceDescriptorProto{
+ Name: proto.String("MyService"),
+ Method: []*descriptorpb.MethodDescriptorProto{meth},
+ }
+ reqMsg := &descriptor.Message{
+ DescriptorProto: reqDesc,
+ }
+ resMsg := &descriptor.Message{
+ DescriptorProto: resDesc,
+ }
+ reqField := &descriptor.Field{
+ Message: reqMsg,
+ FieldDescriptorProto: reqMsg.GetField()[0],
+ }
+ resField := &descriptor.Field{
+ Message: resMsg,
+ FieldDescriptorProto: resMsg.GetField()[0],
+ }
+ reqField.JsonName = proto.String("field")
+ resField.JsonName = proto.String("field")
+ reqMsg.Fields = []*descriptor.Field{reqField}
+ resMsg.Fields = []*descriptor.Field{resField}
+
+ file := descriptor.File{
+ FileDescriptorProto: &descriptorpb.FileDescriptorProto{
+ SourceCodeInfo: &descriptorpb.SourceCodeInfo{},
+ Package: proto.String("example"),
+ Name: proto.String(",my_service.proto"),
+ MessageType: []*descriptorpb.DescriptorProto{reqDesc, resDesc},
+ Service: []*descriptorpb.ServiceDescriptorProto{svc},
+ Options: &descriptorpb.FileOptions{
+ GoPackage: proto.String("github.com/grpc-ecosystem/grpc-gateway/runtime/internal/examplepb;example"),
+ },
+ },
+ GoPkg: descriptor.GoPackage{
+ Path: "example.com/path/to/example/example.pb",
+ Name: "example_pb",
+ },
+ Messages: []*descriptor.Message{reqMsg, resMsg},
+ Services: []*descriptor.Service{
+ {
+ ServiceDescriptorProto: svc,
+ Methods: []*descriptor.Method{
+ {
+ MethodDescriptorProto: meth,
+ RequestType: reqMsg,
+ ResponseType: resMsg,
+ Bindings: []*descriptor.Binding{
+ {
+ HTTPMethod: "POST",
+ PathTmpl: httprule.Template{
+ Version: 1,
+ OpCodes: []int{0, 0},
+ Template: "/my/{field}:foo:bar",
+ },
+ PathParams: []descriptor.Parameter{
+ {
+ FieldPath: descriptor.FieldPath([]descriptor.FieldPathComponent{
+ {
+ Name: "field",
+ },
+ }),
+ Target: reqField,
+ },
+ },
+ Body: &descriptor.Body{
+ FieldPath: descriptor.FieldPath([]descriptor.FieldPathComponent{}),
+ },
+ },
+ },
+ },
},
},
- "a1JSONNAME",
},
- {
- "test case 4: double dot use case with a not existed field",
- args{
- fieldName: "pkg.abc.c_1",
- messageNameToFieldsToJSONName: map[string]map[string]string{
- "Msg": {
- "a_1": "a1JSONNAME",
- "b_1": "b1JSONNAME",
+ }
+ reg := descriptor.NewRegistry()
+ reg.SetUseJSONNamesForFields(true)
+ err := reg.Load(&pluginpb.CodeGeneratorRequest{ProtoFile: []*descriptorpb.FileDescriptorProto{file.FileDescriptorProto}})
+ if err != nil {
+ t.Fatalf("failed to reg.Load(): %v", err)
+ }
+ result, err := applyTemplate(param{File: crossLinkFixture(&file), reg: reg})
+ if err != nil {
+ t.Fatalf("applyTemplate(%#v) failed with %v; want success", file, err)
+ }
+
+ paths := GetPaths(result)
+ if got, want := len(paths), 1; got != want {
+ t.Fatalf("Results path length differed, got %d want %d", got, want)
+ }
+
+ if got, want := paths[0], "/my/{field}:foo:bar"; got != want {
+ t.Fatalf("Wrong results path, got %s want %s", got, want)
+ }
+
+ var operation = *result.Paths["/my/{field}:foo:bar"].Post
+ if got, want := len(operation.Parameters), 2; got != want {
+ t.Fatalf("Parameters length differed, got %d want %d", got, want)
+ }
+
+ if got, want := operation.Parameters[0].Name, "field"; got != want {
+ t.Fatalf("Wrong parameter name, got %s want %s", got, want)
+ }
+
+ if got, want := operation.Parameters[0].In, "path"; got != want {
+ t.Fatalf("Wrong parameter location, got %s want %s", got, want)
+ }
+
+ if got, want := operation.Parameters[0].Type, "string"; got != want {
+ t.Fatalf("Wrong parameter type, got %s want %s", got, want)
+ }
+
+ if got, want := operation.Parameters[1].Name, "body"; got != want {
+ t.Fatalf("Wrong parameter name, got %s want %s", got, want)
+ }
+
+ if got, want := operation.Parameters[1].In, "body"; got != want {
+ t.Fatalf("Wrong parameter location, got %s want %s", got, want)
+ }
+}
+
+func TestRenderServicesWithColonLastInPath(t *testing.T) {
+ reqDesc := &descriptorpb.DescriptorProto{
+ Name: proto.String("MyRequest"),
+ Field: []*descriptorpb.FieldDescriptorProto{
+ {
+ Name: proto.String("field"),
+ Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(),
+ Number: proto.Int32(1),
+ },
+ },
+ }
+ resDesc := &descriptorpb.DescriptorProto{
+ Name: proto.String("MyResponse"),
+ Field: []*descriptorpb.FieldDescriptorProto{
+ {
+ Name: proto.String("field"),
+ Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(),
+ Number: proto.Int32(1),
+ },
+ },
+ }
+ meth := &descriptorpb.MethodDescriptorProto{
+ Name: proto.String("MyMethod"),
+ InputType: proto.String("MyRequest"),
+ OutputType: proto.String("MyResponse"),
+ }
+ svc := &descriptorpb.ServiceDescriptorProto{
+ Name: proto.String("MyService"),
+ Method: []*descriptorpb.MethodDescriptorProto{meth},
+ }
+ reqMsg := &descriptor.Message{
+ DescriptorProto: reqDesc,
+ }
+ resMsg := &descriptor.Message{
+ DescriptorProto: resDesc,
+ }
+ reqField := &descriptor.Field{
+ Message: reqMsg,
+ FieldDescriptorProto: reqMsg.GetField()[0],
+ }
+ resField := &descriptor.Field{
+ Message: resMsg,
+ FieldDescriptorProto: resMsg.GetField()[0],
+ }
+ reqField.JsonName = proto.String("field")
+ resField.JsonName = proto.String("field")
+ reqMsg.Fields = []*descriptor.Field{reqField}
+ resMsg.Fields = []*descriptor.Field{resField}
+
+ file := descriptor.File{
+ FileDescriptorProto: &descriptorpb.FileDescriptorProto{
+ SourceCodeInfo: &descriptorpb.SourceCodeInfo{},
+ Package: proto.String("example"),
+ Name: proto.String(",my_service.proto"),
+ MessageType: []*descriptorpb.DescriptorProto{reqDesc, resDesc},
+ Service: []*descriptorpb.ServiceDescriptorProto{svc},
+ Options: &descriptorpb.FileOptions{
+ GoPackage: proto.String("github.com/grpc-ecosystem/grpc-gateway/runtime/internal/examplepb;example"),
+ },
+ },
+ GoPkg: descriptor.GoPackage{
+ Path: "example.com/path/to/example/example.pb",
+ Name: "example_pb",
+ },
+ Messages: []*descriptor.Message{reqMsg, resMsg},
+ Services: []*descriptor.Service{
+ {
+ ServiceDescriptorProto: svc,
+ Methods: []*descriptor.Method{
+ {
+ MethodDescriptorProto: meth,
+ RequestType: reqMsg,
+ ResponseType: resMsg,
+ Bindings: []*descriptor.Binding{
+ {
+ HTTPMethod: "POST",
+ PathTmpl: httprule.Template{
+ Version: 1,
+ OpCodes: []int{0, 0},
+ Template: "/my/{field}:",
+ },
+ PathParams: []descriptor.Parameter{
+ {
+ FieldPath: descriptor.FieldPath([]descriptor.FieldPathComponent{
+ {
+ Name: "field",
+ },
+ }),
+ Target: reqField,
+ },
+ },
+ Body: &descriptor.Body{
+ FieldPath: descriptor.FieldPath([]descriptor.FieldPathComponent{}),
+ },
+ },
+ },
},
},
- fieldNameToType: map[string]string{
- "abc": "pkg1.test.Msg",
- "bcd": "pkg1.test.Msg",
- },
},
- "",
},
}
- for _, tt := range tests {
- t.Run(tt.name, func(t *testing.T) {
- if got := getReservedJSONName(tt.args.fieldName, tt.args.messageNameToFieldsToJSONName, tt.args.fieldNameToType); got != tt.want {
- t.Errorf("getReservedJSONName() = %v, want %v", got, tt.want)
- }
- })
+ reg := descriptor.NewRegistry()
+ reg.SetUseJSONNamesForFields(true)
+ err := reg.Load(&pluginpb.CodeGeneratorRequest{ProtoFile: []*descriptorpb.FileDescriptorProto{file.FileDescriptorProto}})
+ if err != nil {
+ t.Fatalf("failed to reg.Load(): %v", err)
+ }
+ result, err := applyTemplate(param{File: crossLinkFixture(&file), reg: reg})
+ if err != nil {
+ t.Fatalf("applyTemplate(%#v) failed with %v; want success", file, err)
+ }
+
+ paths := GetPaths(result)
+ if got, want := len(paths), 1; got != want {
+ t.Fatalf("Results path length differed, got %d want %d", got, want)
+ }
+
+ if got, want := paths[0], "/my/{field}:"; got != want {
+ t.Fatalf("Wrong results path, got %s want %s", got, want)
+ }
+
+ var operation = *result.Paths["/my/{field}:"].Post
+ if got, want := len(operation.Parameters), 2; got != want {
+ t.Fatalf("Parameters length differed, got %d want %d", got, want)
+ }
+
+ if got, want := operation.Parameters[0].Name, "field"; got != want {
+ t.Fatalf("Wrong parameter name, got %s want %s", got, want)
+ }
+
+ if got, want := operation.Parameters[0].In, "path"; got != want {
+ t.Fatalf("Wrong parameter location, got %s want %s", got, want)
+ }
+
+ if got, want := operation.Parameters[0].Type, "string"; got != want {
+ t.Fatalf("Wrong parameter type, got %s want %s", got, want)
+ }
+
+ if got, want := operation.Parameters[1].Name, "body"; got != want {
+ t.Fatalf("Wrong parameter name, got %s want %s", got, want)
+ }
+
+ if got, want := operation.Parameters[1].In, "body"; got != want {
+ t.Fatalf("Wrong parameter location, got %s want %s", got, want)
}
}
-func TestParseIncompleteSecurityRequirement(t *testing.T) {
- swagger := openapi_options.Swagger{
- Security: []*openapi_options.SecurityRequirement{
+func TestRenderServicesWithColonInSegment(t *testing.T) {
+ reqDesc := &descriptorpb.DescriptorProto{
+ Name: proto.String("MyRequest"),
+ Field: []*descriptorpb.FieldDescriptorProto{
{
- SecurityRequirement: map[string]*openapi_options.SecurityRequirement_SecurityRequirementValue{
- "key": nil,
- },
+ Name: proto.String("field"),
+ Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(),
+ Number: proto.Int32(1),
+ },
+ },
+ }
+ resDesc := &descriptorpb.DescriptorProto{
+ Name: proto.String("MyResponse"),
+ Field: []*descriptorpb.FieldDescriptorProto{
+ {
+ Name: proto.String("field"),
+ Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(),
+ Number: proto.Int32(1),
},
},
}
+ meth := &descriptorpb.MethodDescriptorProto{
+ Name: proto.String("MyMethod"),
+ InputType: proto.String("MyRequest"),
+ OutputType: proto.String("MyResponse"),
+ }
+ svc := &descriptorpb.ServiceDescriptorProto{
+ Name: proto.String("MyService"),
+ Method: []*descriptorpb.MethodDescriptorProto{meth},
+ }
+ reqMsg := &descriptor.Message{
+ DescriptorProto: reqDesc,
+ }
+ resMsg := &descriptor.Message{
+ DescriptorProto: resDesc,
+ }
+ reqField := &descriptor.Field{
+ Message: reqMsg,
+ FieldDescriptorProto: reqMsg.GetField()[0],
+ }
+ resField := &descriptor.Field{
+ Message: resMsg,
+ FieldDescriptorProto: resMsg.GetField()[0],
+ }
+ reqField.JsonName = proto.String("field")
+ resField.JsonName = proto.String("field")
+ reqMsg.Fields = []*descriptor.Field{reqField}
+ resMsg.Fields = []*descriptor.Field{resField}
+
file := descriptor.File{
FileDescriptorProto: &descriptorpb.FileDescriptorProto{
SourceCodeInfo: &descriptorpb.SourceCodeInfo{},
- Name: proto.String("example.proto"),
Package: proto.String("example"),
+ Name: proto.String(",my_service.proto"),
+ MessageType: []*descriptorpb.DescriptorProto{reqDesc, resDesc},
+ Service: []*descriptorpb.ServiceDescriptorProto{svc},
Options: &descriptorpb.FileOptions{
GoPackage: proto.String("github.com/grpc-ecosystem/grpc-gateway/runtime/internal/examplepb;example"),
},
},
+ GoPkg: descriptor.GoPackage{
+ Path: "example.com/path/to/example/example.pb",
+ Name: "example_pb",
+ },
+ Messages: []*descriptor.Message{reqMsg, resMsg},
+ Services: []*descriptor.Service{
+ {
+ ServiceDescriptorProto: svc,
+ Methods: []*descriptor.Method{
+ {
+ MethodDescriptorProto: meth,
+ RequestType: reqMsg,
+ ResponseType: resMsg,
+ Bindings: []*descriptor.Binding{
+ {
+ HTTPMethod: "POST",
+ PathTmpl: httprule.Template{
+ Version: 1,
+ OpCodes: []int{0, 0},
+ Template: "/my/{field=segment/wi:th}",
+ },
+ PathParams: []descriptor.Parameter{
+ {
+ FieldPath: descriptor.FieldPath([]descriptor.FieldPathComponent{
+ {
+ Name: "field",
+ },
+ }),
+ Target: reqField,
+ },
+ },
+ Body: &descriptor.Body{
+ FieldPath: descriptor.FieldPath([]descriptor.FieldPathComponent{}),
+ },
+ },
+ },
+ },
+ },
+ },
+ },
}
- proto.SetExtension(proto.Message(file.FileDescriptorProto.Options), openapi_options.E_Openapiv2Swagger, &swagger)
reg := descriptor.NewRegistry()
+ reg.SetUseJSONNamesForFields(true)
err := reg.Load(&pluginpb.CodeGeneratorRequest{ProtoFile: []*descriptorpb.FileDescriptorProto{file.FileDescriptorProto}})
if err != nil {
- t.Errorf("failed to reg.Load(): %v", err)
- return
+ t.Fatalf("failed to reg.Load(): %v", err)
}
- _, err = applyTemplate(param{File: crossLinkFixture(&file), reg: reg})
- if err == nil {
- t.Errorf("applyTemplate(%#v) did not error as expected", file)
- return
+ result, err := applyTemplate(param{File: crossLinkFixture(&file), reg: reg})
+ if err != nil {
+ t.Fatalf("applyTemplate(%#v) failed with %v; want success", file, err)
+ }
+
+ paths := GetPaths(result)
+ if got, want := len(paths), 1; got != want {
+ t.Fatalf("Results path length differed, got %d want %d", got, want)
+ }
+
+ if got, want := paths[0], "/my/{field}"; got != want {
+ t.Fatalf("Wrong results path, got %s want %s", got, want)
+ }
+
+ var operation = *result.Paths["/my/{field}"].Post
+ if got, want := len(operation.Parameters), 2; got != want {
+ t.Fatalf("Parameters length differed, got %d want %d", got, want)
+ }
+
+ if got, want := operation.Parameters[0].Name, "field"; got != want {
+ t.Fatalf("Wrong parameter name, got %s want %s", got, want)
+ }
+
+ if got, want := operation.Parameters[0].In, "path"; got != want {
+ t.Fatalf("Wrong parameter location, got %s want %s", got, want)
+ }
+
+ if got, want := operation.Parameters[0].Type, "string"; got != want {
+ t.Fatalf("Wrong parameter type, got %s want %s", got, want)
+ }
+
+ if got, want := operation.Parameters[1].Name, "body"; got != want {
+ t.Fatalf("Wrong parameter name, got %s want %s", got, want)
+ }
+
+ if got, want := operation.Parameters[1].In, "body"; got != want {
+ t.Fatalf("Wrong parameter location, got %s want %s", got, want)
+ }
+}
+
+func TestRenderServiceWithHeaderParameters(t *testing.T) {
+ file := func() descriptor.File {
+ msgdesc := &descriptorpb.DescriptorProto{
+ Name: proto.String("ExampleMessage"),
+ }
+
+ meth := &descriptorpb.MethodDescriptorProto{
+ Name: proto.String("Example"),
+ InputType: proto.String("ExampleMessage"),
+ OutputType: proto.String("ExampleMessage"),
+ Options: &descriptorpb.MethodOptions{},
+ }
+
+ svc := &descriptorpb.ServiceDescriptorProto{
+ Name: proto.String("ExampleService"),
+ Method: []*descriptorpb.MethodDescriptorProto{meth},
+ }
+
+ msg := &descriptor.Message{
+ DescriptorProto: msgdesc,
+ }
+
+ return descriptor.File{
+ FileDescriptorProto: &descriptorpb.FileDescriptorProto{
+ SourceCodeInfo: &descriptorpb.SourceCodeInfo{},
+ Name: proto.String("example.proto"),
+ Package: proto.String("example"),
+ MessageType: []*descriptorpb.DescriptorProto{msgdesc},
+ Service: []*descriptorpb.ServiceDescriptorProto{svc},
+ Options: &descriptorpb.FileOptions{
+ GoPackage: proto.String("github.com/grpc-ecosystem/grpc-gateway/runtime/internal/examplepb;example"),
+ },
+ },
+ GoPkg: descriptor.GoPackage{
+ Path: "example.com/path/to/example/example.pb",
+ Name: "example_pb",
+ },
+ Messages: []*descriptor.Message{msg},
+ Services: []*descriptor.Service{
+ {
+ ServiceDescriptorProto: svc,
+ Methods: []*descriptor.Method{
+ {
+ MethodDescriptorProto: meth,
+ RequestType: msg,
+ ResponseType: msg,
+ Bindings: []*descriptor.Binding{
+ {
+ HTTPMethod: "GET",
+ PathTmpl: httprule.Template{
+ Version: 1,
+ OpCodes: []int{0, 0},
+ Template: "/v1/echo",
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ }
+ }
+
+ type test struct {
+ file func() descriptor.File
+ openapiOperation *openapi_options.Operation
+ parameters openapiParametersObject
+ }
+
+ tests := map[string]*test{
+ "type string": {
+ file: file,
+ openapiOperation: &openapi_options.Operation{
+ Parameters: &openapi_options.Parameters{
+ Headers: []*openapi_options.HeaderParameter{
+ {
+ Name: "X-Custom-Header",
+ Type: openapi_options.HeaderParameter_STRING,
+ },
+ },
+ },
+ },
+ parameters: openapiParametersObject{
+ {
+ Name: "X-Custom-Header",
+ In: "header",
+ Type: "string",
+ },
+ },
+ },
+ "type integer": {
+ file: file,
+ openapiOperation: &openapi_options.Operation{
+ Parameters: &openapi_options.Parameters{
+ Headers: []*openapi_options.HeaderParameter{
+ {
+ Name: "X-Custom-Header",
+ Type: openapi_options.HeaderParameter_INTEGER,
+ },
+ },
+ },
+ },
+ parameters: openapiParametersObject{
+ {
+ Name: "X-Custom-Header",
+ In: "header",
+ Type: "integer",
+ },
+ },
+ },
+ "type number": {
+ file: file,
+ openapiOperation: &openapi_options.Operation{
+ Parameters: &openapi_options.Parameters{
+ Headers: []*openapi_options.HeaderParameter{
+ {
+ Name: "X-Custom-Header",
+ Type: openapi_options.HeaderParameter_NUMBER,
+ },
+ },
+ },
+ },
+ parameters: openapiParametersObject{
+ {
+ Name: "X-Custom-Header",
+ In: "header",
+ Type: "number",
+ },
+ },
+ },
+ "type boolean": {
+ file: file,
+ openapiOperation: &openapi_options.Operation{
+ Parameters: &openapi_options.Parameters{
+ Headers: []*openapi_options.HeaderParameter{
+ {
+ Name: "X-Custom-Header",
+ Type: openapi_options.HeaderParameter_BOOLEAN,
+ },
+ },
+ },
+ },
+ parameters: openapiParametersObject{
+ {
+ Name: "X-Custom-Header",
+ In: "header",
+ Type: "boolean",
+ },
+ },
+ },
+ "header required": {
+ file: file,
+ openapiOperation: &openapi_options.Operation{
+ Parameters: &openapi_options.Parameters{
+ Headers: []*openapi_options.HeaderParameter{
+ {
+ Name: "X-Custom-Header",
+ Required: true,
+ Type: openapi_options.HeaderParameter_STRING,
+ },
+ },
+ },
+ },
+ parameters: openapiParametersObject{
+ {
+ Name: "X-Custom-Header",
+ In: "header",
+ Required: true,
+ Type: "string",
+ },
+ },
+ },
+ }
+
+ for name, test := range tests {
+ test := test
+
+ t.Run(name, func(t *testing.T) {
+ file := test.file()
+
+ proto.SetExtension(
+ proto.Message(file.Services[0].Methods[0].Options),
+ openapi_options.E_Openapiv2Operation,
+ test.openapiOperation)
+
+ reg := descriptor.NewRegistry()
+
+ fileCL := crossLinkFixture(&file)
+
+ err := reg.Load(reqFromFile(fileCL))
+ if err != nil {
+ t.Errorf("reg.Load(%#v) failed with %v; want success", file, err)
+ }
+
+ result, err := applyTemplate(param{File: fileCL, reg: reg})
+ if err != nil {
+ t.Fatalf("applyTemplate(%#v) failed with %v; want success", file, err)
+ }
+
+ params := result.Paths["/v1/echo"].Get.Parameters
+
+ if !reflect.DeepEqual(params, test.parameters) {
+ t.Errorf("expected %+v, got %+v", test.parameters, params)
+ }
+ })
+ }
+}
+
+func GetPaths(req *openapiSwaggerObject) []string {
+ paths := make([]string, len(req.Paths))
+ i := 0
+ for k := range req.Paths {
+ paths[i] = k
+ i++
}
+ return paths
}
diff --git a/protoc-gen-openapiv2/internal/genopenapi/types.go b/protoc-gen-openapiv2/internal/genopenapi/types.go
index 505cfc686e8..8c9b45d1613 100644
--- a/protoc-gen-openapiv2/internal/genopenapi/types.go
+++ b/protoc-gen-openapiv2/internal/genopenapi/types.go
@@ -15,65 +15,67 @@ type param struct {
// http://swagger.io/specification/#infoObject
type openapiInfoObject struct {
- Title string `json:"title"`
- Description string `json:"description,omitempty"`
- TermsOfService string `json:"termsOfService,omitempty"`
- Version string `json:"version"`
+ Title string `json:"title" yaml:"title"`
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+ TermsOfService string `json:"termsOfService,omitempty" yaml:"termsOfService,omitempty"`
+ Version string `json:"version" yaml:"version"`
- Contact *openapiContactObject `json:"contact,omitempty"`
- License *openapiLicenseObject `json:"license,omitempty"`
+ Contact *openapiContactObject `json:"contact,omitempty" yaml:"contact,omitempty"`
+ License *openapiLicenseObject `json:"license,omitempty" yaml:"license,omitempty"`
- extensions []extension
+ extensions []extension `json:"-" yaml:"-"`
}
// https://swagger.io/specification/#tagObject
type openapiTagObject struct {
- Name string `json:"name"`
- Description string `json:"description,omitempty"`
- ExternalDocs *openapiExternalDocumentationObject `json:"externalDocs,omitempty"`
+ Name string `json:"name" yaml:"name"`
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+ ExternalDocs *openapiExternalDocumentationObject `json:"externalDocs,omitempty" yaml:"externalDocs,omitempty"`
+
+ extensions []extension `json:"-" yaml:"-"`
}
// http://swagger.io/specification/#contactObject
type openapiContactObject struct {
- Name string `json:"name,omitempty"`
- URL string `json:"url,omitempty"`
- Email string `json:"email,omitempty"`
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+ URL string `json:"url,omitempty" yaml:"url,omitempty"`
+ Email string `json:"email,omitempty" yaml:"email,omitempty"`
}
// http://swagger.io/specification/#licenseObject
type openapiLicenseObject struct {
- Name string `json:"name,omitempty"`
- URL string `json:"url,omitempty"`
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+ URL string `json:"url,omitempty" yaml:"url,omitempty"`
}
// http://swagger.io/specification/#externalDocumentationObject
type openapiExternalDocumentationObject struct {
- Description string `json:"description,omitempty"`
- URL string `json:"url,omitempty"`
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+ URL string `json:"url,omitempty" yaml:"url,omitempty"`
}
type extension struct {
- key string
- value json.RawMessage
+ key string `json:"-" yaml:"-"`
+ value json.RawMessage `json:"-" yaml:"-"`
}
// http://swagger.io/specification/#swaggerObject
type openapiSwaggerObject struct {
- Swagger string `json:"swagger"`
- Info openapiInfoObject `json:"info"`
- Tags []openapiTagObject `json:"tags,omitempty"`
- Host string `json:"host,omitempty"`
- BasePath string `json:"basePath,omitempty"`
- Schemes []string `json:"schemes,omitempty"`
- Consumes []string `json:"consumes"`
- Produces []string `json:"produces"`
- Paths openapiPathsObject `json:"paths"`
- Definitions openapiDefinitionsObject `json:"definitions"`
- SecurityDefinitions openapiSecurityDefinitionsObject `json:"securityDefinitions,omitempty"`
- Security []openapiSecurityRequirementObject `json:"security,omitempty"`
- ExternalDocs *openapiExternalDocumentationObject `json:"externalDocs,omitempty"`
-
- extensions []extension
+ Swagger string `json:"swagger" yaml:"swagger"`
+ Info openapiInfoObject `json:"info" yaml:"info"`
+ Tags []openapiTagObject `json:"tags,omitempty" yaml:"tags,omitempty"`
+ Host string `json:"host,omitempty" yaml:"host,omitempty"`
+ BasePath string `json:"basePath,omitempty" yaml:"basePath,omitempty"`
+ Schemes []string `json:"schemes,omitempty" yaml:"schemes,omitempty"`
+ Consumes []string `json:"consumes" yaml:"consumes"`
+ Produces []string `json:"produces" yaml:"produces"`
+ Paths openapiPathsObject `json:"paths" yaml:"paths"`
+ Definitions openapiDefinitionsObject `json:"definitions" yaml:"definitions"`
+ SecurityDefinitions openapiSecurityDefinitionsObject `json:"securityDefinitions,omitempty" yaml:"securityDefinitions,omitempty"`
+ Security []openapiSecurityRequirementObject `json:"security,omitempty" yaml:"security,omitempty"`
+ ExternalDocs *openapiExternalDocumentationObject `json:"externalDocs,omitempty" yaml:"externalDocs,omitempty"`
+
+ extensions []extension `json:"-" yaml:"-"`
}
// http://swagger.io/specification/#securityDefinitionsObject
@@ -81,16 +83,16 @@ type openapiSecurityDefinitionsObject map[string]openapiSecuritySchemeObject
// http://swagger.io/specification/#securitySchemeObject
type openapiSecuritySchemeObject struct {
- Type string `json:"type"`
- Description string `json:"description,omitempty"`
- Name string `json:"name,omitempty"`
- In string `json:"in,omitempty"`
- Flow string `json:"flow,omitempty"`
- AuthorizationURL string `json:"authorizationUrl,omitempty"`
- TokenURL string `json:"tokenUrl,omitempty"`
- Scopes openapiScopesObject `json:"scopes,omitempty"`
-
- extensions []extension
+ Type string `json:"type" yaml:"type"`
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+ In string `json:"in,omitempty" yaml:"in,omitempty"`
+ Flow string `json:"flow,omitempty" yaml:"flow,omitempty"`
+ AuthorizationURL string `json:"authorizationUrl,omitempty" yaml:"authorizationUrl,omitempty"`
+ TokenURL string `json:"tokenUrl,omitempty" yaml:"tokenUrl,omitempty"`
+ Scopes openapiScopesObject `json:"scopes,omitempty" yaml:"scopes,omitempty"`
+
+ extensions []extension `json:"-" yaml:"-"`
}
// http://swagger.io/specification/#scopesObject
@@ -104,66 +106,114 @@ type openapiPathsObject map[string]openapiPathItemObject
// http://swagger.io/specification/#pathItemObject
type openapiPathItemObject struct {
- Get *openapiOperationObject `json:"get,omitempty"`
- Delete *openapiOperationObject `json:"delete,omitempty"`
- Post *openapiOperationObject `json:"post,omitempty"`
- Put *openapiOperationObject `json:"put,omitempty"`
- Patch *openapiOperationObject `json:"patch,omitempty"`
+ Get *openapiOperationObject `json:"get,omitempty" yaml:"get,omitempty"`
+ Delete *openapiOperationObject `json:"delete,omitempty" yaml:"delete,omitempty"`
+ Post *openapiOperationObject `json:"post,omitempty" yaml:"post,omitempty"`
+ Put *openapiOperationObject `json:"put,omitempty" yaml:"put,omitempty"`
+ Patch *openapiOperationObject `json:"patch,omitempty" yaml:"patch,omitempty"`
+ Head *openapiOperationObject `json:"head,omitempty" yaml:"head,omitempty"`
+ Options *openapiOperationObject `json:"options,omitempty" yaml:"options,omitempty"`
+ // While TRACE is supported in OpenAPI v3, it is not supported in OpenAPI v2
+ // Trace *openapiOperationObject `json:"trace,omitempty" yaml:"trace,omitempty"`
}
// http://swagger.io/specification/#operationObject
type openapiOperationObject struct {
- Summary string `json:"summary,omitempty"`
- Description string `json:"description,omitempty"`
- OperationID string `json:"operationId"`
- Responses openapiResponsesObject `json:"responses"`
- Parameters openapiParametersObject `json:"parameters,omitempty"`
- Tags []string `json:"tags,omitempty"`
- Deprecated bool `json:"deprecated,omitempty"`
- Produces []string `json:"produces,omitempty"`
-
- Security *[]openapiSecurityRequirementObject `json:"security,omitempty"`
- ExternalDocs *openapiExternalDocumentationObject `json:"externalDocs,omitempty"`
-
- extensions []extension
+ Summary string `json:"summary,omitempty" yaml:"summary,omitempty"`
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+ OperationID string `json:"operationId" yaml:"operationId"`
+ Responses openapiResponsesObject `json:"responses" yaml:"responses"`
+ Parameters openapiParametersObject `json:"parameters,omitempty" yaml:"parameters,omitempty"`
+ Tags []string `json:"tags,omitempty" yaml:"tags,omitempty"`
+ Deprecated bool `json:"deprecated,omitempty" yaml:"deprecated,omitempty"`
+ Consumes []string `json:"consumes,omitempty" yaml:"consumes,omitempty"`
+ Produces []string `json:"produces,omitempty" yaml:"produces,omitempty"`
+
+ Security *[]openapiSecurityRequirementObject `json:"security,omitempty" yaml:"security,omitempty"`
+ ExternalDocs *openapiExternalDocumentationObject `json:"externalDocs,omitempty" yaml:"externalDocs,omitempty"`
+
+ extensions []extension `json:"-" yaml:"-"`
}
type openapiParametersObject []openapiParameterObject
// http://swagger.io/specification/#parameterObject
type openapiParameterObject struct {
- Name string `json:"name"`
- Description string `json:"description,omitempty"`
- In string `json:"in,omitempty"`
- Required bool `json:"required"`
- Type string `json:"type,omitempty"`
- Format string `json:"format,omitempty"`
- Items *openapiItemsObject `json:"items,omitempty"`
- Enum []string `json:"enum,omitempty"`
- CollectionFormat string `json:"collectionFormat,omitempty"`
- Default string `json:"default,omitempty"`
- MinItems *int `json:"minItems,omitempty"`
+ Name string `json:"name" yaml:"name"`
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+ In string `json:"in,omitempty" yaml:"in,omitempty"`
+ Required bool `json:"required" yaml:"required"`
+ Type string `json:"type,omitempty" yaml:"type,omitempty"`
+ Format string `json:"format,omitempty" yaml:"format,omitempty"`
+ Items *openapiItemsObject `json:"items,omitempty" yaml:"items,omitempty"`
+ Enum []string `json:"enum,omitempty" yaml:"enum,omitempty"`
+ CollectionFormat string `json:"collectionFormat,omitempty" yaml:"collectionFormat,omitempty"`
+ Default string `json:"default,omitempty" yaml:"default,omitempty"`
+ MinItems *int `json:"minItems,omitempty" yaml:"minItems,omitempty"`
+ Pattern string `json:"pattern,omitempty" yaml:"pattern,omitempty"`
// Or you can explicitly refer to another type. If this is defined all
// other fields should be empty
- Schema *openapiSchemaObject `json:"schema,omitempty"`
+ Schema *openapiSchemaObject `json:"schema,omitempty" yaml:"schema,omitempty"`
+
+ extensions []extension
}
// core part of schema, which is common to itemsObject and schemaObject.
-// http://swagger.io/specification/#itemsObject
+// http://swagger.io/specification/v2/#itemsObject
+// The OAS3 spec (https://swagger.io/specification/#schemaObject) defines the
+// `nullable` field as part of a Schema Object. This behavior has been
+// "back-ported" to OAS2 as the Specification Extension `x-nullable`, and is
+// supported by generation tools such as swagger-codegen and go-swagger.
+// For protoc-gen-openapiv3, we'd want to add `nullable` instead.
type schemaCore struct {
- Type string `json:"type,omitempty"`
- Format string `json:"format,omitempty"`
- Ref string `json:"$ref,omitempty"`
- Example json.RawMessage `json:"example,omitempty"`
+ Type string `json:"type,omitempty" yaml:"type,omitempty"`
+ Format string `json:"format,omitempty" yaml:"format,omitempty"`
+ Ref string `json:"$ref,omitempty" yaml:"$ref,omitempty"`
+ XNullable bool `json:"x-nullable,omitempty" yaml:"x-nullable,omitempty"`
+ Example RawExample `json:"example,omitempty" yaml:"example,omitempty"`
- Items *openapiItemsObject `json:"items,omitempty"`
+ Items *openapiItemsObject `json:"items,omitempty" yaml:"items,omitempty"`
// If the item is an enumeration include a list of all the *NAMES* of the
// enum values. I'm not sure how well this will work but assuming all enums
// start from 0 index it will be great. I don't think that is a good assumption.
- Enum []string `json:"enum,omitempty"`
- Default string `json:"default,omitempty"`
+ Enum []string `json:"enum,omitempty" yaml:"enum,omitempty"`
+ Default string `json:"default,omitempty" yaml:"default,omitempty"`
+}
+
+type RawExample json.RawMessage
+
+func (m RawExample) MarshalJSON() ([]byte, error) {
+ return (json.RawMessage)(m).MarshalJSON()
+}
+
+func (m *RawExample) UnmarshalJSON(data []byte) error {
+ return (*json.RawMessage)(m).UnmarshalJSON(data)
+}
+
+// MarshalYAML implements yaml.Marshaler interface.
+//
+// It converts RawExample to one of yaml-supported types and returns it.
+//
+// From yaml.Marshaler docs: The Marshaler interface may be implemented
+// by types to customize their behavior when being marshaled into a YAML
+// document. The returned value is marshaled in place of the original
+// value implementing Marshaler.
+func (e RawExample) MarshalYAML() (interface{}, error) {
+ // From docs, json.Unmarshal will store one of next types to data:
+ // - bool, for JSON booleans;
+ // - float64, for JSON numbers;
+ // - string, for JSON strings;
+ // - []interface{}, for JSON arrays;
+ // - map[string]interface{}, for JSON objects;
+ // - nil for JSON null.
+ var data interface{}
+ if err := json.Unmarshal(e, &data); err != nil {
+ return nil, err
+ }
+
+ return data, nil
}
func (s *schemaCore) setRefFromFQN(ref string, reg *descriptor.Registry) error {
@@ -175,30 +225,30 @@ func (s *schemaCore) setRefFromFQN(ref string, reg *descriptor.Registry) error {
return nil
}
-type openapiItemsObject schemaCore
+type openapiItemsObject openapiSchemaObject
// http://swagger.io/specification/#responsesObject
type openapiResponsesObject map[string]openapiResponseObject
// http://swagger.io/specification/#responseObject
type openapiResponseObject struct {
- Description string `json:"description"`
- Schema openapiSchemaObject `json:"schema"`
- Examples map[string]interface{} `json:"examples,omitempty"`
- Headers openapiHeadersObject `json:"headers,omitempty"`
+ Description string `json:"description" yaml:"description"`
+ Schema openapiSchemaObject `json:"schema" yaml:"schema"`
+ Examples map[string]interface{} `json:"examples,omitempty" yaml:"examples,omitempty"`
+ Headers openapiHeadersObject `json:"headers,omitempty" yaml:"headers,omitempty"`
- extensions []extension
+ extensions []extension `json:"-" yaml:"-"`
}
type openapiHeadersObject map[string]openapiHeaderObject
// http://swagger.io/specification/#headerObject
type openapiHeaderObject struct {
- Description string `json:"description,omitempty"`
- Type string `json:"type,omitempty"`
- Format string `json:"format,omitempty"`
- Default json.RawMessage `json:"default,omitempty"`
- Pattern string `json:"pattern,omitempty"`
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+ Type string `json:"type,omitempty" yaml:"type,omitempty"`
+ Format string `json:"format,omitempty" yaml:"format,omitempty"`
+ Default RawExample `json:"default,omitempty" yaml:"default,omitempty"`
+ Pattern string `json:"pattern,omitempty" yaml:"pattern,omitempty"`
}
type keyVal struct {
@@ -208,6 +258,16 @@ type keyVal struct {
type openapiSchemaObjectProperties []keyVal
+func (p openapiSchemaObjectProperties) MarshalYAML() (interface{}, error) {
+ m := make(map[string]interface{}, len(p))
+
+ for _, v := range p {
+ m[v.Key] = v.Value
+ }
+
+ return m, nil
+}
+
func (op openapiSchemaObjectProperties) MarshalJSON() ([]byte, error) {
var buf bytes.Buffer
buf.WriteString("{")
@@ -234,31 +294,33 @@ func (op openapiSchemaObjectProperties) MarshalJSON() ([]byte, error) {
// http://swagger.io/specification/#schemaObject
type openapiSchemaObject struct {
- schemaCore
+ schemaCore `yaml:",inline"`
// Properties can be recursively defined
- Properties *openapiSchemaObjectProperties `json:"properties,omitempty"`
- AdditionalProperties *openapiSchemaObject `json:"additionalProperties,omitempty"`
-
- Description string `json:"description,omitempty"`
- Title string `json:"title,omitempty"`
-
- ExternalDocs *openapiExternalDocumentationObject `json:"externalDocs,omitempty"`
-
- ReadOnly bool `json:"readOnly,omitempty"`
- MultipleOf float64 `json:"multipleOf,omitempty"`
- Maximum float64 `json:"maximum,omitempty"`
- ExclusiveMaximum bool `json:"exclusiveMaximum,omitempty"`
- Minimum float64 `json:"minimum,omitempty"`
- ExclusiveMinimum bool `json:"exclusiveMinimum,omitempty"`
- MaxLength uint64 `json:"maxLength,omitempty"`
- MinLength uint64 `json:"minLength,omitempty"`
- Pattern string `json:"pattern,omitempty"`
- MaxItems uint64 `json:"maxItems,omitempty"`
- MinItems uint64 `json:"minItems,omitempty"`
- UniqueItems bool `json:"uniqueItems,omitempty"`
- MaxProperties uint64 `json:"maxProperties,omitempty"`
- MinProperties uint64 `json:"minProperties,omitempty"`
- Required []string `json:"required,omitempty"`
+ Properties *openapiSchemaObjectProperties `json:"properties,omitempty" yaml:"properties,omitempty"`
+ AdditionalProperties *openapiSchemaObject `json:"additionalProperties,omitempty" yaml:"additionalProperties,omitempty"`
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+ Title string `json:"title,omitempty" yaml:"title,omitempty"`
+
+ ExternalDocs *openapiExternalDocumentationObject `json:"externalDocs,omitempty" yaml:"externalDocs,omitempty"`
+
+ ReadOnly bool `json:"readOnly,omitempty" yaml:"readOnly,omitempty"`
+ MultipleOf float64 `json:"multipleOf,omitempty" yaml:"multipleOf,omitempty"`
+ Maximum float64 `json:"maximum,omitempty" yaml:"maximum,omitempty"`
+ ExclusiveMaximum bool `json:"exclusiveMaximum,omitempty" yaml:"exclusiveMaximum,omitempty"`
+ Minimum float64 `json:"minimum,omitempty" yaml:"minimum,omitempty"`
+ ExclusiveMinimum bool `json:"exclusiveMinimum,omitempty" yaml:"exclusiveMinimum,omitempty"`
+ MaxLength uint64 `json:"maxLength,omitempty" yaml:"maxLength,omitempty"`
+ MinLength uint64 `json:"minLength,omitempty" yaml:"minLength,omitempty"`
+ Pattern string `json:"pattern,omitempty" yaml:"pattern,omitempty"`
+ MaxItems uint64 `json:"maxItems,omitempty" yaml:"maxItems,omitempty"`
+ MinItems uint64 `json:"minItems,omitempty" yaml:"minItems,omitempty"`
+ UniqueItems bool `json:"uniqueItems,omitempty" yaml:"uniqueItems,omitempty"`
+ MaxProperties uint64 `json:"maxProperties,omitempty" yaml:"maxProperties,omitempty"`
+ MinProperties uint64 `json:"minProperties,omitempty" yaml:"minProperties,omitempty"`
+ Required []string `json:"required,omitempty" yaml:"required,omitempty"`
+
+ extensions []extension
}
// http://swagger.io/specification/#definitionsObject
diff --git a/protoc-gen-openapiv2/internal/genopenapi/types_test.go b/protoc-gen-openapiv2/internal/genopenapi/types_test.go
new file mode 100644
index 00000000000..849cfbfbb4a
--- /dev/null
+++ b/protoc-gen-openapiv2/internal/genopenapi/types_test.go
@@ -0,0 +1,112 @@
+package genopenapi
+
+import (
+ "encoding/json"
+ "strings"
+ "testing"
+
+ "gopkg.in/yaml.v3"
+)
+
+func newSpaceReplacer() *strings.Replacer {
+ return strings.NewReplacer(" ", "", "\n", "", "\t", "")
+}
+
+func TestRawExample(t *testing.T) {
+ t.Parallel()
+
+ testCases := [...]struct {
+ In RawExample
+ Exp string
+ }{{
+ In: RawExample(`1`),
+ Exp: `1`,
+ }, {
+ In: RawExample(`"1"`),
+ Exp: `"1"`,
+ }, {
+ In: RawExample(`{"hello":"worldr"}`),
+ Exp: `
+ hello:
+ worldr
+ `,
+ }}
+
+ sr := newSpaceReplacer()
+
+ for _, tc := range testCases {
+ tc := tc
+
+ t.Run(string(tc.In), func(t *testing.T) {
+ t.Parallel()
+
+ ex := RawExample(tc.In)
+
+ out, err := yaml.Marshal(ex)
+ switch {
+ case err != nil:
+ t.Fatalf("expect no yaml marshal error, got: %s", err)
+ case !json.Valid(tc.In):
+ t.Fatalf("json is invalid: %#q", tc.In)
+ case sr.Replace(tc.Exp) != sr.Replace(string(out)):
+ t.Fatalf("expected: %s, actual: %s", tc.Exp, out)
+ }
+
+ out, err = json.Marshal(tc.In)
+ switch {
+ case err != nil:
+ t.Fatalf("expect no json marshal error, got: %s", err)
+ case sr.Replace(string(tc.In)) != sr.Replace(string(out)):
+ t.Fatalf("expected: %s, actual: %s", tc.In, out)
+ }
+ })
+ }
+}
+
+func TestOpenapiSchemaObjectProperties(t *testing.T) {
+ t.Parallel()
+
+ v := map[string]interface{}{
+ "example": openapiSchemaObjectProperties{{
+ Key: "test1",
+ Value: 1,
+ }, {
+ Key: "test2",
+ Value: 2,
+ }},
+ }
+
+ t.Run("yaml", func(t *testing.T) {
+ t.Parallel()
+
+ const exp = `
+ example:
+ test1: 1
+ test2: 2
+ `
+
+ sr := newSpaceReplacer()
+
+ out, err := yaml.Marshal(v)
+ switch {
+ case err != nil:
+ t.Fatalf("expect no marshal error, got: %s", err)
+ case sr.Replace(exp) != sr.Replace(string(out)):
+ t.Fatalf("expected: %s, actual: %s", exp, out)
+ }
+ })
+
+ t.Run("json", func(t *testing.T) {
+ t.Parallel()
+
+ const exp = `{"example":{"test1":1,"test2":2}}`
+
+ got, err := json.Marshal(v)
+ switch {
+ case err != nil:
+ t.Fatalf("expect no marshal error, got: %s", err)
+ case exp != string(got):
+ t.Fatalf("expected: %s, actual: %s", exp, got)
+ }
+ })
+}
diff --git a/protoc-gen-openapiv2/main.go b/protoc-gen-openapiv2/main.go
index b05af0e879d..092d6fa9dbc 100644
--- a/protoc-gen-openapiv2/main.go
+++ b/protoc-gen-openapiv2/main.go
@@ -10,30 +10,38 @@ import (
"github.com/grpc-ecosystem/grpc-gateway/v2/internal/codegenerator"
"github.com/grpc-ecosystem/grpc-gateway/v2/internal/descriptor"
"github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/internal/genopenapi"
+ "github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/types/pluginpb"
)
var (
- importPrefix = flag.String("import_prefix", "", "prefix to be added to go package paths for imported proto files")
- file = flag.String("file", "-", "where to load data from")
- allowDeleteBody = flag.Bool("allow_delete_body", false, "unless set, HTTP DELETE methods may not have a body")
- grpcAPIConfiguration = flag.String("grpc_api_configuration", "", "path to file which describes the gRPC API Configuration in YAML format")
- allowMerge = flag.Bool("allow_merge", false, "if set, generation one OpenAPI file out of multiple protos")
- mergeFileName = flag.String("merge_file_name", "apidocs", "target OpenAPI file name prefix after merge")
- useJSONNamesForFields = flag.Bool("json_names_for_fields", true, "if disabled, the original proto name will be used for generating OpenAPI definitions")
- repeatedPathParamSeparator = flag.String("repeated_path_param_separator", "csv", "configures how repeated fields should be split. Allowed values are `csv`, `pipes`, `ssv` and `tsv`")
- versionFlag = flag.Bool("version", false, "print the current version")
- allowRepeatedFieldsInBody = flag.Bool("allow_repeated_fields_in_body", false, "allows to use repeated field in `body` and `response_body` field of `google.api.http` annotation option")
- includePackageInTags = flag.Bool("include_package_in_tags", false, "if unset, the gRPC service name is added to the `Tags` field of each operation. If set and the `package` directive is shown in the proto file, the package name will be prepended to the service name")
- useFQNForOpenAPIName = flag.Bool("fqn_for_openapi_name", false, "if set, the object's OpenAPI names will use the fully qualified names from the proto definition (ie my.package.MyMessage.MyInnerMessage")
- useGoTemplate = flag.Bool("use_go_templates", false, "if set, you can use Go templates in protofile comments")
- disableDefaultErrors = flag.Bool("disable_default_errors", false, "if set, disables generation of default errors. This is useful if you have defined custom error handling")
- enumsAsInts = flag.Bool("enums_as_ints", false, "whether to render enum values as integers, as opposed to string values")
- simpleOperationIDs = flag.Bool("simple_operation_ids", false, "whether to remove the service prefix in the operationID generation. Can introduce duplicate operationIDs, use with caution.")
- openAPIConfiguration = flag.String("openapi_configuration", "", "path to file which describes the OpenAPI Configuration in YAML format")
- generateUnboundMethods = flag.Bool("generate_unbound_methods", false, "generate swagger metadata even for RPC methods that have no HttpRule annotation")
- recursiveDepth = flag.Int("recursive-depth", 1000, "maximum recursion count allowed for a field type")
+ importPrefix = flag.String("import_prefix", "", "prefix to be added to go package paths for imported proto files")
+ file = flag.String("file", "-", "where to load data from")
+ allowDeleteBody = flag.Bool("allow_delete_body", false, "unless set, HTTP DELETE methods may not have a body")
+ grpcAPIConfiguration = flag.String("grpc_api_configuration", "", "path to file which describes the gRPC API Configuration in YAML format")
+ allowMerge = flag.Bool("allow_merge", false, "if set, generation one OpenAPI file out of multiple protos")
+ mergeFileName = flag.String("merge_file_name", "apidocs", "target OpenAPI file name prefix after merge")
+ useJSONNamesForFields = flag.Bool("json_names_for_fields", true, "if disabled, the original proto name will be used for generating OpenAPI definitions")
+ repeatedPathParamSeparator = flag.String("repeated_path_param_separator", "csv", "configures how repeated fields should be split. Allowed values are `csv`, `pipes`, `ssv` and `tsv`")
+ versionFlag = flag.Bool("version", false, "print the current version")
+ _ = flag.Bool("allow_repeated_fields_in_body", true, "allows to use repeated field in `body` and `response_body` field of `google.api.http` annotation option. DEPRECATED: the value is ignored and always behaves as `true`.")
+ includePackageInTags = flag.Bool("include_package_in_tags", false, "if unset, the gRPC service name is added to the `Tags` field of each operation. If set and the `package` directive is shown in the proto file, the package name will be prepended to the service name")
+ useFQNForOpenAPIName = flag.Bool("fqn_for_openapi_name", false, "if set, the object's OpenAPI names will use the fully qualified names from the proto definition (ie my.package.MyMessage.MyInnerMessage). DEPRECATED: prefer `openapi_naming_strategy=fqn`")
+ openAPINamingStrategy = flag.String("openapi_naming_strategy", "", "use the given OpenAPI naming strategy. Allowed values are `legacy`, `fqn`, `simple`. If unset, either `legacy` or `fqn` are selected, depending on the value of the `fqn_for_openapi_name` flag")
+ useGoTemplate = flag.Bool("use_go_templates", false, "if set, you can use Go templates in protofile comments")
+ disableDefaultErrors = flag.Bool("disable_default_errors", false, "if set, disables generation of default errors. This is useful if you have defined custom error handling")
+ enumsAsInts = flag.Bool("enums_as_ints", false, "whether to render enum values as integers, as opposed to string values")
+ simpleOperationIDs = flag.Bool("simple_operation_ids", false, "whether to remove the service prefix in the operationID generation. Can introduce duplicate operationIDs, use with caution.")
+ proto3OptionalNullable = flag.Bool("proto3_optional_nullable", false, "whether Proto3 Optional fields should be marked as x-nullable")
+ openAPIConfiguration = flag.String("openapi_configuration", "", "path to file which describes the OpenAPI Configuration in YAML format")
+ generateUnboundMethods = flag.Bool("generate_unbound_methods", false, "generate swagger metadata even for RPC methods that have no HttpRule annotation")
+ recursiveDepth = flag.Int("recursive-depth", 1000, "maximum recursion count allowed for a field type")
+ omitEnumDefaultValue = flag.Bool("omit_enum_default_value", false, "if set, omit default enum value")
+ outputFormat = flag.String("output_format", string(genopenapi.FormatJSON), fmt.Sprintf("output content format. Allowed values are: `%s`, `%s`", genopenapi.FormatJSON, genopenapi.FormatYAML))
+ visibilityRestrictionSelectors = utilities.StringArrayFlag(flag.CommandLine, "visibility_restriction_selectors", "list of `google.api.VisibilityRule` visibility labels to include in the generated output when a visibility annotation is defined. Repeat this option to supply multiple values. Elements without visibility annotations are unaffected by this setting.")
+ disableServiceTags = flag.Bool("disable_service_tags", false, "if set, disables generation of service tags. This is useful if you do not want to expose the names of your backend grpc services.")
+ disableDefaultResponses = flag.Bool("disable_default_responses", false, "if set, disables generation of default responses. Useful if you have to support custom response codes that are not 200.")
)
// Variables set by goreleaser at build time
@@ -71,8 +79,7 @@ func main() {
glog.V(1).Info("Parsed code generator request")
pkgMap := make(map[string]string)
if req.Parameter != nil {
- err := parseReqParam(req.GetParameter(), flag.CommandLine, pkgMap)
- if err != nil {
+ if err := parseReqParam(req.GetParameter(), flag.CommandLine, pkgMap); err != nil {
glog.Fatalf("Error parsing flags: %v", err)
}
}
@@ -82,15 +89,44 @@ func main() {
reg.SetAllowMerge(*allowMerge)
reg.SetMergeFileName(*mergeFileName)
reg.SetUseJSONNamesForFields(*useJSONNamesForFields)
- reg.SetAllowRepeatedFieldsInBody(*allowRepeatedFieldsInBody)
+
+ flag.Visit(func(f *flag.Flag) {
+ if f.Name == "allow_repeated_fields_in_body" {
+ glog.Warning("The `allow_repeated_fields_in_body` flag is deprecated and will always behave as `true`.")
+ }
+ })
+
reg.SetIncludePackageInTags(*includePackageInTags)
+
reg.SetUseFQNForOpenAPIName(*useFQNForOpenAPIName)
+ // Set the naming strategy either directly from the flag, or via the value of the legacy fqn_for_openapi_name
+ // flag.
+ namingStrategy := *openAPINamingStrategy
+ if *useFQNForOpenAPIName {
+ if namingStrategy != "" {
+ glog.Fatal("The deprecated `fqn_for_openapi_name` flag must remain unset if `openapi_naming_strategy` is set.")
+ }
+ glog.Warning("The `fqn_for_openapi_name` flag is deprecated. Please use `openapi_naming_strategy=fqn` instead.")
+ namingStrategy = "fqn"
+ } else if namingStrategy == "" {
+ namingStrategy = "legacy"
+ }
+ if strategyFn := genopenapi.LookupNamingStrategy(namingStrategy); strategyFn == nil {
+ emitError(fmt.Errorf("invalid naming strategy %q", namingStrategy))
+ return
+ }
+ reg.SetOpenAPINamingStrategy(namingStrategy)
reg.SetUseGoTemplate(*useGoTemplate)
reg.SetEnumsAsInts(*enumsAsInts)
reg.SetDisableDefaultErrors(*disableDefaultErrors)
reg.SetSimpleOperationIDs(*simpleOperationIDs)
+ reg.SetProto3OptionalNullable(*proto3OptionalNullable)
reg.SetGenerateUnboundMethods(*generateUnboundMethods)
reg.SetRecursiveDepth(*recursiveDepth)
+ reg.SetOmitEnumDefaultValue(*omitEnumDefaultValue)
+ reg.SetVisibilityRestrictionSelectors(*visibilityRestrictionSelectors)
+ reg.SetDisableServiceTags(*disableServiceTags)
+ reg.SetDisableDefaultResponses(*disableDefaultResponses)
if err := reg.SetRepeatedPathParamSeparator(*repeatedPathParamSeparator); err != nil {
emitError(err)
return
@@ -106,7 +142,13 @@ func main() {
}
}
- g := genopenapi.New(reg)
+ format := genopenapi.Format(*outputFormat)
+ if err := format.Validate(); err != nil {
+ emitError(err)
+ return
+ }
+
+ g := genopenapi.New(reg, format)
if err := genopenapi.AddErrorDefs(reg); err != nil {
emitError(err)
@@ -125,7 +167,7 @@ func main() {
}
}
- var targets []*descriptor.File
+ targets := make([]*descriptor.File, 0, len(req.FileToGenerate))
for _, target := range req.FileToGenerate {
f, err := reg.LookupFile(target)
if err != nil {
@@ -177,37 +219,30 @@ func parseReqParam(param string, f *flag.FlagSet, pkgMap map[string]string) erro
for _, p := range strings.Split(param, ",") {
spec := strings.SplitN(p, "=", 2)
if len(spec) == 1 {
- if spec[0] == "allow_delete_body" {
- err := f.Set(spec[0], "true")
- if err != nil {
- return fmt.Errorf("cannot set flag %s: %v", p, err)
+ switch spec[0] {
+ case "allow_delete_body":
+ if err := f.Set(spec[0], "true"); err != nil {
+ return fmt.Errorf("cannot set flag %s: %w", p, err)
}
continue
- }
- if spec[0] == "allow_merge" {
- err := f.Set(spec[0], "true")
- if err != nil {
- return fmt.Errorf("cannot set flag %s: %v", p, err)
+ case "allow_merge":
+ if err := f.Set(spec[0], "true"); err != nil {
+ return fmt.Errorf("cannot set flag %s: %w", p, err)
}
continue
- }
- if spec[0] == "allow_repeated_fields_in_body" {
- err := f.Set(spec[0], "true")
- if err != nil {
- return fmt.Errorf("cannot set flag %s: %v", p, err)
+ case "allow_repeated_fields_in_body":
+ if err := f.Set(spec[0], "true"); err != nil {
+ return fmt.Errorf("cannot set flag %s: %w", p, err)
}
continue
- }
- if spec[0] == "include_package_in_tags" {
- err := f.Set(spec[0], "true")
- if err != nil {
- return fmt.Errorf("cannot set flag %s: %v", p, err)
+ case "include_package_in_tags":
+ if err := f.Set(spec[0], "true"); err != nil {
+ return fmt.Errorf("cannot set flag %s: %w", p, err)
}
continue
}
- err := f.Set(spec[0], "")
- if err != nil {
- return fmt.Errorf("cannot set flag %s: %v", p, err)
+ if err := f.Set(spec[0], ""); err != nil {
+ return fmt.Errorf("cannot set flag %s: %w", p, err)
}
continue
}
@@ -217,7 +252,7 @@ func parseReqParam(param string, f *flag.FlagSet, pkgMap map[string]string) erro
continue
}
if err := f.Set(name, value); err != nil {
- return fmt.Errorf("cannot set flag %s: %v", p, err)
+ return fmt.Errorf("cannot set flag %s: %w", p, err)
}
}
return nil
diff --git a/protoc-gen-openapiv2/main_test.go b/protoc-gen-openapiv2/main_test.go
index 80feea35d0d..a6f95c628ea 100644
--- a/protoc-gen-openapiv2/main_test.go
+++ b/protoc-gen-openapiv2/main_test.go
@@ -10,110 +10,173 @@ import (
func TestParseReqParam(t *testing.T) {
testcases := []struct {
- name string
- expected map[string]string
- request string
- expectedError error
- allowDeleteBodyV bool
- allowMergeV bool
- allowRepeatedFieldsInBodyV bool
- includePackageInTagsV bool
- fileV string
- importPathV string
- mergeFileNameV string
- useFQNForOpenAPINameV bool
+ name string
+ expected map[string]string
+ request string
+ expectedError error
+ allowDeleteBodyV bool
+ allowMergeV bool
+ includePackageInTagsV bool
+ fileV string
+ importPathV string
+ mergeFileNameV string
+ useFQNForOpenAPINameV bool
+ openAPINamingStrategyV string
}{
{
// this one must be first - with no leading clearFlags call it
// verifies our expectation of default values as we reset by
// clearFlags
- name: "Test 0",
- expected: map[string]string{},
- request: "",
- allowDeleteBodyV: false, allowMergeV: false, allowRepeatedFieldsInBodyV: false, includePackageInTagsV: false,
- fileV: "-", importPathV: "", mergeFileNameV: "apidocs",
+ name: "Test 0",
+ expected: map[string]string{},
+ request: "",
+ allowDeleteBodyV: false,
+ allowMergeV: false,
+ includePackageInTagsV: false,
+ fileV: "-",
+ importPathV: "",
+ mergeFileNameV: "apidocs",
},
{
- name: "Test 1",
- expected: map[string]string{"google/api/annotations.proto": "github.com/googleapis/googleapis/google/api"},
- request: "allow_delete_body,allow_merge,allow_repeated_fields_in_body,include_package_in_tags,file=./foo.pb,import_prefix=/bar/baz,Mgoogle/api/annotations.proto=github.com/googleapis/googleapis/google/api",
- allowDeleteBodyV: true, allowMergeV: true, allowRepeatedFieldsInBodyV: true, includePackageInTagsV: true,
- fileV: "./foo.pb", importPathV: "/bar/baz", mergeFileNameV: "apidocs",
+ name: "Test 1",
+ expected: map[string]string{"google/api/annotations.proto": "github.com/googleapis/googleapis/google/api"},
+ request: "allow_delete_body,allow_merge,allow_repeated_fields_in_body,include_package_in_tags,file=./foo.pb,import_prefix=/bar/baz,Mgoogle/api/annotations.proto=github.com/googleapis/googleapis/google/api",
+ allowDeleteBodyV: true,
+ allowMergeV: true,
+ includePackageInTagsV: true,
+ fileV: "./foo.pb",
+ importPathV: "/bar/baz",
+ mergeFileNameV: "apidocs",
},
{
- name: "Test 2",
- expected: map[string]string{"google/api/annotations.proto": "github.com/googleapis/googleapis/google/api"},
- request: "allow_delete_body=true,allow_merge=true,allow_repeated_fields_in_body=true,include_package_in_tags=true,merge_file_name=test_name,file=./foo.pb,import_prefix=/bar/baz,Mgoogle/api/annotations.proto=github.com/googleapis/googleapis/google/api",
- allowDeleteBodyV: true, allowMergeV: true, allowRepeatedFieldsInBodyV: true, includePackageInTagsV: true,
- fileV: "./foo.pb", importPathV: "/bar/baz", mergeFileNameV: "test_name",
+ name: "Test 2",
+ expected: map[string]string{"google/api/annotations.proto": "github.com/googleapis/googleapis/google/api"},
+ request: "allow_delete_body=true,allow_merge=true,allow_repeated_fields_in_body=true,include_package_in_tags=true,merge_file_name=test_name,file=./foo.pb,import_prefix=/bar/baz,Mgoogle/api/annotations.proto=github.com/googleapis/googleapis/google/api",
+ allowDeleteBodyV: true,
+ allowMergeV: true,
+ includePackageInTagsV: true,
+ fileV: "./foo.pb",
+ importPathV: "/bar/baz",
+ mergeFileNameV: "test_name",
},
{
- name: "Test 3",
- expected: map[string]string{"a/b/c.proto": "github.com/x/y/z", "f/g/h.proto": "github.com/1/2/3/"},
- request: "allow_delete_body=false,allow_merge=false,Ma/b/c.proto=github.com/x/y/z,Mf/g/h.proto=github.com/1/2/3/",
- allowDeleteBodyV: false, allowMergeV: false, allowRepeatedFieldsInBodyV: false, includePackageInTagsV: false,
- fileV: "stdin", importPathV: "", mergeFileNameV: "apidocs",
+ name: "Test 3",
+ expected: map[string]string{"a/b/c.proto": "github.com/x/y/z", "f/g/h.proto": "github.com/1/2/3/"},
+ request: "allow_delete_body=false,allow_merge=false,Ma/b/c.proto=github.com/x/y/z,Mf/g/h.proto=github.com/1/2/3/",
+ allowDeleteBodyV: false,
+ allowMergeV: false,
+ includePackageInTagsV: false,
+ fileV: "stdin",
+ importPathV: "",
+ mergeFileNameV: "apidocs",
},
{
- name: "Test 4",
- expected: map[string]string{},
- request: "",
- allowDeleteBodyV: false, allowMergeV: false, allowRepeatedFieldsInBodyV: false, includePackageInTagsV: false,
- fileV: "stdin", importPathV: "", mergeFileNameV: "apidocs",
+ name: "Test 4",
+ expected: map[string]string{},
+ request: "",
+ allowDeleteBodyV: false,
+ allowMergeV: false,
+ includePackageInTagsV: false,
+ fileV: "stdin",
+ importPathV: "",
+ mergeFileNameV: "apidocs",
},
{
- name: "Test 5",
- expected: map[string]string{},
- request: "unknown_param=17",
- expectedError: errors.New("cannot set flag unknown_param=17: no such flag -unknown_param"),
- allowDeleteBodyV: false, allowMergeV: false, allowRepeatedFieldsInBodyV: false, includePackageInTagsV: false,
- fileV: "stdin", importPathV: "", mergeFileNameV: "apidocs",
+ name: "Test 5",
+ expected: map[string]string{},
+ request: "unknown_param=17",
+ expectedError: errors.New("cannot set flag unknown_param=17: no such flag -unknown_param"),
+ allowDeleteBodyV: false,
+ allowMergeV: false,
+ includePackageInTagsV: false,
+ fileV: "stdin",
+ importPathV: "",
+ mergeFileNameV: "apidocs",
},
{
- name: "Test 6",
- expected: map[string]string{},
- request: "Mfoo",
- expectedError: errors.New("cannot set flag Mfoo: no such flag -Mfoo"),
- allowDeleteBodyV: false, allowMergeV: false, allowRepeatedFieldsInBodyV: false, includePackageInTagsV: false,
- fileV: "stdin", importPathV: "", mergeFileNameV: "apidocs",
+ name: "Test 6",
+ expected: map[string]string{},
+ request: "Mfoo",
+ expectedError: errors.New("cannot set flag Mfoo: no such flag -Mfoo"),
+ allowDeleteBodyV: false,
+ allowMergeV: false,
+ includePackageInTagsV: false,
+ fileV: "stdin",
+ importPathV: "",
+ mergeFileNameV: "apidocs",
},
{
- name: "Test 7",
- expected: map[string]string{},
- request: "allow_delete_body,file,import_prefix,allow_merge,allow_repeated_fields_in_body,include_package_in_tags,merge_file_name",
- allowDeleteBodyV: true, allowMergeV: true, allowRepeatedFieldsInBodyV: true, includePackageInTagsV: true,
- fileV: "", importPathV: "", mergeFileNameV: "",
+ name: "Test 7",
+ expected: map[string]string{},
+ request: "allow_delete_body,file,import_prefix,allow_merge,allow_repeated_fields_in_body,include_package_in_tags,merge_file_name",
+ allowDeleteBodyV: true,
+ allowMergeV: true,
+ includePackageInTagsV: true,
+ fileV: "",
+ importPathV: "",
+ mergeFileNameV: "",
},
{
- 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: parse error`),
- allowDeleteBodyV: true, allowMergeV: true, allowRepeatedFieldsInBodyV: false, includePackageInTagsV: false,
- fileV: "", importPathV: "", mergeFileNameV: "apidocs",
+ 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: parse error`),
+ allowDeleteBodyV: true,
+ allowMergeV: true,
+ includePackageInTagsV: false,
+ fileV: "",
+ importPathV: "",
+ mergeFileNameV: "apidocs",
},
{
- name: "Test 9",
- expected: map[string]string{},
- request: "include_package_in_tags=3",
- 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",
+ name: "Test 9",
+ expected: map[string]string{},
+ request: "include_package_in_tags=3",
+ expectedError: errors.New(`cannot set flag include_package_in_tags=3: parse error`),
+ allowDeleteBodyV: false,
+ allowMergeV: false,
+ includePackageInTagsV: false,
+ fileV: "stdin",
+ importPathV: "",
+ mergeFileNameV: "apidocs",
},
{
- name: "Test 10",
- expected: map[string]string{},
- request: "fqn_for_openapi_name=3",
- expectedError: errors.New(`cannot set flag fqn_for_openapi_name=3: parse error`),
- allowDeleteBodyV: false, allowMergeV: false, allowRepeatedFieldsInBodyV: false, includePackageInTagsV: false, useFQNForOpenAPINameV: false,
- fileV: "stdin", importPathV: "", mergeFileNameV: "apidocs",
+ name: "Test 10",
+ expected: map[string]string{},
+ request: "fqn_for_openapi_name=3",
+ expectedError: errors.New(`cannot set flag fqn_for_openapi_name=3: parse error`),
+ allowDeleteBodyV: false,
+ allowMergeV: false,
+ includePackageInTagsV: false,
+ useFQNForOpenAPINameV: false,
+ fileV: "stdin",
+ importPathV: "",
+ mergeFileNameV: "apidocs",
},
{
- name: "Test 11",
- expected: map[string]string{},
- request: "fqn_for_openapi_name=true",
- allowDeleteBodyV: false, allowMergeV: false, allowRepeatedFieldsInBodyV: false, includePackageInTagsV: false, useFQNForOpenAPINameV: true,
- fileV: "stdin", importPathV: "", mergeFileNameV: "apidocs",
+ name: "Test 11",
+ expected: map[string]string{},
+ request: "fqn_for_openapi_name=true",
+ allowDeleteBodyV: false,
+ allowMergeV: false,
+ includePackageInTagsV: false,
+ useFQNForOpenAPINameV: true,
+ fileV: "stdin",
+ importPathV: "",
+ mergeFileNameV: "apidocs",
+ },
+ {
+ name: "Test 12",
+ expected: map[string]string{},
+ request: "openapi_naming_strategy=simple",
+ allowDeleteBodyV: false,
+ allowMergeV: false,
+ includePackageInTagsV: false,
+ useFQNForOpenAPINameV: false,
+ openAPINamingStrategyV: "simple",
+ fileV: "stdin",
+ importPathV: "",
+ mergeFileNameV: "apidocs",
},
}
@@ -140,15 +203,25 @@ func TestParseReqParam(t *testing.T) {
tt.Errorf("expected error malformed, expected %q, got %q", tc.expectedError.Error(), err.Error())
}
}
- checkFlags(tc.allowDeleteBodyV, tc.allowMergeV, tc.allowRepeatedFieldsInBodyV, tc.includePackageInTagsV, tc.useFQNForOpenAPINameV, tc.fileV, tc.importPathV, tc.mergeFileNameV, tt, i)
+ checkFlags(tc.allowDeleteBodyV, tc.allowMergeV, tc.includePackageInTagsV, tc.useFQNForOpenAPINameV, tc.openAPINamingStrategyV, tc.fileV, tc.importPathV, tc.mergeFileNameV, tt, i)
clearFlags()
})
}
-
}
-func checkFlags(allowDeleteV, allowMergeV, allowRepeatedFieldsInBodyV, includePackageInTagsV bool, useFQNForOpenAPINameV bool, fileV, importPathV, mergeFileNameV string, t *testing.T, tid int) {
+func checkFlags(
+ allowDeleteV,
+ allowMergeV,
+ includePackageInTagsV bool,
+ useFQNForOpenAPINameV bool,
+ openAPINamingStrategyV,
+ fileV,
+ importPathV,
+ mergeFileNameV string,
+ t *testing.T,
+ tid int,
+) {
if *importPrefix != importPathV {
t.Errorf("Test %v: import_prefix misparsed, expected '%v', got '%v'", tid, importPathV, *importPrefix)
}
@@ -164,15 +237,15 @@ func checkFlags(allowDeleteV, allowMergeV, allowRepeatedFieldsInBodyV, includePa
if *mergeFileName != mergeFileNameV {
t.Errorf("Test %v: merge_file_name misparsed, expected '%v', got '%v'", tid, mergeFileNameV, *mergeFileName)
}
- if *allowRepeatedFieldsInBody != allowRepeatedFieldsInBodyV {
- t.Errorf("Test %v: allow_repeated_fields_in_body misparsed, expected '%v', got '%v'", tid, allowRepeatedFieldsInBodyV, *allowRepeatedFieldsInBody)
- }
if *includePackageInTags != includePackageInTagsV {
t.Errorf("Test %v: include_package_in_tags misparsed, expected '%v', got '%v'", tid, includePackageInTagsV, *includePackageInTags)
}
if *useFQNForOpenAPIName != useFQNForOpenAPINameV {
t.Errorf("Test %v: fqn_for_openapi_name misparsed, expected '%v', got '%v'", tid, useFQNForOpenAPINameV, *useFQNForOpenAPIName)
}
+ if *openAPINamingStrategy != openAPINamingStrategyV {
+ t.Errorf("Test %v: openapi_naming_strategy misparsed, expected '%v', got '%v'", tid, openAPINamingStrategyV, *openAPINamingStrategy)
+ }
}
func clearFlags() {
@@ -180,7 +253,8 @@ func clearFlags() {
*file = "stdin"
*allowDeleteBody = false
*allowMerge = false
- *allowRepeatedFieldsInBody = false
*includePackageInTags = false
*mergeFileName = "apidocs"
+ *useFQNForOpenAPIName = false
+ *openAPINamingStrategy = ""
}
diff --git a/protoc-gen-openapiv2/options/BUILD.bazel b/protoc-gen-openapiv2/options/BUILD.bazel
index 36369994172..1ae1c003c01 100644
--- a/protoc-gen-openapiv2/options/BUILD.bazel
+++ b/protoc-gen-openapiv2/options/BUILD.bazel
@@ -13,7 +13,7 @@ filegroup(
)
go_library(
- name = "go_default_library",
+ name = "options",
embed = [":options_go_proto"],
importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options",
)
@@ -36,3 +36,9 @@ go_proto_library(
importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options",
proto = ":options_proto",
)
+
+alias(
+ name = "go_default_library",
+ actual = ":options",
+ visibility = ["//visibility:public"],
+)
diff --git a/protoc-gen-openapiv2/options/annotations.pb.go b/protoc-gen-openapiv2/options/annotations.pb.go
index 5508a0a2966..0ef620d6a0f 100644
--- a/protoc-gen-openapiv2/options/annotations.pb.go
+++ b/protoc-gen-openapiv2/options/annotations.pb.go
@@ -1,15 +1,15 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.26.0
-// protoc v3.13.0
+// protoc-gen-go v1.27.1
+// protoc (unknown)
// source: protoc-gen-openapiv2/options/annotations.proto
package options
import (
- descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ descriptorpb "google.golang.org/protobuf/types/descriptorpb"
reflect "reflect"
)
@@ -22,7 +22,7 @@ const (
var file_protoc_gen_openapiv2_options_annotations_proto_extTypes = []protoimpl.ExtensionInfo{
{
- ExtendedType: (*descriptor.FileOptions)(nil),
+ ExtendedType: (*descriptorpb.FileOptions)(nil),
ExtensionType: (*Swagger)(nil),
Field: 1042,
Name: "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger",
@@ -30,7 +30,7 @@ var file_protoc_gen_openapiv2_options_annotations_proto_extTypes = []protoimpl.E
Filename: "protoc-gen-openapiv2/options/annotations.proto",
},
{
- ExtendedType: (*descriptor.MethodOptions)(nil),
+ ExtendedType: (*descriptorpb.MethodOptions)(nil),
ExtensionType: (*Operation)(nil),
Field: 1042,
Name: "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation",
@@ -38,7 +38,7 @@ var file_protoc_gen_openapiv2_options_annotations_proto_extTypes = []protoimpl.E
Filename: "protoc-gen-openapiv2/options/annotations.proto",
},
{
- ExtendedType: (*descriptor.MessageOptions)(nil),
+ ExtendedType: (*descriptorpb.MessageOptions)(nil),
ExtensionType: (*Schema)(nil),
Field: 1042,
Name: "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema",
@@ -46,7 +46,7 @@ var file_protoc_gen_openapiv2_options_annotations_proto_extTypes = []protoimpl.E
Filename: "protoc-gen-openapiv2/options/annotations.proto",
},
{
- ExtendedType: (*descriptor.ServiceOptions)(nil),
+ ExtendedType: (*descriptorpb.ServiceOptions)(nil),
ExtensionType: (*Tag)(nil),
Field: 1042,
Name: "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_tag",
@@ -54,7 +54,7 @@ var file_protoc_gen_openapiv2_options_annotations_proto_extTypes = []protoimpl.E
Filename: "protoc-gen-openapiv2/options/annotations.proto",
},
{
- ExtendedType: (*descriptor.FieldOptions)(nil),
+ ExtendedType: (*descriptorpb.FieldOptions)(nil),
ExtensionType: (*JSONSchema)(nil),
Field: 1042,
Name: "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field",
@@ -63,7 +63,7 @@ var file_protoc_gen_openapiv2_options_annotations_proto_extTypes = []protoimpl.E
},
}
-// Extension fields to descriptor.FileOptions.
+// Extension fields to descriptorpb.FileOptions.
var (
// ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
//
@@ -74,7 +74,7 @@ var (
E_Openapiv2Swagger = &file_protoc_gen_openapiv2_options_annotations_proto_extTypes[0]
)
-// Extension fields to descriptor.MethodOptions.
+// Extension fields to descriptorpb.MethodOptions.
var (
// ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
//
@@ -85,7 +85,7 @@ var (
E_Openapiv2Operation = &file_protoc_gen_openapiv2_options_annotations_proto_extTypes[1]
)
-// Extension fields to descriptor.MessageOptions.
+// Extension fields to descriptorpb.MessageOptions.
var (
// ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
//
@@ -96,7 +96,7 @@ var (
E_Openapiv2Schema = &file_protoc_gen_openapiv2_options_annotations_proto_extTypes[2]
)
-// Extension fields to descriptor.ServiceOptions.
+// Extension fields to descriptorpb.ServiceOptions.
var (
// ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
//
@@ -107,7 +107,7 @@ var (
E_Openapiv2Tag = &file_protoc_gen_openapiv2_options_annotations_proto_extTypes[3]
)
-// Extension fields to descriptor.FieldOptions.
+// Extension fields to descriptorpb.FieldOptions.
var (
// ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
//
@@ -180,16 +180,16 @@ var file_protoc_gen_openapiv2_options_annotations_proto_rawDesc = []byte{
}
var file_protoc_gen_openapiv2_options_annotations_proto_goTypes = []interface{}{
- (*descriptor.FileOptions)(nil), // 0: google.protobuf.FileOptions
- (*descriptor.MethodOptions)(nil), // 1: google.protobuf.MethodOptions
- (*descriptor.MessageOptions)(nil), // 2: google.protobuf.MessageOptions
- (*descriptor.ServiceOptions)(nil), // 3: google.protobuf.ServiceOptions
- (*descriptor.FieldOptions)(nil), // 4: google.protobuf.FieldOptions
- (*Swagger)(nil), // 5: grpc.gateway.protoc_gen_openapiv2.options.Swagger
- (*Operation)(nil), // 6: grpc.gateway.protoc_gen_openapiv2.options.Operation
- (*Schema)(nil), // 7: grpc.gateway.protoc_gen_openapiv2.options.Schema
- (*Tag)(nil), // 8: grpc.gateway.protoc_gen_openapiv2.options.Tag
- (*JSONSchema)(nil), // 9: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema
+ (*descriptorpb.FileOptions)(nil), // 0: google.protobuf.FileOptions
+ (*descriptorpb.MethodOptions)(nil), // 1: google.protobuf.MethodOptions
+ (*descriptorpb.MessageOptions)(nil), // 2: google.protobuf.MessageOptions
+ (*descriptorpb.ServiceOptions)(nil), // 3: google.protobuf.ServiceOptions
+ (*descriptorpb.FieldOptions)(nil), // 4: google.protobuf.FieldOptions
+ (*Swagger)(nil), // 5: grpc.gateway.protoc_gen_openapiv2.options.Swagger
+ (*Operation)(nil), // 6: grpc.gateway.protoc_gen_openapiv2.options.Operation
+ (*Schema)(nil), // 7: grpc.gateway.protoc_gen_openapiv2.options.Schema
+ (*Tag)(nil), // 8: grpc.gateway.protoc_gen_openapiv2.options.Tag
+ (*JSONSchema)(nil), // 9: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema
}
var file_protoc_gen_openapiv2_options_annotations_proto_depIdxs = []int32{
0, // 0: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger:extendee -> google.protobuf.FileOptions
diff --git a/protoc-gen-openapiv2/options/annotations.proto b/protoc-gen-openapiv2/options/annotations.proto
index 1c189e2065c..d63d3c87eb3 100644
--- a/protoc-gen-openapiv2/options/annotations.proto
+++ b/protoc-gen-openapiv2/options/annotations.proto
@@ -2,11 +2,11 @@ syntax = "proto3";
package grpc.gateway.protoc_gen_openapiv2.options;
-option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options";
-
import "google/protobuf/descriptor.proto";
import "protoc-gen-openapiv2/options/openapiv2.proto";
+option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options";
+
extend google.protobuf.FileOptions {
// ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
//
diff --git a/protoc-gen-openapiv2/options/annotations.swagger.json b/protoc-gen-openapiv2/options/annotations.swagger.json
index e1c57d8cbba..c08c00fb1ce 100644
--- a/protoc-gen-openapiv2/options/annotations.swagger.json
+++ b/protoc-gen-openapiv2/options/annotations.swagger.json
@@ -15,14 +15,11 @@
"protobufAny": {
"type": "object",
"properties": {
- "typeUrl": {
+ "@type": {
"type": "string"
- },
- "value": {
- "type": "string",
- "format": "byte"
}
- }
+ },
+ "additionalProperties": {}
},
"rpcStatus": {
"type": "object",
diff --git a/protoc-gen-openapiv2/options/openapiv2.pb.go b/protoc-gen-openapiv2/options/openapiv2.pb.go
index 806c77a9cbe..93fa9c90467 100644
--- a/protoc-gen-openapiv2/options/openapiv2.pb.go
+++ b/protoc-gen-openapiv2/options/openapiv2.pb.go
@@ -1,15 +1,15 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.26.0
-// protoc v3.13.0
+// protoc-gen-go v1.27.1
+// protoc (unknown)
// source: protoc-gen-openapiv2/options/openapiv2.proto
package options
import (
- _struct "github.com/golang/protobuf/ptypes/struct"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ structpb "google.golang.org/protobuf/types/known/structpb"
reflect "reflect"
sync "sync"
)
@@ -78,6 +78,63 @@ func (Scheme) EnumDescriptor() ([]byte, []int) {
return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{0}
}
+// `Type` is a a supported HTTP header type.
+// See https://swagger.io/specification/v2/#parameterType.
+type HeaderParameter_Type int32
+
+const (
+ HeaderParameter_UNKNOWN HeaderParameter_Type = 0
+ HeaderParameter_STRING HeaderParameter_Type = 1
+ HeaderParameter_NUMBER HeaderParameter_Type = 2
+ HeaderParameter_INTEGER HeaderParameter_Type = 3
+ HeaderParameter_BOOLEAN HeaderParameter_Type = 4
+)
+
+// Enum value maps for HeaderParameter_Type.
+var (
+ HeaderParameter_Type_name = map[int32]string{
+ 0: "UNKNOWN",
+ 1: "STRING",
+ 2: "NUMBER",
+ 3: "INTEGER",
+ 4: "BOOLEAN",
+ }
+ HeaderParameter_Type_value = map[string]int32{
+ "UNKNOWN": 0,
+ "STRING": 1,
+ "NUMBER": 2,
+ "INTEGER": 3,
+ "BOOLEAN": 4,
+ }
+)
+
+func (x HeaderParameter_Type) Enum() *HeaderParameter_Type {
+ p := new(HeaderParameter_Type)
+ *p = x
+ return p
+}
+
+func (x HeaderParameter_Type) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (HeaderParameter_Type) Descriptor() protoreflect.EnumDescriptor {
+ return file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[1].Descriptor()
+}
+
+func (HeaderParameter_Type) Type() protoreflect.EnumType {
+ return &file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[1]
+}
+
+func (x HeaderParameter_Type) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use HeaderParameter_Type.Descriptor instead.
+func (HeaderParameter_Type) EnumDescriptor() ([]byte, []int) {
+ return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{3, 0}
+}
+
type JSONSchema_JSONSchemaSimpleTypes int32
const (
@@ -126,11 +183,11 @@ func (x JSONSchema_JSONSchemaSimpleTypes) String() string {
}
func (JSONSchema_JSONSchemaSimpleTypes) Descriptor() protoreflect.EnumDescriptor {
- return file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[1].Descriptor()
+ return file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[2].Descriptor()
}
func (JSONSchema_JSONSchemaSimpleTypes) Type() protoreflect.EnumType {
- return &file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[1]
+ return &file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[2]
}
func (x JSONSchema_JSONSchemaSimpleTypes) Number() protoreflect.EnumNumber {
@@ -139,7 +196,7 @@ func (x JSONSchema_JSONSchemaSimpleTypes) Number() protoreflect.EnumNumber {
// Deprecated: Use JSONSchema_JSONSchemaSimpleTypes.Descriptor instead.
func (JSONSchema_JSONSchemaSimpleTypes) EnumDescriptor() ([]byte, []int) {
- return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{9, 0}
+ return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{11, 0}
}
// The type of the security scheme. Valid values are "basic",
@@ -180,11 +237,11 @@ func (x SecurityScheme_Type) String() string {
}
func (SecurityScheme_Type) Descriptor() protoreflect.EnumDescriptor {
- return file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[2].Descriptor()
+ return file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[3].Descriptor()
}
func (SecurityScheme_Type) Type() protoreflect.EnumType {
- return &file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[2]
+ return &file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[3]
}
func (x SecurityScheme_Type) Number() protoreflect.EnumNumber {
@@ -193,7 +250,7 @@ func (x SecurityScheme_Type) Number() protoreflect.EnumNumber {
// Deprecated: Use SecurityScheme_Type.Descriptor instead.
func (SecurityScheme_Type) EnumDescriptor() ([]byte, []int) {
- return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{12, 0}
+ return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{14, 0}
}
// The location of the API key. Valid values are "query" or "header".
@@ -230,11 +287,11 @@ func (x SecurityScheme_In) String() string {
}
func (SecurityScheme_In) Descriptor() protoreflect.EnumDescriptor {
- return file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[3].Descriptor()
+ return file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[4].Descriptor()
}
func (SecurityScheme_In) Type() protoreflect.EnumType {
- return &file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[3]
+ return &file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[4]
}
func (x SecurityScheme_In) Number() protoreflect.EnumNumber {
@@ -243,7 +300,7 @@ func (x SecurityScheme_In) Number() protoreflect.EnumNumber {
// Deprecated: Use SecurityScheme_In.Descriptor instead.
func (SecurityScheme_In) EnumDescriptor() ([]byte, []int) {
- return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{12, 1}
+ return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{14, 1}
}
// The flow used by the OAuth2 security scheme. Valid values are
@@ -287,11 +344,11 @@ func (x SecurityScheme_Flow) String() string {
}
func (SecurityScheme_Flow) Descriptor() protoreflect.EnumDescriptor {
- return file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[4].Descriptor()
+ return file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[5].Descriptor()
}
func (SecurityScheme_Flow) Type() protoreflect.EnumType {
- return &file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[4]
+ return &file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[5]
}
func (x SecurityScheme_Flow) Number() protoreflect.EnumNumber {
@@ -300,7 +357,7 @@ func (x SecurityScheme_Flow) Number() protoreflect.EnumNumber {
// Deprecated: Use SecurityScheme_Flow.Descriptor instead.
func (SecurityScheme_Flow) EnumDescriptor() ([]byte, []int) {
- return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{12, 2}
+ return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{14, 2}
}
// `Swagger` is a representation of OpenAPI v2 specification's Swagger object.
@@ -313,7 +370,7 @@ func (SecurityScheme_Flow) EnumDescriptor() ([]byte, []int) {
// info: {
// title: "Echo API";
// version: "1.0";
-// description: ";
+// description: "";
// contact: {
// name: "gRPC-Gateway project";
// url: "https://github.com/grpc-ecosystem/grpc-gateway";
@@ -378,9 +435,15 @@ type Swagger struct {
// (that is, there is a logical OR between the security requirements).
// Individual operations can override this definition.
Security []*SecurityRequirement `protobuf:"bytes,12,rep,name=security,proto3" json:"security,omitempty"`
+ // A list of tags for API documentation control. Tags can be used for logical
+ // grouping of operations by resources or any other qualifier.
+ Tags []*Tag `protobuf:"bytes,13,rep,name=tags,proto3" json:"tags,omitempty"`
// Additional external documentation.
- ExternalDocs *ExternalDocumentation `protobuf:"bytes,14,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"`
- Extensions map[string]*_struct.Value `protobuf:"bytes,15,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ ExternalDocs *ExternalDocumentation `protobuf:"bytes,14,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"`
+ // Custom properties that start with "x-" such as "x-foo" used to describe
+ // extra functionality that is not covered by the standard OpenAPI Specification.
+ // See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+ Extensions map[string]*structpb.Value `protobuf:"bytes,15,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (x *Swagger) Reset() {
@@ -485,6 +548,13 @@ func (x *Swagger) GetSecurity() []*SecurityRequirement {
return nil
}
+func (x *Swagger) GetTags() []*Tag {
+ if x != nil {
+ return x.Tags
+ }
+ return nil
+}
+
func (x *Swagger) GetExternalDocs() *ExternalDocumentation {
if x != nil {
return x.ExternalDocs
@@ -492,7 +562,7 @@ func (x *Swagger) GetExternalDocs() *ExternalDocumentation {
return nil
}
-func (x *Swagger) GetExtensions() map[string]*_struct.Value {
+func (x *Swagger) GetExtensions() map[string]*structpb.Value {
if x != nil {
return x.Extensions
}
@@ -568,8 +638,15 @@ type Operation struct {
// (that is, there is a logical OR between the security requirements). This
// definition overrides any declared top-level security. To remove a top-level
// security declaration, an empty array can be used.
- Security []*SecurityRequirement `protobuf:"bytes,12,rep,name=security,proto3" json:"security,omitempty"`
- Extensions map[string]*_struct.Value `protobuf:"bytes,13,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ Security []*SecurityRequirement `protobuf:"bytes,12,rep,name=security,proto3" json:"security,omitempty"`
+ // Custom properties that start with "x-" such as "x-foo" used to describe
+ // extra functionality that is not covered by the standard OpenAPI Specification.
+ // See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+ Extensions map[string]*structpb.Value `protobuf:"bytes,13,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ // Custom parameters such as HTTP request headers.
+ // See: https://swagger.io/docs/specification/2-0/describing-parameters/
+ // and https://swagger.io/specification/v2/#parameter-object.
+ Parameters *Parameters `protobuf:"bytes,14,opt,name=parameters,proto3" json:"parameters,omitempty"`
}
func (x *Operation) Reset() {
@@ -681,13 +758,161 @@ func (x *Operation) GetSecurity() []*SecurityRequirement {
return nil
}
-func (x *Operation) GetExtensions() map[string]*_struct.Value {
+func (x *Operation) GetExtensions() map[string]*structpb.Value {
if x != nil {
return x.Extensions
}
return nil
}
+func (x *Operation) GetParameters() *Parameters {
+ if x != nil {
+ return x.Parameters
+ }
+ return nil
+}
+
+// `Parameters` is a representation of OpenAPI v2 specification's parameters object.
+// Note: This technically breaks compatibility with the OpenAPI 2 definition structure as we only
+// allow header parameters to be set here since we do not want users specifying custom non-header
+// parameters beyond those inferred from the Protobuf schema.
+// See: https://swagger.io/specification/v2/#parameter-object
+type Parameters struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // `Headers` is one or more HTTP header parameter.
+ // See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+ Headers []*HeaderParameter `protobuf:"bytes,1,rep,name=headers,proto3" json:"headers,omitempty"`
+}
+
+func (x *Parameters) Reset() {
+ *x = Parameters{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Parameters) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Parameters) ProtoMessage() {}
+
+func (x *Parameters) ProtoReflect() protoreflect.Message {
+ mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Parameters.ProtoReflect.Descriptor instead.
+func (*Parameters) Descriptor() ([]byte, []int) {
+ return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *Parameters) GetHeaders() []*HeaderParameter {
+ if x != nil {
+ return x.Headers
+ }
+ return nil
+}
+
+// `HeaderParameter` a HTTP header parameter.
+// See: https://swagger.io/specification/v2/#parameter-object
+type HeaderParameter struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // `Name` is the header name.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // `Description` is a short description of the header.
+ Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
+ // `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
+ // See: https://swagger.io/specification/v2/#parameterType.
+ Type HeaderParameter_Type `protobuf:"varint,3,opt,name=type,proto3,enum=grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter_Type" json:"type,omitempty"`
+ // `Format` The extending format for the previously mentioned type.
+ Format string `protobuf:"bytes,4,opt,name=format,proto3" json:"format,omitempty"`
+ // `Required` indicates if the header is optional
+ Required bool `protobuf:"varint,5,opt,name=required,proto3" json:"required,omitempty"`
+}
+
+func (x *HeaderParameter) Reset() {
+ *x = HeaderParameter{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *HeaderParameter) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*HeaderParameter) ProtoMessage() {}
+
+func (x *HeaderParameter) ProtoReflect() protoreflect.Message {
+ mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[3]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use HeaderParameter.ProtoReflect.Descriptor instead.
+func (*HeaderParameter) Descriptor() ([]byte, []int) {
+ return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *HeaderParameter) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *HeaderParameter) GetDescription() string {
+ if x != nil {
+ return x.Description
+ }
+ return ""
+}
+
+func (x *HeaderParameter) GetType() HeaderParameter_Type {
+ if x != nil {
+ return x.Type
+ }
+ return HeaderParameter_UNKNOWN
+}
+
+func (x *HeaderParameter) GetFormat() string {
+ if x != nil {
+ return x.Format
+ }
+ return ""
+}
+
+func (x *HeaderParameter) GetRequired() bool {
+ if x != nil {
+ return x.Required
+ }
+ return false
+}
+
// `Header` is a representation of OpenAPI v2 specification's Header object.
//
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#headerObject
@@ -714,7 +939,7 @@ type Header struct {
func (x *Header) Reset() {
*x = Header{}
if protoimpl.UnsafeEnabled {
- mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[2]
+ mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -727,7 +952,7 @@ func (x *Header) String() string {
func (*Header) ProtoMessage() {}
func (x *Header) ProtoReflect() protoreflect.Message {
- mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[2]
+ mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -740,7 +965,7 @@ func (x *Header) ProtoReflect() protoreflect.Message {
// Deprecated: Use Header.ProtoReflect.Descriptor instead.
func (*Header) Descriptor() ([]byte, []int) {
- return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{2}
+ return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{4}
}
func (x *Header) GetDescription() string {
@@ -799,14 +1024,17 @@ type Response struct {
Headers map[string]*Header `protobuf:"bytes,3,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// `Examples` gives per-mimetype response examples.
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
- Examples map[string]string `protobuf:"bytes,4,rep,name=examples,proto3" json:"examples,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
- Extensions map[string]*_struct.Value `protobuf:"bytes,5,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ Examples map[string]string `protobuf:"bytes,4,rep,name=examples,proto3" json:"examples,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ // Custom properties that start with "x-" such as "x-foo" used to describe
+ // extra functionality that is not covered by the standard OpenAPI Specification.
+ // See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+ Extensions map[string]*structpb.Value `protobuf:"bytes,5,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (x *Response) Reset() {
*x = Response{}
if protoimpl.UnsafeEnabled {
- mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[3]
+ mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -819,7 +1047,7 @@ func (x *Response) String() string {
func (*Response) ProtoMessage() {}
func (x *Response) ProtoReflect() protoreflect.Message {
- mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[3]
+ mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -832,7 +1060,7 @@ func (x *Response) ProtoReflect() protoreflect.Message {
// Deprecated: Use Response.ProtoReflect.Descriptor instead.
func (*Response) Descriptor() ([]byte, []int) {
- return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{3}
+ return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{5}
}
func (x *Response) GetDescription() string {
@@ -863,7 +1091,7 @@ func (x *Response) GetExamples() map[string]string {
return nil
}
-func (x *Response) GetExtensions() map[string]*_struct.Value {
+func (x *Response) GetExtensions() map[string]*structpb.Value {
if x != nil {
return x.Extensions
}
@@ -880,7 +1108,7 @@ func (x *Response) GetExtensions() map[string]*_struct.Value {
// info: {
// title: "Echo API";
// version: "1.0";
-// description: ";
+// description: "";
// contact: {
// name: "gRPC-Gateway project";
// url: "https://github.com/grpc-ecosystem/grpc-gateway";
@@ -912,14 +1140,17 @@ type Info struct {
License *License `protobuf:"bytes,5,opt,name=license,proto3" json:"license,omitempty"`
// Provides the version of the application API (not to be confused
// with the specification version).
- Version string `protobuf:"bytes,6,opt,name=version,proto3" json:"version,omitempty"`
- Extensions map[string]*_struct.Value `protobuf:"bytes,7,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ Version string `protobuf:"bytes,6,opt,name=version,proto3" json:"version,omitempty"`
+ // Custom properties that start with "x-" such as "x-foo" used to describe
+ // extra functionality that is not covered by the standard OpenAPI Specification.
+ // See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+ Extensions map[string]*structpb.Value `protobuf:"bytes,7,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (x *Info) Reset() {
*x = Info{}
if protoimpl.UnsafeEnabled {
- mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[4]
+ mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -932,7 +1163,7 @@ func (x *Info) String() string {
func (*Info) ProtoMessage() {}
func (x *Info) ProtoReflect() protoreflect.Message {
- mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[4]
+ mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -945,7 +1176,7 @@ func (x *Info) ProtoReflect() protoreflect.Message {
// Deprecated: Use Info.ProtoReflect.Descriptor instead.
func (*Info) Descriptor() ([]byte, []int) {
- return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{4}
+ return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{6}
}
func (x *Info) GetTitle() string {
@@ -990,7 +1221,7 @@ func (x *Info) GetVersion() string {
return ""
}
-func (x *Info) GetExtensions() map[string]*_struct.Value {
+func (x *Info) GetExtensions() map[string]*structpb.Value {
if x != nil {
return x.Extensions
}
@@ -1034,7 +1265,7 @@ type Contact struct {
func (x *Contact) Reset() {
*x = Contact{}
if protoimpl.UnsafeEnabled {
- mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[5]
+ mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1047,7 +1278,7 @@ func (x *Contact) String() string {
func (*Contact) ProtoMessage() {}
func (x *Contact) ProtoReflect() protoreflect.Message {
- mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[5]
+ mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1060,7 +1291,7 @@ func (x *Contact) ProtoReflect() protoreflect.Message {
// Deprecated: Use Contact.ProtoReflect.Descriptor instead.
func (*Contact) Descriptor() ([]byte, []int) {
- return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{5}
+ return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{7}
}
func (x *Contact) GetName() string {
@@ -1116,7 +1347,7 @@ type License struct {
func (x *License) Reset() {
*x = License{}
if protoimpl.UnsafeEnabled {
- mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[6]
+ mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1129,7 +1360,7 @@ func (x *License) String() string {
func (*License) ProtoMessage() {}
func (x *License) ProtoReflect() protoreflect.Message {
- mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[6]
+ mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1142,7 +1373,7 @@ func (x *License) ProtoReflect() protoreflect.Message {
// Deprecated: Use License.ProtoReflect.Descriptor instead.
func (*License) Descriptor() ([]byte, []int) {
- return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{6}
+ return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{8}
}
func (x *License) GetName() string {
@@ -1191,7 +1422,7 @@ type ExternalDocumentation struct {
func (x *ExternalDocumentation) Reset() {
*x = ExternalDocumentation{}
if protoimpl.UnsafeEnabled {
- mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[7]
+ mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1204,7 +1435,7 @@ func (x *ExternalDocumentation) String() string {
func (*ExternalDocumentation) ProtoMessage() {}
func (x *ExternalDocumentation) ProtoReflect() protoreflect.Message {
- mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[7]
+ mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1217,7 +1448,7 @@ func (x *ExternalDocumentation) ProtoReflect() protoreflect.Message {
// Deprecated: Use ExternalDocumentation.ProtoReflect.Descriptor instead.
func (*ExternalDocumentation) Descriptor() ([]byte, []int) {
- return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{7}
+ return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{9}
}
func (x *ExternalDocumentation) GetDescription() string {
@@ -1266,7 +1497,7 @@ type Schema struct {
func (x *Schema) Reset() {
*x = Schema{}
if protoimpl.UnsafeEnabled {
- mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[8]
+ mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1279,7 +1510,7 @@ func (x *Schema) String() string {
func (*Schema) ProtoMessage() {}
func (x *Schema) ProtoReflect() protoreflect.Message {
- mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[8]
+ mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1292,7 +1523,7 @@ func (x *Schema) ProtoReflect() protoreflect.Message {
// Deprecated: Use Schema.ProtoReflect.Descriptor instead.
func (*Schema) Descriptor() ([]byte, []int) {
- return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{8}
+ return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{10}
}
func (x *Schema) GetJsonSchema() *JSONSchema {
@@ -1354,7 +1585,7 @@ func (x *Schema) GetExample() string {
// // Id represents the message identifier.
// string id = 1; [
// (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
-// {description: "The unique identifier of the simple message."
+// description: "The unique identifier of the simple message."
// }];
// }
//
@@ -1405,12 +1636,18 @@ type JSONSchema struct {
Format string `protobuf:"bytes,36,opt,name=format,proto3" json:"format,omitempty"`
// Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
Enum []string `protobuf:"bytes,46,rep,name=enum,proto3" json:"enum,omitempty"`
+ // Additional field level properties used when generating the OpenAPI v2 file.
+ FieldConfiguration *JSONSchema_FieldConfiguration `protobuf:"bytes,1001,opt,name=field_configuration,json=fieldConfiguration,proto3" json:"field_configuration,omitempty"`
+ // Custom properties that start with "x-" such as "x-foo" used to describe
+ // extra functionality that is not covered by the standard OpenAPI Specification.
+ // See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+ Extensions map[string]*structpb.Value `protobuf:"bytes,48,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (x *JSONSchema) Reset() {
*x = JSONSchema{}
if protoimpl.UnsafeEnabled {
- mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[9]
+ mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1423,7 +1660,7 @@ func (x *JSONSchema) String() string {
func (*JSONSchema) ProtoMessage() {}
func (x *JSONSchema) ProtoReflect() protoreflect.Message {
- mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[9]
+ mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[11]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1436,7 +1673,7 @@ func (x *JSONSchema) ProtoReflect() protoreflect.Message {
// Deprecated: Use JSONSchema.ProtoReflect.Descriptor instead.
func (*JSONSchema) Descriptor() ([]byte, []int) {
- return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{9}
+ return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{11}
}
func (x *JSONSchema) GetRef() string {
@@ -1607,6 +1844,20 @@ func (x *JSONSchema) GetEnum() []string {
return nil
}
+func (x *JSONSchema) GetFieldConfiguration() *JSONSchema_FieldConfiguration {
+ if x != nil {
+ return x.FieldConfiguration
+ }
+ return nil
+}
+
+func (x *JSONSchema) GetExtensions() map[string]*structpb.Value {
+ if x != nil {
+ return x.Extensions
+ }
+ return nil
+}
+
// `Tag` is a representation of OpenAPI v2 specification's Tag object.
//
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#tagObject
@@ -1616,17 +1867,25 @@ type Tag struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
+ // The name of the tag. Use it to allow override of the name of a
+ // global Tag object, then use that name to reference the tag throughout the
+ // OpenAPI file.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// A short description for the tag. GFM syntax can be used for rich text
// representation.
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
// Additional external documentation for this tag.
ExternalDocs *ExternalDocumentation `protobuf:"bytes,3,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"`
+ // Custom properties that start with "x-" such as "x-foo" used to describe
+ // extra functionality that is not covered by the standard OpenAPI Specification.
+ // See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+ Extensions map[string]*structpb.Value `protobuf:"bytes,4,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (x *Tag) Reset() {
*x = Tag{}
if protoimpl.UnsafeEnabled {
- mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[10]
+ mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1639,7 +1898,7 @@ func (x *Tag) String() string {
func (*Tag) ProtoMessage() {}
func (x *Tag) ProtoReflect() protoreflect.Message {
- mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[10]
+ mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[12]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1652,7 +1911,14 @@ func (x *Tag) ProtoReflect() protoreflect.Message {
// Deprecated: Use Tag.ProtoReflect.Descriptor instead.
func (*Tag) Descriptor() ([]byte, []int) {
- return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{10}
+ return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{12}
+}
+
+func (x *Tag) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
}
func (x *Tag) GetDescription() string {
@@ -1669,6 +1935,13 @@ func (x *Tag) GetExternalDocs() *ExternalDocumentation {
return nil
}
+func (x *Tag) GetExtensions() map[string]*structpb.Value {
+ if x != nil {
+ return x.Extensions
+ }
+ return nil
+}
+
// `SecurityDefinitions` is a representation of OpenAPI v2 specification's
// Security Definitions object.
//
@@ -1690,7 +1963,7 @@ type SecurityDefinitions struct {
func (x *SecurityDefinitions) Reset() {
*x = SecurityDefinitions{}
if protoimpl.UnsafeEnabled {
- mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[11]
+ mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1703,7 +1976,7 @@ func (x *SecurityDefinitions) String() string {
func (*SecurityDefinitions) ProtoMessage() {}
func (x *SecurityDefinitions) ProtoReflect() protoreflect.Message {
- mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[11]
+ mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[13]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1716,7 +1989,7 @@ func (x *SecurityDefinitions) ProtoReflect() protoreflect.Message {
// Deprecated: Use SecurityDefinitions.ProtoReflect.Descriptor instead.
func (*SecurityDefinitions) Descriptor() ([]byte, []int) {
- return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{11}
+ return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{13}
}
func (x *SecurityDefinitions) GetSecurity() map[string]*SecurityScheme {
@@ -1766,14 +2039,17 @@ type SecurityScheme struct {
TokenUrl string `protobuf:"bytes,7,opt,name=token_url,json=tokenUrl,proto3" json:"token_url,omitempty"`
// The available scopes for the OAuth2 security scheme.
// Valid for oauth2.
- Scopes *Scopes `protobuf:"bytes,8,opt,name=scopes,proto3" json:"scopes,omitempty"`
- Extensions map[string]*_struct.Value `protobuf:"bytes,9,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ Scopes *Scopes `protobuf:"bytes,8,opt,name=scopes,proto3" json:"scopes,omitempty"`
+ // Custom properties that start with "x-" such as "x-foo" used to describe
+ // extra functionality that is not covered by the standard OpenAPI Specification.
+ // See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+ Extensions map[string]*structpb.Value `protobuf:"bytes,9,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (x *SecurityScheme) Reset() {
*x = SecurityScheme{}
if protoimpl.UnsafeEnabled {
- mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[12]
+ mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[14]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1786,7 +2062,7 @@ func (x *SecurityScheme) String() string {
func (*SecurityScheme) ProtoMessage() {}
func (x *SecurityScheme) ProtoReflect() protoreflect.Message {
- mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[12]
+ mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[14]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1799,7 +2075,7 @@ func (x *SecurityScheme) ProtoReflect() protoreflect.Message {
// Deprecated: Use SecurityScheme.ProtoReflect.Descriptor instead.
func (*SecurityScheme) Descriptor() ([]byte, []int) {
- return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{12}
+ return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{14}
}
func (x *SecurityScheme) GetType() SecurityScheme_Type {
@@ -1858,7 +2134,7 @@ func (x *SecurityScheme) GetScopes() *Scopes {
return nil
}
-func (x *SecurityScheme) GetExtensions() map[string]*_struct.Value {
+func (x *SecurityScheme) GetExtensions() map[string]*structpb.Value {
if x != nil {
return x.Extensions
}
@@ -1891,7 +2167,7 @@ type SecurityRequirement struct {
func (x *SecurityRequirement) Reset() {
*x = SecurityRequirement{}
if protoimpl.UnsafeEnabled {
- mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[13]
+ mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[15]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1904,7 +2180,7 @@ func (x *SecurityRequirement) String() string {
func (*SecurityRequirement) ProtoMessage() {}
func (x *SecurityRequirement) ProtoReflect() protoreflect.Message {
- mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[13]
+ mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[15]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1917,7 +2193,7 @@ func (x *SecurityRequirement) ProtoReflect() protoreflect.Message {
// Deprecated: Use SecurityRequirement.ProtoReflect.Descriptor instead.
func (*SecurityRequirement) Descriptor() ([]byte, []int) {
- return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{13}
+ return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{15}
}
func (x *SecurityRequirement) GetSecurityRequirement() map[string]*SecurityRequirement_SecurityRequirementValue {
@@ -1945,7 +2221,7 @@ type Scopes struct {
func (x *Scopes) Reset() {
*x = Scopes{}
if protoimpl.UnsafeEnabled {
- mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[14]
+ mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[16]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1958,7 +2234,7 @@ func (x *Scopes) String() string {
func (*Scopes) ProtoMessage() {}
func (x *Scopes) ProtoReflect() protoreflect.Message {
- mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[14]
+ mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[16]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1971,7 +2247,7 @@ func (x *Scopes) ProtoReflect() protoreflect.Message {
// Deprecated: Use Scopes.ProtoReflect.Descriptor instead.
func (*Scopes) Descriptor() ([]byte, []int) {
- return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{14}
+ return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{16}
}
func (x *Scopes) GetScope() map[string]string {
@@ -1981,6 +2257,59 @@ func (x *Scopes) GetScope() map[string]string {
return nil
}
+// 'FieldConfiguration' provides additional field level properties used when generating the OpenAPI v2 file.
+// These properties are not defined by OpenAPIv2, but they are used to control the generation.
+type JSONSchema_FieldConfiguration struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Alternative parameter name when used as path parameter. If set, this will
+ // be used as the complete parameter name when this field is used as a path
+ // parameter. Use this to avoid having auto generated path parameter names
+ // for overlapping paths.
+ PathParamName string `protobuf:"bytes,47,opt,name=path_param_name,json=pathParamName,proto3" json:"path_param_name,omitempty"`
+}
+
+func (x *JSONSchema_FieldConfiguration) Reset() {
+ *x = JSONSchema_FieldConfiguration{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[25]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *JSONSchema_FieldConfiguration) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*JSONSchema_FieldConfiguration) ProtoMessage() {}
+
+func (x *JSONSchema_FieldConfiguration) ProtoReflect() protoreflect.Message {
+ mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[25]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use JSONSchema_FieldConfiguration.ProtoReflect.Descriptor instead.
+func (*JSONSchema_FieldConfiguration) Descriptor() ([]byte, []int) {
+ return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{11, 0}
+}
+
+func (x *JSONSchema_FieldConfiguration) GetPathParamName() string {
+ if x != nil {
+ return x.PathParamName
+ }
+ return ""
+}
+
// If the security scheme is of type "oauth2", then the value is a list of
// scope names required for the execution. For other security scheme types,
// the array MUST be empty.
@@ -1995,7 +2324,7 @@ type SecurityRequirement_SecurityRequirementValue struct {
func (x *SecurityRequirement_SecurityRequirementValue) Reset() {
*x = SecurityRequirement_SecurityRequirementValue{}
if protoimpl.UnsafeEnabled {
- mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[25]
+ mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[30]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2008,7 +2337,7 @@ func (x *SecurityRequirement_SecurityRequirementValue) String() string {
func (*SecurityRequirement_SecurityRequirementValue) ProtoMessage() {}
func (x *SecurityRequirement_SecurityRequirementValue) ProtoReflect() protoreflect.Message {
- mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[25]
+ mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[30]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2021,7 +2350,7 @@ func (x *SecurityRequirement_SecurityRequirementValue) ProtoReflect() protorefle
// Deprecated: Use SecurityRequirement_SecurityRequirementValue.ProtoReflect.Descriptor instead.
func (*SecurityRequirement_SecurityRequirementValue) Descriptor() ([]byte, []int) {
- return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{13, 0}
+ return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{15, 0}
}
func (x *SecurityRequirement_SecurityRequirementValue) GetScope() []string {
@@ -2041,7 +2370,7 @@ var file_protoc_gen_openapiv2_options_openapiv2_proto_rawDesc = []byte{
0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76,
0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63,
- 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf5, 0x07, 0x0a, 0x07, 0x53, 0x77, 0x61, 0x67,
+ 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb3, 0x08, 0x0a, 0x07, 0x53, 0x77, 0x61, 0x67,
0x67, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x12, 0x43, 0x0a,
0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x72,
@@ -2078,391 +2407,461 @@ var file_protoc_gen_openapiv2_options_openapiv2_proto_rawDesc = []byte{
0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69,
0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72,
0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x08,
- 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x65, 0x0a, 0x0d, 0x65, 0x78, 0x74, 0x65,
- 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x63, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32,
- 0x40, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70,
+ 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x42, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73,
+ 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61,
+ 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e,
+ 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x2e, 0x54, 0x61, 0x67, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, 0x65, 0x0a, 0x0d,
+ 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x63, 0x73, 0x18, 0x0e, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77,
+ 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70,
+ 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e,
+ 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44,
+ 0x6f, 0x63, 0x73, 0x12, 0x62, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e,
+ 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67,
+ 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65,
+ 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x2e, 0x45, 0x78, 0x74, 0x65,
+ 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x65, 0x78, 0x74,
+ 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x71, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x49, 0x0a, 0x05, 0x76,
+ 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x72, 0x70,
+ 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63,
+ 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f,
+ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52,
+ 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x55, 0x0a, 0x0f, 0x45, 0x78,
+ 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a,
+ 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12,
+ 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16,
+ 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
+ 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38,
+ 0x01, 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x22, 0xd6, 0x07,
+ 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x74,
+ 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12,
+ 0x18, 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73,
+ 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b,
+ 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x65, 0x0a, 0x0d, 0x65,
+ 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x63, 0x73, 0x18, 0x04, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61,
+ 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65,
+ 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x45,
+ 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f,
+ 0x63, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
+ 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65,
+ 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65,
+ 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x73, 0x18, 0x07, 0x20,
+ 0x03, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x73, 0x12, 0x61, 0x0a,
+ 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b,
+ 0x32, 0x43, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61,
+ 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x65,
+ 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73,
+ 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73,
+ 0x12, 0x4b, 0x0a, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28,
+ 0x0e, 0x32, 0x31, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e,
+ 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x63,
+ 0x68, 0x65, 0x6d, 0x65, 0x52, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x73, 0x12, 0x1e, 0x0a,
+ 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28,
+ 0x08, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x5a, 0x0a,
+ 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32,
+ 0x3e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70,
- 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x45, 0x78, 0x74, 0x65,
- 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f,
- 0x6e, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x73, 0x12,
- 0x62, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0f, 0x20,
- 0x03, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77,
+ 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75,
+ 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52,
+ 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x64, 0x0a, 0x0a, 0x65, 0x78, 0x74,
+ 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x44, 0x2e,
+ 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76,
+ 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e,
+ 0x74, 0x72, 0x79, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12,
+ 0x55, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x0e, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77,
+ 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70,
+ 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e,
+ 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61,
+ 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x1a, 0x71, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x49, 0x0a, 0x05, 0x76, 0x61,
+ 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x72, 0x70, 0x63,
+ 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f,
+ 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x05,
+ 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x55, 0x0a, 0x0f, 0x45, 0x78, 0x74,
+ 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03,
+ 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2c,
+ 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e,
+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
+ 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01,
+ 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, 0x22, 0x62, 0x0a, 0x0a, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65,
+ 0x74, 0x65, 0x72, 0x73, 0x12, 0x54, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18,
+ 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74,
+ 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f,
+ 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65,
+ 0x72, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x22, 0xa3, 0x02, 0x0a, 0x0f, 0x48,
+ 0x65, 0x61, 0x64, 0x65, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x12,
+ 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
+ 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f,
+ 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x53, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01,
+ 0x28, 0x0e, 0x32, 0x3f, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61,
+ 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65,
+ 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x48,
+ 0x65, 0x61, 0x64, 0x65, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x2e, 0x54,
+ 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72,
+ 0x6d, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61,
+ 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x05, 0x20,
+ 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x22, 0x45, 0x0a,
+ 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e,
+ 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0a,
+ 0x0a, 0x06, 0x4e, 0x55, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e,
+ 0x54, 0x45, 0x47, 0x45, 0x52, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x42, 0x4f, 0x4f, 0x4c, 0x45,
+ 0x41, 0x4e, 0x10, 0x04, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x4a, 0x04, 0x08, 0x07, 0x10, 0x08,
+ 0x22, 0xd8, 0x01, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x64,
+ 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a,
+ 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70,
+ 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x66,
+ 0x61, 0x75, 0x6c, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61,
+ 0x75, 0x6c, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, 0x0d,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x4a, 0x04, 0x08,
+ 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x4a, 0x04, 0x08, 0x07, 0x10, 0x08, 0x4a,
+ 0x04, 0x08, 0x08, 0x10, 0x09, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x4a, 0x04, 0x08, 0x0a, 0x10,
+ 0x0b, 0x4a, 0x04, 0x08, 0x0b, 0x10, 0x0c, 0x4a, 0x04, 0x08, 0x0c, 0x10, 0x0d, 0x4a, 0x04, 0x08,
+ 0x0e, 0x10, 0x0f, 0x4a, 0x04, 0x08, 0x0f, 0x10, 0x10, 0x4a, 0x04, 0x08, 0x10, 0x10, 0x11, 0x4a,
+ 0x04, 0x08, 0x11, 0x10, 0x12, 0x4a, 0x04, 0x08, 0x12, 0x10, 0x13, 0x22, 0x9a, 0x05, 0x0a, 0x08,
+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63,
+ 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64,
+ 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x49, 0x0a, 0x06, 0x73, 0x63,
+ 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x72, 0x70,
+ 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63,
+ 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f,
+ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x06, 0x73,
+ 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x5a, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73,
+ 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61,
+ 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e,
+ 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64,
+ 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72,
+ 0x73, 0x12, 0x5d, 0x0a, 0x08, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x18, 0x04, 0x20,
+ 0x03, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77,
0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70,
0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e,
- 0x53, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
- 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69,
- 0x6f, 0x6e, 0x73, 0x1a, 0x71, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73,
+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65,
+ 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73,
+ 0x12, 0x63, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05,
+ 0x20, 0x03, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65,
+ 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f,
+ 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
+ 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73,
+ 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e,
+ 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x6d, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73,
0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x49, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
- 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61,
+ 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x47, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61,
0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e,
0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f,
- 0x6e, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c,
- 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x55, 0x0a, 0x0f, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73,
- 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79,
- 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2c, 0x0a, 0x05, 0x76,
- 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f,
- 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c,
- 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x4a, 0x04, 0x08,
- 0x08, 0x10, 0x09, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x4a, 0x04, 0x08, 0x0d, 0x10, 0x0e, 0x22,
- 0xff, 0x06, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a,
- 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67,
- 0x73, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x64,
- 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x65, 0x0a,
- 0x0d, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x63, 0x73, 0x18, 0x04,
- 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65,
+ 0x6e, 0x73, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
+ 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3b, 0x0a, 0x0d, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73,
+ 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38,
+ 0x01, 0x1a, 0x55, 0x0a, 0x0f, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45,
+ 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76,
+ 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xd6, 0x03, 0x0a, 0x04, 0x49, 0x6e, 0x66,
+ 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72,
+ 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65,
+ 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x10, 0x74, 0x65, 0x72,
+ 0x6d, 0x73, 0x5f, 0x6f, 0x66, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x4f, 0x66, 0x53, 0x65, 0x72, 0x76,
+ 0x69, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x18, 0x04,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65,
0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f,
0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
- 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e,
- 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c,
- 0x44, 0x6f, 0x63, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
- 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x70, 0x65, 0x72,
- 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x75,
- 0x6d, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x75,
- 0x6d, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x73, 0x18,
- 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x73, 0x12,
- 0x61, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x09, 0x20, 0x03,
- 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61,
+ 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63,
+ 0x74, 0x12, 0x4c, 0x0a, 0x07, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x18, 0x05, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61,
0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65,
- 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4f,
- 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
- 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
- 0x65, 0x73, 0x12, 0x4b, 0x0a, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x73, 0x18, 0x0a, 0x20,
- 0x03, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77,
+ 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4c,
+ 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x52, 0x07, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x12,
+ 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x5f, 0x0a, 0x0a, 0x65, 0x78, 0x74,
+ 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3f, 0x2e,
+ 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76,
+ 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x45,
+ 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a,
+ 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x55, 0x0a, 0x0f, 0x45, 0x78,
+ 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a,
+ 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12,
+ 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16,
+ 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
+ 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38,
+ 0x01, 0x22, 0x45, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x12, 0x12, 0x0a, 0x04,
+ 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,
+ 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75,
+ 0x72, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x2f, 0x0a, 0x07, 0x4c, 0x69, 0x63, 0x65,
+ 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0x4b, 0x0a, 0x15, 0x45, 0x78, 0x74,
+ 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f,
+ 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0xaa, 0x02, 0x0a, 0x06, 0x53, 0x63, 0x68, 0x65, 0x6d,
+ 0x61, 0x12, 0x56, 0x0a, 0x0b, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61,
+ 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e,
+ 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x2e, 0x4a, 0x53, 0x4f, 0x4e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x0a, 0x6a,
+ 0x73, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x24, 0x0a, 0x0d, 0x64, 0x69, 0x73,
+ 0x63, 0x72, 0x69, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x0d, 0x64, 0x69, 0x73, 0x63, 0x72, 0x69, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x12,
+ 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x03, 0x20, 0x01,
+ 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x65, 0x0a, 0x0d,
+ 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x63, 0x73, 0x18, 0x05, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77,
0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70,
0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e,
- 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x52, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x73, 0x12,
- 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x0b, 0x20,
- 0x01, 0x28, 0x08, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12,
- 0x5a, 0x0a, 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x18, 0x0c, 0x20, 0x03, 0x28,
- 0x0b, 0x32, 0x3e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79,
- 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e,
- 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65,
- 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e,
- 0x74, 0x52, 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x64, 0x0a, 0x0a, 0x65,
- 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32,
- 0x44, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70,
+ 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44,
+ 0x6f, 0x63, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x06,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x4a, 0x04, 0x08,
+ 0x04, 0x10, 0x05, 0x22, 0xd7, 0x0a, 0x0a, 0x0a, 0x4a, 0x53, 0x4f, 0x4e, 0x53, 0x63, 0x68, 0x65,
+ 0x6d, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x65, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x03, 0x72, 0x65, 0x66, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x05, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65,
+ 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07,
+ 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64,
+ 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f,
+ 0x6e, 0x6c, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x4f,
+ 0x6e, 0x6c, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x09,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x12, 0x1f, 0x0a,
+ 0x0b, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x6f, 0x66, 0x18, 0x0a, 0x20, 0x01,
+ 0x28, 0x01, 0x52, 0x0a, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x4f, 0x66, 0x12, 0x18,
+ 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x01, 0x52,
+ 0x07, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x78, 0x63, 0x6c,
+ 0x75, 0x73, 0x69, 0x76, 0x65, 0x5f, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0c, 0x20,
+ 0x01, 0x28, 0x08, 0x52, 0x10, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x4d, 0x61,
+ 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d,
+ 0x18, 0x0d, 0x20, 0x01, 0x28, 0x01, 0x52, 0x07, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x12,
+ 0x2b, 0x0a, 0x11, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x5f, 0x6d, 0x69, 0x6e,
+ 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x65, 0x78, 0x63, 0x6c,
+ 0x75, 0x73, 0x69, 0x76, 0x65, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x1d, 0x0a, 0x0a,
+ 0x6d, 0x61, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x04,
+ 0x52, 0x09, 0x6d, 0x61, 0x78, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x6d,
+ 0x69, 0x6e, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x10, 0x20, 0x01, 0x28, 0x04, 0x52,
+ 0x09, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61,
+ 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x74,
+ 0x74, 0x65, 0x72, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x74, 0x65, 0x6d,
+ 0x73, 0x18, 0x14, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x49, 0x74, 0x65, 0x6d,
+ 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x15,
+ 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6d, 0x69, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x21,
+ 0x0a, 0x0c, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x16,
+ 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x49, 0x74, 0x65, 0x6d,
+ 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
+ 0x69, 0x65, 0x73, 0x18, 0x18, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x50, 0x72,
+ 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x6d, 0x69, 0x6e, 0x5f,
+ 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x19, 0x20, 0x01, 0x28, 0x04,
+ 0x52, 0x0d, 0x6d, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12,
+ 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x1a, 0x20, 0x03, 0x28,
+ 0x09, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x61,
+ 0x72, 0x72, 0x61, 0x79, 0x18, 0x22, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x61, 0x72, 0x72, 0x61,
+ 0x79, 0x12, 0x5f, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x23, 0x20, 0x03, 0x28, 0x0e, 0x32,
+ 0x4b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70,
- 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x65, 0x72,
- 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73,
+ 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4a, 0x53, 0x4f, 0x4e,
+ 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x4a, 0x53, 0x4f, 0x4e, 0x53, 0x63, 0x68, 0x65, 0x6d,
+ 0x61, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x04, 0x74, 0x79,
+ 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x24, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x65, 0x6e,
+ 0x75, 0x6d, 0x18, 0x2e, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x12, 0x7a,
+ 0x0a, 0x13, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe9, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x48, 0x2e, 0x67,
+ 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32,
+ 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4a, 0x53, 0x4f, 0x4e, 0x53, 0x63, 0x68,
+ 0x65, 0x6d, 0x61, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75,
+ 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x12, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x43, 0x6f, 0x6e,
+ 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x65, 0x0a, 0x0a, 0x65, 0x78,
+ 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x30, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x45,
+ 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69,
+ 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4a, 0x53, 0x4f, 0x4e, 0x53,
+ 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73,
0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e,
- 0x73, 0x1a, 0x71, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x45, 0x6e,
- 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x49, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02,
- 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65,
- 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f,
- 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
- 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
- 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x55, 0x0a, 0x0f, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
- 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c,
- 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
- 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65,
- 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x4a, 0x04, 0x08, 0x08, 0x10,
- 0x09, 0x22, 0xd8, 0x01, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x0b,
- 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28,
- 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12,
- 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79,
- 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65,
- 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x65, 0x66,
- 0x61, 0x75, 0x6c, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18,
- 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x4a, 0x04,
- 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x4a, 0x04, 0x08, 0x07, 0x10, 0x08,
- 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x4a, 0x04, 0x08, 0x0a,
- 0x10, 0x0b, 0x4a, 0x04, 0x08, 0x0b, 0x10, 0x0c, 0x4a, 0x04, 0x08, 0x0c, 0x10, 0x0d, 0x4a, 0x04,
- 0x08, 0x0e, 0x10, 0x0f, 0x4a, 0x04, 0x08, 0x0f, 0x10, 0x10, 0x4a, 0x04, 0x08, 0x10, 0x10, 0x11,
- 0x4a, 0x04, 0x08, 0x11, 0x10, 0x12, 0x4a, 0x04, 0x08, 0x12, 0x10, 0x13, 0x22, 0x9a, 0x05, 0x0a,
- 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73,
- 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b,
- 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x49, 0x0a, 0x06, 0x73,
- 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x72,
- 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
- 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e,
- 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x06,
- 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x5a, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72,
- 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67,
- 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65,
- 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69,
- 0x6f, 0x6e, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x48, 0x65, 0x61,
- 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65,
- 0x72, 0x73, 0x12, 0x5d, 0x0a, 0x08, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x18, 0x04,
- 0x20, 0x03, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65,
- 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f,
- 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
- 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c,
- 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65,
- 0x73, 0x12, 0x63, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18,
- 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74,
- 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f,
- 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
- 0x73, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e,
- 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65,
- 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x6d, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72,
- 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x47, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75,
- 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67,
- 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65,
- 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69,
- 0x6f, 0x6e, 0x73, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
- 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3b, 0x0a, 0x0d, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65,
- 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75,
- 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02,
- 0x38, 0x01, 0x1a, 0x55, 0x0a, 0x0f, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73,
+ 0x73, 0x1a, 0x3c, 0x0a, 0x12, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
+ 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0f, 0x70, 0x61, 0x74, 0x68, 0x5f,
+ 0x70, 0x61, 0x72, 0x61, 0x6d, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x2f, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x0d, 0x70, 0x61, 0x74, 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x4e, 0x61, 0x6d, 0x65, 0x1a,
+ 0x55, 0x0a, 0x0f, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74,
+ 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c,
+ 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x77, 0x0a, 0x15, 0x4a, 0x53, 0x4f, 0x4e, 0x53, 0x63,
+ 0x68, 0x65, 0x6d, 0x61, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12,
+ 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05,
+ 0x41, 0x52, 0x52, 0x41, 0x59, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x42, 0x4f, 0x4f, 0x4c, 0x45,
+ 0x41, 0x4e, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x54, 0x45, 0x47, 0x45, 0x52, 0x10,
+ 0x03, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x55, 0x4c, 0x4c, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x4e,
+ 0x55, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x05, 0x12, 0x0a, 0x0a, 0x06, 0x4f, 0x42, 0x4a, 0x45, 0x43,
+ 0x54, 0x10, 0x06, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x07, 0x4a,
+ 0x04, 0x08, 0x01, 0x10, 0x02, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x4a, 0x04, 0x08, 0x04, 0x10,
+ 0x05, 0x4a, 0x04, 0x08, 0x12, 0x10, 0x13, 0x4a, 0x04, 0x08, 0x13, 0x10, 0x14, 0x4a, 0x04, 0x08,
+ 0x17, 0x10, 0x18, 0x4a, 0x04, 0x08, 0x1b, 0x10, 0x1c, 0x4a, 0x04, 0x08, 0x1c, 0x10, 0x1d, 0x4a,
+ 0x04, 0x08, 0x1d, 0x10, 0x1e, 0x4a, 0x04, 0x08, 0x1e, 0x10, 0x22, 0x4a, 0x04, 0x08, 0x25, 0x10,
+ 0x2a, 0x4a, 0x04, 0x08, 0x2a, 0x10, 0x2b, 0x4a, 0x04, 0x08, 0x2b, 0x10, 0x2e, 0x22, 0xd9, 0x02,
+ 0x0a, 0x03, 0x54, 0x61, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73,
+ 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b,
+ 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x65, 0x0a, 0x0d, 0x65,
+ 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x63, 0x73, 0x18, 0x03, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61,
+ 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65,
+ 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x45,
+ 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f,
+ 0x63, 0x73, 0x12, 0x5e, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73,
+ 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61,
+ 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e,
+ 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x2e, 0x54, 0x61, 0x67, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e,
+ 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
+ 0x6e, 0x73, 0x1a, 0x55, 0x0a, 0x0f, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73,
0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05,
- 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xd6, 0x03, 0x0a, 0x04, 0x49, 0x6e,
- 0x66, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
- 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63,
- 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64,
- 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x10, 0x74, 0x65,
- 0x72, 0x6d, 0x73, 0x5f, 0x6f, 0x66, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x03,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x4f, 0x66, 0x53, 0x65, 0x72,
- 0x76, 0x69, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x18,
- 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74,
- 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f,
- 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
- 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x61,
- 0x63, 0x74, 0x12, 0x4c, 0x0a, 0x07, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x18, 0x05, 0x20,
- 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77,
+ 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xf7, 0x01, 0x0a, 0x13, 0x53, 0x65,
+ 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x12, 0x68, 0x0a, 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20,
+ 0x03, 0x28, 0x0b, 0x32, 0x4c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77,
0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70,
0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e,
- 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x52, 0x07, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65,
- 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28,
- 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x5f, 0x0a, 0x0a, 0x65, 0x78,
- 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3f,
- 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72,
- 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69,
- 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x2e,
- 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52,
- 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x55, 0x0a, 0x0f, 0x45,
- 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10,
- 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79,
- 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
- 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
- 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02,
- 0x38, 0x01, 0x22, 0x45, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x12, 0x12, 0x0a,
- 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
- 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
- 0x75, 0x72, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x2f, 0x0a, 0x07, 0x4c, 0x69, 0x63,
- 0x65, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18,
- 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0x4b, 0x0a, 0x15, 0x45, 0x78,
- 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74,
- 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69,
- 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69,
- 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0xaa, 0x02, 0x0a, 0x06, 0x53, 0x63, 0x68, 0x65,
- 0x6d, 0x61, 0x12, 0x56, 0x0a, 0x0b, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d,
- 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67,
- 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65,
- 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69,
- 0x6f, 0x6e, 0x73, 0x2e, 0x4a, 0x53, 0x4f, 0x4e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x0a,
- 0x6a, 0x73, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x24, 0x0a, 0x0d, 0x64, 0x69,
- 0x73, 0x63, 0x72, 0x69, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28,
- 0x09, 0x52, 0x0d, 0x64, 0x69, 0x73, 0x63, 0x72, 0x69, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72,
- 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x03, 0x20,
- 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x65, 0x0a,
- 0x0d, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x63, 0x73, 0x18, 0x05,
- 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65,
+ 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72,
+ 0x79, 0x52, 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x1a, 0x76, 0x0a, 0x0d, 0x53,
+ 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03,
+ 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x4f,
+ 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e,
+ 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76,
+ 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69,
+ 0x74, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a,
+ 0x02, 0x38, 0x01, 0x22, 0xff, 0x06, 0x0a, 0x0e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79,
+ 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x12, 0x52, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65,
0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f,
0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
- 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e,
- 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c,
- 0x44, 0x6f, 0x63, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x18,
- 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x4a, 0x04,
- 0x08, 0x04, 0x10, 0x05, 0x22, 0xdf, 0x07, 0x0a, 0x0a, 0x4a, 0x53, 0x4f, 0x4e, 0x53, 0x63, 0x68,
- 0x65, 0x6d, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x65, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x03, 0x72, 0x65, 0x66, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x05,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64,
- 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a,
- 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
- 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f,
- 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64,
- 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x18,
- 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x12, 0x1f,
- 0x0a, 0x0b, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x6f, 0x66, 0x18, 0x0a, 0x20,
- 0x01, 0x28, 0x01, 0x52, 0x0a, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x4f, 0x66, 0x12,
- 0x18, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x01,
- 0x52, 0x07, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x78, 0x63,
- 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x5f, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0c,
- 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x4d,
- 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75,
- 0x6d, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x01, 0x52, 0x07, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d,
- 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x5f, 0x6d, 0x69,
- 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x65, 0x78, 0x63,
- 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x1d, 0x0a,
- 0x0a, 0x6d, 0x61, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x0f, 0x20, 0x01, 0x28,
- 0x04, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x1d, 0x0a, 0x0a,
- 0x6d, 0x69, 0x6e, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x10, 0x20, 0x01, 0x28, 0x04,
- 0x52, 0x09, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x70,
- 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61,
- 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x74, 0x65,
- 0x6d, 0x73, 0x18, 0x14, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x49, 0x74, 0x65,
- 0x6d, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18,
- 0x15, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6d, 0x69, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12,
- 0x21, 0x0a, 0x0c, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18,
- 0x16, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x49, 0x74, 0x65,
- 0x6d, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
- 0x74, 0x69, 0x65, 0x73, 0x18, 0x18, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x50,
- 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x6d, 0x69, 0x6e,
- 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x19, 0x20, 0x01, 0x28,
- 0x04, 0x52, 0x0d, 0x6d, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73,
- 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x1a, 0x20, 0x03,
- 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05,
- 0x61, 0x72, 0x72, 0x61, 0x79, 0x18, 0x22, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x61, 0x72, 0x72,
- 0x61, 0x79, 0x12, 0x5f, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x23, 0x20, 0x03, 0x28, 0x0e,
- 0x32, 0x4b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e,
- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61,
- 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4a, 0x53, 0x4f,
- 0x4e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x4a, 0x53, 0x4f, 0x4e, 0x53, 0x63, 0x68, 0x65,
- 0x6d, 0x61, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x04, 0x74,
- 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x24, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x65,
- 0x6e, 0x75, 0x6d, 0x18, 0x2e, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x22,
- 0x77, 0x0a, 0x15, 0x4a, 0x53, 0x4f, 0x4e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x53, 0x69, 0x6d,
- 0x70, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e,
- 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x52, 0x52, 0x41, 0x59, 0x10, 0x01,
- 0x12, 0x0b, 0x0a, 0x07, 0x42, 0x4f, 0x4f, 0x4c, 0x45, 0x41, 0x4e, 0x10, 0x02, 0x12, 0x0b, 0x0a,
- 0x07, 0x49, 0x4e, 0x54, 0x45, 0x47, 0x45, 0x52, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x55,
- 0x4c, 0x4c, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x55, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x05,
- 0x12, 0x0a, 0x0a, 0x06, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x10, 0x06, 0x12, 0x0a, 0x0a, 0x06,
- 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x07, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x4a, 0x04,
- 0x08, 0x02, 0x10, 0x03, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x12, 0x10, 0x13,
- 0x4a, 0x04, 0x08, 0x13, 0x10, 0x14, 0x4a, 0x04, 0x08, 0x17, 0x10, 0x18, 0x4a, 0x04, 0x08, 0x1b,
- 0x10, 0x1c, 0x4a, 0x04, 0x08, 0x1c, 0x10, 0x1d, 0x4a, 0x04, 0x08, 0x1d, 0x10, 0x1e, 0x4a, 0x04,
- 0x08, 0x1e, 0x10, 0x22, 0x4a, 0x04, 0x08, 0x25, 0x10, 0x2a, 0x4a, 0x04, 0x08, 0x2a, 0x10, 0x2b,
- 0x4a, 0x04, 0x08, 0x2b, 0x10, 0x2e, 0x22, 0x94, 0x01, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x12, 0x20,
- 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e,
- 0x12, 0x65, 0x0a, 0x0d, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x63,
- 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67,
- 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65,
- 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69,
- 0x6f, 0x6e, 0x73, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x75,
- 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72,
- 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x73, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x22, 0xf7, 0x01,
- 0x0a, 0x13, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69,
- 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x68, 0x0a, 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74,
- 0x79, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67,
- 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65,
- 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69,
- 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x44, 0x65, 0x66, 0x69,
- 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79,
- 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x1a,
- 0x76, 0x0a, 0x0d, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79,
- 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b,
- 0x65, 0x79, 0x12, 0x4f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
- 0x0b, 0x32, 0x39, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79,
- 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e,
- 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65,
- 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x52, 0x05, 0x76, 0x61,
- 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xff, 0x06, 0x0a, 0x0e, 0x53, 0x65, 0x63, 0x75,
- 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x12, 0x52, 0x0a, 0x04, 0x74, 0x79,
- 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e,
- 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67,
- 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74,
- 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x68,
- 0x65, 0x6d, 0x65, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x20,
- 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e,
- 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
- 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4c, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e,
- 0x32, 0x3c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e,
- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61,
- 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63,
- 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x2e, 0x49, 0x6e, 0x52, 0x02,
- 0x69, 0x6e, 0x12, 0x52, 0x0a, 0x04, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e,
- 0x32, 0x3e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e,
- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61,
- 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63,
- 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x2e, 0x46, 0x6c, 0x6f, 0x77,
- 0x52, 0x04, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x2b, 0x0a, 0x11, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72,
- 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28,
- 0x09, 0x52, 0x10, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e,
- 0x55, 0x72, 0x6c, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x75, 0x72, 0x6c,
- 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x55, 0x72, 0x6c,
- 0x12, 0x49, 0x0a, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b,
- 0x32, 0x31, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e,
- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61,
- 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x63, 0x6f,
- 0x70, 0x65, 0x73, 0x52, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x69, 0x0a, 0x0a, 0x65,
- 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32,
- 0x49, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70,
- 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70,
- 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75,
- 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e,
- 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65,
- 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x55, 0x0a, 0x0f, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73,
- 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79,
- 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2c, 0x0a, 0x05, 0x76,
- 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f,
- 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c,
- 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4b, 0x0a,
- 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e,
- 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f,
- 0x42, 0x41, 0x53, 0x49, 0x43, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f,
- 0x41, 0x50, 0x49, 0x5f, 0x4b, 0x45, 0x59, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50,
- 0x45, 0x5f, 0x4f, 0x41, 0x55, 0x54, 0x48, 0x32, 0x10, 0x03, 0x22, 0x31, 0x0a, 0x02, 0x49, 0x6e,
- 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x4e, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00,
- 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4e, 0x5f, 0x51, 0x55, 0x45, 0x52, 0x59, 0x10, 0x01, 0x12, 0x0d,
- 0x0a, 0x09, 0x49, 0x4e, 0x5f, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x10, 0x02, 0x22, 0x6a, 0x0a,
- 0x04, 0x46, 0x6c, 0x6f, 0x77, 0x12, 0x10, 0x0a, 0x0c, 0x46, 0x4c, 0x4f, 0x57, 0x5f, 0x49, 0x4e,
- 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x46, 0x4c, 0x4f, 0x57, 0x5f,
- 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x43, 0x49, 0x54, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x46, 0x4c,
- 0x4f, 0x57, 0x5f, 0x50, 0x41, 0x53, 0x53, 0x57, 0x4f, 0x52, 0x44, 0x10, 0x02, 0x12, 0x14, 0x0a,
- 0x10, 0x46, 0x4c, 0x4f, 0x57, 0x5f, 0x41, 0x50, 0x50, 0x4c, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f,
- 0x4e, 0x10, 0x03, 0x12, 0x14, 0x0a, 0x10, 0x46, 0x4c, 0x4f, 0x57, 0x5f, 0x41, 0x43, 0x43, 0x45,
- 0x53, 0x53, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x10, 0x04, 0x22, 0xf6, 0x02, 0x0a, 0x13, 0x53, 0x65,
- 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e,
- 0x74, 0x12, 0x8a, 0x01, 0x0a, 0x14, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x72,
- 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
- 0x32, 0x57, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e,
- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61,
- 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63,
- 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74,
- 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65,
- 0x6d, 0x65, 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x13, 0x73, 0x65, 0x63, 0x75, 0x72,
- 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x30,
- 0x0a, 0x18, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72,
- 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63,
- 0x6f, 0x70, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65,
- 0x1a, 0x9f, 0x01, 0x0a, 0x18, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71,
- 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a,
- 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12,
- 0x6d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x57,
- 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72,
- 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69,
- 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72,
- 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x53,
- 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65,
- 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02,
- 0x38, 0x01, 0x22, 0x96, 0x01, 0x0a, 0x06, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x52, 0x0a,
- 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x67,
+ 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x2e,
+ 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65,
+ 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04,
+ 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,
+ 0x12, 0x4c, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3c, 0x2e, 0x67,
+ 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32,
+ 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74,
+ 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x2e, 0x49, 0x6e, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x52,
+ 0x0a, 0x04, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3e, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32,
- 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x2e,
- 0x53, 0x63, 0x6f, 0x70, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70,
- 0x65, 0x1a, 0x38, 0x0a, 0x0a, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12,
- 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65,
- 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x2a, 0x3b, 0x0a, 0x06, 0x53,
- 0x63, 0x68, 0x65, 0x6d, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e,
- 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x54, 0x54, 0x50, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05,
- 0x48, 0x54, 0x54, 0x50, 0x53, 0x10, 0x02, 0x12, 0x06, 0x0a, 0x02, 0x57, 0x53, 0x10, 0x03, 0x12,
- 0x07, 0x0a, 0x03, 0x57, 0x53, 0x53, 0x10, 0x04, 0x42, 0x48, 0x5a, 0x46, 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, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e,
- 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f,
- 0x6e, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74,
+ 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x04, 0x66, 0x6c,
+ 0x6f, 0x77, 0x12, 0x2b, 0x0a, 0x11, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x61,
+ 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x72, 0x6c, 0x12,
+ 0x1b, 0x0a, 0x09, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x07, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x08, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x55, 0x72, 0x6c, 0x12, 0x49, 0x0a, 0x06,
+ 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67,
+ 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32,
+ 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x52,
+ 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x69, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e,
+ 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x49, 0x2e, 0x67, 0x72,
+ 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e,
+ 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79,
+ 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e,
+ 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
+ 0x6e, 0x73, 0x1a, 0x55, 0x0a, 0x0f, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73,
+ 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05,
+ 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4b, 0x0a, 0x04, 0x54, 0x79, 0x70,
+ 0x65, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49,
+ 0x44, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x41, 0x53, 0x49,
+ 0x43, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x41, 0x50, 0x49, 0x5f,
+ 0x4b, 0x45, 0x59, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x41,
+ 0x55, 0x54, 0x48, 0x32, 0x10, 0x03, 0x22, 0x31, 0x0a, 0x02, 0x49, 0x6e, 0x12, 0x0e, 0x0a, 0x0a,
+ 0x49, 0x4e, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08,
+ 0x49, 0x4e, 0x5f, 0x51, 0x55, 0x45, 0x52, 0x59, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x49, 0x4e,
+ 0x5f, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x10, 0x02, 0x22, 0x6a, 0x0a, 0x04, 0x46, 0x6c, 0x6f,
+ 0x77, 0x12, 0x10, 0x0a, 0x0c, 0x46, 0x4c, 0x4f, 0x57, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49,
+ 0x44, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x46, 0x4c, 0x4f, 0x57, 0x5f, 0x49, 0x4d, 0x50, 0x4c,
+ 0x49, 0x43, 0x49, 0x54, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x46, 0x4c, 0x4f, 0x57, 0x5f, 0x50,
+ 0x41, 0x53, 0x53, 0x57, 0x4f, 0x52, 0x44, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x46, 0x4c, 0x4f,
+ 0x57, 0x5f, 0x41, 0x50, 0x50, 0x4c, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x03, 0x12,
+ 0x14, 0x0a, 0x10, 0x46, 0x4c, 0x4f, 0x57, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x43,
+ 0x4f, 0x44, 0x45, 0x10, 0x04, 0x22, 0xf6, 0x02, 0x0a, 0x13, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69,
+ 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x8a, 0x01,
+ 0x0a, 0x14, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69,
+ 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x57, 0x2e, 0x67,
+ 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32,
+ 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74,
+ 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x65, 0x63,
+ 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74,
+ 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x13, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52,
+ 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x30, 0x0a, 0x18, 0x53, 0x65,
+ 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e,
+ 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18,
+ 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x1a, 0x9f, 0x01, 0x0a,
+ 0x18, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65,
+ 0x6d, 0x65, 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x6d, 0x0a, 0x05, 0x76,
+ 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x57, 0x2e, 0x67, 0x72, 0x70,
+ 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63,
+ 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f,
+ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52,
+ 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72,
+ 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61,
+ 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x96,
+ 0x01, 0x0a, 0x06, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x52, 0x0a, 0x05, 0x73, 0x63, 0x6f,
+ 0x70, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e,
+ 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67,
+ 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74,
+ 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x63, 0x6f, 0x70,
+ 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x1a, 0x38, 0x0a,
+ 0x0a, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b,
+ 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a,
+ 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61,
+ 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x2a, 0x3b, 0x0a, 0x06, 0x53, 0x63, 0x68, 0x65, 0x6d,
+ 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x08,
+ 0x0a, 0x04, 0x48, 0x54, 0x54, 0x50, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x48, 0x54, 0x54, 0x50,
+ 0x53, 0x10, 0x02, 0x12, 0x06, 0x0a, 0x02, 0x57, 0x53, 0x10, 0x03, 0x12, 0x07, 0x0a, 0x03, 0x57,
+ 0x53, 0x53, 0x10, 0x04, 0x42, 0x48, 0x5a, 0x46, 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, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65,
+ 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x62, 0x06,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -2477,91 +2876,106 @@ func file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP() []byte {
return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescData
}
-var file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes = make([]protoimpl.EnumInfo, 5)
-var file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes = make([]protoimpl.MessageInfo, 28)
+var file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes = make([]protoimpl.EnumInfo, 6)
+var file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes = make([]protoimpl.MessageInfo, 33)
var file_protoc_gen_openapiv2_options_openapiv2_proto_goTypes = []interface{}{
(Scheme)(0), // 0: grpc.gateway.protoc_gen_openapiv2.options.Scheme
- (JSONSchema_JSONSchemaSimpleTypes)(0), // 1: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes
- (SecurityScheme_Type)(0), // 2: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type
- (SecurityScheme_In)(0), // 3: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In
- (SecurityScheme_Flow)(0), // 4: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow
- (*Swagger)(nil), // 5: grpc.gateway.protoc_gen_openapiv2.options.Swagger
- (*Operation)(nil), // 6: grpc.gateway.protoc_gen_openapiv2.options.Operation
- (*Header)(nil), // 7: grpc.gateway.protoc_gen_openapiv2.options.Header
- (*Response)(nil), // 8: grpc.gateway.protoc_gen_openapiv2.options.Response
- (*Info)(nil), // 9: grpc.gateway.protoc_gen_openapiv2.options.Info
- (*Contact)(nil), // 10: grpc.gateway.protoc_gen_openapiv2.options.Contact
- (*License)(nil), // 11: grpc.gateway.protoc_gen_openapiv2.options.License
- (*ExternalDocumentation)(nil), // 12: grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation
- (*Schema)(nil), // 13: grpc.gateway.protoc_gen_openapiv2.options.Schema
- (*JSONSchema)(nil), // 14: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema
- (*Tag)(nil), // 15: grpc.gateway.protoc_gen_openapiv2.options.Tag
- (*SecurityDefinitions)(nil), // 16: grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions
- (*SecurityScheme)(nil), // 17: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme
- (*SecurityRequirement)(nil), // 18: grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement
- (*Scopes)(nil), // 19: grpc.gateway.protoc_gen_openapiv2.options.Scopes
- nil, // 20: grpc.gateway.protoc_gen_openapiv2.options.Swagger.ResponsesEntry
- nil, // 21: grpc.gateway.protoc_gen_openapiv2.options.Swagger.ExtensionsEntry
- nil, // 22: grpc.gateway.protoc_gen_openapiv2.options.Operation.ResponsesEntry
- nil, // 23: grpc.gateway.protoc_gen_openapiv2.options.Operation.ExtensionsEntry
- nil, // 24: grpc.gateway.protoc_gen_openapiv2.options.Response.HeadersEntry
- nil, // 25: grpc.gateway.protoc_gen_openapiv2.options.Response.ExamplesEntry
- nil, // 26: grpc.gateway.protoc_gen_openapiv2.options.Response.ExtensionsEntry
- nil, // 27: grpc.gateway.protoc_gen_openapiv2.options.Info.ExtensionsEntry
- nil, // 28: grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.SecurityEntry
- nil, // 29: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.ExtensionsEntry
- (*SecurityRequirement_SecurityRequirementValue)(nil), // 30: grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue
- nil, // 31: grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementEntry
- nil, // 32: grpc.gateway.protoc_gen_openapiv2.options.Scopes.ScopeEntry
- (*_struct.Value)(nil), // 33: google.protobuf.Value
+ (HeaderParameter_Type)(0), // 1: grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type
+ (JSONSchema_JSONSchemaSimpleTypes)(0), // 2: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes
+ (SecurityScheme_Type)(0), // 3: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type
+ (SecurityScheme_In)(0), // 4: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In
+ (SecurityScheme_Flow)(0), // 5: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow
+ (*Swagger)(nil), // 6: grpc.gateway.protoc_gen_openapiv2.options.Swagger
+ (*Operation)(nil), // 7: grpc.gateway.protoc_gen_openapiv2.options.Operation
+ (*Parameters)(nil), // 8: grpc.gateway.protoc_gen_openapiv2.options.Parameters
+ (*HeaderParameter)(nil), // 9: grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter
+ (*Header)(nil), // 10: grpc.gateway.protoc_gen_openapiv2.options.Header
+ (*Response)(nil), // 11: grpc.gateway.protoc_gen_openapiv2.options.Response
+ (*Info)(nil), // 12: grpc.gateway.protoc_gen_openapiv2.options.Info
+ (*Contact)(nil), // 13: grpc.gateway.protoc_gen_openapiv2.options.Contact
+ (*License)(nil), // 14: grpc.gateway.protoc_gen_openapiv2.options.License
+ (*ExternalDocumentation)(nil), // 15: grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation
+ (*Schema)(nil), // 16: grpc.gateway.protoc_gen_openapiv2.options.Schema
+ (*JSONSchema)(nil), // 17: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema
+ (*Tag)(nil), // 18: grpc.gateway.protoc_gen_openapiv2.options.Tag
+ (*SecurityDefinitions)(nil), // 19: grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions
+ (*SecurityScheme)(nil), // 20: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme
+ (*SecurityRequirement)(nil), // 21: grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement
+ (*Scopes)(nil), // 22: grpc.gateway.protoc_gen_openapiv2.options.Scopes
+ nil, // 23: grpc.gateway.protoc_gen_openapiv2.options.Swagger.ResponsesEntry
+ nil, // 24: grpc.gateway.protoc_gen_openapiv2.options.Swagger.ExtensionsEntry
+ nil, // 25: grpc.gateway.protoc_gen_openapiv2.options.Operation.ResponsesEntry
+ nil, // 26: grpc.gateway.protoc_gen_openapiv2.options.Operation.ExtensionsEntry
+ nil, // 27: grpc.gateway.protoc_gen_openapiv2.options.Response.HeadersEntry
+ nil, // 28: grpc.gateway.protoc_gen_openapiv2.options.Response.ExamplesEntry
+ nil, // 29: grpc.gateway.protoc_gen_openapiv2.options.Response.ExtensionsEntry
+ nil, // 30: grpc.gateway.protoc_gen_openapiv2.options.Info.ExtensionsEntry
+ (*JSONSchema_FieldConfiguration)(nil), // 31: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration
+ nil, // 32: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.ExtensionsEntry
+ nil, // 33: grpc.gateway.protoc_gen_openapiv2.options.Tag.ExtensionsEntry
+ nil, // 34: grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.SecurityEntry
+ nil, // 35: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.ExtensionsEntry
+ (*SecurityRequirement_SecurityRequirementValue)(nil), // 36: grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue
+ nil, // 37: grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementEntry
+ nil, // 38: grpc.gateway.protoc_gen_openapiv2.options.Scopes.ScopeEntry
+ (*structpb.Value)(nil), // 39: google.protobuf.Value
}
var file_protoc_gen_openapiv2_options_openapiv2_proto_depIdxs = []int32{
- 9, // 0: grpc.gateway.protoc_gen_openapiv2.options.Swagger.info:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Info
+ 12, // 0: grpc.gateway.protoc_gen_openapiv2.options.Swagger.info:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Info
0, // 1: grpc.gateway.protoc_gen_openapiv2.options.Swagger.schemes:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Scheme
- 20, // 2: grpc.gateway.protoc_gen_openapiv2.options.Swagger.responses:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Swagger.ResponsesEntry
- 16, // 3: grpc.gateway.protoc_gen_openapiv2.options.Swagger.security_definitions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions
- 18, // 4: grpc.gateway.protoc_gen_openapiv2.options.Swagger.security:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement
- 12, // 5: grpc.gateway.protoc_gen_openapiv2.options.Swagger.external_docs:type_name -> grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation
- 21, // 6: grpc.gateway.protoc_gen_openapiv2.options.Swagger.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Swagger.ExtensionsEntry
- 12, // 7: grpc.gateway.protoc_gen_openapiv2.options.Operation.external_docs:type_name -> grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation
- 22, // 8: grpc.gateway.protoc_gen_openapiv2.options.Operation.responses:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Operation.ResponsesEntry
- 0, // 9: grpc.gateway.protoc_gen_openapiv2.options.Operation.schemes:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Scheme
- 18, // 10: grpc.gateway.protoc_gen_openapiv2.options.Operation.security:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement
- 23, // 11: grpc.gateway.protoc_gen_openapiv2.options.Operation.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Operation.ExtensionsEntry
- 13, // 12: grpc.gateway.protoc_gen_openapiv2.options.Response.schema:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Schema
- 24, // 13: grpc.gateway.protoc_gen_openapiv2.options.Response.headers:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Response.HeadersEntry
- 25, // 14: grpc.gateway.protoc_gen_openapiv2.options.Response.examples:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Response.ExamplesEntry
- 26, // 15: grpc.gateway.protoc_gen_openapiv2.options.Response.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Response.ExtensionsEntry
- 10, // 16: grpc.gateway.protoc_gen_openapiv2.options.Info.contact:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Contact
- 11, // 17: grpc.gateway.protoc_gen_openapiv2.options.Info.license:type_name -> grpc.gateway.protoc_gen_openapiv2.options.License
- 27, // 18: grpc.gateway.protoc_gen_openapiv2.options.Info.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Info.ExtensionsEntry
- 14, // 19: grpc.gateway.protoc_gen_openapiv2.options.Schema.json_schema:type_name -> grpc.gateway.protoc_gen_openapiv2.options.JSONSchema
- 12, // 20: grpc.gateway.protoc_gen_openapiv2.options.Schema.external_docs:type_name -> grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation
- 1, // 21: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.type:type_name -> grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes
- 12, // 22: grpc.gateway.protoc_gen_openapiv2.options.Tag.external_docs:type_name -> grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation
- 28, // 23: grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.security:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.SecurityEntry
- 2, // 24: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.type:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type
- 3, // 25: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.in:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In
- 4, // 26: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.flow:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow
- 19, // 27: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.scopes:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Scopes
- 29, // 28: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.ExtensionsEntry
- 31, // 29: grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.security_requirement:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementEntry
- 32, // 30: grpc.gateway.protoc_gen_openapiv2.options.Scopes.scope:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Scopes.ScopeEntry
- 8, // 31: grpc.gateway.protoc_gen_openapiv2.options.Swagger.ResponsesEntry.value:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Response
- 33, // 32: grpc.gateway.protoc_gen_openapiv2.options.Swagger.ExtensionsEntry.value:type_name -> google.protobuf.Value
- 8, // 33: grpc.gateway.protoc_gen_openapiv2.options.Operation.ResponsesEntry.value:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Response
- 33, // 34: grpc.gateway.protoc_gen_openapiv2.options.Operation.ExtensionsEntry.value:type_name -> google.protobuf.Value
- 7, // 35: grpc.gateway.protoc_gen_openapiv2.options.Response.HeadersEntry.value:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Header
- 33, // 36: grpc.gateway.protoc_gen_openapiv2.options.Response.ExtensionsEntry.value:type_name -> google.protobuf.Value
- 33, // 37: grpc.gateway.protoc_gen_openapiv2.options.Info.ExtensionsEntry.value:type_name -> google.protobuf.Value
- 17, // 38: grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.SecurityEntry.value:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme
- 33, // 39: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.ExtensionsEntry.value:type_name -> google.protobuf.Value
- 30, // 40: grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementEntry.value:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue
- 41, // [41:41] is the sub-list for method output_type
- 41, // [41:41] is the sub-list for method input_type
- 41, // [41:41] is the sub-list for extension type_name
- 41, // [41:41] is the sub-list for extension extendee
- 0, // [0:41] is the sub-list for field type_name
+ 23, // 2: grpc.gateway.protoc_gen_openapiv2.options.Swagger.responses:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Swagger.ResponsesEntry
+ 19, // 3: grpc.gateway.protoc_gen_openapiv2.options.Swagger.security_definitions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions
+ 21, // 4: grpc.gateway.protoc_gen_openapiv2.options.Swagger.security:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement
+ 18, // 5: grpc.gateway.protoc_gen_openapiv2.options.Swagger.tags:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Tag
+ 15, // 6: grpc.gateway.protoc_gen_openapiv2.options.Swagger.external_docs:type_name -> grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation
+ 24, // 7: grpc.gateway.protoc_gen_openapiv2.options.Swagger.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Swagger.ExtensionsEntry
+ 15, // 8: grpc.gateway.protoc_gen_openapiv2.options.Operation.external_docs:type_name -> grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation
+ 25, // 9: grpc.gateway.protoc_gen_openapiv2.options.Operation.responses:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Operation.ResponsesEntry
+ 0, // 10: grpc.gateway.protoc_gen_openapiv2.options.Operation.schemes:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Scheme
+ 21, // 11: grpc.gateway.protoc_gen_openapiv2.options.Operation.security:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement
+ 26, // 12: grpc.gateway.protoc_gen_openapiv2.options.Operation.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Operation.ExtensionsEntry
+ 8, // 13: grpc.gateway.protoc_gen_openapiv2.options.Operation.parameters:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Parameters
+ 9, // 14: grpc.gateway.protoc_gen_openapiv2.options.Parameters.headers:type_name -> grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter
+ 1, // 15: grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.type:type_name -> grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type
+ 16, // 16: grpc.gateway.protoc_gen_openapiv2.options.Response.schema:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Schema
+ 27, // 17: grpc.gateway.protoc_gen_openapiv2.options.Response.headers:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Response.HeadersEntry
+ 28, // 18: grpc.gateway.protoc_gen_openapiv2.options.Response.examples:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Response.ExamplesEntry
+ 29, // 19: grpc.gateway.protoc_gen_openapiv2.options.Response.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Response.ExtensionsEntry
+ 13, // 20: grpc.gateway.protoc_gen_openapiv2.options.Info.contact:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Contact
+ 14, // 21: grpc.gateway.protoc_gen_openapiv2.options.Info.license:type_name -> grpc.gateway.protoc_gen_openapiv2.options.License
+ 30, // 22: grpc.gateway.protoc_gen_openapiv2.options.Info.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Info.ExtensionsEntry
+ 17, // 23: grpc.gateway.protoc_gen_openapiv2.options.Schema.json_schema:type_name -> grpc.gateway.protoc_gen_openapiv2.options.JSONSchema
+ 15, // 24: grpc.gateway.protoc_gen_openapiv2.options.Schema.external_docs:type_name -> grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation
+ 2, // 25: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.type:type_name -> grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes
+ 31, // 26: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.field_configuration:type_name -> grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration
+ 32, // 27: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.ExtensionsEntry
+ 15, // 28: grpc.gateway.protoc_gen_openapiv2.options.Tag.external_docs:type_name -> grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation
+ 33, // 29: grpc.gateway.protoc_gen_openapiv2.options.Tag.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Tag.ExtensionsEntry
+ 34, // 30: grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.security:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.SecurityEntry
+ 3, // 31: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.type:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type
+ 4, // 32: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.in:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In
+ 5, // 33: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.flow:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow
+ 22, // 34: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.scopes:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Scopes
+ 35, // 35: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.ExtensionsEntry
+ 37, // 36: grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.security_requirement:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementEntry
+ 38, // 37: grpc.gateway.protoc_gen_openapiv2.options.Scopes.scope:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Scopes.ScopeEntry
+ 11, // 38: grpc.gateway.protoc_gen_openapiv2.options.Swagger.ResponsesEntry.value:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Response
+ 39, // 39: grpc.gateway.protoc_gen_openapiv2.options.Swagger.ExtensionsEntry.value:type_name -> google.protobuf.Value
+ 11, // 40: grpc.gateway.protoc_gen_openapiv2.options.Operation.ResponsesEntry.value:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Response
+ 39, // 41: grpc.gateway.protoc_gen_openapiv2.options.Operation.ExtensionsEntry.value:type_name -> google.protobuf.Value
+ 10, // 42: grpc.gateway.protoc_gen_openapiv2.options.Response.HeadersEntry.value:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Header
+ 39, // 43: grpc.gateway.protoc_gen_openapiv2.options.Response.ExtensionsEntry.value:type_name -> google.protobuf.Value
+ 39, // 44: grpc.gateway.protoc_gen_openapiv2.options.Info.ExtensionsEntry.value:type_name -> google.protobuf.Value
+ 39, // 45: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.ExtensionsEntry.value:type_name -> google.protobuf.Value
+ 39, // 46: grpc.gateway.protoc_gen_openapiv2.options.Tag.ExtensionsEntry.value:type_name -> google.protobuf.Value
+ 20, // 47: grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.SecurityEntry.value:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme
+ 39, // 48: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.ExtensionsEntry.value:type_name -> google.protobuf.Value
+ 36, // 49: grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementEntry.value:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue
+ 50, // [50:50] is the sub-list for method output_type
+ 50, // [50:50] is the sub-list for method input_type
+ 50, // [50:50] is the sub-list for extension type_name
+ 50, // [50:50] is the sub-list for extension extendee
+ 0, // [0:50] is the sub-list for field type_name
}
func init() { file_protoc_gen_openapiv2_options_openapiv2_proto_init() }
@@ -2595,7 +3009,7 @@ func file_protoc_gen_openapiv2_options_openapiv2_proto_init() {
}
}
file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Header); i {
+ switch v := v.(*Parameters); i {
case 0:
return &v.state
case 1:
@@ -2607,7 +3021,7 @@ func file_protoc_gen_openapiv2_options_openapiv2_proto_init() {
}
}
file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Response); i {
+ switch v := v.(*HeaderParameter); i {
case 0:
return &v.state
case 1:
@@ -2619,7 +3033,7 @@ func file_protoc_gen_openapiv2_options_openapiv2_proto_init() {
}
}
file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Info); i {
+ switch v := v.(*Header); i {
case 0:
return &v.state
case 1:
@@ -2631,7 +3045,7 @@ func file_protoc_gen_openapiv2_options_openapiv2_proto_init() {
}
}
file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Contact); i {
+ switch v := v.(*Response); i {
case 0:
return &v.state
case 1:
@@ -2643,7 +3057,7 @@ func file_protoc_gen_openapiv2_options_openapiv2_proto_init() {
}
}
file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*License); i {
+ switch v := v.(*Info); i {
case 0:
return &v.state
case 1:
@@ -2655,7 +3069,7 @@ func file_protoc_gen_openapiv2_options_openapiv2_proto_init() {
}
}
file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ExternalDocumentation); i {
+ switch v := v.(*Contact); i {
case 0:
return &v.state
case 1:
@@ -2667,7 +3081,7 @@ func file_protoc_gen_openapiv2_options_openapiv2_proto_init() {
}
}
file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Schema); i {
+ switch v := v.(*License); i {
case 0:
return &v.state
case 1:
@@ -2679,7 +3093,7 @@ func file_protoc_gen_openapiv2_options_openapiv2_proto_init() {
}
}
file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*JSONSchema); i {
+ switch v := v.(*ExternalDocumentation); i {
case 0:
return &v.state
case 1:
@@ -2691,7 +3105,7 @@ func file_protoc_gen_openapiv2_options_openapiv2_proto_init() {
}
}
file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Tag); i {
+ switch v := v.(*Schema); i {
case 0:
return &v.state
case 1:
@@ -2703,7 +3117,7 @@ func file_protoc_gen_openapiv2_options_openapiv2_proto_init() {
}
}
file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*SecurityDefinitions); i {
+ switch v := v.(*JSONSchema); i {
case 0:
return &v.state
case 1:
@@ -2715,7 +3129,7 @@ func file_protoc_gen_openapiv2_options_openapiv2_proto_init() {
}
}
file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*SecurityScheme); i {
+ switch v := v.(*Tag); i {
case 0:
return &v.state
case 1:
@@ -2727,7 +3141,7 @@ func file_protoc_gen_openapiv2_options_openapiv2_proto_init() {
}
}
file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*SecurityRequirement); i {
+ switch v := v.(*SecurityDefinitions); i {
case 0:
return &v.state
case 1:
@@ -2739,6 +3153,30 @@ func file_protoc_gen_openapiv2_options_openapiv2_proto_init() {
}
}
file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SecurityScheme); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SecurityRequirement); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Scopes); i {
case 0:
return &v.state
@@ -2751,6 +3189,18 @@ func file_protoc_gen_openapiv2_options_openapiv2_proto_init() {
}
}
file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*JSONSchema_FieldConfiguration); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SecurityRequirement_SecurityRequirementValue); i {
case 0:
return &v.state
@@ -2768,8 +3218,8 @@ func file_protoc_gen_openapiv2_options_openapiv2_proto_init() {
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_protoc_gen_openapiv2_options_openapiv2_proto_rawDesc,
- NumEnums: 5,
- NumMessages: 28,
+ NumEnums: 6,
+ NumMessages: 33,
NumExtensions: 0,
NumServices: 0,
},
diff --git a/protoc-gen-openapiv2/options/openapiv2.proto b/protoc-gen-openapiv2/options/openapiv2.proto
index 7be1fb572c7..ec88735f6d5 100644
--- a/protoc-gen-openapiv2/options/openapiv2.proto
+++ b/protoc-gen-openapiv2/options/openapiv2.proto
@@ -2,10 +2,10 @@ syntax = "proto3";
package grpc.gateway.protoc_gen_openapiv2.options;
-option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options";
-
import "google/protobuf/struct.proto";
+option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options";
+
// Scheme describes the schemes supported by the OpenAPI Swagger
// and Operation objects.
enum Scheme {
@@ -26,7 +26,7 @@ enum Scheme {
// info: {
// title: "Echo API";
// version: "1.0";
-// description: ";
+// description: "";
// contact: {
// name: "gRPC-Gateway project";
// url: "https://github.com/grpc-ecosystem/grpc-gateway";
@@ -44,32 +44,32 @@ enum Scheme {
//
message Swagger {
// Specifies the OpenAPI Specification version being used. It can be
- // used by the OpenAPI UI and other clients to interpret the API listing. The
+ // used by the OpenAPI UI and other clients to interpret the API listing. The
// value MUST be "2.0".
string swagger = 1;
- // Provides metadata about the API. The metadata can be used by the
+ // Provides metadata about the API. The metadata can be used by the
// clients if needed.
Info info = 2;
- // The host (name or ip) serving the API. This MUST be the host only and does
+ // The host (name or ip) serving the API. This MUST be the host only and does
// not include the scheme nor sub-paths. It MAY include a port. If the host is
// not included, the host serving the documentation is to be used (including
// the port). The host does not support path templating.
string host = 3;
// The base path on which the API is served, which is relative to the host. If
- // it is not included, the API is served directly under the host. The value
+ // it is not included, the API is served directly under the host. The value
// MUST start with a leading slash (/). The basePath does not support path
// templating.
- // Note that using `base_path` does not change the endpoint paths that are
+ // Note that using `base_path` does not change the endpoint paths that are
// generated in the resulting OpenAPI file. If you wish to use `base_path`
- // with relatively generated OpenAPI paths, the `base_path` prefix must be
- // manually removed from your `google.api.http` paths and your code changed to
+ // with relatively generated OpenAPI paths, the `base_path` prefix must be
+ // manually removed from your `google.api.http` paths and your code changed to
// serve the API from the `base_path`.
string base_path = 4;
// The transfer protocol of the API. Values MUST be from the list: "http",
// "https", "ws", "wss". If the schemes is not included, the default scheme to
// be used is the one used to access the OpenAPI definition itself.
repeated Scheme schemes = 5;
- // A list of MIME types the APIs can consume. This is global to all APIs but
+ // A list of MIME types the APIs can consume. This is global to all APIs but
// can be overridden on specific API calls. Value MUST be as described under
// Mime Types.
repeated string consumes = 6;
@@ -88,16 +88,18 @@ message Swagger {
// Security scheme definitions that can be used across the specification.
SecurityDefinitions security_definitions = 11;
// A declaration of which security schemes are applied for the API as a whole.
- // The list of values describes alternative security schemes that can be used
- // (that is, there is a logical OR between the security requirements).
+ // The list of values describes alternative security schemes that can be used
+ // (that is, there is a logical OR between the security requirements).
// Individual operations can override this definition.
repeated SecurityRequirement security = 12;
- // field 13 is reserved for 'tags', which are supposed to be exposed as and
- // customizable as proto services. TODO(ivucica): add processing of proto
- // service objects into OpenAPI v2 Tag objects.
- reserved 13;
+ // A list of tags for API documentation control. Tags can be used for logical
+ // grouping of operations by resources or any other qualifier.
+ repeated Tag tags = 13;
// Additional external documentation.
ExternalDocumentation external_docs = 14;
+ // Custom properties that start with "x-" such as "x-foo" used to describe
+ // extra functionality that is not covered by the standard OpenAPI Specification.
+ // See: https://swagger.io/docs/specification/2-0/swagger-extensions/
map extensions = 15;
}
@@ -169,7 +171,55 @@ message Operation {
// definition overrides any declared top-level security. To remove a top-level
// security declaration, an empty array can be used.
repeated SecurityRequirement security = 12;
+ // Custom properties that start with "x-" such as "x-foo" used to describe
+ // extra functionality that is not covered by the standard OpenAPI Specification.
+ // See: https://swagger.io/docs/specification/2-0/swagger-extensions/
map extensions = 13;
+ // Custom parameters such as HTTP request headers.
+ // See: https://swagger.io/docs/specification/2-0/describing-parameters/
+ // and https://swagger.io/specification/v2/#parameter-object.
+ Parameters parameters = 14;
+}
+
+// `Parameters` is a representation of OpenAPI v2 specification's parameters object.
+// Note: This technically breaks compatibility with the OpenAPI 2 definition structure as we only
+// allow header parameters to be set here since we do not want users specifying custom non-header
+// parameters beyond those inferred from the Protobuf schema.
+// See: https://swagger.io/specification/v2/#parameter-object
+message Parameters {
+ // `Headers` is one or more HTTP header parameter.
+ // See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
+ repeated HeaderParameter headers = 1;
+}
+
+// `HeaderParameter` a HTTP header parameter.
+// See: https://swagger.io/specification/v2/#parameter-object
+message HeaderParameter {
+ // `Type` is a a supported HTTP header type.
+ // See https://swagger.io/specification/v2/#parameterType.
+ enum Type {
+ UNKNOWN = 0;
+ STRING = 1;
+ NUMBER = 2;
+ INTEGER = 3;
+ BOOLEAN = 4;
+ }
+
+ // `Name` is the header name.
+ string name = 1;
+ // `Description` is a short description of the header.
+ string description = 2;
+ // `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
+ // See: https://swagger.io/specification/v2/#parameterType.
+ Type type = 3;
+ // `Format` The extending format for the previously mentioned type.
+ string format = 4;
+ // `Required` indicates if the header is optional
+ bool required = 5;
+ // field 6 is reserved for 'items', but in OpenAPI-specific way.
+ reserved 6;
+ // field 7 is reserved `Collection Format`. Determines the format of the array if type array is used.
+ reserved 7;
}
// `Header` is a representation of OpenAPI v2 specification's Header object.
@@ -235,6 +285,9 @@ message Response {
// `Examples` gives per-mimetype response examples.
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
map examples = 4;
+ // Custom properties that start with "x-" such as "x-foo" used to describe
+ // extra functionality that is not covered by the standard OpenAPI Specification.
+ // See: https://swagger.io/docs/specification/2-0/swagger-extensions/
map extensions = 5;
}
@@ -248,7 +301,7 @@ message Response {
// info: {
// title: "Echo API";
// version: "1.0";
-// description: ";
+// description: "";
// contact: {
// name: "gRPC-Gateway project";
// url: "https://github.com/grpc-ecosystem/grpc-gateway";
@@ -277,6 +330,9 @@ message Info {
// Provides the version of the application API (not to be confused
// with the specification version).
string version = 6;
+ // Custom properties that start with "x-" such as "x-foo" used to describe
+ // extra functionality that is not covered by the standard OpenAPI Specification.
+ // See: https://swagger.io/docs/specification/2-0/swagger-extensions/
map extensions = 7;
}
@@ -411,7 +467,7 @@ message Schema {
// // Id represents the message identifier.
// string id = 1; [
// (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
-// {description: "The unique identifier of the simple message."
+// description: "The unique identifier of the simple message."
// }];
// }
//
@@ -440,12 +496,12 @@ message JSONSchema {
// This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
string example = 9;
double multiple_of = 10;
- // Maximum represents an inclusive upper limit for a numeric instance. The
- // value of MUST be a number,
+ // Maximum represents an inclusive upper limit for a numeric instance. The
+ // value of MUST be a number,
double maximum = 11;
bool exclusive_maximum = 12;
- // minimum represents an inclusive lower limit for a numeric instance. The
- // value of MUST be a number,
+ // minimum represents an inclusive lower limit for a numeric instance. The
+ // value of MUST be a number,
double minimum = 13;
bool exclusive_minimum = 14;
uint64 max_length = 15;
@@ -493,7 +549,7 @@ message JSONSchema {
repeated JSONSchemaSimpleTypes type = 35;
// `Format`
string format = 36;
- // following fields are reserved, as the properties have been omitted from
+ // following fields are reserved, as the properties have been omitted from
// OpenAPI v2: contentMediaType, contentEncoding, if, then, else
reserved 37 to 41;
// field 42 is reserved for 'allOf', but in OpenAPI-specific way.
@@ -505,6 +561,23 @@ message JSONSchema {
reserved 43 to 45;
// Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
repeated string enum = 46;
+
+ // Additional field level properties used when generating the OpenAPI v2 file.
+ FieldConfiguration field_configuration = 1001;
+
+ // 'FieldConfiguration' provides additional field level properties used when generating the OpenAPI v2 file.
+ // These properties are not defined by OpenAPIv2, but they are used to control the generation.
+ message FieldConfiguration {
+ // Alternative parameter name when used as path parameter. If set, this will
+ // be used as the complete parameter name when this field is used as a path
+ // parameter. Use this to avoid having auto generated path parameter names
+ // for overlapping paths.
+ string path_param_name = 47;
+ }
+ // Custom properties that start with "x-" such as "x-foo" used to describe
+ // extra functionality that is not covered by the standard OpenAPI Specification.
+ // See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+ map extensions = 48;
}
// `Tag` is a representation of OpenAPI v2 specification's Tag object.
@@ -512,20 +585,19 @@ message JSONSchema {
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#tagObject
//
message Tag {
- // field 1 is reserved for 'name'. In our generator, this is (to be) extracted
- // from the name of proto service, and thus not exposed to the user, as
- // changing tag object's name would break the link to the references to the
- // tag in individual operation specifications.
- //
- // TODO(ivucica): Add 'name' property. Use it to allow override of the name of
+ // The name of the tag. Use it to allow override of the name of a
// global Tag object, then use that name to reference the tag throughout the
// OpenAPI file.
- reserved 1;
- // A short description for the tag. GFM syntax can be used for rich text
+ string name = 1;
+ // A short description for the tag. GFM syntax can be used for rich text
// representation.
string description = 2;
// Additional external documentation for this tag.
ExternalDocumentation external_docs = 3;
+ // Custom properties that start with "x-" such as "x-foo" used to describe
+ // extra functionality that is not covered by the standard OpenAPI Specification.
+ // See: https://swagger.io/docs/specification/2-0/swagger-extensions/
+ map extensions = 4;
}
// `SecurityDefinitions` is a representation of OpenAPI v2 specification's
@@ -605,6 +677,9 @@ message SecurityScheme {
// The available scopes for the OAuth2 security scheme.
// Valid for oauth2.
Scopes scopes = 8;
+ // Custom properties that start with "x-" such as "x-foo" used to describe
+ // extra functionality that is not covered by the standard OpenAPI Specification.
+ // See: https://swagger.io/docs/specification/2-0/swagger-extensions/
map extensions = 9;
}
diff --git a/protoc-gen-openapiv2/options/openapiv2.swagger.json b/protoc-gen-openapiv2/options/openapiv2.swagger.json
index c6aad71c90e..3f4f97c2da4 100644
--- a/protoc-gen-openapiv2/options/openapiv2.swagger.json
+++ b/protoc-gen-openapiv2/options/openapiv2.swagger.json
@@ -15,14 +15,11 @@
"protobufAny": {
"type": "object",
"properties": {
- "typeUrl": {
+ "@type": {
"type": "string"
- },
- "value": {
- "type": "string",
- "format": "byte"
}
- }
+ },
+ "additionalProperties": {}
},
"rpcStatus": {
"type": "object",
diff --git a/renovate.json b/renovate.json
index b731f05d871..59656d8638d 100644
--- a/renovate.json
+++ b/renovate.json
@@ -1,9 +1,9 @@
{
"extends": [
- "config:base"
+ "config:base",
+ "helpers:pinGitHubActionDigests"
],
"baseBranches": [
- "v1",
"master"
],
"postUpdateOptions": [
@@ -19,19 +19,6 @@
],
"automerge": true
},
- {
- "baseBranchList": [
- "v1"
- ],
- "packageNames": [
- "github.com/golang/protobuf",
- "google.golang.org/genproto",
- "io_bazel_rules_go",
- "golang.org/x/oauth2",
- "google.golang.org/grpc"
- ],
- "enabled": false
- },
{
"baseBranchList": [
"master"
@@ -48,6 +35,11 @@
"github-pages"
],
"enabled": false
+ },
+ {
+ "matchManagers": ["github-actions"],
+ "matchPackageNames": ["slsa-framework/slsa-github-generator"],
+ "pinDigests": false
}
]
}
diff --git a/repositories.bzl b/repositories.bzl
index 7af5b5f8c0e..8029051572e 100644
--- a/repositories.bzl
+++ b/repositories.bzl
@@ -4,8 +4,8 @@ def go_repositories():
go_repository(
name = "co_honnef_go_tools",
importpath = "honnef.co/go/tools",
- sum = "h1:UoveltGrhghAA7ePc+e+QYDHXrBps2PqFZiHkGR/xK8=",
- version = "v0.0.1-2020.1.4",
+ sum = "h1:/hemPrYIhOhy8zYrNj+069zDB68us2sMGsfkFJO0iZs=",
+ version = "v0.0.0-20190523083050-ea95bdfd59fc",
)
go_repository(
name = "com_github_alecthomas_template",
@@ -100,6 +100,12 @@ def go_repositories():
sum = "h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=",
version = "v1.1.0",
)
+ go_repository(
+ name = "com_github_cespare_xxhash_v2",
+ importpath = "github.com/cespare/xxhash/v2",
+ sum = "h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY=",
+ version = "v2.1.1",
+ )
go_repository(
name = "com_github_chzyer_logex",
@@ -129,9 +135,16 @@ def go_repositories():
go_repository(
name = "com_github_cncf_udpa_go",
importpath = "github.com/cncf/udpa/go",
- sum = "h1:cqQfy1jclcSy/FwLjemeg3SR1yaINm74aQyupQ0Bl8M=",
- version = "v0.0.0-20201120205902-5459f2c99403",
+ sum = "h1:hzAQntlaYRkVSFEfj9OTWlVV1H155FMD8BTKktLv0QI=",
+ version = "v0.0.0-20210930031921-04548b0d99d4",
+ )
+ go_repository(
+ name = "com_github_cncf_xds_go",
+ importpath = "github.com/cncf/xds/go",
+ sum = "h1:zH8ljVhhq7yC0MIeUL/IviMtY8hx2mK8cN9wEYb8ggw=",
+ version = "v0.0.0-20211011173535-cb28da3451f1",
)
+
go_repository(
name = "com_github_coreos_bbolt",
importpath = "github.com/coreos/bbolt",
@@ -172,8 +185,8 @@ def go_repositories():
go_repository(
name = "com_github_davecgh_go_spew",
importpath = "github.com/davecgh/go-spew",
- sum = "h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=",
- version = "v1.1.1",
+ sum = "h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=",
+ version = "v1.1.0",
)
go_repository(
name = "com_github_dgrijalva_jwt_go",
@@ -191,8 +204,8 @@ def go_repositories():
go_repository(
name = "com_github_envoyproxy_go_control_plane",
importpath = "github.com/envoyproxy/go-control-plane",
- sum = "h1:QyzYnTnPE15SQyUeqU6qLbWxMkwyAyu+vGksa0b7j00=",
- version = "v0.9.9-0.20210217033140-668b12f5399d",
+ sum = "h1:xvqufLtNVwAhN8NMyWklVgxnWohi+wtMGQMhtxexlm0=",
+ version = "v0.10.2-0.20220325020618-49ff273808a1",
)
go_repository(
name = "com_github_envoyproxy_protoc_gen_validate",
@@ -272,8 +285,8 @@ def go_repositories():
go_repository(
name = "com_github_golang_glog",
importpath = "github.com/golang/glog",
- sum = "h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58=",
- version = "v0.0.0-20160126235308-23def4e6c14b",
+ sum = "h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ=",
+ version = "v1.0.0",
)
go_repository(
@@ -285,8 +298,8 @@ def go_repositories():
go_repository(
name = "com_github_golang_mock",
importpath = "github.com/golang/mock",
- sum = "h1:l75CXGRSwbaYNpl/Z2X1XIIAMSCquvXgpVZDhwEIJsc=",
- version = "v1.4.4",
+ sum = "h1:G5FRp8JnTd7RQH5kemVNlMeyXQAztQ3mOWV95KxsXH8=",
+ version = "v1.1.1",
)
go_repository(
name = "com_github_golang_protobuf",
@@ -304,8 +317,8 @@ def go_repositories():
go_repository(
name = "com_github_google_go_cmp",
importpath = "github.com/google/go-cmp",
- sum = "h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=",
- version = "v0.5.5",
+ sum = "h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=",
+ version = "v0.5.9",
)
go_repository(
@@ -378,8 +391,8 @@ def go_repositories():
go_repository(
name = "com_github_grpc_ecosystem_grpc_gateway",
importpath = "github.com/grpc-ecosystem/grpc-gateway",
- sum = "h1:bM6ZAFZmc/wPFaRDi0d5L7hGEZEx/2u+Tmr2evNHDiI=",
- version = "v1.9.0",
+ sum = "h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo=",
+ version = "v1.16.0",
)
go_repository(
name = "com_github_hashicorp_consul_api",
@@ -874,8 +887,8 @@ def go_repositories():
go_repository(
name = "com_github_stretchr_objx",
importpath = "github.com/stretchr/objx",
- sum = "h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A=",
- version = "v0.1.1",
+ sum = "h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4=",
+ version = "v0.1.0",
)
go_repository(
name = "com_github_stretchr_testify",
@@ -911,34 +924,519 @@ def go_repositories():
go_repository(
name = "com_github_yuin_goldmark",
importpath = "github.com/yuin/goldmark",
- sum = "h1:ruQGxdhGHe7FWOJPT0mKs5+pD2Xs1Bm/kdGlHO04FmM=",
- version = "v1.2.1",
+ sum = "h1:5tjfNdR2ki3yYQ842+eX2sQHeiwpKJ0RnHO4IYOc4V8=",
+ version = "v1.1.32",
)
go_repository(
name = "com_google_cloud_go",
importpath = "cloud.google.com/go",
- sum = "h1:Dg9iHVQfrhq82rUNu9ZxUDrJLaxFUe/HlCVaLyRruq8=",
- version = "v0.65.0",
+ sum = "h1:DNtEKRBAAzeS4KyIory52wWHuClNaXJ5x1F7xa4q+5Y=",
+ version = "v0.105.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_accessapproval",
+ importpath = "cloud.google.com/go/accessapproval",
+ sum = "h1:/nTivgnV/n1CaAeo+ekGexTYUsKEU9jUVkoY5359+3Q=",
+ version = "v1.5.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_accesscontextmanager",
+ importpath = "cloud.google.com/go/accesscontextmanager",
+ sum = "h1:CFhNhU7pcD11cuDkQdrE6PQJgv0EXNKNv06jIzbLlCU=",
+ version = "v1.4.0",
+ )
+
+ go_repository(
+ name = "com_google_cloud_go_aiplatform",
+ importpath = "cloud.google.com/go/aiplatform",
+ sum = "h1:QqHZT1IMldf/daXoSnkJWBIqGBsw50X+xP6HSVzLRPo=",
+ version = "v1.24.0",
+ )
+
+ go_repository(
+ name = "com_google_cloud_go_analytics",
+ importpath = "cloud.google.com/go/analytics",
+ sum = "h1:NKw6PpQi6V1O+KsjuTd+bhip9d0REYu4NevC45vtGp8=",
+ version = "v0.12.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_apigateway",
+ importpath = "cloud.google.com/go/apigateway",
+ sum = "h1:IIoXKR7FKrEAQhMTz5hK2wiDz2WNFHS7eVr/L1lE/rM=",
+ version = "v1.4.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_apigeeconnect",
+ importpath = "cloud.google.com/go/apigeeconnect",
+ sum = "h1:AONoTYJviyv1vS4IkvWzq69gEVdvHx35wKXc+e6wjZQ=",
+ version = "v1.4.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_appengine",
+ importpath = "cloud.google.com/go/appengine",
+ sum = "h1:lmG+O5oaR9xNwaRBwE2XoMhwQHsHql5IoiGr1ptdDwU=",
+ version = "v1.5.0",
+ )
+
+ go_repository(
+ name = "com_google_cloud_go_area120",
+ importpath = "cloud.google.com/go/area120",
+ sum = "h1:TCMhwWEWhCn8d44/Zs7UCICTWje9j3HuV6nVGMjdpYw=",
+ version = "v0.6.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_artifactregistry",
+ importpath = "cloud.google.com/go/artifactregistry",
+ sum = "h1:3d0LRAU1K6vfqCahhl9fx2oGHcq+s5gftdix4v8Ibrc=",
+ version = "v1.9.0",
+ )
+
+ go_repository(
+ name = "com_google_cloud_go_asset",
+ importpath = "cloud.google.com/go/asset",
+ sum = "h1:aCrlaLGJWTODJX4G56ZYzJefITKEWNfbjjtHSzWpxW0=",
+ version = "v1.10.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_assuredworkloads",
+ importpath = "cloud.google.com/go/assuredworkloads",
+ sum = "h1:hhIdCOowsT1GG5eMCIA0OwK6USRuYTou/1ZeNxCSRtA=",
+ version = "v1.9.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_automl",
+ importpath = "cloud.google.com/go/automl",
+ sum = "h1:BMioyXSbg7d7xLibn47cs0elW6RT780IUWr42W8rp2Q=",
+ version = "v1.8.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_baremetalsolution",
+ importpath = "cloud.google.com/go/baremetalsolution",
+ sum = "h1:g9KO6SkakcYPcc/XjAzeuUrEOXlYPnMpuiaywYaGrmQ=",
+ version = "v0.4.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_batch",
+ importpath = "cloud.google.com/go/batch",
+ sum = "h1:1jvEBY55OH4Sd2FxEXQfxGExFWov1A/IaRe+Z5Z71Fw=",
+ version = "v0.4.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_beyondcorp",
+ importpath = "cloud.google.com/go/beyondcorp",
+ sum = "h1:w+4kThysgl0JiKshi2MKDCg2NZgOyqOI0wq2eBZyrzA=",
+ version = "v0.3.0",
)
go_repository(
name = "com_google_cloud_go_bigquery",
importpath = "cloud.google.com/go/bigquery",
- sum = "h1:PQcPefKFdaIzjQFbiyOgAqyx8q5djaE7x9Sqe712DPA=",
+ sum = "h1:u0fvz5ysJBe1jwUPI4LuPwAX+o+6fCUwf3ECeg6eDUQ=",
+ version = "v1.43.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_billing",
+ importpath = "cloud.google.com/go/billing",
+ sum = "h1:Xkii76HWELHwBtkQVZvqmSo9GTr0O+tIbRNnMcGdlg4=",
+ version = "v1.7.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_binaryauthorization",
+ importpath = "cloud.google.com/go/binaryauthorization",
+ sum = "h1:pL70vXWn9TitQYXBWTK2abHl2JHLwkFRjYw6VflRqEA=",
+ version = "v1.4.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_certificatemanager",
+ importpath = "cloud.google.com/go/certificatemanager",
+ sum = "h1:tzbR4UHBbgsewMWUD93JHi8EBi/gHBoSAcY1/sThFGk=",
+ version = "v1.4.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_channel",
+ importpath = "cloud.google.com/go/channel",
+ sum = "h1:pNuUlZx0Jb0Ts9P312bmNMuH5IiFWIR4RUtLb70Ke5s=",
+ version = "v1.9.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_cloudbuild",
+ importpath = "cloud.google.com/go/cloudbuild",
+ sum = "h1:TAAmCmAlOJ4uNBu6zwAjwhyl/7fLHHxIEazVhr3QBbQ=",
+ version = "v1.4.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_clouddms",
+ importpath = "cloud.google.com/go/clouddms",
+ sum = "h1:UhzHIlgFfMr6luVYVNydw/pl9/U5kgtjCMJHnSvoVws=",
+ version = "v1.4.0",
+ )
+
+ go_repository(
+ name = "com_google_cloud_go_cloudtasks",
+ importpath = "cloud.google.com/go/cloudtasks",
+ sum = "h1:faUiUgXjW8yVZ7XMnKHKm1WE4OldPBUWWfIRN/3z1dc=",
version = "v1.8.0",
)
+
+ go_repository(
+ name = "com_google_cloud_go_compute",
+ importpath = "cloud.google.com/go/compute",
+ sum = "h1:v/k9Eueb8aAJ0vZuxKMrgm6kPhCLZU9HxFU+AFDs9Uk=",
+ version = "v1.7.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_compute_metadata",
+ importpath = "cloud.google.com/go/compute/metadata",
+ sum = "h1:nBbNSZyDpkNlo3DepaaLKVuO7ClyifSAmNloSCZrHnQ=",
+ version = "v0.2.0",
+ )
+
+ go_repository(
+ name = "com_google_cloud_go_contactcenterinsights",
+ importpath = "cloud.google.com/go/contactcenterinsights",
+ sum = "h1:tTQLI/ZvguUf9Hv+36BkG2+/PeC8Ol1q4pBW+tgCx0A=",
+ version = "v1.4.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_container",
+ importpath = "cloud.google.com/go/container",
+ sum = "h1:nbEK/59GyDRKKlo1SqpohY1TK8LmJ2XNcvS9Gyom2A0=",
+ version = "v1.7.0",
+ )
+
+ go_repository(
+ name = "com_google_cloud_go_containeranalysis",
+ importpath = "cloud.google.com/go/containeranalysis",
+ sum = "h1:2824iym832ljKdVpCBnpqm5K94YT/uHTVhNF+dRTXPI=",
+ version = "v0.6.0",
+ )
+
+ go_repository(
+ name = "com_google_cloud_go_datacatalog",
+ importpath = "cloud.google.com/go/datacatalog",
+ sum = "h1:6kZ4RIOW/uT7QWC5SfPfq/G8sYzr/v+UOmOAxy4Z1TE=",
+ version = "v1.8.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_dataflow",
+ importpath = "cloud.google.com/go/dataflow",
+ sum = "h1:CW3541Fm7KPTyZjJdnX6NtaGXYFn5XbFC5UcjgALKvU=",
+ version = "v0.7.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_dataform",
+ importpath = "cloud.google.com/go/dataform",
+ sum = "h1:vLwowLF2ZB5J5gqiZCzv076lDI/Rd7zYQQFu5XO1PSg=",
+ version = "v0.5.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_datafusion",
+ importpath = "cloud.google.com/go/datafusion",
+ sum = "h1:j5m2hjWovTZDTQak4MJeXAR9yN7O+zMfULnjGw/OOLg=",
+ version = "v1.5.0",
+ )
+
+ go_repository(
+ name = "com_google_cloud_go_datalabeling",
+ importpath = "cloud.google.com/go/datalabeling",
+ sum = "h1:dp8jOF21n/7jwgo/uuA0RN8hvLcKO4q6s/yvwevs2ZM=",
+ version = "v0.6.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_dataplex",
+ importpath = "cloud.google.com/go/dataplex",
+ sum = "h1:cNxeA2DiWliQGi21kPRqnVeQ5xFhNoEjPRt1400Pm8Y=",
+ version = "v1.4.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_dataproc",
+ importpath = "cloud.google.com/go/dataproc",
+ sum = "h1:gVOqNmElfa6n/ccG/QDlfurMWwrK3ezvy2b2eDoCmS0=",
+ version = "v1.8.0",
+ )
+
+ go_repository(
+ name = "com_google_cloud_go_dataqna",
+ importpath = "cloud.google.com/go/dataqna",
+ sum = "h1:gx9jr41ytcA3dXkbbd409euEaWtofCVXYBvJz3iYm18=",
+ version = "v0.6.0",
+ )
+
go_repository(
name = "com_google_cloud_go_datastore",
importpath = "cloud.google.com/go/datastore",
sum = "h1:/May9ojXjRkPBNVrq+oWLqmWCkr4OU5uRY29bu0mRyQ=",
version = "v1.1.0",
)
+ go_repository(
+ name = "com_google_cloud_go_datastream",
+ importpath = "cloud.google.com/go/datastream",
+ sum = "h1:PgIgbhedBtYBU6POGXFMn2uSl9vpqubc3ewTNdcU8Mk=",
+ version = "v1.5.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_deploy",
+ importpath = "cloud.google.com/go/deploy",
+ sum = "h1:kI6dxt8Ml0is/x7YZjLveTvR7YPzXAUD/8wQZ2nH5zA=",
+ version = "v1.5.0",
+ )
+
+ go_repository(
+ name = "com_google_cloud_go_dialogflow",
+ importpath = "cloud.google.com/go/dialogflow",
+ sum = "h1:HYHVOkoxQ9bSfNIelSZYNAtUi4CeSrCnROyOsbOqPq8=",
+ version = "v1.19.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_dlp",
+ importpath = "cloud.google.com/go/dlp",
+ sum = "h1:9I4BYeJSVKoSKgjr70fLdRDumqcUeVmHV4fd5f9LR6Y=",
+ version = "v1.7.0",
+ )
+
+ go_repository(
+ name = "com_google_cloud_go_documentai",
+ importpath = "cloud.google.com/go/documentai",
+ sum = "h1:jfq09Fdjtnpnmt/MLyf6A3DM3ynb8B2na0K+vSXvpFM=",
+ version = "v1.10.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_domains",
+ importpath = "cloud.google.com/go/domains",
+ sum = "h1:pu3JIgC1rswIqi5romW0JgNO6CTUydLYX8zyjiAvO1c=",
+ version = "v0.7.0",
+ )
+
+ go_repository(
+ name = "com_google_cloud_go_edgecontainer",
+ importpath = "cloud.google.com/go/edgecontainer",
+ sum = "h1:hd6J2n5dBBRuAqnNUEsKWrp6XNPKsaxwwIyzOPZTokk=",
+ version = "v0.2.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_essentialcontacts",
+ importpath = "cloud.google.com/go/essentialcontacts",
+ sum = "h1:b6csrQXCHKQmfo9h3dG/pHyoEh+fQG1Yg78a53LAviY=",
+ version = "v1.4.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_eventarc",
+ importpath = "cloud.google.com/go/eventarc",
+ sum = "h1:AgCqrmMMIcel5WWKkzz5EkCUKC3Rl5LNMMYsS+LvsI0=",
+ version = "v1.8.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_filestore",
+ importpath = "cloud.google.com/go/filestore",
+ sum = "h1:yjKOpzvqtDmL5AXbKttLc8j0hL20kuC1qPdy5HPcxp0=",
+ version = "v1.4.0",
+ )
+
go_repository(
name = "com_google_cloud_go_firestore",
importpath = "cloud.google.com/go/firestore",
sum = "h1:9x7Bx0A9R5/M9jibeJeZWqjeVEIxYW9fZYqB9a70/bY=",
version = "v1.1.0",
)
+ go_repository(
+ name = "com_google_cloud_go_functions",
+ importpath = "cloud.google.com/go/functions",
+ sum = "h1:35tgv1fQOtvKqH/uxJMzX3w6usneJ0zXpsFr9KAVhNE=",
+ version = "v1.9.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_gaming",
+ importpath = "cloud.google.com/go/gaming",
+ sum = "h1:97OAEQtDazAJD7yh/kvQdSCQuTKdR0O+qWAJBZJ4xiA=",
+ version = "v1.8.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_gkebackup",
+ importpath = "cloud.google.com/go/gkebackup",
+ sum = "h1:4K+jiv4ocqt1niN8q5Imd8imRoXBHTrdnJVt/uFFxF4=",
+ version = "v0.3.0",
+ )
+
+ go_repository(
+ name = "com_google_cloud_go_gkeconnect",
+ importpath = "cloud.google.com/go/gkeconnect",
+ sum = "h1:zAcvDa04tTnGdu6TEZewaLN2tdMtUOJJ7fEceULjguA=",
+ version = "v0.6.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_gkehub",
+ importpath = "cloud.google.com/go/gkehub",
+ sum = "h1:JTcTaYQRGsVm+qkah7WzHb6e9sf1C0laYdRPn9aN+vg=",
+ version = "v0.10.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_gkemulticloud",
+ importpath = "cloud.google.com/go/gkemulticloud",
+ sum = "h1:8F1NhJj8ucNj7lK51UZMtAjSWTgP1zO18XF6vkfiPPU=",
+ version = "v0.4.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_gsuiteaddons",
+ importpath = "cloud.google.com/go/gsuiteaddons",
+ sum = "h1:TGT2oGmO5q3VH6SjcrlgPUWI0njhYv4kywLm6jag0to=",
+ version = "v1.4.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_iam",
+ importpath = "cloud.google.com/go/iam",
+ sum = "h1:k4MuwOsS7zGJJ+QfZ5vBK8SgHBAvYN/23BWsiihJ1vs=",
+ version = "v0.7.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_iap",
+ importpath = "cloud.google.com/go/iap",
+ sum = "h1:BGEXovwejOCt1zDk8hXq0bOhhRu9haXKWXXXp2B4wBM=",
+ version = "v1.5.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_ids",
+ importpath = "cloud.google.com/go/ids",
+ sum = "h1:LncHK4HHucb5Du310X8XH9/ICtMwZ2PCfK0ScjWiJoY=",
+ version = "v1.2.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_iot",
+ importpath = "cloud.google.com/go/iot",
+ sum = "h1:Y9+oZT9jD4GUZzORXTU45XsnQrhxmDT+TFbPil6pRVQ=",
+ version = "v1.4.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_kms",
+ importpath = "cloud.google.com/go/kms",
+ sum = "h1:OWRZzrPmOZUzurjI2FBGtgY2mB1WaJkqhw6oIwSj0Yg=",
+ version = "v1.6.0",
+ )
+
+ go_repository(
+ name = "com_google_cloud_go_language",
+ importpath = "cloud.google.com/go/language",
+ sum = "h1:3Wa+IUMamL4JH3Zd3cDZUHpwyqplTACt6UZKRD2eCL4=",
+ version = "v1.8.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_lifesciences",
+ importpath = "cloud.google.com/go/lifesciences",
+ sum = "h1:tIqhivE2LMVYkX0BLgG7xL64oNpDaFFI7teunglt1tI=",
+ version = "v0.6.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_longrunning",
+ importpath = "cloud.google.com/go/longrunning",
+ sum = "h1:NjljC+FYPV3uh5/OwWT6pVU+doBqMg2x/rZlE+CamDs=",
+ version = "v0.3.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_managedidentities",
+ importpath = "cloud.google.com/go/managedidentities",
+ sum = "h1:3Kdajn6X25yWQFhFCErmKSYTSvkEd3chJROny//F1A0=",
+ version = "v1.4.0",
+ )
+
+ go_repository(
+ name = "com_google_cloud_go_mediatranslation",
+ importpath = "cloud.google.com/go/mediatranslation",
+ sum = "h1:qAJzpxmEX+SeND10Y/4868L5wfZpo4Y3BIEnIieP4dk=",
+ version = "v0.6.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_memcache",
+ importpath = "cloud.google.com/go/memcache",
+ sum = "h1:yLxUzJkZVSH2kPaHut7k+7sbIBFpvSh1LW9qjM2JDjA=",
+ version = "v1.7.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_metastore",
+ importpath = "cloud.google.com/go/metastore",
+ sum = "h1:3KcShzqWdqxrDEXIBWpYJpOOrgpDj+HlBi07Grot49Y=",
+ version = "v1.8.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_monitoring",
+ importpath = "cloud.google.com/go/monitoring",
+ sum = "h1:c9riaGSPQ4dUKWB+M1Fl0N+iLxstMbCktdEwYSPGDvA=",
+ version = "v1.8.0",
+ )
+
+ go_repository(
+ name = "com_google_cloud_go_networkconnectivity",
+ importpath = "cloud.google.com/go/networkconnectivity",
+ sum = "h1:BVdIKaI68bihnXGdCVL89Jsg9kq2kg+II30fjVqo62E=",
+ version = "v1.7.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_networkmanagement",
+ importpath = "cloud.google.com/go/networkmanagement",
+ sum = "h1:mDHA3CDW00imTvC5RW6aMGsD1bH+FtKwZm/52BxaiMg=",
+ version = "v1.5.0",
+ )
+
+ go_repository(
+ name = "com_google_cloud_go_networksecurity",
+ importpath = "cloud.google.com/go/networksecurity",
+ sum = "h1:qDEX/3sipg9dS5JYsAY+YvgTjPR63cozzAWop8oZS94=",
+ version = "v0.6.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_notebooks",
+ importpath = "cloud.google.com/go/notebooks",
+ sum = "h1:AC8RPjNvel3ExgXjO1YOAz+teg9+j+89TNxa7pIZfww=",
+ version = "v1.5.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_optimization",
+ importpath = "cloud.google.com/go/optimization",
+ sum = "h1:7PxOq9VTT7TMib/6dMoWpMvWS2E4dJEvtYzjvBreaec=",
+ version = "v1.2.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_orchestration",
+ importpath = "cloud.google.com/go/orchestration",
+ sum = "h1:39d6tqvNjd/wsSub1Bn4cEmrYcet5Ur6xpaN+SxOxtY=",
+ version = "v1.4.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_orgpolicy",
+ importpath = "cloud.google.com/go/orgpolicy",
+ sum = "h1:erF5PHqDZb6FeFrUHiYj2JK2BMhsk8CyAg4V4amJ3rE=",
+ version = "v1.5.0",
+ )
+
+ go_repository(
+ name = "com_google_cloud_go_osconfig",
+ importpath = "cloud.google.com/go/osconfig",
+ sum = "h1:NO0RouqCOM7M2S85Eal6urMSSipWwHU8evzwS+siqUI=",
+ version = "v1.10.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_oslogin",
+ importpath = "cloud.google.com/go/oslogin",
+ sum = "h1:pKGDPfeZHDybtw48WsnVLjoIPMi9Kw62kUE5TXCLCN4=",
+ version = "v1.7.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_phishingprotection",
+ importpath = "cloud.google.com/go/phishingprotection",
+ sum = "h1:OrwHLSRSZyaiOt3tnY33dsKSedxbMzsXvqB21okItNQ=",
+ version = "v0.6.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_policytroubleshooter",
+ importpath = "cloud.google.com/go/policytroubleshooter",
+ sum = "h1:NQklJuOUoz1BPP+Epjw81COx7IISWslkZubz/1i0UN8=",
+ version = "v1.4.0",
+ )
+
+ go_repository(
+ name = "com_google_cloud_go_privatecatalog",
+ importpath = "cloud.google.com/go/privatecatalog",
+ sum = "h1:Vz86uiHCtNGm1DeC32HeG2VXmOq5JRYA3VRPf8ZEcSg=",
+ version = "v0.6.0",
+ )
go_repository(
name = "com_google_cloud_go_pubsub",
@@ -946,12 +1444,215 @@ def go_repositories():
sum = "h1:ukjixP1wl0LpnZ6LWtZJ0mX5tBmjp1f8Sqer8Z2OMUU=",
version = "v1.3.1",
)
+ go_repository(
+ name = "com_google_cloud_go_recaptchaenterprise_v2",
+ importpath = "cloud.google.com/go/recaptchaenterprise/v2",
+ sum = "h1:UqzFfb/WvhwXGDF1eQtdHLrmni+iByZXY4h3w9Kdyv8=",
+ version = "v2.5.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_recommendationengine",
+ importpath = "cloud.google.com/go/recommendationengine",
+ sum = "h1:6w+WxPf2LmUEqX0YyvfCoYb8aBYOcbIV25Vg6R0FLGw=",
+ version = "v0.6.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_recommender",
+ importpath = "cloud.google.com/go/recommender",
+ sum = "h1:9kMZQGeYfcOD/RtZfcNKGKtoex3DdoB4zRgYU/WaIwE=",
+ version = "v1.8.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_redis",
+ importpath = "cloud.google.com/go/redis",
+ sum = "h1:/zTwwBKIAD2DEWTrXZp8WD9yD/gntReF/HkPssVYd0U=",
+ version = "v1.10.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_resourcemanager",
+ importpath = "cloud.google.com/go/resourcemanager",
+ sum = "h1:NDao6CHMwEZIaNsdWy+tuvHaavNeGP06o1tgrR0kLvU=",
+ version = "v1.4.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_resourcesettings",
+ importpath = "cloud.google.com/go/resourcesettings",
+ sum = "h1:eTzOwB13WrfF0kuzG2ZXCfB3TLunSHBur4s+HFU6uSM=",
+ version = "v1.4.0",
+ )
+
+ go_repository(
+ name = "com_google_cloud_go_retail",
+ importpath = "cloud.google.com/go/retail",
+ sum = "h1:N9fa//ecFUOEPsW/6mJHfcapPV0wBSwIUwpVZB7MQ3o=",
+ version = "v1.11.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_run",
+ importpath = "cloud.google.com/go/run",
+ sum = "h1:AWPuzU7Xtaj3Jf+QarDWIs6AJ5hM1VFQ+F6Q+VZ6OT4=",
+ version = "v0.3.0",
+ )
+
+ go_repository(
+ name = "com_google_cloud_go_scheduler",
+ importpath = "cloud.google.com/go/scheduler",
+ sum = "h1:K/mxOewgHGeKuATUJNGylT75Mhtjmx1TOkKukATqMT8=",
+ version = "v1.7.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_secretmanager",
+ importpath = "cloud.google.com/go/secretmanager",
+ sum = "h1:xE6uXljAC1kCR8iadt9+/blg1fvSbmenlsDN4fT9gqw=",
+ version = "v1.9.0",
+ )
+
+ go_repository(
+ name = "com_google_cloud_go_security",
+ importpath = "cloud.google.com/go/security",
+ sum = "h1:KSKzzJMyUoMRQzcz7azIgqAUqxo7rmQ5rYvimMhikqg=",
+ version = "v1.10.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_securitycenter",
+ importpath = "cloud.google.com/go/securitycenter",
+ sum = "h1:QTVtk/Reqnx2bVIZtJKm1+mpfmwRwymmNvlaFez7fQY=",
+ version = "v1.16.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_servicecontrol",
+ importpath = "cloud.google.com/go/servicecontrol",
+ sum = "h1:ImIzbOu6y4jL6ob65I++QzvqgFaoAKgHOG+RU9/c4y8=",
+ version = "v1.5.0",
+ )
+
+ go_repository(
+ name = "com_google_cloud_go_servicedirectory",
+ importpath = "cloud.google.com/go/servicedirectory",
+ sum = "h1:f7M8IMcVzO3T425AqlZbP3yLzeipsBHtRza8vVFYMhQ=",
+ version = "v1.7.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_servicemanagement",
+ importpath = "cloud.google.com/go/servicemanagement",
+ sum = "h1:TpkCO5M7dhKSy1bKUD9o/sSEW/U1Gtx7opA1fsiMx0c=",
+ version = "v1.5.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_serviceusage",
+ importpath = "cloud.google.com/go/serviceusage",
+ sum = "h1:b0EwJxPJLpavSljMQh0RcdHsUrr5DQ+Nelt/3BAs5ro=",
+ version = "v1.4.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_shell",
+ importpath = "cloud.google.com/go/shell",
+ sum = "h1:b1LFhFBgKsG252inyhtmsUUZwchqSz3WTvAIf3JFo4g=",
+ version = "v1.4.0",
+ )
+
+ go_repository(
+ name = "com_google_cloud_go_speech",
+ importpath = "cloud.google.com/go/speech",
+ sum = "h1:yK0ocnFH4Wsf0cMdUyndJQ/hPv02oTJOxzi6AgpBy4s=",
+ version = "v1.9.0",
+ )
+
go_repository(
name = "com_google_cloud_go_storage",
importpath = "cloud.google.com/go/storage",
sum = "h1:STgFzyU5/8miMl0//zKh2aQeTyeaUH3WN9bSUiJ09bA=",
version = "v1.10.0",
)
+ go_repository(
+ name = "com_google_cloud_go_storagetransfer",
+ importpath = "cloud.google.com/go/storagetransfer",
+ sum = "h1:fUe3OydbbvHcAYp07xY+2UpH4AermGbmnm7qdEj3tGE=",
+ version = "v1.6.0",
+ )
+
+ go_repository(
+ name = "com_google_cloud_go_talent",
+ importpath = "cloud.google.com/go/talent",
+ sum = "h1:MrekAGxLqAeAol4Sc0allOVqUGO8j+Iim8NMvpiD7tM=",
+ version = "v1.4.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_texttospeech",
+ importpath = "cloud.google.com/go/texttospeech",
+ sum = "h1:ccPiHgTewxgyAeCWgQWvZvrLmbfQSFABTMAfrSPLPyY=",
+ version = "v1.5.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_tpu",
+ importpath = "cloud.google.com/go/tpu",
+ sum = "h1:ztIdKoma1Xob2qm6QwNh4Xi9/e7N3IfvtwG5AcNsj1g=",
+ version = "v1.4.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_trace",
+ importpath = "cloud.google.com/go/trace",
+ sum = "h1:qO9eLn2esajC9sxpqp1YKX37nXC3L4BfGnPS0Cx9dYo=",
+ version = "v1.4.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_translate",
+ importpath = "cloud.google.com/go/translate",
+ sum = "h1:AOYOH3MspzJ/bH1YXzB+xTE8fMpn3mwhLjugwGXvMPI=",
+ version = "v1.4.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_video",
+ importpath = "cloud.google.com/go/video",
+ sum = "h1:ttlvO4J5c1VGq6FkHqWPD/aH6PfdxujHt+muTJlW1Zk=",
+ version = "v1.9.0",
+ )
+
+ go_repository(
+ name = "com_google_cloud_go_videointelligence",
+ importpath = "cloud.google.com/go/videointelligence",
+ sum = "h1:RPFgVVXbI2b5vnrciZjtsUgpNKVtHO/WIyXUhEfuMhA=",
+ version = "v1.9.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_vision_v2",
+ importpath = "cloud.google.com/go/vision/v2",
+ sum = "h1:TQHxRqvLMi19azwm3qYuDbEzZWmiKJNTpGbkNsfRCik=",
+ version = "v2.5.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_vmmigration",
+ importpath = "cloud.google.com/go/vmmigration",
+ sum = "h1:A2Tl2ZmwMRpvEmhV2ibISY85fmQR+Y5w9a0PlRz5P3s=",
+ version = "v1.3.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_vpcaccess",
+ importpath = "cloud.google.com/go/vpcaccess",
+ sum = "h1:woHXXtnW8b9gLFdWO9HLPalAddBQ9V4LT+1vjKwR3W8=",
+ version = "v1.5.0",
+ )
+
+ go_repository(
+ name = "com_google_cloud_go_webrisk",
+ importpath = "cloud.google.com/go/webrisk",
+ sum = "h1:ypSnpGlJnZSXbN9a13PDmAYvVekBLnGKxQ3Q9SMwnYY=",
+ version = "v1.7.0",
+ )
+ go_repository(
+ name = "com_google_cloud_go_websecurityscanner",
+ importpath = "cloud.google.com/go/websecurityscanner",
+ sum = "h1:y7yIFg/h/mO+5Y5aCOtVAnpGUOgqCH5rXQ2Oc8Oq2+g=",
+ version = "v1.4.0",
+ )
+
+ go_repository(
+ name = "com_google_cloud_go_workflows",
+ importpath = "cloud.google.com/go/workflows",
+ sum = "h1:7Chpin9p50NTU8Tb7qk+I11U/IwVXmDhEoSsdccvInE=",
+ version = "v1.9.0",
+ )
+
go_repository(
name = "com_shuralyov_dmitri_gpu_mtl",
importpath = "dmitri.shuralyov.com/gpu/mtl",
@@ -994,14 +1695,14 @@ def go_repositories():
go_repository(
name = "in_gopkg_yaml_v2",
importpath = "gopkg.in/yaml.v2",
- sum = "h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=",
- version = "v2.3.0",
+ sum = "h1:fvjTMHxHEw/mxHbtzPi3JCcKXQRAnQTBRo6YCJSVHKI=",
+ version = "v2.2.3",
)
go_repository(
name = "in_gopkg_yaml_v3",
importpath = "gopkg.in/yaml.v3",
- sum = "h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=",
- version = "v3.0.0-20210107192922-496545a6307b",
+ sum = "h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=",
+ version = "v3.0.1",
)
go_repository(
name = "io_etcd_go_bbolt",
@@ -1013,9 +1714,16 @@ def go_repositories():
go_repository(
name = "io_opencensus_go",
importpath = "go.opencensus.io",
- sum = "h1:BdkrbWrzDlV9dnbzoP7sfN+dHheJ4J9JOaYxcUDL+ok=",
- version = "v0.22.6",
+ sum = "h1:LYy1Hy3MJdrCdMwwzxA/dRok4ejH+RwNGbuoD9fCjto=",
+ version = "v0.22.4",
)
+ go_repository(
+ name = "io_opentelemetry_go_proto_otlp",
+ importpath = "go.opentelemetry.io/proto/otlp",
+ sum = "h1:rwOQPCuKAKmwGKq2aVNnYIibI6wnV7EvzgfTCzcdGg8=",
+ version = "v0.7.0",
+ )
+
go_repository(
name = "io_rsc_binaryregexp",
importpath = "rsc.io/binaryregexp",
@@ -1043,20 +1751,20 @@ def go_repositories():
go_repository(
name = "org_golang_google_appengine",
importpath = "google.golang.org/appengine",
- sum = "h1:lMO5rYAqUxkmaj76jAkRUvt5JZgFymx/+Q5Mzfivuhc=",
- version = "v1.6.6",
+ sum = "h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c=",
+ version = "v1.6.7",
)
go_repository(
name = "org_golang_google_genproto",
importpath = "google.golang.org/genproto",
- sum = "h1:KMgpo2lWy1vfrYjtxPAzR0aNWeAR1UdQykt6sj/hpBY=",
- version = "v0.0.0-20210426193834-eac7f76ac494",
+ sum = "h1:a2S6M0+660BgMNl++4JPlcAO/CjkqYItDEZwkoDQK7c=",
+ version = "v0.0.0-20221118155620-16455021b5e6",
)
go_repository(
name = "org_golang_google_grpc",
importpath = "google.golang.org/grpc",
- sum = "h1:uSZWeQJX5j11bIQ4AJoj+McDBo29cY1MCoC1wO3ts+c=",
- version = "v1.37.0",
+ sum = "h1:E1eGv1FTqoLIdnBCZufiSHgKjlqG6fKFf6pPWtMTh8U=",
+ version = "v1.51.0",
)
go_repository(
@@ -1068,20 +1776,20 @@ def go_repositories():
go_repository(
name = "org_golang_google_protobuf",
importpath = "google.golang.org/protobuf",
- sum = "h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk=",
- version = "v1.26.0",
+ sum = "h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=",
+ version = "v1.28.1",
)
go_repository(
name = "org_golang_x_crypto",
importpath = "golang.org/x/crypto",
- sum = "h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI=",
- version = "v0.0.0-20200622213623-75b288015ac9",
+ sum = "h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M=",
+ version = "v0.0.0-20190308221718-c2843e01d9a2",
)
go_repository(
name = "org_golang_x_exp",
importpath = "golang.org/x/exp",
- sum = "h1:QE6XYQK6naiK1EPAe1g/ILLxN5RBoH5xkJk3CqlMI/Y=",
- version = "v0.0.0-20200224162631-6cc2880d07d6",
+ sum = "h1:c2HOrn5iMezYjSlGPncknSEr/8x5LELb/ilJbXi9DEA=",
+ version = "v0.0.0-20190121172915-509febef88a4",
)
go_repository(
@@ -1093,8 +1801,8 @@ def go_repositories():
go_repository(
name = "org_golang_x_lint",
importpath = "golang.org/x/lint",
- sum = "h1:2M3HP5CCK1Si9FQhwnzYhXdG6DXeebvUHFpre8QvbyI=",
- version = "v0.0.0-20201208152925-83fdc39ff7b5",
+ sum = "h1:XQyxROzUlZH+WIQwySDgnISgOivlhjIEwaQaJEJrrN0=",
+ version = "v0.0.0-20190313153728-d0100b6bd8b3",
)
go_repository(
@@ -1106,45 +1814,45 @@ def go_repositories():
go_repository(
name = "org_golang_x_mod",
importpath = "golang.org/x/mod",
- sum = "h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4=",
- version = "v0.3.0",
+ sum = "h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s=",
+ version = "v0.6.0-dev.0.20220419223038-86c51ed26bb4",
)
go_repository(
name = "org_golang_x_net",
importpath = "golang.org/x/net",
- sum = "h1:b0LrWgu8+q7z4J+0Y3Umo5q1dL7NXBkKBWkaVkAq17E=",
- version = "v0.0.0-20210316092652-d523dce5a7f4",
+ sum = "h1:sZfSu1wtKLGlWI4ZZayP0ck9Y73K1ynO6gqzTdBVdPU=",
+ version = "v0.2.0",
)
go_repository(
name = "org_golang_x_oauth2",
importpath = "golang.org/x/oauth2",
- sum = "h1:SgVl/sCtkicsS7psKkje4H9YtjdEl3xsYh7N+5TDHqY=",
- version = "v0.0.0-20210427180440-81ed05c6b58c",
+ sum = "h1:GtQkldQ9m7yvzCL1V+LrYow3Khe0eJH0w7RbX/VbaIU=",
+ version = "v0.2.0",
)
go_repository(
name = "org_golang_x_sync",
importpath = "golang.org/x/sync",
- sum = "h1:SQFwaSi55rU7vdNs9Yr0Z324VNlrF+0wMqRXT4St8ck=",
- version = "v0.0.0-20201020160332-67f06af15bc9",
+ sum = "h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU=",
+ version = "v0.0.0-20190423024810-112230192c58",
)
go_repository(
name = "org_golang_x_sys",
importpath = "golang.org/x/sys",
- sum = "h1:EZ2mChiOa8udjfp6rRmswTbtZN/QzUQp4ptM4rnjHvc=",
- version = "v0.0.0-20210320140829-1e4c9ba3b0c4",
+ sum = "h1:ljd4t30dBnAvMZaQCevtY0xLLD0A+bRZXbgLMLU1F/A=",
+ version = "v0.2.0",
)
go_repository(
name = "org_golang_x_term",
importpath = "golang.org/x/term",
- sum = "h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E=",
- version = "v0.0.0-20201126162022-7de9c90e9dd1",
+ sum = "h1:z85xZCsEl7bi/KwbNADeBYoOP0++7W1ipu+aGnpwzRM=",
+ version = "v0.2.0",
)
go_repository(
name = "org_golang_x_text",
importpath = "golang.org/x/text",
- sum = "h1:i6eZZ+zk0SOf0xgBpEpPD18qWcJda6q1sxt3S0kzyUQ=",
- version = "v0.3.5",
+ sum = "h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg=",
+ version = "v0.4.0",
)
go_repository(
@@ -1156,8 +1864,8 @@ def go_repositories():
go_repository(
name = "org_golang_x_tools",
importpath = "golang.org/x/tools",
- sum = "h1:po9/4sTYwZU9lPhi1tOrb4hCv3qrhiQ77LZfGa2OjwY=",
- version = "v0.1.0",
+ sum = "h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU=",
+ version = "v0.1.12",
)
go_repository(
diff --git a/runtime/BUILD.bazel b/runtime/BUILD.bazel
index 53022768b3e..b5140a3c9d1 100644
--- a/runtime/BUILD.bazel
+++ b/runtime/BUILD.bazel
@@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
package(default_visibility = ["//visibility:public"])
go_library(
- name = "go_default_library",
+ name = "runtime",
srcs = [
"context.go",
"convert.go",
@@ -24,26 +24,28 @@ go_library(
],
importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/runtime",
deps = [
- "//internal/httprule:go_default_library",
- "//utilities:go_default_library",
+ "//internal/httprule",
+ "//utilities",
"@go_googleapis//google/api:httpbody_go_proto",
"@io_bazel_rules_go//proto/wkt:field_mask_go_proto",
- "@org_golang_google_grpc//codes:go_default_library",
- "@org_golang_google_grpc//grpclog:go_default_library",
- "@org_golang_google_grpc//metadata:go_default_library",
- "@org_golang_google_grpc//status:go_default_library",
- "@org_golang_google_protobuf//encoding/protojson:go_default_library",
- "@org_golang_google_protobuf//proto:go_default_library",
- "@org_golang_google_protobuf//reflect/protoreflect:go_default_library",
- "@org_golang_google_protobuf//reflect/protoregistry:go_default_library",
- "@org_golang_google_protobuf//types/known/durationpb:go_default_library",
- "@org_golang_google_protobuf//types/known/timestamppb:go_default_library",
- "@org_golang_google_protobuf//types/known/wrapperspb:go_default_library",
+ "@org_golang_google_grpc//codes",
+ "@org_golang_google_grpc//grpclog",
+ "@org_golang_google_grpc//health/grpc_health_v1",
+ "@org_golang_google_grpc//metadata",
+ "@org_golang_google_grpc//status",
+ "@org_golang_google_protobuf//encoding/protojson",
+ "@org_golang_google_protobuf//proto",
+ "@org_golang_google_protobuf//reflect/protoreflect",
+ "@org_golang_google_protobuf//reflect/protoregistry",
+ "@org_golang_google_protobuf//types/known/durationpb",
+ "@org_golang_google_protobuf//types/known/structpb",
+ "@org_golang_google_protobuf//types/known/timestamppb",
+ "@org_golang_google_protobuf//types/known/wrapperspb",
],
)
go_test(
- name = "go_default_test",
+ name = "runtime_test",
size = "small",
srcs = [
"context_test.go",
@@ -56,30 +58,40 @@ go_test(
"marshal_jsonpb_test.go",
"marshal_proto_test.go",
"marshaler_registry_test.go",
+ "mux_internal_test.go",
"mux_test.go",
"pattern_test.go",
+ "query_fuzz_test.go",
"query_test.go",
],
- embed = [":go_default_library"],
+ embed = [":runtime"],
deps = [
- "//runtime/internal/examplepb:go_default_library",
- "//utilities:go_default_library",
- "@com_github_google_go_cmp//cmp:go_default_library",
- "@com_github_google_go_cmp//cmp/cmpopts:go_default_library",
+ "//runtime/internal/examplepb",
+ "//utilities",
+ "@com_github_google_go_cmp//cmp",
+ "@com_github_google_go_cmp//cmp/cmpopts",
"@go_googleapis//google/api:httpbody_go_proto",
"@go_googleapis//google/rpc:errdetails_go_proto",
"@go_googleapis//google/rpc:status_go_proto",
"@io_bazel_rules_go//proto/wkt:field_mask_go_proto",
- "@org_golang_google_grpc//codes:go_default_library",
- "@org_golang_google_grpc//metadata:go_default_library",
- "@org_golang_google_grpc//status:go_default_library",
- "@org_golang_google_protobuf//encoding/protojson:go_default_library",
- "@org_golang_google_protobuf//proto:go_default_library",
- "@org_golang_google_protobuf//testing/protocmp:go_default_library",
- "@org_golang_google_protobuf//types/known/durationpb:go_default_library",
- "@org_golang_google_protobuf//types/known/emptypb:go_default_library",
- "@org_golang_google_protobuf//types/known/structpb:go_default_library",
- "@org_golang_google_protobuf//types/known/timestamppb:go_default_library",
- "@org_golang_google_protobuf//types/known/wrapperspb:go_default_library",
+ "@org_golang_google_grpc//:go_default_library",
+ "@org_golang_google_grpc//codes",
+ "@org_golang_google_grpc//health/grpc_health_v1",
+ "@org_golang_google_grpc//metadata",
+ "@org_golang_google_grpc//status",
+ "@org_golang_google_protobuf//encoding/protojson",
+ "@org_golang_google_protobuf//proto",
+ "@org_golang_google_protobuf//testing/protocmp",
+ "@org_golang_google_protobuf//types/known/durationpb",
+ "@org_golang_google_protobuf//types/known/emptypb",
+ "@org_golang_google_protobuf//types/known/structpb",
+ "@org_golang_google_protobuf//types/known/timestamppb",
+ "@org_golang_google_protobuf//types/known/wrapperspb",
],
)
+
+alias(
+ name = "go_default_library",
+ actual = ":runtime",
+ visibility = ["//visibility:public"],
+)
diff --git a/runtime/context.go b/runtime/context.go
index f42243a0061..5ab5b3841da 100644
--- a/runtime/context.go
+++ b/runtime/context.go
@@ -35,13 +35,28 @@ const metadataHeaderBinarySuffix = "-Bin"
const xForwardedFor = "X-Forwarded-For"
const xForwardedHost = "X-Forwarded-Host"
-var (
- // DefaultContextTimeout is used for gRPC call context.WithTimeout whenever a Grpc-Timeout inbound
- // header isn't present. If the value is 0 the sent `context` will not have a timeout.
- DefaultContextTimeout = 0 * time.Second
+// DefaultContextTimeout is used for gRPC call context.WithTimeout whenever a Grpc-Timeout inbound
+// header isn't present. If the value is 0 the sent `context` will not have a timeout.
+var DefaultContextTimeout = 0 * time.Second
+
+// malformedHTTPHeaders lists the headers that the gRPC server may reject outright as malformed.
+// See https://github.com/grpc/grpc-go/pull/4803#issuecomment-986093310 for more context.
+var malformedHTTPHeaders = map[string]struct{}{
+ "connection": {},
+}
+
+type (
+ rpcMethodKey struct{}
+ httpPathPatternKey struct{}
+
+ AnnotateContextOption func(ctx context.Context) context.Context
)
-type rpcMethodKey struct{}
+func WithHTTPPathPattern(pattern string) AnnotateContextOption {
+ return func(ctx context.Context) context.Context {
+ return withHTTPPathPattern(ctx, pattern)
+ }
+}
func decodeBinHeader(v string) ([]byte, error) {
if len(v)%4 == 0 {
@@ -58,8 +73,8 @@ At a minimum, the RemoteAddr is included in the fashion of "X-Forwarded-For",
except that the forwarded destination is not another HTTP service but rather
a gRPC service.
*/
-func AnnotateContext(ctx context.Context, mux *ServeMux, req *http.Request, rpcMethodName string) (context.Context, error) {
- ctx, md, err := annotateContext(ctx, mux, req, rpcMethodName)
+func AnnotateContext(ctx context.Context, mux *ServeMux, req *http.Request, rpcMethodName string, options ...AnnotateContextOption) (context.Context, error) {
+ ctx, md, err := annotateContext(ctx, mux, req, rpcMethodName, options...)
if err != nil {
return nil, err
}
@@ -72,8 +87,8 @@ func AnnotateContext(ctx context.Context, mux *ServeMux, req *http.Request, rpcM
// AnnotateIncomingContext adds context information such as metadata from the request.
// Attach metadata as incoming context.
-func AnnotateIncomingContext(ctx context.Context, mux *ServeMux, req *http.Request, rpcMethodName string) (context.Context, error) {
- ctx, md, err := annotateContext(ctx, mux, req, rpcMethodName)
+func AnnotateIncomingContext(ctx context.Context, mux *ServeMux, req *http.Request, rpcMethodName string, options ...AnnotateContextOption) (context.Context, error) {
+ ctx, md, err := annotateContext(ctx, mux, req, rpcMethodName, options...)
if err != nil {
return nil, err
}
@@ -84,9 +99,11 @@ func AnnotateIncomingContext(ctx context.Context, mux *ServeMux, req *http.Reque
return metadata.NewIncomingContext(ctx, md), nil
}
-func annotateContext(ctx context.Context, mux *ServeMux, req *http.Request, rpcMethodName string) (context.Context, metadata.MD, error) {
+func annotateContext(ctx context.Context, mux *ServeMux, req *http.Request, rpcMethodName string, options ...AnnotateContextOption) (context.Context, metadata.MD, error) {
ctx = withRPCMethod(ctx, rpcMethodName)
- var pairs []string
+ for _, o := range options {
+ ctx = o(ctx)
+ }
timeout := DefaultContextTimeout
if tm := req.Header.Get(metadataGrpcTimeout); tm != "" {
var err error
@@ -95,7 +112,7 @@ func annotateContext(ctx context.Context, mux *ServeMux, req *http.Request, rpcM
return nil, nil, status.Errorf(codes.InvalidArgument, "invalid grpc-timeout: %s", tm)
}
}
-
+ var pairs []string
for key, vals := range req.Header {
key = textproto.CanonicalMIMEHeaderKey(key)
for _, val := range vals {
@@ -158,11 +175,17 @@ type serverMetadataKey struct{}
// NewServerMetadataContext creates a new context with ServerMetadata
func NewServerMetadataContext(ctx context.Context, md ServerMetadata) context.Context {
+ if ctx == nil {
+ ctx = context.Background()
+ }
return context.WithValue(ctx, serverMetadataKey{}, md)
}
// ServerMetadataFromContext returns the ServerMetadata in ctx
func ServerMetadataFromContext(ctx context.Context) (md ServerMetadata, ok bool) {
+ if ctx == nil {
+ return md, false
+ }
md, ok = ctx.Value(serverMetadataKey{}).(ServerMetadata)
return
}
@@ -255,8 +278,8 @@ func timeoutUnitToDuration(u uint8) (d time.Duration, ok bool) {
case 'n':
return time.Nanosecond, true
default:
+ return
}
- return
}
// isPermanentHTTPHeader checks whether hdr belongs to the list of
@@ -294,6 +317,13 @@ func isPermanentHTTPHeader(hdr string) bool {
return false
}
+// isMalformedHTTPHeader checks whether header belongs to the list of
+// "malformed headers" and would be rejected by the gRPC server.
+func isMalformedHTTPHeader(header string) bool {
+ _, isMalformed := malformedHTTPHeaders[strings.ToLower(header)]
+ return isMalformed
+}
+
// RPCMethod returns the method string for the server context. The returned
// string is in the format of "/package.service/method".
func RPCMethod(ctx context.Context) (string, bool) {
@@ -311,3 +341,21 @@ func RPCMethod(ctx context.Context) (string, bool) {
func withRPCMethod(ctx context.Context, rpcMethodName string) context.Context {
return context.WithValue(ctx, rpcMethodKey{}, rpcMethodName)
}
+
+// HTTPPathPattern returns the HTTP path pattern string relating to the HTTP handler, if one exists.
+// The format of the returned string is defined by the google.api.http path template type.
+func HTTPPathPattern(ctx context.Context) (string, bool) {
+ m := ctx.Value(httpPathPatternKey{})
+ if m == nil {
+ return "", false
+ }
+ ms, ok := m.(string)
+ if !ok {
+ return "", false
+ }
+ return ms, true
+}
+
+func withHTTPPathPattern(ctx context.Context, httpPathPattern string) context.Context {
+ return context.WithValue(ctx, httpPathPatternKey{}, httpPathPattern)
+}
diff --git a/runtime/context_test.go b/runtime/context_test.go
index f9ff345a829..c53b6f00d3d 100644
--- a/runtime/context_test.go
+++ b/runtime/context_test.go
@@ -19,12 +19,13 @@ const (
func TestAnnotateContext_WorksWithEmpty(t *testing.T) {
ctx := context.Background()
expectedRPCName := "/example.Example/Example"
- request, err := http.NewRequest("GET", "http://www.example.com", nil)
+ expectedHTTPPathPattern := "/v1"
+ request, err := http.NewRequest("GET", "http://www.example.com/v1", nil)
if err != nil {
t.Fatalf("http.NewRequest(%q, %q, nil) failed with %v; want success", "GET", "http://www.example.com", err)
}
request.Header.Add("Some-Irrelevant-Header", "some value")
- annotated, err := runtime.AnnotateContext(ctx, runtime.NewServeMux(), request, expectedRPCName)
+ annotated, err := runtime.AnnotateContext(ctx, runtime.NewServeMux(), request, expectedRPCName, runtime.WithHTTPPathPattern(expectedHTTPPathPattern))
if err != nil {
t.Errorf("runtime.AnnotateContext(ctx, %#v) failed with %v; want success", request, err)
return
@@ -38,7 +39,8 @@ func TestAnnotateContext_WorksWithEmpty(t *testing.T) {
func TestAnnotateContext_ForwardsGrpcMetadata(t *testing.T) {
ctx := context.Background()
expectedRPCName := "/example.Example/Example"
- request, err := http.NewRequest("GET", "http://www.example.com", nil)
+ expectedHTTPPathPattern := "/v1"
+ request, err := http.NewRequest("GET", "http://www.example.com/v1", nil)
if err != nil {
t.Fatalf("http.NewRequest(%q, %q, nil) failed with %v; want success", "GET", "http://www.example.com", err)
}
@@ -47,7 +49,7 @@ func TestAnnotateContext_ForwardsGrpcMetadata(t *testing.T) {
request.Header.Add("Grpc-Metadata-Foo-BAZ", "Value2")
request.Header.Add("Grpc-Metadata-foo-bAz", "Value3")
request.Header.Add("Authorization", "Token 1234567890")
- annotated, err := runtime.AnnotateContext(ctx, runtime.NewServeMux(), request, expectedRPCName)
+ annotated, err := runtime.AnnotateContext(ctx, runtime.NewServeMux(), request, expectedRPCName, runtime.WithHTTPPathPattern(expectedHTTPPathPattern))
if err != nil {
t.Errorf("runtime.AnnotateContext(ctx, %#v) failed with %v; want success", request, err)
return
@@ -73,6 +75,12 @@ func TestAnnotateContext_ForwardsGrpcMetadata(t *testing.T) {
} else if m != expectedRPCName {
t.Errorf("runtime.RPCMethod(annotated) failed with %s; want %s", m, expectedRPCName)
}
+
+ if m, ok := runtime.HTTPPathPattern(annotated); !ok {
+ t.Errorf("runtime.HTTPPathPattern(annotated) failed with no value; want %s", expectedHTTPPathPattern)
+ } else if m != expectedHTTPPathPattern {
+ t.Errorf("runtime.HTTPPathPattern(annotated) failed with %s; want %s", m, expectedHTTPPathPattern)
+ }
}
func TestAnnotateContext_ForwardGrpcBinaryMetadata(t *testing.T) {
@@ -249,12 +257,13 @@ func TestAnnotateContext_SupportsCustomAnnotators(t *testing.T) {
func TestAnnotateIncomingContext_WorksWithEmpty(t *testing.T) {
ctx := context.Background()
expectedRPCName := "/example.Example/Example"
- request, err := http.NewRequest("GET", "http://www.example.com", nil)
+ expectedHTTPPathPattern := "/v1"
+ request, err := http.NewRequest("GET", "http://www.example.com/v1", nil)
if err != nil {
t.Fatalf("http.NewRequest(%q, %q, nil) failed with %v; want success", "GET", "http://www.example.com", err)
}
request.Header.Add("Some-Irrelevant-Header", "some value")
- annotated, err := runtime.AnnotateIncomingContext(ctx, runtime.NewServeMux(), request, expectedRPCName)
+ annotated, err := runtime.AnnotateIncomingContext(ctx, runtime.NewServeMux(), request, expectedRPCName, runtime.WithHTTPPathPattern(expectedHTTPPathPattern))
if err != nil {
t.Errorf("runtime.AnnotateIncomingContext(ctx, %#v) failed with %v; want success", request, err)
return
@@ -273,7 +282,8 @@ func TestAnnotateIncomingContext_WorksWithEmpty(t *testing.T) {
func TestAnnotateIncomingContext_ForwardsGrpcMetadata(t *testing.T) {
ctx := context.Background()
expectedRPCName := "/example.Example/Example"
- request, err := http.NewRequest("GET", "http://www.example.com", nil)
+ expectedHTTPPathPattern := "/v1"
+ request, err := http.NewRequest("GET", "http://www.example.com/v1", nil)
if err != nil {
t.Fatalf("http.NewRequest(%q, %q, nil) failed with %v; want success", "GET", "http://www.example.com", err)
}
@@ -282,7 +292,7 @@ func TestAnnotateIncomingContext_ForwardsGrpcMetadata(t *testing.T) {
request.Header.Add("Grpc-Metadata-Foo-BAZ", "Value2")
request.Header.Add("Grpc-Metadata-foo-bAz", "Value3")
request.Header.Add("Authorization", "Token 1234567890")
- annotated, err := runtime.AnnotateIncomingContext(ctx, runtime.NewServeMux(), request, expectedRPCName)
+ annotated, err := runtime.AnnotateIncomingContext(ctx, runtime.NewServeMux(), request, expectedRPCName, runtime.WithHTTPPathPattern(expectedHTTPPathPattern))
if err != nil {
t.Errorf("runtime.AnnotateIncomingContext(ctx, %#v) failed with %v; want success", request, err)
return
@@ -308,6 +318,11 @@ func TestAnnotateIncomingContext_ForwardsGrpcMetadata(t *testing.T) {
} else if m != expectedRPCName {
t.Errorf("runtime.RPCMethod(annotated) failed with %s; want %s", m, expectedRPCName)
}
+ if m, ok := runtime.HTTPPathPattern(annotated); !ok {
+ t.Errorf("runtime.HTTPPathPattern(annotated) failed with no value; want %s", expectedHTTPPathPattern)
+ } else if m != expectedHTTPPathPattern {
+ t.Errorf("runtime.HTTPPathPattern(annotated) failed with %s; want %s", m, expectedHTTPPathPattern)
+ }
}
func TestAnnotateIncomingContext_ForwardGrpcBinaryMetadata(t *testing.T) {
diff --git a/runtime/convert.go b/runtime/convert.go
index 2deef8b481e..d7b15fcfb3f 100644
--- a/runtime/convert.go
+++ b/runtime/convert.go
@@ -37,7 +37,7 @@ func BoolSlice(val, sep string) ([]bool, error) {
for i, v := range s {
value, err := Bool(v)
if err != nil {
- return values, err
+ return nil, err
}
values[i] = value
}
@@ -57,7 +57,7 @@ func Float64Slice(val, sep string) ([]float64, error) {
for i, v := range s {
value, err := Float64(v)
if err != nil {
- return values, err
+ return nil, err
}
values[i] = value
}
@@ -81,7 +81,7 @@ func Float32Slice(val, sep string) ([]float32, error) {
for i, v := range s {
value, err := Float32(v)
if err != nil {
- return values, err
+ return nil, err
}
values[i] = value
}
@@ -101,7 +101,7 @@ func Int64Slice(val, sep string) ([]int64, error) {
for i, v := range s {
value, err := Int64(v)
if err != nil {
- return values, err
+ return nil, err
}
values[i] = value
}
@@ -125,7 +125,7 @@ func Int32Slice(val, sep string) ([]int32, error) {
for i, v := range s {
value, err := Int32(v)
if err != nil {
- return values, err
+ return nil, err
}
values[i] = value
}
@@ -145,7 +145,7 @@ func Uint64Slice(val, sep string) ([]uint64, error) {
for i, v := range s {
value, err := Uint64(v)
if err != nil {
- return values, err
+ return nil, err
}
values[i] = value
}
@@ -169,7 +169,7 @@ func Uint32Slice(val, sep string) ([]uint32, error) {
for i, v := range s {
value, err := Uint32(v)
if err != nil {
- return values, err
+ return nil, err
}
values[i] = value
}
@@ -197,7 +197,7 @@ func BytesSlice(val, sep string) ([][]byte, error) {
for i, v := range s {
value, err := Bytes(v)
if err != nil {
- return values, err
+ return nil, err
}
values[i] = value
}
@@ -207,9 +207,9 @@ func BytesSlice(val, sep string) ([][]byte, error) {
// Timestamp converts the given RFC3339 formatted string into a timestamp.Timestamp.
func Timestamp(val string) (*timestamppb.Timestamp, error) {
var r timestamppb.Timestamp
+ val = strconv.Quote(strings.Trim(val, `"`))
unmarshaler := &protojson.UnmarshalOptions{}
- err := unmarshaler.Unmarshal([]byte(val), &r)
- if err != nil {
+ if err := unmarshaler.Unmarshal([]byte(val), &r); err != nil {
return nil, err
}
return &r, nil
@@ -218,9 +218,9 @@ func Timestamp(val string) (*timestamppb.Timestamp, error) {
// Duration converts the given string into a timestamp.Duration.
func Duration(val string) (*durationpb.Duration, error) {
var r durationpb.Duration
+ val = strconv.Quote(strings.Trim(val, `"`))
unmarshaler := &protojson.UnmarshalOptions{}
- err := unmarshaler.Unmarshal([]byte(val), &r)
- if err != nil {
+ if err := unmarshaler.Unmarshal([]byte(val), &r); err != nil {
return nil, err
}
return &r, nil
@@ -255,66 +255,64 @@ func EnumSlice(val, sep string, enumValMap map[string]int32) ([]int32, error) {
for i, v := range s {
value, err := Enum(v, enumValMap)
if err != nil {
- return values, err
+ return nil, err
}
values[i] = value
}
return values, nil
}
-/*
- Support fot google.protobuf.wrappers on top of primitive types
-*/
+// Support for google.protobuf.wrappers on top of primitive types
// StringValue well-known type support as wrapper around string type
func StringValue(val string) (*wrapperspb.StringValue, error) {
- return &wrapperspb.StringValue{Value: val}, nil
+ return wrapperspb.String(val), nil
}
// FloatValue well-known type support as wrapper around float32 type
func FloatValue(val string) (*wrapperspb.FloatValue, error) {
parsedVal, err := Float32(val)
- return &wrapperspb.FloatValue{Value: parsedVal}, err
+ return wrapperspb.Float(parsedVal), err
}
// DoubleValue well-known type support as wrapper around float64 type
func DoubleValue(val string) (*wrapperspb.DoubleValue, error) {
parsedVal, err := Float64(val)
- return &wrapperspb.DoubleValue{Value: parsedVal}, err
+ return wrapperspb.Double(parsedVal), err
}
// BoolValue well-known type support as wrapper around bool type
func BoolValue(val string) (*wrapperspb.BoolValue, error) {
parsedVal, err := Bool(val)
- return &wrapperspb.BoolValue{Value: parsedVal}, err
+ return wrapperspb.Bool(parsedVal), err
}
// Int32Value well-known type support as wrapper around int32 type
func Int32Value(val string) (*wrapperspb.Int32Value, error) {
parsedVal, err := Int32(val)
- return &wrapperspb.Int32Value{Value: parsedVal}, err
+ return wrapperspb.Int32(parsedVal), err
}
// UInt32Value well-known type support as wrapper around uint32 type
func UInt32Value(val string) (*wrapperspb.UInt32Value, error) {
parsedVal, err := Uint32(val)
- return &wrapperspb.UInt32Value{Value: parsedVal}, err
+ return wrapperspb.UInt32(parsedVal), err
}
// Int64Value well-known type support as wrapper around int64 type
func Int64Value(val string) (*wrapperspb.Int64Value, error) {
parsedVal, err := Int64(val)
- return &wrapperspb.Int64Value{Value: parsedVal}, err
+ return wrapperspb.Int64(parsedVal), err
}
// UInt64Value well-known type support as wrapper around uint64 type
func UInt64Value(val string) (*wrapperspb.UInt64Value, error) {
parsedVal, err := Uint64(val)
- return &wrapperspb.UInt64Value{Value: parsedVal}, err
+ return wrapperspb.UInt64(parsedVal), err
}
// BytesValue well-known type support as wrapper around bytes[] type
func BytesValue(val string) (*wrapperspb.BytesValue, error) {
parsedVal, err := Bytes(val)
- return &wrapperspb.BytesValue{Value: parsedVal}, err
+ return wrapperspb.Bytes(parsedVal), err
}
diff --git a/runtime/convert_test.go b/runtime/convert_test.go
index d7d970db427..d8f8ec1a634 100644
--- a/runtime/convert_test.go
+++ b/runtime/convert_test.go
@@ -25,6 +25,15 @@ func TestConvertTimestamp(t *testing.T) {
},
wanterr: false,
},
+ {
+ name: "a valid RFC3339 timestamp without double quotation",
+ input: "2016-05-10T10:19:13.123Z",
+ output: ×tamppb.Timestamp{
+ Seconds: 1462875553,
+ Nanos: 123000000,
+ },
+ wanterr: false,
+ },
{
name: "invalid timestamp",
input: `"05-10-2016T10:19:13.123Z"`,
@@ -81,6 +90,15 @@ func TestConvertDuration(t *testing.T) {
},
wanterr: false,
},
+ {
+ name: "a valid duration without double quotation",
+ input: "123.456s",
+ output: &durationpb.Duration{
+ Seconds: 123,
+ Nanos: 456000000,
+ },
+ wanterr: false,
+ },
{
name: "invalid duration",
input: `"123years"`,
diff --git a/runtime/errors.go b/runtime/errors.go
index 83902994d89..d2bcbb7d2a2 100644
--- a/runtime/errors.go
+++ b/runtime/errors.go
@@ -5,7 +5,6 @@ import (
"errors"
"io"
"net/http"
- "strings"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/grpclog"
@@ -39,7 +38,7 @@ func HTTPStatusFromCode(code codes.Code) int {
case codes.OK:
return http.StatusOK
case codes.Canceled:
- return http.StatusRequestTimeout
+ return 499
case codes.Unknown:
return http.StatusInternalServerError
case codes.InvalidArgument:
@@ -71,10 +70,10 @@ func HTTPStatusFromCode(code codes.Code) int {
return http.StatusServiceUnavailable
case codes.DataLoss:
return http.StatusInternalServerError
+ default:
+ grpclog.Infof("Unknown gRPC error code: %v", code)
+ return http.StatusInternalServerError
}
-
- grpclog.Infof("Unknown gRPC error code: %v", code)
- return http.StatusInternalServerError
}
// HTTPError uses the mux-configured error handler.
@@ -109,6 +108,10 @@ func DefaultHTTPErrorHandler(ctx context.Context, mux *ServeMux, marshaler Marsh
contentType := marshaler.ContentType(pb)
w.Header().Set("Content-Type", contentType)
+ if s.Code() == codes.Unauthenticated {
+ w.Header().Set("WWW-Authenticate", s.Message())
+ }
+
buf, merr := marshaler.Marshal(pb)
if merr != nil {
grpclog.Infof("Failed to marshal error message %q: %v", s, merr)
@@ -131,10 +134,9 @@ func DefaultHTTPErrorHandler(ctx context.Context, mux *ServeMux, marshaler Marsh
// is acceptable, as described in Section 4.3, a server SHOULD NOT
// generate trailer fields that it believes are necessary for the user
// agent to receive.
- var wantsTrailers bool
+ doForwardTrailers := requestAcceptsTrailers(r)
- if te := r.Header.Get("TE"); strings.Contains(strings.ToLower(te), "trailers") {
- wantsTrailers = true
+ if doForwardTrailers {
handleForwardResponseTrailerHeader(w, md)
w.Header().Set("Transfer-Encoding", "chunked")
}
@@ -149,7 +151,7 @@ func DefaultHTTPErrorHandler(ctx context.Context, mux *ServeMux, marshaler Marsh
grpclog.Infof("Failed to write response: %v", err)
}
- if wantsTrailers {
+ if doForwardTrailers {
handleForwardResponseTrailer(w, md)
}
}
@@ -160,10 +162,11 @@ func DefaultStreamErrorHandler(_ context.Context, err error) *status.Status {
// DefaultRoutingErrorHandler is our default handler for routing errors.
// By default http error codes mapped on the following error codes:
-// NotFound -> grpc.NotFound
-// StatusBadRequest -> grpc.InvalidArgument
-// MethodNotAllowed -> grpc.Unimplemented
-// Other -> grpc.Internal, method is not expecting to be called for anything else
+//
+// NotFound -> grpc.NotFound
+// StatusBadRequest -> grpc.InvalidArgument
+// MethodNotAllowed -> grpc.Unimplemented
+// Other -> grpc.Internal, method is not expecting to be called for anything else
func DefaultRoutingErrorHandler(ctx context.Context, mux *ServeMux, marshaler Marshaler, w http.ResponseWriter, r *http.Request, httpStatus int) {
sterr := status.Error(codes.Internal, "Unexpected routing error")
switch httpStatus {
diff --git a/runtime/errors_test.go b/runtime/errors_test.go
index b340343239e..5919e8d129c 100644
--- a/runtime/errors_test.go
+++ b/runtime/errors_test.go
@@ -2,7 +2,7 @@ package runtime_test
import (
"context"
- "fmt"
+ "errors"
"net/http"
"net/http/httptest"
"strconv"
@@ -32,7 +32,7 @@ func TestDefaultHTTPError(t *testing.T) {
details string
}{
{
- err: fmt.Errorf("example error"),
+ err: errors.New("example error"),
status: http.StatusInternalServerError,
marshaler: &runtime.JSONPb{},
contentType: "application/json",
@@ -54,7 +54,7 @@ func TestDefaultHTTPError(t *testing.T) {
details: "type.googleapis.com/google.rpc.PreconditionFailure",
},
{
- err: fmt.Errorf("example error"),
+ err: errors.New("example error"),
status: http.StatusInternalServerError,
marshaler: &CustomMarshaler{&runtime.JSONPb{}},
contentType: "Custom-Content-Type",
diff --git a/runtime/fieldmask.go b/runtime/fieldmask.go
index 0138ed2f769..9d9d976f753 100644
--- a/runtime/fieldmask.go
+++ b/runtime/fieldmask.go
@@ -2,6 +2,7 @@ package runtime
import (
"encoding/json"
+ "errors"
"fmt"
"io"
"sort"
@@ -44,7 +45,7 @@ func FieldMaskFromRequestBody(r io.Reader, msg proto.Message) (*field_mask.Field
// if the item is an object, then enqueue all of its children
for k, v := range m {
if item.msg == nil {
- return nil, fmt.Errorf("JSON structure did not match request type")
+ return nil, errors.New("JSON structure did not match request type")
}
fd := getFieldByName(item.msg.Descriptor().Fields(), k)
@@ -53,7 +54,7 @@ func FieldMaskFromRequestBody(r io.Reader, msg proto.Message) (*field_mask.Field
}
if isDynamicProtoMessage(fd.Message()) {
- for _, p := range buildPathsBlindly(k, v) {
+ for _, p := range buildPathsBlindly(string(fd.FullName().Name()), v) {
newPath := p
if item.path != "" {
newPath = item.path + "." + newPath
diff --git a/runtime/fieldmask_test.go b/runtime/fieldmask_test.go
index e458211a48e..fb32872505b 100644
--- a/runtime/fieldmask_test.go
+++ b/runtime/fieldmask_test.go
@@ -2,7 +2,7 @@ package runtime
import (
"bytes"
- "fmt"
+ "errors"
"testing"
"github.com/google/go-cmp/cmp"
@@ -60,6 +60,12 @@ func TestFieldMaskFromRequestBody(t *testing.T) {
input: `{"struct_field": {"name":{"first": "bob"}, "amount": 2}}`,
expected: newFieldMask("struct_field.name.first", "struct_field.amount"),
},
+ {
+ name: "NonStandardMessageWithJSONNamesForStruct",
+ msg: &examplepb.NonStandardMessage{},
+ input: `{"lineNum": 123, "structField": {"name":"bob"}}`,
+ expected: newFieldMask("line_num", "struct_field.name"),
+ },
{
name: "value",
msg: &examplepb.NonStandardMessage{},
@@ -254,7 +260,7 @@ func TestFieldMaskErrors(t *testing.T) {
{
name: "object under scalar",
input: `{"uuid": {"a": "x"}}`,
- expectedErr: fmt.Errorf("JSON structure did not match request type"),
+ expectedErr: errors.New("JSON structure did not match request type"),
},
} {
t.Run(tc.name, func(t *testing.T) {
diff --git a/runtime/handler.go b/runtime/handler.go
index 2628c2b1c72..945f3a5ebf3 100644
--- a/runtime/handler.go
+++ b/runtime/handler.go
@@ -6,6 +6,7 @@ import (
"io"
"net/http"
"net/textproto"
+ "strings"
"google.golang.org/genproto/googleapis/api/httpbody"
"google.golang.org/grpc/codes"
@@ -51,11 +52,11 @@ func ForwardResponseStream(ctx context.Context, mux *ServeMux, marshaler Marshal
return
}
if err != nil {
- handleForwardResponseStreamError(ctx, wroteHeader, marshaler, w, req, mux, err)
+ handleForwardResponseStreamError(ctx, wroteHeader, marshaler, w, req, mux, err, delimiter)
return
}
if err := handleForwardResponseOptions(ctx, w, resp, opts); err != nil {
- handleForwardResponseStreamError(ctx, wroteHeader, marshaler, w, req, mux, err)
+ handleForwardResponseStreamError(ctx, wroteHeader, marshaler, w, req, mux, err, delimiter)
return
}
@@ -81,15 +82,15 @@ func ForwardResponseStream(ctx context.Context, mux *ServeMux, marshaler Marshal
if err != nil {
grpclog.Infof("Failed to marshal response chunk: %v", err)
- handleForwardResponseStreamError(ctx, wroteHeader, marshaler, w, req, mux, err)
+ handleForwardResponseStreamError(ctx, wroteHeader, marshaler, w, req, mux, err, delimiter)
return
}
- if _, err = w.Write(buf); err != nil {
+ if _, err := w.Write(buf); err != nil {
grpclog.Infof("Failed to send response chunk: %v", err)
return
}
wroteHeader = true
- if _, err = w.Write(delimiter); err != nil {
+ if _, err := w.Write(delimiter); err != nil {
grpclog.Infof("Failed to send delimiter chunk: %v", err)
return
}
@@ -137,6 +138,19 @@ func ForwardResponseMessage(ctx context.Context, mux *ServeMux, marshaler Marsha
}
handleForwardResponseServerMetadata(w, mux, md)
+
+ // RFC 7230 https://tools.ietf.org/html/rfc7230#section-4.1.2
+ // Unless the request includes a TE header field indicating "trailers"
+ // is acceptable, as described in Section 4.3, a server SHOULD NOT
+ // generate trailer fields that it believes are necessary for the user
+ // agent to receive.
+ doForwardTrailers := requestAcceptsTrailers(req)
+
+ if doForwardTrailers {
+ handleForwardResponseTrailerHeader(w, md)
+ w.Header().Set("Transfer-Encoding", "chunked")
+ }
+
handleForwardResponseTrailerHeader(w, md)
contentType := marshaler.ContentType(resp)
@@ -163,7 +177,14 @@ func ForwardResponseMessage(ctx context.Context, mux *ServeMux, marshaler Marsha
grpclog.Infof("Failed to write response: %v", err)
}
- handleForwardResponseTrailer(w, md)
+ if doForwardTrailers {
+ handleForwardResponseTrailer(w, md)
+ }
+}
+
+func requestAcceptsTrailers(req *http.Request) bool {
+ te := req.Header.Get("TE")
+ return strings.Contains(strings.ToLower(te), "trailers")
}
func handleForwardResponseOptions(ctx context.Context, w http.ResponseWriter, resp proto.Message, opts []func(context.Context, http.ResponseWriter, proto.Message) error) error {
@@ -179,18 +200,24 @@ func handleForwardResponseOptions(ctx context.Context, w http.ResponseWriter, re
return nil
}
-func handleForwardResponseStreamError(ctx context.Context, wroteHeader bool, marshaler Marshaler, w http.ResponseWriter, req *http.Request, mux *ServeMux, err error) {
+func handleForwardResponseStreamError(ctx context.Context, wroteHeader bool, marshaler Marshaler, w http.ResponseWriter, req *http.Request, mux *ServeMux, err error, delimiter []byte) {
st := mux.streamErrorHandler(ctx, err)
+ msg := errorChunk(st)
if !wroteHeader {
+ w.Header().Set("Content-Type", marshaler.ContentType(msg))
w.WriteHeader(HTTPStatusFromCode(st.Code()))
}
- buf, merr := marshaler.Marshal(errorChunk(st))
- if merr != nil {
- grpclog.Infof("Failed to marshal an error: %v", merr)
+ buf, err := marshaler.Marshal(msg)
+ if err != nil {
+ grpclog.Infof("Failed to marshal an error: %v", err)
+ return
+ }
+ if _, err := w.Write(buf); err != nil {
+ grpclog.Infof("Failed to notify error to client: %v", err)
return
}
- if _, werr := w.Write(buf); werr != nil {
- grpclog.Infof("Failed to notify error to client: %v", werr)
+ if _, err := w.Write(delimiter); err != nil {
+ grpclog.Infof("Failed to send delimiter chunk: %v", err)
return
}
}
diff --git a/runtime/handler_test.go b/runtime/handler_test.go
index d227c57f176..90629721916 100644
--- a/runtime/handler_test.go
+++ b/runtime/handler_test.go
@@ -3,7 +3,6 @@ package runtime_test
import (
"context"
"io"
- "io/ioutil"
"net/http"
"net/http/httptest"
"testing"
@@ -104,11 +103,14 @@ func TestForwardResponseStream(t *testing.T) {
if h := w.Header.Get("Transfer-Encoding"); h != "chunked" {
t.Errorf("ForwardResponseStream missing header chunked")
}
- body, err := ioutil.ReadAll(w.Body)
+ body, err := io.ReadAll(w.Body)
if err != nil {
t.Errorf("Failed to read response body with %v", err)
}
w.Body.Close()
+ if len(body) > 0 && w.Header.Get("Content-Type") != "application/json" {
+ t.Errorf("Content-Type %s want application/json", w.Header.Get("Content-Type"))
+ }
var want []byte
for i, msg := range tt.msgs {
@@ -117,6 +119,7 @@ func TestForwardResponseStream(t *testing.T) {
// Skip non-stream errors
t.Skip("checking error encodings")
}
+ delimiter := marshaler.Delimiter()
st := status.Convert(msg.err)
b, err := marshaler.Marshal(map[string]proto.Message{
"error": st.Proto(),
@@ -125,7 +128,7 @@ func TestForwardResponseStream(t *testing.T) {
t.Errorf("marshaler.Marshal() failed %v", err)
}
errBytes := body[len(want):]
- if string(errBytes) != string(b) {
+ if string(errBytes) != string(b)+string(delimiter) {
t.Errorf("ForwardResponseStream() = \"%s\" want \"%s\"", errBytes, b)
}
@@ -234,11 +237,14 @@ func TestForwardResponseStreamCustomMarshaler(t *testing.T) {
if h := w.Header.Get("Transfer-Encoding"); h != "chunked" {
t.Errorf("ForwardResponseStream missing header chunked")
}
- body, err := ioutil.ReadAll(w.Body)
+ body, err := io.ReadAll(w.Body)
if err != nil {
t.Errorf("Failed to read response body with %v", err)
}
w.Body.Close()
+ if len(body) > 0 && w.Header.Get("Content-Type") != "Custom-Content-Type" {
+ t.Errorf("Content-Type %s want Custom-Content-Type", w.Header.Get("Content-Type"))
+ }
var want []byte
for _, msg := range tt.msgs {
@@ -295,7 +301,7 @@ func TestForwardResponseMessage(t *testing.T) {
if h := w.Header.Get("Content-Type"); h != tt.contentType {
t.Errorf("Content-Type %v want %v", h, tt.contentType)
}
- body, err := ioutil.ReadAll(w.Body)
+ body, err := io.ReadAll(w.Body)
if err != nil {
t.Errorf("Failed to read response body with %v", err)
}
diff --git a/runtime/internal/examplepb/BUILD.bazel b/runtime/internal/examplepb/BUILD.bazel
index 7aebca0827b..cfed28fa74f 100644
--- a/runtime/internal/examplepb/BUILD.bazel
+++ b/runtime/internal/examplepb/BUILD.bazel
@@ -38,7 +38,13 @@ go_proto_library(
)
go_library(
- name = "go_default_library",
+ name = "examplepb",
embed = [":examplepb_go_proto"],
importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/runtime/internal/examplepb",
)
+
+alias(
+ name = "go_default_library",
+ actual = ":examplepb",
+ visibility = ["//runtime:__subpackages__"],
+)
diff --git a/runtime/internal/examplepb/example.pb.go b/runtime/internal/examplepb/example.pb.go
index 1aecff19649..bcbe335b902 100644
--- a/runtime/internal/examplepb/example.pb.go
+++ b/runtime/internal/examplepb/example.pb.go
@@ -1,18 +1,18 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.26.0
-// protoc v3.13.0
+// protoc-gen-go v1.27.1
+// protoc (unknown)
// source: runtime/internal/examplepb/example.proto
package examplepb
import (
- any "github.com/golang/protobuf/ptypes/any"
- empty "github.com/golang/protobuf/ptypes/empty"
- timestamp "github.com/golang/protobuf/ptypes/timestamp"
- field_mask "google.golang.org/genproto/protobuf/field_mask"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ anypb "google.golang.org/protobuf/types/known/anypb"
+ emptypb "google.golang.org/protobuf/types/known/emptypb"
+ fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb"
+ timestamppb "google.golang.org/protobuf/types/known/timestamppb"
reflect "reflect"
sync "sync"
)
@@ -255,7 +255,7 @@ type ABitOfEverything struct {
MappedStringValue map[string]string `protobuf:"bytes,23,rep,name=mapped_string_value,json=mappedStringValue,proto3" json:"mapped_string_value,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
MappedNestedValue map[string]*ABitOfEverything_Nested `protobuf:"bytes,24,rep,name=mapped_nested_value,json=mappedNestedValue,proto3" json:"mapped_nested_value,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
NonConventionalNameValue string `protobuf:"bytes,26,opt,name=nonConventionalNameValue,proto3" json:"nonConventionalNameValue,omitempty"`
- TimestampValue *timestamp.Timestamp `protobuf:"bytes,27,opt,name=timestamp_value,json=timestampValue,proto3" json:"timestamp_value,omitempty"`
+ TimestampValue *timestamppb.Timestamp `protobuf:"bytes,27,opt,name=timestamp_value,json=timestampValue,proto3" json:"timestamp_value,omitempty"`
// repeated enum value. it is comma-separated in query
RepeatedEnumValue []NumericEnum `protobuf:"varint,28,rep,packed,name=repeated_enum_value,json=repeatedEnumValue,proto3,enum=grpc.gateway.runtime.internal.examplepb.NumericEnum" json:"repeated_enum_value,omitempty"`
// repeated numeric enum comment (This comment is overridden by the field
@@ -272,7 +272,7 @@ type ABitOfEverything struct {
// nested object comments (This comment is overridden by the field annotation)
NestedAnnotation *ABitOfEverything_Nested `protobuf:"bytes,36,opt,name=nested_annotation,json=nestedAnnotation,proto3" json:"nested_annotation,omitempty"`
Int64OverrideType int64 `protobuf:"varint,37,opt,name=int64_override_type,json=int64OverrideType,proto3" json:"int64_override_type,omitempty"`
- Anytype *any.Any `protobuf:"bytes,38,opt,name=anytype,proto3" json:"anytype,omitempty"`
+ Anytype *anypb.Any `protobuf:"bytes,38,opt,name=anytype,proto3" json:"anytype,omitempty"`
}
func (x *ABitOfEverything) Reset() {
@@ -454,7 +454,7 @@ func (m *ABitOfEverything) GetOneofValue() isABitOfEverything_OneofValue {
return nil
}
-func (x *ABitOfEverything) GetOneofEmpty() *empty.Empty {
+func (x *ABitOfEverything) GetOneofEmpty() *emptypb.Empty {
if x, ok := x.GetOneofValue().(*ABitOfEverything_OneofEmpty); ok {
return x.OneofEmpty
}
@@ -496,7 +496,7 @@ func (x *ABitOfEverything) GetNonConventionalNameValue() string {
return ""
}
-func (x *ABitOfEverything) GetTimestampValue() *timestamp.Timestamp {
+func (x *ABitOfEverything) GetTimestampValue() *timestamppb.Timestamp {
if x != nil {
return x.TimestampValue
}
@@ -552,7 +552,7 @@ func (x *ABitOfEverything) GetInt64OverrideType() int64 {
return 0
}
-func (x *ABitOfEverything) GetAnytype() *any.Any {
+func (x *ABitOfEverything) GetAnytype() *anypb.Any {
if x != nil {
return x.Anytype
}
@@ -564,7 +564,7 @@ type isABitOfEverything_OneofValue interface {
}
type ABitOfEverything_OneofEmpty struct {
- OneofEmpty *empty.Empty `protobuf:"bytes,20,opt,name=oneof_empty,json=oneofEmpty,proto3,oneof"`
+ OneofEmpty *emptypb.Empty `protobuf:"bytes,20,opt,name=oneof_empty,json=oneofEmpty,proto3,oneof"`
}
type ABitOfEverything_OneofString struct {
@@ -674,8 +674,8 @@ type UpdateMessage struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- UpdateMask *field_mask.FieldMask `protobuf:"bytes,1,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
- ABitOfEverything *ABitOfEverything `protobuf:"bytes,2,opt,name=a_bit_of_everything,json=aBitOfEverything,proto3" json:"a_bit_of_everything,omitempty"`
+ UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,1,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
+ ABitOfEverything *ABitOfEverything `protobuf:"bytes,2,opt,name=a_bit_of_everything,json=aBitOfEverything,proto3" json:"a_bit_of_everything,omitempty"`
}
func (x *UpdateMessage) Reset() {
@@ -710,7 +710,7 @@ func (*UpdateMessage) Descriptor() ([]byte, []int) {
return file_runtime_internal_examplepb_example_proto_rawDescGZIP(), []int{4}
}
-func (x *UpdateMessage) GetUpdateMask() *field_mask.FieldMask {
+func (x *UpdateMessage) GetUpdateMask() *fieldmaskpb.FieldMask {
if x != nil {
return x.UpdateMask
}
@@ -925,8 +925,8 @@ type UpdateNestedRequest struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- Nested *NestedOuter `protobuf:"bytes,1,opt,name=nested,proto3" json:"nested,omitempty"`
- UpdateMask *field_mask.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
+ Nested *NestedOuter `protobuf:"bytes,1,opt,name=nested,proto3" json:"nested,omitempty"`
+ UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
}
func (x *UpdateNestedRequest) Reset() {
@@ -968,7 +968,7 @@ func (x *UpdateNestedRequest) GetNested() *NestedOuter {
return nil
}
-func (x *UpdateNestedRequest) GetUpdateMask() *field_mask.FieldMask {
+func (x *UpdateNestedRequest) GetUpdateMask() *fieldmaskpb.FieldMask {
if x != nil {
return x.UpdateMask
}
@@ -1151,14 +1151,14 @@ var file_runtime_internal_examplepb_example_proto_rawDesc = []byte{
0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x27, 0x67, 0x72, 0x70, 0x63,
0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65,
0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c,
- 0x65, 0x70, 0x62, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
- 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
- 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
- 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72,
- 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x1f,
+ 0x65, 0x70, 0x62, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b,
+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f,
+ 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f,
+ 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65,
+ 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67,
+ 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74,
+ 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x1f,
0x0a, 0x0d, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12,
0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22,
0x9b, 0x15, 0x0a, 0x10, 0x41, 0x42, 0x69, 0x74, 0x4f, 0x66, 0x45, 0x76, 0x65, 0x72, 0x79, 0x74,
@@ -1444,10 +1444,10 @@ var file_runtime_internal_examplepb_example_proto_goTypes = []interface{}{
nil, // 16: grpc.gateway.runtime.internal.examplepb.ABitOfEverything.MappedNestedValueEntry
(*ResponseBodyOut_Response)(nil), // 17: grpc.gateway.runtime.internal.examplepb.ResponseBodyOut.Response
(*RepeatedResponseBodyOut_Response)(nil), // 18: grpc.gateway.runtime.internal.examplepb.RepeatedResponseBodyOut.Response
- (*empty.Empty)(nil), // 19: google.protobuf.Empty
- (*timestamp.Timestamp)(nil), // 20: google.protobuf.Timestamp
- (*any.Any)(nil), // 21: google.protobuf.Any
- (*field_mask.FieldMask)(nil), // 22: google.protobuf.FieldMask
+ (*emptypb.Empty)(nil), // 19: google.protobuf.Empty
+ (*timestamppb.Timestamp)(nil), // 20: google.protobuf.Timestamp
+ (*anypb.Any)(nil), // 21: google.protobuf.Any
+ (*fieldmaskpb.FieldMask)(nil), // 22: google.protobuf.FieldMask
}
var file_runtime_internal_examplepb_example_proto_depIdxs = []int32{
13, // 0: grpc.gateway.runtime.internal.examplepb.ABitOfEverything.single_nested:type_name -> grpc.gateway.runtime.internal.examplepb.ABitOfEverything.Nested
diff --git a/runtime/internal/examplepb/example.proto b/runtime/internal/examplepb/example.proto
index e851fed6380..84886a327cc 100644
--- a/runtime/internal/examplepb/example.proto
+++ b/runtime/internal/examplepb/example.proto
@@ -1,11 +1,13 @@
syntax = "proto3";
-option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/runtime/internal/examplepb";
+
package grpc.gateway.runtime.internal.examplepb;
+import "google/protobuf/any.proto";
import "google/protobuf/empty.proto";
-import "google/protobuf/timestamp.proto";
import "google/protobuf/field_mask.proto";
-import "google/protobuf/any.proto";
+import "google/protobuf/timestamp.proto";
+
+option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/runtime/internal/examplepb";
// SimpleMessage represents a simple message sent to the Echo service.
message SimpleMessage {
@@ -85,7 +87,9 @@ enum NumericEnum {
}
message ResponseBodyOut {
- message Response { string data = 1; }
+ message Response {
+ string data = 1;
+ }
Response response = 2;
}
@@ -112,22 +116,22 @@ message UpdateMessage {
message NestedOuter {
NestedOne one = 1;
-};
+}
message NestedOne {
NestedTwo two = 1;
-};
+}
message NestedTwo {
NestedThree three = 1;
-};
+}
message NestedThree {
bool a = 1;
bool b = 2;
-};
+}
message UpdateNestedRequest {
NestedOuter nested = 1;
google.protobuf.FieldMask update_mask = 2;
-};
+}
diff --git a/runtime/internal/examplepb/example.swagger.json b/runtime/internal/examplepb/example.swagger.json
index 6aaff876287..30ad9b68321 100644
--- a/runtime/internal/examplepb/example.swagger.json
+++ b/runtime/internal/examplepb/example.swagger.json
@@ -15,17 +15,13 @@
"protobufAny": {
"type": "object",
"properties": {
- "typeUrl": {
+ "@type": {
"type": "string",
"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",
- "format": "byte",
- "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\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 }"
+ "additionalProperties": {},
+ "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 := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(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 }"
},
"rpcStatus": {
"type": "object",
diff --git a/runtime/internal/examplepb/non_standard_names.pb.go b/runtime/internal/examplepb/non_standard_names.pb.go
index 57eb7ddc6ed..024be966b0c 100644
--- a/runtime/internal/examplepb/non_standard_names.pb.go
+++ b/runtime/internal/examplepb/non_standard_names.pb.go
@@ -1,17 +1,17 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.26.0
-// protoc v3.13.0
+// protoc-gen-go v1.27.1
+// protoc (unknown)
// source: runtime/internal/examplepb/non_standard_names.proto
package examplepb
import (
- _struct "github.com/golang/protobuf/ptypes/struct"
_ "google.golang.org/genproto/googleapis/api/annotations"
- field_mask "google.golang.org/genproto/protobuf/field_mask"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb"
+ structpb "google.golang.org/protobuf/types/known/structpb"
reflect "reflect"
sync "sync"
)
@@ -38,8 +38,8 @@ type NonStandardMessage struct {
En_GB int64 `protobuf:"varint,6,opt,name=en_GB,json=enGB,proto3" json:"en_GB,omitempty"`
No string `protobuf:"bytes,7,opt,name=no,proto3" json:"no,omitempty"`
Thing *NonStandardMessage_Thing `protobuf:"bytes,8,opt,name=thing,proto3" json:"thing,omitempty"`
- StructField *_struct.Struct `protobuf:"bytes,9,opt,name=struct_field,json=structField,proto3" json:"struct_field,omitempty"`
- ValueField *_struct.Value `protobuf:"bytes,10,opt,name=value_field,json=valueField,proto3" json:"value_field,omitempty"`
+ StructField *structpb.Struct `protobuf:"bytes,9,opt,name=struct_field,json=structField,proto3" json:"struct_field,omitempty"`
+ ValueField *structpb.Value `protobuf:"bytes,10,opt,name=value_field,json=valueField,proto3" json:"value_field,omitempty"`
}
func (x *NonStandardMessage) Reset() {
@@ -130,14 +130,14 @@ func (x *NonStandardMessage) GetThing() *NonStandardMessage_Thing {
return nil
}
-func (x *NonStandardMessage) GetStructField() *_struct.Struct {
+func (x *NonStandardMessage) GetStructField() *structpb.Struct {
if x != nil {
return x.StructField
}
return nil
}
-func (x *NonStandardMessage) GetValueField() *_struct.Value {
+func (x *NonStandardMessage) GetValueField() *structpb.Value {
if x != nil {
return x.ValueField
}
@@ -149,8 +149,8 @@ type NonStandardUpdateRequest struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- Body *NonStandardMessage `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"`
- UpdateMask *field_mask.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
+ Body *NonStandardMessage `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"`
+ UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
}
func (x *NonStandardUpdateRequest) Reset() {
@@ -192,7 +192,7 @@ func (x *NonStandardUpdateRequest) GetBody() *NonStandardMessage {
return nil
}
-func (x *NonStandardUpdateRequest) GetUpdateMask() *field_mask.FieldMask {
+func (x *NonStandardUpdateRequest) GetUpdateMask() *fieldmaskpb.FieldMask {
if x != nil {
return x.UpdateMask
}
@@ -214,8 +214,8 @@ type NonStandardMessageWithJSONNames struct {
En_GB int64 `protobuf:"varint,6,opt,name=en_GB,json=En_GB,proto3" json:"en_GB,omitempty"`
No string `protobuf:"bytes,7,opt,name=no,json=yes,proto3" json:"no,omitempty"`
Thing *NonStandardMessageWithJSONNames_Thing `protobuf:"bytes,8,opt,name=thing,json=Thingy,proto3" json:"thing,omitempty"`
- StructField *_struct.Struct `protobuf:"bytes,9,opt,name=struct_field,json=StructField,proto3" json:"struct_field,omitempty"`
- ValueField *_struct.Value `protobuf:"bytes,10,opt,name=value_field,json=ValueField,proto3" json:"value_field,omitempty"`
+ StructField *structpb.Struct `protobuf:"bytes,9,opt,name=struct_field,json=StructField,proto3" json:"struct_field,omitempty"`
+ ValueField *structpb.Value `protobuf:"bytes,10,opt,name=value_field,json=ValueField,proto3" json:"value_field,omitempty"`
}
func (x *NonStandardMessageWithJSONNames) Reset() {
@@ -306,14 +306,14 @@ func (x *NonStandardMessageWithJSONNames) GetThing() *NonStandardMessageWithJSON
return nil
}
-func (x *NonStandardMessageWithJSONNames) GetStructField() *_struct.Struct {
+func (x *NonStandardMessageWithJSONNames) GetStructField() *structpb.Struct {
if x != nil {
return x.StructField
}
return nil
}
-func (x *NonStandardMessageWithJSONNames) GetValueField() *_struct.Value {
+func (x *NonStandardMessageWithJSONNames) GetValueField() *structpb.Value {
if x != nil {
return x.ValueField
}
@@ -326,7 +326,7 @@ type NonStandardWithJSONNamesUpdateRequest struct {
unknownFields protoimpl.UnknownFields
Body *NonStandardMessageWithJSONNames `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"`
- UpdateMask *field_mask.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
+ UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
}
func (x *NonStandardWithJSONNamesUpdateRequest) Reset() {
@@ -368,7 +368,7 @@ func (x *NonStandardWithJSONNamesUpdateRequest) GetBody() *NonStandardMessageWit
return nil
}
-func (x *NonStandardWithJSONNamesUpdateRequest) GetUpdateMask() *field_mask.FieldMask {
+func (x *NonStandardWithJSONNamesUpdateRequest) GetUpdateMask() *fieldmaskpb.FieldMask {
if x != nil {
return x.UpdateMask
}
@@ -681,9 +681,9 @@ var file_runtime_internal_examplepb_non_standard_names_proto_rawDesc = []byte{
0x69, 0x6d, 0x65, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x65, 0x78, 0x61,
0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x61,
0x72, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x2d, 0x82, 0xd3, 0xe4, 0x93, 0x02,
- 0x27, 0x32, 0x1f, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x6e,
- 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x2f, 0x75, 0x70, 0x64, 0x61,
- 0x74, 0x65, 0x3a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0xee, 0x01, 0x0a, 0x13, 0x55, 0x70, 0x64,
+ 0x27, 0x3a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x32, 0x1f, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61,
+ 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x6e, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72,
+ 0x64, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0xee, 0x01, 0x0a, 0x13, 0x55, 0x70, 0x64,
0x61, 0x74, 0x65, 0x57, 0x69, 0x74, 0x68, 0x4a, 0x53, 0x4f, 0x4e, 0x4e, 0x61, 0x6d, 0x65, 0x73,
0x12, 0x4e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e,
0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c,
@@ -695,10 +695,10 @@ var file_runtime_internal_examplepb_non_standard_names_proto_rawDesc = []byte{
0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x6e, 0x53, 0x74,
0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x57, 0x69, 0x74,
0x68, 0x4a, 0x53, 0x4f, 0x4e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x3d, 0x82, 0xd3, 0xe4, 0x93,
- 0x02, 0x37, 0x32, 0x2f, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f,
- 0x6e, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x2f, 0x75, 0x70, 0x64,
- 0x61, 0x74, 0x65, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x6e, 0x61,
- 0x6d, 0x65, 0x73, 0x3a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x42, 0x4d, 0x5a, 0x4b, 0x67, 0x69, 0x74,
+ 0x02, 0x37, 0x3a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x32, 0x2f, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78,
+ 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x6e, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61,
+ 0x72, 0x64, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x6a,
+ 0x73, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x42, 0x4d, 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,
@@ -728,9 +728,9 @@ var file_runtime_internal_examplepb_non_standard_names_proto_goTypes = []interfa
(*NonStandardMessage_Thing_SubThing)(nil), // 5: grpc.gateway.runtime.internal.examplepb.NonStandardMessage.Thing.SubThing
(*NonStandardMessageWithJSONNames_Thing)(nil), // 6: grpc.gateway.runtime.internal.examplepb.NonStandardMessageWithJSONNames.Thing
(*NonStandardMessageWithJSONNames_Thing_SubThing)(nil), // 7: grpc.gateway.runtime.internal.examplepb.NonStandardMessageWithJSONNames.Thing.SubThing
- (*_struct.Struct)(nil), // 8: google.protobuf.Struct
- (*_struct.Value)(nil), // 9: google.protobuf.Value
- (*field_mask.FieldMask)(nil), // 10: google.protobuf.FieldMask
+ (*structpb.Struct)(nil), // 8: google.protobuf.Struct
+ (*structpb.Value)(nil), // 9: google.protobuf.Value
+ (*fieldmaskpb.FieldMask)(nil), // 10: google.protobuf.FieldMask
}
var file_runtime_internal_examplepb_non_standard_names_proto_depIdxs = []int32{
4, // 0: grpc.gateway.runtime.internal.examplepb.NonStandardMessage.thing:type_name -> grpc.gateway.runtime.internal.examplepb.NonStandardMessage.Thing
diff --git a/runtime/internal/examplepb/non_standard_names.proto b/runtime/internal/examplepb/non_standard_names.proto
index 7c834a55966..d5d6a9099c6 100644
--- a/runtime/internal/examplepb/non_standard_names.proto
+++ b/runtime/internal/examplepb/non_standard_names.proto
@@ -1,80 +1,82 @@
syntax = "proto3";
-option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/examplepb";
+
package grpc.gateway.runtime.internal.examplepb;
import "google/api/annotations.proto";
import "google/protobuf/field_mask.proto";
import "google/protobuf/struct.proto";
+option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/examplepb";
+
// NonStandardMessage has oddly named fields.
message NonStandardMessage {
- // Id represents the message identifier.
- string id = 1;
- int64 Num = 2;
- int64 line_num = 3;
- string langIdent = 4;
- string STATUS = 5;
- int64 en_GB = 6;
- string no = 7;
+ // Id represents the message identifier.
+ string id = 1;
+ int64 Num = 2;
+ int64 line_num = 3;
+ string langIdent = 4;
+ string STATUS = 5;
+ int64 en_GB = 6;
+ string no = 7;
- message Thing {
- message SubThing {
- string sub_value = 1;
- }
- SubThing subThing = 1;
+ message Thing {
+ message SubThing {
+ string sub_value = 1;
}
- Thing thing = 8;
- google.protobuf.Struct struct_field = 9;
- google.protobuf.Value value_field = 10;
+ SubThing subThing = 1;
+ }
+ Thing thing = 8;
+ google.protobuf.Struct struct_field = 9;
+ google.protobuf.Value value_field = 10;
}
message NonStandardUpdateRequest {
- NonStandardMessage body = 1;
- google.protobuf.FieldMask update_mask = 2;
+ NonStandardMessage body = 1;
+ google.protobuf.FieldMask update_mask = 2;
}
// NonStandardMessageWithJSONNames maps odd field names to odd JSON names for maximum confusion.
message NonStandardMessageWithJSONNames {
- // Id represents the message identifier.
- string id = 1 [json_name="ID"];
- int64 Num = 2 [json_name="Num"];
- int64 line_num = 3 [json_name="LineNum"];
- string langIdent = 4 [json_name="langIdent"];
- string STATUS = 5 [json_name="status"];
- int64 en_GB = 6 [json_name="En_GB"];
- string no = 7 [json_name="yes"];
+ // Id represents the message identifier.
+ string id = 1 [json_name = "ID"];
+ int64 Num = 2 [json_name = "Num"];
+ int64 line_num = 3 [json_name = "LineNum"];
+ string langIdent = 4 [json_name = "langIdent"];
+ string STATUS = 5 [json_name = "status"];
+ int64 en_GB = 6 [json_name = "En_GB"];
+ string no = 7 [json_name = "yes"];
- message Thing {
- message SubThing {
- string sub_value = 1 [json_name="sub_Value"];
- }
- SubThing subThing = 1 [json_name="SubThing"];
+ message Thing {
+ message SubThing {
+ string sub_value = 1 [json_name = "sub_Value"];
}
- Thing thing = 8 [json_name="Thingy"];
- google.protobuf.Struct struct_field = 9 [json_name="StructField"];
- google.protobuf.Value value_field = 10 [json_name="ValueField"];
+ SubThing subThing = 1 [json_name = "SubThing"];
+ }
+ Thing thing = 8 [json_name = "Thingy"];
+ google.protobuf.Struct struct_field = 9 [json_name = "StructField"];
+ google.protobuf.Value value_field = 10 [json_name = "ValueField"];
}
message NonStandardWithJSONNamesUpdateRequest {
- NonStandardMessageWithJSONNames body = 1;
- google.protobuf.FieldMask update_mask = 2;
+ NonStandardMessageWithJSONNames body = 1;
+ google.protobuf.FieldMask update_mask = 2;
}
// NonStandardService responds to incoming messages, applies a field mask and returns the masked response.
service NonStandardService {
- // Apply field mask to empty NonStandardMessage and return result.
- rpc Update(NonStandardUpdateRequest) returns (NonStandardMessage) {
- option (google.api.http) = {
- patch: "/v1/example/non_standard/update"
- body: "body"
- };
- }
+ // Apply field mask to empty NonStandardMessage and return result.
+ rpc Update(NonStandardUpdateRequest) returns (NonStandardMessage) {
+ option (google.api.http) = {
+ patch: "/v1/example/non_standard/update"
+ body: "body"
+ };
+ }
- // Apply field mask to empty NonStandardMessageWithJSONNames and return result.
- rpc UpdateWithJSONNames(NonStandardWithJSONNamesUpdateRequest) returns (NonStandardMessageWithJSONNames) {
- option (google.api.http) = {
- patch: "/v1/example/non_standard/update_with_json_names"
- body: "body"
- };
- }
+ // Apply field mask to empty NonStandardMessageWithJSONNames and return result.
+ rpc UpdateWithJSONNames(NonStandardWithJSONNamesUpdateRequest) returns (NonStandardMessageWithJSONNames) {
+ option (google.api.http) = {
+ patch: "/v1/example/non_standard/update_with_json_names"
+ body: "body"
+ };
+ }
}
diff --git a/runtime/internal/examplepb/non_standard_names.swagger.json b/runtime/internal/examplepb/non_standard_names.swagger.json
index f27b8fb9c89..b2a65636629 100644
--- a/runtime/internal/examplepb/non_standard_names.swagger.json
+++ b/runtime/internal/examplepb/non_standard_names.swagger.json
@@ -130,9 +130,7 @@
"structField": {
"type": "object"
},
- "valueField": {
- "type": "object"
- }
+ "valueField": {}
},
"description": "NonStandardMessage has oddly named fields."
},
@@ -186,9 +184,7 @@
"StructField": {
"type": "object"
},
- "ValueField": {
- "type": "object"
- }
+ "ValueField": {}
},
"description": "NonStandardMessageWithJSONNames maps odd field names to odd JSON names for maximum confusion."
},
@@ -211,17 +207,13 @@
"protobufAny": {
"type": "object",
"properties": {
- "typeUrl": {
+ "@type": {
"type": "string",
"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",
- "format": "byte",
- "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\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 }"
+ "additionalProperties": {},
+ "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 := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(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 }"
},
"protobufNullValue": {
"type": "string",
diff --git a/runtime/internal/examplepb/non_standard_names_grpc.pb.go b/runtime/internal/examplepb/non_standard_names_grpc.pb.go
index 0a7d9adb7c1..545ead36357 100644
--- a/runtime/internal/examplepb/non_standard_names_grpc.pb.go
+++ b/runtime/internal/examplepb/non_standard_names_grpc.pb.go
@@ -11,6 +11,7 @@ import (
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
+// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// NonStandardServiceClient is the client API for NonStandardService service.
@@ -77,8 +78,8 @@ type UnsafeNonStandardServiceServer interface {
mustEmbedUnimplementedNonStandardServiceServer()
}
-func RegisterNonStandardServiceServer(s *grpc.Server, srv NonStandardServiceServer) {
- s.RegisterService(&_NonStandardService_serviceDesc, srv)
+func RegisterNonStandardServiceServer(s grpc.ServiceRegistrar, srv NonStandardServiceServer) {
+ s.RegisterService(&NonStandardService_ServiceDesc, srv)
}
func _NonStandardService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
@@ -117,7 +118,10 @@ func _NonStandardService_UpdateWithJSONNames_Handler(srv interface{}, ctx contex
return interceptor(ctx, in, info, handler)
}
-var _NonStandardService_serviceDesc = grpc.ServiceDesc{
+// NonStandardService_ServiceDesc is the grpc.ServiceDesc for NonStandardService service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var NonStandardService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "grpc.gateway.runtime.internal.examplepb.NonStandardService",
HandlerType: (*NonStandardServiceServer)(nil),
Methods: []grpc.MethodDesc{
diff --git a/runtime/internal/examplepb/proto2.pb.go b/runtime/internal/examplepb/proto2.pb.go
index e297db629c5..7a103287f42 100644
--- a/runtime/internal/examplepb/proto2.pb.go
+++ b/runtime/internal/examplepb/proto2.pb.go
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.26.0
-// protoc v3.13.0
+// protoc-gen-go v1.27.1
+// protoc (unknown)
// source: runtime/internal/examplepb/proto2.proto
package examplepb
diff --git a/runtime/internal/examplepb/proto2.swagger.json b/runtime/internal/examplepb/proto2.swagger.json
index 4d5edadd07d..4b74065b8c6 100644
--- a/runtime/internal/examplepb/proto2.swagger.json
+++ b/runtime/internal/examplepb/proto2.swagger.json
@@ -15,17 +15,13 @@
"protobufAny": {
"type": "object",
"properties": {
- "typeUrl": {
+ "@type": {
"type": "string",
"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",
- "format": "byte",
- "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\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 }"
+ "additionalProperties": {},
+ "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 := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(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 }"
},
"rpcStatus": {
"type": "object",
diff --git a/runtime/internal/examplepb/proto3.pb.go b/runtime/internal/examplepb/proto3.pb.go
index 3306210cbf9..a6071398d4c 100644
--- a/runtime/internal/examplepb/proto3.pb.go
+++ b/runtime/internal/examplepb/proto3.pb.go
@@ -1,18 +1,19 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.26.0
-// protoc v3.13.0
+// protoc-gen-go v1.27.1
+// protoc (unknown)
// source: runtime/internal/examplepb/proto3.proto
package examplepb
import (
- duration "github.com/golang/protobuf/ptypes/duration"
- timestamp "github.com/golang/protobuf/ptypes/timestamp"
- wrappers "github.com/golang/protobuf/ptypes/wrappers"
- field_mask "google.golang.org/genproto/protobuf/field_mask"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ durationpb "google.golang.org/protobuf/types/known/durationpb"
+ fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb"
+ structpb "google.golang.org/protobuf/types/known/structpb"
+ timestamppb "google.golang.org/protobuf/types/known/timestamppb"
+ wrapperspb "google.golang.org/protobuf/types/known/wrapperspb"
reflect "reflect"
sync "sync"
)
@@ -78,51 +79,56 @@ type Proto3Message struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- // Next number: 46
- Nested *Proto3Message `protobuf:"bytes,41,opt,name=nested,proto3" json:"nested,omitempty"`
- FloatValue float32 `protobuf:"fixed32,42,opt,name=float_value,json=floatValue,proto3" json:"float_value,omitempty"`
- DoubleValue float64 `protobuf:"fixed64,43,opt,name=double_value,json=doubleValue,proto3" json:"double_value,omitempty"`
- Int64Value int64 `protobuf:"varint,3,opt,name=int64_value,json=int64Value,proto3" json:"int64_value,omitempty"`
- Int32Value int32 `protobuf:"varint,4,opt,name=int32_value,json=int32Value,proto3" json:"int32_value,omitempty"`
- Uint64Value uint64 `protobuf:"varint,5,opt,name=uint64_value,json=uint64Value,proto3" json:"uint64_value,omitempty"`
- Uint32Value uint32 `protobuf:"varint,6,opt,name=uint32_value,json=uint32Value,proto3" json:"uint32_value,omitempty"`
- BoolValue bool `protobuf:"varint,7,opt,name=bool_value,json=boolValue,proto3" json:"bool_value,omitempty"`
- StringValue string `protobuf:"bytes,8,opt,name=string_value,json=stringValue,proto3" json:"string_value,omitempty"`
- BytesValue []byte `protobuf:"bytes,9,opt,name=bytes_value,json=bytesValue,proto3" json:"bytes_value,omitempty"`
- RepeatedValue []string `protobuf:"bytes,10,rep,name=repeated_value,json=repeatedValue,proto3" json:"repeated_value,omitempty"`
- RepeatedMessage []*wrappers.UInt64Value `protobuf:"bytes,44,rep,name=repeated_message,json=repeatedMessage,proto3" json:"repeated_message,omitempty"`
- EnumValue EnumValue `protobuf:"varint,11,opt,name=enum_value,json=enumValue,proto3,enum=grpc.gateway.runtime.internal.examplepb.EnumValue" json:"enum_value,omitempty"`
- RepeatedEnum []EnumValue `protobuf:"varint,12,rep,packed,name=repeated_enum,json=repeatedEnum,proto3,enum=grpc.gateway.runtime.internal.examplepb.EnumValue" json:"repeated_enum,omitempty"`
- TimestampValue *timestamp.Timestamp `protobuf:"bytes,13,opt,name=timestamp_value,json=timestampValue,proto3" json:"timestamp_value,omitempty"`
- DurationValue *duration.Duration `protobuf:"bytes,14,opt,name=duration_value,json=durationValue,proto3" json:"duration_value,omitempty"`
- FieldmaskValue *field_mask.FieldMask `protobuf:"bytes,15,opt,name=fieldmask_value,json=fieldmaskValue,proto3" json:"fieldmask_value,omitempty"`
+ // Next number: 49
+ Nested *Proto3Message `protobuf:"bytes,41,opt,name=nested,proto3" json:"nested,omitempty"`
+ FloatValue float32 `protobuf:"fixed32,42,opt,name=float_value,json=floatValue,proto3" json:"float_value,omitempty"`
+ DoubleValue float64 `protobuf:"fixed64,43,opt,name=double_value,json=doubleValue,proto3" json:"double_value,omitempty"`
+ Int64Value int64 `protobuf:"varint,3,opt,name=int64_value,json=int64Value,proto3" json:"int64_value,omitempty"`
+ Int32Value int32 `protobuf:"varint,4,opt,name=int32_value,json=int32Value,proto3" json:"int32_value,omitempty"`
+ Uint64Value uint64 `protobuf:"varint,5,opt,name=uint64_value,json=uint64Value,proto3" json:"uint64_value,omitempty"`
+ Uint32Value uint32 `protobuf:"varint,6,opt,name=uint32_value,json=uint32Value,proto3" json:"uint32_value,omitempty"`
+ BoolValue bool `protobuf:"varint,7,opt,name=bool_value,json=boolValue,proto3" json:"bool_value,omitempty"`
+ StringValue string `protobuf:"bytes,8,opt,name=string_value,json=stringValue,proto3" json:"string_value,omitempty"`
+ BytesValue []byte `protobuf:"bytes,9,opt,name=bytes_value,json=bytesValue,proto3" json:"bytes_value,omitempty"`
+ RepeatedValue []string `protobuf:"bytes,10,rep,name=repeated_value,json=repeatedValue,proto3" json:"repeated_value,omitempty"`
+ RepeatedMessage []*wrapperspb.UInt64Value `protobuf:"bytes,44,rep,name=repeated_message,json=repeatedMessage,proto3" json:"repeated_message,omitempty"`
+ EnumValue EnumValue `protobuf:"varint,11,opt,name=enum_value,json=enumValue,proto3,enum=grpc.gateway.runtime.internal.examplepb.EnumValue" json:"enum_value,omitempty"`
+ RepeatedEnum []EnumValue `protobuf:"varint,12,rep,packed,name=repeated_enum,json=repeatedEnum,proto3,enum=grpc.gateway.runtime.internal.examplepb.EnumValue" json:"repeated_enum,omitempty"`
+ TimestampValue *timestamppb.Timestamp `protobuf:"bytes,13,opt,name=timestamp_value,json=timestampValue,proto3" json:"timestamp_value,omitempty"`
+ DurationValue *durationpb.Duration `protobuf:"bytes,14,opt,name=duration_value,json=durationValue,proto3" json:"duration_value,omitempty"`
+ FieldmaskValue *fieldmaskpb.FieldMask `protobuf:"bytes,15,opt,name=fieldmask_value,json=fieldmaskValue,proto3" json:"fieldmask_value,omitempty"`
// Types that are assignable to OneofValue:
// *Proto3Message_OneofBoolValue
// *Proto3Message_OneofStringValue
- OneofValue isProto3Message_OneofValue `protobuf_oneof:"oneof_value"`
- WrapperDoubleValue *wrappers.DoubleValue `protobuf:"bytes,17,opt,name=wrapper_double_value,json=wrapperDoubleValue,proto3" json:"wrapper_double_value,omitempty"`
- WrapperFloatValue *wrappers.FloatValue `protobuf:"bytes,18,opt,name=wrapper_float_value,json=wrapperFloatValue,proto3" json:"wrapper_float_value,omitempty"`
- WrapperInt64Value *wrappers.Int64Value `protobuf:"bytes,19,opt,name=wrapper_int64_value,json=wrapperInt64Value,proto3" json:"wrapper_int64_value,omitempty"`
- WrapperInt32Value *wrappers.Int32Value `protobuf:"bytes,20,opt,name=wrapper_int32_value,json=wrapperInt32Value,proto3" json:"wrapper_int32_value,omitempty"`
- WrapperUInt64Value *wrappers.UInt64Value `protobuf:"bytes,21,opt,name=wrapper_u_int64_value,json=wrapperUInt64Value,proto3" json:"wrapper_u_int64_value,omitempty"`
- WrapperUInt32Value *wrappers.UInt32Value `protobuf:"bytes,22,opt,name=wrapper_u_int32_value,json=wrapperUInt32Value,proto3" json:"wrapper_u_int32_value,omitempty"`
- WrapperBoolValue *wrappers.BoolValue `protobuf:"bytes,23,opt,name=wrapper_bool_value,json=wrapperBoolValue,proto3" json:"wrapper_bool_value,omitempty"`
- WrapperStringValue *wrappers.StringValue `protobuf:"bytes,24,opt,name=wrapper_string_value,json=wrapperStringValue,proto3" json:"wrapper_string_value,omitempty"`
- WrapperBytesValue *wrappers.BytesValue `protobuf:"bytes,25,opt,name=wrapper_bytes_value,json=wrapperBytesValue,proto3" json:"wrapper_bytes_value,omitempty"`
- MapValue map[string]string `protobuf:"bytes,26,rep,name=map_value,json=mapValue,proto3" json:"map_value,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
- MapValue2 map[string]int32 `protobuf:"bytes,27,rep,name=map_value2,json=mapValue2,proto3" json:"map_value2,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
- MapValue3 map[int32]string `protobuf:"bytes,28,rep,name=map_value3,json=mapValue3,proto3" json:"map_value3,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
- MapValue4 map[string]int64 `protobuf:"bytes,29,rep,name=map_value4,json=mapValue4,proto3" json:"map_value4,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
- MapValue5 map[int64]string `protobuf:"bytes,30,rep,name=map_value5,json=mapValue5,proto3" json:"map_value5,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
- MapValue6 map[string]uint32 `protobuf:"bytes,31,rep,name=map_value6,json=mapValue6,proto3" json:"map_value6,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
- MapValue7 map[uint32]string `protobuf:"bytes,32,rep,name=map_value7,json=mapValue7,proto3" json:"map_value7,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
- MapValue8 map[string]uint64 `protobuf:"bytes,33,rep,name=map_value8,json=mapValue8,proto3" json:"map_value8,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
- MapValue9 map[uint64]string `protobuf:"bytes,34,rep,name=map_value9,json=mapValue9,proto3" json:"map_value9,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
- MapValue10 map[string]float32 `protobuf:"bytes,35,rep,name=map_value10,json=mapValue10,proto3" json:"map_value10,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"`
- MapValue12 map[string]float64 `protobuf:"bytes,37,rep,name=map_value12,json=mapValue12,proto3" json:"map_value12,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"`
- MapValue14 map[string]bool `protobuf:"bytes,39,rep,name=map_value14,json=mapValue14,proto3" json:"map_value14,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
- MapValue15 map[bool]string `protobuf:"bytes,40,rep,name=map_value15,json=mapValue15,proto3" json:"map_value15,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
- MapValue16 map[string]*wrappers.UInt64Value `protobuf:"bytes,45,rep,name=map_value16,json=mapValue16,proto3" json:"map_value16,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ OneofValue isProto3Message_OneofValue `protobuf_oneof:"oneof_value"`
+ // Types that are assignable to NestedOneofValue:
+ // *Proto3Message_NestedOneofValueOne
+ NestedOneofValue isProto3Message_NestedOneofValue `protobuf_oneof:"nested_oneof_value"`
+ WrapperDoubleValue *wrapperspb.DoubleValue `protobuf:"bytes,17,opt,name=wrapper_double_value,json=wrapperDoubleValue,proto3" json:"wrapper_double_value,omitempty"`
+ WrapperFloatValue *wrapperspb.FloatValue `protobuf:"bytes,18,opt,name=wrapper_float_value,json=wrapperFloatValue,proto3" json:"wrapper_float_value,omitempty"`
+ WrapperInt64Value *wrapperspb.Int64Value `protobuf:"bytes,19,opt,name=wrapper_int64_value,json=wrapperInt64Value,proto3" json:"wrapper_int64_value,omitempty"`
+ WrapperInt32Value *wrapperspb.Int32Value `protobuf:"bytes,20,opt,name=wrapper_int32_value,json=wrapperInt32Value,proto3" json:"wrapper_int32_value,omitempty"`
+ WrapperUInt64Value *wrapperspb.UInt64Value `protobuf:"bytes,21,opt,name=wrapper_u_int64_value,json=wrapperUInt64Value,proto3" json:"wrapper_u_int64_value,omitempty"`
+ WrapperUInt32Value *wrapperspb.UInt32Value `protobuf:"bytes,22,opt,name=wrapper_u_int32_value,json=wrapperUInt32Value,proto3" json:"wrapper_u_int32_value,omitempty"`
+ WrapperBoolValue *wrapperspb.BoolValue `protobuf:"bytes,23,opt,name=wrapper_bool_value,json=wrapperBoolValue,proto3" json:"wrapper_bool_value,omitempty"`
+ WrapperStringValue *wrapperspb.StringValue `protobuf:"bytes,24,opt,name=wrapper_string_value,json=wrapperStringValue,proto3" json:"wrapper_string_value,omitempty"`
+ WrapperBytesValue *wrapperspb.BytesValue `protobuf:"bytes,25,opt,name=wrapper_bytes_value,json=wrapperBytesValue,proto3" json:"wrapper_bytes_value,omitempty"`
+ MapValue map[string]string `protobuf:"bytes,26,rep,name=map_value,json=mapValue,proto3" json:"map_value,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ MapValue2 map[string]int32 `protobuf:"bytes,27,rep,name=map_value2,json=mapValue2,proto3" json:"map_value2,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
+ MapValue3 map[int32]string `protobuf:"bytes,28,rep,name=map_value3,json=mapValue3,proto3" json:"map_value3,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ MapValue4 map[string]int64 `protobuf:"bytes,29,rep,name=map_value4,json=mapValue4,proto3" json:"map_value4,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
+ MapValue5 map[int64]string `protobuf:"bytes,30,rep,name=map_value5,json=mapValue5,proto3" json:"map_value5,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ MapValue6 map[string]uint32 `protobuf:"bytes,31,rep,name=map_value6,json=mapValue6,proto3" json:"map_value6,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
+ MapValue7 map[uint32]string `protobuf:"bytes,32,rep,name=map_value7,json=mapValue7,proto3" json:"map_value7,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ MapValue8 map[string]uint64 `protobuf:"bytes,33,rep,name=map_value8,json=mapValue8,proto3" json:"map_value8,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
+ MapValue9 map[uint64]string `protobuf:"bytes,34,rep,name=map_value9,json=mapValue9,proto3" json:"map_value9,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ MapValue10 map[string]float32 `protobuf:"bytes,35,rep,name=map_value10,json=mapValue10,proto3" json:"map_value10,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"`
+ MapValue12 map[string]float64 `protobuf:"bytes,37,rep,name=map_value12,json=mapValue12,proto3" json:"map_value12,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"`
+ MapValue14 map[string]bool `protobuf:"bytes,39,rep,name=map_value14,json=mapValue14,proto3" json:"map_value14,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
+ MapValue15 map[bool]string `protobuf:"bytes,40,rep,name=map_value15,json=mapValue15,proto3" json:"map_value15,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ MapValue16 map[string]*wrapperspb.UInt64Value `protobuf:"bytes,45,rep,name=map_value16,json=mapValue16,proto3" json:"map_value16,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ StructValueValue *structpb.Value `protobuf:"bytes,47,opt,name=struct_value_value,json=structValueValue,proto3" json:"struct_value_value,omitempty"`
+ StructValue *structpb.Struct `protobuf:"bytes,48,opt,name=struct_value,json=structValue,proto3" json:"struct_value,omitempty"`
}
func (x *Proto3Message) Reset() {
@@ -234,7 +240,7 @@ func (x *Proto3Message) GetRepeatedValue() []string {
return nil
}
-func (x *Proto3Message) GetRepeatedMessage() []*wrappers.UInt64Value {
+func (x *Proto3Message) GetRepeatedMessage() []*wrapperspb.UInt64Value {
if x != nil {
return x.RepeatedMessage
}
@@ -255,21 +261,21 @@ func (x *Proto3Message) GetRepeatedEnum() []EnumValue {
return nil
}
-func (x *Proto3Message) GetTimestampValue() *timestamp.Timestamp {
+func (x *Proto3Message) GetTimestampValue() *timestamppb.Timestamp {
if x != nil {
return x.TimestampValue
}
return nil
}
-func (x *Proto3Message) GetDurationValue() *duration.Duration {
+func (x *Proto3Message) GetDurationValue() *durationpb.Duration {
if x != nil {
return x.DurationValue
}
return nil
}
-func (x *Proto3Message) GetFieldmaskValue() *field_mask.FieldMask {
+func (x *Proto3Message) GetFieldmaskValue() *fieldmaskpb.FieldMask {
if x != nil {
return x.FieldmaskValue
}
@@ -297,63 +303,77 @@ func (x *Proto3Message) GetOneofStringValue() string {
return ""
}
-func (x *Proto3Message) GetWrapperDoubleValue() *wrappers.DoubleValue {
+func (m *Proto3Message) GetNestedOneofValue() isProto3Message_NestedOneofValue {
+ if m != nil {
+ return m.NestedOneofValue
+ }
+ return nil
+}
+
+func (x *Proto3Message) GetNestedOneofValueOne() *Proto3Message {
+ if x, ok := x.GetNestedOneofValue().(*Proto3Message_NestedOneofValueOne); ok {
+ return x.NestedOneofValueOne
+ }
+ return nil
+}
+
+func (x *Proto3Message) GetWrapperDoubleValue() *wrapperspb.DoubleValue {
if x != nil {
return x.WrapperDoubleValue
}
return nil
}
-func (x *Proto3Message) GetWrapperFloatValue() *wrappers.FloatValue {
+func (x *Proto3Message) GetWrapperFloatValue() *wrapperspb.FloatValue {
if x != nil {
return x.WrapperFloatValue
}
return nil
}
-func (x *Proto3Message) GetWrapperInt64Value() *wrappers.Int64Value {
+func (x *Proto3Message) GetWrapperInt64Value() *wrapperspb.Int64Value {
if x != nil {
return x.WrapperInt64Value
}
return nil
}
-func (x *Proto3Message) GetWrapperInt32Value() *wrappers.Int32Value {
+func (x *Proto3Message) GetWrapperInt32Value() *wrapperspb.Int32Value {
if x != nil {
return x.WrapperInt32Value
}
return nil
}
-func (x *Proto3Message) GetWrapperUInt64Value() *wrappers.UInt64Value {
+func (x *Proto3Message) GetWrapperUInt64Value() *wrapperspb.UInt64Value {
if x != nil {
return x.WrapperUInt64Value
}
return nil
}
-func (x *Proto3Message) GetWrapperUInt32Value() *wrappers.UInt32Value {
+func (x *Proto3Message) GetWrapperUInt32Value() *wrapperspb.UInt32Value {
if x != nil {
return x.WrapperUInt32Value
}
return nil
}
-func (x *Proto3Message) GetWrapperBoolValue() *wrappers.BoolValue {
+func (x *Proto3Message) GetWrapperBoolValue() *wrapperspb.BoolValue {
if x != nil {
return x.WrapperBoolValue
}
return nil
}
-func (x *Proto3Message) GetWrapperStringValue() *wrappers.StringValue {
+func (x *Proto3Message) GetWrapperStringValue() *wrapperspb.StringValue {
if x != nil {
return x.WrapperStringValue
}
return nil
}
-func (x *Proto3Message) GetWrapperBytesValue() *wrappers.BytesValue {
+func (x *Proto3Message) GetWrapperBytesValue() *wrapperspb.BytesValue {
if x != nil {
return x.WrapperBytesValue
}
@@ -451,13 +471,27 @@ func (x *Proto3Message) GetMapValue15() map[bool]string {
return nil
}
-func (x *Proto3Message) GetMapValue16() map[string]*wrappers.UInt64Value {
+func (x *Proto3Message) GetMapValue16() map[string]*wrapperspb.UInt64Value {
if x != nil {
return x.MapValue16
}
return nil
}
+func (x *Proto3Message) GetStructValueValue() *structpb.Value {
+ if x != nil {
+ return x.StructValueValue
+ }
+ return nil
+}
+
+func (x *Proto3Message) GetStructValue() *structpb.Struct {
+ if x != nil {
+ return x.StructValue
+ }
+ return nil
+}
+
type isProto3Message_OneofValue interface {
isProto3Message_OneofValue()
}
@@ -474,6 +508,16 @@ func (*Proto3Message_OneofBoolValue) isProto3Message_OneofValue() {}
func (*Proto3Message_OneofStringValue) isProto3Message_OneofValue() {}
+type isProto3Message_NestedOneofValue interface {
+ isProto3Message_NestedOneofValue()
+}
+
+type Proto3Message_NestedOneofValueOne struct {
+ NestedOneofValueOne *Proto3Message `protobuf:"bytes,46,opt,name=nested_oneof_value_one,json=nestedOneofValueOne,proto3,oneof"`
+}
+
+func (*Proto3Message_NestedOneofValueOne) isProto3Message_NestedOneofValue() {}
+
var File_runtime_internal_examplepb_proto3_proto protoreflect.FileDescriptor
var file_runtime_internal_examplepb_proto3_proto_rawDesc = []byte{
@@ -486,271 +530,289 @@ var file_runtime_internal_examplepb_proto3_proto_rawDesc = []byte{
0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70,
- 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f,
- 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e,
- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72,
- 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e,
- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc7, 0x1f, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33,
- 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x4e, 0x0a, 0x06, 0x6e, 0x65, 0x73, 0x74, 0x65,
- 0x64, 0x18, 0x29, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67,
- 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x69,
- 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70,
- 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52,
- 0x06, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x6c, 0x6f, 0x61, 0x74,
- 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x2a, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0a, 0x66, 0x6c,
- 0x6f, 0x61, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62,
- 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x2b, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b,
- 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x69,
- 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03,
- 0x52, 0x0a, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x0b,
- 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28,
- 0x05, 0x52, 0x0a, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a,
- 0x0c, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20,
- 0x01, 0x28, 0x04, 0x52, 0x0b, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65,
- 0x12, 0x21, 0x0a, 0x0c, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65,
- 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61,
- 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75,
- 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x62, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c,
- 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c,
- 0x75, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67,
- 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x76,
- 0x61, 0x6c, 0x75, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x62, 0x79, 0x74, 0x65,
- 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74,
- 0x65, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d,
- 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x47, 0x0a,
- 0x10, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
- 0x65, 0x18, 0x2c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
- 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34,
- 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x4d,
- 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x51, 0x0a, 0x0a, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x76,
- 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x32, 0x2e, 0x67, 0x72, 0x70,
- 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d,
- 0x65, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70,
- 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09,
- 0x65, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x57, 0x0a, 0x0d, 0x72, 0x65, 0x70,
- 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0e,
- 0x32, 0x32, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e,
- 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c,
- 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56,
- 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x45, 0x6e,
- 0x75, 0x6d, 0x12, 0x43, 0x0a, 0x0f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f,
- 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f,
- 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69,
- 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0e, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61,
- 0x6d, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x40, 0x0a, 0x0e, 0x64, 0x75, 0x72, 0x61, 0x74,
- 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32,
- 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
- 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x64, 0x75, 0x72, 0x61,
- 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x43, 0x0a, 0x0f, 0x66, 0x69, 0x65,
- 0x6c, 0x64, 0x6d, 0x61, 0x73, 0x6b, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0f, 0x20, 0x01,
- 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0e,
- 0x66, 0x69, 0x65, 0x6c, 0x64, 0x6d, 0x61, 0x73, 0x6b, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2a,
- 0x0a, 0x10, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x76, 0x61, 0x6c,
- 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0e, 0x6f, 0x6e, 0x65, 0x6f,
- 0x66, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2e, 0x0a, 0x12, 0x6f, 0x6e,
- 0x65, 0x6f, 0x66, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65,
- 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x10, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x53,
- 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x4e, 0x0a, 0x14, 0x77, 0x72,
- 0x61, 0x70, 0x70, 0x65, 0x72, 0x5f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c,
- 0x75, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
- 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x6f, 0x75, 0x62, 0x6c,
- 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x12, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x44,
- 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x4b, 0x0a, 0x13, 0x77, 0x72,
- 0x61, 0x70, 0x70, 0x65, 0x72, 0x5f, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75,
- 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
- 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x56,
- 0x61, 0x6c, 0x75, 0x65, 0x52, 0x11, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x46, 0x6c, 0x6f,
- 0x61, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x4b, 0x0a, 0x13, 0x77, 0x72, 0x61, 0x70, 0x70,
- 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x13,
+ 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x22, 0xce, 0x21, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x4d, 0x65,
+ 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x4e, 0x0a, 0x06, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x18,
+ 0x29, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74,
+ 0x65, 0x77, 0x61, 0x79, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x69, 0x6e, 0x74,
+ 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e,
+ 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x06, 0x6e,
+ 0x65, 0x73, 0x74, 0x65, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x5f, 0x76,
+ 0x61, 0x6c, 0x75, 0x65, 0x18, 0x2a, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0a, 0x66, 0x6c, 0x6f, 0x61,
+ 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65,
+ 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x2b, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x64, 0x6f,
+ 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, 0x74,
+ 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a,
+ 0x69, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e,
+ 0x74, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52,
+ 0x0a, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x75,
+ 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28,
+ 0x04, 0x52, 0x0b, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21,
+ 0x0a, 0x0c, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06,
+ 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75,
+ 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,
+ 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x62, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65,
+ 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65,
+ 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61,
+ 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x76, 0x61, 0x6c,
+ 0x75, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x62, 0x79, 0x74, 0x65, 0x73, 0x56,
+ 0x61, 0x6c, 0x75, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64,
+ 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65,
+ 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x47, 0x0a, 0x10, 0x72,
+ 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18,
+ 0x2c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61,
+ 0x6c, 0x75, 0x65, 0x52, 0x0f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73,
+ 0x73, 0x61, 0x67, 0x65, 0x12, 0x51, 0x0a, 0x0a, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x76, 0x61, 0x6c,
+ 0x75, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x32, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e,
+ 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e,
+ 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65,
+ 0x70, 0x62, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x65, 0x6e,
+ 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x57, 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x65, 0x61,
+ 0x74, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x32,
+ 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x72, 0x75,
+ 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x65,
+ 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c,
+ 0x75, 0x65, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d,
+ 0x12, 0x43, 0x0a, 0x0f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x76, 0x61,
+ 0x6c, 0x75, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
+ 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65,
+ 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0e, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70,
+ 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x40, 0x0a, 0x0e, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e,
+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
+ 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x43, 0x0a, 0x0f, 0x66, 0x69, 0x65, 0x6c, 0x64,
+ 0x6d, 0x61, 0x73, 0x6b, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
+ 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0e, 0x66, 0x69,
+ 0x65, 0x6c, 0x64, 0x6d, 0x61, 0x73, 0x6b, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2a, 0x0a, 0x10,
+ 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0e, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x42,
+ 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2e, 0x0a, 0x12, 0x6f, 0x6e, 0x65, 0x6f,
+ 0x66, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x10, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x53, 0x74, 0x72,
+ 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x6d, 0x0a, 0x16, 0x6e, 0x65, 0x73, 0x74,
+ 0x65, 0x64, 0x5f, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x6f,
+ 0x6e, 0x65, 0x18, 0x2e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e,
+ 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e,
+ 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65,
+ 0x70, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
+ 0x48, 0x01, 0x52, 0x13, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x56,
+ 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x6e, 0x65, 0x12, 0x4e, 0x0a, 0x14, 0x77, 0x72, 0x61, 0x70, 0x70,
+ 0x65, 0x72, 0x5f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,
+ 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61,
+ 0x6c, 0x75, 0x65, 0x52, 0x12, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x44, 0x6f, 0x75, 0x62,
+ 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x4b, 0x0a, 0x13, 0x77, 0x72, 0x61, 0x70, 0x70,
+ 0x65, 0x72, 0x5f, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x12,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
- 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75,
- 0x65, 0x52, 0x11, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56,
+ 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x56, 0x61, 0x6c, 0x75,
+ 0x65, 0x52, 0x11, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x56,
0x61, 0x6c, 0x75, 0x65, 0x12, 0x4b, 0x0a, 0x13, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x5f,
- 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x14, 0x20, 0x01, 0x28,
+ 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x13, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
- 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x11,
- 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75,
- 0x65, 0x12, 0x4f, 0x0a, 0x15, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x5f, 0x75, 0x5f, 0x69,
- 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b,
- 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
- 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x12,
- 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c,
- 0x75, 0x65, 0x12, 0x4f, 0x0a, 0x15, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x5f, 0x75, 0x5f,
- 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x16, 0x20, 0x01, 0x28,
- 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
- 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52,
- 0x12, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61,
- 0x6c, 0x75, 0x65, 0x12, 0x48, 0x0a, 0x12, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x5f, 0x62,
- 0x6f, 0x6f, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32,
- 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
- 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x10, 0x77, 0x72, 0x61,
- 0x70, 0x70, 0x65, 0x72, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x4e, 0x0a,
- 0x14, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f,
- 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f,
- 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74,
- 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x12, 0x77, 0x72, 0x61, 0x70, 0x70,
- 0x65, 0x72, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x4b, 0x0a,
- 0x13, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x76,
- 0x61, 0x6c, 0x75, 0x65, 0x18, 0x19, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f,
- 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x79, 0x74,
- 0x65, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x11, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72,
- 0x42, 0x79, 0x74, 0x65, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x61, 0x0a, 0x09, 0x6d, 0x61,
- 0x70, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x1a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x44, 0x2e,
- 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x72, 0x75, 0x6e,
- 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x65, 0x78,
- 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x4d, 0x65,
- 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x6e,
- 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x64, 0x0a,
- 0x0a, 0x6d, 0x61, 0x70, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x32, 0x18, 0x1b, 0x20, 0x03, 0x28,
- 0x0b, 0x32, 0x45, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79,
- 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61,
- 0x6c, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x74,
- 0x6f, 0x33, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c,
- 0x75, 0x65, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x6d, 0x61, 0x70, 0x56, 0x61, 0x6c,
- 0x75, 0x65, 0x32, 0x12, 0x64, 0x0a, 0x0a, 0x6d, 0x61, 0x70, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65,
- 0x33, 0x18, 0x1c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67,
- 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x69,
- 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70,
- 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e,
- 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x33, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09,
- 0x6d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x33, 0x12, 0x64, 0x0a, 0x0a, 0x6d, 0x61, 0x70,
- 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x34, 0x18, 0x1d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x45, 0x2e,
- 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x72, 0x75, 0x6e,
- 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x65, 0x78,
- 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x4d, 0x65,
- 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x34, 0x45,
- 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x6d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x34, 0x12,
- 0x64, 0x0a, 0x0a, 0x6d, 0x61, 0x70, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x35, 0x18, 0x1e, 0x20,
- 0x03, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77,
- 0x61, 0x79, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72,
- 0x6e, 0x61, 0x6c, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x50, 0x72,
- 0x6f, 0x74, 0x6f, 0x33, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4d, 0x61, 0x70, 0x56,
- 0x61, 0x6c, 0x75, 0x65, 0x35, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x6d, 0x61, 0x70, 0x56,
- 0x61, 0x6c, 0x75, 0x65, 0x35, 0x12, 0x64, 0x0a, 0x0a, 0x6d, 0x61, 0x70, 0x5f, 0x76, 0x61, 0x6c,
- 0x75, 0x65, 0x36, 0x18, 0x1f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x67, 0x72, 0x70, 0x63,
- 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65,
- 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c,
- 0x65, 0x70, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
- 0x65, 0x2e, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x36, 0x45, 0x6e, 0x74, 0x72, 0x79,
- 0x52, 0x09, 0x6d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x36, 0x12, 0x64, 0x0a, 0x0a, 0x6d,
- 0x61, 0x70, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x37, 0x18, 0x20, 0x20, 0x03, 0x28, 0x0b, 0x32,
- 0x45, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x72,
- 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e,
- 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33,
- 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65,
- 0x37, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x6d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65,
- 0x37, 0x12, 0x64, 0x0a, 0x0a, 0x6d, 0x61, 0x70, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x38, 0x18,
- 0x21, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74,
- 0x65, 0x77, 0x61, 0x79, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x69, 0x6e, 0x74,
- 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e,
- 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4d, 0x61,
- 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x38, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x6d, 0x61,
- 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x38, 0x12, 0x64, 0x0a, 0x0a, 0x6d, 0x61, 0x70, 0x5f, 0x76,
- 0x61, 0x6c, 0x75, 0x65, 0x39, 0x18, 0x22, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x67, 0x72,
- 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69,
- 0x6d, 0x65, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x65, 0x78, 0x61, 0x6d,
- 0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x4d, 0x65, 0x73, 0x73,
- 0x61, 0x67, 0x65, 0x2e, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x39, 0x45, 0x6e, 0x74,
- 0x72, 0x79, 0x52, 0x09, 0x6d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x39, 0x12, 0x67, 0x0a,
- 0x0b, 0x6d, 0x61, 0x70, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x31, 0x30, 0x18, 0x23, 0x20, 0x03,
- 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61,
- 0x79, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e,
- 0x61, 0x6c, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x50, 0x72, 0x6f,
- 0x74, 0x6f, 0x33, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4d, 0x61, 0x70, 0x56, 0x61,
- 0x6c, 0x75, 0x65, 0x31, 0x30, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x6d, 0x61, 0x70, 0x56,
- 0x61, 0x6c, 0x75, 0x65, 0x31, 0x30, 0x12, 0x67, 0x0a, 0x0b, 0x6d, 0x61, 0x70, 0x5f, 0x76, 0x61,
- 0x6c, 0x75, 0x65, 0x31, 0x32, 0x18, 0x25, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x67, 0x72,
- 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69,
- 0x6d, 0x65, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x65, 0x78, 0x61, 0x6d,
- 0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x4d, 0x65, 0x73, 0x73,
- 0x61, 0x67, 0x65, 0x2e, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x31, 0x32, 0x45, 0x6e,
- 0x74, 0x72, 0x79, 0x52, 0x0a, 0x6d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x31, 0x32, 0x12,
- 0x67, 0x0a, 0x0b, 0x6d, 0x61, 0x70, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x31, 0x34, 0x18, 0x27,
- 0x20, 0x03, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65,
+ 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x11,
+ 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75,
+ 0x65, 0x12, 0x4b, 0x0a, 0x13, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x74,
+ 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b,
+ 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
+ 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x11, 0x77, 0x72, 0x61,
+ 0x70, 0x70, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x4f,
+ 0x0a, 0x15, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x5f, 0x75, 0x5f, 0x69, 0x6e, 0x74, 0x36,
+ 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e,
+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
+ 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x12, 0x77, 0x72, 0x61,
+ 0x70, 0x70, 0x65, 0x72, 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12,
+ 0x4f, 0x0a, 0x15, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x5f, 0x75, 0x5f, 0x69, 0x6e, 0x74,
+ 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c,
+ 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
+ 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x12, 0x77, 0x72,
+ 0x61, 0x70, 0x70, 0x65, 0x72, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65,
+ 0x12, 0x48, 0x0a, 0x12, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x5f, 0x62, 0x6f, 0x6f, 0x6c,
+ 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67,
+ 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42,
+ 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x10, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65,
+ 0x72, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x4e, 0x0a, 0x14, 0x77, 0x72,
+ 0x61, 0x70, 0x70, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c,
+ 0x75, 0x65, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e,
+ 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x12, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x53,
+ 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x4b, 0x0a, 0x13, 0x77, 0x72,
+ 0x61, 0x70, 0x70, 0x65, 0x72, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x75,
+ 0x65, 0x18, 0x19, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x79, 0x74, 0x65, 0x73, 0x56,
+ 0x61, 0x6c, 0x75, 0x65, 0x52, 0x11, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x42, 0x79, 0x74,
+ 0x65, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x61, 0x0a, 0x09, 0x6d, 0x61, 0x70, 0x5f, 0x76,
+ 0x61, 0x6c, 0x75, 0x65, 0x18, 0x1a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x67, 0x72, 0x70,
+ 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d,
+ 0x65, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70,
+ 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x4d, 0x65, 0x73, 0x73, 0x61,
+ 0x67, 0x65, 0x2e, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79,
+ 0x52, 0x08, 0x6d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x64, 0x0a, 0x0a, 0x6d, 0x61,
+ 0x70, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x32, 0x18, 0x1b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x45,
+ 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x72, 0x75,
+ 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x65,
+ 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x4d,
+ 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x32,
+ 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x6d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x32,
+ 0x12, 0x64, 0x0a, 0x0a, 0x6d, 0x61, 0x70, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x33, 0x18, 0x1c,
+ 0x20, 0x03, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65,
0x77, 0x61, 0x79, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x69, 0x6e, 0x74, 0x65,
0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x50,
0x72, 0x6f, 0x74, 0x6f, 0x33, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4d, 0x61, 0x70,
- 0x56, 0x61, 0x6c, 0x75, 0x65, 0x31, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x6d, 0x61,
- 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x31, 0x34, 0x12, 0x67, 0x0a, 0x0b, 0x6d, 0x61, 0x70, 0x5f,
- 0x76, 0x61, 0x6c, 0x75, 0x65, 0x31, 0x35, 0x18, 0x28, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x46, 0x2e,
- 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x72, 0x75, 0x6e,
- 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x65, 0x78,
- 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x4d, 0x65,
- 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x31, 0x35,
- 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x6d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x31,
- 0x35, 0x12, 0x67, 0x0a, 0x0b, 0x6d, 0x61, 0x70, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x31, 0x36,
- 0x18, 0x2d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61,
+ 0x56, 0x61, 0x6c, 0x75, 0x65, 0x33, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x6d, 0x61, 0x70,
+ 0x56, 0x61, 0x6c, 0x75, 0x65, 0x33, 0x12, 0x64, 0x0a, 0x0a, 0x6d, 0x61, 0x70, 0x5f, 0x76, 0x61,
+ 0x6c, 0x75, 0x65, 0x34, 0x18, 0x1d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x67, 0x72, 0x70,
+ 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d,
+ 0x65, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70,
+ 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x4d, 0x65, 0x73, 0x73, 0x61,
+ 0x67, 0x65, 0x2e, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x34, 0x45, 0x6e, 0x74, 0x72,
+ 0x79, 0x52, 0x09, 0x6d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x34, 0x12, 0x64, 0x0a, 0x0a,
+ 0x6d, 0x61, 0x70, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x35, 0x18, 0x1e, 0x20, 0x03, 0x28, 0x0b,
+ 0x32, 0x45, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e,
+ 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c,
+ 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f,
+ 0x33, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75,
+ 0x65, 0x35, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x6d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75,
+ 0x65, 0x35, 0x12, 0x64, 0x0a, 0x0a, 0x6d, 0x61, 0x70, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x36,
+ 0x18, 0x1f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61,
0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x69, 0x6e,
0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62,
0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4d,
- 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x31, 0x36, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a,
- 0x6d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x31, 0x36, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x61,
- 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b,
- 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a,
- 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61,
- 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3c, 0x0a, 0x0e, 0x4d, 0x61, 0x70, 0x56, 0x61,
- 0x6c, 0x75, 0x65, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79,
- 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76,
- 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
- 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3c, 0x0a, 0x0e, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75,
- 0x65, 0x33, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c,
- 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a,
- 0x02, 0x38, 0x01, 0x1a, 0x3c, 0x0a, 0x0e, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x34,
- 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
- 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38,
- 0x01, 0x1a, 0x3c, 0x0a, 0x0e, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x35, 0x45, 0x6e,
- 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
- 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a,
- 0x3c, 0x0a, 0x0e, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x36, 0x45, 0x6e, 0x74, 0x72,
- 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
- 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01,
- 0x28, 0x0d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3c, 0x0a,
- 0x0e, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x37, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12,
- 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x6b, 0x65,
- 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3c, 0x0a, 0x0e, 0x4d,
- 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x38, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a,
- 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12,
- 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05,
- 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3c, 0x0a, 0x0e, 0x4d, 0x61, 0x70,
- 0x56, 0x61, 0x6c, 0x75, 0x65, 0x39, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b,
- 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a,
- 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61,
- 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3d, 0x0a, 0x0f, 0x4d, 0x61, 0x70, 0x56, 0x61,
- 0x6c, 0x75, 0x65, 0x31, 0x30, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65,
+ 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x36, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x6d,
+ 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x36, 0x12, 0x64, 0x0a, 0x0a, 0x6d, 0x61, 0x70, 0x5f,
+ 0x76, 0x61, 0x6c, 0x75, 0x65, 0x37, 0x18, 0x20, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x67,
+ 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x72, 0x75, 0x6e, 0x74,
+ 0x69, 0x6d, 0x65, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x65, 0x78, 0x61,
+ 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x4d, 0x65, 0x73,
+ 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x37, 0x45, 0x6e,
+ 0x74, 0x72, 0x79, 0x52, 0x09, 0x6d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x37, 0x12, 0x64,
+ 0x0a, 0x0a, 0x6d, 0x61, 0x70, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x38, 0x18, 0x21, 0x20, 0x03,
+ 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61,
+ 0x79, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e,
+ 0x61, 0x6c, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x50, 0x72, 0x6f,
+ 0x74, 0x6f, 0x33, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4d, 0x61, 0x70, 0x56, 0x61,
+ 0x6c, 0x75, 0x65, 0x38, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x6d, 0x61, 0x70, 0x56, 0x61,
+ 0x6c, 0x75, 0x65, 0x38, 0x12, 0x64, 0x0a, 0x0a, 0x6d, 0x61, 0x70, 0x5f, 0x76, 0x61, 0x6c, 0x75,
+ 0x65, 0x39, 0x18, 0x22, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e,
+ 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e,
+ 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65,
+ 0x70, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
+ 0x2e, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x39, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52,
+ 0x09, 0x6d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x39, 0x12, 0x67, 0x0a, 0x0b, 0x6d, 0x61,
+ 0x70, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x31, 0x30, 0x18, 0x23, 0x20, 0x03, 0x28, 0x0b, 0x32,
+ 0x46, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x72,
+ 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e,
+ 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65,
+ 0x31, 0x30, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x6d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75,
+ 0x65, 0x31, 0x30, 0x12, 0x67, 0x0a, 0x0b, 0x6d, 0x61, 0x70, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65,
+ 0x31, 0x32, 0x18, 0x25, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e,
+ 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e,
+ 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65,
+ 0x70, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
+ 0x2e, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x31, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79,
+ 0x52, 0x0a, 0x6d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x31, 0x32, 0x12, 0x67, 0x0a, 0x0b,
+ 0x6d, 0x61, 0x70, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x31, 0x34, 0x18, 0x27, 0x20, 0x03, 0x28,
+ 0x0b, 0x32, 0x46, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79,
+ 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61,
+ 0x6c, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x74,
+ 0x6f, 0x33, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c,
+ 0x75, 0x65, 0x31, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x6d, 0x61, 0x70, 0x56, 0x61,
+ 0x6c, 0x75, 0x65, 0x31, 0x34, 0x12, 0x67, 0x0a, 0x0b, 0x6d, 0x61, 0x70, 0x5f, 0x76, 0x61, 0x6c,
+ 0x75, 0x65, 0x31, 0x35, 0x18, 0x28, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x67, 0x72, 0x70,
+ 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d,
+ 0x65, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70,
+ 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x4d, 0x65, 0x73, 0x73, 0x61,
+ 0x67, 0x65, 0x2e, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x31, 0x35, 0x45, 0x6e, 0x74,
+ 0x72, 0x79, 0x52, 0x0a, 0x6d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x31, 0x35, 0x12, 0x67,
+ 0x0a, 0x0b, 0x6d, 0x61, 0x70, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x31, 0x36, 0x18, 0x2d, 0x20,
+ 0x03, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77,
+ 0x61, 0x79, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72,
+ 0x6e, 0x61, 0x6c, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x50, 0x72,
+ 0x6f, 0x74, 0x6f, 0x33, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4d, 0x61, 0x70, 0x56,
+ 0x61, 0x6c, 0x75, 0x65, 0x31, 0x36, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x6d, 0x61, 0x70,
+ 0x56, 0x61, 0x6c, 0x75, 0x65, 0x31, 0x36, 0x12, 0x44, 0x0a, 0x12, 0x73, 0x74, 0x72, 0x75, 0x63,
+ 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x2f, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x10, 0x73, 0x74, 0x72,
+ 0x75, 0x63, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3a, 0x0a,
+ 0x0c, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x30, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x0b, 0x73, 0x74,
+ 0x72, 0x75, 0x63, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x61, 0x70,
+ 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65,
0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05,
- 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x05, 0x76, 0x61, 0x6c,
+ 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c,
+ 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3c, 0x0a, 0x0e, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c,
+ 0x75, 0x65, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61,
+ 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
+ 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3c, 0x0a, 0x0e, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65,
+ 0x33, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75,
+ 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02,
+ 0x38, 0x01, 0x1a, 0x3c, 0x0a, 0x0e, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x34, 0x45,
+ 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01,
+ 0x1a, 0x3c, 0x0a, 0x0e, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x35, 0x45, 0x6e, 0x74,
+ 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
+ 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3c,
+ 0x0a, 0x0e, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x36, 0x45, 0x6e, 0x74, 0x72, 0x79,
+ 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b,
+ 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x0d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3c, 0x0a, 0x0e,
+ 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x37, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10,
+ 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x6b, 0x65, 0x79,
+ 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3c, 0x0a, 0x0e, 0x4d, 0x61,
+ 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x38, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03,
+ 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14,
+ 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x76,
+ 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3c, 0x0a, 0x0e, 0x4d, 0x61, 0x70, 0x56,
+ 0x61, 0x6c, 0x75, 0x65, 0x39, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65,
+ 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05,
+ 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c,
0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3d, 0x0a, 0x0f, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c,
- 0x75, 0x65, 0x31, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79,
+ 0x75, 0x65, 0x31, 0x30, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76,
- 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
+ 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3d, 0x0a, 0x0f, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75,
- 0x65, 0x31, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18,
+ 0x65, 0x31, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61,
- 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
+ 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3d, 0x0a, 0x0f, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65,
- 0x31, 0x35, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c,
- 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a,
- 0x02, 0x38, 0x01, 0x1a, 0x5b, 0x0a, 0x0f, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x31,
- 0x36, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x32, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75,
- 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
- 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34,
- 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01,
- 0x42, 0x0d, 0x0a, 0x0b, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2a,
- 0x20, 0x0a, 0x09, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x05, 0x0a, 0x01,
- 0x58, 0x10, 0x00, 0x12, 0x05, 0x0a, 0x01, 0x59, 0x10, 0x01, 0x12, 0x05, 0x0a, 0x01, 0x5a, 0x10,
- 0x02, 0x42, 0x46, 0x5a, 0x44, 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, 0x72,
- 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f,
- 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
- 0x33,
+ 0x31, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c,
+ 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a,
+ 0x02, 0x38, 0x01, 0x1a, 0x3d, 0x0a, 0x0f, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x31,
+ 0x35, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x08, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75,
+ 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02,
+ 0x38, 0x01, 0x1a, 0x5b, 0x0a, 0x0f, 0x4d, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x31, 0x36,
+ 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x32, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56,
+ 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42,
+ 0x0d, 0x0a, 0x0b, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x14,
+ 0x0a, 0x12, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x76,
+ 0x61, 0x6c, 0x75, 0x65, 0x2a, 0x20, 0x0a, 0x09, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75,
+ 0x65, 0x12, 0x05, 0x0a, 0x01, 0x58, 0x10, 0x00, 0x12, 0x05, 0x0a, 0x01, 0x59, 0x10, 0x01, 0x12,
+ 0x05, 0x0a, 0x01, 0x5a, 0x10, 0x02, 0x42, 0x46, 0x5a, 0x44, 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, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x69, 0x6e, 0x74, 0x65,
+ 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x62, 0x06,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -768,34 +830,36 @@ func file_runtime_internal_examplepb_proto3_proto_rawDescGZIP() []byte {
var file_runtime_internal_examplepb_proto3_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_runtime_internal_examplepb_proto3_proto_msgTypes = make([]protoimpl.MessageInfo, 15)
var file_runtime_internal_examplepb_proto3_proto_goTypes = []interface{}{
- (EnumValue)(0), // 0: grpc.gateway.runtime.internal.examplepb.EnumValue
- (*Proto3Message)(nil), // 1: grpc.gateway.runtime.internal.examplepb.Proto3Message
- nil, // 2: grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValueEntry
- nil, // 3: grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValue2Entry
- nil, // 4: grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValue3Entry
- nil, // 5: grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValue4Entry
- nil, // 6: grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValue5Entry
- nil, // 7: grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValue6Entry
- nil, // 8: grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValue7Entry
- nil, // 9: grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValue8Entry
- nil, // 10: grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValue9Entry
- nil, // 11: grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValue10Entry
- nil, // 12: grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValue12Entry
- nil, // 13: grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValue14Entry
- nil, // 14: grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValue15Entry
- nil, // 15: grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValue16Entry
- (*wrappers.UInt64Value)(nil), // 16: google.protobuf.UInt64Value
- (*timestamp.Timestamp)(nil), // 17: google.protobuf.Timestamp
- (*duration.Duration)(nil), // 18: google.protobuf.Duration
- (*field_mask.FieldMask)(nil), // 19: google.protobuf.FieldMask
- (*wrappers.DoubleValue)(nil), // 20: google.protobuf.DoubleValue
- (*wrappers.FloatValue)(nil), // 21: google.protobuf.FloatValue
- (*wrappers.Int64Value)(nil), // 22: google.protobuf.Int64Value
- (*wrappers.Int32Value)(nil), // 23: google.protobuf.Int32Value
- (*wrappers.UInt32Value)(nil), // 24: google.protobuf.UInt32Value
- (*wrappers.BoolValue)(nil), // 25: google.protobuf.BoolValue
- (*wrappers.StringValue)(nil), // 26: google.protobuf.StringValue
- (*wrappers.BytesValue)(nil), // 27: google.protobuf.BytesValue
+ (EnumValue)(0), // 0: grpc.gateway.runtime.internal.examplepb.EnumValue
+ (*Proto3Message)(nil), // 1: grpc.gateway.runtime.internal.examplepb.Proto3Message
+ nil, // 2: grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValueEntry
+ nil, // 3: grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValue2Entry
+ nil, // 4: grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValue3Entry
+ nil, // 5: grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValue4Entry
+ nil, // 6: grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValue5Entry
+ nil, // 7: grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValue6Entry
+ nil, // 8: grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValue7Entry
+ nil, // 9: grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValue8Entry
+ nil, // 10: grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValue9Entry
+ nil, // 11: grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValue10Entry
+ nil, // 12: grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValue12Entry
+ nil, // 13: grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValue14Entry
+ nil, // 14: grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValue15Entry
+ nil, // 15: grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValue16Entry
+ (*wrapperspb.UInt64Value)(nil), // 16: google.protobuf.UInt64Value
+ (*timestamppb.Timestamp)(nil), // 17: google.protobuf.Timestamp
+ (*durationpb.Duration)(nil), // 18: google.protobuf.Duration
+ (*fieldmaskpb.FieldMask)(nil), // 19: google.protobuf.FieldMask
+ (*wrapperspb.DoubleValue)(nil), // 20: google.protobuf.DoubleValue
+ (*wrapperspb.FloatValue)(nil), // 21: google.protobuf.FloatValue
+ (*wrapperspb.Int64Value)(nil), // 22: google.protobuf.Int64Value
+ (*wrapperspb.Int32Value)(nil), // 23: google.protobuf.Int32Value
+ (*wrapperspb.UInt32Value)(nil), // 24: google.protobuf.UInt32Value
+ (*wrapperspb.BoolValue)(nil), // 25: google.protobuf.BoolValue
+ (*wrapperspb.StringValue)(nil), // 26: google.protobuf.StringValue
+ (*wrapperspb.BytesValue)(nil), // 27: google.protobuf.BytesValue
+ (*structpb.Value)(nil), // 28: google.protobuf.Value
+ (*structpb.Struct)(nil), // 29: google.protobuf.Struct
}
var file_runtime_internal_examplepb_proto3_proto_depIdxs = []int32{
1, // 0: grpc.gateway.runtime.internal.examplepb.Proto3Message.nested:type_name -> grpc.gateway.runtime.internal.examplepb.Proto3Message
@@ -805,35 +869,38 @@ var file_runtime_internal_examplepb_proto3_proto_depIdxs = []int32{
17, // 4: grpc.gateway.runtime.internal.examplepb.Proto3Message.timestamp_value:type_name -> google.protobuf.Timestamp
18, // 5: grpc.gateway.runtime.internal.examplepb.Proto3Message.duration_value:type_name -> google.protobuf.Duration
19, // 6: grpc.gateway.runtime.internal.examplepb.Proto3Message.fieldmask_value:type_name -> google.protobuf.FieldMask
- 20, // 7: grpc.gateway.runtime.internal.examplepb.Proto3Message.wrapper_double_value:type_name -> google.protobuf.DoubleValue
- 21, // 8: grpc.gateway.runtime.internal.examplepb.Proto3Message.wrapper_float_value:type_name -> google.protobuf.FloatValue
- 22, // 9: grpc.gateway.runtime.internal.examplepb.Proto3Message.wrapper_int64_value:type_name -> google.protobuf.Int64Value
- 23, // 10: grpc.gateway.runtime.internal.examplepb.Proto3Message.wrapper_int32_value:type_name -> google.protobuf.Int32Value
- 16, // 11: grpc.gateway.runtime.internal.examplepb.Proto3Message.wrapper_u_int64_value:type_name -> google.protobuf.UInt64Value
- 24, // 12: grpc.gateway.runtime.internal.examplepb.Proto3Message.wrapper_u_int32_value:type_name -> google.protobuf.UInt32Value
- 25, // 13: grpc.gateway.runtime.internal.examplepb.Proto3Message.wrapper_bool_value:type_name -> google.protobuf.BoolValue
- 26, // 14: grpc.gateway.runtime.internal.examplepb.Proto3Message.wrapper_string_value:type_name -> google.protobuf.StringValue
- 27, // 15: grpc.gateway.runtime.internal.examplepb.Proto3Message.wrapper_bytes_value:type_name -> google.protobuf.BytesValue
- 2, // 16: grpc.gateway.runtime.internal.examplepb.Proto3Message.map_value:type_name -> grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValueEntry
- 3, // 17: grpc.gateway.runtime.internal.examplepb.Proto3Message.map_value2:type_name -> grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValue2Entry
- 4, // 18: grpc.gateway.runtime.internal.examplepb.Proto3Message.map_value3:type_name -> grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValue3Entry
- 5, // 19: grpc.gateway.runtime.internal.examplepb.Proto3Message.map_value4:type_name -> grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValue4Entry
- 6, // 20: grpc.gateway.runtime.internal.examplepb.Proto3Message.map_value5:type_name -> grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValue5Entry
- 7, // 21: grpc.gateway.runtime.internal.examplepb.Proto3Message.map_value6:type_name -> grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValue6Entry
- 8, // 22: grpc.gateway.runtime.internal.examplepb.Proto3Message.map_value7:type_name -> grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValue7Entry
- 9, // 23: grpc.gateway.runtime.internal.examplepb.Proto3Message.map_value8:type_name -> grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValue8Entry
- 10, // 24: grpc.gateway.runtime.internal.examplepb.Proto3Message.map_value9:type_name -> grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValue9Entry
- 11, // 25: grpc.gateway.runtime.internal.examplepb.Proto3Message.map_value10:type_name -> grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValue10Entry
- 12, // 26: grpc.gateway.runtime.internal.examplepb.Proto3Message.map_value12:type_name -> grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValue12Entry
- 13, // 27: grpc.gateway.runtime.internal.examplepb.Proto3Message.map_value14:type_name -> grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValue14Entry
- 14, // 28: grpc.gateway.runtime.internal.examplepb.Proto3Message.map_value15:type_name -> grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValue15Entry
- 15, // 29: grpc.gateway.runtime.internal.examplepb.Proto3Message.map_value16:type_name -> grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValue16Entry
- 16, // 30: grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValue16Entry.value:type_name -> google.protobuf.UInt64Value
- 31, // [31:31] is the sub-list for method output_type
- 31, // [31:31] is the sub-list for method input_type
- 31, // [31:31] is the sub-list for extension type_name
- 31, // [31:31] is the sub-list for extension extendee
- 0, // [0:31] is the sub-list for field type_name
+ 1, // 7: grpc.gateway.runtime.internal.examplepb.Proto3Message.nested_oneof_value_one:type_name -> grpc.gateway.runtime.internal.examplepb.Proto3Message
+ 20, // 8: grpc.gateway.runtime.internal.examplepb.Proto3Message.wrapper_double_value:type_name -> google.protobuf.DoubleValue
+ 21, // 9: grpc.gateway.runtime.internal.examplepb.Proto3Message.wrapper_float_value:type_name -> google.protobuf.FloatValue
+ 22, // 10: grpc.gateway.runtime.internal.examplepb.Proto3Message.wrapper_int64_value:type_name -> google.protobuf.Int64Value
+ 23, // 11: grpc.gateway.runtime.internal.examplepb.Proto3Message.wrapper_int32_value:type_name -> google.protobuf.Int32Value
+ 16, // 12: grpc.gateway.runtime.internal.examplepb.Proto3Message.wrapper_u_int64_value:type_name -> google.protobuf.UInt64Value
+ 24, // 13: grpc.gateway.runtime.internal.examplepb.Proto3Message.wrapper_u_int32_value:type_name -> google.protobuf.UInt32Value
+ 25, // 14: grpc.gateway.runtime.internal.examplepb.Proto3Message.wrapper_bool_value:type_name -> google.protobuf.BoolValue
+ 26, // 15: grpc.gateway.runtime.internal.examplepb.Proto3Message.wrapper_string_value:type_name -> google.protobuf.StringValue
+ 27, // 16: grpc.gateway.runtime.internal.examplepb.Proto3Message.wrapper_bytes_value:type_name -> google.protobuf.BytesValue
+ 2, // 17: grpc.gateway.runtime.internal.examplepb.Proto3Message.map_value:type_name -> grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValueEntry
+ 3, // 18: grpc.gateway.runtime.internal.examplepb.Proto3Message.map_value2:type_name -> grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValue2Entry
+ 4, // 19: grpc.gateway.runtime.internal.examplepb.Proto3Message.map_value3:type_name -> grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValue3Entry
+ 5, // 20: grpc.gateway.runtime.internal.examplepb.Proto3Message.map_value4:type_name -> grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValue4Entry
+ 6, // 21: grpc.gateway.runtime.internal.examplepb.Proto3Message.map_value5:type_name -> grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValue5Entry
+ 7, // 22: grpc.gateway.runtime.internal.examplepb.Proto3Message.map_value6:type_name -> grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValue6Entry
+ 8, // 23: grpc.gateway.runtime.internal.examplepb.Proto3Message.map_value7:type_name -> grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValue7Entry
+ 9, // 24: grpc.gateway.runtime.internal.examplepb.Proto3Message.map_value8:type_name -> grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValue8Entry
+ 10, // 25: grpc.gateway.runtime.internal.examplepb.Proto3Message.map_value9:type_name -> grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValue9Entry
+ 11, // 26: grpc.gateway.runtime.internal.examplepb.Proto3Message.map_value10:type_name -> grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValue10Entry
+ 12, // 27: grpc.gateway.runtime.internal.examplepb.Proto3Message.map_value12:type_name -> grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValue12Entry
+ 13, // 28: grpc.gateway.runtime.internal.examplepb.Proto3Message.map_value14:type_name -> grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValue14Entry
+ 14, // 29: grpc.gateway.runtime.internal.examplepb.Proto3Message.map_value15:type_name -> grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValue15Entry
+ 15, // 30: grpc.gateway.runtime.internal.examplepb.Proto3Message.map_value16:type_name -> grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValue16Entry
+ 28, // 31: grpc.gateway.runtime.internal.examplepb.Proto3Message.struct_value_value:type_name -> google.protobuf.Value
+ 29, // 32: grpc.gateway.runtime.internal.examplepb.Proto3Message.struct_value:type_name -> google.protobuf.Struct
+ 16, // 33: grpc.gateway.runtime.internal.examplepb.Proto3Message.MapValue16Entry.value:type_name -> google.protobuf.UInt64Value
+ 34, // [34:34] is the sub-list for method output_type
+ 34, // [34:34] is the sub-list for method input_type
+ 34, // [34:34] is the sub-list for extension type_name
+ 34, // [34:34] is the sub-list for extension extendee
+ 0, // [0:34] is the sub-list for field type_name
}
func init() { file_runtime_internal_examplepb_proto3_proto_init() }
@@ -858,6 +925,7 @@ func file_runtime_internal_examplepb_proto3_proto_init() {
file_runtime_internal_examplepb_proto3_proto_msgTypes[0].OneofWrappers = []interface{}{
(*Proto3Message_OneofBoolValue)(nil),
(*Proto3Message_OneofStringValue)(nil),
+ (*Proto3Message_NestedOneofValueOne)(nil),
}
type x struct{}
out := protoimpl.TypeBuilder{
diff --git a/runtime/internal/examplepb/proto3.proto b/runtime/internal/examplepb/proto3.proto
index f2c71287a17..7e492d391fa 100644
--- a/runtime/internal/examplepb/proto3.proto
+++ b/runtime/internal/examplepb/proto3.proto
@@ -2,15 +2,16 @@ syntax = "proto3";
package grpc.gateway.runtime.internal.examplepb;
-option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/runtime/internal/examplepb";
-
import "google/protobuf/duration.proto";
import "google/protobuf/field_mask.proto";
+import "google/protobuf/struct.proto";
import "google/protobuf/timestamp.proto";
import "google/protobuf/wrappers.proto";
+option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/runtime/internal/examplepb";
+
message Proto3Message {
- // Next number: 46
+ // Next number: 49
Proto3Message nested = 41;
float float_value = 42;
double double_value = 43;
@@ -32,6 +33,9 @@ message Proto3Message {
bool oneof_bool_value = 1;
string oneof_string_value = 2;
}
+ oneof nested_oneof_value {
+ Proto3Message nested_oneof_value_one = 46;
+ }
google.protobuf.DoubleValue wrapper_double_value = 17;
google.protobuf.FloatValue wrapper_float_value = 18;
google.protobuf.Int64Value wrapper_int64_value = 19;
@@ -55,6 +59,8 @@ message Proto3Message {
map map_value14 = 39;
map map_value15 = 40;
map map_value16 = 45;
+ google.protobuf.Value struct_value_value = 47;
+ google.protobuf.Struct struct_value = 48;
}
enum EnumValue {
diff --git a/runtime/internal/examplepb/proto3.swagger.json b/runtime/internal/examplepb/proto3.swagger.json
index 084374e18a7..f05b4c7c57b 100644
--- a/runtime/internal/examplepb/proto3.swagger.json
+++ b/runtime/internal/examplepb/proto3.swagger.json
@@ -15,17 +15,13 @@
"protobufAny": {
"type": "object",
"properties": {
- "typeUrl": {
+ "@type": {
"type": "string",
"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",
- "format": "byte",
- "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\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 }"
+ "additionalProperties": {},
+ "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 := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(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 }"
},
"rpcStatus": {
"type": "object",
diff --git a/runtime/marshal_json_test.go b/runtime/marshal_json_test.go
index 490e66bab83..8fe08aeb9bf 100644
--- a/runtime/marshal_json_test.go
+++ b/runtime/marshal_json_test.go
@@ -100,9 +100,8 @@ func TestJSONBuiltinUnmarshalField(t *testing.T) {
func alloc(t reflect.Type) reflect.Value {
if t == nil {
return reflect.ValueOf(new(interface{}))
- } else {
- return reflect.New(t)
}
+ return reflect.New(t)
}
func TestJSONBuiltinUnmarshalFieldKnownErrors(t *testing.T) {
@@ -197,6 +196,8 @@ var (
{data: "", json: `""`},
{data: proto.String(""), json: `""`},
{data: "foo", json: `"foo"`},
+ {data: []byte("foo"), json: `"Zm9v"`},
+ {data: []byte{}, json: `""`},
{data: proto.String("foo"), json: `"foo"`},
{data: int32(-1), json: "-1"},
{data: proto.Int32(-1), json: "-1"},
@@ -248,7 +249,7 @@ var (
json: `"2016-05-10T10:19:13.123Z"`,
},
{
- data: &wrapperspb.Int32Value{Value: 123},
+ data: wrapperspb.Int32(123),
json: "123",
},
}
diff --git a/runtime/marshal_jsonpb.go b/runtime/marshal_jsonpb.go
index 38ac3ddff58..524ea057ccb 100644
--- a/runtime/marshal_jsonpb.go
+++ b/runtime/marshal_jsonpb.go
@@ -6,6 +6,7 @@ import (
"fmt"
"io"
"reflect"
+ "strconv"
"google.golang.org/protobuf/encoding/protojson"
"google.golang.org/protobuf/proto"
@@ -113,6 +114,36 @@ func (j *JSONPb) marshalNonProtoField(v interface{}) ([]byte, error) {
return buf.Bytes(), nil
}
+
+ if rv.Type().Elem().Implements(typeProtoEnum) {
+ var buf bytes.Buffer
+ err := buf.WriteByte('[')
+ if err != nil {
+ return nil, err
+ }
+ for i := 0; i < rv.Len(); i++ {
+ if i != 0 {
+ err = buf.WriteByte(',')
+ if err != nil {
+ return nil, err
+ }
+ }
+ if j.UseEnumNumbers {
+ _, err = buf.WriteString(strconv.FormatInt(rv.Index(i).Int(), 10))
+ } else {
+ _, err = buf.WriteString("\"" + rv.Index(i).Interface().(protoEnum).String() + "\"")
+ }
+ if err != nil {
+ return nil, err
+ }
+ }
+ err = buf.WriteByte(']')
+ if err != nil {
+ return nil, err
+ }
+
+ return buf.Bytes(), nil
+ }
}
if rv.Kind() == reflect.Map {
@@ -237,6 +268,10 @@ func decodeNonProtoField(d *json.Decoder, unmarshaler protojson.UnmarshalOptions
}
bk := result[0]
bv := reflect.New(rv.Type().Elem())
+ if v == nil {
+ null := json.RawMessage("null")
+ v = &null
+ }
if err := unmarshalJSONPb([]byte(*v), unmarshaler, bv.Interface()); err != nil {
return err
}
@@ -245,6 +280,17 @@ func decodeNonProtoField(d *json.Decoder, unmarshaler protojson.UnmarshalOptions
return nil
}
if rv.Kind() == reflect.Slice {
+ if rv.Type().Elem().Kind() == reflect.Uint8 {
+ var sl []byte
+ if err := d.Decode(&sl); err != nil {
+ return err
+ }
+ if sl != nil {
+ rv.SetBytes(sl)
+ }
+ return nil
+ }
+
var sl []json.RawMessage
if err := d.Decode(&sl); err != nil {
return err
@@ -285,6 +331,8 @@ type protoEnum interface {
EnumDescriptor() ([]byte, []int)
}
+var typeProtoEnum = reflect.TypeOf((*protoEnum)(nil)).Elem()
+
var typeProtoMessage = reflect.TypeOf((*proto.Message)(nil)).Elem()
// Delimiter for newline encoded JSON streams.
diff --git a/runtime/marshal_jsonpb_test.go b/runtime/marshal_jsonpb_test.go
index df5f1817f48..43029736e37 100644
--- a/runtime/marshal_jsonpb_test.go
+++ b/runtime/marshal_jsonpb_test.go
@@ -142,14 +142,32 @@ func TestJSONPbMarshalFields(t *testing.T) {
}
}
+ nums := []examplepb.NumericEnum{examplepb.NumericEnum_ZERO, examplepb.NumericEnum_ONE}
+
+ buf, err := m.Marshal(nums)
+ if err != nil {
+ t.Errorf("m.Marshal(%#v) failed with %v; want success", nums, err)
+ }
+ if got, want := string(buf), `[0,1]`; got != want {
+ t.Errorf("m.Marshal(%#v) = %q; want %q", nums, got, want)
+ }
+
m.UseEnumNumbers = false
- buf, err := m.Marshal(examplepb.NumericEnum_ONE)
+ buf, err = m.Marshal(examplepb.NumericEnum_ONE)
if err != nil {
t.Errorf("m.Marshal(%#v) failed with %v; want success", examplepb.NumericEnum_ONE, err)
}
if got, want := string(buf), `"ONE"`; got != want {
t.Errorf("m.Marshal(%#v) = %q; want %q", examplepb.NumericEnum_ONE, got, want)
}
+
+ buf, err = m.Marshal(nums)
+ if err != nil {
+ t.Errorf("m.Marshal(%#v) failed with %v; want success", nums, err)
+ }
+ if got, want := string(buf), `["ZERO","ONE"]`; got != want {
+ t.Errorf("m.Marshal(%#v) = %q; want %q", nums, got, want)
+ }
}
func TestJSONPbUnmarshal(t *testing.T) {
@@ -505,6 +523,8 @@ var (
{data: uint64(1), json: "1"},
{data: proto.Uint64(1), json: "1"},
{data: "abc", json: `"abc"`},
+ {data: []byte("abc"), json: `"YWJj"`},
+ {data: []byte{}, json: `""`},
{data: proto.String("abc"), json: `"abc"`},
{data: float32(1.5), json: "1.5"},
{data: proto.Float32(1.5), json: "1.5"},
@@ -617,37 +637,55 @@ var (
},
{
- data: &wrapperspb.BoolValue{Value: true},
+ data: wrapperspb.Bool(true),
json: "true",
},
{
- data: &wrapperspb.DoubleValue{Value: 123.456},
+ data: wrapperspb.Double(123.456),
json: "123.456",
},
{
- data: &wrapperspb.FloatValue{Value: 123.456},
+ data: wrapperspb.Float(123.456),
json: "123.456",
},
{
- data: &wrapperspb.Int32Value{Value: -123},
+ data: wrapperspb.Int32(-123),
json: "-123",
},
{
- data: &wrapperspb.Int64Value{Value: -123},
+ data: wrapperspb.Int64(-123),
json: `"-123"`,
},
{
- data: &wrapperspb.UInt32Value{Value: 123},
+ data: wrapperspb.UInt32(123),
json: "123",
},
{
- data: &wrapperspb.UInt64Value{Value: 123},
+ data: wrapperspb.UInt64(123),
json: `"123"`,
},
// TODO(yugui) Add other well-known types once jsonpb supports them
}
)
+func TestJSONPbUnmarshalNullField(t *testing.T) {
+ var out map[string]interface{}
+
+ const json = `{"foo": null}`
+ marshaler := &runtime.JSONPb{}
+ if err := marshaler.Unmarshal([]byte(json), &out); err != nil {
+ t.Fatalf("unexpected error: %v", err)
+ }
+
+ value, hasKey := out["foo"]
+ if !hasKey {
+ t.Fatalf("unmarshaled map did not have key 'foo'")
+ }
+ if value != nil {
+ t.Fatalf("unexpected value: %v", value)
+ }
+}
+
func TestJSONPbMarshalResponseBodies(t *testing.T) {
marshaler := &runtime.JSONPb{}
for i, spec := range []struct {
diff --git a/runtime/marshal_proto.go b/runtime/marshal_proto.go
index 007f8f1a2c7..398c780dc22 100644
--- a/runtime/marshal_proto.go
+++ b/runtime/marshal_proto.go
@@ -1,10 +1,8 @@
package runtime
import (
- "io"
-
"errors"
- "io/ioutil"
+ "io"
"google.golang.org/protobuf/proto"
)
@@ -38,7 +36,7 @@ func (*ProtoMarshaller) Unmarshal(data []byte, value interface{}) error {
// NewDecoder returns a Decoder which reads proto stream from "reader".
func (marshaller *ProtoMarshaller) NewDecoder(reader io.Reader) Decoder {
return DecoderFunc(func(value interface{}) error {
- buffer, err := ioutil.ReadAll(reader)
+ buffer, err := io.ReadAll(reader)
if err != nil {
return err
}
@@ -53,8 +51,7 @@ func (marshaller *ProtoMarshaller) NewEncoder(writer io.Writer) Encoder {
if err != nil {
return err
}
- _, err = writer.Write(buffer)
- if err != nil {
+ if _, err := writer.Write(buffer); err != nil {
return err
}
diff --git a/runtime/mux.go b/runtime/mux.go
index 10fd357b1e3..9fb2960d959 100644
--- a/runtime/mux.go
+++ b/runtime/mux.go
@@ -2,18 +2,49 @@ package runtime
import (
"context"
+ "errors"
"fmt"
"net/http"
"net/textproto"
+ "regexp"
"strings"
"github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule"
"google.golang.org/grpc/codes"
+ "google.golang.org/grpc/grpclog"
+ "google.golang.org/grpc/health/grpc_health_v1"
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/proto"
)
+// UnescapingMode defines the behavior of ServeMux when unescaping path parameters.
+type UnescapingMode int
+
+const (
+ // UnescapingModeLegacy is the default V2 behavior, which escapes the entire
+ // path string before doing any routing.
+ UnescapingModeLegacy UnescapingMode = iota
+
+ // UnescapingModeAllExceptReserved unescapes all path parameters except RFC 6570
+ // reserved characters.
+ UnescapingModeAllExceptReserved
+
+ // UnescapingModeAllExceptSlash unescapes URL path parameters except path
+ // separators, which will be left as "%2F".
+ UnescapingModeAllExceptSlash
+
+ // UnescapingModeAllCharacters unescapes all URL path parameters.
+ UnescapingModeAllCharacters
+
+ // UnescapingModeDefault is the default escaping type.
+ // TODO(v3): default this to UnescapingModeAllExceptReserved per grpc-httpjson-transcoding's
+ // reference implementation
+ UnescapingModeDefault = UnescapingModeLegacy
+)
+
+var encodedPathSplitter = regexp.MustCompile("(/|%2F)")
+
// A HandlerFunc handles a specific pair of path pattern and HTTP method.
type HandlerFunc func(w http.ResponseWriter, r *http.Request, pathParams map[string]string)
@@ -31,6 +62,7 @@ type ServeMux struct {
streamErrorHandler StreamErrorHandlerFunc
routingErrorHandler RoutingErrorHandlerFunc
disablePathLengthFallback bool
+ unescapingMode UnescapingMode
}
// ServeMuxOption is an option that can be given to a ServeMux on construction.
@@ -48,6 +80,14 @@ func WithForwardResponseOption(forwardResponseOption func(context.Context, http.
}
}
+// WithEscapingType sets the escaping type. See the definitions of UnescapingMode
+// for more information.
+func WithUnescapingMode(mode UnescapingMode) ServeMuxOption {
+ return func(serveMux *ServeMux) {
+ serveMux.unescapingMode = mode
+ }
+}
+
// SetQueryParameterParser sets the query parameter parser, used to populate message from query parameters.
// Configuring this will mean the generated OpenAPI output is no longer correct, and it should be
// done with careful consideration.
@@ -64,10 +104,10 @@ type HeaderMatcherFunc func(string) (string, bool)
// keys (as specified by the IANA) to gRPC context with grpcgateway- prefix. HTTP headers that start with
// 'Grpc-Metadata-' are mapped to gRPC metadata after removing prefix 'Grpc-Metadata-'.
func DefaultHeaderMatcher(key string) (string, bool) {
- key = textproto.CanonicalMIMEHeaderKey(key)
- if isPermanentHTTPHeader(key) {
+ switch key = textproto.CanonicalMIMEHeaderKey(key); {
+ case isPermanentHTTPHeader(key):
return MetadataPrefix + key, true
- } else if strings.HasPrefix(key, MetadataHeaderPrefix) {
+ case strings.HasPrefix(key, MetadataHeaderPrefix):
return key[len(MetadataHeaderPrefix):], true
}
return "", false
@@ -78,11 +118,30 @@ func DefaultHeaderMatcher(key string) (string, bool) {
// This matcher will be called with each header in http.Request. If matcher returns true, that header will be
// passed to gRPC context. To transform the header before passing to gRPC context, matcher should return modified header.
func WithIncomingHeaderMatcher(fn HeaderMatcherFunc) ServeMuxOption {
+ for _, header := range fn.matchedMalformedHeaders() {
+ grpclog.Warningf("The configured forwarding filter would allow %q to be sent to the gRPC server, which will likely cause errors. See https://github.com/grpc/grpc-go/pull/4803#issuecomment-986093310 for more information.", header)
+ }
+
return func(mux *ServeMux) {
mux.incomingHeaderMatcher = fn
}
}
+// matchedMalformedHeaders returns the malformed headers that would be forwarded to gRPC server.
+func (fn HeaderMatcherFunc) matchedMalformedHeaders() []string {
+ if fn == nil {
+ return nil
+ }
+ headers := make([]string, 0)
+ for header := range malformedHTTPHeaders {
+ out, accept := fn(header)
+ if accept && isMalformedHTTPHeader(out) {
+ headers = append(headers, out)
+ }
+ }
+ return headers
+}
+
// WithOutgoingHeaderMatcher returns a ServeMuxOption representing a headerMatcher for outgoing response from gateway.
//
// This matcher will be called with each header in response header metadata. If matcher returns true, that header will be
@@ -144,6 +203,57 @@ func WithDisablePathLengthFallback() ServeMuxOption {
}
}
+// WithHealthEndpointAt returns a ServeMuxOption that will add an endpoint to the created ServeMux at the path specified by endpointPath.
+// When called the handler will forward the request to the upstream grpc service health check (defined in the
+// gRPC Health Checking Protocol).
+//
+// See here https://grpc-ecosystem.github.io/grpc-gateway/docs/operations/health_check/ for more information on how
+// to setup the protocol in the grpc server.
+//
+// If you define a service as query parameter, this will also be forwarded as service in the HealthCheckRequest.
+func WithHealthEndpointAt(healthCheckClient grpc_health_v1.HealthClient, endpointPath string) ServeMuxOption {
+ return func(s *ServeMux) {
+ // error can be ignored since pattern is definitely valid
+ _ = s.HandlePath(
+ http.MethodGet, endpointPath, func(w http.ResponseWriter, r *http.Request, _ map[string]string,
+ ) {
+ _, outboundMarshaler := MarshalerForRequest(s, r)
+
+ resp, err := healthCheckClient.Check(r.Context(), &grpc_health_v1.HealthCheckRequest{
+ Service: r.URL.Query().Get("service"),
+ })
+ if err != nil {
+ s.errorHandler(r.Context(), s, outboundMarshaler, w, r, err)
+ return
+ }
+
+ w.Header().Set("Content-Type", "application/json")
+
+ if resp.GetStatus() != grpc_health_v1.HealthCheckResponse_SERVING {
+ var err error
+ switch resp.GetStatus() {
+ case grpc_health_v1.HealthCheckResponse_NOT_SERVING, grpc_health_v1.HealthCheckResponse_UNKNOWN:
+ err = status.Error(codes.Unavailable, resp.String())
+ case grpc_health_v1.HealthCheckResponse_SERVICE_UNKNOWN:
+ err = status.Error(codes.NotFound, resp.String())
+ }
+
+ s.errorHandler(r.Context(), s, outboundMarshaler, w, r, err)
+ return
+ }
+
+ _ = outboundMarshaler.NewEncoder(w).Encode(resp)
+ })
+ }
+}
+
+// WithHealthzEndpoint returns a ServeMuxOption that will add a /healthz endpoint to the created ServeMux.
+//
+// See WithHealthEndpointAt for the general implementation.
+func WithHealthzEndpoint(healthCheckClient grpc_health_v1.HealthClient) ServeMuxOption {
+ return WithHealthEndpointAt(healthCheckClient, "/healthz")
+}
+
// NewServeMux returns a new ServeMux whose internal mapping is empty.
func NewServeMux(opts ...ServeMuxOption) *ServeMux {
serveMux := &ServeMux{
@@ -153,6 +263,7 @@ func NewServeMux(opts ...ServeMuxOption) *ServeMux {
errorHandler: DefaultHTTPErrorHandler,
streamErrorHandler: DefaultStreamErrorHandler,
routingErrorHandler: DefaultRoutingErrorHandler,
+ unescapingMode: UnescapingModeDefault,
}
for _, opt := range opts {
@@ -178,7 +289,7 @@ func (s *ServeMux) Handle(meth string, pat Pattern, h HandlerFunc) {
}
// HandlePath allows users to configure custom path handlers.
-// refer: https://grpc-ecosystem.github.io/grpc-gateway/docs/inject_router.html
+// refer: https://grpc-ecosystem.github.io/grpc-gateway/docs/operations/inject_router/
func (s *ServeMux) HandlePath(meth string, pathPattern string, h HandlerFunc) error {
compiler, err := httprule.Parse(pathPattern)
if err != nil {
@@ -193,7 +304,7 @@ func (s *ServeMux) HandlePath(meth string, pathPattern string, h HandlerFunc) er
return nil
}
-// ServeHTTP dispatches the request to the first handler whose pattern matches to r.Method and r.Path.
+// ServeHTTP dispatches the request to the first handler whose pattern matches to r.Method and r.URL.Path.
func (s *ServeMux) ServeHTTP(w http.ResponseWriter, r *http.Request) {
ctx := r.Context()
@@ -204,7 +315,10 @@ func (s *ServeMux) ServeHTTP(w http.ResponseWriter, r *http.Request) {
return
}
- components := strings.Split(path[1:], "/")
+ // TODO(v3): remove UnescapingModeLegacy
+ if s.unescapingMode != UnescapingModeLegacy && r.URL.RawPath != "" {
+ path = r.URL.RawPath
+ }
if override := r.Header.Get("X-HTTP-Method-Override"); override != "" && s.isPathLengthFallback(r) {
r.Method = strings.ToUpper(override)
@@ -216,8 +330,18 @@ func (s *ServeMux) ServeHTTP(w http.ResponseWriter, r *http.Request) {
}
}
- // Verb out here is to memoize for the fallback case below
- var verb string
+ var pathComponents []string
+ // since in UnescapeModeLegacy, the URL will already have been fully unescaped, if we also split on "%2F"
+ // in this escaping mode we would be double unescaping but in UnescapingModeAllCharacters, we still do as the
+ // path is the RawPath (i.e. unescaped). That does mean that the behavior of this function will change its default
+ // behavior when the UnescapingModeDefault gets changed from UnescapingModeLegacy to UnescapingModeAllExceptReserved
+ if s.unescapingMode == UnescapingModeAllCharacters {
+ pathComponents = encodedPathSplitter.Split(path[1:], -1)
+ } else {
+ pathComponents = strings.Split(path[1:], "/")
+ }
+
+ lastPathComponent := pathComponents[len(pathComponents)-1]
for _, h := range s.handlers[r.Method] {
// If the pattern has a verb, explicitly look for a suffix in the last
@@ -228,24 +352,37 @@ func (s *ServeMux) ServeHTTP(w http.ResponseWriter, r *http.Request) {
// parser because we know what verb we're looking for, however, there
// are still some cases that the parser itself cannot disambiguate. See
// the comment there if interested.
+
+ var verb string
patVerb := h.pat.Verb()
- l := len(components)
- lastComponent := components[l-1]
- var idx int = -1
- if patVerb != "" && strings.HasSuffix(lastComponent, ":"+patVerb) {
- idx = len(lastComponent) - len(patVerb) - 1
+
+ idx := -1
+ if patVerb != "" && strings.HasSuffix(lastPathComponent, ":"+patVerb) {
+ idx = len(lastPathComponent) - len(patVerb) - 1
}
if idx == 0 {
_, outboundMarshaler := MarshalerForRequest(s, r)
s.routingErrorHandler(ctx, s, outboundMarshaler, w, r, http.StatusNotFound)
return
}
+
+ comps := make([]string, len(pathComponents))
+ copy(comps, pathComponents)
+
if idx > 0 {
- components[l-1], verb = lastComponent[:idx], lastComponent[idx+1:]
+ comps[len(comps)-1], verb = lastPathComponent[:idx], lastPathComponent[idx+1:]
}
- pathParams, err := h.pat.Match(components, verb)
+ pathParams, err := h.pat.MatchAndEscape(comps, verb, s.unescapingMode)
if err != nil {
+ var mse MalformedSequenceError
+ if ok := errors.As(err, &mse); ok {
+ _, outboundMarshaler := MarshalerForRequest(s, r)
+ s.errorHandler(ctx, s, outboundMarshaler, w, r, &HTTPStatusError{
+ HTTPStatus: http.StatusBadRequest,
+ Err: mse,
+ })
+ }
continue
}
h.h(w, r, pathParams)
@@ -259,8 +396,31 @@ func (s *ServeMux) ServeHTTP(w http.ResponseWriter, r *http.Request) {
continue
}
for _, h := range handlers {
- pathParams, err := h.pat.Match(components, verb)
+ var verb string
+ patVerb := h.pat.Verb()
+
+ idx := -1
+ if patVerb != "" && strings.HasSuffix(lastPathComponent, ":"+patVerb) {
+ idx = len(lastPathComponent) - len(patVerb) - 1
+ }
+
+ comps := make([]string, len(pathComponents))
+ copy(comps, pathComponents)
+
+ if idx > 0 {
+ comps[len(comps)-1], verb = lastPathComponent[:idx], lastPathComponent[idx+1:]
+ }
+
+ pathParams, err := h.pat.MatchAndEscape(comps, verb, s.unescapingMode)
if err != nil {
+ var mse MalformedSequenceError
+ if ok := errors.As(err, &mse); ok {
+ _, outboundMarshaler := MarshalerForRequest(s, r)
+ s.errorHandler(ctx, s, outboundMarshaler, w, r, &HTTPStatusError{
+ HTTPStatus: http.StatusBadRequest,
+ Err: mse,
+ })
+ }
continue
}
// X-HTTP-Method-Override is optional. Always allow fallback to POST.
diff --git a/runtime/mux_internal_test.go b/runtime/mux_internal_test.go
new file mode 100644
index 00000000000..4c73d05222d
--- /dev/null
+++ b/runtime/mux_internal_test.go
@@ -0,0 +1,58 @@
+package runtime
+
+import (
+ "sort"
+ "testing"
+)
+
+func TestWithIncomingHeaderMatcher_matchedMalformedHeaders(t *testing.T) {
+ tests := []struct {
+ name string
+ matcher HeaderMatcherFunc
+ want []string
+ }{
+ {
+ "nil matcher returns nothing",
+ nil,
+ nil,
+ },
+ {
+ "default matcher returns nothing",
+ DefaultHeaderMatcher,
+ nil,
+ },
+ {
+ "passthrough matcher returns all malformed headers",
+ func(s string) (string, bool) {
+ return s, true
+ },
+ []string{"connection"},
+ },
+ }
+
+ sliceEqual := func(a, b []string) bool {
+ if len(a) != len(b) {
+ return false
+ }
+ sort.Slice(a, func(i, j int) bool {
+ return a[i] < a[j]
+ })
+ sort.Slice(b, func(i, j int) bool {
+ return a[i] < a[j]
+ })
+ for idx := range a {
+ if a[idx] != b[idx] {
+ return false
+ }
+ }
+ return true
+ }
+
+ for _, tt := range tests {
+ out := tt.matcher.matchedMalformedHeaders()
+ if !sliceEqual(tt.want, out) {
+ t.Errorf("matchedMalformedHeaders not match; Want %v; got %v",
+ tt.want, out)
+ }
+ }
+}
diff --git a/runtime/mux_test.go b/runtime/mux_test.go
index d5aa7c759b0..a4e709a2004 100644
--- a/runtime/mux_test.go
+++ b/runtime/mux_test.go
@@ -2,14 +2,21 @@ package runtime_test
import (
"bytes"
+ "context"
"fmt"
"net/http"
"net/http/httptest"
+ "net/url"
"strconv"
+ "strings"
"testing"
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
"github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
+ "google.golang.org/grpc"
+ "google.golang.org/grpc/codes"
+ "google.golang.org/grpc/health/grpc_health_v1"
+ "google.golang.org/grpc/status"
)
func TestMuxServeHTTP(t *testing.T) {
@@ -30,6 +37,7 @@ func TestMuxServeHTTP(t *testing.T) {
respContent string
disablePathLengthFallback bool
+ unescapingMode runtime.UnescapingMode
}{
{
patterns: nil,
@@ -109,6 +117,19 @@ func TestMuxServeHTTP(t *testing.T) {
reqPath: "/foo",
respStatus: http.StatusNotImplemented,
},
+ {
+ patterns: []stubPattern{
+ {
+ method: "POST",
+ ops: []int{int(utilities.OpLitPush), 0, int(utilities.OpPush), 0, int(utilities.OpConcatN), 1, int(utilities.OpCapture), 1},
+ pool: []string{"foo", "id"},
+ verb: "archive",
+ },
+ },
+ reqMethod: "DELETE",
+ reqPath: "/foo/bar:archive",
+ respStatus: http.StatusNotImplemented,
+ },
{
patterns: []stubPattern{
{
@@ -330,11 +351,183 @@ func TestMuxServeHTTP(t *testing.T) {
respStatus: http.StatusOK,
respContent: "POST /foo/{id=*}:verb:subverb",
},
+ {
+ patterns: []stubPattern{
+ {
+ method: "GET",
+ ops: []int{int(utilities.OpLitPush), 0, int(utilities.OpPush), 1, int(utilities.OpCapture), 1, int(utilities.OpLitPush), 2},
+ pool: []string{"foo", "id", "bar"},
+ },
+ },
+ reqMethod: "POST",
+ reqPath: "/foo/404%2fwith%2Fspace/bar",
+ headers: map[string]string{
+ "Content-Type": "application/json",
+ },
+ respStatus: http.StatusNotFound,
+ unescapingMode: runtime.UnescapingModeLegacy,
+ },
+ {
+ patterns: []stubPattern{
+ {
+ method: "GET",
+ ops: []int{
+ int(utilities.OpLitPush), 0,
+ int(utilities.OpPush), 0,
+ int(utilities.OpConcatN), 1,
+ int(utilities.OpCapture), 1,
+ int(utilities.OpLitPush), 2},
+ pool: []string{"foo", "id", "bar"},
+ },
+ },
+ reqMethod: "GET",
+ reqPath: "/foo/success%2fwith%2Fspace/bar",
+ headers: map[string]string{
+ "Content-Type": "application/json",
+ },
+ respStatus: http.StatusOK,
+ unescapingMode: runtime.UnescapingModeAllExceptReserved,
+ respContent: "GET /foo/{id=*}/bar",
+ },
+ {
+ patterns: []stubPattern{
+ {
+ method: "GET",
+ ops: []int{
+ int(utilities.OpLitPush), 0,
+ int(utilities.OpPush), 0,
+ int(utilities.OpConcatN), 1,
+ int(utilities.OpCapture), 1,
+ int(utilities.OpLitPush), 2},
+ pool: []string{"foo", "id", "bar"},
+ },
+ },
+ reqMethod: "GET",
+ reqPath: "/foo/success%2fwith%2Fspace/bar",
+ headers: map[string]string{
+ "Content-Type": "application/json",
+ },
+ respStatus: http.StatusNotFound,
+ unescapingMode: runtime.UnescapingModeAllCharacters,
+ },
+ {
+ patterns: []stubPattern{
+ {
+ method: "GET",
+ ops: []int{
+ int(utilities.OpLitPush), 0,
+ int(utilities.OpPush), 0,
+ int(utilities.OpConcatN), 1,
+ int(utilities.OpCapture), 1,
+ int(utilities.OpLitPush), 2},
+ pool: []string{"foo", "id", "bar"},
+ },
+ },
+ reqMethod: "GET",
+ reqPath: "/foo/success%2fwith%2Fspace/bar",
+ headers: map[string]string{
+ "Content-Type": "application/json",
+ },
+ respStatus: http.StatusNotFound,
+ unescapingMode: runtime.UnescapingModeLegacy,
+ },
+ {
+ patterns: []stubPattern{
+ {
+ method: "GET",
+ ops: []int{
+ int(utilities.OpLitPush), 0,
+ int(utilities.OpPushM), 0,
+ int(utilities.OpConcatN), 1,
+ int(utilities.OpCapture), 1,
+ },
+ pool: []string{"foo", "id", "bar"},
+ },
+ },
+ reqMethod: "GET",
+ reqPath: "/foo/success%2fwith%2Fspace",
+ headers: map[string]string{
+ "Content-Type": "application/json",
+ },
+ respStatus: http.StatusOK,
+ unescapingMode: runtime.UnescapingModeAllExceptReserved,
+ respContent: "GET /foo/{id=**}",
+ },
+ {
+ patterns: []stubPattern{
+ {
+ method: "POST",
+ ops: []int{
+ int(utilities.OpLitPush), 0,
+ int(utilities.OpLitPush), 1,
+ int(utilities.OpLitPush), 2,
+ int(utilities.OpPush), 0,
+ int(utilities.OpConcatN), 2,
+ int(utilities.OpCapture), 3,
+ },
+ pool: []string{"api", "v1", "organizations", "name"},
+ verb: "action",
+ },
+ },
+ reqMethod: "POST",
+ reqPath: "/api/v1/" + url.QueryEscape("organizations/foo") + ":action",
+ headers: map[string]string{
+ "Content-Type": "application/json",
+ },
+ respStatus: http.StatusOK,
+ unescapingMode: runtime.UnescapingModeAllCharacters,
+ respContent: "POST /api/v1/{name=organizations/*}:action",
+ },
+ {
+ patterns: []stubPattern{
+ {
+ method: "POST",
+ ops: []int{
+ int(utilities.OpLitPush), 0,
+ int(utilities.OpLitPush), 1,
+ int(utilities.OpLitPush), 2,
+ },
+ pool: []string{"api", "v1", "organizations"},
+ verb: "verb",
+ },
+ {
+ method: "POST",
+ ops: []int{
+ int(utilities.OpLitPush), 0,
+ int(utilities.OpLitPush), 1,
+ int(utilities.OpLitPush), 2,
+ },
+ pool: []string{"api", "v1", "organizations"},
+ verb: "",
+ },
+ {
+ method: "POST",
+ ops: []int{
+ int(utilities.OpLitPush), 0,
+ int(utilities.OpLitPush), 1,
+ int(utilities.OpLitPush), 2,
+ },
+ pool: []string{"api", "v1", "dummies"},
+ verb: "verb",
+ },
+ },
+ reqMethod: "POST",
+ reqPath: "/api/v1/organizations:verb",
+ headers: map[string]string{
+ "Content-Type": "application/json",
+ },
+ respStatus: http.StatusOK,
+ unescapingMode: runtime.UnescapingModeAllCharacters,
+ respContent: "POST /api/v1/organizations:verb",
+ },
} {
t.Run(strconv.Itoa(i), func(t *testing.T) {
var opts []runtime.ServeMuxOption
+ opts = append(opts, runtime.WithUnescapingMode(spec.unescapingMode))
if spec.disablePathLengthFallback {
- opts = append(opts, runtime.WithDisablePathLengthFallback())
+ opts = append(opts,
+ runtime.WithDisablePathLengthFallback(),
+ )
}
mux := runtime.NewServeMux(opts...)
for _, p := range spec.patterns {
@@ -344,15 +537,15 @@ func TestMuxServeHTTP(t *testing.T) {
t.Fatalf("runtime.NewPattern(1, %#v, %#v, %q) failed with %v; want success", p.ops, p.pool, p.verb, err)
}
mux.Handle(p.method, pat, func(w http.ResponseWriter, r *http.Request, pathParams map[string]string) {
- fmt.Fprintf(w, "%s %s", p.method, pat.String())
+ _, _ = fmt.Fprintf(w, "%s %s", p.method, pat.String())
})
}(p)
}
- url := fmt.Sprintf("http://host.example%s", spec.reqPath)
- r, err := http.NewRequest(spec.reqMethod, url, bytes.NewReader(nil))
+ reqUrl := fmt.Sprintf("https://host.example%s", spec.reqPath)
+ r, err := http.NewRequest(spec.reqMethod, reqUrl, bytes.NewReader(nil))
if err != nil {
- t.Fatalf("http.NewRequest(%q, %q, nil) failed with %v; want success", spec.reqMethod, url, err)
+ t.Fatalf("http.NewRequest(%q, %q, nil) failed with %v; want success", spec.reqMethod, reqUrl, err)
}
for name, value := range spec.headers {
r.Header.Set(name, value)
@@ -418,6 +611,12 @@ var defaultRouteMatcherTests = []struct {
path string
valid bool
}{
+ {
+ "Test route /",
+ "GET",
+ "/",
+ true,
+ },
{
"Simple Endpoint",
"GET",
@@ -460,3 +659,156 @@ func TestServeMux_HandlePath(t *testing.T) {
})
}
}
+
+var healthCheckTests = []struct {
+ name string
+ code codes.Code
+ status grpc_health_v1.HealthCheckResponse_ServingStatus
+ httpStatusCode int
+}{
+ {
+ "Test grpc error code",
+ codes.NotFound,
+ grpc_health_v1.HealthCheckResponse_UNKNOWN,
+ http.StatusNotFound,
+ },
+ {
+ "Test HealthCheckResponse_SERVING",
+ codes.OK,
+ grpc_health_v1.HealthCheckResponse_SERVING,
+ http.StatusOK,
+ },
+ {
+ "Test HealthCheckResponse_NOT_SERVING",
+ codes.OK,
+ grpc_health_v1.HealthCheckResponse_NOT_SERVING,
+ http.StatusServiceUnavailable,
+ },
+ {
+ "Test HealthCheckResponse_UNKNOWN",
+ codes.OK,
+ grpc_health_v1.HealthCheckResponse_UNKNOWN,
+ http.StatusServiceUnavailable,
+ },
+ {
+ "Test HealthCheckResponse_SERVICE_UNKNOWN",
+ codes.OK,
+ grpc_health_v1.HealthCheckResponse_SERVICE_UNKNOWN,
+ http.StatusNotFound,
+ },
+}
+
+func TestWithHealthzEndpoint_codes(t *testing.T) {
+ for _, tt := range healthCheckTests {
+ t.Run(tt.name, func(t *testing.T) {
+ mux := runtime.NewServeMux(runtime.WithHealthzEndpoint(&dummyHealthCheckClient{status: tt.status, code: tt.code}))
+
+ r := httptest.NewRequest(http.MethodGet, "/healthz", nil)
+ rr := httptest.NewRecorder()
+
+ mux.ServeHTTP(rr, r)
+
+ if rr.Code != tt.httpStatusCode {
+ t.Errorf(
+ "result http status code for grpc code %q and status %q should be %d, got %d",
+ tt.code, tt.status, tt.httpStatusCode, rr.Code,
+ )
+ }
+ })
+ }
+}
+
+func TestWithHealthEndpointAt_consistentWithHealthz(t *testing.T) {
+ const endpointPath = "/healthz"
+
+ r := httptest.NewRequest(http.MethodGet, endpointPath, nil)
+
+ for _, tt := range healthCheckTests {
+ tt := tt
+
+ t.Run(tt.name, func(t *testing.T) {
+ client := &dummyHealthCheckClient{
+ status: tt.status,
+ code: tt.code,
+ }
+
+ w := httptest.NewRecorder()
+
+ runtime.NewServeMux(
+ runtime.WithHealthEndpointAt(client, endpointPath),
+ ).ServeHTTP(w, r)
+
+ refW := httptest.NewRecorder()
+
+ runtime.NewServeMux(
+ runtime.WithHealthzEndpoint(client),
+ ).ServeHTTP(refW, r)
+
+ if w.Code != refW.Code {
+ t.Errorf(
+ "result http status code for grpc code %q and status %q should be equal to %d, but got %d",
+ tt.code, tt.status, refW.Code, w.Code,
+ )
+ }
+ })
+ }
+}
+
+func TestWithHealthzEndpoint_serviceParam(t *testing.T) {
+ service := "test"
+
+ // trigger error to output service in body
+ dummyClient := dummyHealthCheckClient{status: grpc_health_v1.HealthCheckResponse_UNKNOWN, code: codes.Unknown}
+ mux := runtime.NewServeMux(runtime.WithHealthzEndpoint(&dummyClient))
+
+ r := httptest.NewRequest(http.MethodGet, "/healthz?service="+service, nil)
+ rr := httptest.NewRecorder()
+
+ mux.ServeHTTP(rr, r)
+
+ if !strings.Contains(rr.Body.String(), service) {
+ t.Errorf(
+ "service query parameter should be translated to HealthCheckRequest: expected %s to contain %s",
+ rr.Body.String(), service,
+ )
+ }
+}
+
+func TestWithHealthzEndpoint_header(t *testing.T) {
+ for _, tt := range healthCheckTests {
+ t.Run(tt.name, func(t *testing.T) {
+ mux := runtime.NewServeMux(runtime.WithHealthzEndpoint(&dummyHealthCheckClient{status: tt.status, code: tt.code}))
+
+ r := httptest.NewRequest(http.MethodGet, "/healthz", nil)
+ rr := httptest.NewRecorder()
+
+ mux.ServeHTTP(rr, r)
+
+ if actualHeader := rr.Header().Get("Content-Type"); actualHeader != "application/json" {
+ t.Errorf(
+ "result http header Content-Type for grpc code %q and status %q should be application/json, got %s",
+ tt.code, tt.status, actualHeader,
+ )
+ }
+ })
+ }
+}
+
+var _ grpc_health_v1.HealthClient = (*dummyHealthCheckClient)(nil)
+
+type dummyHealthCheckClient struct {
+ status grpc_health_v1.HealthCheckResponse_ServingStatus
+ code codes.Code
+}
+
+func (g *dummyHealthCheckClient) Check(ctx context.Context, r *grpc_health_v1.HealthCheckRequest, opts ...grpc.CallOption) (*grpc_health_v1.HealthCheckResponse, error) {
+ if g.code != codes.OK {
+ return nil, status.Error(g.code, r.GetService())
+ }
+
+ return &grpc_health_v1.HealthCheckResponse{Status: g.status}, nil
+}
+
+func (g *dummyHealthCheckClient) Watch(ctx context.Context, r *grpc_health_v1.HealthCheckRequest, opts ...grpc.CallOption) (grpc_health_v1.Health_WatchClient, error) {
+ return nil, status.Error(codes.Unimplemented, "unimplemented")
+}
diff --git a/runtime/pattern.go b/runtime/pattern.go
index 14c06dcc3f6..df7cb81426a 100644
--- a/runtime/pattern.go
+++ b/runtime/pattern.go
@@ -3,6 +3,7 @@ package runtime
import (
"errors"
"fmt"
+ "strconv"
"strings"
"github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
@@ -14,8 +15,16 @@ var (
ErrNotMatch = errors.New("not match to the path pattern")
// ErrInvalidPattern indicates that the given definition of Pattern is not valid.
ErrInvalidPattern = errors.New("invalid pattern")
+ // ErrMalformedSequence indicates that an escape sequence was malformed.
+ ErrMalformedSequence = errors.New("malformed escape sequence")
)
+type MalformedSequenceError string
+
+func (e MalformedSequenceError) Error() string {
+ return "malformed path escape " + strconv.Quote(string(e))
+}
+
type op struct {
code utilities.OpCode
operand int
@@ -140,10 +149,11 @@ func MustPattern(p Pattern, err error) Pattern {
return p
}
-// Match examines components if it matches to the Pattern.
-// If it matches, the function returns a mapping from field paths to their captured values.
-// If otherwise, the function returns an error.
-func (p Pattern) Match(components []string, verb string) (map[string]string, error) {
+// MatchAndEscape examines components to determine if they match to a Pattern.
+// MatchAndEscape will return an error if no Patterns matched or if a pattern
+// matched but contained malformed escape sequences. If successful, the function
+// returns a mapping from field paths to their captured values.
+func (p Pattern) MatchAndEscape(components []string, verb string, unescapingMode UnescapingMode) (map[string]string, error) {
if p.verb != verb {
if p.verb != "" {
return nil, ErrNotMatch
@@ -161,6 +171,8 @@ func (p Pattern) Match(components []string, verb string) (map[string]string, err
captured := make([]string, len(p.vars))
l := len(components)
for _, op := range p.ops {
+ var err error
+
switch op.code {
case utilities.OpNop:
continue
@@ -173,6 +185,10 @@ func (p Pattern) Match(components []string, verb string) (map[string]string, err
if lit := p.pool[op.operand]; c != lit {
return nil, ErrNotMatch
}
+ } else if op.code == utilities.OpPush {
+ if c, err = unescape(c, unescapingMode, false); err != nil {
+ return nil, err
+ }
}
stack = append(stack, c)
pos++
@@ -182,7 +198,11 @@ func (p Pattern) Match(components []string, verb string) (map[string]string, err
return nil, ErrNotMatch
}
end -= p.tailLen
- stack = append(stack, strings.Join(components[pos:end], "/"))
+ c := strings.Join(components[pos:end], "/")
+ if c, err = unescape(c, unescapingMode, true); err != nil {
+ return nil, err
+ }
+ stack = append(stack, c)
pos = end
case utilities.OpConcatN:
n := op.operand
@@ -204,6 +224,16 @@ func (p Pattern) Match(components []string, verb string) (map[string]string, err
return bindings, nil
}
+// MatchAndEscape examines components to determine if they match to a Pattern.
+// It will never perform per-component unescaping (see: UnescapingModeLegacy).
+// MatchAndEscape will return an error if no Patterns matched. If successful,
+// the function returns a mapping from field paths to their captured values.
+//
+// Deprecated: Use MatchAndEscape.
+func (p Pattern) Match(components []string, verb string) (map[string]string, error) {
+ return p.MatchAndEscape(components, verb, UnescapingModeDefault)
+}
+
// Verb returns the verb part of the Pattern.
func (p Pattern) Verb() string { return p.verb }
@@ -234,3 +264,120 @@ func (p Pattern) String() string {
}
return "/" + segs
}
+
+/*
+ * The following code is adopted and modified from Go's standard library
+ * and carries the attached license.
+ *
+ * Copyright 2009 The Go Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style
+ * license that can be found in the LICENSE file.
+ */
+
+// ishex returns whether or not the given byte is a valid hex character
+func ishex(c byte) bool {
+ switch {
+ case '0' <= c && c <= '9':
+ return true
+ case 'a' <= c && c <= 'f':
+ return true
+ case 'A' <= c && c <= 'F':
+ return true
+ }
+ return false
+}
+
+func isRFC6570Reserved(c byte) bool {
+ switch c {
+ case '!', '#', '$', '&', '\'', '(', ')', '*',
+ '+', ',', '/', ':', ';', '=', '?', '@', '[', ']':
+ return true
+ default:
+ return false
+ }
+}
+
+// unhex converts a hex point to the bit representation
+func unhex(c byte) byte {
+ switch {
+ case '0' <= c && c <= '9':
+ return c - '0'
+ case 'a' <= c && c <= 'f':
+ return c - 'a' + 10
+ case 'A' <= c && c <= 'F':
+ return c - 'A' + 10
+ }
+ return 0
+}
+
+// shouldUnescapeWithMode returns true if the character is escapable with the
+// given mode
+func shouldUnescapeWithMode(c byte, mode UnescapingMode) bool {
+ switch mode {
+ case UnescapingModeAllExceptReserved:
+ if isRFC6570Reserved(c) {
+ return false
+ }
+ case UnescapingModeAllExceptSlash:
+ if c == '/' {
+ return false
+ }
+ case UnescapingModeAllCharacters:
+ return true
+ }
+ return true
+}
+
+// unescape unescapes a path string using the provided mode
+func unescape(s string, mode UnescapingMode, multisegment bool) (string, error) {
+ // TODO(v3): remove UnescapingModeLegacy
+ if mode == UnescapingModeLegacy {
+ return s, nil
+ }
+
+ if !multisegment {
+ mode = UnescapingModeAllCharacters
+ }
+
+ // Count %, check that they're well-formed.
+ n := 0
+ for i := 0; i < len(s); {
+ if s[i] == '%' {
+ n++
+ if i+2 >= len(s) || !ishex(s[i+1]) || !ishex(s[i+2]) {
+ s = s[i:]
+ if len(s) > 3 {
+ s = s[:3]
+ }
+
+ return "", MalformedSequenceError(s)
+ }
+ i += 3
+ } else {
+ i++
+ }
+ }
+
+ if n == 0 {
+ return s, nil
+ }
+
+ var t strings.Builder
+ t.Grow(len(s))
+ for i := 0; i < len(s); i++ {
+ switch s[i] {
+ case '%':
+ c := unhex(s[i+1])<<4 | unhex(s[i+2])
+ if shouldUnescapeWithMode(c, mode) {
+ t.WriteByte(c)
+ i += 2
+ continue
+ }
+ fallthrough
+ default:
+ t.WriteByte(s[i])
+ }
+ }
+
+ return t.String(), nil
+}
diff --git a/runtime/pattern_test.go b/runtime/pattern_test.go
index 1b856a512a4..1fa2c6796be 100644
--- a/runtime/pattern_test.go
+++ b/runtime/pattern_test.go
@@ -367,6 +367,7 @@ func TestMatchWithBinding(t *testing.T) {
pool []string
path string
verb string
+ mode UnescapingMode
want map[string]string
}{
@@ -477,6 +478,49 @@ func TestMatchWithBinding(t *testing.T) {
"oname": "obj",
},
},
+ {
+ ops: []int{
+ int(utilities.OpLitPush), 0,
+ int(utilities.OpPush), 0,
+ int(utilities.OpConcatN), 1,
+ int(utilities.OpCapture), 1,
+ int(utilities.OpLitPush), 2,
+ },
+ pool: []string{"foo", "id", "bar"},
+ path: "foo/part1%2Fpart2/bar",
+ want: map[string]string{
+ "id": "part1/part2",
+ },
+ mode: UnescapingModeAllExceptReserved,
+ },
+ {
+ ops: []int{
+ int(utilities.OpLitPush), 0,
+ int(utilities.OpPushM), 0,
+ int(utilities.OpConcatN), 1,
+ int(utilities.OpCapture), 1,
+ },
+ pool: []string{"foo", "id"},
+ path: "foo/test%2Fbar",
+ want: map[string]string{
+ "id": "test%2Fbar",
+ },
+ mode: UnescapingModeAllExceptReserved,
+ },
+ {
+ ops: []int{
+ int(utilities.OpLitPush), 0,
+ int(utilities.OpPushM), 0,
+ int(utilities.OpConcatN), 1,
+ int(utilities.OpCapture), 1,
+ },
+ pool: []string{"foo", "id"},
+ path: "foo/test%2Fbar",
+ want: map[string]string{
+ "id": "test/bar",
+ },
+ mode: UnescapingModeAllCharacters,
+ },
} {
pat, err := NewPattern(validVersion, spec.ops, spec.pool, spec.verb)
if err != nil {
@@ -484,7 +528,8 @@ func TestMatchWithBinding(t *testing.T) {
continue
}
- got, err := pat.Match(segments(spec.path))
+ components, verb := segments(spec.path)
+ got, err := pat.MatchAndEscape(components, verb, spec.mode)
if err != nil {
t.Errorf("pat.Match(%q) failed with %v; want success; pattern = (%v, %q)", spec.path, err, spec.ops, spec.pool)
}
diff --git a/runtime/query.go b/runtime/query.go
index fb0c84ef0cd..56b796e6f4d 100644
--- a/runtime/query.go
+++ b/runtime/query.go
@@ -1,7 +1,6 @@
package runtime
import (
- "encoding/base64"
"errors"
"fmt"
"net/url"
@@ -13,17 +12,19 @@ import (
"github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
"google.golang.org/genproto/protobuf/field_mask"
"google.golang.org/grpc/grpclog"
+ "google.golang.org/protobuf/encoding/protojson"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/reflect/protoreflect"
"google.golang.org/protobuf/reflect/protoregistry"
"google.golang.org/protobuf/types/known/durationpb"
+ "google.golang.org/protobuf/types/known/structpb"
"google.golang.org/protobuf/types/known/timestamppb"
"google.golang.org/protobuf/types/known/wrapperspb"
)
var valuesKeyRegexp = regexp.MustCompile(`^(.*)\[(.*)\]$`)
-var currentQueryParser QueryParameterParser = &defaultQueryParser{}
+var currentQueryParser QueryParameterParser = &DefaultQueryParser{}
// QueryParameterParser defines interface for all query parameter parsers
type QueryParameterParser interface {
@@ -36,11 +37,15 @@ func PopulateQueryParameters(msg proto.Message, values url.Values, filter *utili
return currentQueryParser.Parse(msg, values, filter)
}
-type defaultQueryParser struct{}
+// DefaultQueryParser is a QueryParameterParser which implements the default
+// query parameters parsing behavior.
+//
+// See https://github.com/grpc-ecosystem/grpc-gateway/issues/2632 for more context.
+type DefaultQueryParser struct{}
// Parse populates "values" into "msg".
// A value is ignored if its key starts with one of the elements in "filter".
-func (*defaultQueryParser) Parse(msg proto.Message, values url.Values, filter *utilities.DoubleArray) error {
+func (*DefaultQueryParser) Parse(msg proto.Message, values url.Values, filter *utilities.DoubleArray) error {
for key, values := range values {
match := valuesKeyRegexp.FindStringSubmatch(key)
if len(match) == 3 {
@@ -175,10 +180,10 @@ func parseField(fieldDescriptor protoreflect.FieldDescriptor, value string) (pro
return protoreflect.ValueOfBool(v), nil
case protoreflect.EnumKind:
enum, err := protoregistry.GlobalTypes.FindEnumByName(fieldDescriptor.Enum().FullName())
- switch {
- case errors.Is(err, protoregistry.NotFound):
- return protoreflect.Value{}, fmt.Errorf("enum %q is not registered", fieldDescriptor.Enum().FullName())
- case err != nil:
+ if err != nil {
+ if errors.Is(err, protoregistry.NotFound) {
+ return protoreflect.Value{}, fmt.Errorf("enum %q is not registered", fieldDescriptor.Enum().FullName())
+ }
return protoreflect.Value{}, fmt.Errorf("failed to look up enum: %w", err)
}
// Look for enum by name
@@ -189,8 +194,7 @@ func parseField(fieldDescriptor protoreflect.FieldDescriptor, value string) (pro
return protoreflect.Value{}, fmt.Errorf("%q is not a valid value", value)
}
// Look for enum by number
- v = enum.Descriptor().Values().ByNumber(protoreflect.EnumNumber(i))
- if v == nil {
+ if v = enum.Descriptor().Values().ByNumber(protoreflect.EnumNumber(i)); v == nil {
return protoreflect.Value{}, fmt.Errorf("%q is not a valid value", value)
}
}
@@ -234,7 +238,7 @@ func parseField(fieldDescriptor protoreflect.FieldDescriptor, value string) (pro
case protoreflect.StringKind:
return protoreflect.ValueOfString(value), nil
case protoreflect.BytesKind:
- v, err := base64.URLEncoding.DecodeString(value)
+ v, err := Bytes(value)
if err != nil {
return protoreflect.Value{}, err
}
@@ -250,18 +254,12 @@ func parseMessage(msgDescriptor protoreflect.MessageDescriptor, value string) (p
var msg proto.Message
switch msgDescriptor.FullName() {
case "google.protobuf.Timestamp":
- if value == "null" {
- break
- }
t, err := time.Parse(time.RFC3339Nano, value)
if err != nil {
return protoreflect.Value{}, err
}
msg = timestamppb.New(t)
case "google.protobuf.Duration":
- if value == "null" {
- break
- }
d, err := time.ParseDuration(value)
if err != nil {
return protoreflect.Value{}, err
@@ -272,55 +270,69 @@ func parseMessage(msgDescriptor protoreflect.MessageDescriptor, value string) (p
if err != nil {
return protoreflect.Value{}, err
}
- msg = &wrapperspb.DoubleValue{Value: v}
+ msg = wrapperspb.Double(v)
case "google.protobuf.FloatValue":
v, err := strconv.ParseFloat(value, 32)
if err != nil {
return protoreflect.Value{}, err
}
- msg = &wrapperspb.FloatValue{Value: float32(v)}
+ msg = wrapperspb.Float(float32(v))
case "google.protobuf.Int64Value":
v, err := strconv.ParseInt(value, 10, 64)
if err != nil {
return protoreflect.Value{}, err
}
- msg = &wrapperspb.Int64Value{Value: v}
+ msg = wrapperspb.Int64(v)
case "google.protobuf.Int32Value":
v, err := strconv.ParseInt(value, 10, 32)
if err != nil {
return protoreflect.Value{}, err
}
- msg = &wrapperspb.Int32Value{Value: int32(v)}
+ msg = wrapperspb.Int32(int32(v))
case "google.protobuf.UInt64Value":
v, err := strconv.ParseUint(value, 10, 64)
if err != nil {
return protoreflect.Value{}, err
}
- msg = &wrapperspb.UInt64Value{Value: v}
+ msg = wrapperspb.UInt64(v)
case "google.protobuf.UInt32Value":
v, err := strconv.ParseUint(value, 10, 32)
if err != nil {
return protoreflect.Value{}, err
}
- msg = &wrapperspb.UInt32Value{Value: uint32(v)}
+ msg = wrapperspb.UInt32(uint32(v))
case "google.protobuf.BoolValue":
v, err := strconv.ParseBool(value)
if err != nil {
return protoreflect.Value{}, err
}
- msg = &wrapperspb.BoolValue{Value: v}
+ msg = wrapperspb.Bool(v)
case "google.protobuf.StringValue":
- msg = &wrapperspb.StringValue{Value: value}
+ msg = wrapperspb.String(value)
case "google.protobuf.BytesValue":
- v, err := base64.URLEncoding.DecodeString(value)
+ v, err := Bytes(value)
if err != nil {
return protoreflect.Value{}, err
}
- msg = &wrapperspb.BytesValue{Value: v}
+ msg = wrapperspb.Bytes(v)
case "google.protobuf.FieldMask":
fm := &field_mask.FieldMask{}
fm.Paths = append(fm.Paths, strings.Split(value, ",")...)
msg = fm
+ case "google.protobuf.Value":
+ var v structpb.Value
+ err := protojson.Unmarshal([]byte(value), &v)
+ if err != nil {
+ return protoreflect.Value{}, err
+ }
+ msg = &v
+ case "google.protobuf.Struct":
+ var v structpb.Struct
+ err := protojson.Unmarshal([]byte(value), &v)
+ if err != nil {
+ return protoreflect.Value{}, err
+ }
+ msg = &v
default:
return protoreflect.Value{}, fmt.Errorf("unsupported message type: %q", string(msgDescriptor.FullName()))
}
diff --git a/runtime/query_fuzz_test.go b/runtime/query_fuzz_test.go
new file mode 100644
index 00000000000..20a7126d7eb
--- /dev/null
+++ b/runtime/query_fuzz_test.go
@@ -0,0 +1,36 @@
+//go:build go1.18
+// +build go1.18
+
+package runtime_test
+
+import (
+ "net/url"
+ "testing"
+
+ "github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
+ "github.com/grpc-ecosystem/grpc-gateway/v2/runtime/internal/examplepb"
+ "github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
+)
+
+func FuzzPopulateQueryParameters(f *testing.F) {
+ f.Add("bool_value=true&bytes_value=YWJjMTIzIT8kKiYoKSctPUB-&double_value=2.5&duration_value=13h0m0s&enum_value=1&fieldmask_value=float_value%2Cdouble_value&float_value=1.5&int32_value=-2&int64_value=-1&map_value10%5Bkey%5D=1.5&map_value11%5B1.5%5D=value&map_value12%5Bkey%5D=2.5&map_value13%5B2.5%5D=value&map_value14%5Bkey%5D=true&map_value15%5Btrue%5D=value&map_value16%5Bkey%5D=2&map_value2%5Bkey%5D=-2&map_value3%5B-2%5D=value&map_value4%5Bkey%5D=-1&map_value5%5B-1%5D=value&map_value6%5Bkey%5D=3&map_value7%5B3%5D=value&map_value8%5Bkey%5D=4&map_value9%5B4%5D=value&map_value%5Bfourth%5D=&map_value%5Bkey%5D=value&map_value%5Bsecond%5D=bar&map_value%5Bthird%5D=zzz&map_value%5B~%21%40%23%24%25%5E%26%2A%28%29%5D=value&repeated_enum=1&repeated_enum=2&repeated_enum=0&repeated_message=1&repeated_message=2&repeated_message=3&repeated_value=a&repeated_value=b&repeated_value=c&string_value=str&struct_value=%7B%22a%22%3A%7B%22b%22%3A1%7D%7D&struct_value_value=%7B%22a%22%3A%7B%22b%22%3A1%7D%7D×tamp_value=2016-12-15T12%3A23%3A32.000000049Z&uint32_value=4&uint64_value=3&wrapper_bool_value=true&wrapper_bytes_value=YWJjMTIzIT8kKiYoKSctPUB-&wrapper_double_value=2.5&wrapper_float_value=1.5&wrapper_int32_value=-2&wrapper_int64_value=-1&wrapper_string_value=str&wrapper_u_int32_value=4&wrapper_u_int64_value=3")
+ f.Add("boolValue=true&bytesValue=Ynl0ZXM%3D&doubleValue=2.5&durationValue=13h0m0s&enumValue=1&fieldmaskValue=float_value%2Cdouble_value&floatValue=1.5&int32Value=-2&int64Value=-1&repeatedEnum=1&repeatedEnum=2&repeatedEnum=0&repeatedValue=a&repeatedValue=b&repeatedValue=c&stringValue=str&struct_value=%7B%7D&struct_value_value=%22%22×tampValue=2016-12-15T12%3A23%3A32.000000049Z&uint32Value=4&uint64Value=3&wrapperBoolValue=true&wrapperBytesValue=Ynl0ZXM%3D&wrapperDoubleValue=2.5&wrapperFloatValue=1.5&wrapperInt32Value=-2&wrapperInt64Value=-1&wrapperStringValue=str&wrapperUInt32Value=4&wrapperUInt64Value=3")
+ f.Add("enum_value=Z&repeated_enum=X&repeated_enum=2&repeated_enum=0&struct_value=%7B%22c%22%3A%5B1%2C2%5D%2C%22d%22%3A%5B%7B%22e%22%3A1%2C%22f%22%3A%7B%7D%7D%5D%7D&struct_value_value=%7B%7D")
+ f.Add("struct_value_value=%5B%5D")
+ f.Add("bool_value=true&double_value=2.5&float_value=1.5&int32_value=-2&int64_value=-1&repeated_value=a&repeated_value=b&repeated_value=c&string_value=str&uint32_value=4&uint64_value=3")
+ f.Add("boolValue=true&doubleValue=2.5&floatValue=1.5&int32Value=-2&int64Value=-1&repeatedValue=a&repeatedValue=b&repeatedValue=c&stringValue=str&uint32Value=4&uint64Value=")
+ f.Add("nested.nested.map_value%5Bfirst%5D=foo&nested.nested.map_value%5Bsecond%5D=bar&nested.nested.nested.repeated_value=a&nested.nested.nested.repeated_value=b&nested.nested.nested.repeated_value=c&nested.nested.nested.string_value=s&nested.nested.string_value=t&nested.string_value=u")
+ f.Add("oneof_string_value=foobar")
+ f.Add("nested_oneof_value_one.int64Value=-1&nested_oneof_value_one.string_value=foo")
+ f.Fuzz(func(t *testing.T, query string) {
+ in := &examplepb.ABitOfEverything{}
+ values, err := url.ParseQuery(query)
+ if err != nil {
+ return
+ }
+ err = runtime.PopulateQueryParameters(in, values, utilities.NewDoubleArray(nil))
+ if err != nil {
+ return
+ }
+ })
+}
diff --git a/runtime/query_test.go b/runtime/query_test.go
index 1ee46a09f96..0680264be05 100644
--- a/runtime/query_test.go
+++ b/runtime/query_test.go
@@ -15,6 +15,7 @@ import (
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/testing/protocmp"
"google.golang.org/protobuf/types/known/durationpb"
+ "google.golang.org/protobuf/types/known/structpb"
"google.golang.org/protobuf/types/known/timestamppb"
"google.golang.org/protobuf/types/known/wrapperspb"
)
@@ -96,6 +97,25 @@ func TestPopulateParameters(t *testing.T) {
fieldmaskStr := "float_value,double_value"
fieldmaskPb := &field_mask.FieldMask{Paths: []string{"float_value", "double_value"}}
+ structValueJsonStrings := []string{`{"a":{"b":1}}`, `""`, "{}", "[]", "true", "0"}
+ structValueValues := make([]*structpb.Value, len(structValueJsonStrings))
+ for i := range structValueValues {
+ structValueValues[i] = &structpb.Value{}
+ err := structValueValues[i].UnmarshalJSON([]byte(structValueJsonStrings[i]))
+ if err != nil {
+ t.Errorf("build struct.Value value failed: %s", err.Error())
+ }
+ }
+ structJsonStrings := []string{`{"a":{"b":1}}`, "{}", `{"c":[1,2],"d":[{"e":1,"f":{}}]}`}
+ structValues := make([]*structpb.Struct, len(structJsonStrings))
+ for i := range structValues {
+ structValues[i] = &structpb.Struct{}
+ err := structValues[i].UnmarshalJSON([]byte(structJsonStrings[i]))
+ if err != nil {
+ t.Errorf("build struct.Struct value failed: %s", err.Error())
+ }
+ }
+
for i, spec := range []struct {
values url.Values
filter *utilities.DoubleArray
@@ -149,6 +169,8 @@ func TestPopulateParameters(t *testing.T) {
"map_value14[key]": {"true"},
"map_value15[true]": {"value"},
"map_value16[key]": {"2"},
+ "struct_value_value": {structValueJsonStrings[0]},
+ "struct_value": {structJsonStrings[0]},
},
filter: utilities.NewDoubleArray(nil),
want: &examplepb.Proto3Message{
@@ -168,15 +190,15 @@ func TestPopulateParameters(t *testing.T) {
TimestampValue: timePb,
DurationValue: durationPb,
FieldmaskValue: fieldmaskPb,
- WrapperFloatValue: &wrapperspb.FloatValue{Value: 1.5},
- WrapperDoubleValue: &wrapperspb.DoubleValue{Value: 2.5},
- WrapperInt64Value: &wrapperspb.Int64Value{Value: -1},
- WrapperInt32Value: &wrapperspb.Int32Value{Value: -2},
- WrapperUInt64Value: &wrapperspb.UInt64Value{Value: 3},
- WrapperUInt32Value: &wrapperspb.UInt32Value{Value: 4},
- WrapperBoolValue: &wrapperspb.BoolValue{Value: true},
- WrapperStringValue: &wrapperspb.StringValue{Value: "str"},
- WrapperBytesValue: &wrapperspb.BytesValue{Value: []byte("abc123!?$*&()'-=@~")},
+ WrapperFloatValue: wrapperspb.Float(1.5),
+ WrapperDoubleValue: wrapperspb.Double(2.5),
+ WrapperInt64Value: wrapperspb.Int64(-1),
+ WrapperInt32Value: wrapperspb.Int32(-2),
+ WrapperUInt64Value: wrapperspb.UInt64(3),
+ WrapperUInt32Value: wrapperspb.UInt32(4),
+ WrapperBoolValue: wrapperspb.Bool(true),
+ WrapperStringValue: wrapperspb.String("str"),
+ WrapperBytesValue: wrapperspb.Bytes([]byte("abc123!?$*&()'-=@~")),
MapValue: map[string]string{
"key": "value",
"second": "bar",
@@ -184,19 +206,21 @@ func TestPopulateParameters(t *testing.T) {
"fourth": "",
`~!@#$%^&*()`: "value",
},
- MapValue2: map[string]int32{"key": -2},
- MapValue3: map[int32]string{-2: "value"},
- MapValue4: map[string]int64{"key": -1},
- MapValue5: map[int64]string{-1: "value"},
- MapValue6: map[string]uint32{"key": 3},
- MapValue7: map[uint32]string{3: "value"},
- MapValue8: map[string]uint64{"key": 4},
- MapValue9: map[uint64]string{4: "value"},
- MapValue10: map[string]float32{"key": 1.5},
- MapValue12: map[string]float64{"key": 2.5},
- MapValue14: map[string]bool{"key": true},
- MapValue15: map[bool]string{true: "value"},
- MapValue16: map[string]*wrapperspb.UInt64Value{"key": {Value: 2}},
+ MapValue2: map[string]int32{"key": -2},
+ MapValue3: map[int32]string{-2: "value"},
+ MapValue4: map[string]int64{"key": -1},
+ MapValue5: map[int64]string{-1: "value"},
+ MapValue6: map[string]uint32{"key": 3},
+ MapValue7: map[uint32]string{3: "value"},
+ MapValue8: map[string]uint64{"key": 4},
+ MapValue9: map[uint64]string{4: "value"},
+ MapValue10: map[string]float32{"key": 1.5},
+ MapValue12: map[string]float64{"key": 2.5},
+ MapValue14: map[string]bool{"key": true},
+ MapValue15: map[bool]string{true: "value"},
+ MapValue16: map[string]*wrapperspb.UInt64Value{"key": {Value: 2}},
+ StructValueValue: structValueValues[0],
+ StructValue: structValues[0],
},
},
{
@@ -225,6 +249,8 @@ func TestPopulateParameters(t *testing.T) {
"wrapperBoolValue": {"true"},
"wrapperStringValue": {"str"},
"wrapperBytesValue": {"Ynl0ZXM="},
+ "struct_value_value": {structValueJsonStrings[1]},
+ "struct_value": {structJsonStrings[1]},
},
filter: utilities.NewDoubleArray(nil),
want: &examplepb.Proto3Message{
@@ -243,26 +269,59 @@ func TestPopulateParameters(t *testing.T) {
TimestampValue: timePb,
DurationValue: durationPb,
FieldmaskValue: fieldmaskPb,
- WrapperFloatValue: &wrapperspb.FloatValue{Value: 1.5},
- WrapperDoubleValue: &wrapperspb.DoubleValue{Value: 2.5},
- WrapperInt64Value: &wrapperspb.Int64Value{Value: -1},
- WrapperInt32Value: &wrapperspb.Int32Value{Value: -2},
- WrapperUInt64Value: &wrapperspb.UInt64Value{Value: 3},
- WrapperUInt32Value: &wrapperspb.UInt32Value{Value: 4},
- WrapperBoolValue: &wrapperspb.BoolValue{Value: true},
- WrapperStringValue: &wrapperspb.StringValue{Value: "str"},
- WrapperBytesValue: &wrapperspb.BytesValue{Value: []byte("bytes")},
+ WrapperFloatValue: wrapperspb.Float(1.5),
+ WrapperDoubleValue: wrapperspb.Double(2.5),
+ WrapperInt64Value: wrapperspb.Int64(-1),
+ WrapperInt32Value: wrapperspb.Int32(-2),
+ WrapperUInt64Value: wrapperspb.UInt64(3),
+ WrapperUInt32Value: wrapperspb.UInt32(4),
+ WrapperBoolValue: wrapperspb.Bool(true),
+ WrapperStringValue: wrapperspb.String("str"),
+ WrapperBytesValue: wrapperspb.Bytes([]byte("bytes")),
+ StructValueValue: structValueValues[1],
+ StructValue: structValues[1],
},
},
{
values: url.Values{
- "enum_value": {"Z"},
- "repeated_enum": {"X", "2", "0"},
+ "enum_value": {"Z"},
+ "repeated_enum": {"X", "2", "0"},
+ "struct_value_value": {structValueJsonStrings[2]},
+ "struct_value": {structJsonStrings[2]},
},
filter: utilities.NewDoubleArray(nil),
want: &examplepb.Proto3Message{
- EnumValue: examplepb.EnumValue_Z,
- RepeatedEnum: []examplepb.EnumValue{examplepb.EnumValue_X, examplepb.EnumValue_Z, examplepb.EnumValue_X},
+ EnumValue: examplepb.EnumValue_Z,
+ RepeatedEnum: []examplepb.EnumValue{examplepb.EnumValue_X, examplepb.EnumValue_Z, examplepb.EnumValue_X},
+ StructValueValue: structValueValues[2],
+ StructValue: structValues[2],
+ },
+ },
+ {
+ values: url.Values{
+ "struct_value_value": {structValueJsonStrings[3]},
+ },
+ filter: utilities.NewDoubleArray(nil),
+ want: &examplepb.Proto3Message{
+ StructValueValue: structValueValues[3],
+ },
+ },
+ {
+ values: url.Values{
+ "struct_value_value": {structValueJsonStrings[4]},
+ },
+ filter: utilities.NewDoubleArray(nil),
+ want: &examplepb.Proto3Message{
+ StructValueValue: structValueValues[4],
+ },
+ },
+ {
+ values: url.Values{
+ "struct_value_value": {structValueJsonStrings[5]},
+ },
+ filter: utilities.NewDoubleArray(nil),
+ want: &examplepb.Proto3Message{
+ StructValueValue: structValueValues[5],
},
},
{
@@ -375,6 +434,39 @@ func TestPopulateParameters(t *testing.T) {
},
},
},
+ {
+ values: url.Values{
+ "nested_oneof_value_one.int64Value": {"-1"},
+ "nested_oneof_value_one.string_value": {"foo"},
+ },
+ filter: utilities.NewDoubleArray(nil),
+ want: &examplepb.Proto3Message{
+ NestedOneofValue: &examplepb.Proto3Message_NestedOneofValueOne{
+ NestedOneofValueOne: &examplepb.Proto3Message{
+ Int64Value: -1,
+ StringValue: "foo",
+ },
+ },
+ },
+ },
+ {
+ // Error on "null"
+ values: url.Values{
+ "timestampValue": {"null"},
+ },
+ filter: utilities.NewDoubleArray(nil),
+ want: &examplepb.Proto3Message{},
+ wanterr: errors.New(`parsing field "timestamp_value": parsing time "null" as "2006-01-02T15:04:05.999999999Z07:00": cannot parse "null" as "2006"`),
+ },
+ {
+ // Error on "null"
+ values: url.Values{
+ "durationValue": {"null"},
+ },
+ filter: utilities.NewDoubleArray(nil),
+ want: &examplepb.Proto3Message{},
+ wanterr: errors.New(`parsing field "duration_value": time: invalid duration "null"`),
+ },
{
// Don't allow setting a oneof more than once
values: url.Values{
diff --git a/tools.go b/tools.go
deleted file mode 100644
index eaaaa57619e..00000000000
--- a/tools.go
+++ /dev/null
@@ -1,9 +0,0 @@
-//+build tools
-
-package tools
-
-import (
- _ "github.com/bufbuild/buf/cmd/buf"
- _ "google.golang.org/grpc/cmd/protoc-gen-go-grpc"
- _ "google.golang.org/protobuf/cmd/protoc-gen-go"
-)
diff --git a/utilities/BUILD.bazel b/utilities/BUILD.bazel
index 6bb7df467fb..b8940946577 100644
--- a/utilities/BUILD.bazel
+++ b/utilities/BUILD.bazel
@@ -3,19 +3,29 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
package(default_visibility = ["//visibility:public"])
go_library(
- name = "go_default_library",
+ name = "utilities",
srcs = [
"doc.go",
"pattern.go",
"readerfactory.go",
+ "string_array_flag.go",
"trie.go",
],
importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/utilities",
)
go_test(
- name = "go_default_test",
+ name = "utilities_test",
size = "small",
- srcs = ["trie_test.go"],
- embed = [":go_default_library"],
+ srcs = [
+ "string_array_flag_test.go",
+ "trie_test.go",
+ ],
+ deps = [":utilities"],
+)
+
+alias(
+ name = "go_default_library",
+ actual = ":utilities",
+ visibility = ["//visibility:public"],
)
diff --git a/utilities/readerfactory.go b/utilities/readerfactory.go
index 6dd3854665f..01d26edae3c 100644
--- a/utilities/readerfactory.go
+++ b/utilities/readerfactory.go
@@ -3,13 +3,12 @@ package utilities
import (
"bytes"
"io"
- "io/ioutil"
)
// IOReaderFactory takes in an io.Reader and returns a function that will allow you to create a new reader that begins
// at the start of the stream
func IOReaderFactory(r io.Reader) (func() io.Reader, error) {
- b, err := ioutil.ReadAll(r)
+ b, err := io.ReadAll(r)
if err != nil {
return nil, err
}
diff --git a/utilities/string_array_flag.go b/utilities/string_array_flag.go
new file mode 100644
index 00000000000..d224ab776c0
--- /dev/null
+++ b/utilities/string_array_flag.go
@@ -0,0 +1,33 @@
+package utilities
+
+import (
+ "flag"
+ "strings"
+)
+
+// flagInterface is an cut down interface to `flag`
+type flagInterface interface {
+ Var(value flag.Value, name string, usage string)
+}
+
+// StringArrayFlag defines a flag with the specified name and usage string.
+// The return value is the address of a `StringArrayFlags` variable that stores the repeated values of the flag.
+func StringArrayFlag(f flagInterface, name string, usage string) *StringArrayFlags {
+ value := &StringArrayFlags{}
+ f.Var(value, name, usage)
+ return value
+}
+
+// StringArrayFlags is a wrapper of `[]string` to provider an interface for `flag.Var`
+type StringArrayFlags []string
+
+// String returns a string representation of `StringArrayFlags`
+func (i *StringArrayFlags) String() string {
+ return strings.Join(*i, ",")
+}
+
+// Set appends a value to `StringArrayFlags`
+func (i *StringArrayFlags) Set(value string) error {
+ *i = append(*i, value)
+ return nil
+}
diff --git a/utilities/string_array_flag_test.go b/utilities/string_array_flag_test.go
new file mode 100644
index 00000000000..34cbefb58cc
--- /dev/null
+++ b/utilities/string_array_flag_test.go
@@ -0,0 +1,50 @@
+package utilities_test
+
+import (
+ "flag"
+ "reflect"
+ "testing"
+
+ "github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
+)
+
+func TestStringArrayFlag(t *testing.T) {
+ tests := []struct {
+ name string
+ flags []string
+ want string
+ }{
+ {
+ name: "No Value",
+ flags: []string{},
+ want: "",
+ },
+ {
+ name: "Single Value",
+ flags: []string{"--my_flag=1"},
+ want: "1",
+ },
+ {
+ name: "Repeated Value",
+ flags: []string{"--my_flag=1", "--my_flag=2"},
+ want: "1,2",
+ },
+ {
+ name: "Repeated Same Value",
+ flags: []string{"--my_flag=1", "--my_flag=1"},
+ want: "1,1",
+ },
+ }
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ flagSet := flag.NewFlagSet("test", flag.PanicOnError)
+ result := utilities.StringArrayFlag(flagSet, "my_flag", "repeated flag")
+ if err := flagSet.Parse(tt.flags); err != nil {
+ t.Errorf("flagSet.Parse() failed with %v", err)
+ }
+ if !reflect.DeepEqual(result.String(), tt.want) {
+ t.Errorf("StringArrayFlag() = %v, want %v", result.String(), tt.want)
+ }
+ })
+ }
+}
diff --git a/utilities/trie.go b/utilities/trie.go
index af3b703d505..dd99b0ed256 100644
--- a/utilities/trie.go
+++ b/utilities/trie.go
@@ -40,7 +40,7 @@ func NewDoubleArray(seqs [][]string) *DoubleArray {
func registerTokens(da *DoubleArray, seqs [][]string) [][]int {
var result [][]int
for _, seq := range seqs {
- var encoded []int
+ encoded := make([]int, 0, len(seq))
for _, token := range seq {
if _, ok := da.Encoding[token]; !ok {
da.Encoding[token] = len(da.Encoding)