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

docs: use valid media_type format in examples #139

Merged
merged 1 commit into from
Jun 6, 2024

Conversation

tarilabs
Copy link
Contributor

@tarilabs tarilabs commented Jun 5, 2024

Hi 👋
proposing with this PR to make documentation media_type examples adhere to the MIME type/Media Type format specification.

Some OCI registry (such as Zot) seems to me they enable by default the validation of media-type according to the standard.
The current examples in the doc don't respect the standard, making the examples fail at runtime.
e.g.

{"level":"error","error":"[layers.0.mediaType: Does not match pattern '^[A-Za-z0-9][A-Za-z0-9!#$&-^_.+]{0,126}/[A-Za-z0-9][A-Za-z0-9!#$&-^_.+]{0,126}$']","goroutine":242,"caller":"zotregistry.dev/zot/pkg/storage/common/common.go:87","time":"2024-06-05T14:26:36.160643+02:00","message":"failed to validate OCIv1 image manifest schema"}

The proposed modification in this PR make use of media_type examples which adhere to the MIME type/Media Type format spec, thus avoiding the validation error from the server/OCI registry side.

@tarilabs tarilabs force-pushed the tarilabs-20240605-docMediaType branch from 4a0c507 to 1cf345e Compare June 5, 2024 12:30
@vsoch
Copy link
Contributor

vsoch commented Jun 5, 2024

This looks good @tarilabs - not sure why the DCO isn't turning green but that's the one thing we are waiting on.

Verified

This commit was signed with the committer’s verified signature.
tarilabs Matteo Mortari
Signed-off-by: tarilabs <matteo.mortari@gmail.com>
@tarilabs tarilabs force-pushed the tarilabs-20240605-docMediaType branch from 1cf345e to 6677014 Compare June 6, 2024 08:07
@tarilabs
Copy link
Contributor Author

tarilabs commented Jun 6, 2024

This looks good @tarilabs - not sure why the DCO isn't turning green but that's the one thing we are waiting on.

thanks @vsoch I've bumped the commit message maybe it was missing a double empty line, not sure, but seems to be passing now 👍 🚀

@vsoch vsoch merged commit 571a23f into oras-project:main Jun 6, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants