Skip to content

JSON schema for output with the --json option #192

Open
@candleindark

Description

@candleindark

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:

  1. Publishing it in a separate repo
  2. Dedicating a subcommand in the validator for generating the JSON schema

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions