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

Invalid swagger generated for bodies with repeated fields #906

Closed
johanbrandhorst opened this issue Mar 13, 2019 · 1 comment
Closed

Invalid swagger generated for bodies with repeated fields #906

johanbrandhorst opened this issue Mar 13, 2019 · 1 comment

Comments

@johanbrandhorst
Copy link
Collaborator

As reported in #902 (comment), it appears #902 means we're generating invalid swagger definitions for some methods which take repeated fields as parameters. I think this is only affecting fields which have a repeated field in the body of the request as opposed to in the URL query parameters, so we may need some extra logic in the swagger generator to only set the collection format when we know the parameters are going into the URL query parameters.

@johanbrandhorst
Copy link
Collaborator Author

Closing in favour of #756

johanbrandhorst added a commit that referenced this issue Mar 13, 2019
#902)"

This reverts commit 2b6cab6. It was found
to have introduced a swagger spec violation, see #906.
johanbrandhorst pushed a commit that referenced this issue Mar 14, 2019
* Use collectionFormat multi for query params of repeated fields

Fixes #756 . Also formats protoc-gen-swagger/genswagger/template_test.go according to go fmt.

* regenerate the files

* only specify multi in the method queryParams

Fixes #906.

* deep equal checks in TestSchemaOfField
adasari pushed a commit to adasari/grpc-gateway that referenced this issue Apr 9, 2020
grpc-ecosystem#902)"

This reverts commit 2b6cab6. It was found
to have introduced a swagger spec violation, see grpc-ecosystem#906.
adasari pushed a commit to adasari/grpc-gateway that referenced this issue Apr 9, 2020
…osystem#909)

* Use collectionFormat multi for query params of repeated fields

Fixes grpc-ecosystem#756 . Also formats protoc-gen-swagger/genswagger/template_test.go according to go fmt.

* regenerate the files

* only specify multi in the method queryParams

Fixes grpc-ecosystem#906.

* deep equal checks in TestSchemaOfField
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant