-
Notifications
You must be signed in to change notification settings - Fork 241
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
[proto-gen-openapi] Wrong message included when message with same name exists in imported proto #392
Comments
As a similar case: I imported At the same time,
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We just noticed that gnostic's proto-gen-openapi may create a wrong OpenAPI v3 spec when a message with identical name exists in an imported proto even though the messages belong to different packages. This happens although the message from the imported proto is not used at all in the base proto.
Reproduction: https://github.com/n0v1/gnostic-gen-openapi-naming-issue-repro (see readme and proto files for details)
The generated API spec only includes
HelloWorld
frombar.proto
(which is not used anywhere). I would expect it to includeHelloWorld
fromfoo.proto
instead. Even using the fully-qualified namecom.example.foo.HelloWorld
inFooResponse
does not fix this.Setting option
fq_schema_naming=true
fixes it but I think even without this option proto-gen-openapi should not create a wrong specification. It should at least give a warning or throw an error when a message/schema name is ambiguous.Relates to issues #309 and #353.
The text was updated successfully, but these errors were encountered: