Skip to content

🐛 Remove omitempty from score fields on generated models. #264

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

Merged
merged 1 commit into from
Jan 10, 2023

Conversation

spencerschrock
Copy link
Member

Fixes ossf/scorecard#2432

Specifies x-omitempty: false for score fields inopenapi.yaml. I ran make swagger after for the auto-generated files. Note for Makefile.swagger, the differences are deduplication of / in the paths. e.g:
app/generated/models//scorecard_version.go is now app/generated/models/scorecard_version.go

I tested locally with https://github.com/fsouza/fake-gcs-server and curl and it seems to have fixed the issue:

curl -X 'GET'   'http://127.0.0.1:38239/projects/github.com/numpy/numpy'   -H 'accept: application/json' | jq
...
{
      "name": "Signed-Releases",
      "score": 0,
      "reason": "0 out of 5 artifacts are signed or have provenance",
...

I see notes on the README that a new tag is required, as well as some manual deployment commands since openapi.yaml was modified. Beyond that, I'm unfamiliar with the webapp deployment process, so some handholding would be wise.

@netlify
Copy link

netlify bot commented Nov 21, 2022

Deploy Preview for ossf-scorecard canceled.

Name Link
🔨 Latest commit acf99ad
🔍 Latest deploy log https://app.netlify.com/sites/ossf-scorecard/deploys/63bdb2f3ff27cd000b2f4fb3

Copy link
Member

@naveensrinivasan naveensrinivasan left a comment

Choose a reason for hiding this comment

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

Thanks

@naveensrinivasan naveensrinivasan enabled auto-merge (squash) January 10, 2023 18:48
@naveensrinivasan naveensrinivasan merged commit 924117a into ossf:main Jan 10, 2023
@spencerschrock spencerschrock deleted the score-no-omit branch January 11, 2023 05:55
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.

BUG (?): JSON output omits checks' "score": 0
2 participants