Open API array type not matching specs

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

Can you show DTO for above json was generated?

public class GetMovie : IReturn<API.ServiceModel.DTO.MovieResponse>
{
    [ApiMember(IsRequired = true, Description = "Required ID of Movie.", DataType = "integer", ParameterType = "path")]
    public long Id { get; set; }

    [ApiMember(IsRequired = false, AllowMultiple = true, Description = "List of additional objects to include in the movie response.")]
    [ApiAllowableValues("Includes", Values = new string[] { "Genres", "Releases", "Contributors", "AlternateTitles", "Descriptions", "Companies", "Tags", "Images", "Videos" })]   // This breaks the swagger UI
    public string[] Includes { get; set; }
}

Then, in my AppHost I am updating the OpenApiOperation manually to add itm.Type = “array” for that specific property as this breaks the existing Swagger 1.2 UI when DataType = “array” if I were to specify it as an annotation.

It looks like I can resolve the errors by moving around the enum and adding to the .items parameter which is NULL and setting the OpenApiParameter.enum to null, so I have a workaround.

thanks,
Bob

It should work in both cases, but Swagger UI visualizes only the first one. I’m going to change openapi.json generatiion for ApiAllowableValues to support visualizing arrays of enums in Swagger UI.