Description
Since the goal of the --json
option is to make the validation results machine readable, it seems to me that the validator can benefit from having a JSON schema published for its output with the --json
option. It's the same benefit that a web API gains from having an OpenAPI schema.
In working with the JSON output of the validator, currently, I need to code up models based on analysis of models (and related models) defined in https://github.com/bids-standard/bids-validator/blob/main/src/types/validation-result.ts. On the other hand, if a JSON schema for JSON output is available, the models I am current coding can be automatically generated using tools such as https://koxudaxi.github.io/datamodel-code-generator/.
I can think two ways to make the JSON schema available:
- Publishing it in a separate repo
- Dedicating a subcommand in the validator for generating the JSON schema