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

Add JSON Schema support via schemars #128

Merged
merged 3 commits into from
Feb 20, 2024
Merged

Add JSON Schema support via schemars #128

merged 3 commits into from
Feb 20, 2024

Conversation

bradlarsen
Copy link
Collaborator

@bradlarsen bradlarsen commented Feb 19, 2024

This adds a JSON Schema for Nosey Parker's JSON report format. This is implemented using the schemars crate to mostly automatically generate the schema from Rust data types.

The schema generation mechanism is accessed using a new json-schema top-level command, which is hidden from help. This prints the generated schema to stdout.

The generated schema is included in the release builds.

Fixes #72.

The final step of actually emitting the JSON schema still needs to be plumbed in.
But the types involved can all emit schema information now.
@bradlarsen bradlarsen added documentation Improvements or additions to documentation enhancement New feature or request integration Related to integration with other systems labels Feb 19, 2024
@bradlarsen bradlarsen self-assigned this Feb 19, 2024
Also, hide the `shell-completions` command from help output.
That command is really only used for release packaging; it's not
something that would be run by a regular user of Nosey Parker.
@bradlarsen bradlarsen marked this pull request as ready for review February 20, 2024 00:33
@bradlarsen bradlarsen merged commit c640978 into main Feb 20, 2024
8 checks passed
@bradlarsen bradlarsen deleted the json-schema branch February 20, 2024 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request integration Related to integration with other systems
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create a schema for the report JSON output
1 participant