Skip to content

Commit e2a0d6e

Browse files
committed
considerations: DRY annotations and extensibility
As I suggested in the PR landing these blocks [1,2,3]. I've shifted the extensibility section to a separate considerations.md, since it's a generic policy that applies to both our manifest and manifest-list. I've pushed the annotations meat into the lower-level manifest specification (linking there from the higher-level manifest-list specification). The extensibility requirements and annotations field might arguably apply to our other JSON types as well. The separate extensibility file sets the stage for that, but I've left the other types off this commit to focus on making the current requirements more DRY without changing the specified behavior. My personal preference would be to have separate canonicalization.md and extensibility.md files, but Jonathan wanted the single file: On Mon, Oct 10, 2016 at 09:22:46AM -0700, Jonathan Boulle wrote [4]: > Ehh, I preferred it where it was - now worried about death by a > thousand files (extensibility, canonicalization, etc etc). Can we > combine them (into a generic "considerations" document or similar), > or just put this back? [1]: opencontainers#164 (comment) [2]: opencontainers#164 (comment) [3]: opencontainers#164 (comment) [4]: opencontainers#340 (comment) Signed-off-by: W. Trevor King <[email protected]>
1 parent f94caad commit e2a0d6e

File tree

5 files changed

+10
-20
lines changed

5 files changed

+10
-20
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ DOC_FILES := \
3131
config.md \
3232
manifest.md \
3333
manifest-list.md \
34-
canonicalization.md
34+
considerations.md
3535

3636
FIGURE_FILES := \
3737
img/media-types.png

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ The OCI Image Format project creates and maintains the software shipping contain
1414
- [Image Configuration](config.md)
1515
- [Image Manifest](manifest.md)
1616
- [Image Manifest List](manifest-list.md)
17-
- [Canonicalization](canonicalization.md)
17+
- [Considerations](considerations.md)
18+
- [Extensibility](considerations.md#extensibility)
19+
- [Canonicalization](considerations.md#canonicalization)
1820

1921
## Overview
2022

canonicalization.md renamed to considerations.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# Extensibility
2+
3+
Implementations that are reading/processing [manifests](manifest.md) or [manifest lists](manifest-list.md) MUST NOT generate an error if they encounter an unknown property.
4+
Instead they MUST ignore unknown properties.
5+
16
# Canonicalization
27

38
OCI Images [are](descriptor.md) [content-addressable](image-layout.md).

manifest-list.md

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -66,20 +66,7 @@ This section defines the `application/vnd.oci.image.manifest.list.v1+json` [medi
6666

6767
- **`annotations`** *string-string map*
6868

69-
This OPTIONAL property contains arbitrary metadata for the manifest list.
70-
Annotations MUST be a key-value map where both the key and value MUST be strings.
71-
While the value MUST be present, it MAY be an empty string.
72-
Keys MUST be unique within this map, and best practice is to namespace the keys.
73-
Keys SHOULD be named using a reverse domain notation - e.g. `com.example.myKey`.
74-
Keys using the `org.opencontainers` namespace are reserved and MUST NOT be used by other specifications.
75-
If there are no annotations then this property MUST either be absent or be an empty map.
76-
Implementations that are reading/processing manifest lists MUST NOT generate an error if they encounter an unknown annotation key.
77-
78-
See [Pre-Defined Annotation Keys](manifest.md#pre-defined-annotation-keys).
79-
80-
### Extensibility
81-
Implementations that are reading/processing manifest lists MUST NOT generate an error if they encounter an unknown property.
82-
Instead they MUST ignore unknown properties.
69+
This OPTIONAL property contains arbitrary metadata for the manifest list with the same semantics as the [manifest's `annotations`](manifest.md#image-manifest-property-descriptions)
8370

8471
## Example Manifest List
8572

manifest.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,6 @@ Unlike the [Manifest List](manifest-list.md), which contains information about a
7171

7272
See [Pre-Defined Annotation Keys](#pre-defined-annotation-keys).
7373

74-
### Extensibility
75-
Implementations that are reading/processing image manifests MUST NOT generate an error if they encounter an unknown property.
76-
Instead they MUST ignore unknown properties.
77-
7874
## Example Image Manifest
7975

8076
*Example showing an image manifest:*

0 commit comments

Comments
 (0)