I’m not sure if this is a Swagger 2.0 versus Open API spec difference but I am working with editor.swagger.io using a generated OpenAPI spec and found some inconsistencies.
For example code below comes from the Petstore sample spec:
http://petstore.swagger.io/v2/swagger.json.
parameters: [
{
name: "status",
in: "query",
description: "Status values that need to be considered for filter",
required: true,
type: "array",
items: {
type: "string",
enum: [
"available",
"pending",
"sold"
],
default: "available"
},
collectionFormat: "multi"
}
The ServiceStack Spec looks like the text below, missing the items object.
parameters: [
{
{
name: “Includes”,
in: “query”,
description: “List of additional objects to include in the movie response.”,
type: “array”,
required: false,
enum: [
“Genres”,
“Releases”,
“Contributors”,
“AlternateTitles”,
“Descriptions”,
“Companies”,
“Tags”,
“Images”,
“Videos”
]
}
]
The validation message I get from Swagger Editor is:
Semantic error at paths./Movies/{Id}.get.parameters.1
Parameters with ‘array’ type require an ‘items’ property.
regards,
Bob