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

Enum Path Parameter to Swagger #486

Closed
garyluu opened this issue Nov 17, 2017 · 1 comment
Closed

Enum Path Parameter to Swagger #486

garyluu opened this issue Nov 17, 2017 · 1 comment

Comments

@garyluu
Copy link

garyluu commented Nov 17, 2017

Seems to be an issue converting a proto file with a path parameter to swagger. The below is the proto file:

syntax = "proto3";

package thing;

import "google/api/annotations.proto";

message Request {
  EnumThing view = 5;
}

message Response {
  string tasks = 1;
}

enum EnumThing {
  MINIMAL = 0;
  BASIC = 1;
  FULL = 2;
}

service ThingService {
  rpc ListThings(Request) returns (Response) {
    option (google.api.http) = {
      get: "/v1/thing/{view}"
    };
  }
}

After converting to yaml, expected:

      - name: view
        in: path
        required: true
        type: string
        enum: ['MINIMAL', 'BASIC', 'FULL']

but received the below instead:

      - name: view
        in: path
        required: true
        type: thingEnumThing

Additionally, thingEnumThing isn't defined anywhere.

@garyluu garyluu changed the title Enum Path Paramter to Swagger Enum Path Parameter to Swagger Nov 17, 2017
@garyluu
Copy link
Author

garyluu commented Nov 17, 2017

Mostly duplicate of #322

@garyluu garyluu closed this as completed Nov 17, 2017
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