diff --git a/test-suite/schema-generation/datatypes/readme.md b/test-suite/schema-generation/datatypes/readme.md index af30e4e89..f951a9d14 100644 --- a/test-suite/schema-generation/datatypes/readme.md +++ b/test-suite/schema-generation/datatypes/readme.md @@ -1,6 +1,8 @@ # Datatypes -**Status** - untested, unknown - +**Status** + +- updated 2022 Aug 29 (cleaned up outdated target files) The metaschemas here all successfully build schemas, invoking various data types for purpose of exercising lexical constraint testing (for example, does a URI look sufficiently like a URI). diff --git a/test-suite/schema-generation/datatypes/target/charstrings_metaschema-jsonschema.json b/test-suite/schema-generation/datatypes/target/charstrings_metaschema-jsonschema.json deleted file mode 100644 index e90be3f14..000000000 --- a/test-suite/schema-generation/datatypes/target/charstrings_metaschema-jsonschema.json +++ /dev/null @@ -1,49 +0,0 @@ - - { "$schema" : "http://json-schema.org/draft-07/schema#", - "$id" : "http://csrc.nist.gov/ns/metaschema/unit-test/datatypes-dateTime/1.0-milestone1/metaschema-datatypes-dateTime-schema.json", - "$comment" : "Metaschema Unit Test: datatypes-dateTime: JSON Schema", - "type" : "object", - "definitions" : - { "metaschema-datatypes-dateTime-metaschema-datatypes-dateTime:examples" : - { "title" : "Examples", - "description" : "Some character strings of different sorts", - "$id" : "#assembly_metaschema-datatypes-dateTime_examples", - "type" : "object", - "properties" : - { "character-strings" : - { "anyOf" : - [ - { "$ref" : "#field_metaschema-datatypes-dateTime_charstring" }, - - { "type" : "array", - "minItems" : 1, - "items" : - { "$ref" : "#field_metaschema-datatypes-dateTime_charstring" } } ] }, - "markup-lines" : - { "anyOf" : - [ - { "$ref" : "#field_metaschema-datatypes-dateTime_markupline" }, - - { "type" : "array", - "minItems" : 1, - "items" : - { "$ref" : "#field_metaschema-datatypes-dateTime_markupline" } } ] } }, - "additionalProperties" : false }, - "metaschema-datatypes-dateTime-metaschema-datatypes-dateTime:charstring" : - { "title" : "Character string", - "description" : "String of characters", - "$id" : "#field_metaschema-datatypes-dateTime_charstring", - "type" : "string", - "pattern" : "^\\S(.*\\S)?$" }, - "metaschema-datatypes-dateTime-metaschema-datatypes-dateTime:markupline" : - { "title" : "Markup line", - "description" : "Characters, and more", - "$id" : "#field_metaschema-datatypes-dateTime_markupline", - "type" : "string" } }, - "properties" : - { "examples" : - { "$ref" : "#assembly_metaschema-datatypes-dateTime_examples" } }, - "required" : - [ "examples" ], - "additionalProperties" : false, - "maxProperties" : 1 } \ No newline at end of file diff --git a/test-suite/schema-generation/datatypes/target/charstrings_metaschema-xmlschema.xsd b/test-suite/schema-generation/datatypes/target/charstrings_metaschema-xmlschema.xsd deleted file mode 100644 index e90be3f14..000000000 --- a/test-suite/schema-generation/datatypes/target/charstrings_metaschema-xmlschema.xsd +++ /dev/null @@ -1,49 +0,0 @@ - - { "$schema" : "http://json-schema.org/draft-07/schema#", - "$id" : "http://csrc.nist.gov/ns/metaschema/unit-test/datatypes-dateTime/1.0-milestone1/metaschema-datatypes-dateTime-schema.json", - "$comment" : "Metaschema Unit Test: datatypes-dateTime: JSON Schema", - "type" : "object", - "definitions" : - { "metaschema-datatypes-dateTime-metaschema-datatypes-dateTime:examples" : - { "title" : "Examples", - "description" : "Some character strings of different sorts", - "$id" : "#assembly_metaschema-datatypes-dateTime_examples", - "type" : "object", - "properties" : - { "character-strings" : - { "anyOf" : - [ - { "$ref" : "#field_metaschema-datatypes-dateTime_charstring" }, - - { "type" : "array", - "minItems" : 1, - "items" : - { "$ref" : "#field_metaschema-datatypes-dateTime_charstring" } } ] }, - "markup-lines" : - { "anyOf" : - [ - { "$ref" : "#field_metaschema-datatypes-dateTime_markupline" }, - - { "type" : "array", - "minItems" : 1, - "items" : - { "$ref" : "#field_metaschema-datatypes-dateTime_markupline" } } ] } }, - "additionalProperties" : false }, - "metaschema-datatypes-dateTime-metaschema-datatypes-dateTime:charstring" : - { "title" : "Character string", - "description" : "String of characters", - "$id" : "#field_metaschema-datatypes-dateTime_charstring", - "type" : "string", - "pattern" : "^\\S(.*\\S)?$" }, - "metaschema-datatypes-dateTime-metaschema-datatypes-dateTime:markupline" : - { "title" : "Markup line", - "description" : "Characters, and more", - "$id" : "#field_metaschema-datatypes-dateTime_markupline", - "type" : "string" } }, - "properties" : - { "examples" : - { "$ref" : "#assembly_metaschema-datatypes-dateTime_examples" } }, - "required" : - [ "examples" ], - "additionalProperties" : false, - "maxProperties" : 1 } \ No newline at end of file diff --git a/test-suite/schema-generation/datatypes/target/datatypes-date_metaschema-jsonschema.json b/test-suite/schema-generation/datatypes/target/datatypes-date_metaschema-jsonschema.json deleted file mode 100644 index 2ed5a727e..000000000 --- a/test-suite/schema-generation/datatypes/target/datatypes-date_metaschema-jsonschema.json +++ /dev/null @@ -1,62 +0,0 @@ - - { "$schema" : "http://json-schema.org/draft-07/schema#", - "$id" : "http://csrc.nist.gov/ns/metaschema/unit-test/datatypes-dateTime/1.0-milestone1/metaschema-datatypes-dateTime-schema.json", - "$comment" : "Metaschema Unit Test: datatypes-dateTime: JSON Schema", - "type" : "object", - "definitions" : - { "metaschema-datatypes-dateTime-metaschema-datatypes-dateTime:parent" : - { "title" : "parent", - "description" : "parent assembly", - "$id" : "#assembly_metaschema-datatypes-dateTime_parent", - "type" : "object", - "properties" : - { "flag-date" : - { "title" : "Date Flag", - "description" : "date flag, time zone optional", - "type" : "string", - "pattern" : "^((2000|2400|2800|(19|2[0-9](0[48]|[2468][048]|[13579][26])))-02-29)|(((19|2[0-9])[0-9]{2})-02-(0[1-9]|1[0-9]|2[0-8]))|(((19|2[0-9])[0-9]{2})-(0[13578]|10|12)-(0[1-9]|[12][0-9]|3[01]))|(((19|2[0-9])[0-9]{2})-(0[469]|11)-(0[1-9]|[12][0-9]|30))(Z|[+-][0-9]{2}:[0-9]{2})?$" }, - "field-dates" : - { "anyOf" : - [ - { "$ref" : "#field_metaschema-datatypes-dateTime_field-date" }, - - { "type" : "array", - "minItems" : 1, - "items" : - { "$ref" : "#field_metaschema-datatypes-dateTime_field-date" } } ] }, - "children" : - { "anyOf" : - [ - { "$ref" : "#assembly_metaschema-datatypes-dateTime_child" }, - - { "type" : "array", - "minItems" : 1, - "items" : - { "$ref" : "#assembly_metaschema-datatypes-dateTime_child" } } ] } }, - "required" : - [ "flag-date" ], - "additionalProperties" : false }, - "metaschema-datatypes-dateTime-metaschema-datatypes-dateTime:child" : - { "title" : "child", - "description" : "child assembly", - "$id" : "#assembly_metaschema-datatypes-dateTime_child", - "type" : "object", - "properties" : - { "field-date" : - { "$ref" : "#field_metaschema-datatypes-dateTime_field-date" } }, - "required" : - [ "field-date" ], - "additionalProperties" : false }, - "metaschema-datatypes-dateTime-metaschema-datatypes-dateTime:field-date" : - { "title" : "Date", - "description" : "Time zone optional", - "$id" : "#field_metaschema-datatypes-dateTime_field-date", - "type" : "string", - "pattern" : "^((2000|2400|2800|(19|2[0-9](0[48]|[2468][048]|[13579][26])))-02-29)|(((19|2[0-9])[0-9]{2})-02-(0[1-9]|1[0-9]|2[0-8]))|(((19|2[0-9])[0-9]{2})-(0[13578]|10|12)-(0[1-9]|[12][0-9]|3[01]))|(((19|2[0-9])[0-9]{2})-(0[469]|11)-(0[1-9]|[12][0-9]|30))(Z|[+-][0-9]{2}:[0-9]{2})?$" } }, - "properties" : - { "parent" : - { "$ref" : "#assembly_metaschema-datatypes-dateTime_parent" } }, - "required" : - [ "parent" ], - "additionalProperties" : false, - "maxProperties" : 1 } \ No newline at end of file diff --git a/test-suite/schema-generation/datatypes/target/datatypes-date_metaschema-xmlschema.xsd b/test-suite/schema-generation/datatypes/target/datatypes-date_metaschema-xmlschema.xsd deleted file mode 100644 index eccb22c53..000000000 --- a/test-suite/schema-generation/datatypes/target/datatypes-date_metaschema-xmlschema.xsd +++ /dev/null @@ -1,228 +0,0 @@ - - - - - Metaschema Unit Test: datatypes-dateTime - 1.0-milestone1 - metaschema-datatypes-dateTime - parent - - - - - - - parent - parent assembly - - - parent: parent assembly - - - - - - - - - Date Flag - date flag, time zone optional - - - Date Flag: date flag, time zone optional - - - - - - - child - child assembly - - - child: child assembly - - - - - - - - - Date - Time zone optional - - - Date: Time zone optional - - - - - - A string, but not empty and not whitespace-only (whitespace is U+9, U+10, U+32 or [ \n\t]+ ) - - - - - - - - A trimmed string, at least one character with no - leading or trailing whitespace. - - - - - - - - - - - - The xs:date with a required timezone. - - - - - - - - - - - - - The xs:dateTime with a required timezone. - - - - - - - - An email address - - - - - Need a better pattern. - - - - - - - A host name - - - - - - The ip-v4-address type specifies an IPv4 address in - dot decimal notation. - - - - - - - - The ip-v6-address type specifies an IPv6 address - represented in 8 hextets separated by colons. - This is based on the pattern provided here: - https://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses - with some customizations. - - - - - - - - - - - A trimmed string, at least one character with no - leading or trailing whitespace. - - - - - - - A string, but not empty and not whitespace-only - (whitespace is U+9, U+10, U+32 or [ \n\t]+ ) - - - - The OSCAL 'string' datatype restricts the XSD type by prohibiting leading - and trailing whitespace, and something (not only whitespace) is required. - - - - - A trimmed string, at least one character with no - leading or trailing whitespace. - - - - - - - A URI - - - - - Requires a scheme with colon per RFC 3986. - - - - - - - A URI reference, such as a relative URL - - - - - - A trimmed URI, at least one character with no - leading or trailing whitespace. - - - - - - - A type 4 ('random' or 'pseudorandom') or type 5 UUID per RFC - 4122. - - - - - A sequence of 8-4-4-4-12 hex digits, with extra - constraints in the 13th and 17-18th places for version 4 and 5 - - - - - - diff --git a/test-suite/schema-generation/datatypes/target/datatypes-datetime-no-tz_metaschema-jsonschema.json b/test-suite/schema-generation/datatypes/target/datatypes-datetime-no-tz_metaschema-jsonschema.json deleted file mode 100644 index a8de72263..000000000 --- a/test-suite/schema-generation/datatypes/target/datatypes-datetime-no-tz_metaschema-jsonschema.json +++ /dev/null @@ -1,60 +0,0 @@ - - { "$schema" : "http://json-schema.org/draft-07/schema#", - "$id" : "http://csrc.nist.gov/ns/metaschema/unit-test/datatypes-dateTime/1.0-milestone1/metaschema-datatypes-dateTime-schema.json", - "$comment" : "Metaschema Unit Test: datatypes-dateTime: JSON Schema", - "type" : "object", - "definitions" : - { "metaschema-datatypes-dateTime-metaschema-datatypes-dateTime:parent" : - { "title" : "parent", - "description" : "parent assembly", - "$id" : "#assembly_metaschema-datatypes-dateTime_parent", - "type" : "object", - "properties" : - { "flag-datetime-notz" : - { "title" : "Date and Time Flag", - "description" : "datetime flag", - "type" : "string" }, - "field-datetimes-notz" : - { "anyOf" : - [ - { "$ref" : "#field_metaschema-datatypes-dateTime_field-datetime-notz" }, - - { "type" : "array", - "minItems" : 1, - "items" : - { "$ref" : "#field_metaschema-datatypes-dateTime_field-datetime-notz" } } ] }, - "children" : - { "anyOf" : - [ - { "$ref" : "#assembly_metaschema-datatypes-dateTime_child" }, - - { "type" : "array", - "minItems" : 1, - "items" : - { "$ref" : "#assembly_metaschema-datatypes-dateTime_child" } } ] } }, - "required" : - [ "flag-datetime-notz" ], - "additionalProperties" : false }, - "metaschema-datatypes-dateTime-metaschema-datatypes-dateTime:child" : - { "title" : "child", - "description" : "child assembly", - "$id" : "#assembly_metaschema-datatypes-dateTime_child", - "type" : "object", - "properties" : - { "field-datetime-notz" : - { "$ref" : "#field_metaschema-datatypes-dateTime_field-datetime-notz" } }, - "required" : - [ "field-datetime-notz" ], - "additionalProperties" : false }, - "metaschema-datatypes-dateTime-metaschema-datatypes-dateTime:field-datetime-notz" : - { "title" : "Date and Time", - "description" : "No time zone", - "$id" : "#field_metaschema-datatypes-dateTime_field-datetime-notz", - "type" : "string" } }, - "properties" : - { "parent" : - { "$ref" : "#assembly_metaschema-datatypes-dateTime_parent" } }, - "required" : - [ "parent" ], - "additionalProperties" : false, - "maxProperties" : 1 } \ No newline at end of file diff --git a/test-suite/schema-generation/datatypes/target/datatypes-datetime-no-tz_metaschema-xmlschema.xsd b/test-suite/schema-generation/datatypes/target/datatypes-datetime-no-tz_metaschema-xmlschema.xsd deleted file mode 100644 index 1ee7793a0..000000000 --- a/test-suite/schema-generation/datatypes/target/datatypes-datetime-no-tz_metaschema-xmlschema.xsd +++ /dev/null @@ -1,236 +0,0 @@ - - - - - Metaschema Unit Test: datatypes-dateTime - 1.0-milestone1 - metaschema-datatypes-dateTime - parent - - - - - - - parent - parent assembly - - - parent: parent assembly - - - - - - - - - Date and Time Flag - datetime flag - - - Date and Time Flag: datetime flag - - - - - - - child - child assembly - - - child: child assembly - - - - - - - - - Date and Time - No time zone - - - Date and Time: No time zone - - - - - - OSCAL reference for native type - - - - - - A string, but not empty and not whitespace-only (whitespace is U+9, U+10, U+32 or [ \n\t]+ ) - - - - - - - - A trimmed string, at least one character with no - leading or trailing whitespace. - - - - - - - - - - - - The xs:date with a required timezone. - - - - - - - - - - - - - The xs:dateTime with a required timezone. - - - - - - - - An email address - - - - - Need a better pattern. - - - - - - - A host name - - - - - - The ip-v4-address type specifies an IPv4 address in - dot decimal notation. - - - - - - - - The ip-v6-address type specifies an IPv6 address - represented in 8 hextets separated by colons. - This is based on the pattern provided here: - https://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses - with some customizations. - - - - - - - - - - - A trimmed string, at least one character with no - leading or trailing whitespace. - - - - - - - A string, but not empty and not whitespace-only - (whitespace is U+9, U+10, U+32 or [ \n\t]+ ) - - - - The OSCAL 'string' datatype restricts the XSD type by prohibiting leading - and trailing whitespace, and something (not only whitespace) is required. - - - - - A trimmed string, at least one character with no - leading or trailing whitespace. - - - - - - - A URI - - - - - Requires a scheme with colon per RFC 3986. - - - - - - - A URI reference, such as a relative URL - - - - - - A trimmed URI, at least one character with no - leading or trailing whitespace. - - - - - - - A type 4 ('random' or 'pseudorandom') or type 5 UUID per RFC - 4122. - - - - - A sequence of 8-4-4-4-12 hex digits, with extra - constraints in the 13th and 17-18th places for version 4 and 5 - - - - - - diff --git a/test-suite/schema-generation/datatypes/target/datatypes-datetime_metaschema-jsonschema.json b/test-suite/schema-generation/datatypes/target/datatypes-datetime_metaschema-jsonschema.json deleted file mode 100644 index 17df7097b..000000000 --- a/test-suite/schema-generation/datatypes/target/datatypes-datetime_metaschema-jsonschema.json +++ /dev/null @@ -1,60 +0,0 @@ - - { "$schema" : "http://json-schema.org/draft-07/schema#", - "$id" : "http://csrc.nist.gov/ns/metaschema/unit-test/datatypes-dateTime/1.0-milestone1/metaschema-datatypes-dateTime-schema.json", - "$comment" : "Metaschema Unit Test: datatypes-dateTime: JSON Schema", - "type" : "object", - "definitions" : - { "metaschema-datatypes-dateTime-metaschema-datatypes-dateTime:parent" : - { "title" : "parent", - "description" : "parent assembly", - "$id" : "#assembly_metaschema-datatypes-dateTime_parent", - "type" : "object", - "properties" : - { "flag-datetime" : - { "title" : "Date and Time Flag", - "description" : "datetime flag", - "type" : "string" }, - "field-datetimes" : - { "anyOf" : - [ - { "$ref" : "#field_metaschema-datatypes-dateTime_field-datetime" }, - - { "type" : "array", - "minItems" : 1, - "items" : - { "$ref" : "#field_metaschema-datatypes-dateTime_field-datetime" } } ] }, - "children" : - { "anyOf" : - [ - { "$ref" : "#assembly_metaschema-datatypes-dateTime_child" }, - - { "type" : "array", - "minItems" : 1, - "items" : - { "$ref" : "#assembly_metaschema-datatypes-dateTime_child" } } ] } }, - "required" : - [ "flag-datetime" ], - "additionalProperties" : false }, - "metaschema-datatypes-dateTime-metaschema-datatypes-dateTime:child" : - { "title" : "child", - "description" : "child assembly", - "$id" : "#assembly_metaschema-datatypes-dateTime_child", - "type" : "object", - "properties" : - { "field-datetime" : - { "$ref" : "#field_metaschema-datatypes-dateTime_field-datetime" } }, - "required" : - [ "field-datetime" ], - "additionalProperties" : false }, - "metaschema-datatypes-dateTime-metaschema-datatypes-dateTime:field-datetime" : - { "title" : "Date and Time", - "description" : "With time zone", - "$id" : "#field_metaschema-datatypes-dateTime_field-datetime", - "type" : "string" } }, - "properties" : - { "parent" : - { "$ref" : "#assembly_metaschema-datatypes-dateTime_parent" } }, - "required" : - [ "parent" ], - "additionalProperties" : false, - "maxProperties" : 1 } \ No newline at end of file diff --git a/test-suite/schema-generation/datatypes/target/datatypes-datetime_metaschema-xmlschema.xsd b/test-suite/schema-generation/datatypes/target/datatypes-datetime_metaschema-xmlschema.xsd deleted file mode 100644 index e62e33834..000000000 --- a/test-suite/schema-generation/datatypes/target/datatypes-datetime_metaschema-xmlschema.xsd +++ /dev/null @@ -1,230 +0,0 @@ - - - - - Metaschema Unit Test: datatypes-dateTime - 1.0-milestone1 - metaschema-datatypes-dateTime - parent - - - - - - - parent - parent assembly - - - parent: parent assembly - - - - - - - - - Date and Time Flag - datetime flag - - - Date and Time Flag: datetime flag - - - - - - - child - child assembly - - - child: child assembly - - - - - - - - - Date and Time - With time zone - - - Date and Time: With time zone - - - - - - A string, but not empty and not whitespace-only (whitespace is U+9, U+10, U+32 or [ \n\t]+ ) - - - - - - - - A trimmed string, at least one character with no - leading or trailing whitespace. - - - - - - - - - - - - The xs:date with a required timezone. - - - - - - - - - - - - - The xs:dateTime with a required timezone. - - - - - - - - An email address - - - - - Need a better pattern. - - - - - - - A host name - - - - - - The ip-v4-address type specifies an IPv4 address in - dot decimal notation. - - - - - - - - The ip-v6-address type specifies an IPv6 address - represented in 8 hextets separated by colons. - This is based on the pattern provided here: - https://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses - with some customizations. - - - - - - - - - - - A trimmed string, at least one character with no - leading or trailing whitespace. - - - - - - - A string, but not empty and not whitespace-only - (whitespace is U+9, U+10, U+32 or [ \n\t]+ ) - - - - The OSCAL 'string' datatype restricts the XSD type by prohibiting leading - and trailing whitespace, and something (not only whitespace) is required. - - - - - A trimmed string, at least one character with no - leading or trailing whitespace. - - - - - - - A URI - - - - - Requires a scheme with colon per RFC 3986. - - - - - - - A URI reference, such as a relative URL - - - - - - A trimmed URI, at least one character with no - leading or trailing whitespace. - - - - - - - A type 4 ('random' or 'pseudorandom') or type 5 UUID per RFC - 4122. - - - - - A sequence of 8-4-4-4-12 hex digits, with extra - constraints in the 13th and 17-18th places for version 4 and 5 - - - - - - diff --git a/test-suite/schema-generation/datatypes/target/datatypes-numeric_metaschema-jsonschema.json b/test-suite/schema-generation/datatypes/target/datatypes-numeric_metaschema-jsonschema.json deleted file mode 100644 index 8bf0de456..000000000 --- a/test-suite/schema-generation/datatypes/target/datatypes-numeric_metaschema-jsonschema.json +++ /dev/null @@ -1,45 +0,0 @@ - - { "$schema" : "http://json-schema.org/draft-07/schema#", - "$id" : "http://csrc.nist.gov/ns/metaschema/unit-test/datatypes-uri/1.0-milestone1/metaschema-datatypes-uri-schema.json", - "$comment" : "Metaschema Unit Test: URIs: JSON Schema", - "type" : "object", - "definitions" : - { "metaschema-datatypes-uri-metaschema-datatypes-uri:numSet" : - { "title" : "Number set", - "description" : "Block of four different numbers", - "$id" : "#assembly_metaschema-datatypes-uri_numSet", - "type" : "object", - "properties" : - { "int" : - { "title" : "Integer", - "description" : "Per W3C", - "type" : "integer" }, - "posInt" : - { "title" : "Positive Integer", - "description" : "1 or more", - "type" : "integer", - "multipleOf" : 1, - "minimum" : 1 }, - "nonNegInt" : - { "title" : "Non-negative Integer", - "description" : "zero or more", - "type" : "integer", - "multipleOf" : 1, - "minimum" : 0 }, - "decimal" : - { "title" : "Decimal", - "description" : "Floating point", - "type" : "number" } }, - "required" : - [ "int", - "posInt", - "nonNegInt", - "decimal" ], - "additionalProperties" : false } }, - "properties" : - { "numSet" : - { "$ref" : "#assembly_metaschema-datatypes-uri_numSet" } }, - "required" : - [ "numSet" ], - "additionalProperties" : false, - "maxProperties" : 1 } \ No newline at end of file diff --git a/test-suite/schema-generation/datatypes/target/datatypes-numeric_metaschema-xmlschema.xsd b/test-suite/schema-generation/datatypes/target/datatypes-numeric_metaschema-xmlschema.xsd deleted file mode 100644 index e5ecad4d1..000000000 --- a/test-suite/schema-generation/datatypes/target/datatypes-numeric_metaschema-xmlschema.xsd +++ /dev/null @@ -1,235 +0,0 @@ - - - - - Metaschema Unit Test: URIs - 1.0-milestone1 - metaschema-datatypes-uri - numSet - - - - - - - Number set - Block of four different numbers - - - Number set: Block of four different numbers - - - - - - - Integer - Per W3C - - - Integer: Per W3C - - - - - - - - - Positive Integer - 1 or more - - - Positive Integer: 1 or more - - - - - - - - - Non-negative Integer - zero or more - - - Non-negative Integer: zero or more - - - - - - - - - Decimal - Floating point - - - Decimal: Floating point - - - - - - - - - A string, but not empty and not whitespace-only (whitespace is U+9, U+10, U+32 or [ \n\t]+ ) - - - - - - - - A trimmed string, at least one character with no - leading or trailing whitespace. - - - - - - - - - - - - The xs:date with a required timezone. - - - - - - - - - - - - - The xs:dateTime with a required timezone. - - - - - - - - An email address - - - - - Need a better pattern. - - - - - - - A host name - - - - - - The ip-v4-address type specifies an IPv4 address in - dot decimal notation. - - - - - - - - The ip-v6-address type specifies an IPv6 address - represented in 8 hextets separated by colons. - This is based on the pattern provided here: - https://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses - with some customizations. - - - - - - - - - - - A trimmed string, at least one character with no - leading or trailing whitespace. - - - - - - - A string, but not empty and not whitespace-only - (whitespace is U+9, U+10, U+32 or [ \n\t]+ ) - - - - The OSCAL 'string' datatype restricts the XSD type by prohibiting leading - and trailing whitespace, and something (not only whitespace) is required. - - - - - A trimmed string, at least one character with no - leading or trailing whitespace. - - - - - - - A URI - - - - - Requires a scheme with colon per RFC 3986. - - - - - - - A URI reference, such as a relative URL - - - - - - A trimmed URI, at least one character with no - leading or trailing whitespace. - - - - - - - A type 4 ('random' or 'pseudorandom') or type 5 UUID per RFC - 4122. - - - - - A sequence of 8-4-4-4-12 hex digits, with extra - constraints in the 13th and 17-18th places for version 4 and 5 - - - - - - diff --git a/test-suite/schema-generation/datatypes/target/datatypes-prose_metaschema-jsonschema.json b/test-suite/schema-generation/datatypes/target/datatypes-prose_metaschema-jsonschema.json deleted file mode 100644 index 7d433ffa3..000000000 --- a/test-suite/schema-generation/datatypes/target/datatypes-prose_metaschema-jsonschema.json +++ /dev/null @@ -1,101 +0,0 @@ - - { "$schema" : "http://json-schema.org/draft-07/schema#", - "$id" : "http://csrc.nist.gov/ns/metaschema/unit-test/datatypes/1.0-milestone1/metaschema-datatypes-schema.json", - "$comment" : "Metaschema Unit Test: datatypes: JSON Schema", - "type" : "object", - "definitions" : - { "metaschema-datatypes-metaschema-datatypes:parent" : - { "title" : "parent", - "description" : "parent assembly", - "$id" : "#assembly_metaschema-datatypes_parent", - "type" : "object", - "properties" : - { "field-date" : - { "$ref" : "#field_metaschema-datatypes_field-date" }, - "field-plaintext" : - { "$ref" : "#field_metaschema-datatypes_field-plaintext" }, - "field-flag-plaintext" : - { "$ref" : "#field_metaschema-datatypes_field-flag-plaintext" }, - "field-richtext" : - { "$ref" : "#field_metaschema-datatypes_field-richtext" }, - "field-flag-richtext" : - { "$ref" : "#field_metaschema-datatypes_field-flag-richtext" }, - "field-prose" : - { "$ref" : "#field_metaschema-datatypes_field-prose" }, - "field-flag-prose" : - { "$ref" : "#field_metaschema-datatypes_field-flag-prose" } }, - "additionalProperties" : false }, - "metaschema-datatypes-metaschema-datatypes:field-date" : - { "title" : "Date", - "description" : "With time zone", - "$id" : "#field_metaschema-datatypes_field-date", - "type" : "string", - "pattern" : "^((2000|2400|2800|(19|2[0-9](0[48]|[2468][048]|[13579][26])))-02-29)|(((19|2[0-9])[0-9]{2})-02-(0[1-9]|1[0-9]|2[0-8]))|(((19|2[0-9])[0-9]{2})-(0[13578]|10|12)-(0[1-9]|[12][0-9]|3[01]))|(((19|2[0-9])[0-9]{2})-(0[469]|11)-(0[1-9]|[12][0-9]|30))(Z|[+-][0-9]{2}:[0-9]{2})$" }, - "metaschema-datatypes-metaschema-datatypes:field-plaintext" : - { "title" : "Plain text", - "description" : "plain text, no markup", - "$id" : "#field_metaschema-datatypes_field-plaintext", - "type" : "string", - "pattern" : "^\\S(.*\\S)?$" }, - "metaschema-datatypes-metaschema-datatypes:field-flag-plaintext" : - { "title" : "Plain text", - "description" : "plain text, no markup", - "$id" : "#field_metaschema-datatypes_field-flag-plaintext", - "type" : "object", - "properties" : - { "length" : - { "title" : "Length", - "description" : "The length.", - "type" : "string" }, - "STRVALUE" : - { "type" : "string" } }, - "required" : - [ "STRVALUE" ], - "additionalProperties" : false }, - "metaschema-datatypes-metaschema-datatypes:field-richtext" : - { "title" : "Rich text", - "description" : "Rich text supports markup", - "$id" : "#field_metaschema-datatypes_field-richtext", - "type" : "string" }, - "metaschema-datatypes-metaschema-datatypes:field-flag-richtext" : - { "title" : "Rich text", - "description" : "Rich text supports markup", - "$id" : "#field_metaschema-datatypes_field-flag-richtext", - "type" : "object", - "properties" : - { "length" : - { "title" : "Length", - "description" : "The length.", - "type" : "string" }, - "RICHTEXT" : - { "type" : "string" } }, - "required" : - [ "RICHTEXT" ], - "additionalProperties" : false }, - "metaschema-datatypes-metaschema-datatypes:field-prose" : - { "title" : "Prose", - "description" : "Prose permits multiple paragraphs, lists, tables etc.", - "$id" : "#field_metaschema-datatypes_field-prose", - "type" : "string" }, - "metaschema-datatypes-metaschema-datatypes:field-flag-prose" : - { "title" : "Prose", - "description" : "Prose permits multiple paragraphs, lists, tables etc.", - "$id" : "#field_metaschema-datatypes_field-flag-prose", - "type" : "object", - "properties" : - { "length" : - { "title" : "Length", - "description" : "The length.", - "type" : "string" }, - "PROSE" : - { "type" : "string" } }, - "required" : - [ "PROSE" ], - "additionalProperties" : false } }, - "properties" : - { "parent" : - { "$ref" : "#assembly_metaschema-datatypes_parent" } }, - "required" : - [ "parent" ], - "additionalProperties" : false, - "maxProperties" : 1 } \ No newline at end of file diff --git a/test-suite/schema-generation/datatypes/target/datatypes-prose_metaschema-xmlschema.xsd b/test-suite/schema-generation/datatypes/target/datatypes-prose_metaschema-xmlschema.xsd deleted file mode 100644 index 7d433ffa3..000000000 --- a/test-suite/schema-generation/datatypes/target/datatypes-prose_metaschema-xmlschema.xsd +++ /dev/null @@ -1,101 +0,0 @@ - - { "$schema" : "http://json-schema.org/draft-07/schema#", - "$id" : "http://csrc.nist.gov/ns/metaschema/unit-test/datatypes/1.0-milestone1/metaschema-datatypes-schema.json", - "$comment" : "Metaschema Unit Test: datatypes: JSON Schema", - "type" : "object", - "definitions" : - { "metaschema-datatypes-metaschema-datatypes:parent" : - { "title" : "parent", - "description" : "parent assembly", - "$id" : "#assembly_metaschema-datatypes_parent", - "type" : "object", - "properties" : - { "field-date" : - { "$ref" : "#field_metaschema-datatypes_field-date" }, - "field-plaintext" : - { "$ref" : "#field_metaschema-datatypes_field-plaintext" }, - "field-flag-plaintext" : - { "$ref" : "#field_metaschema-datatypes_field-flag-plaintext" }, - "field-richtext" : - { "$ref" : "#field_metaschema-datatypes_field-richtext" }, - "field-flag-richtext" : - { "$ref" : "#field_metaschema-datatypes_field-flag-richtext" }, - "field-prose" : - { "$ref" : "#field_metaschema-datatypes_field-prose" }, - "field-flag-prose" : - { "$ref" : "#field_metaschema-datatypes_field-flag-prose" } }, - "additionalProperties" : false }, - "metaschema-datatypes-metaschema-datatypes:field-date" : - { "title" : "Date", - "description" : "With time zone", - "$id" : "#field_metaschema-datatypes_field-date", - "type" : "string", - "pattern" : "^((2000|2400|2800|(19|2[0-9](0[48]|[2468][048]|[13579][26])))-02-29)|(((19|2[0-9])[0-9]{2})-02-(0[1-9]|1[0-9]|2[0-8]))|(((19|2[0-9])[0-9]{2})-(0[13578]|10|12)-(0[1-9]|[12][0-9]|3[01]))|(((19|2[0-9])[0-9]{2})-(0[469]|11)-(0[1-9]|[12][0-9]|30))(Z|[+-][0-9]{2}:[0-9]{2})$" }, - "metaschema-datatypes-metaschema-datatypes:field-plaintext" : - { "title" : "Plain text", - "description" : "plain text, no markup", - "$id" : "#field_metaschema-datatypes_field-plaintext", - "type" : "string", - "pattern" : "^\\S(.*\\S)?$" }, - "metaschema-datatypes-metaschema-datatypes:field-flag-plaintext" : - { "title" : "Plain text", - "description" : "plain text, no markup", - "$id" : "#field_metaschema-datatypes_field-flag-plaintext", - "type" : "object", - "properties" : - { "length" : - { "title" : "Length", - "description" : "The length.", - "type" : "string" }, - "STRVALUE" : - { "type" : "string" } }, - "required" : - [ "STRVALUE" ], - "additionalProperties" : false }, - "metaschema-datatypes-metaschema-datatypes:field-richtext" : - { "title" : "Rich text", - "description" : "Rich text supports markup", - "$id" : "#field_metaschema-datatypes_field-richtext", - "type" : "string" }, - "metaschema-datatypes-metaschema-datatypes:field-flag-richtext" : - { "title" : "Rich text", - "description" : "Rich text supports markup", - "$id" : "#field_metaschema-datatypes_field-flag-richtext", - "type" : "object", - "properties" : - { "length" : - { "title" : "Length", - "description" : "The length.", - "type" : "string" }, - "RICHTEXT" : - { "type" : "string" } }, - "required" : - [ "RICHTEXT" ], - "additionalProperties" : false }, - "metaschema-datatypes-metaschema-datatypes:field-prose" : - { "title" : "Prose", - "description" : "Prose permits multiple paragraphs, lists, tables etc.", - "$id" : "#field_metaschema-datatypes_field-prose", - "type" : "string" }, - "metaschema-datatypes-metaschema-datatypes:field-flag-prose" : - { "title" : "Prose", - "description" : "Prose permits multiple paragraphs, lists, tables etc.", - "$id" : "#field_metaschema-datatypes_field-flag-prose", - "type" : "object", - "properties" : - { "length" : - { "title" : "Length", - "description" : "The length.", - "type" : "string" }, - "PROSE" : - { "type" : "string" } }, - "required" : - [ "PROSE" ], - "additionalProperties" : false } }, - "properties" : - { "parent" : - { "$ref" : "#assembly_metaschema-datatypes_parent" } }, - "required" : - [ "parent" ], - "additionalProperties" : false, - "maxProperties" : 1 } \ No newline at end of file diff --git a/test-suite/schema-generation/datatypes/target/datatypes-token_metaschema-jsonschema.json b/test-suite/schema-generation/datatypes/target/datatypes-token_metaschema-jsonschema.json deleted file mode 100644 index 0e0f1c3ee..000000000 --- a/test-suite/schema-generation/datatypes/target/datatypes-token_metaschema-jsonschema.json +++ /dev/null @@ -1,30 +0,0 @@ - - { "$schema" : "http://json-schema.org/draft-07/schema#", - "$id" : "http://csrc.nist.gov/ns/metaschema/unit-test/datatypes-uri/1.0-milestone1/metaschema-datatypes-uri-schema.json", - "$comment" : "Metaschema Unit Test: URIs: JSON Schema", - "type" : "object", - "definitions" : - { "metaschema-datatypes-uri-metaschema-datatypes-uri:parent" : - { "title" : "parent", - "description" : "parent assembly", - "$id" : "#assembly_metaschema-datatypes-uri_parent", - "type" : "object", - "properties" : - { "token-flag" : - { "type" : "array", - "minItems" : 1, - "items" : - { "title" : "Universal Resource Identifier Flag", - "description" : "Per W3C", - "type" : "string", - "pattern" : "^(\\p{L}|_)(\\p{L}|\\p{N}|[.\\-_])*$" } } }, - "required" : - [ "token-flag" ], - "additionalProperties" : false } }, - "properties" : - { "parent" : - { "$ref" : "#assembly_metaschema-datatypes-uri_parent" } }, - "required" : - [ "parent" ], - "additionalProperties" : false, - "maxProperties" : 1 } \ No newline at end of file diff --git a/test-suite/schema-generation/datatypes/target/datatypes-token_metaschema-xmlschema.xsd b/test-suite/schema-generation/datatypes/target/datatypes-token_metaschema-xmlschema.xsd deleted file mode 100644 index 7279e6798..000000000 --- a/test-suite/schema-generation/datatypes/target/datatypes-token_metaschema-xmlschema.xsd +++ /dev/null @@ -1,203 +0,0 @@ - - - - - Metaschema Unit Test: URIs - 1.0-milestone1 - metaschema-datatypes-uri - parent - - - - - - - parent - parent assembly - - - parent: parent assembly - - - - - - - Universal Resource Identifier Flag - Per W3C - - - Universal Resource Identifier Flag: Per W3C - - - - - - - - - A string, but not empty and not whitespace-only (whitespace is U+9, U+10, U+32 or [ \n\t]+ ) - - - - - - A string token following the rules of XML "no colon" names, with no whitespace. (XML names are single alphabetic characters - followed by alphanumeric characters, periods, underscores or dashes.) - - - - - - - - A trimmed string, at least one character with no - leading or trailing whitespace. - - - - - - - - - - - - The xs:date with a required timezone. - - - - - - - - - - - - - The xs:dateTime with a required timezone. - - - - - - - - An email address - - - - - Need a better pattern. - - - - - - - A host name - - - - - - The ip-v4-address type specifies an IPv4 address in - dot decimal notation. - - - - - - - - The ip-v6-address type specifies an IPv6 address - represented in 8 hextets separated by colons. - This is based on the pattern provided here: - https://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses - with some customizations. - - - - - - - - - - - A trimmed string, at least one character with no - leading or trailing whitespace. - - - - - - - A string, but not empty and not whitespace-only - (whitespace is U+9, U+10, U+32 or [ \n\t]+ ) - - - - The OSCAL 'string' datatype restricts the XSD type by prohibiting leading - and trailing whitespace, and something (not only whitespace) is required. - - - - - A trimmed string, at least one character with no - leading or trailing whitespace. - - - - - - - A URI - - - - - Requires a scheme with colon per RFC 3986. - - - - - - - A URI reference, such as a relative URL - - - - - - A trimmed URI, at least one character with no - leading or trailing whitespace. - - - - - - - A type 4 ('random' or 'pseudorandom') or type 5 UUID per RFC - 4122. - - - - - A sequence of 8-4-4-4-12 hex digits, with extra - constraints in the 13th and 17-18th places for version 4 and 5 - - - - - - diff --git a/test-suite/schema-generation/datatypes/target/datatypes-uri_metaschema-jsonschema.json b/test-suite/schema-generation/datatypes/target/datatypes-uri_metaschema-jsonschema.json deleted file mode 100644 index 92f8d376b..000000000 --- a/test-suite/schema-generation/datatypes/target/datatypes-uri_metaschema-jsonschema.json +++ /dev/null @@ -1,65 +0,0 @@ - - { "$schema" : "http://json-schema.org/draft-07/schema#", - "$id" : "http://csrc.nist.gov/ns/metaschema/unit-test/datatypes-uri/1.0-milestone1/metaschema-datatypes-uri-schema.json", - "$comment" : "Metaschema Unit Test: URIs: JSON Schema", - "type" : "object", - "definitions" : - { "metaschema-datatypes-uri-metaschema-datatypes-uri:parent" : - { "title" : "parent", - "description" : "parent assembly", - "$id" : "#assembly_metaschema-datatypes-uri_parent", - "type" : "object", - "properties" : - { "uri-flag" : - { "title" : "Universal Resource Identifier Flag", - "description" : "Per W3C", - "type" : "string", - "format" : "uri", - "pattern" : "^[a-zA-Z][a-zA-Z0-9+\\-.]+:.+$" }, - "uri-reference-flag" : - { "title" : "Universal Resource Identifier Reference Flag", - "description" : "Per W3C, can be a relative URI", - "type" : "string", - "format" : "uri-reference" }, - "uri-fields" : - { "anyOf" : - [ - { "$ref" : "#field_metaschema-datatypes-uri_uri-field" }, - - { "type" : "array", - "minItems" : 1, - "items" : - { "$ref" : "#field_metaschema-datatypes-uri_uri-field" } } ] }, - "uri-reference-fields" : - { "anyOf" : - [ - { "$ref" : "#field_metaschema-datatypes-uri_uri-reference-field" }, - - { "type" : "array", - "minItems" : 1, - "items" : - { "$ref" : "#field_metaschema-datatypes-uri_uri-reference-field" } } ] } }, - "required" : - [ "uri-flag", - "uri-reference-flag" ], - "additionalProperties" : false }, - "metaschema-datatypes-uri-metaschema-datatypes-uri:uri-field" : - { "title" : "Universal Resource Identifier Flag", - "description" : "Per W3C", - "$id" : "#field_metaschema-datatypes-uri_uri-field", - "type" : "string", - "format" : "uri", - "pattern" : "^[a-zA-Z][a-zA-Z0-9+\\-.]+:.+$" }, - "metaschema-datatypes-uri-metaschema-datatypes-uri:uri-reference-field" : - { "title" : "Universal Resource Identifier Flag", - "description" : "Per W3C", - "$id" : "#field_metaschema-datatypes-uri_uri-reference-field", - "type" : "string", - "format" : "uri-reference" } }, - "properties" : - { "parent" : - { "$ref" : "#assembly_metaschema-datatypes-uri_parent" } }, - "required" : - [ "parent" ], - "additionalProperties" : false, - "maxProperties" : 1 } \ No newline at end of file diff --git a/test-suite/schema-generation/datatypes/target/datatypes-uri_metaschema-xmlschema.xsd b/test-suite/schema-generation/datatypes/target/datatypes-uri_metaschema-xmlschema.xsd deleted file mode 100644 index 0af6df4e8..000000000 --- a/test-suite/schema-generation/datatypes/target/datatypes-uri_metaschema-xmlschema.xsd +++ /dev/null @@ -1,247 +0,0 @@ - - - - - Metaschema Unit Test: URIs - 1.0-milestone1 - metaschema-datatypes-uri - parent - - - - - - - parent - parent assembly - - - parent: parent assembly - - - - - - - - - Universal Resource Identifier Flag - Per W3C - - - Universal Resource Identifier Flag: Per W3C - - - - - - Universal Resource Identifier Reference Flag - Per W3C, can be a relative URI - - - Universal Resource Identifier Reference Flag: Per W3C, can be a relative URI - - - - - - - Universal Resource Identifier Flag - Per W3C - - - Universal Resource Identifier Flag: Per W3C - - - - - - - Universal Resource Identifier Flag - Per W3C - - - Universal Resource Identifier Flag: Per W3C - - - - - - A string, but not empty and not whitespace-only (whitespace is U+9, U+10, U+32 or [ \n\t]+ ) - - - - - - A URI - - - - - - A URI reference, such as a relative URL - - - - - - - - A trimmed string, at least one character with no - leading or trailing whitespace. - - - - - - - - - - - - The xs:date with a required timezone. - - - - - - - - - - - - - The xs:dateTime with a required timezone. - - - - - - - - An email address - - - - - Need a better pattern. - - - - - - - A host name - - - - - - The ip-v4-address type specifies an IPv4 address in - dot decimal notation. - - - - - - - - The ip-v6-address type specifies an IPv6 address - represented in 8 hextets separated by colons. - This is based on the pattern provided here: - https://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses - with some customizations. - - - - - - - - - - - A trimmed string, at least one character with no - leading or trailing whitespace. - - - - - - - A string, but not empty and not whitespace-only - (whitespace is U+9, U+10, U+32 or [ \n\t]+ ) - - - - The OSCAL 'string' datatype restricts the XSD type by prohibiting leading - and trailing whitespace, and something (not only whitespace) is required. - - - - - A trimmed string, at least one character with no - leading or trailing whitespace. - - - - - - - A URI - - - - - Requires a scheme with colon per RFC 3986. - - - - - - - A URI reference, such as a relative URL - - - - - - A trimmed URI, at least one character with no - leading or trailing whitespace. - - - - - - - A type 4 ('random' or 'pseudorandom') or type 5 UUID per RFC - 4122. - - - - - A sequence of 8-4-4-4-12 hex digits, with extra - constraints in the 13th and 17-18th places for version 4 and 5 - - - - - - diff --git a/test-suite/schema-generation/datatypes/target/datatypes-uuid_metaschema-jsonschema.json b/test-suite/schema-generation/datatypes/target/datatypes-uuid_metaschema-jsonschema.json deleted file mode 100644 index c1b655e6f..000000000 --- a/test-suite/schema-generation/datatypes/target/datatypes-uuid_metaschema-jsonschema.json +++ /dev/null @@ -1,42 +0,0 @@ - - { "$schema" : "http://json-schema.org/draft-07/schema#", - "$id" : "http://csrc.nist.gov/ns/metaschema/unit-test/datatypes-uri/1.0-milestone2/metaschema-datatypes-uuid-schema.json", - "$comment" : "Metaschema Unit Test: UUID Datatype: JSON Schema", - "type" : "object", - "definitions" : - { "metaschema-datatypes-uuid-metaschema-datatypes-uuid:parent" : - { "title" : "parent", - "description" : "parent assembly", - "$id" : "#assembly_metaschema-datatypes-uuid_parent", - "type" : "object", - "properties" : - { "uuid-flag" : - { "title" : "Universally Unique Identifier Flag", - "description" : "A version 4 UUID per RFC 4122.", - "type" : "string", - "pattern" : "^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[45][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" }, - "uuid-fields" : - { "anyOf" : - [ - { "$ref" : "#field_metaschema-datatypes-uuid_uuid-field" }, - - { "type" : "array", - "minItems" : 1, - "items" : - { "$ref" : "#field_metaschema-datatypes-uuid_uuid-field" } } ] } }, - "required" : - [ "uuid-flag" ], - "additionalProperties" : false }, - "metaschema-datatypes-uuid-metaschema-datatypes-uuid:uuid-field" : - { "title" : "Universally Unique Identifier Field", - "description" : "A version 4 UUID per RFC 4122.", - "$id" : "#field_metaschema-datatypes-uuid_uuid-field", - "type" : "string", - "pattern" : "^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[45][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$" } }, - "properties" : - { "parent" : - { "$ref" : "#assembly_metaschema-datatypes-uuid_parent" } }, - "required" : - [ "parent" ], - "additionalProperties" : false, - "maxProperties" : 1 } \ No newline at end of file diff --git a/test-suite/schema-generation/datatypes/target/datatypes-uuid_metaschema-xmlschema.xsd b/test-suite/schema-generation/datatypes/target/datatypes-uuid_metaschema-xmlschema.xsd deleted file mode 100644 index 702e7307f..000000000 --- a/test-suite/schema-generation/datatypes/target/datatypes-uuid_metaschema-xmlschema.xsd +++ /dev/null @@ -1,216 +0,0 @@ - - - - - Metaschema Unit Test: UUID Datatype - 1.0-milestone2 - metaschema-datatypes-uuid - parent - - - - - - - parent - parent assembly - - - parent: parent assembly - - - - - - - - Universally Unique Identifier Flag - A version 4 UUID per RFC 4122. - - - Universally Unique Identifier Flag: A version 4 UUID per RFC 4122. - - - - - - - Universally Unique Identifier Field - A version 4 UUID per RFC 4122. - - - Universally Unique Identifier Field: A version 4 UUID per RFC 4122. - - - - - - A string, but not empty and not whitespace-only (whitespace is U+9, U+10, U+32 or [ \n\t]+ ) - - - - - - A Type 4 ('random' or 'pseudorandom' UUID per RFC 4122 - - - - - - - - A trimmed string, at least one character with no - leading or trailing whitespace. - - - - - - - - - - - - The xs:date with a required timezone. - - - - - - - - - - - - - The xs:dateTime with a required timezone. - - - - - - - - An email address - - - - - Need a better pattern. - - - - - - - A host name - - - - - - The ip-v4-address type specifies an IPv4 address in - dot decimal notation. - - - - - - - - The ip-v6-address type specifies an IPv6 address - represented in 8 hextets separated by colons. - This is based on the pattern provided here: - https://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses - with some customizations. - - - - - - - - - - - A trimmed string, at least one character with no - leading or trailing whitespace. - - - - - - - A string, but not empty and not whitespace-only - (whitespace is U+9, U+10, U+32 or [ \n\t]+ ) - - - - The OSCAL 'string' datatype restricts the XSD type by prohibiting leading - and trailing whitespace, and something (not only whitespace) is required. - - - - - A trimmed string, at least one character with no - leading or trailing whitespace. - - - - - - - A URI - - - - - Requires a scheme with colon per RFC 3986. - - - - - - - A URI reference, such as a relative URL - - - - - - A trimmed URI, at least one character with no - leading or trailing whitespace. - - - - - - - A type 4 ('random' or 'pseudorandom') or type 5 UUID per RFC - 4122. - - - - - A sequence of 8-4-4-4-12 hex digits, with extra - constraints in the 13th and 17-18th places for version 4 and 5 - - - - - - diff --git a/test-suite/schema-generation/datatypes/datatypes-date_metaschema.xml b/test-suite/schema-generation/dates-times/datatypes-date_metaschema.xml similarity index 100% rename from test-suite/schema-generation/datatypes/datatypes-date_metaschema.xml rename to test-suite/schema-generation/dates-times/datatypes-date_metaschema.xml diff --git a/test-suite/schema-generation/datatypes/datatypes-date_test_fancy_FAIL.xml b/test-suite/schema-generation/dates-times/datatypes-date_test_fancy_FAIL.xml similarity index 100% rename from test-suite/schema-generation/datatypes/datatypes-date_test_fancy_FAIL.xml rename to test-suite/schema-generation/dates-times/datatypes-date_test_fancy_FAIL.xml diff --git a/test-suite/schema-generation/datatypes/datatypes-date_test_tricky_FAIL.json b/test-suite/schema-generation/dates-times/datatypes-date_test_tricky_FAIL.json similarity index 100% rename from test-suite/schema-generation/datatypes/datatypes-date_test_tricky_FAIL.json rename to test-suite/schema-generation/dates-times/datatypes-date_test_tricky_FAIL.json diff --git a/test-suite/schema-generation/datatypes/datatypes-date_test_valid_PASS.json b/test-suite/schema-generation/dates-times/datatypes-date_test_valid_PASS.json similarity index 100% rename from test-suite/schema-generation/datatypes/datatypes-date_test_valid_PASS.json rename to test-suite/schema-generation/dates-times/datatypes-date_test_valid_PASS.json diff --git a/test-suite/schema-generation/datatypes/datatypes-date_test_valid_PASS.xml b/test-suite/schema-generation/dates-times/datatypes-date_test_valid_PASS.xml similarity index 100% rename from test-suite/schema-generation/datatypes/datatypes-date_test_valid_PASS.xml rename to test-suite/schema-generation/dates-times/datatypes-date_test_valid_PASS.xml diff --git a/test-suite/schema-generation/datatypes/datatypes-datetime-no-tz_json-schema.json b/test-suite/schema-generation/dates-times/datatypes-datetime-no-tz_json-schema.json similarity index 100% rename from test-suite/schema-generation/datatypes/datatypes-datetime-no-tz_json-schema.json rename to test-suite/schema-generation/dates-times/datatypes-datetime-no-tz_json-schema.json diff --git a/test-suite/schema-generation/datatypes/datatypes-datetime-no-tz_metaschema.xml b/test-suite/schema-generation/dates-times/datatypes-datetime-no-tz_metaschema.xml similarity index 100% rename from test-suite/schema-generation/datatypes/datatypes-datetime-no-tz_metaschema.xml rename to test-suite/schema-generation/dates-times/datatypes-datetime-no-tz_metaschema.xml diff --git a/test-suite/schema-generation/datatypes/datatypes-datetime-no-tz_test_valid_PASS.json b/test-suite/schema-generation/dates-times/datatypes-datetime-no-tz_test_valid_PASS.json similarity index 100% rename from test-suite/schema-generation/datatypes/datatypes-datetime-no-tz_test_valid_PASS.json rename to test-suite/schema-generation/dates-times/datatypes-datetime-no-tz_test_valid_PASS.json diff --git a/test-suite/schema-generation/dates-times/datatypes-datetime-notz_test_valid_PASS.xml b/test-suite/schema-generation/dates-times/datatypes-datetime-notz_test_valid_PASS.xml new file mode 100644 index 000000000..2feccf3fb --- /dev/null +++ b/test-suite/schema-generation/dates-times/datatypes-datetime-notz_test_valid_PASS.xml @@ -0,0 +1,13 @@ + + + 2022-08-29T16:01:39.9080374-04:00 + 2022-08-29T16:01:39.9080374 + 2022-08-29T16:01:50-04:00 + 2022-08-29T16:01:50 + 2022-08-29T16:01:50.01-04:00 + 2022-08-29T16:01:50.01 + + 2022-08-29T16:01:39.9080374 + + \ No newline at end of file diff --git a/test-suite/schema-generation/dates-times/datatypes-datetime-notz_test_various_FAIL.xml b/test-suite/schema-generation/dates-times/datatypes-datetime-notz_test_various_FAIL.xml new file mode 100644 index 000000000..71dc62236 --- /dev/null +++ b/test-suite/schema-generation/dates-times/datatypes-datetime-notz_test_various_FAIL.xml @@ -0,0 +1,10 @@ + + + 2022-08-29T16:01:50-4:00 + 2022-08-29T16:01:500-000 + 2022-08-29T16:01:50.010 + + 2022-08-29T16:01:39.90803740-04:00 + + \ No newline at end of file diff --git a/test-suite/schema-generation/datatypes/datatypes-datetime_metaschema.xml b/test-suite/schema-generation/dates-times/datatypes-datetime_metaschema.xml similarity index 100% rename from test-suite/schema-generation/datatypes/datatypes-datetime_metaschema.xml rename to test-suite/schema-generation/dates-times/datatypes-datetime_metaschema.xml diff --git a/test-suite/schema-generation/datatypes/datatypes-datetime_test_valid_PASS.json b/test-suite/schema-generation/dates-times/datatypes-datetime_test_valid_PASS.json similarity index 100% rename from test-suite/schema-generation/datatypes/datatypes-datetime_test_valid_PASS.json rename to test-suite/schema-generation/dates-times/datatypes-datetime_test_valid_PASS.json diff --git a/test-suite/schema-generation/dates-times/datatypes-datetime_test_valid_PASS.xml b/test-suite/schema-generation/dates-times/datatypes-datetime_test_valid_PASS.xml new file mode 100644 index 000000000..653b20b80 --- /dev/null +++ b/test-suite/schema-generation/dates-times/datatypes-datetime_test_valid_PASS.xml @@ -0,0 +1,10 @@ + + + 2022-08-29T16:01:39.9080374-04:00 + 2022-08-29T16:01:50-04:00 + 2022-08-29T16:01:50.01-04:00 + + 2022-08-29T16:01:39.9080374-04:00 + + \ No newline at end of file diff --git a/test-suite/schema-generation/dates-times/datatypes-datetime_test_various_FAIL.xml b/test-suite/schema-generation/dates-times/datatypes-datetime_test_various_FAIL.xml new file mode 100644 index 000000000..12d5fa7d8 --- /dev/null +++ b/test-suite/schema-generation/dates-times/datatypes-datetime_test_various_FAIL.xml @@ -0,0 +1,10 @@ + + + 2022-08-29T16:01:50-4:00 + 2022-08-29T16:01:500-04:00 + 2022-08-29T16:01:50.010-04:00 + + 2022-08-29T16:01:39.90803740-04:00 + + \ No newline at end of file diff --git a/test-suite/schema-generation/dates-times/datatypes-datetime_test_working_FAIL.xml b/test-suite/schema-generation/dates-times/datatypes-datetime_test_working_FAIL.xml new file mode 100644 index 000000000..170052696 --- /dev/null +++ b/test-suite/schema-generation/dates-times/datatypes-datetime_test_working_FAIL.xml @@ -0,0 +1,12 @@ + + + + 2022-07-29 + 2022-11-30 + 2022-11-30T21:29:17.01234567890000Z + 2022-11-30T21:29:17.01234567890000-04:00 + 2022-11-30T21:29:17.01234567890000-99:99 + 2022-06-15T21:29:17.84+12:46 + 2022-06-15T21:29:17.84+14:99 + \ No newline at end of file diff --git a/test-suite/schema-generation/dates-times/datatypes-datetime_test_working_PASS.xml b/test-suite/schema-generation/dates-times/datatypes-datetime_test_working_PASS.xml new file mode 100644 index 000000000..5d7e71553 --- /dev/null +++ b/test-suite/schema-generation/dates-times/datatypes-datetime_test_working_PASS.xml @@ -0,0 +1,21 @@ + + + + 2022-07-29T13:25:15Z + 2022-07-29T13:25:15.39Z + 2022-07-29T13:25:15-04:00 + 2022-07-29T13:25:15.59-04:00 + 2022-11-30T21:29:17Z + 2022-11-30T21:29:17.84Z + 2022-11-30T21:29:17-04:00 + 2022-11-30T21:29:17.84-04:00 + 2022-11-30T21:29:17.84-04:00 + 2022-06-15T21:29:17Z + 2022-06-15T21:29:17.84Z + 2022-06-15T21:29:17+04:00 + 2022-06-15T21:29:17.84+04:00 + 2022-06-15T21:29:17.84+12:45 + 2022-06-12T21:29:17.84-12:00 + 2022-06-15T21:29:17.84+14:00 + \ No newline at end of file diff --git a/test-suite/worked-examples/readme.md b/test-suite/worked-examples/readme.md new file mode 100644 index 000000000..9b3735498 --- /dev/null +++ b/test-suite/worked-examples/readme.md @@ -0,0 +1,19 @@ +# Worked Examples - Metaschema + +Current status: **some updates needed** + +Anthology example is working - shows 'plausible' use cases for a range of different metaschema modeling features. + +'Everything' metaschema has not been updated and needs refreshing. + +## TODO + +test + schema validations + M4 and oscal-cli schemas + round tripping + unit test any repairs? + +review ../schema-generation/ + +See work in `../schema-generation/json-value-key` and `group-as`