Skip to content

'array' type causes query parameters to disappear #290

@matt-deboer

Description

@matt-deboer

I notice a few odd behaviors when I add a query parameter of type array:

  1. There's no indication that this is an array parameter in the preview mode
  2. When you attempt to try this operation, the parameter disappears entirely
    The following example should demonstrate what I think is the problem;
    (just tested against editor.swagger.io)
swagger: "2.0"
info: 
  title: "ExampleAPI"
  version: "v1"
host: "api.example.org"
schemes: 
  - "http"
basePath: "/sample/v1"
produces: 
  - "application/json"
paths: 
  /examples: 
    get: 
      summary: "get the examples"
      description: "blah blah"
      parameters: 
        - name: "parameter1"
          in: "query"
          description: ""
          required: false
          type: "array"
          items: 
            type: "string"                               
      responses: 
        200: 
          description: "Successful response"
          schema: 
            $ref: "#/definitions/ResponseType"                  
definitions: 
  ResponseType: 
    properties: 
      name: 
        type: "string"
        description: "example!"      
    required: 
      - "name"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions