-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f43944c
commit db52cc7
Showing
5 changed files
with
230 additions
and
315 deletions.
There are no files selected for viewing
1 change: 0 additions & 1 deletion
1
test-suite/schema-generation/choice/choice-multiple_test_multiple_PASS.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
123 changes: 77 additions & 46 deletions
123
test-suite/schema-generation/datatypes/charstrings_json-schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,77 @@ | ||
|
||
{ "$schema" : "http://json-schema.org/draft-07/schema#", | ||
"$id" : "http://csrc.nist.gov/ns/metaschema/unit-test/datatypes-dateTime-schema.json", | ||
"$comment" : "Metaschema Unit Test: datatypes-dateTime: JSON Schema", | ||
"type" : "object", | ||
"definitions" : | ||
{ "examples" : | ||
{ "title" : "Examples", | ||
"description" : "Some character strings of different sorts", | ||
"$id" : "#/definitions/examples", | ||
"type" : "object", | ||
"properties" : | ||
{ "character-strings" : | ||
{ "anyOf" : | ||
[ | ||
{ "$ref" : "#/definitions/charstring" }, | ||
|
||
{ "type" : "array", | ||
"items" : | ||
{ "$ref" : "#/definitions/charstring" }, | ||
"minItems" : 2 } ] }, | ||
"markup-lines" : | ||
{ "anyOf" : | ||
[ | ||
{ "$ref" : "#/definitions/markupline" }, | ||
|
||
{ "type" : "array", | ||
"items" : | ||
{ "$ref" : "#/definitions/markupline" }, | ||
"minItems" : 2 } ] } }, | ||
"additionalProperties" : false }, | ||
"charstring" : | ||
{ "title" : "Character string", | ||
"description" : "String of characters", | ||
"$id" : "#/definitions/charstring", | ||
"type" : "string" }, | ||
"markupline" : | ||
{ "title" : "Markup line", | ||
"description" : "Characters, and more", | ||
"$id" : "#/definitions/markupline", | ||
"type" : "string" } }, | ||
"properties" : | ||
{ "examples" : | ||
{ "$ref" : "#/definitions/examples" } }, | ||
"additionalProperties" : false, | ||
"maxProperties" : 1 } | ||
{ | ||
"$schema" : "http://json-schema.org/draft-07/schema#", | ||
"$id" : "http://csrc.nist.gov/ns/metaschema/unit-test/datatypes-dateTime/metaschema-datatypes-dateTime-1.0-milestone1-schema.json", | ||
"$comment" : "Metaschema Unit Test: datatypes-dateTime", | ||
"type" : "object", | ||
"definitions" : { | ||
"MetaschemaDatatypesDatetimeExamplesAssemblyType" : { | ||
"$id" : "#/definitions/MetaschemaDatatypesDatetimeExamplesAssemblyType", | ||
"$comment" : "Definition MetaschemaDatatypesDatetimeExamplesAssemblyType: inline(false:false)", | ||
"title" : "Examples", | ||
"description" : "Some character strings of different sorts", | ||
"type" : "object", | ||
"properties" : { | ||
"character-strings" : { | ||
"oneOf" : [ { | ||
"$comment" : "InstancePropertyDefinitionOrRef MetaschemaDatatypesDatetimeCharstringFieldType: inline(false:false)", | ||
"$ref" : "#/definitions/MetaschemaDatatypesDatetimeCharstringFieldType" | ||
}, { | ||
"type" : "array", | ||
"items" : { | ||
"$comment" : "InstancePropertyDefinitionOrRef MetaschemaDatatypesDatetimeCharstringFieldType: inline(false:false)", | ||
"$ref" : "#/definitions/MetaschemaDatatypesDatetimeCharstringFieldType" | ||
}, | ||
"minItems" : 2 | ||
} ] | ||
}, | ||
"markup-lines" : { | ||
"oneOf" : [ { | ||
"$comment" : "InstancePropertyDefinitionOrRef MetaschemaDatatypesDatetimeMarkuplineFieldType: inline(false:false)", | ||
"$ref" : "#/definitions/MetaschemaDatatypesDatetimeMarkuplineFieldType" | ||
}, { | ||
"type" : "array", | ||
"items" : { | ||
"$comment" : "InstancePropertyDefinitionOrRef MetaschemaDatatypesDatetimeMarkuplineFieldType: inline(false:false)", | ||
"$ref" : "#/definitions/MetaschemaDatatypesDatetimeMarkuplineFieldType" | ||
}, | ||
"minItems" : 2 | ||
} ] | ||
} | ||
}, | ||
"additionalProperties" : false | ||
}, | ||
"MetaschemaDatatypesDatetimeCharstringFieldType" : { | ||
"$id" : "#/definitions/MetaschemaDatatypesDatetimeCharstringFieldType", | ||
"$comment" : "Definition MetaschemaDatatypesDatetimeCharstringFieldType: inline(false:false)", | ||
"title" : "Character string", | ||
"description" : "String of characters", | ||
"$ref" : "#/definitions/StringDatatype" | ||
}, | ||
"MetaschemaDatatypesDatetimeMarkuplineFieldType" : { | ||
"$id" : "#/definitions/MetaschemaDatatypesDatetimeMarkuplineFieldType", | ||
"$comment" : "Definition MetaschemaDatatypesDatetimeMarkuplineFieldType: inline(false:false)", | ||
"title" : "Markup line", | ||
"description" : "Characters, and more", | ||
"$ref" : "#/definitions/MarkupLineDatatype" | ||
}, | ||
"MarkupLineDatatype" : { | ||
"type" : "string", | ||
"pattern" : "^[^\n]+$" | ||
}, | ||
"StringDatatype" : { | ||
"type" : "string", | ||
"pattern" : "^\\S(.*\\S)?$" | ||
} | ||
}, | ||
"properties" : { | ||
"$schema" : { | ||
"type" : "string", | ||
"format" : "uri-reference" | ||
}, | ||
"examples" : { | ||
"$ref" : "#/definitions/MetaschemaDatatypesDatetimeExamplesAssemblyType" | ||
} | ||
}, | ||
"required" : [ "examples" ], | ||
"additionalProperties" : false | ||
} |
25 changes: 15 additions & 10 deletions
25
test-suite/schema-generation/datatypes/charstrings_test_okay_PASS.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,15 @@ | ||
|
||
{ "examples" : | ||
{ "character-strings" : | ||
[ "Here's a string including punctuation ' \" \\ . $", | ||
"Here's a string with an ampersand &", | ||
"Less-than and greater-than, as <delimiters> ...", | ||
"The star aka asterisk * may be magical and maybe also the tick `" ], | ||
"markup-lines" : | ||
[ "Also, occasionally we have [links](w3.org) and *other markup*.", | ||
"And *sometimes*, we have \\*very confusing stuff\\* as well." ] } } | ||
{ | ||
"$schema": "charstrings_json-schema.json", | ||
"examples": { | ||
"character-strings": [ | ||
"Here's a string including punctuation ' \" \\ . $", | ||
"Here's a string with an ampersand &", | ||
"Less-than and greater-than, as <delimiters> ...", | ||
"The star aka asterisk * may be magical and maybe also the tick `" | ||
], | ||
"markup-lines": [ | ||
"Also, occasionally we have [links](w3.org) and *other markup*.", | ||
"And *sometimes*, we have \\*very confusing stuff\\* as well." | ||
] | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
test-suite/schema-generation/datatypes/charstrings_test_okay_PASS.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.