OpenAPI-Specification icon indicating copy to clipboard operation
OpenAPI-Specification copied to clipboard

schema definitions of type array fail validation

Open paulhill opened this issue 12 years ago • 3 comments

I use 'type: array' json schema to represent typed array responses from my API. Schema validation chokes on this (and swagger-ui needs to render them correctly too)

{
    "level": "error",
    "domain": "validation",
    "keyword": "type",
    "message": "instance type (array) does not match any allowed primitive type (allowed: [\"object\"])",
    "schema": {
        "loadingURI": "http://swagger.io/v2/schema.json#",
        "pointer": "/definitions/schema"
    },
    "instance": {
        "pointer": "/definitions/required"
    }
}

paulhill avatar Nov 19 '14 05:11 paulhill

Can you share a small sample to reproduce it?

webron avatar Nov 19 '14 05:11 webron

@paulhill nudge

webron avatar Dec 05 '14 18:12 webron

Unfortunately, I can't do much with this without a sample.

webron avatar Mar 06 '15 20:03 webron