-
Notifications
You must be signed in to change notification settings - Fork 19
/
metaschema-datatypes.json
148 lines (148 loc) · 7.62 KB
/
metaschema-datatypes.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
{
"$schema" : "http://json-schema.org/draft-07/schema#",
"$id" : "http://csrc.nist.gov/ns/oscal/1.0/metaschema-datatypes-schema.json",
"$comment" : "Metaschema JSON data types",
"type" : "object",
"definitions" : {
"Base64Datatype": {
"description": "Binary data encoded using the Base 64 encoding algorithm as defined by RFC4648.",
"type": "string",
"pattern": "^[0-9A-Za-z+\/]+={0,2}$",
"contentEncoding": "base64"
},
"BooleanDatatype": {
"description": "A binary value that is either: true or false.",
"type": "boolean"
},
"DateDatatype": {
"description": "A string representing a 24-hour period with an optional timezone.",
"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[0-9]|1[0-2]):00|0[39]:30)|\\+((0[0-9]|1[0-4]):00|(0[34569]|10):30|(0[58]|12):45)))?$"
},
"DateWithTimezoneDatatype": {
"description": "A string representing a 24-hour period with a required timezone.",
"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[0-9]|1[0-2]):00|0[39]:30)|\\+((0[0-9]|1[0-4]):00|(0[34569]|10):30|(0[58]|12):45)))$"
},
"DateTimeDatatype": {
"description": "A string representing a point in time with an optional timezone.",
"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)))T(2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9])(\\.[0-9]+)?(Z|(-((0[0-9]|1[0-2]):00|0[39]:30)|\\+((0[0-9]|1[0-4]):00|(0[34569]|10):30|(0[58]|12):45)))?$"
},
"DateTimeWithTimezoneDatatype": {
"description": "A string representing a point in time with a required timezone.",
"type": "string",
"format": "date-time",
"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)))T(2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9])(\\.[0-9]+)?(Z|(-((0[0-9]|1[0-2]):00|0[39]:30)|\\+((0[0-9]|1[0-4]):00|(0[34569]|10):30|(0[58]|12):45)))$"
},
"DayTimeDurationDatatype": {
"description": "An amount of time quantified in days, hours, minutes, and seconds.",
"type": "string",
"format": "duration",
"pattern": "^-?P([0-9]+D(T(([0-9]+H([0-9]+M)?(([0-9]+|[0-9]+(\\.[0-9]+)?)S)?)|([0-9]+M(([0-9]+|[0-9]+(\\.[0-9]+)?)S)?)|([0-9]+|[0-9]+(\\.[0-9]+)?)S))?)|T(([0-9]+H([0-9]+M)?(([0-9]+|[0-9]+(\\.[0-9]+)?)S)?)|([0-9]+M(([0-9]+|[0-9]+(\\.[0-9]+)?)S)?)|([0-9]+|[0-9]+(\\.[0-9]+)?)S)$"
},
"DecimalDatatype": {
"description": "A real number expressed using a whole and optional fractional part separated by a period.",
"type": "number",
"pattern": "^(\\+|-)?([0-9]+(\\.[0-9]*)?|\\.[0-9]+)$"
},
"EmailAddressDatatype": {
"description": "An email address string formatted according to RFC 6531.",
"allOf": [
{"$ref": "#/definitions/StringDatatype"},
{
"type": "string",
"format": "email",
"pattern": "^.+@.+$"
}
]
},
"HostnameDatatype": {
"description": "An internationalized Internet host name string formatted according to section 2.3.2.3 of RFC5890.",
"allOf": [
{"$ref": "#/definitions/StringDatatype"},
{
"type": "string",
"format": "idn-hostname"
}
]
},
"IntegerDatatype": {
"description": "A whole number value.",
"type": "integer"
},
"IPV4AddressDatatype": {
"description": "An Internet Protocol version 4 address represented using dotted-quad syntax as defined in section 3.2 of RFC2673.",
"type": "string",
"format": "ipv4",
"pattern": "^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$"
},
"IPV6AddressDatatype": {
"description": "An Internet Protocol version 6 address represented using the syntax defined in section 2.2 of RFC3513.",
"type": "string",
"format": "ipv6",
"pattern": "^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|[fF][eE]80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::([fF]{4}(:0{1,4}){0,1}:){0,1}((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9]).){3,3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9]).){3,3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9]))$"
},
"MarkupLineDatatype": {
"description": "A single line of Markdown content conformant to the Commonmark specification.",
"type": "string",
"pattern": "^[^\n]+$"
},
"MarkupMultilineDatatype": {
"description": "A multiple lines of Markdown content conformant to the Commonmark specification.",
"type": "string"
},
"NonNegativeIntegerDatatype": {
"description": "An integer value that is equal to or greater than 0.",
"allOf": [
{"$ref": "#/definitions/IntegerDatatype"},
{
"type": "number",
"minimum": 0
}
]
},
"PositiveIntegerDatatype": {
"description": "An integer value that is greater than 0.",
"allOf": [
{"$ref": "#/definitions/IntegerDatatype"},
{
"type": "number",
"minimum": 1
}
]
},
"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.",
"type": "string",
"pattern": "^(\\p{L}|_)(\\p{L}|\\p{N}|[.\\-_])*$"
},
"URIDatatype": {
"description": "A universal resource identifier (URI) formatted according to RFC3986.",
"type": "string",
"format": "uri",
"pattern": "^[a-zA-Z][a-zA-Z0-9+\\-.]+:.+$"
},
"URIReferenceDatatype": {
"description": "A URI Reference, either a URI or a relative-reference, formatted according to section 4.1 of RFC3986.",
"type": "string",
"format": "uri-reference"
},
"UUIDDatatype": {
"description": "A type 4 ('random' or 'pseudorandom') or type 5 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}$"
},
"YearMonthDurationDatatype": {
"description": "An amount of time quantified in years and months based on ISO-8601 durations (see also RFC3339 appendix A).",
"type": "string",
"format": "duration",
"pattern": "^-?P([0-9]+Y([0-9]+M)?)|[0-9]+M$"
}
}
}