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

Json schema for image manifest and manifest list #18

Merged
merged 3 commits into from
Apr 14, 2016

Conversation

vbatts
Copy link
Member

@vbatts vbatts commented Apr 12, 2016

vbatts added 3 commits April 12, 2016 13:42
From opencontainers/runtime-spec@cdcabde

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
Here is a validating schema for the Image Manifest
/~https://github.com/opencontainers/image-spec/blob/master/manifest.md#image-manifest

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
@wking
Copy link
Contributor

wking commented Apr 12, 2016

On Tue, Apr 12, 2016 at 11:45:14AM -0700, Vincent Batts wrote:

  • schema: copy common from runtime

    A schema/defs.json (160)

While it's nice to have local copies of this sort of thing for offline
use, it's more DRY and probably easier to maintain to just $ref the
runtime-spec defs.json. Stuff like:

"$ref": "https://raw.githubusercontent.com/opencontainers/runtime-spec/v0.5.0/schema/defs.json#/definitions/mapStringString"

should work fine, although it's probably nicer if we just host these
under opencontainers.org/schema/… or some such.

@vbatts
Copy link
Member Author

vbatts commented Apr 12, 2016

I mulled on that too. This is a first step.

@philips
Copy link
Contributor

philips commented Apr 14, 2016

LGTM, can you file issues for steps after this?

@philips philips added this to the v0.1.0 milestone Apr 14, 2016
@vbatts vbatts merged commit 19e812c into opencontainers:master Apr 14, 2016
@vbatts vbatts deleted the json_schema branch April 14, 2016 14:54
@vbatts vbatts mentioned this pull request Apr 14, 2016
"type": "string",
"pattern": "^[a-z0-9]+:[a-fA-F0-9]+$"
},
"blobObject": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is actually called a "Descriptor".

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where is that defined?

On Fri, Apr 15, 2016 at 1:07 PM Stephen Day notifications@github.com
wrote:

In schema/defs-image.json
#18 (comment)
:

@@ -0,0 +1,99 @@
+{

  • "description": "Definitions particular to OpenContainer Image Specification",
  • "definitions": {
  • "mediaType": {
  •  "id": "https://opencontainers.org/schema/image/mediaType",
    
  •  "type": "string",
    
  •  "pattern": "^[a-z]+/[0-9a-zA-Z.+]+$"
    
  • },
  • "digest": {
  •  "description": "the cryptographic checksum digest of the object, in the pattern '<hash>:<hexadecimal digest>'",
    
  •  "type": "string",
    
  •  "pattern": "^[a-z0-9]+:[a-fA-F0-9]+$"
    
  • },
  • "blobObject": {

This is actually called a "Descriptor".


You are receiving this because you modified the open/close state.

Reply to this email directly or view it on GitHub
/~https://github.com/opencontainers/image-spec/pull/18/files/64b5003c9985ba8714201f1ecc01460770ab5828#r59933563

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what we have called it from the start. The godoc is here. I am not sure how it never made into this specification.

Other types with further fields, such as the manifest descriptor, are extensions to the descriptor type.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah fine. A name of a struct. Feel free to open a PR to include this in the
spec. I can update it here.

On Fri, Apr 15, 2016 at 1:27 PM Stephen Day notifications@github.com
wrote:

In schema/defs-image.json
#18 (comment)
:

@@ -0,0 +1,99 @@
+{

  • "description": "Definitions particular to OpenContainer Image Specification",
  • "definitions": {
  • "mediaType": {
  •  "id": "https://opencontainers.org/schema/image/mediaType",
    
  •  "type": "string",
    
  •  "pattern": "^[a-z]+/[0-9a-zA-Z.+]+$"
    
  • },
  • "digest": {
  •  "description": "the cryptographic checksum digest of the object, in the pattern '<hash>:<hexadecimal digest>'",
    
  •  "type": "string",
    
  •  "pattern": "^[a-z0-9]+:[a-fA-F0-9]+$"
    
  • },
  • "blobObject": {

This is what we have called it from the start. The godoc is here
https://godoc.org/github.com/docker/distribution#Descriptor. I am not
sure how it never made into this specification.

Other types with further fields, such as the manifest descriptor, are
extensions to the descriptor type.


You are receiving this because you modified the open/close state.
Reply to this email directly or view it on GitHub
/~https://github.com/opencontainers/image-spec/pull/18/files/64b5003c9985ba8714201f1ecc01460770ab5828#r59936055

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, I'll do that. Just reviewing old notifications.

@vbatts
Copy link
Member Author

vbatts commented Apr 15, 2016

haha. I see I added the definitions for the manifest list, but didn't git add the actual schema for the manifest list. smh

vbatts added a commit to vbatts/oci-image-spec that referenced this pull request Apr 15, 2016
I managed to forget adding the file in
opencontainers#18

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
vbatts added a commit to vbatts/oci-image-spec that referenced this pull request Apr 15, 2016
I managed to forget adding the file in
opencontainers#18

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
wking added a commit to wking/image-spec that referenced this pull request Nov 5, 2016
Previously we didn't define what a media type was and the old regular
expression (from 818a56a, schema: image manifest, 2016-04-12, opencontainers#18)
was stricter than the RFC.  The RFC rules are in [1], and the JSON
Schema regexp syntax is in [2].  In the new pattern,

* [A-Za-z0-9] is restricted-name-first (ALPHA / DIGIT), with ALPHA and
  DIGIT defined in RFC 5234 [3].
* [A-Za-z0-9!#$&-^_.+] is restricted-name-chars.

[1]: https://tools.ietf.org/html/rfc6838#section-4.2
[2]: https://tools.ietf.org/html/draft-wright-json-schema-validation-00#section-3.3
[3]: https://tools.ietf.org/html/rfc5234#appendix-B.1

Signed-off-by: W. Trevor King <wking@tremily.us>
dattgoswami9lk5g added a commit to dattgoswami9lk5g/bremlinr that referenced this pull request Jun 6, 2022
I managed to forget adding the file in
opencontainers/image-spec#18

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
7c00d pushed a commit to 7c00d/J1nHyeockKim that referenced this pull request Jun 6, 2022
I managed to forget adding the file in
opencontainers/image-spec#18

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
7c00d added a commit to 7c00d/J1nHyeockKim that referenced this pull request Jun 6, 2022
I managed to forget adding the file in
opencontainers/image-spec#18

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
laventuraw added a commit to laventuraw/Kihara-tony0 that referenced this pull request Jun 6, 2022
I managed to forget adding the file in
opencontainers/image-spec#18

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
sudo-bmitch pushed a commit to sudo-bmitch/image-spec that referenced this pull request Aug 24, 2022
Signed-off-by: Sajay Antony <sajaya@microsoft.com>
tomalopbsr0tt added a commit to tomalopbsr0tt/fabiojosej that referenced this pull request Oct 6, 2022
I managed to forget adding the file in
opencontainers/image-spec#18

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants