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

Use proto gen swagger with protos from external repository #924

Merged

Conversation

elenadeneva92
Copy link

Currently the protoc_gen_swagger doesn't work with protos from external repositories.
The the swagger.json file is not stored at the expected place.
Example:
protoc_gen_swagger(
name = "action_swagger",
proto = "@remote//proto:action_proto"
)
fails because the action.swagger.json file is written to proto/action.swagger.json and
is expected to be at the same place as the proto external/remote/proto/action.swagger.json. Bazel can't find the generated rule and fails.

@drigz
Copy link
Contributor

drigz commented Apr 18, 2019

LGTM. @achew22, any comments?

@johanbrandhorst
Copy link
Collaborator

Looks like the bazel tests failed for unrelated reasons, but the bazel formatter also failed. Could you try running the formatter please?

@elenadeneva92 elenadeneva92 force-pushed the swagger-external-proto branch from c115f97 to b1dffd8 Compare April 18, 2019 13:32
Currently the protoc_gen_swagger doesn't work with protos from external repositories.
The bazel rule because the swagger.json file is not stored at the expected place.
Example if the rule for the proto @remote//proto:action_proto is passed to the protoc_gen_swagger,
the action.swagger.json file is written to proto/action.swagger.json and
is expected to be at the same place as the proto external/remote/proto/action.swagger.json.
@elenadeneva92 elenadeneva92 force-pushed the swagger-external-proto branch from b1dffd8 to 5a0c4ce Compare April 18, 2019 13:47
@elenadeneva92
Copy link
Author

elenadeneva92 commented Apr 18, 2019

@johanbrandhorst Done :)

@johanbrandhorst johanbrandhorst requested a review from achew22 April 18, 2019 15:45
@johanbrandhorst johanbrandhorst merged commit ab421d1 into grpc-ecosystem:master May 7, 2019
@johanbrandhorst
Copy link
Collaborator

Sorry, this totally fell between the chairs. Merging now.

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

Successfully merging this pull request may close these issues.

5 participants