Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

Commit

Permalink
Add example of empty response and update wording
Browse files Browse the repository at this point in the history
Signed-off-by: Lahiru Dissanayake <[email protected]>
  • Loading branch information
lahirurd committed Sep 25, 2021
1 parent 3e7c577 commit cafd573
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions manifest-referrers-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ In future versioned releases, responses MAY be extended to include a `data` fiel

This paged result MUST return the following elements:

- `references`: A list of [artifact descriptors][descriptor] that reference the given `subject`. The list MUST be empty if there are no artifacts referencing the given `subject`.
- `references`: A list of [artifact descriptors][descriptor] that reference the given manifest. The list MUST be empty if there are no artifacts referencing the given manifest.

**example result of artifacts that reference the `net-monitor` image:**
```json
Expand All @@ -69,6 +69,13 @@ This paged result MUST return the following elements:
}
```

**example result for a manifest that has no artifacts referencing it:**
```json
{
"references": []
}
```

### Paging Results

The `/referrers` API MUST provide for paging, returning a list of [artifact descriptors](./descriptor.md).
Expand Down Expand Up @@ -153,7 +160,7 @@ GET /oras/artifacts/v1/net-monitor/manifests/sha256:3c3a4604a545cdc127456d94e421

### Error Handling

If the `subject` identified by the digest does not exist in the repository, the registry MUST return a `404` response with the error code `MANIFEST_UNKNOWN`.
If the manifest does not exist, the registry MUST return a `404` response with the error code `MANIFEST_UNKNOWN`.

## Further Reading

Expand Down

0 comments on commit cafd573

Please sign in to comment.