diff --git a/tests/src/test/resources/org/everit/json/schema/issues/issue231/schema.json b/tests/src/test/resources/org/everit/json/schema/issues/issue231/schema.json new file mode 100644 index 000000000..e6488f1f8 --- /dev/null +++ b/tests/src/test/resources/org/everit/json/schema/issues/issue231/schema.json @@ -0,0 +1,33 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "type" : "object", + "properties" : { + "history" : {"$ref" : "#/definitions/History" } + }, + "required": ["history"], + "definitions" : { + "when" : { + "type" : "string", + "format": "date-time" + }, + "who": { + "type": "string", + "format": "iri", + "$comment": "if the format is uri, it works as expected" + }, + "History" : { + "type" : "object", + "properties" : { + "when" : {"$ref" : "#/definitions/when"}, + "who" : { + "$ref": "#/definitions/who" + }, + "what": { + "type": "string" + } + }, + "required": ["who", "when", "what"], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/tests/src/test/resources/org/everit/json/schema/issues/issue231/subject-invalid.json b/tests/src/test/resources/org/everit/json/schema/issues/issue231/subject-invalid.json new file mode 100644 index 000000000..9294c5c0e --- /dev/null +++ b/tests/src/test/resources/org/everit/json/schema/issues/issue231/subject-invalid.json @@ -0,0 +1,7 @@ +{ + "history" : { + "who": "someone", + "when": "2017-09-23T20:21:34Z", + "what": "did wonders" + } +} \ No newline at end of file diff --git a/tests/src/test/resources/org/everit/json/schema/issues/issue231/subject-valid.json b/tests/src/test/resources/org/everit/json/schema/issues/issue231/subject-valid.json new file mode 100644 index 000000000..aa0bbf1b6 --- /dev/null +++ b/tests/src/test/resources/org/everit/json/schema/issues/issue231/subject-valid.json @@ -0,0 +1,8 @@ +{ + "history" : { + "who": "http://example.com/person/1", + "when": "2017-09-23T20:21:34Z", + "what": "did wonders" + } +} +