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: Update the json file #638

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions descriptor.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ This section defines the `application/vnd.oci.descriptor.v1+json` [media type](m
## Properties

A descriptor consists of a set of properties encapsulated in key-value fields.
A descriptor pointing to certain types may include extended fields.

The following fields contain the primary properties that constitute a Descriptor:

Expand Down Expand Up @@ -44,6 +45,37 @@ The following fields contain the primary properties that constitute a Descriptor
This OPTIONAL property contains arbitrary metadata for this descriptor.
This OPTIONAL property MUST use the [annotation rules](annotations.md#rules).

- **`platform`** *object*

This OPTIONAL property describes the platform which the image in the manifest runs on.
This SHOULD only be used when referring to a manifest.

- **`architecture`** *string*

This REQUIRED property specifies the CPU architecture.
Image indexes SHOULD use, and implementations SHOULD understand, values [supported by runtime-spec's `platform.arch`][runtime-platform2].

- **`os`** *string*

This REQUIRED property specifies the operating system.
Image indexes SHOULD use, and implementations SHOULD understand, values [supported by runtime-spec's `platform.os`][runtime-platform2].

- **`os.version`** *string*

This OPTIONAL property specifies the operating system version, for example `10.0.10586`.

- **`os.features`** *array of strings*

This OPTIONAL property specifies an array of strings, each specifying a mandatory OS feature (for example on Windows `win32k`).

- **`variant`** *string*

This OPTIONAL property specifies the variant of the CPU, for example `armv6l` to specify a particular CPU variant of the ARM CPU.

- **`features`** *array of strings*

This OPTIONAL property specifies an array of strings, each specifying a mandatory CPU feature (for example `sse4` or `aes`).

### Reserved

The following field keys are reserved and MUST NOT be used by other specifications.
Expand Down
28 changes: 1 addition & 27 deletions image-index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ For the media type(s) that this document is compatible with, see the [matrix][ma
This REQUIRED property contains a list of [manifests](manifest.md) for specific platforms.
While this property MUST be present, the size of the array MAY be zero.

Each object in `manifests` has the base properties of [descriptor](descriptor.md) with the following additional properties and restrictions:
Each object in `manifests` has the base properties of [descriptor](descriptor.md) with the following requirements and restrictions:

- **`mediaType`** *string*

Expand All @@ -43,32 +43,6 @@ For the media type(s) that this document is compatible with, see the [matrix][ma
This OPTIONAL property describes the platform which the image in the manifest runs on.
Copy link
Contributor

Choose a reason for hiding this comment

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

line 28 should be changed from "with the following additional properties and restrictions" to "with the following requirements and restrictions" or similar

Copy link
Author

@zhouhao3 zhouhao3 Apr 6, 2017

Choose a reason for hiding this comment

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

updated, what do you think of 3e7b8d0.

This property SHOULD be present if its target is platform-specific.

- **`architecture`** *string*

This REQUIRED property specifies the CPU architecture.
Image indexes SHOULD use, and implementations SHOULD understand, values [supported by runtime-spec's `platform.arch`][runtime-platform2].

- **`os`** *string*

This REQUIRED property specifies the operating system.
Image indexes SHOULD use, and implementations SHOULD understand, values [supported by runtime-spec's `platform.os`][runtime-platform2].

- **`os.version`** *string*

This OPTIONAL property specifies the operating system version, for example `10.0.10586`.

- **`os.features`** *array of strings*

This OPTIONAL property specifies an array of strings, each specifying a mandatory OS feature (for example on Windows `win32k`).

- **`variant`** *string*

This OPTIONAL property specifies the variant of the CPU, for example `armv6l` to specify a particular CPU variant of the ARM CPU.

- **`features`** *array of strings*

This OPTIONAL property specifies an array of strings, each specifying a mandatory CPU feature (for example `sse4` or `aes`).

- **`annotations`** *string-string map*

This OPTIONAL property contains arbitrary metadata for the image index.
Expand Down
38 changes: 38 additions & 0 deletions schema/defs-descriptor.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,44 @@
"format": "uri"
}
},
"platform": {
"id": "https://opencontainers.org/schema/image/descriptor/platform",
"type": "object",
"required": [
"architecture",
"os"
],
"properties": {
"architecture": {
"id": "https://opencontainers.org/schema/image/descriptor/platform/architecture",
"type": "string"
},
"os": {
"id": "https://opencontainers.org/schema/image/descriptor/platform/os",
"type": "string"
},
"os.version": {
"id": "https://opencontainers.org/schema/image/descriptor/platform/os.version",
"type": "string"
},
"os.features": {
"id": "https://opencontainers.org/schema/image/descriptor/platform/os.features",
"type": "array",
"items": {
"type": "string"
}
},
"variant": {
"type": "string"
},
"features": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"annotations": {
"id": "https://opencontainers.org/schema/image/descriptor/annotations",
"$ref": "defs.json#/definitions/mapStringString"
Expand Down
71 changes: 36 additions & 35 deletions schema/fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ var _escData = map[string]*_escFile{
"/config-schema.json": {
local: "config-schema.json",
size: 2771,
modtime: 1489007060,
modtime: 1491372287,
compressed: `
H4sIAAAJbogA/+RWQW/bPAy9+1cYbo9t/R2+U67dbgMyINh2KIZAsemEnSVqFD3MGPLfB8vJZtmym3XI
aScDFB/f4xMl60eSplkJrmC0gmSyVZqtLZhHMqLQAKePZCrcpxsLBVZYKJ9118FuXXEArTrIQcSu8vzZ
Expand All @@ -223,7 +223,7 @@ b1D07fCyW0vviMlWxN4UcYpZ/Enjdtf+RQ3SGiZ/vj8oANpKu/UTMV9kR1SDMjPzGZ6y5MQwnZvwWfX7
"/content-descriptor.json": {
local: "content-descriptor.json",
size: 1091,
modtime: 1489085976,
modtime: 1491372287,
compressed: `
H4sIAAAJbogA/5yTwW7UMBCG73mKUVqpl27NoeIQVb3AnQPcEAevPY6nJLYZz6oE1HdHjrNsAoiFve2O
/m/mm2j8vQFoLWbDlIRiaDto3yUMb2IQTQEZyi8MAm+XUGR4n9CQI6Nn4ra0uM7G46gL7kVSp9RTjmFX
Expand All @@ -237,23 +237,26 @@ NOoeV4ev1v0uEFzj1bNZXFvGLwdiLGIff30365vdnk4D8Kl5aX4EAAD//4LEuuxDBAAA

"/defs-descriptor.json": {
local: "defs-descriptor.json",
size: 906,
modtime: 1489085976,
size: 1966,
modtime: 1491372287,
compressed: `
H4sIAAAJbogA/6STT2/TQBDF7/kUwzaih8Rx4YCEVVVC9M6hnKjSaro79k7x/tHuRCVU+e5obTdJi0Cg
Hmx5RzPvze9p/TgDUIayThyFg1cNqEtq2XM5ZYiYhPWmxwQS4Esk/zl4QfaU4HIaCwmuImluWeOgsRxF
9yqqgeIDoBwZxq/bSPsSgGJTXK1IzE1dh0heP3nkVUhdnbUlhzU77Kg2e9f6oLZ80pJRW2VJ7LtDPaII
pQHv5vpT9Q2rn2fVx/Xh883J/G11c7tarB/Plu/ef9jV/9Y2V4PFbnRShjvKckz3IlyxBDpto4QuYbSs
QVvS3/PGwTgLoYXSFO7uScsS2A/HCQBOzy1me9GcW/qBhjQ77KfJi9P/zGFEul2sqvWiucaqLayLF0Sb
1Oe/8CD0PC5dGqFNwcGDZW1BLOeJAhxu4Y7AhAffBzRkft8UU8LtocxC7tj3z0wAqg3JYUldbRKrqb57
hoHeB8Hn1/E1d+9Yb7/0PFFb9Ay1eXWfgz+pj36D2mG8GnYf31POs/LsZr8CAAD//1ayPsKKAwAA
H4sIAAAJbogA/7SVT1PbMBDF73yKrWDKIX9Me+hMMwwznXLvgZ7KBGaR19HSWFJXMjRl/N07ihPbCYSh
NNzitfT2/Z680cMBgMopaGEf2Vk1AXVOBVtOTwE8SmRdzVEgOvjmyX51NiJbEjhfbXMCF540F6xxqTFs
RFsVNYHUB0CVlDN+X3hqSwCK89TVxOjDJMucJ6vXPcLYySwL2lCJGZc4oyxvu2ad2nCtFRttFaKwnXV1
jzGSLPGuLr+MfuDoz8no87T7+e7w6P3o6no8mD6cDD98/FRnL1t2pJYt6qaTynlGIfbptsKNhkDLwkc3
E/SGNWhD+meoSmj2gisgLXI3t6TjENguH1cAcHxqMJizyamh35iT5hLnq51nx/+YQ4N0PRiPpoPJJY6K
xDrYIqpkHp7hQZhzYzothEJcCfeGtYFoOKwooMQF3BDk7t7OHeaUP3aKIrjoyhyp7PfdzQSgCiclptRV
JaxW9XoDw88xpmV7+fBasUcUDW9XF/pVsVBqdNn5RdGGI+lYCfU5XFibn3YnJs6TRKatNDY0+m/2AZbt
cPj4FNpX9SbH3h258Bof4zuS0Hyqe/fTar/GV0GYsn2ToDrxJ51tTho8PW3PsqyHa5vrDoXRxm2ml0Sy
K483Mv3kfwRa6yJuXln/cyR9vXaej4SKpJdTEca3wdnDrHdVZiX6i6Xxi579ZLM+qA/+BgAA//+NODnR
rgcAAA==
`,
},

"/defs.json": {
local: "defs.json",
size: 1670,
modtime: 1489007060,
modtime: 1491372287,
compressed: `
H4sIAAAJbogA/7STza6bMBCF9zzFyO2S9oJtbGDb7hMpy6oLSiaJq2AjY6RWEe9e8RNChFuJKneRgGc8
3zmeMbcAgByxKa2qnTKa5EC+4klp1a8aaBs8grtY054vpnXgLgi7GvUXo12hNFo41FiqkyqLoTwceTOA
Expand All @@ -267,41 +270,39 @@ fIvD7in0ryMEy+fK1G6UfmdTE+tvpoL+1wV/AgAA//96IpqyhgYAAA==

"/image-index-schema.json": {
local: "image-index-schema.json",
size: 3157,
modtime: 1489085976,
size: 2107,
modtime: 1491372287,
compressed: `
H4sIAAAJbogA/7yWz27bOBDG736KgRIglyRcLII9GEEuu5ec9tCglyKHCTmyJrVIlaSTuIXfvSBp2ZIo
u4lq9GYPOd98vxH//ZgBFIqctNx4NrqYQ/F/Q/pfoz2yJgv3NS4I7rWiN/jUkOSSJcaplyH33MmKagx5
lffNXIhnZ/RVil4buxDKYumv/roRKXaW8li1KW4uhGlIy7aki2lptuBQXnAonxL9uqGQap6eSfoUa6xp
yHomV8whIAEUKf8zWZewUjinfajYQcm0VOASHjnwFUGsDLEyJDF4SWqADlADa08LstFCVJ7AJPo2d1It
ZVajZs31qi7m8Pc+hm9tLIY2aaSoUXNJzrsufquM1uK6491T3Z33YZy22H/b9pq96fGvth2x9G3FlkKt
L7toME+K8SGkXXbDjr8P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ChUPwMaw3FocMt
jNcpRvrX8RjRG7i6Vzyoh/pe4YZLFKR5u1c+XM0//dPtOU239u3p7oyzcWipBEjt0Hir4VWRUBDT16Uk
As23sESQ9tW0lkuU86kz1Vlm1/LYWK/H3O97pQ8IrLecjdw7nMXmxtiYr5aJE59NPnSdDT80GfIvTv/a
HX2ApxPNuiemYvxPgASaMccf4GrqThpcJguA58Vu8S8AAP//NlOuVTsIAAA=
`,
},

"/image-layout-schema.json": {
local: "image-layout-schema.json",
size: 414,
modtime: 1485388791,
size: 439,
modtime: 1491372287,
compressed: `
H4sIAAAJbogA/2yPwUrEMBCG732KIXq0TQVPue5pQdiD4EU8xHa2zWKTOJkKi/TdJZlWD91TmD/z8c3/
UwGoHlNHLrILXhlQp4j+EDxb55HgONkB4dlew8zw0o04WfWQqfskgwE1Mkej9SUFX0vaBBp0T/bMdfuk
JbsTzvUbkozWIaLvNlkqmGxrl8X1ZxELydeImQ0fF+zWLFKISOwwKQO5TTZkUi5+RUpSS/72bb9lA8IZ
eEQ4HY6wMxdusycm54f/HP08KQNv6wygHpu2adU6v5d3qQCWcjDh1+wI+z/k1rlV5pbqNwAA//8bwMuB
ngEAAA==
H4sIAAAJbogA/2yPQUvEMBCF7/0VQ/Sg4DYVPOW6pwVhD4IX8VDTaTvLNonJVFik/12SaRXRU5g38+W9
91kBqA6TjRSYvFMG1DGg23vHLTmMcJjaAeGxvfiZ4cmOOLXqLlPXSQYDamQORutT8m4nau3joLvY9rxr
HrRoV8JRtyHJaO0DOruZpYLJtaZsrM/FWEi+BMysfzuhXbUQfcDIhEkZyG2yQyYl8TPGJLVk97fth1yA
74FHhOP+8LvyDbmy8JZ2EgZ6OuNtsS8fbrESR3LDj45unpSBl3UGUPd1UzdqnV/Lu1QAS2kS8X2miN03
8l+PKnNL9RUAAP//k31n5bcBAAA=
`,
},

"/image-manifest-schema.json": {
local: "image-manifest-schema.json",
size: 921,
modtime: 1489085976,
modtime: 1491372287,
compressed: `
H4sIAAAJbogA/5ySMW8iMRCF+/0VI0MJ+O501bZXUZxSJEoTpXB2x7uDWNsZmygo4r9HtnHAkCKifTvv
zTdv/dEAiB59x+QCWSNaEHcOzT9rgiKDDOtJDQj/lSGNPsC9w440dSpNL6J97rsRJxWtYwiulXLjrVlm
Expand All @@ -315,6 +316,6 @@ Dj+ZAwAA

"/": {
isDir: true,
local: "",
local: "/",
},
}
38 changes: 2 additions & 36 deletions schema/image-index-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,42 +39,8 @@
"$ref": "defs-descriptor.json#/definitions/urls"
},
"platform": {
"id": "https://opencontainers.org/schema/image/platform",
"type": "object",
"required": [
"architecture",
"os"
],
"properties": {
"architecture": {
"id": "https://opencontainers.org/schema/image/platform/architecture",
"type": "string"
},
"os": {
"id": "https://opencontainers.org/schema/image/platform/os",
"type": "string"
},
"os.version": {
"id": "https://opencontainers.org/schema/image/platform/os.version",
"type": "string"
},
"os.features": {
"id": "https://opencontainers.org/schema/image/platform/os.features",
"type": "array",
"items": {
"type": "string"
}
},
"variant": {
"type": "string"
},
"features": {
"type": "array",
"items": {
"type": "string"
}
}
}
"id": "https://opencontainers.org/schema/image/descriptor/platform",
"$ref": "defs-descriptor.json#/definitions/platform"
},
"annotations": {
"id": "https://opencontainers.org/schema/image/descriptor/annotations",
Expand Down