Skip to content

Commit

Permalink
Define the data field
Browse files Browse the repository at this point in the history
This should contain an embedded representation of the referenced
content, which is useful for avoiding extra hops to access small pieces
of content.

Signed-off-by: Jon Johnson <[email protected]>
  • Loading branch information
jonjohnsonjr committed Mar 12, 2021
1 parent 79b036d commit ff1c2da
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
17 changes: 8 additions & 9 deletions descriptor.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,18 @@ The following fields contain the primary properties that constitute a Descriptor

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

This OPTIONAL property contains arbitrary metadata for this descriptor.
This OPTIONAL property MUST use the [annotation rules](annotations.md#rules).
This OPTIONAL property contains arbitrary metadata for this descriptor.
This OPTIONAL property MUST use the [annotation rules](annotations.md#rules).

Descriptors pointing to [`application/vnd.oci.image.manifest.v1+json`](manifest.md) SHOULD include the extended field `platform`, see [Image Index Property Descriptions](image-index.md#image-index-property-descriptions) for details.

### Reserved
- **`data`** *string*

The following field keys are reserved and MUST NOT be used by other specifications.
This OPTIONAL property contains an embedded representation of the referenced content.
Values MUST conform to the Base 64 encoding, as defined in [RFC 4648][rfc4648-s4].

- **`data`** *string*
Descriptors pointing to [`application/vnd.oci.image.manifest.v1+json`](manifest.md) SHOULD include the extended field `platform`, see [Image Index Property Descriptions](image-index.md#image-index-property-descriptions) for details.

This key is RESERVED for future versions of the specification.
### Reserved

All other fields may be included in other OCI specifications.
Extended _Descriptor_ field additions proposed in other OCI specifications SHOULD first be considered for addition into this specification.

## Digests
Expand Down Expand Up @@ -179,6 +177,7 @@ In the following example, the descriptor indicates that the referenced manifest
[rfc3986]: https://tools.ietf.org/html/rfc3986
[rfc4634-s4.1]: https://tools.ietf.org/html/rfc4634#section-4.1
[rfc4634-s4.2]: https://tools.ietf.org/html/rfc4634#section-4.2
[rfc4648-s4]: https://tools.ietf.org/html/rfc4648#section-4
[rfc6838]: https://tools.ietf.org/html/rfc6838
[rfc6838-s4.2]: https://tools.ietf.org/html/rfc6838#section-4.2
[rfc7230-s2.7]: https://tools.ietf.org/html/rfc7230#section-2.7
Expand Down
3 changes: 3 additions & 0 deletions specs-go/v1/descriptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ type Descriptor struct {
// Annotations contains arbitrary metadata relating to the targeted content.
Annotations map[string]string `json:"annotations,omitempty"`

// Data is an embedding of the targeted content.
Data []byte `json:"data,omitempty"`

// Platform describes the platform which the image in the manifest runs on.
//
// This should only be used when referring to a manifest.
Expand Down

0 comments on commit ff1c2da

Please sign in to comment.