Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

schema/defs-image: Remove 'null' from valid annotations #539

Merged

Conversation

wking
Copy link
Contributor

@wking wking commented Jan 28, 2017

The null option has been in the JSON Schema since #44, although I expect it was accidental. The spec has clearly not allowed:

"annotations": null

since #164 landed with the following (still current) requirements:

Annotations MUST be a key-value map where both the key and value MUST be strings.

and:

If there are no annotations then this property MUST either be absent or be an empty map.

Folks without annotations should not set the property at all, or they should set it to:

"annotations": {}

The 'null' option has been in the JSON Schema since 78c7ff7
(manifest: add annotations, 2016-04-27, opencontainers#44), although I expect it was
accidental.  The spec has clearly not allowed:

  "annotations": null

since 873b9b6 (Add some text about extensions, 2016-06-26, opencontainers#164)
landed with the following (still current) requirements:

  Annotations MUST be a key-value map where both the key and value
  MUST be strings.

and:

  If there are no annotations then this property MUST either be absent
  or be an empty map.

Folks without annotations should not set the property at all, or they
should set it to:

  "annotations": {}

Signed-off-by: W. Trevor King <wking@tremily.us>
@wking wking force-pushed the annotations-does-not-permit-null branch from d3332d5 to acd8a30 Compare January 28, 2017 05:26
@stevvooe
Copy link
Contributor

stevvooe commented Feb 2, 2017

LGTM

Approved with PullApprove

@stevvooe
Copy link
Contributor

@opencontainers/image-spec-maintainers PTAL

@vbatts
Copy link
Member

vbatts commented Mar 8, 2017

LGTM

Approved with PullApprove

@vbatts vbatts merged commit 05a9f2b into opencontainers:master Mar 8, 2017
@wking wking mentioned this pull request Mar 9, 2017
@wking wking deleted the annotations-does-not-permit-null branch March 17, 2017 22:12
@vbatts vbatts mentioned this pull request May 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants