Closed nimix closed 6 years ago
Problem occurs here, because top level object is JSONArray instead of JSONObject: https://github.com/alenkacz/gradle-json-validator/blob/6cfa90577a569c028db092c8f6d7f6db1b97212e/src/main/groovy/cz/alenkacz/gradle/jsonvalidator/ValidateJsonTask.groovy#L53
Example schema:
{ "$schema": "http://json-schema.org/schema#", "type": "array", "items": { "type": "object", "properties": { "country": { "type": "string" } }, "required": [ "country" ] } }
Problem occurs here, because top level object is JSONArray instead of JSONObject: https://github.com/alenkacz/gradle-json-validator/blob/6cfa90577a569c028db092c8f6d7f6db1b97212e/src/main/groovy/cz/alenkacz/gradle/jsonvalidator/ValidateJsonTask.groovy#L53
Example schema: