Skip to content

Merging swagger specs fails to use rpc comments (again) #923

Closed
@co3k

Description

@co3k

This is same issue with #664 but the current version of grpc-gateway (it might be v1.6.3 or later) has this issue again.

Steps you follow to reproduce the error:

  1. Create a.proto and b.proto by following Merging swagger specs fails to use rpc comments #664 (comment) instruction
  2. Generate the swagger spec without merging:
protoc -I=. \
        -I=$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway \
        -I=$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \
        --swagger_out=logtostderr=true:. \
        a.proto b.proto
  1. Generate the swagger spec with merging:
protoc -I=. \
        -I=$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway \
        -I=$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \
        --swagger_out=logtostderr=true,allow_merge=true:. \
        a.proto b.proto

What did you expect to happen instead:

b.swagger.json has valid summary and description for "ListBars" operation but apidocs.swagger.json doesn't.

What's your theory on why it isn't working:

I've confirmed v1.6.2 generates a valid merged swagger spec. Changes of v1.6.3 might break this feature: v1.6.2...v1.6.3

Oh, I've tried revert 8140d98 and I could get the expected behavior.

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