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

🌱 Format API JSON output #265

Merged
merged 3 commits into from
Nov 28, 2022
Merged

Conversation

spencerschrock
Copy link
Contributor

@spencerschrock spencerschrock commented Nov 22, 2022

Partially addresses #206

Originally proposed in ossf/scorecard#2251, but the JSON marshalling/unmarshalling in the webapp would overrule any change made there.

It's introduced as a flag, where the default is no indentation / pretty printing. This matches the current behavior.
I'm unfamiliar with CloudRun, so if it's hard to specify in the production deployment a static value can be used.

./scorecard-webapp -h
Usage:
  scorecard-server [OPTIONS]

OpenSSF Scorecard API

API to interact with a project's published Scorecard result

      --cleanup-timeout duration     grace period for which to wait before killing idle connections (default 10s)
      --graceful-timeout duration    grace period for which to wait before shutting down the server (default 15s)
      --host string                  the IP to listen on (default "localhost")
      --indent string                the indent used in json output (default no ident "")

...

@netlify
Copy link

netlify bot commented Nov 22, 2022

Deploy Preview for ossf-scorecard canceled.

Name Link
🔨 Latest commit 6fb9624
🔍 Latest deploy log https://app.netlify.com/sites/ossf-scorecard/deploys/63850c95a5af5400099bdd40

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.

@spencerschrock Can you please address the linter issues?

Thanks

Signed-off-by: Spencer Schrock <sschrock@google.com>
Signed-off-by: Spencer Schrock <sschrock@google.com>
Signed-off-by: Spencer Schrock <sschrock@google.com>
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