Skip to content

Commit 8729ba4

Browse files
committed
descriptor: MUST URIs and SHOULD http(s) for descriptor's 'urls'
The in-flight #431 is using JSON Schema's uri format [1], which requires RFC 3986. This commit makes that an official spec requirement by adding a MUST to the Markdown. It also SHOULDs the http(s) schemes, because they're widely supported and are deployed in existing Docker images. And Vincent and Antonio both like SHOULDing them [2] ;). [1]: https://tools.ietf.org/html/draft-wright-json-schema-validation-00#section-7.3.6 [2]: #436 Signed-off-by: W. Trevor King <[email protected]>
1 parent a4606de commit 8729ba4

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

descriptor.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,11 @@ The following fields contain the primary properties that constitute a Descriptor
3434
This property exists so that a client will have an expected size for the content before processing.
3535
If the length of the retrieved content does not match the specified length, the content SHOULD NOT be trusted.
3636

37-
- **`urls`** *array*
37+
- **`urls`** *array of strings*
3838

39-
This OPTIONAL property specifies a list of URLs from which this object MAY be downloaded.
39+
This OPTIONAL property specifies a list of URIs from which this object MAY be downloaded.
40+
Each entry MUST conform to [RFC 3986][rfc3986].
41+
Entries SHOULD use the `http` and `https` schemes, as defined in [RFC 7230][rfc7230-s2.7].
4042

4143
### Reserved
4244

@@ -117,3 +119,6 @@ The following example describes a [_Manifest_](manifest.md#image-manifest) with
117119
"digest": "sha256:5b0bcabd1ed22e9fb1310cf6c2dec7cdef19f0ad69efa1f392e94a4333501270"
118120
}
119121
```
122+
123+
[rfc3986]: https://tools.ietf.org/html/rfc3986
124+
[rfc7230-s2.7]: https://tools.ietf.org/html/rfc7230#section-2.7

0 commit comments

Comments
 (0)