serverless-aws-documentation icon indicating copy to clipboard operation
serverless-aws-documentation copied to clipboard

*default* and *maximum* - do not get passed on to documentation

Open GurpreetSingh5 opened this issue 5 years ago • 2 comments

default and maximum, set in parameters section under events do not get passed on to documentation. I have added default and maximum value for parameters, but downloadDocumentation does not include it in the generated file. I added this parameter as per Swagger 2.0 specs, as can be seen in this link in the default parameter section: https://swagger.io/docs/specification/2-0/describing-parameters/

and can also be seen in this image

image

Here is my serverless yml file

` ListCustomerOrdersResponse

handler: src/handlers/v1/customer-orders.listCustomerOrders
 events:
  - http:
      path: v1/customer-orders
      method: get
      private: ${self:custom.private}
      documentation:
        summary: "List customer orders."
        queryParams:
          - name: "offset"
            required: false
            type: string
            default: "0"
            description: The offset to fetch the page of results. Pass 0 for the first page.
          - name: "limit"
            required: false
            type: string
            default: "200"
            maximum: "100"
            description: The numbers of items to return. Must be a positive integer value.
        methodResponses:
          - statusCode: "200"
            responseBody:
              description: "A list of available customer orders."
            responseModels:
              "application/json": "ListCustomerOrdersResponse"`

GurpreetSingh5 avatar Apr 25 '19 12:04 GurpreetSingh5

Any update on this ?

GurpreetSingh5 avatar Jun 16 '19 07:06 GurpreetSingh5

Any updates for this yet?

GurpreetSingh5 avatar Sep 28 '19 17:09 GurpreetSingh5