Open toohamster opened 8 years ago
same problem here!
tv4 version 1.2.7 I have a more streamlined set of files to reproduce the bug.
This simple JSON should validate against the following schema, but it doesn't. If I remove the "id" property from the schema, then the JSON validates!
JSON:
{"media": null}
schema:
{ "$schema": "http://json-schema.org/draft-04/schema#", "id": "http://www.dhp.it/schema/masterReservation", "type": "object", "additionalProperties": true, "properties": { "media": { "oneOf": [ {"type": "null"}, {"$ref": "#/definitions/media"} ]} }, "required": [ "media" ], "definitions":{ "media": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "default": "94d12b54-d501-46b0-8d4b-5ef2dc653fe2" } }, "required": [ "id" ] } } }
Strangely, removing the id property also solved the issue for me
i use postman collection 2 to validation and get error "Data is valid against more than one schema from "oneOf": indices 0 and 1".
schema
data