-
Notifications
You must be signed in to change notification settings - Fork 0
/
meta.schema.json
202 lines (202 loc) · 5.44 KB
/
meta.schema.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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
{
"meta:license": [
"Copyright 2017 Adobe Systems Incorporated. All rights reserved.",
"This work is licensed under a Creative Commons Attribution 4.0 International (CC BY 4.0) license",
"you may not use this file except in compliance with the License. You may obtain a copy",
"of the License at https://creativecommons.org/licenses/by/4.0/"
],
"$schema": "http://json-schema.org/draft-06/schema#",
"$id": "https://ns.adobe.com/xdm/meta",
"title": "Meta-Schema for XDM",
"type": "object",
"description": "All Schema files have to adhere to this style guide.",
"definitions": {
"extending-all-of": {
"type": "array",
"minItems": 2,
"items": {
"type": "object",
"properties": {
"$ref": {
"anyOf": [
{
"type": "string",
"format": "uri"
},
{
"type": "string",
"pattern": "#/definitions/[a-z0-9]+"
}
]
}
}
}
}
},
"properties": {
"$schema": {
"const": "http://json-schema.org/draft-06/schema#"
},
"$id": {
"type": "string",
"format": "uri",
"pattern": "(https://ns\\.adobe\\.com/xdm/[a-z0-9-/]*)|(http://schema\\.org/.*)|(http://ns.adobe.com/adobecloud/core/1.0.*)|([http|https]://ns\\.adobe\\.com/adobecloudplatform/.*)|(https://tools\\.ietf\\.org/html/draft-kelly-json-hal-08/.*)|(http://www.iptc\\.org/.*)|(https://id3\\.org/id3v2.4/.*)|(https://ns\\.adobe\\.com/experience/[a-z0-9-/]*)|(https://ns\\.adobe\\.com/b2b/[a-z0-9-/]*)|(https://ns\\.airship\\.com/[a-z0-9-/]*)"
},
"meta:license": {
"type": "array",
"items": [
{
"type": "string",
"pattern": "(Copyright 201[7-9] .*\\. All rights reserved\\.)|(Copyright 202[0-9] .*\\. All rights reserved\\.)"
},
{
"type": "string",
"const": "This work is licensed under a Creative Commons Attribution 4.0 International (CC BY 4.0) license"
},
{
"type": "string",
"const": "you may not use this file except in compliance with the License. You may obtain a copy"
},
{
"type": "string",
"const": "of the License at https://creativecommons.org/licenses/by/4.0/"
}
]
},
"meta:extensible": {
"type": "boolean",
"default": false,
"description": "Set this `true` if the schema can be extended by other schemas."
},
"meta:auditable": {
"type": "boolean",
"default": false,
"description": "Set this `true` if entities of this schema can have an audit record."
},
"meta:extends": {
"oneOf": [
{
"type": "string",
"format": "uri"
},
{
"type": "array",
"items": {
"type": "string",
"format": "uri"
}
}
]
},
"meta:descriptors": {
"type": "array",
"items": {
"type": "object",
"$ref": "https://ns.adobe.com/xdm/common/descriptors/schemadescriptor#/definitions/descriptor"
}
},
"meta:xdmType": {
"description": "signals the logical data type of a field",
"type": "string",
"enum": [
"string",
"number",
"long",
"int",
"short",
"byte",
"boolean",
"date",
"date-time",
"map"
]
},
"type": {
"type": "string",
"const": "object"
},
"title": {
"type": "string",
"minLength": 3
},
"dcx:typeRestriction": {
"type": "string",
"pattern": "^(\\w+|\\*)/([-.\\w.]+|\\*)\\+dcx$",
"description": "The DCX format or group of formats this schema can be applied to in validation workflows."
}
},
"allOf": [
{
"oneOf": [
{
"properties": {
"meta:extensible": {
"const": true
}
},
"required": ["definitions", "meta:extensible"]
},
{
"properties": {
"meta:extensible": {
"const": false
}
}
}
]
},
{
"anyOf": [
{
"properties": {
"meta:extends": {
"type": "string",
"format": "uri"
},
"allOf": { "$ref": "#/definitions/extending-all-of" }
},
"required": ["meta:extends", "allOf"]
},
{
"properties": {
"meta:extends": {
"type": "array",
"minItems": 1,
"items": {
"format": "uri",
"type": "string"
}
},
"allOf": { "$ref": "#/definitions/extending-all-of" }
},
"required": ["meta:extends", "allOf"]
},
{
"properties": {
"meta:extends": {
"default": null,
"const": null
}
}
}
]
},
{
"required": [
"$schema",
"$id",
"meta:license",
"type",
"title",
"description",
"meta:status"
]
}
],
"meta:status": {
"title": "Status",
"description": "Indicates if the schema’s level of stability. Defined values are: stable, stabilizing, and experimental.",
"type": "string",
"meta:enum": ["stable", "stabilizing", "experimental", "deprecated"]
}
}