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

Query params not handled in swagger file #284

Closed
dong77 opened this issue Jan 3, 2017 · 1 comment
Closed

Query params not handled in swagger file #284

dong77 opened this issue Jan 3, 2017 · 1 comment

Comments

@dong77
Copy link

dong77 commented Jan 3, 2017

I have the following gRPC proto definition:

message GetOrdersReq { repeated string status = 1; string market_id = 2; Page page = 3; }
message GetOrdersResp { Error error = 1; repeated Order data = 2; }

rpc GetOrders(GetOrdersReq) returns (GetOrdersResp) {
    option (google.api.http) = {
      get: "/v1/orders"
    };  
}

I want all properties of GetOrdersReq optional and be presented as http query paramters. But the generated swagger file didn't include information regarding these optional properties (no parameters specified for this API at all):

 /v1/orders:
    get:
      summary: |-
        Get Orders
        - get orders
      operationId: GetOrders
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/GetOrdersResp'
      tags:
        - TestAPIService

Did I missing something?

@achew22
Copy link
Collaborator

achew22 commented Jan 4, 2017

This is addressed by #199 which I've completely dropped the ball on. Unfortunately I don't have the bandwidth to finish up the PR right now. If you wanted to patch that in and extend upon it I would welcome the PR.

Closing as this is a duplicate of a few other issues.

@achew22 achew22 closed this as completed Jan 4, 2017
@tamalsaha tamalsaha mentioned this issue Mar 30, 2017
1 task
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

2 participants