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

[protoc-gen-openapiv2] Incorrectly generated OpenAPIv2 spec when using repeated_path_param_separator option #3696

Open
Raiden1974 opened this issue Oct 26, 2023 · 2 comments · May be fixed by #3797

Comments

@Raiden1974
Copy link

🐛 Bug Report

When I use repeated_path_param_separator option with any value I get result in my documentation where "collectionFormat": "multi". I found what in template.go you force set 'multi' to "collectionFormat".

@johanbrandhorst
Copy link
Collaborator

Hi, thanks for your bug report! It does indeed seem like the value set at https://github.com/grpc-ecosystem/grpc-gateway/blame/a6c12767cc494e67993e933ff4a501d667606d83/protoc-gen-openapiv2/internal/genopenapi/template.go#L1214C41-L1214C41 is overridden at https://github.com/grpc-ecosystem/grpc-gateway/blame/a6c12767cc494e67993e933ff4a501d667606d83/protoc-gen-openapiv2/internal/genopenapi/template.go#L333. I'm not sure exactly what the best fix is here, but I expect the command line flag should take precedence. Would you be willing to contribute a fix to this?

@Raiden1974
Copy link
Author

As I understand it, the same situation is in the gateway code generator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants