diff --git a/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-closed.json b/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-closed.json index 3c1b2fad1..3cde39864 100644 --- a/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-closed.json +++ b/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-closed.json @@ -4,54 +4,35 @@ "$comment": "JSON value testing mini metaschema: JSON Schema", "type": "object", "definitions": { - "json-value_field_constrained-closed-json-value_field_constrained-closed:root": { + "json-value_field_constrained-closed-json-value_field_constrained-closed:test-root": { "title": "Root", - "description": "Root root root.", - "$id": "#assembly_json-value_field_constrained-closed_root", + "description": "The root assembly of this example module.", + "$id": "#assembly_json-value_field_constrained-closed_test-root", "type": "object", "properties": { - "constrained-closed": { - "$ref": "#field_json-value_field_constrained-closed_constrained-closed" + "test-field": { + "$ref": "#field_json-value_field_constrained-closed_test-field" } }, "additionalProperties": false }, - "json-value_field_constrained-closed-json-value_field_constrained-closed:constrained-closed": { - "title": "Constrained closed", - "description": "Because allow-other is 'no' an enumeration can be given in the JSON Schema.", - "$id": "#field_json-value_field_constrained-closed_constrained-closed", - "type": "object", - "properties": { - "some": { - "title": "Some Flag", - "description": "Some flag some flag some flag.", - "$ref": "#/definitions/StringDatatype" + "json-value_field_constrained-closed-json-value_field_constrained-closed:test-field": { + "title": "Test Field", + "description": "A test field.", + "$id": "#field_json-value_field_constrained-closed_test-field", + "allOf": [ + { + "$ref": "#/definitions/TokenDatatype" }, - "token-value": { - "allOf": [ - { - "$ref": "#/definitions/TokenDatatype" - }, - { - "enum": [ - "one", - "two", - "three", - "four" - ] - } + { + "enum": [ + "one", + "two", + "three", + "four" ] } - }, - "required": [ - "token-value" - ], - "additionalProperties": false - }, - "StringDatatype": { - "description": "A non-empty string with leading and trailing whitespace disallowed. Whitespace is: U+9, U+10, U+32 or [ \n\t]+", - "type": "string", - "pattern": "^\\S(.*\\S)?$" + ] }, "TokenDatatype": { "description": "A non-colonized name as defined by XML Schema Part 2: Datatypes Second Edition. https://www.w3.org/TR/xmlschema11-2/#NCName.", @@ -60,12 +41,12 @@ } }, "properties": { - "root": { - "$ref": "#assembly_json-value_field_constrained-closed_root" + "test-root": { + "$ref": "#assembly_json-value_field_constrained-closed_test-root" } }, "required": [ - "root" + "test-root" ], "additionalProperties": false, "maxProperties": 1 diff --git a/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-closed_example_FAIL.json b/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-closed_example_FAIL.json new file mode 100644 index 000000000..76fbd17d3 --- /dev/null +++ b/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-closed_example_FAIL.json @@ -0,0 +1,5 @@ +{ + "test-root": { + "test-field": "anything" + } +} \ No newline at end of file diff --git a/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-closed_example_PASS.json b/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-closed_example_PASS.json new file mode 100644 index 000000000..3d6d76e7c --- /dev/null +++ b/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-closed_example_PASS.json @@ -0,0 +1,5 @@ +{ + "test-root": { + "test-field": "four" + } +} \ No newline at end of file diff --git a/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-closed_metaschema.xml b/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-closed_metaschema.xml index a6326c33f..a9cda9493 100644 --- a/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-closed_metaschema.xml +++ b/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-closed_metaschema.xml @@ -8,24 +8,20 @@ json-value_field_constrained-closed http://csrc.nist.gov/ns/metaschema-tests/1.0 http://csrc.nist.gov/ns/metaschema-tests - + Root - Root root root. - root + The root assembly of this example module. + test-root - + - Constrained closed - Because allow-other is 'no' an enumeration can be given in the JSON Schema. - token-value - - Some Flag - Some flag some flag some flag. - + name="test-field"> + Test Field + A test field. + test-json-key-value diff --git a/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-narrow.json b/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-narrow.json index 3a817c75e..5f6e78046 100644 --- a/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-narrow.json +++ b/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-narrow.json @@ -4,42 +4,23 @@ "$comment": "JSON value testing mini metaschema: JSON Schema", "type": "object", "definitions": { - "json-value_field_constrained-narrow-json-value_field_constrained-narrow:root": { + "json-value_field_constrained-narrow-json-value_field_constrained-narrow:test-root": { "title": "Root", - "description": "Root root root.", - "$id": "#assembly_json-value_field_constrained-narrow_root", + "description": "The root assembly of this example module.", + "$id": "#assembly_json-value_field_constrained-narrow_test-root", "type": "object", "properties": { - "constrained-narrow": { - "$ref": "#field_json-value_field_constrained-narrow_constrained-narrow" + "test-field": { + "$ref": "#field_json-value_field_constrained-narrow_test-field" } }, "additionalProperties": false }, - "json-value_field_constrained-narrow-json-value_field_constrained-narrow:constrained-narrow": { - "title": "Constrained narrow", - "description": "Although allow-other is 'no' an enumeration can't be given in the JSON Schema since it targets a qualified set (only a subset) of the elements in scope.", - "$id": "#field_json-value_field_constrained-narrow_constrained-narrow", - "type": "object", - "properties": { - "some": { - "title": "Some Flag", - "description": "Some flag some flag some flag.", - "$ref": "#/definitions/StringDatatype" - }, - "token-value": { - "$ref": "#/definitions/TokenDatatype" - } - }, - "required": [ - "token-value" - ], - "additionalProperties": false - }, - "StringDatatype": { - "description": "A non-empty string with leading and trailing whitespace disallowed. Whitespace is: U+9, U+10, U+32 or [ \n\t]+", - "type": "string", - "pattern": "^\\S(.*\\S)?$" + "json-value_field_constrained-narrow-json-value_field_constrained-narrow:test-field": { + "title": "Test Field", + "description": "A test field.", + "$id": "#field_json-value_field_constrained-narrow_test-field", + "$ref": "#/definitions/TokenDatatype" }, "TokenDatatype": { "description": "A non-colonized name as defined by XML Schema Part 2: Datatypes Second Edition. https://www.w3.org/TR/xmlschema11-2/#NCName.", @@ -48,12 +29,12 @@ } }, "properties": { - "root": { - "$ref": "#assembly_json-value_field_constrained-narrow_root" + "test-root": { + "$ref": "#assembly_json-value_field_constrained-narrow_test-root" } }, "required": [ - "root" + "test-root" ], "additionalProperties": false, "maxProperties": 1 diff --git a/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-narrow_example-FAIL.json b/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-narrow_example-FAIL.json new file mode 100644 index 000000000..20eb8b1d8 --- /dev/null +++ b/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-narrow_example-FAIL.json @@ -0,0 +1,5 @@ +{ + "test-root": { + "test-field": false + } +} \ No newline at end of file diff --git a/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-narrow_example-PASS1.json b/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-narrow_example-PASS1.json new file mode 100644 index 000000000..76fbd17d3 --- /dev/null +++ b/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-narrow_example-PASS1.json @@ -0,0 +1,5 @@ +{ + "test-root": { + "test-field": "anything" + } +} \ No newline at end of file diff --git a/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-narrow_example-PASS2.json b/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-narrow_example-PASS2.json new file mode 100644 index 000000000..890813576 --- /dev/null +++ b/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-narrow_example-PASS2.json @@ -0,0 +1,5 @@ +{ + "test-root": { + "test-field": "three" + } +} \ No newline at end of file diff --git a/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-narrow_metaschema.xml b/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-narrow_metaschema.xml index 8187f5371..9588dddb6 100644 --- a/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-narrow_metaschema.xml +++ b/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-narrow_metaschema.xml @@ -8,25 +8,20 @@ json-value_field_constrained-narrow http://csrc.nist.gov/ns/metaschema-tests/1.0 http://csrc.nist.gov/ns/metaschema-tests - + Root - Root root root. - root + The root assembly of this example module. + test-root - + - - Constrained narrow - Although allow-other is 'no' an enumeration can't be given in the JSON Schema since it targets a qualified set (only a subset) of the elements in scope. - token-value - - Some Flag - Some flag some flag some flag. - + name="test-field"> + Test Field + A test field. + test-json-key-value diff --git a/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-open.json b/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-open.json index 5a7d310db..dbd0de8d8 100644 --- a/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-open.json +++ b/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-open.json @@ -4,54 +4,35 @@ "$comment": "JSON value testing mini metaschema: JSON Schema", "type": "object", "definitions": { - "json-value_field_constrained-open-json-value_field_constrained-open:root": { + "json-value_field_constrained-open-json-value_field_constrained-open:test-root": { "title": "Root", - "description": "Root root root.", - "$id": "#assembly_json-value_field_constrained-open_root", + "description": "The root assembly of this example module.", + "$id": "#assembly_json-value_field_constrained-open_test-root", "type": "object", "properties": { - "constrained-open": { - "$ref": "#field_json-value_field_constrained-open_constrained-open" + "test-field": { + "$ref": "#field_json-value_field_constrained-open_test-field" } }, "additionalProperties": false }, - "json-value_field_constrained-open-json-value_field_constrained-open:constrained-open": { - "title": "Constrained open", - "description": "Because allow-other is 'yes' no enumeration can be given in the JSON Schema.", - "$id": "#field_json-value_field_constrained-open_constrained-open", - "type": "object", - "properties": { - "some": { - "title": "Some Flag", - "description": "Some flag some flag some flag.", - "$ref": "#/definitions/StringDatatype" + "json-value_field_constrained-open-json-value_field_constrained-open:test-field": { + "title": "Test Field", + "description": "A test field.", + "$id": "#field_json-value_field_constrained-open_test-field", + "anyOf": [ + { + "$ref": "#/definitions/TokenDatatype" }, - "token-value": { - "anyOf": [ - { - "$ref": "#/definitions/TokenDatatype" - }, - { - "enum": [ - "one", - "two", - "three", - "four" - ] - } + { + "enum": [ + "one", + "two", + "three", + "four" ] } - }, - "required": [ - "token-value" - ], - "additionalProperties": false - }, - "StringDatatype": { - "description": "A non-empty string with leading and trailing whitespace disallowed. Whitespace is: U+9, U+10, U+32 or [ \n\t]+", - "type": "string", - "pattern": "^\\S(.*\\S)?$" + ] }, "TokenDatatype": { "description": "A non-colonized name as defined by XML Schema Part 2: Datatypes Second Edition. https://www.w3.org/TR/xmlschema11-2/#NCName.", @@ -60,12 +41,12 @@ } }, "properties": { - "root": { - "$ref": "#assembly_json-value_field_constrained-open_root" + "test-root": { + "$ref": "#assembly_json-value_field_constrained-open_test-root" } }, "required": [ - "root" + "test-root" ], "additionalProperties": false, "maxProperties": 1 diff --git a/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-open_example-FAIL.json b/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-open_example-FAIL.json new file mode 100644 index 000000000..20eb8b1d8 --- /dev/null +++ b/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-open_example-FAIL.json @@ -0,0 +1,5 @@ +{ + "test-root": { + "test-field": false + } +} \ No newline at end of file diff --git a/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-open_example-PASS1.json b/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-open_example-PASS1.json new file mode 100644 index 000000000..76fbd17d3 --- /dev/null +++ b/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-open_example-PASS1.json @@ -0,0 +1,5 @@ +{ + "test-root": { + "test-field": "anything" + } +} \ No newline at end of file diff --git a/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-open_example-PASS2.json b/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-open_example-PASS2.json new file mode 100644 index 000000000..d038cbe3e --- /dev/null +++ b/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-open_example-PASS2.json @@ -0,0 +1,5 @@ +{ + "test-root": { + "test-field": "two" + } +} \ No newline at end of file diff --git a/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-open_metaschema.xml b/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-open_metaschema.xml index b63fe2735..74571dfe9 100644 --- a/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-open_metaschema.xml +++ b/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-open_metaschema.xml @@ -8,24 +8,20 @@ json-value_field_constrained-open http://csrc.nist.gov/ns/metaschema-tests/1.0 http://csrc.nist.gov/ns/metaschema-tests - + Root - Root root root. - root + The root assembly of this example module. + test-root - + - Constrained open - Because allow-other is 'yes' no enumeration can be given in the JSON Schema. - token-value - - Some Flag - Some flag some flag some flag. - + name="test-field"> + Test Field + A test field. + test-json-key-value diff --git a/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-sortof.json b/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-sortof.json index 1e310bc30..1244edd60 100644 --- a/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-sortof.json +++ b/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-sortof.json @@ -4,42 +4,23 @@ "$comment": "JSON value testing mini metaschema: JSON Schema", "type": "object", "definitions": { - "json-value_field_constrained-sortof-json-value_field_constrained-sortof:root": { + "json-value_field_constrained-sortof-json-value_field_constrained-sortof:test-root": { "title": "Root", - "description": "Root root root.", - "$id": "#assembly_json-value_field_constrained-sortof_root", + "description": "The root assembly of this example module.", + "$id": "#assembly_json-value_field_constrained-sortof_test-root", "type": "object", "properties": { - "constrained-sortof": { - "$ref": "#field_json-value_field_constrained-sortof_constrained-sortof" + "test-field": { + "$ref": "#field_json-value_field_constrained-sortof_test-field" } }, "additionalProperties": false }, - "json-value_field_constrained-sortof-json-value_field_constrained-sortof:constrained-sortof": { - "title": "Constrained, sort of", - "description": "Although allow-other is 'no' an enumeration can't be given in the JSON Schema since it targets a qualified set (only a subset) of the elements in scope.", - "$id": "#field_json-value_field_constrained-sortof_constrained-sortof", - "type": "object", - "properties": { - "some": { - "title": "Some Flag", - "description": "Some flag some flag some flag.", - "$ref": "#/definitions/StringDatatype" - }, - "token-value": { - "$ref": "#/definitions/TokenDatatype" - } - }, - "required": [ - "token-value" - ], - "additionalProperties": false - }, - "StringDatatype": { - "description": "A non-empty string with leading and trailing whitespace disallowed. Whitespace is: U+9, U+10, U+32 or [ \n\t]+", - "type": "string", - "pattern": "^\\S(.*\\S)?$" + "json-value_field_constrained-sortof-json-value_field_constrained-sortof:test-field": { + "title": "Test Field", + "description": "A test field.", + "$id": "#field_json-value_field_constrained-sortof_test-field", + "$ref": "#/definitions/TokenDatatype" }, "TokenDatatype": { "description": "A non-colonized name as defined by XML Schema Part 2: Datatypes Second Edition. https://www.w3.org/TR/xmlschema11-2/#NCName.", @@ -48,12 +29,12 @@ } }, "properties": { - "root": { - "$ref": "#assembly_json-value_field_constrained-sortof_root" + "test-root": { + "$ref": "#assembly_json-value_field_constrained-sortof_test-root" } }, "required": [ - "root" + "test-root" ], "additionalProperties": false, "maxProperties": 1 diff --git a/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-sortof_example-FAIL.json b/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-sortof_example-FAIL.json new file mode 100644 index 000000000..20eb8b1d8 --- /dev/null +++ b/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-sortof_example-FAIL.json @@ -0,0 +1,5 @@ +{ + "test-root": { + "test-field": false + } +} \ No newline at end of file diff --git a/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-sortof_example-PASS1.json b/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-sortof_example-PASS1.json new file mode 100644 index 000000000..76fbd17d3 --- /dev/null +++ b/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-sortof_example-PASS1.json @@ -0,0 +1,5 @@ +{ + "test-root": { + "test-field": "anything" + } +} \ No newline at end of file diff --git a/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-sortof_example-PASS2.json b/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-sortof_example-PASS2.json new file mode 100644 index 000000000..d038cbe3e --- /dev/null +++ b/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-sortof_example-PASS2.json @@ -0,0 +1,5 @@ +{ + "test-root": { + "test-field": "two" + } +} \ No newline at end of file diff --git a/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-sortof_metaschema.xml b/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-sortof_metaschema.xml index 0d2bed8a4..76c8b695b 100644 --- a/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-sortof_metaschema.xml +++ b/test-suite/metaschema-xspec/json-schema-gen/json-value_field_constrained-sortof_metaschema.xml @@ -8,24 +8,20 @@ json-value_field_constrained-sortof http://csrc.nist.gov/ns/metaschema-tests/1.0 http://csrc.nist.gov/ns/metaschema-tests - + Root - Root root root. - root + The root assembly of this example module. + test-root - + - Constrained, sort of - Although allow-other is 'no' an enumeration can't be given in the JSON Schema since it targets a qualified set (only a subset) of the elements in scope. - token-value - - Some Flag - Some flag some flag some flag. - + name="test-field"> + Test Field + A test field. + test-json-key-value diff --git a/test-suite/metaschema-xspec/json-schema-gen/json-value_field_unconstrained.json b/test-suite/metaschema-xspec/json-schema-gen/json-value_field_unconstrained.json index c0b10051d..64734582e 100644 --- a/test-suite/metaschema-xspec/json-schema-gen/json-value_field_unconstrained.json +++ b/test-suite/metaschema-xspec/json-schema-gen/json-value_field_unconstrained.json @@ -4,42 +4,23 @@ "$comment": "JSON value testing mini metaschema: JSON Schema", "type": "object", "definitions": { - "json-value_field_unconstrained-json-value_field_unconstrained:root": { + "json-value_field_unconstrained-json-value_field_unconstrained:test-root": { "title": "Root", - "description": "Root root root.", - "$id": "#assembly_json-value_field_unconstrained_root", + "description": "The root assembly of this example module.", + "$id": "#assembly_json-value_field_unconstrained_test-root", "type": "object", "properties": { - "unconstrained": { - "$ref": "#field_json-value_field_unconstrained_unconstrained" + "test-field": { + "$ref": "#field_json-value_field_unconstrained_test-field" } }, "additionalProperties": false }, - "json-value_field_unconstrained-json-value_field_unconstrained:unconstrained": { - "title": "Unconstrained", - "description": "A field whose value is constrained only by its nominal datatype, 'token'.", - "$id": "#field_json-value_field_unconstrained_unconstrained", - "type": "object", - "properties": { - "some": { - "title": "Some Flag", - "description": "Some flag some flag some flag.", - "$ref": "#/definitions/StringDatatype" - }, - "token-value": { - "$ref": "#/definitions/TokenDatatype" - } - }, - "required": [ - "token-value" - ], - "additionalProperties": false - }, - "StringDatatype": { - "description": "A non-empty string with leading and trailing whitespace disallowed. Whitespace is: U+9, U+10, U+32 or [ \n\t]+", - "type": "string", - "pattern": "^\\S(.*\\S)?$" + "json-value_field_unconstrained-json-value_field_unconstrained:test-field": { + "title": "Test Field", + "description": "A test field.", + "$id": "#field_json-value_field_unconstrained_test-field", + "$ref": "#/definitions/TokenDatatype" }, "TokenDatatype": { "description": "A non-colonized name as defined by XML Schema Part 2: Datatypes Second Edition. https://www.w3.org/TR/xmlschema11-2/#NCName.", @@ -48,12 +29,12 @@ } }, "properties": { - "root": { - "$ref": "#assembly_json-value_field_unconstrained_root" + "test-root": { + "$ref": "#assembly_json-value_field_unconstrained_test-root" } }, "required": [ - "root" + "test-root" ], "additionalProperties": false, "maxProperties": 1 diff --git a/test-suite/metaschema-xspec/json-schema-gen/json-value_field_unconstrained_example-FAIL.json b/test-suite/metaschema-xspec/json-schema-gen/json-value_field_unconstrained_example-FAIL.json new file mode 100644 index 000000000..20eb8b1d8 --- /dev/null +++ b/test-suite/metaschema-xspec/json-schema-gen/json-value_field_unconstrained_example-FAIL.json @@ -0,0 +1,5 @@ +{ + "test-root": { + "test-field": false + } +} \ No newline at end of file diff --git a/test-suite/metaschema-xspec/json-schema-gen/json-value_field_unconstrained_example-PASS.json b/test-suite/metaschema-xspec/json-schema-gen/json-value_field_unconstrained_example-PASS.json new file mode 100644 index 000000000..76fbd17d3 --- /dev/null +++ b/test-suite/metaschema-xspec/json-schema-gen/json-value_field_unconstrained_example-PASS.json @@ -0,0 +1,5 @@ +{ + "test-root": { + "test-field": "anything" + } +} \ No newline at end of file diff --git a/test-suite/metaschema-xspec/json-schema-gen/json-value_field_unconstrained_metaschema.xml b/test-suite/metaschema-xspec/json-schema-gen/json-value_field_unconstrained_metaschema.xml index 4536777cd..8f77ea819 100644 --- a/test-suite/metaschema-xspec/json-schema-gen/json-value_field_unconstrained_metaschema.xml +++ b/test-suite/metaschema-xspec/json-schema-gen/json-value_field_unconstrained_metaschema.xml @@ -8,23 +8,19 @@ json-value_field_unconstrained http://csrc.nist.gov/ns/metaschema-tests/1.0 http://csrc.nist.gov/ns/metaschema-tests - + Root - Root root root. - root + The root assembly of this example module. + test-root - + - Unconstrained - A field whose value is constrained only by its nominal datatype, 'token'. - token-value - - Some Flag - Some flag some flag some flag. - + name="test-field"> + Test Field + A test field. + test-json-key-value diff --git a/test-suite/metaschema-xspec/json-schema-gen/json-value_flag_constrained-closed.json b/test-suite/metaschema-xspec/json-schema-gen/json-value_flag_constrained-closed.json index a088bcc98..b4fcc949f 100644 --- a/test-suite/metaschema-xspec/json-schema-gen/json-value_flag_constrained-closed.json +++ b/test-suite/metaschema-xspec/json-schema-gen/json-value_flag_constrained-closed.json @@ -4,27 +4,27 @@ "$comment": "JSON value testing mini metaschema: JSON Schema", "type": "object", "definitions": { - "json-value_flag_constrained-closed-json-value_flag_constrained-closed:root": { + "json-value_flag_constrained-closed-json-value_flag_constrained-closed:test-root": { "title": "Root", - "description": "Root root root.", - "$id": "#assembly_json-value_flag_constrained-closed_root", + "description": "The root assembly of this example module.", + "$id": "#assembly_json-value_flag_constrained-closed_test-root", "type": "object", "properties": { - "constrained-closed": { - "$ref": "#field_json-value_flag_constrained-closed_constrained-closed" + "test-field": { + "$ref": "#field_json-value_flag_constrained-closed_test-field" } }, "additionalProperties": false }, - "json-value_flag_constrained-closed-json-value_flag_constrained-closed:constrained-closed": { - "title": "Constrained closed", - "description": "Because allow-other is 'no' an enumeration can be given in the JSON Schema.", - "$id": "#field_json-value_flag_constrained-closed_constrained-closed", + "json-value_flag_constrained-closed-json-value_flag_constrained-closed:test-field": { + "title": "Test Field", + "description": "A test field.", + "$id": "#field_json-value_flag_constrained-closed_test-field", "type": "object", "properties": { - "some": { - "title": "Some Flag", - "description": "Some flag some flag some flag.", + "test-flag": { + "title": "Test Flag", + "description": "A test flag.", "allOf": [ { "$ref": "#/definitions/StringDatatype" @@ -39,12 +39,12 @@ } ] }, - "token-value": { + "test-json-key-value": { "$ref": "#/definitions/TokenDatatype" } }, "required": [ - "token-value" + "test-json-key-value" ], "additionalProperties": false }, @@ -60,12 +60,12 @@ } }, "properties": { - "root": { - "$ref": "#assembly_json-value_flag_constrained-closed_root" + "test-root": { + "$ref": "#assembly_json-value_flag_constrained-closed_test-root" } }, "required": [ - "root" + "test-root" ], "additionalProperties": false, "maxProperties": 1 diff --git a/test-suite/metaschema-xspec/json-schema-gen/json-value_flag_constrained-closed_example-FAIL.json b/test-suite/metaschema-xspec/json-schema-gen/json-value_flag_constrained-closed_example-FAIL.json new file mode 100644 index 000000000..e5bf71426 --- /dev/null +++ b/test-suite/metaschema-xspec/json-schema-gen/json-value_flag_constrained-closed_example-FAIL.json @@ -0,0 +1,8 @@ +{ + "test-root": { + "test-field": { + "test-flag": "anything1", + "test-json-key-value": "anything2" + } + } +} \ No newline at end of file diff --git a/test-suite/metaschema-xspec/json-schema-gen/json-value_flag_constrained-closed_example-PASS.json b/test-suite/metaschema-xspec/json-schema-gen/json-value_flag_constrained-closed_example-PASS.json new file mode 100644 index 000000000..212166af4 --- /dev/null +++ b/test-suite/metaschema-xspec/json-schema-gen/json-value_flag_constrained-closed_example-PASS.json @@ -0,0 +1,8 @@ +{ + "test-root": { + "test-field": { + "test-flag": "four", + "test-json-key-value": "anything2" + } + } +} \ No newline at end of file diff --git a/test-suite/metaschema-xspec/json-schema-gen/json-value_flag_constrained-closed_metaschema.xml b/test-suite/metaschema-xspec/json-schema-gen/json-value_flag_constrained-closed_metaschema.xml index d33057612..86ba99869 100644 --- a/test-suite/metaschema-xspec/json-schema-gen/json-value_flag_constrained-closed_metaschema.xml +++ b/test-suite/metaschema-xspec/json-schema-gen/json-value_flag_constrained-closed_metaschema.xml @@ -8,23 +8,23 @@ json-value_flag_constrained-closed http://csrc.nist.gov/ns/metaschema-tests/1.0 http://csrc.nist.gov/ns/metaschema-tests - + Root - Root root root. - root + The root assembly of this example module. + test-root - + - Constrained closed - Because allow-other is 'no' an enumeration can be given in the JSON Schema. - token-value - - Some Flag - Some flag some flag some flag. + name="test-field"> + Test Field + A test field. + test-json-key-value + + Test Flag + A test flag. diff --git a/test-suite/metaschema-xspec/json-schema-gen/json-value_flag_constrained-open.json b/test-suite/metaschema-xspec/json-schema-gen/json-value_flag_constrained-open.json index 526652c5d..b47eff488 100644 --- a/test-suite/metaschema-xspec/json-schema-gen/json-value_flag_constrained-open.json +++ b/test-suite/metaschema-xspec/json-schema-gen/json-value_flag_constrained-open.json @@ -4,27 +4,27 @@ "$comment": "JSON value testing mini metaschema: JSON Schema", "type": "object", "definitions": { - "json-value_flag_constrained-open-json-value_flag_constrained-open:root": { + "json-value_flag_constrained-open-json-value_flag_constrained-open:test-root": { "title": "Root", - "description": "Root root root.", - "$id": "#assembly_json-value_flag_constrained-open_root", + "description": "The root assembly of this example module.", + "$id": "#assembly_json-value_flag_constrained-open_test-root", "type": "object", "properties": { - "constrained-open": { - "$ref": "#field_json-value_flag_constrained-open_constrained-open" + "test-field": { + "$ref": "#field_json-value_flag_constrained-open_test-field" } }, "additionalProperties": false }, - "json-value_flag_constrained-open-json-value_flag_constrained-open:constrained-open": { - "title": "Constrained open", - "description": "Because allow-other is 'yes' no enumeration can be given in the JSON Schema.", - "$id": "#field_json-value_flag_constrained-open_constrained-open", + "json-value_flag_constrained-open-json-value_flag_constrained-open:test-field": { + "title": "Test Field", + "description": "A test field.", + "$id": "#field_json-value_flag_constrained-open_test-field", "type": "object", "properties": { - "some": { - "title": "Some Flag", - "description": "Some flag some flag some flag.", + "test-flag": { + "title": "Test Flag", + "description": "A test flag.", "anyOf": [ { "$ref": "#/definitions/StringDatatype" @@ -39,12 +39,12 @@ } ] }, - "token-value": { + "test-json-key-value": { "$ref": "#/definitions/TokenDatatype" } }, "required": [ - "token-value" + "test-json-key-value" ], "additionalProperties": false }, @@ -60,12 +60,12 @@ } }, "properties": { - "root": { - "$ref": "#assembly_json-value_flag_constrained-open_root" + "test-root": { + "$ref": "#assembly_json-value_flag_constrained-open_test-root" } }, "required": [ - "root" + "test-root" ], "additionalProperties": false, "maxProperties": 1 diff --git a/test-suite/metaschema-xspec/json-schema-gen/json-value_flag_constrained-open_example-FAIL.json b/test-suite/metaschema-xspec/json-schema-gen/json-value_flag_constrained-open_example-FAIL.json new file mode 100644 index 000000000..caf5f01e7 --- /dev/null +++ b/test-suite/metaschema-xspec/json-schema-gen/json-value_flag_constrained-open_example-FAIL.json @@ -0,0 +1,8 @@ +{ + "test-root": { + "test-field": { + "test-flag": false, + "test-json-key-value": false + } + } +} \ No newline at end of file diff --git a/test-suite/metaschema-xspec/json-schema-gen/json-value_flag_constrained-open_example-PASS1.json b/test-suite/metaschema-xspec/json-schema-gen/json-value_flag_constrained-open_example-PASS1.json new file mode 100644 index 000000000..e5bf71426 --- /dev/null +++ b/test-suite/metaschema-xspec/json-schema-gen/json-value_flag_constrained-open_example-PASS1.json @@ -0,0 +1,8 @@ +{ + "test-root": { + "test-field": { + "test-flag": "anything1", + "test-json-key-value": "anything2" + } + } +} \ No newline at end of file diff --git a/test-suite/metaschema-xspec/json-schema-gen/json-value_flag_constrained-open_example-PASS2.json b/test-suite/metaschema-xspec/json-schema-gen/json-value_flag_constrained-open_example-PASS2.json new file mode 100644 index 000000000..5cf66abe1 --- /dev/null +++ b/test-suite/metaschema-xspec/json-schema-gen/json-value_flag_constrained-open_example-PASS2.json @@ -0,0 +1,8 @@ +{ + "test-root": { + "test-field": { + "test-flag": "one", + "test-json-key-value": "anything2" + } + } +} \ No newline at end of file diff --git a/test-suite/metaschema-xspec/json-schema-gen/json-value_flag_constrained-open_metaschema.xml b/test-suite/metaschema-xspec/json-schema-gen/json-value_flag_constrained-open_metaschema.xml index a06f98659..bc94acd28 100644 --- a/test-suite/metaschema-xspec/json-schema-gen/json-value_flag_constrained-open_metaschema.xml +++ b/test-suite/metaschema-xspec/json-schema-gen/json-value_flag_constrained-open_metaschema.xml @@ -8,23 +8,23 @@ json-value_flag_constrained-open http://csrc.nist.gov/ns/metaschema-tests/1.0 http://csrc.nist.gov/ns/metaschema-tests - + Root - Root root root. - root + The root assembly of this example module. + test-root - + - Constrained open - Because allow-other is 'yes' no enumeration can be given in the JSON Schema. - token-value - - Some Flag - Some flag some flag some flag. + name="test-field"> + Test Field + A test field. + test-json-key-value + + Test Flag + A test flag. diff --git a/test-suite/metaschema-xspec/json-schema-gen/json-value_flag_unconstrained.json b/test-suite/metaschema-xspec/json-schema-gen/json-value_flag_unconstrained.json index 52281a237..863cb11cf 100644 --- a/test-suite/metaschema-xspec/json-schema-gen/json-value_flag_unconstrained.json +++ b/test-suite/metaschema-xspec/json-schema-gen/json-value_flag_unconstrained.json @@ -4,35 +4,35 @@ "$comment": "JSON value testing mini metaschema: JSON Schema", "type": "object", "definitions": { - "json-schema-value-test-unconstrained-json-schema-value-test-unconstrained:root": { + "json-schema-value-test-unconstrained-json-schema-value-test-unconstrained:test-root": { "title": "Root", - "description": "Root root root.", - "$id": "#assembly_json-schema-value-test-unconstrained_root", + "description": "The root assembly of this example module.", + "$id": "#assembly_json-schema-value-test-unconstrained_test-root", "type": "object", "properties": { - "unconstrained": { - "$ref": "#field_json-schema-value-test-unconstrained_unconstrained" + "test-field": { + "$ref": "#field_json-schema-value-test-unconstrained_test-field" } }, "additionalProperties": false }, - "json-schema-value-test-unconstrained-json-schema-value-test-unconstrained:unconstrained": { - "title": "Unconstrained", - "description": "A field whose value is constrained only by its nominal datatype, 'token'.", - "$id": "#field_json-schema-value-test-unconstrained_unconstrained", + "json-schema-value-test-unconstrained-json-schema-value-test-unconstrained:test-field": { + "title": "Test Field", + "description": "A test field.", + "$id": "#field_json-schema-value-test-unconstrained_test-field", "type": "object", "properties": { - "some": { - "title": "Some Flag", - "description": "Some flag some flag some flag.", + "test-flag": { + "title": "Test Flag", + "description": "A test flag.", "$ref": "#/definitions/StringDatatype" }, - "token-value": { + "test-json-key-value": { "$ref": "#/definitions/TokenDatatype" } }, "required": [ - "token-value" + "test-json-key-value" ], "additionalProperties": false }, @@ -48,12 +48,12 @@ } }, "properties": { - "root": { - "$ref": "#assembly_json-schema-value-test-unconstrained_root" + "test-root": { + "$ref": "#assembly_json-schema-value-test-unconstrained_test-root" } }, "required": [ - "root" + "test-root" ], "additionalProperties": false, "maxProperties": 1 diff --git a/test-suite/metaschema-xspec/json-schema-gen/json-value_flag_unconstrained_example-FAIL.json b/test-suite/metaschema-xspec/json-schema-gen/json-value_flag_unconstrained_example-FAIL.json new file mode 100644 index 000000000..caf5f01e7 --- /dev/null +++ b/test-suite/metaschema-xspec/json-schema-gen/json-value_flag_unconstrained_example-FAIL.json @@ -0,0 +1,8 @@ +{ + "test-root": { + "test-field": { + "test-flag": false, + "test-json-key-value": false + } + } +} \ No newline at end of file diff --git a/test-suite/metaschema-xspec/json-schema-gen/json-value_flag_unconstrained_example-PASS.json b/test-suite/metaschema-xspec/json-schema-gen/json-value_flag_unconstrained_example-PASS.json new file mode 100644 index 000000000..e5bf71426 --- /dev/null +++ b/test-suite/metaschema-xspec/json-schema-gen/json-value_flag_unconstrained_example-PASS.json @@ -0,0 +1,8 @@ +{ + "test-root": { + "test-field": { + "test-flag": "anything1", + "test-json-key-value": "anything2" + } + } +} \ No newline at end of file diff --git a/test-suite/metaschema-xspec/json-schema-gen/json-value_flag_unconstrained_metaschema.xml b/test-suite/metaschema-xspec/json-schema-gen/json-value_flag_unconstrained_metaschema.xml index 69d7ad4ce..226dcd1d7 100644 --- a/test-suite/metaschema-xspec/json-schema-gen/json-value_flag_unconstrained_metaschema.xml +++ b/test-suite/metaschema-xspec/json-schema-gen/json-value_flag_unconstrained_metaschema.xml @@ -8,23 +8,23 @@ json-schema-value-test-unconstrained http://csrc.nist.gov/ns/metaschema-tests/1.0 http://csrc.nist.gov/ns/metaschema-tests - + Root - Root root root. - root + The root assembly of this example module. + test-root - + - Unconstrained - A field whose value is constrained only by its nominal datatype, 'token'. - token-value - - Some Flag - Some flag some flag some flag. + name="test-field"> + Test Field + A test field. + test-json-key-value + + Test Flag + A test flag.