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

Wrong resolution of imported message type via root.lookup() #1807

Open
80220 opened this issue Sep 12, 2022 · 0 comments
Open

Wrong resolution of imported message type via root.lookup() #1807

80220 opened this issue Sep 12, 2022 · 0 comments

Comments

@80220
Copy link

80220 commented Sep 12, 2022

protobuf.js version: master (6254efb)

Problem originates from: JennieJi/protobuf2swagger#19. I wonder if failure in protobuf2swagger is a result of a bug in protobuf.js.
proto input is:

tests/data/duplicated_defs/a/b/c/d/common.proto
tests/data/duplicated_defs/a/b/c/d/request.proto
tests/data/duplicated_defs/a/b/common.proto

Both common files contain definition of StaticRoute msg. reqest.proto imports the one from /a/b/c/d/. After conversion of proto files into reflection objects (root), root.lookUp() returns wrong definition from wrong namespace (a/b/ instead of a/b/c/d)

I pushed failing testcase into forked branch: master...80220:protobuf.js:patch/wrong_resolution

@80220 80220 changed the title Wrong resolution of imported message type via root.lookUp() Wrong resolution of imported message type via root.lookup() Sep 12, 2022
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