raml-cop
raml-cop copied to clipboard
Validation of JSON Schemas does not respect Draft 07
Hi,
I am using JSON schemas imported into my RAML and RAML-COP is giving out warnings due to invalid JSON schema.
After some search I realized that it must be using an old draft and not respecting the $schema parameter that states the use of draft 7 ("$schema": "http://json-schema.org/draft-07/schema#").
Example output:
[../../schemas/order_specification.json:371:28] WARNING Invalid JSON schema: Keyword 'exclusiveMinimum' is expected to be of type 'boolean'
[api.raml:30:12] WARNING Invalid JSON schema: Keyword 'exclusiveMinimum' is expected to be of type 'boolean'
[examples/order_251985.json:698:0] WARNING Invalid JSON schema: Keyword 'exclusiveMinimum' is expected to be of type 'boolean'
[examples/order_251985.json:96:4] WARNING Draft 3 schema must have boolean as 'required' property value
[examples/order_251985.json:110:12] WARNING Draft 3 schema must have boolean as 'required' property value
[examples/order_251985.json:125:7] WARNING Draft 3 schema must have boolean as 'required' property value
[examples/order_251985.json:158:20] WARNING Draft 3 schema must have boolean as 'required' property value
[examples/order_251985.json:184:28] WARNING Draft 3 schema must have boolean as 'required' property value
[examples/order_251985.json:232:20] WARNING Draft 3 schema must have boolean as 'required' property value
[examples/order_251985.json:316:16] WARNING Draft 3 schema must have boolean as 'required' property value
[examples/order_251985.json:391:28] WARNING Draft 3 schema must have boolean as 'required' property value
[examples/order_251985.json:410:12] WARNING Draft 3 schema must have boolean as 'required' property value
[examples/order_251985.json:456:1] WARNING Draft 3 schema must have boolean as 'required' property value
[examples/order_251985.json:482:4] WARNING Draft 3 schema must have boolean as 'required' property value
[examples/order_251985.json:571:8] WARNING Draft 3 schema must have boolean as 'required' property value
[examples/order_251985.json:698:0] WARNING Draft 3 schema must have boolean as 'required' property value
same on draft-06