Skip to content

Commit 1c4ad9a

Browse files
sudo-bmitchjdolitsky
authored andcommitted
Markdown nits (#10)
Signed-off-by: Brandon Mitchell <[email protected]>
1 parent 7136b82 commit 1c4ad9a

File tree

2 files changed

+19
-10
lines changed

2 files changed

+19
-10
lines changed

artifact.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,15 @@ For the media type(s) that this is compatible with see the [matrix](media-types.
1717

1818
- **`blobs`** *string*
1919

20-
This OPTIONAL property contains a list of [descriptors](descriptor.md). Each descriptor represents an artifact of any IANA mediaType. The list MAY be ordered for certain artifact types like scan results.
20+
This OPTIONAL property contains a list of [descriptors](descriptor.md).
21+
Each descriptor represents an artifact of any IANA mediaType.
22+
The list MAY be ordered for certain artifact types like scan results.
2123

2224
- **`refers`** *string*
2325

24-
This OPTIONAL property specifies a [descriptor](descriptor.md) of a container image or another artifact. The purpose of this property is to provide a reference to the container image or artifact this artifact is related to. The "Referrers" API in the distribution specification looks for this property to list all artifacts that refer to a given artifact or container image.
26+
This OPTIONAL property specifies a [descriptor](descriptor.md) of a container image or another artifact.
27+
The purpose of this property is to provide a reference to the container image or artifact this artifact is related to.
28+
The "Referrers" API in the distribution specification looks for this property to list all artifacts that refer to a given artifact or container image.
2529

2630
- **`annotations`** *string-string map*
2731

descriptor.md

+13-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
# OCI Content Descriptors
22

3-
* An OCI image consists of several different components, arranged in a [Merkle Directed Acyclic Graph (DAG)](https://en.wikipedia.org/wiki/Merkle_tree).
4-
* References between components in the graph are expressed through _Content Descriptors_.
5-
* A Content Descriptor (or simply _Descriptor_) describes the disposition of the targeted content.
6-
* A Content Descriptor includes the type of the content, a content identifier (_digest_), and the byte-size of the raw content. Optionally, it includes the type of artifact it is describing.
7-
* Descriptors SHOULD be embedded in other formats to securely reference external content.
8-
* Other formats SHOULD use descriptors to securely reference external content.
3+
- An OCI image consists of several different components, arranged in a [Merkle Directed Acyclic Graph (DAG)](https://en.wikipedia.org/wiki/Merkle_tree).
4+
- References between components in the graph are expressed through _Content Descriptors_.
5+
- A Content Descriptor (or simply _Descriptor_) describes the disposition of the targeted content.
6+
- A Content Descriptor includes the type of the content, a content identifier (_digest_), and the byte-size of the raw content.
7+
Optionally, it includes the type of artifact it is describing.
8+
- Descriptors SHOULD be embedded in other formats to securely reference external content.
9+
- Other formats SHOULD use descriptors to securely reference external content.
910

1011
This section defines the `application/vnd.oci.descriptor.v1+json` [media type](media-types.md).
1112

@@ -72,7 +73,7 @@ The _algorithm_ specifies the cryptographic hash function and encoding used for
7273

7374
A digest string MUST match the following [grammar](considerations.md#ebnf):
7475

75-
```
76+
```text
7677
digest ::= algorithm ":" encoded
7778
algorithm ::= algorithm-component (algorithm-separator algorithm-component)*
7879
algorithm-component ::= [a-z0-9]+
@@ -108,12 +109,14 @@ Implementations MAY employ [canonicalization](considerations.md#canonicalization
108109
### Digest calculations
109110

110111
A _digest_ is calculated by the following pseudo-code, where `H` is the selected hash algorithm, identified by string `<alg>`:
111-
```
112+
113+
```text
112114
let ID(C) = Descriptor.digest
113115
let C = <bytes>
114116
let D = '<alg>:' + Encode(H(C))
115117
let verified = ID(C) == D
116118
```
119+
117120
Above, we define the content identifier as `ID(C)`, extracted from the `Descriptor.digest` field.
118121
Content `C` is a string of bytes.
119122
Function `H` returns the hash of `C` in bytes and is passed to function `Encode` and prefixed with the algorithm to obtain the digest.
@@ -195,6 +198,7 @@ In the following example, the descriptor indicates that the referenced manifest
195198
```
196199

197200
In the following example, the descriptor indicates the type of artifact it is referencing:
201+
198202
```json,title=Content%20Descriptor&mediatype=application/vnd.oci.descriptor.v1%2Bjson
199203
{
200204
"mediaType": "application/vnd.icecream.flavor",
@@ -203,6 +207,7 @@ In the following example, the descriptor indicates the type of artifact it is re
203207
"artifactType": "icecream_flavor"
204208
}
205209
```
210+
206211
[rfc3986]: https://tools.ietf.org/html/rfc3986
207212
[rfc4634-s4.1]: https://tools.ietf.org/html/rfc4634#section-4.1
208213
[rfc4634-s4.2]: https://tools.ietf.org/html/rfc4634#section-4.2

0 commit comments

Comments
 (0)