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

Fix json formatting in registry api docs #3801

Merged
merged 1 commit into from Jul 22, 2023

Conversation

iasoon
Copy link
Contributor

@iasoon iasoon commented Nov 24, 2022

Currently the formatting of example JSON is a bit inconsistent. This PR makes sure they are all formatted using a 4 space indent, and resolves some minor syntax errors.

Signed-off-by: Ilion Beyst <ilion.beyst@gmail.com>
@codecov-commenter
Copy link

Codecov Report

Base: 56.59% // Head: 56.59% // No change to project coverage 👍

Coverage data is based on head (8938454) compared to base (85d4039).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3801   +/-   ##
=======================================
  Coverage   56.59%   56.59%           
=======================================
  Files         105      105           
  Lines       10658    10658           
=======================================
  Hits         6032     6032           
  Misses       3951     3951           
  Partials      675      675           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Comment on lines -1767 to +1776
"name": <name>,
"tag": <tag>,
"fsLayers": [
{
"blobSum": "<digest>"
},
...
]
],
"history": <v1 images>,
"signature": <JWS>
"name": <name>,
"tag": <tag>,
"fsLayers": [
{
"blobSum": "<digest>"
},
...
],
"history": <v1 images>,
"signature": <JWS>
Copy link
Member

@thaJeztah thaJeztah Nov 25, 2022

Choose a reason for hiding this comment

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

Some of this document is generated using the spec.md.tmpl in the same directory.

I'm not sure if we still generate, but I did a quick compare, and it looks like the JSON examples below line 1110 are generated.

So perhaps we should stick to 2 spaces for indentation (instead of 4) so that if we regenerated, the indentation would be the same.

Lines before 1110 are ok (but would be good to also use 2 spaces; there's indeed some mistakes in there; would be good to also sync those changes to the spec.md.tmpl so that regenerating the file wouldn't revert those changes.

Copy link
Member

Choose a reason for hiding this comment

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

@iasoon do you mind having a look at updating the api.md.tmpl file so the generator doesnt override y9our changes.

Copy link
Member

Choose a reason for hiding this comment

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

Ping @iasoon

Copy link
Collaborator

@wy65701436 wy65701436 left a comment

Choose a reason for hiding this comment

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

lgtm

@milosgajdos milosgajdos merged commit 7b50256 into distribution:main Jul 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants