swagger specify query parameters code example

Example 1: query parameter swagger

parameters:
        - in: query
          name: offset
          schema:
            type: integer
          description: The number of items to skip before starting to collect the result set
        - in: query
          name: limit
          schema:
            type: integer
          description: The numbers of items to return

Example 2: swagger parameters multiple query example

paths:
  /values:
    get:
      summary: Get values
      parameters:
        - in: query
          name: type
          required: false
          type: string
        - in: query
          name: from
          required: false
          type: string
          format: date
        - in: query
          name: to
          required: false
          type: string
          format: date
      responses:
        '200':
          description: values
          schema:
            type: array
            items: 
              $ref: '#/definitions/value'

Tags:

Misc Example