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

Generate validation report as JSON #23

Merged
merged 8 commits into from
Apr 26, 2021

Conversation

psmiraglia
Copy link
Member

@psmiraglia psmiraglia commented Apr 23, 2021

Scope of the pull request

The PR introduces the --out-form and --out-file switches. They instruct the application about how the validation report must be serialized (e.g. JSON, TXT, XML) and where it must be saved.

$ spid-compliant-certificates validator --out-file report.json --out-form json
   _____ _____ _____ _____     _____                      _ _             _
  / ____|  __ \_   _|  __ \   / ____|                    | (_)           | |
 | (___ | |__) || | | |  | | | |     ___  _ __ ___  _ __ | |_  __ _ _ __ | |_
  \___ \|  ___/ | | | |  | | | |    / _ \| '_ ` _ \| '_ \| | |/ _` | '_ \| __|
  ____) | |    _| |_| |__| | | |___| (_) | | | | | | |_) | | | (_| | | | | |_
 |_____/|_|   |_____|_____/   \_____\___/|_| |_| |_| .__/|_|_|\__,_|_| |_|\__|
   _____          _   _  __ _           _          | |
  / ____|        | | (_)/ _(_)         | |         |_|
 | |     ___ _ __| |_ _| |_ _  ___ __ _| |_ ___  ___
 | |    / _ \ '__| __| |  _| |/ __/ _` | __/ _ \/ __|
 | |___|  __/ |  | |_| | | | | (_| (_| | ||  __/\__ \
  \_____\___|_|   \__|_|_| |_|\___\__,_|\__\___||___/  v0.1




[I] Validating certificate /path/to/crt.pem against public sector specifications
[I] Certificate /path/to/crt.pem matches the public sector specifications

[ . . . ]

[I] Saving report as JSON in /path/to/report.json

Closed issues

Added issues

Tests

  • I manually tested it
  • I added unit test
  • I ran the existing unit test and they do not fail

@psmiraglia psmiraglia added the enhancement New feature or request label Apr 23, 2021
@psmiraglia psmiraglia marked this pull request as ready for review April 23, 2021 13:05
@psmiraglia psmiraglia requested a review from peppelinux April 23, 2021 13:06
@psmiraglia psmiraglia added this to the 0.2 milestone Apr 23, 2021
@peppelinux peppelinux self-requested a review April 26, 2021 10:15
@psmiraglia psmiraglia merged commit ad28b6f into italia:main Apr 26, 2021
@psmiraglia psmiraglia deleted the feat/validation-report-as-json branch April 26, 2021 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrong f-string syntax Validator report in json format
2 participants