-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Is it possible to use protoc-gen-swagger options in my own protos? #976
Comments
@rmilejcz, thanks for filing an issue. Sorry you're not having a great time.
and
@rmilejcz, on the home page for the repo, in 24px font it says "Check out our documentation!", could you help me understand the process you took to get here where you concluded that there was no documentation? Further, the homepage (and therefore the README.md) of the repo is self-contained documentation for driving the project. What have you tried doing? What documentation have you been referring to? Do you have prior experience with proto and protoc? Have you gone through any tutorials on that front to help you understand how protos and their imports work? My guess is that you're trying to import in a |
@rmilejcz I think your problems at this point are to do with protoc import paths, which is a problem outside the domain of this repo. This repo contains examples of how to use the annotation in your own protofiles, but it assumes some familiarity with protoc. The reason you can use different import paths in your own protofiles is because the path is relative to your provided protoc import paths. |
@johanbrandhorst yeah I made a foolish mistake, the issue was that I failed to update a script unfortunately and I was running code that did not include the protos I wanted via -I"$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/" I could properly import without issue
All I can say is thanks for being patient and sorry for the ultimately pointless github issue lol |
Thanks for getting back to us, we've all made a mistake like that at some point 😄! |
I'm trying to use these: https://github.com/grpc-ecosystem/grpc-gateway/tree/master/protoc-gen-swagger/options
I've seen a few disparate examples of people doing things like:
or:
but I cannot get this to work and it isn't documented anywhere. I assume I could import it via it's package name so long as it can be found in my $GOPATH but this:
also fails with the error:
I have followed the installation steps to a T and have no issues importing the google options from
"google/api/annotations.proto"
but the protoc-gen-swagger options are eluding me and without any documentation (that I could find) I'm feeling pretty lost.The text was updated successfully, but these errors were encountered: