diff --git a/examples/v2.0/yaml/uber.yaml b/examples/v2.0/yaml/uber.yaml index f72b37841d..2a131d089e 100644 --- a/examples/v2.0/yaml/uber.yaml +++ b/examples/v2.0/yaml/uber.yaml @@ -246,7 +246,8 @@ definitions: description: Total number of items available. history: type: array - $ref: Activity + items: + $ref: Activity Error: properties: code: diff --git a/schemas/v2.0/schema.json b/schemas/v2.0/schema.json index 1ae668e277..24b2edb8b5 100644 --- a/schemas/v2.0/schema.json +++ b/schemas/v2.0/schema.json @@ -873,7 +873,10 @@ { "$ref": "#/definitions/pathParameterSubSchema" } - ] + ], + "not": { + "$ref": "#/definitions/arrayWithoutItems" + } }, "parameter": { "oneOf": [ @@ -1004,6 +1007,9 @@ }, "example": {} }, + "not": { + "$ref": "#/definitions/arrayWithoutItems" + }, "additionalProperties": false }, "primitivesItems": { @@ -1068,6 +1074,9 @@ "multipleOf": { "$ref": "#/definitions/multipleOf" } + }, + "not": { + "$ref": "#/definitions/arrayWithoutItems" } }, "security": { @@ -1490,6 +1499,23 @@ "type": "string" } } + }, + "arrayWithoutItems": { + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "array" + ] + } + }, + "not": { + "required": [ + "items" + ] + } } } -} \ No newline at end of file +}