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

VerificationResult now has a proper mediaType field. #14

Merged
merged 3 commits into from
Oct 10, 2023

Conversation

phillmv
Copy link
Member

@phillmv phillmv commented Oct 5, 2023

Summary

Closes #13

As described in the issue, this PR solves the problem of VerificationResults.Version being insufficiently descriptive and incongruous with the other json document types that are handled in the broader Sigstore ecosystem.

This PR:

  • Changes it from Version int to MediaType string
  • Updates the default value to application/vnd.dev.sigstore.verificationresult+json;version=0.1
  • And for good measure, adds the option to use WithoutArtifactUnsafe() in the sigstore-go binary, which I used to test this feature.

Release Note

  • Changed VerificationResult.Version to VerificationResult.MediaType

Documentation

We haven't created a release for this yet, so I don't think any additional docs changes are necessary beyond what will be generated when we do create a release for this library.

I actually find the switch statement here MORE confusing than the if else,
so I have taken the liberty to disable gocritic for this particular if.

Signed-off-by: Phill MV <[email protected]>
@phillmv phillmv requested a review from a team October 5, 2023 20:01
@phillmv phillmv changed the title VerificationResultsnow has a proper mediaType field. VerificationResult now has a proper mediaType field. Oct 5, 2023
Copy link
Member

@steiza steiza left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@phillmv phillmv merged commit 0187552 into main Oct 10, 2023
9 checks passed
@phillmv phillmv deleted the proper-verification-results-mediatype branch October 10, 2023 20:48
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.

Update VerificationResult to have a proper mediaType
3 participants