-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
[Task] Check and publish the JSON Schema definition #183
Comments
Be careful to enum generation. It doesn't seems to work fine |
Also upgrade the README documentation |
The best way would be to generate Markdown from JSON Schema or create a documentation website with docausorus: https://json-schema.org/implementations#documentation-generators |
Might be interesting of renaming the definition with serde or schemars rename attribute: https://graham.cool/schemars/deriving/attributes/#rename |
Renaming is done. A markdown generation could be nice: bunx @adobe/jsonschema2md --input docs -n -o docs/schema This needs to imrpove custom schemas (VecPatch, ParsableStruct...) to use $ref |
Full doc generation: mkdir -p docs
cargo run -F cli -F json-schema -- schema > docs/dofigen.schema.json
sed -i -E 's/("[$]ref"[:] ")/\1.\/dofigen.schema.json#/g' docs/dofigen.schema.json
bunx @adobe/jsonschema2md --input docs -n -o docs/schema The generated doc is not great... |
What should be done
In order to make it checkable and simple to understand, create a JSON Schema of the configuration file and publish it to SchemaStore to allow auto-completion in IDE.
Technical recommandation
There are two ways to add the schema:
IMO, the best may is to generate the schema and include it into the release artifacts, and define it as self-hosted with the latest release artefact as URL.
Ecological concerns
It might be better to have a single file instead of merging it at release time since it might not change a lot, but generating the schema with schemars would avoid errors.
Is this task linked with any other ?
The text was updated successfully, but these errors were encountered: