Skip to content

Is it possible to use protoc-gen-swagger options in my own protos? #976

Closed
@rmilejcz

Description

@rmilejcz

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:

import "protoc-gen-swagger/options/openapiv2.proto

or:

import "grpc-gateway/protoc-gen-swagger/options/annotations.proto

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:

import "grpc/gateway/protoc_gen_swagger/options/annotations.proto"

also fails with the error:

file was not found or had errors

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions