swagger-core icon indicating copy to clipboard operation
swagger-core copied to clipboard

Wrong location of default and enum nodes for array parameter.

Open iushankin opened this issue 11 years ago • 1 comments

Wrong location of the 'default' and the 'enum' nodes for the status parameter of the findPetsByStatus method. According to the spec it should be located inside to the 'items' node. Spec: https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md#parameterObject Sample from http://petstore.swagger.io/v2/swagger.json:

   "parameters":[
      {
         "name":"status",
         "in":"query",
         "description":"Status values that need to be considered for filter",
         "required":false,
         "type":"array",
         "items":{
            "type":"string"
         },
         "collectionFormat":"multi",
         "default":"available",
         "enum":[
            "available",
            "pending",
            "sold"
         ]
      }
   ]

iushankin avatar Apr 22 '15 16:04 iushankin

Fixed in develop_2.0.

webron avatar May 06 '15 09:05 webron