Skip to content

Commit add48be

Browse files
authored
Merge pull request #567 from q384566678/urls-ompt
schema: urls optimization
2 parents 5d925ee + 79a09a3 commit add48be

File tree

6 files changed

+13532
-9981
lines changed

6 files changed

+13532
-9981
lines changed

schema/content-descriptor.json

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,23 @@
66
"properties": {
77
"mediaType": {
88
"description": "the mediatype of the referenced object",
9-
"$ref": "defs-image.json#/definitions/mediaType"
9+
"$ref": "defs-descriptor.json#/definitions/mediaType"
1010
},
1111
"size": {
1212
"description": "the size in bytes of the referenced object",
1313
"$ref": "defs.json#/definitions/int64"
1414
},
1515
"digest": {
1616
"description": "the cryptographic checksum digest of the object, in the pattern '<hash>:<hexadecimal digest>'",
17-
"$ref": "defs-image.json#/definitions/digest"
17+
"$ref": "defs-descriptor.json#/definitions/digest"
1818
},
1919
"urls": {
2020
"description": "a list of urls from which this object may be downloaded",
21-
"type": "array",
22-
"items": {
23-
"type": "string",
24-
"format": "uri"
25-
}
21+
"$ref": "defs-descriptor.json#/definitions/urls"
2622
},
2723
"annotations": {
2824
"id": "https://opencontainers.org/schema/image/descriptor/annotations",
29-
"$ref": "defs-image.json#/definitions/annotations"
25+
"$ref": "defs-descriptor.json#/definitions/annotations"
3026
}
3127
},
3228
"required": [

schema/defs-descriptor.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"description": "Definitions particular to OpenContainer Descriptor Specification",
3+
"definitions": {
4+
"mediaType": {
5+
"id": "https://opencontainers.org/schema/image/descriptor/mediaType",
6+
"type": "string",
7+
"pattern": "^[A-Za-z0-9][A-Za-z0-9!#$&-^_.+]{0,126}/[A-Za-z0-9][A-Za-z0-9!#$&-^_.+]{0,126}$"
8+
},
9+
"digest": {
10+
"description": "the cryptographic checksum digest of the object, in the pattern '<hash>:<hexadecimal digest>'",
11+
"type": "string",
12+
"pattern": "^[a-z0-9_+.-]+:[a-f0-9]+$"
13+
},
14+
"urls": {
15+
"description": "a list of urls from which this object may be downloaded",
16+
"type": "array",
17+
"items": {
18+
"type": "string",
19+
"format": "uri"
20+
}
21+
},
22+
"annotations": {
23+
"id": "https://opencontainers.org/schema/image/descriptor/annotations",
24+
"$ref": "defs.json#/definitions/mapStringString"
25+
}
26+
}
27+
}

schema/defs-image.json

Lines changed: 0 additions & 92 deletions
This file was deleted.

0 commit comments

Comments
 (0)