From f56a7f1dcbf225eb17cd7d00a4336d34bc5fc1c8 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 22 Sep 2016 21:35:16 -0700 Subject: [PATCH] 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. The extensibility requirements might arguably apply to our other JSON types as well (like annotations, which were recently DRYed up in f15a268, annotations: make a designated doc and DRY a bit, 2016-12-15, #501). The new extensibility section 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]: https://github.com/opencontainers/image-spec/pull/164#issuecomment-243952187 [2]: https://github.com/opencontainers/image-spec/pull/164#issuecomment-244279771 [3]: https://github.com/opencontainers/image-spec/pull/164#r77871859 [4]: https://github.com/opencontainers/image-spec/pull/340#issuecomment-252670278 Signed-off-by: W. Trevor King --- Makefile | 2 +- canonicalization.md => considerations.md | 5 +++++ manifest-list.md | 4 ---- manifest.md | 4 ---- spec.md | 4 +++- 5 files changed, 9 insertions(+), 10 deletions(-) rename canonicalization.md => considerations.md (84%) diff --git a/Makefile b/Makefile index 0d6c96500..05e033e82 100644 --- a/Makefile +++ b/Makefile @@ -30,7 +30,7 @@ DOC_FILES := \ layer.md \ config.md \ annotations.md \ - canonicalization.md + considerations.md FIGURE_FILES := \ img/media-types.png diff --git a/canonicalization.md b/considerations.md similarity index 84% rename from canonicalization.md rename to considerations.md index 3875ad271..e2e8f4ccd 100644 --- a/canonicalization.md +++ b/considerations.md @@ -1,3 +1,8 @@ +# Extensibility + +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. +Instead they MUST ignore unknown properties. + # Canonicalization OCI Images [are](descriptor.md) [content-addressable](image-layout.md). diff --git a/manifest-list.md b/manifest-list.md index fe6b71775..42e51c6a3 100644 --- a/manifest-list.md +++ b/manifest-list.md @@ -71,10 +71,6 @@ For the media type(s) that this document is compatible with, see the [matrix][ma See [Pre-Defined Annotation Keys](annotations.md#pre-defined-annotation-keys). -### Extensibility -Implementations that are reading/processing manifest lists MUST NOT generate an error if they encounter an unknown property. -Instead they MUST ignore unknown properties. - ## Example Manifest List *Example showing a simple manifest list pointing to image manifests for two platforms:* diff --git a/manifest.md b/manifest.md index a720fcd90..0e8e985fe 100644 --- a/manifest.md +++ b/manifest.md @@ -66,10 +66,6 @@ Unlike the [Manifest List](manifest-list.md), which contains information about a See [Pre-Defined Annotation Keys](annotations.md#pre-defined-annotation-keys). -### Extensibility -Implementations that are reading/processing image manifests MUST NOT generate an error if they encounter an unknown property. -Instead they MUST ignore unknown properties. - ## Example Image Manifest *Example showing an image manifest:* diff --git a/spec.md b/spec.md index a6590e1ed..fdffd0e8b 100644 --- a/spec.md +++ b/spec.md @@ -18,7 +18,9 @@ The goal of this specification is to enable the creation of interoperable tools - [Filesystem Layers](layer.md) - [Image Configuration](config.md) - [Annotations](annotations.md) -- [Canonicalization](canonicalization.md) +- [Considerations](considerations.md) + - [Extensibility](considerations.md#extensibility) + - [Canonicalization](considerations.md#canonicalization) # Notational Conventions