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

Introduce JSON schema for deny.toml #635

Closed
wants to merge 20 commits into from

Conversation

Veetaha
Copy link
Contributor

@Veetaha Veetaha commented Mar 17, 2024

Status: going through trailing design iterations, there is enough code to start thinking of making it into a separate tool living in a separate repo.


This is the work that is intended to close #632

This PR is not complete yet, it already works nicely, but I want to improve it more. Almost nothing to review. It's just a draft PR that I'll try to finish as soon as I have time.

TODO

The things to do in this PR:

  • (WIP) Complete the specification of deny.schema.yml with the remaining shape of deny.toml configs
  • Implement a custom post-processing for the YML schema definition to add a compat crutch for old JSON schema formats that don't support default annotations and enum documentation (not supported in any version)
  • Add tests to CI that validate the freshness of the JSON variant of the schema
  • Add code generation of markdown documentation for the mdbook. Reseach jsonschema2md for that or write something custom.
  • Add code generation for the Rust type definitions from the JSON schema. Maybe we could use some script that does that and then keep the custom deserialization logic that uses toml_span

TODO after merge

Make a PR to the SchemaStore repo with the entry for deny.toml file association.

@@ -1,3 +1,5 @@
#:schema ./deny.schema.json
Copy link
Contributor Author

@Veetaha Veetaha Mar 17, 2024

Choose a reason for hiding this comment

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

TODO: this is temporary. Needs to be removed before merging. Schema should be inferred from the schemastore

@Veetaha
Copy link
Contributor Author

Veetaha commented Aug 12, 2024

I went a bit too far with this trying to design a general-purpose tool, but unfortunately, I don't have capacity to finish this work. I'll close this PR for now to prevent it from hanging. I'll leave the stage open for anyone else.

@Veetaha Veetaha closed this Aug 12, 2024
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.

Provide JSON schema for deny.toml file for better IDE experience
1 participant