Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

http rule's response_body support to stream rpc #1206

Closed
wants to merge 616 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
616 commits
Select commit Hold shift + click to select a range
06771dc
Run buildifer on Bazel files (#797)
drigz Nov 8, 2018
25eec8e
fix bug: the resource name of custom method doesn't be retained
ch3rub1m Nov 13, 2018
fe35e07
Update rules_go and gazelle (#802)
drigz Nov 13, 2018
1ff6618
Make Bazel CI failures clearer (#807)
drigz Nov 14, 2018
6bf7a02
Adding support for more well known types in descriptor (#809)
mayankcpdixit Nov 14, 2018
9aa2ebf
Corret wellKnownTypeConv function references
johanbrandhorst Nov 15, 2018
8773161
Revert "Adding support for more well known types in descriptor" (#813)
johanbrandhorst Nov 16, 2018
dd4ffb0
Fix protobuf repository's owner name on README.md
micnncim Nov 17, 2018
063f96e
Added support for more WKT (#816)
mayankcpdixit Nov 19, 2018
7e951c2
Feature/patch2 rebased (#812)
razamiDev Nov 19, 2018
7a8292c
Add filegroup for options proto files
kellycampbell Dec 5, 2018
762f88c
Generate changelog for 1.6.0
johanbrandhorst Dec 7, 2018
d4828b2
Check out code before calling ghr
johanbrandhorst Dec 7, 2018
41883ac
Write version to intermediate file for release publish
johanbrandhorst Dec 7, 2018
d57bb14
Stop the publishing recursion
achew22 Dec 8, 2018
8a1a32a
Swagger-gen: Major overhaul of well-known-type handling
birdayz Nov 8, 2018
3ab55fa
protoc-gen-swagger: check typeIndex when typeName is Method
hexfusion Dec 18, 2018
6b3897f
protoc-gen-swagger: add tests for isProtoPathMatches and protoComments
hexfusion Dec 20, 2018
cd6ad95
examples/*: regenerate files
hexfusion Dec 20, 2018
7cd4c80
Include version in release builds
johanbrandhorst Dec 21, 2018
ebda25e
Replace complicated release procedure with goreleaser
johanbrandhorst Dec 21, 2018
969f17a
Regenerate changelog for 1.6.3
johanbrandhorst Dec 21, 2018
ac69a39
Fix the url of gRPC timeouts on README.md
royeo Dec 26, 2018
fb64a3c
Fix the url of gRPC timeouts on README.md
royeo Dec 26, 2018
adaa5e0
Update bazel dependencies
achew22 Jan 7, 2019
2e6be2a
gengateway: allow opting out patch feature
glerchundi Jan 7, 2019
6ea534d
Generate changelog for 1.6.4
johanbrandhorst Jan 8, 2019
fc2588b
Fix the generated URL in the changelog
johanbrandhorst Jan 9, 2019
53e9ebd
fill example attribute of swagger schema if provided for messages
birdayz Nov 7, 2018
7d881eb
fix nil dereference
birdayz Nov 7, 2018
8d8000c
use json.RawMessage for property & object examples
birdayz Nov 8, 2018
2f0faa4
goimports
birdayz Nov 8, 2018
1aa455e
a_bit_of_everything.proto: add 'example' example
srenatus Jan 9, 2019
f0d122a
protoc-gen-swagger/genswagger: add tests for message definitions
srenatus Jan 10, 2019
59a695b
protoc-gen-swagger/genswagger: simplify skipRenderingRef
srenatus Jan 10, 2019
fd90abb
template_test: make test loop fit into the scheme used for other tests
srenatus Jan 10, 2019
2a6ed03
examples/a_bit_of_everything: add nested msg example
srenatus Jan 10, 2019
796f1e8
protoc-gen-swagger/genswagger: update BUILD.bazel
srenatus Jan 10, 2019
f07c49f
examples/a_bit_of_everything: add more complex message example
srenatus Jan 10, 2019
dffd219
Support outputting arrays in protoc-gen-swagger (#853)
abice Jan 17, 2019
8220da3
marshal_jsonpb: Added nil slice default value (#854)
abice Jan 18, 2019
5a9b22a
marshal_jsonpb: add check for slice sub types implementing proto.Mess…
abice Jan 21, 2019
00289e6
Added WithDisablePathLengthFallback option (to fix issue #447) (#855)
Jan 22, 2019
fb01528
Adding support for default and required swagger annotation fields. (#…
Jan 22, 2019
ff2ddac
make generated swagger json match gateway behavior for server streams…
mechinn Jan 23, 2019
74c9f17
Use github.com/golang/protobuf/descriptor ForMessage and fix CI from …
mechinn Jan 23, 2019
d2a1956
Generate changelog for 1.7.0
johanbrandhorst Jan 23, 2019
ce9d945
protoc-gen-swagger: add the package name to the tags field of each en…
zwcn Jan 28, 2019
c9db71f
Update CI badge link in documentation
johanbrandhorst Feb 5, 2019
60c1134
863 adding swagger annotation support for enum, repeated enum, nested…
Feb 11, 2019
5737764
863 fixing swagger generation
Feb 11, 2019
550a016
863 fixing swagger generation test
Feb 11, 2019
2cb361a
863 removed unused code
Feb 11, 2019
154b1ce
863 completing proto documentation
Feb 11, 2019
bdfada0
863 fixing node test
Feb 12, 2019
8f93024
863 keeping comment precendece on swagger package definition
Feb 12, 2019
dc09cf8
863 fixing code format
Feb 12, 2019
ba8874a
863 changing field options override behavior for schema package object
Feb 12, 2019
b649504
Updated Service, Method, Message Identifiers to be CamelCased
waveywaves Feb 12, 2019
b90a79b
868 improving README with AWS API gateway findings (#869)
Feb 18, 2019
7430a73
Switch to go modules
johanbrandhorst Feb 18, 2019
68f65d9
Upgrade to rules_go 0.17.0
achew22 Feb 23, 2019
08a343c
Run buildifer on WORKSPACE
achew22 Feb 23, 2019
3127962
protoc-gen-grpc-gateway: use context package from stdlib
simonpasquier Feb 25, 2019
03c84e7
Fix Swagger parameter names when using JSON names. (#879)
brocaar Feb 28, 2019
08b713e
go.mod: update grpc from v1.16.0 to v1.17.0
Feb 28, 2019
36744c1
go.mod: update grpc from v1.17.0 to v1.19.0
Feb 28, 2019
2dcbaca
protoc-gen-swagger: add fqn_for_swagger_name option
hypnoce Mar 1, 2019
dd94208
Add read-only support to protoc-gen-swagger output (#882)
hypnoce Mar 1, 2019
c4bb047
Generate changelog for 1.8.0 (#883)
johanbrandhorst Mar 1, 2019
21db267
CI: fix release builds (#884)
johanbrandhorst Mar 1, 2019
4c0a13d
Generate changelog for v1.8.1 (#887)
johanbrandhorst Mar 2, 2019
6d4a340
README: Add some nicer looking badges (#890)
johanbrandhorst Mar 2, 2019
c317ef5
Upgrade generator and runtime versions (#889)
johanbrandhorst Mar 2, 2019
ee8c991
bazel: Use new ProtoInfo provider
drigz Mar 4, 2019
c10b0a5
Disable IOReaderFactory for streaming requests (#896)
happyalu Mar 6, 2019
0a1978c
Fix problem while generating swagger documentation for enum messages …
Mar 7, 2019
a0b1534
Regenerate changelog for 1.8.2
johanbrandhorst Mar 7, 2019
6c38131
protoc-gen-swagger: return error when encoding swagger file
Feb 27, 2019
34920fc
Use collectionFormat multi for query params of repeated fields (#902)
bmperrea Mar 10, 2019
13701eb
Regenerate changelog for 1.8.3
johanbrandhorst Mar 11, 2019
162904f
New proposal: support for the google.api.HttpBody (#904)
wimspaargaren Mar 11, 2019
7c6ae15
Revert "Use collectionFormat multi for query params of repeated field…
johanbrandhorst Mar 13, 2019
7ed803d
Generate changelog for 1.8.4
johanbrandhorst Mar 13, 2019
700c928
CollectionFormat multi for query params of repeated fields 2 (#909)
bmperrea Mar 14, 2019
2fa697c
Generate changelog for 1.8.5
johanbrandhorst Mar 15, 2019
bb43602
Fixed empty path bug (#913)
brycematheson1234 Mar 27, 2019
fe582df
Make gazelle diffs fail the build
achew22 Mar 31, 2019
6d0bd2d
Delete redundant load statement
pcj Apr 14, 2019
187901f
Generate changelog for 1.8.6
johanbrandhorst May 7, 2019
3f5cb50
Run proto gen swagger with protos from external repository
Apr 18, 2019
bf72219
Generate correct changelog version
johanbrandhorst May 7, 2019
d9416f0
ability to customize stream errors (#930)
jhump May 9, 2019
6ef67a3
newline between JSON messages (#931)
jhump May 10, 2019
96073c9
use error value for bad URI so custom error handler could treat it sp…
jhump May 13, 2019
e30e263
Generate changelog for 1.9.0
johanbrandhorst May 14, 2019
ed155fe
Fix make test on MacOS
emilaasa May 14, 2019
6c63289
fix query params not populate if method is post (#939)
mingqing May 26, 2019
6081c03
Revert "protoc-gen-swagger: check typeIndex when typeName is Method"
johanbrandhorst Jun 13, 2019
cb0458b
Generate changelog for 1.9.1
johanbrandhorst Jun 13, 2019
54535ae
Support colon in final path segment, last match wins behavior (behind…
jfhamlin Jun 16, 2019
998d9a6
Improve README file
charleswhchan Jun 16, 2019
1c69f03
Generate changelog for 1.9.2
johanbrandhorst Jun 17, 2019
99599ee
docs/customizingyourgateway: add ?pretty example (#954)
srenatus Jun 18, 2019
39760da
Update to rules_go and buildtools (#956)
drigz Jun 18, 2019
f7c8b90
Add new option for the decoder - to disallow unknown fields (#959)
vsaveliev Jun 21, 2019
803f56d
protoc_gen_swagger: Add attr for single_output (#944)
prestonvanloon Jun 24, 2019
00a0106
Fix EOF handling in client side streaming (#962)
gustavocovas Jun 28, 2019
c89bee8
Generate changelog for 1.9.3 (#964)
johanbrandhorst Jun 28, 2019
bb741a7
Added comments to base_path to explain behavior (#919)
nu11ptr Jun 29, 2019
a47d5ba
doc(readme): fix typo (#965)
franxois Jul 2, 2019
918b74f
Fix query.go to avoid invalid protobuf assumptions
dsnet Jul 8, 2019
899b614
Generate changelog for 1.9.4
johanbrandhorst Jul 9, 2019
c234fc3
fix: Support preflight of auth libraries in js
GhiaC Jul 22, 2019
eaf17ae
Fix HTTP Status Code returned for a `Failed Precondition` error
cjcormack Jul 22, 2019
3e7dbae
Generate changelog for 1.9.5
johanbrandhorst Jul 22, 2019
4e17b80
Upgrade to the latest rules_go (#979)
achew22 Jul 30, 2019
f807a38
Create presubmit.yaml which configures CI (#983)
achew22 Aug 5, 2019
5151b24
Fix release script
johanbrandhorst Aug 5, 2019
da1a113
Use json camel case when GetUseJSONNamesForFields is enabled (#985)
xin-au Aug 9, 2019
af0b9bb
Add doc for opentracing support
vthiery Aug 9, 2019
c296761
Camel case backward compatible in Swagger doc (#988)
xin-au Aug 10, 2019
babc283
protoc-gen-swagger: correctly type struct.proto types
johanbrandhorst Aug 11, 2019
ff58b8e
Correct HTTPBody doc
johanbrandhorst Aug 15, 2019
6f185a8
Disable Windows CI Bazel
achew22 Aug 15, 2019
115b809
Generate changelog for 1.9.6
johanbrandhorst Aug 12, 2019
8a4c740
Allow overriding the primitive type of fields (#1003)
snowzach Aug 24, 2019
f32a764
Add Fuzzit integration
dominikh Aug 20, 2019
789131a
增加local server模板
hb-chen Jan 24, 2019
9a7729d
put back the import path
hb-chen Jun 1, 2019
90eba2a
merge template to the same file
hb-chen Jun 17, 2019
3b04e7c
regenerate `*.pb.gw.go` files
hb-chen Jun 17, 2019
d9425e1
Support stream through DialOption grpc.WithContextDialer(), not direc…
hb-chen Jun 18, 2019
b741d8b
Update protoc-gen-grpc-gateway/gengateway/template.go
hb-chen Jul 31, 2019
7e20376
Update protoc-gen-grpc-gateway/gengateway/template.go
hb-chen Jul 31, 2019
c45e73e
regenerate `*.pb.gw.go` files
hb-chen Jul 31, 2019
8fb0332
streaming return Unimplemented error
hb-chen Aug 2, 2019
95dc4e7
remove un used code
hb-chen Aug 2, 2019
298ee99
return Unimplemented error when registering service have stream method
hb-chen Aug 3, 2019
eace734
return error when streaming method call
hb-chen Aug 3, 2019
5efb516
add template in process test
hb-chen Aug 20, 2019
73ad3b4
Generate changelog for 1.10.0
johanbrandhorst Aug 28, 2019
e5cd270
Fix hand-crafted protobuf message (#1016)
dsnet Aug 30, 2019
070cb19
Bump nokogiri from 1.8.2 to 1.10.4 in /docs (#1007)
dependabot[bot] Aug 30, 2019
7e90b27
Bump rubyzip from 1.2.1 to 1.2.3 in /docs (#1008)
dependabot[bot] Aug 30, 2019
69d407b
Bump ffi from 1.9.23 to 1.11.1 in /docs (#1009)
dependabot[bot] Aug 30, 2019
6afc170
Remove template func RegisterXXXServer() unused param opts []grpc.Dia…
hb-chen Aug 30, 2019
4242732
Generate changelog for 1.11.0
johanbrandhorst Aug 30, 2019
e72ba9a
Fuzzit: use go-fuzz with go-modules support
Aug 31, 2019
72e75f3
Use incoming context for direct server calls (#1021)
hb-chen Aug 31, 2019
30d69eb
Generate changelog for 1.11.1
johanbrandhorst Sep 2, 2019
fff5b4c
docs need type assertion on proto.Message (#1026)
zachgersh Sep 3, 2019
1e8459c
runtime: stop using nil ponters with Unmarshal (#1028)
johanbrandhorst Sep 4, 2019
7f62597
nitpick a_bit_of_everything.proto (#1030)
srenatus Sep 4, 2019
68af84a
nitpick spacing in other proto files (#1032)
srenatus Sep 4, 2019
1239278
Small performance fix
Sep 3, 2019
a758741
Configure stale[bot]
achew22 Sep 9, 2019
4d16d21
added additional info for custom http headers (#1035)
cemenson Sep 9, 2019
e5b02f9
Update README.md
piengeng Sep 10, 2019
49261d1
Update ISSUE_TEMPLATE.md (#1014)
prologic Sep 10, 2019
d1f030f
examples/integration: wait for secondary gateway
srenatus Sep 11, 2019
cb08486
protoc-gen-swagger: add support for arbitrary extensions (#1033)
srenatus Sep 13, 2019
ffb524e
Generate changelog for 1.11.2
johanbrandhorst Sep 20, 2019
99870b6
Pass nested enum values through properly when used as url parameters
mnito Sep 22, 2019
93934d5
Fix auto generated fieldmask case in patch requests (#1049)
william-plano-oxb Sep 27, 2019
4dda983
Support json names in field mask generation (#1050)
william-plano-oxb Sep 30, 2019
863fd7d
Generate chagenlog for 1.11.3
johanbrandhorst Sep 30, 2019
43ec1ec
Bump generators Dockerfile to 1.13.1
johanbrandhorst Oct 2, 2019
1edbcf7
Update dependencies (#1053)
zachgersh Oct 2, 2019
88066c2
Remove "make test" recommendation from CONTRIBUTING.md
johanbrandhorst Sep 11, 2019
a53104e
Align bazel deps with mod file (#1057)
zachgersh Oct 2, 2019
4f64940
Update test swagger generator to 2.4.8 (#1058)
zachgersh Oct 4, 2019
ddfc00d
Add back bzip2 to image
johanbrandhorst Oct 9, 2019
7d2dc5f
Fix building for Go 1.11 (#1062)
marcusljx Oct 14, 2019
69e270c
Use Go templates in protofile comments (#1056)
Jeremytjuh Oct 21, 2019
6beb696
fix(protoc-gen-swagger): Windows compatibility
mrmeku Oct 28, 2019
7429a4c
Fix templateToSwaggerPath generates invalid path
ch3rub1m Aug 27, 2019
94f3ea9
annotations: Sort import order.
someone1 Nov 1, 2019
11a8abf
Update dockerfile and regenerate files
johanbrandhorst Nov 3, 2019
d642baa
Support creating a Swagger def with no schemes
ailurarctos Nov 3, 2019
7d009d4
Generate changelog for 1.12.0
johanbrandhorst Nov 4, 2019
13ea934
support json_names_for_fields
prestonvanloon Nov 4, 2019
db7583b
buildifier
prestonvanloon Nov 5, 2019
ddf9f2d
Revert "Fix templateToSwaggerPath generates invalid path"
johanbrandhorst Nov 6, 2019
deaf955
Revert "Fix templateToSwaggerPath generates invalid path"
johanbrandhorst Nov 6, 2019
8743381
Merge branch 'master' of github.com:grpc-ecosystem/grpc-gateway
johanbrandhorst Nov 6, 2019
81095a5
Generate changelog for 1.12.1
johanbrandhorst Nov 6, 2019
e3dcbe7
Support reserved json name and add tests (#1085)
xin-au Nov 14, 2019
00c798a
Override operation_id when available
guilherme-santos Dec 3, 2019
14aeab4
Add example where generated proto does not work
prestonvanloon Dec 8, 2019
2fe7ead
[bazel] Correctly handle proto files under `_virtual_imports`
Yannic Dec 9, 2019
1041421
Update dependencies
achew22 Dec 20, 2019
5f69cd2
Fix BUILD files to load from rules_proto
achew22 Dec 20, 2019
3275ea6
#1109 Inline streamingDefinitions in generated swagger to better supp…
seanlaff Jan 18, 2020
f9b73e0
#1113 Fix broken parsing of camelCase oneof
seanlaff Jan 18, 2020
f466fde
Bump rubyzip from 1.2.3 to 2.0.0 in /docs
dependabot[bot] Jan 19, 2020
b3237cc
docs: require Jekyll Github Token to be set
johanbrandhorst Jan 20, 2020
2a1ce6a
fix: get wrong second services method comments, then the swagger.json…
chinaran Jan 19, 2020
d43d92c
chore: regenerate the files after making changes
chinaran Jan 22, 2020
f6612d1
Generate changelog for 1.12.2
johanbrandhorst Jan 22, 2020
0ef14fe
Fix #1125: JSON-prefix nested-field params. (#1126)
jgiles Feb 2, 2020
b21d75a
Fix #1117: Support response examples. (#1124)
jgiles Feb 3, 2020
7242afc
protoc-gen-swagger: add default error response
johanbrandhorst Feb 10, 2020
2ce327f
Generate changelog for 1.13.0
johanbrandhorst Feb 11, 2020
74fa028
Configure response content type at the method level (#1130)
nboukeffa Feb 14, 2020
77ab597
Add bazel gazell to CONTRIBUTING
johanbrandhorst Feb 14, 2020
4f2718b
Improve installation instructions
johanbrandhorst Feb 14, 2020
46c6eb0
Bump nokogiri from 1.10.4 to 1.10.8 in /docs (#1140)
dependabot[bot] Feb 25, 2020
b703778
Configurable query parameters parser (#1138)
wp0pw Feb 25, 2020
514757d
Fix customizing your gateway documentation CustomMatcher example (#1…
wiliamsouza Feb 29, 2020
6b63116
Fix #1143: Support multiple error handlers. (#1144)
jgiles Mar 1, 2020
212c3bf
protoc-gen-swagger: add flag to disable default errors
johanbrandhorst Feb 26, 2020
b1847d3
Minimize API surface in anticipation of gorelease (#1146)
johanbrandhorst Mar 4, 2020
10dd170
Use an interface for ContentTypeFromMessage
wtlangford Mar 4, 2020
cf29b09
Generate changelog for 1.14.0
johanbrandhorst Mar 4, 2020
a0307dd
Update build environment to 1.14
johanbrandhorst Mar 4, 2020
94b02ac
Add gorelease CI step
johanbrandhorst Mar 4, 2020
7f82f30
Move generator and descriptor back to public API
johanbrandhorst Mar 5, 2020
c320621
Generate changelog for 1.14.1
johanbrandhorst Mar 5, 2020
ee82785
Move genswagger to public API again
johanbrandhorst Mar 9, 2020
fcf1295
Generate changelog for 1.14.2
johanbrandhorst Mar 9, 2020
f131c11
Move httprule back into the public API
johanbrandhorst Mar 11, 2020
c121b51
Generate changelog for 1.14.3
johanbrandhorst Mar 11, 2020
08aa96b
genswagger: test-covered #1162(unset default error ref)
utrack Mar 10, 2020
02d1cd4
genswagger: no default response when Error is unset
utrack Mar 10, 2020
bbf5192
genswagger: emit errors if swagger name can't be resolved
utrack Mar 11, 2020
663428b
genswagger: fixed tests
utrack Mar 11, 2020
326da76
return error if an external HTTP rule has no matching method
andrascz Mar 15, 2020
6f82cb9
log warning if a service method has no HTTP rule
andrascz Mar 15, 2020
2cfb60c
fix version spelling
seriousben Mar 22, 2020
169cf75
Limit Bazel memory usage in CI.
drigz Mar 23, 2020
92506e9
Use 8088 instead of 8080 in integration test.
drigz Mar 23, 2020
19e0d93
Add enums_as_ints flag to protoc-gen-swagger (#1186)
rowe0x Mar 25, 2020
d2d02ec
Support deep levels reserved json name (#1191)
xin-au Mar 29, 2020
75aa287
Generate Swagger with Unique Operation IDs (#1193)
dadgar Mar 31, 2020
2794f4b
Generate changelog for 1.14.4-rc.1
johanbrandhorst Apr 1, 2020
e9c5530
Generate changelog for 1.14.4-rc.1
johanbrandhorst Apr 1, 2020
8ef3560
Merge branch 'master' of github.com:grpc-ecosystem/grpc-gateway
johanbrandhorst Apr 7, 2020
98a3cda
Move codegenerator back to public namespace
johanbrandhorst Apr 7, 2020
48de545
Add GopherCon UK link to README
johanbrandhorst Apr 9, 2020
e534423
Remove use of deprecated bazel variable
johanbrandhorst Apr 9, 2020
c36afcb
responsebody support for stream rpc
adasari Apr 9, 2020
b0b45c5
bazel sync files
adasari Apr 9, 2020
c3e2c96
Revert "Fix templateToSwaggerPath generates invalid path"
johanbrandhorst Nov 6, 2019
711c4ca
merge with master
adasari Apr 13, 2020
fe9b040
Merge branch 'master' into stream-responsebody
adasari Apr 13, 2020
a99c6d5
rever merge with master
adasari Apr 13, 2020
1f14d33
Merge branch 'stream-responsebody' of https://github.com/adasari/grpc…
adasari Apr 13, 2020
572867e
Merge remote-tracking branch 'upstream/master'
adasari Apr 13, 2020
582b6ee
Merge branch 'master' into stream-responsebody
adasari Apr 13, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions examples/internal/clients/responsebody/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ go_library(
"model_protobuf_any.go",
"model_response_response_type.go",
"model_runtime_error.go",
"model_runtime_stream_error.go",
"model_stream_result_of_examplepb_response_body_out.go",
"response.go",
],
importpath = "github.com/grpc-ecosystem/grpc-gateway/examples/internal/clients/responsebody",
Expand Down
75 changes: 75 additions & 0 deletions examples/internal/clients/responsebody/api/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,32 @@ paths:
description: "An unexpected error response"
schema:
$ref: "#/definitions/runtimeError"
/responsebody/stream/{data}:
get:
tags:
- "ResponseBodyService"
operationId: "ResponseBodyService_GetResponseBodyStream"
parameters:
- name: "data"
in: "path"
required: true
type: "string"
x-exportParamName: "Data"
responses:
200:
description: "(streaming responses)"
schema:
type: "object"
properties:
result:
$ref: "#/definitions/examplepbResponseBodyOutResponse"
error:
$ref: "#/definitions/runtimeStreamError"
title: "Stream result of examplepbResponseBodyOut"
default:
description: "An unexpected error response"
schema:
$ref: "#/definitions/runtimeError"
/responsebody/{data}:
get:
tags:
Expand Down Expand Up @@ -175,6 +201,9 @@ definitions:
\ 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:
value: "value"
type_url: "type_url"
runtimeError:
type: "object"
properties:
Expand All @@ -189,3 +218,49 @@ definitions:
type: "array"
items:
$ref: "#/definitions/protobufAny"
runtimeStreamError:
type: "object"
properties:
grpc_code:
type: "integer"
format: "int32"
http_code:
type: "integer"
format: "int32"
message:
type: "string"
http_status:
type: "string"
details:
type: "array"
items:
$ref: "#/definitions/protobufAny"
example:
http_code: 6
http_status: "http_status"
details:
- value: "value"
type_url: "type_url"
- value: "value"
type_url: "type_url"
message: "message"
grpc_code: 0
Stream result of examplepbResponseBodyOut:
properties:
result:
$ref: "#/definitions/examplepbResponseBodyOutResponse"
error:
$ref: "#/definitions/runtimeStreamError"
example:
result:
data: "data"
error:
http_code: 6
http_status: "http_status"
details:
- value: "value"
type_url: "type_url"
- value: "value"
type_url: "type_url"
message: "message"
grpc_code: 0
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,105 @@ func (a *ResponseBodyServiceApiService) ResponseBodyServiceGetResponseBody(ctx c
return localVarReturnValue, localVarHttpResponse, nil
}

/*
ResponseBodyServiceApiService
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param data

@return StreamResultOfExamplepbResponseBodyOut
*/
func (a *ResponseBodyServiceApiService) ResponseBodyServiceGetResponseBodyStream(ctx context.Context, data string) (StreamResultOfExamplepbResponseBodyOut, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Get")
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
localVarReturnValue StreamResultOfExamplepbResponseBodyOut
)

// create path and map variables
localVarPath := a.client.cfg.BasePath + "/responsebody/stream/{data}"
localVarPath = strings.Replace(localVarPath, "{"+"data"+"}", fmt.Sprintf("%v", data), -1)

localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}

// 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 StreamResultOfExamplepbResponseBodyOut
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 RuntimeError
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
}

/*
ResponseBodyServiceApiService
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ All URIs are relative to *https://localhost*
Method | HTTP request | Description
------------- | ------------- | -------------
[**ResponseBodyServiceGetResponseBody**](ResponseBodyServiceApi.md#ResponseBodyServiceGetResponseBody) | **Get** /responsebody/{data} |
[**ResponseBodyServiceGetResponseBodyStream**](ResponseBodyServiceApi.md#ResponseBodyServiceGetResponseBodyStream) | **Get** /responsebody/stream/{data} |
[**ResponseBodyServiceListResponseBodies**](ResponseBodyServiceApi.md#ResponseBodyServiceListResponseBodies) | **Get** /responsebodies/{data} |
[**ResponseBodyServiceListResponseStrings**](ResponseBodyServiceApi.md#ResponseBodyServiceListResponseStrings) | **Get** /responsestrings/{data} |

Expand Down Expand Up @@ -35,6 +36,32 @@ No authorization required

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **ResponseBodyServiceGetResponseBodyStream**
> StreamResultOfExamplepbResponseBodyOut ResponseBodyServiceGetResponseBodyStream(ctx, data)


### Required Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**data** | **string**| |

### Return type

[**StreamResultOfExamplepbResponseBodyOut**](Stream result of examplepbResponseBodyOut.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **ResponseBodyServiceListResponseBodies**
> []ExamplepbRepeatedResponseBodyOutResponse ResponseBodyServiceListResponseBodies(ctx, data)

Expand Down
14 changes: 14 additions & 0 deletions examples/internal/clients/responsebody/docs/RuntimeStreamError.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# RuntimeStreamError

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**GrpcCode** | **int32** | | [optional] [default to null]
**HttpCode** | **int32** | | [optional] [default to null]
**Message** | **string** | | [optional] [default to null]
**HttpStatus** | **string** | | [optional] [default to null]
**Details** | [**[]ProtobufAny**](protobufAny.md) | | [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)


Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# StreamResultOfExamplepbResponseBodyOut

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Result** | [***ExamplepbResponseBodyOutResponse**](examplepbResponseBodyOutResponse.md) | | [optional] [default to null]
**Error_** | [***RuntimeStreamError**](runtimeStreamError.md) | | [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)


Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* examples/internal/proto/examplepb/response_body_service.proto
*
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* API version: version not set
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/

package responsebody

type RuntimeStreamError struct {
GrpcCode int32 `json:"grpc_code,omitempty"`
HttpCode int32 `json:"http_code,omitempty"`
Message string `json:"message,omitempty"`
HttpStatus string `json:"http_status,omitempty"`
Details []ProtobufAny `json:"details,omitempty"`
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* examples/internal/proto/examplepb/response_body_service.proto
*
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* API version: version not set
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/

package responsebody

type StreamResultOfExamplepbResponseBodyOut struct {
Result *ExamplepbResponseBodyOutResponse `json:"result,omitempty"`
Error_ *RuntimeStreamError `json:"error,omitempty"`
}
Loading