purl 1.1.2 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,154 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-04/schema#",
3
- "$id": "./schemas/purl-types.schema.json",
4
- "title": "PURL Types Configuration Schema",
5
- "description": "JSON schema for PURL types and registry URL patterns configuration",
6
- "type": "object",
7
- "required": ["version", "description", "source", "last_updated", "types"],
8
- "properties": {
9
- "$schema": {
10
- "type": "string",
11
- "format": "uri",
12
- "description": "JSON Schema reference for this document"
13
- },
14
- "version": {
15
- "type": "string",
16
- "description": "Version of the configuration format",
17
- "pattern": "^\\d+\\.\\d+\\.\\d+$"
18
- },
19
- "description": {
20
- "type": "string",
21
- "description": "Description of the configuration file purpose"
22
- },
23
- "source": {
24
- "type": "string",
25
- "format": "uri",
26
- "description": "Source URL for the PURL specification"
27
- },
28
- "last_updated": {
29
- "type": "string",
30
- "format": "date",
31
- "description": "Date when the configuration was last updated"
32
- },
33
- "types": {
34
- "type": "object",
35
- "description": "Map of PURL type names to their configurations",
36
- "patternProperties": {
37
- "^[a-z][a-z0-9]*$": {
38
- "$ref": "#/definitions/purlType"
39
- }
40
- },
41
- "additionalProperties": false
42
- }
43
- },
44
- "additionalProperties": false,
45
- "definitions": {
46
- "purlType": {
47
- "type": "object",
48
- "required": ["description", "default_registry"],
49
- "properties": {
50
- "description": {
51
- "type": "string",
52
- "description": "Human-readable description of the package type"
53
- },
54
- "default_registry": {
55
- "oneOf": [
56
- {
57
- "type": "string",
58
- "format": "uri",
59
- "description": "Default registry URL for this package type"
60
- },
61
- {
62
- "type": "null",
63
- "description": "No default registry for this package type"
64
- }
65
- ]
66
- },
67
- "examples": {
68
- "type": "array",
69
- "description": "Array of example PURL strings for this type",
70
- "items": {
71
- "type": "string",
72
- "pattern": "^pkg:[a-z][a-z0-9]*/"
73
- },
74
- "uniqueItems": true
75
- },
76
- "registry_config": {
77
- "$ref": "#/definitions/registryConfig"
78
- }
79
- },
80
- "additionalProperties": false
81
- },
82
- "registryConfig": {
83
- "type": "object",
84
- "description": "Configuration for registry URL generation and parsing",
85
- "properties": {
86
- "base_url": {
87
- "type": "string",
88
- "format": "uri",
89
- "description": "Base URL for registry operations"
90
- },
91
- "route_patterns": {
92
- "type": "array",
93
- "description": "Array of URL pattern templates for this registry",
94
- "items": {
95
- "type": "string",
96
- "format": "uri-template"
97
- },
98
- "minItems": 1
99
- },
100
- "reverse_regex": {
101
- "type": "string",
102
- "description": "Regular expression for parsing registry URLs back to PURLs"
103
- },
104
- "components": {
105
- "$ref": "#/definitions/componentConfig"
106
- }
107
- },
108
- "additionalProperties": false
109
- },
110
- "componentConfig": {
111
- "type": "object",
112
- "description": "Configuration for PURL component handling",
113
- "properties": {
114
- "namespace": {
115
- "type": "boolean",
116
- "description": "Whether this type supports namespaces"
117
- },
118
- "namespace_required": {
119
- "type": "boolean",
120
- "description": "Whether namespace is required for this type"
121
- },
122
- "namespace_prefix": {
123
- "type": "string",
124
- "description": "Prefix character for namespaces (e.g., '@' for npm)"
125
- },
126
- "version_in_url": {
127
- "type": "boolean",
128
- "description": "Whether version can be included in registry URLs"
129
- },
130
- "version_path": {
131
- "type": "string",
132
- "description": "Path separator for version in URLs"
133
- },
134
- "version_prefix": {
135
- "type": "string",
136
- "description": "Prefix character for version in URLs (e.g., '@' for deno)"
137
- },
138
- "version_separator": {
139
- "type": "string",
140
- "description": "Separator character for version (e.g., '-' for hackage)"
141
- },
142
- "trailing_slash": {
143
- "type": "boolean",
144
- "description": "Whether URLs require trailing slash"
145
- },
146
- "default_version": {
147
- "type": "string",
148
- "description": "Default version string to use when none specified"
149
- }
150
- },
151
- "additionalProperties": false
152
- }
153
- }
154
- }
@@ -1,134 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-04/schema#",
3
- "$id": "./schemas/test-suite-data.schema.json",
4
- "title": "PURL Test Suite Data Schema",
5
- "description": "JSON schema for PURL specification test suite data",
6
- "type": "array",
7
- "items": {
8
- "$ref": "#/definitions/testCase"
9
- },
10
- "definitions": {
11
- "testCase": {
12
- "type": "object",
13
- "required": [
14
- "description",
15
- "purl",
16
- "canonical_purl",
17
- "type",
18
- "namespace",
19
- "name",
20
- "version",
21
- "qualifiers",
22
- "subpath",
23
- "is_invalid"
24
- ],
25
- "properties": {
26
- "description": {
27
- "type": "string",
28
- "description": "Human-readable description of the test case"
29
- },
30
- "purl": {
31
- "type": "string",
32
- "description": "The PURL string to be parsed and tested"
33
- },
34
- "canonical_purl": {
35
- "oneOf": [
36
- {
37
- "type": "string",
38
- "description": "The canonical (normalized) form of the PURL"
39
- },
40
- {
41
- "type": "null",
42
- "description": "No canonical form (for invalid PURLs)"
43
- }
44
- ]
45
- },
46
- "type": {
47
- "oneOf": [
48
- {
49
- "type": "string",
50
- "pattern": "^[a-z][a-z0-9]*$",
51
- "description": "The package type (ecosystem)"
52
- },
53
- {
54
- "type": "null",
55
- "description": "No type specified (for invalid PURLs)"
56
- }
57
- ]
58
- },
59
- "namespace": {
60
- "oneOf": [
61
- {
62
- "type": "string",
63
- "description": "The package namespace (e.g., org.apache.commons for Maven)"
64
- },
65
- {
66
- "type": "null",
67
- "description": "No namespace for this package"
68
- }
69
- ]
70
- },
71
- "name": {
72
- "oneOf": [
73
- {
74
- "type": "string",
75
- "minLength": 1,
76
- "description": "The package name"
77
- },
78
- {
79
- "type": "null",
80
- "description": "No name specified (for invalid PURLs)"
81
- }
82
- ]
83
- },
84
- "version": {
85
- "oneOf": [
86
- {
87
- "type": "string",
88
- "description": "The package version"
89
- },
90
- {
91
- "type": "null",
92
- "description": "No version specified"
93
- }
94
- ]
95
- },
96
- "qualifiers": {
97
- "oneOf": [
98
- {
99
- "type": "object",
100
- "description": "Key-value pairs for additional package metadata",
101
- "patternProperties": {
102
- ".*": {
103
- "type": "string"
104
- }
105
- },
106
- "additionalProperties": false
107
- },
108
- {
109
- "type": "null",
110
- "description": "No qualifiers for this package"
111
- }
112
- ]
113
- },
114
- "subpath": {
115
- "oneOf": [
116
- {
117
- "type": "string",
118
- "description": "Sub-path within the package"
119
- },
120
- {
121
- "type": "null",
122
- "description": "No subpath specified"
123
- }
124
- ]
125
- },
126
- "is_invalid": {
127
- "type": "boolean",
128
- "description": "Whether this PURL should be considered invalid and parsing should fail"
129
- }
130
- },
131
- "additionalProperties": false
132
- }
133
- }
134
- }