-
Notifications
You must be signed in to change notification settings - Fork 0
/
alps.json
205 lines (205 loc) · 10.7 KB
/
alps.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
203
204
205
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ALPS Schema",
"type": "object",
"required": ["alps"],
"properties": {
"alps": {
"type": "object",
"required": ["descriptor"],
"properties": {
"version": {
"type": "string",
"errorMessage": "The 'version' must be a string. See https://datatracker.ietf.org/doc/html/draft-amundsen-richardson-foster-alps-07#section-2.2.18"
},
"doc": {"$ref": "#/definitions/doc"},
"ext": {"$ref": "#/definitions/ext"},
"link": {"$ref": "#/definitions/link"},
"title": {
"type": "string",
"errorMessage": "The 'title' must be a string. See https://datatracker.ietf.org/doc/html/draft-amundsen-richardson-foster-alps-07#section-2.2.15"
},
"descriptor": {
"type": "array",
"items": {"$ref": "#/definitions/descriptor"},
"errorMessage": "The 'descriptor' must be an array. See https://datatracker.ietf.org/doc/html/draft-amundsen-richardson-foster-alps-07#section-2.2.4"
}
},
"errorMessage": {
"required": {
"descriptor": "The 'alps' object must contain a 'descriptor' property. See https://datatracker.ietf.org/doc/html/draft-amundsen-richardson-foster-alps-07#section-2.2.1"
}
}
}
},
"definitions": {
"href": {
"type": "string",
"format": "uri-reference",
"errorMessage": "The 'href' must be a valid URI or URI reference. See https://datatracker.ietf.org/doc/html/draft-amundsen-richardson-foster-alps-07#section-2.2.8"
},
"doc": {
"oneOf": [
{
"type": "string",
"errorMessage": "The 'doc' can be a string. See https://datatracker.ietf.org/doc/html/draft-amundsen-richardson-foster-alps-07#section-2.2.5"
},
{
"type": "object",
"properties": {
"value": {
"type": "string",
"errorMessage": "The 'value' of 'doc' must be a string. See https://datatracker.ietf.org/doc/html/draft-amundsen-richardson-foster-alps-07#section-2.2.5"
},
"format": {
"type": "string",
"enum": ["text", "markdown", "html", "asciidoc"],
"errorMessage": "The 'format' must be one of the following: 'text', 'markdown', 'html', 'asciidoc'. See https://datatracker.ietf.org/doc/html/draft-amundsen-richardson-foster-alps-07#section-2.2.7"
},
"href": {"$ref": "#/definitions/href"}
},
"required": ["value"],
"errorMessage": {
"required": {
"value": "The 'doc' object must contain a 'value' property. See https://datatracker.ietf.org/doc/html/draft-amundsen-richardson-foster-alps-07#section-2.2.5"
}
}
}
]
},
"ext": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"errorMessage": "The 'id' of 'ext' must be a string. See https://datatracker.ietf.org/doc/html/draft-amundsen-richardson-foster-alps-07#section-2.2.6"
},
"href": { "$ref": "#/definitions/href" },
"value": {
"type": "string",
"errorMessage": "The 'value' of 'ext' must be a string. See https://datatracker.ietf.org/doc/html/draft-amundsen-richardson-foster-alps-07#section-2.2.6"
}
},
"required": ["id"],
"errorMessage": {
"required": {
"id": "Each 'ext' object must contain an 'id' property. See https://datatracker.ietf.org/doc/html/draft-amundsen-richardson-foster-alps-07#section-2.2.6"
}
}
},
"errorMessage": "The 'ext' must be an array of objects. See https://datatracker.ietf.org/doc/html/draft-amundsen-richardson-foster-alps-07#section-2.2.6"
},
"relType": {
"oneOf": [
{
"type": "string",
"enum": [
"about", "alternate", "appendix", "archives", "author",
"bookmark", "canonical", "chapter", "collection", "contents",
"copyright", "current", "describedby", "describes", "edit",
"edit-media", "enclosure", "first", "glossary", "help", "hub",
"icon", "index", "item", "last", "latest-version", "license",
"next", "next-archive", "payment", "prev", "preview",
"previous", "privacy-policy", "related", "replies", "section",
"self", "service", "start", "stylesheet", "subsection",
"tag", "terms-of-service", "type", "up", "version-history",
"via", "working-copy", "working-copy-of"
]
},
{
"type": "string",
"format": "uri"
}
],
"errorMessage": "The 'rel' must be a valid registered link relation type or a URI. See https://datatracker.ietf.org/doc/html/draft-amundsen-richardson-foster-alps-07#section-2.2.12"
},
"link": {
"oneOf": [
{ "$ref": "#/definitions/linkObject" },
{
"type": "array",
"items": { "$ref": "#/definitions/linkObject" }
}
],
"errorMessage": "The 'link' must be an object or an array of objects. See https://datatracker.ietf.org/doc/html/draft-amundsen-richardson-foster-alps-07#section-2.2.10"
},
"linkObject": {
"type": "object",
"required": ["href", "rel"],
"properties": {
"href": { "$ref": "#/definitions/href" },
"rel": { "$ref": "#/definitions/relType" },
"title": {
"type": "string",
"errorMessage": "If provided, 'title' must be a string. See https://datatracker.ietf.org/doc/html/draft-amundsen-richardson-foster-alps-07#section-2.2.10"
},
"tag": {
"type": "string",
"errorMessage": "If provided, 'tag' must be a string. See https://datatracker.ietf.org/doc/html/draft-amundsen-richardson-foster-alps-07#section-2.2.14"
}
},
"additionalProperties": false,
"errorMessage": {
"required": {
"href": "'href' is required in 'link' object. See https://datatracker.ietf.org/doc/html/draft-amundsen-richardson-foster-alps-07#section-2.2.10",
"rel": "'rel' is required in 'link' object. See https://datatracker.ietf.org/doc/html/draft-amundsen-richardson-foster-alps-07#section-2.2.10"
},
"additionalProperties": "Additional properties are not allowed in 'link' object. See https://datatracker.ietf.org/doc/html/draft-amundsen-richardson-foster-alps-07#section-2.2.10"
}
},
"descriptor": {
"type": "object",
"properties": {
"id": {
"type": "string",
"errorMessage": "The 'id' of 'descriptor' must be a string. See https://datatracker.ietf.org/doc/html/draft-amundsen-richardson-foster-alps-07#section-2.2.9"
},
"href": { "$ref": "#/definitions/href" },
"doc": { "$ref": "#/definitions/doc" },
"ext": { "$ref": "#/definitions/ext" },
"name": {
"type": "string",
"errorMessage": "The 'name' of 'descriptor' must be a string. See https://datatracker.ietf.org/doc/html/draft-amundsen-richardson-foster-alps-07#section-2.2.11"
},
"title": {
"type": "string",
"errorMessage": "The 'title' of 'descriptor' must be a string. See https://datatracker.ietf.org/doc/html/draft-amundsen-richardson-foster-alps-07#section-2.2.15"
},
"type": {
"type": "string",
"enum": ["semantic", "safe", "idempotent", "unsafe"],
"errorMessage": "The 'type' must be one of the following: 'semantic', 'safe', 'idempotent', 'unsafe'. See https://datatracker.ietf.org/doc/html/draft-amundsen-richardson-foster-alps-07#section-2.2.16"
},
"rt": {
"type": "string",
"errorMessage": "The 'rt' of 'descriptor' must be a string. See https://datatracker.ietf.org/doc/html/draft-amundsen-richardson-foster-alps-07#section-2.2.13"
},
"def": {
"type": "string",
"format": "uri-reference",
"errorMessage": "The 'def' of 'descriptor' must be a valid URI. See https://datatracker.ietf.org/doc/html/draft-amundsen-richardson-foster-alps-07#section-2.2.3"
},
"rel": { "$ref": "#/definitions/relType" },
"tag": {
"type": "string",
"errorMessage": "The 'tag' must be a string. See https://datatracker.ietf.org/doc/html/draft-amundsen-richardson-foster-alps-07#section-2.2.14"
},
"link": { "$ref": "#/definitions/link" },
"descriptor": {
"type": "array",
"items": { "$ref": "#/definitions/descriptor" },
"errorMessage": "The nested 'descriptor' must be an array. See https://datatracker.ietf.org/doc/html/draft-amundsen-richardson-foster-alps-07#section-2.2.4"
}
},
"oneOf": [
{ "required": ["id"] },
{ "required": ["href"] }
],
"errorMessage": {
"oneOf": "Each 'descriptor' must have either an 'id' or an 'href'. See https://datatracker.ietf.org/doc/html/draft-amundsen-richardson-foster-alps-07#section-2.2.4"
}
}
}
}