|
6 | 6 | "type": "object", |
7 | 7 | "additionalProperties": false, |
8 | 8 | "definitions": { |
9 | | - "requirement": { |
10 | | - "title": "Component requirement", |
11 | | - "description": "States whether this PURL component is required, optional, or prohibited.", |
12 | | - "type": "string", |
13 | | - "enum": [ |
14 | | - "required", |
15 | | - "optional", |
16 | | - "prohibited" |
17 | | - ], |
18 | | - "meta:enum": { |
19 | | - "required": "This PURL component is required for this PURL type.", |
20 | | - "optional": "This PURL component is optional for this PURL type.", |
21 | | - "prohibited": "This PURL component is prohibited: it must not be present for this PURL type." |
22 | | - } |
23 | | - }, |
24 | 9 | "optional_requirement": { |
25 | 10 | "title": "Component optional requirement", |
26 | 11 | "description": "States that this PURL component is optional for a PURL type.", |
27 | 12 | "type": "string", |
28 | | - "constant": "optional" |
| 13 | + "const": "optional" |
29 | 14 | }, |
30 | 15 | "required_requirement": { |
31 | 16 | "title": "Component required requirement", |
32 | 17 | "description": "States that this PURL component is required for a PURL type.", |
33 | 18 | "type": "string", |
34 | | - "constant": "required" |
| 19 | + "const": "required" |
| 20 | + }, |
| 21 | + "prohibited_requirement": { |
| 22 | + "title": "Component prohibited requirement", |
| 23 | + "description": "States that this PURL component is prohibited for a PURL type.", |
| 24 | + "type": "string", |
| 25 | + "const": "prohibited" |
35 | 26 | }, |
36 | 27 | "purl_component_definition": { |
37 | 28 | "title": "PURL component definition", |
|
86 | 77 | "$schema": { |
87 | 78 | "title": "JSON schema", |
88 | 79 | "description": "Contains the URL of the JSON schema for Package-URL type definition.", |
89 | | - "constant": "https://packageurl.org/schemas/purl-type.schema-1.0.json", |
| 80 | + "const": "https://packageurl.org/schemas/purl-type-definition.schema-1.0.json", |
90 | 81 | "format": "uri" |
91 | 82 | }, |
92 | 83 | "$id": { |
|
157 | 148 | ], |
158 | 149 | "properties": { |
159 | 150 | "requirement": { |
160 | | - "$ref": "#/definitions/requirement" |
| 151 | + "title": "Namespace requirement", |
| 152 | + "description": "States that the PURL namespace component is optional, required or prohibited for a PURL type.", |
| 153 | + "type": "string", |
| 154 | + "oneOf": [ |
| 155 | + { |
| 156 | + "$ref": "#/definitions/optional_requirement" |
| 157 | + }, |
| 158 | + { |
| 159 | + "$ref": "#/definitions/required_requirement" |
| 160 | + }, |
| 161 | + { |
| 162 | + "$ref": "#/definitions/prohibited_requirement" |
| 163 | + } |
| 164 | + ] |
161 | 165 | } |
162 | 166 | }, |
163 | 167 | "allOf": [ |
|
175 | 179 | ], |
176 | 180 | "properties": { |
177 | 181 | "requirement": { |
178 | | - "$ref": "#/definitions/required_requirement" |
| 182 | + "title": "Name component requirement", |
| 183 | + "description": "States that the PURL name component is always required.", |
| 184 | + "type": "string", |
| 185 | + "oneOf": [ |
| 186 | + { |
| 187 | + "$ref": "#/definitions/required_requirement" |
| 188 | + } |
| 189 | + ] |
179 | 190 | } |
180 | 191 | }, |
181 | 192 | "allOf": [ |
|
193 | 204 | ], |
194 | 205 | "properties": { |
195 | 206 | "requirement": { |
196 | | - "$ref": "#/definitions/optional_requirement" |
| 207 | + "title": "Version requirement", |
| 208 | + "description": "States that the PURL version is optional.", |
| 209 | + "type": "string", |
| 210 | + "oneOf": [ |
| 211 | + { |
| 212 | + "$ref": "#/definitions/optional_requirement" |
| 213 | + } |
| 214 | + ] |
197 | 215 | } |
198 | 216 | }, |
199 | 217 | "allOf": [ |
|
224 | 242 | "type": "string" |
225 | 243 | }, |
226 | 244 | "requirement": { |
227 | | - "$ref": "#/definitions/requirement" |
| 245 | + "title": "Qualifier key requirement", |
| 246 | + "description": "States that a PURL qualifier key is optional or required for a PURL type.", |
| 247 | + "type": "string", |
| 248 | + "oneOf": [ |
| 249 | + { |
| 250 | + "$ref": "#/definitions/optional_requirement" |
| 251 | + }, |
| 252 | + { |
| 253 | + "$ref": "#/definitions/required_requirement" |
| 254 | + } |
| 255 | + ] |
228 | 256 | }, |
229 | 257 | "description": { |
230 | 258 | "title": "Description", |
|
253 | 281 | ], |
254 | 282 | "properties": { |
255 | 283 | "requirement": { |
256 | | - "$ref": "#/definitions/optional_requirement" |
| 284 | + "title": "Subpath requirement", |
| 285 | + "description": "States that the PURL subpath is optional.", |
| 286 | + "type": "string", |
| 287 | + "oneOf": [ |
| 288 | + { |
| 289 | + "$ref": "#/definitions/optional_requirement" |
| 290 | + } |
| 291 | + ] |
257 | 292 | } |
258 | 293 | }, |
259 | 294 | "allOf": [ |
|
0 commit comments