Skip to content

Conversation

@desttinghim
Copy link

This is my first time making a json schema, so I'm sure there's plenty to be improved. I used check-jsonschema to test that the schema was correct. The command I used was check-jsonschema --schemafile schema.json api/*.json This doesn't make sure that everything is covered under the schema, only that the schema is correct for the parts that have been added.

@emarj
Copy link

emarj commented Apr 19, 2023

I am new to this project and to JSON schemas, but it seems you did a very through job.

I am was surprised to see all the APIs and types (APIRefs) listed in the schema. I guess it depends on how we intend the schema.

If we want the schema to be "a priori", i.e. a json analog of a winmd file (as I imagined), than the enums of types and APIs should not be in there since they (possibly) depends on the version of the original winmd file.

Otherwise if we want the schema to be "a posteriori", then this schema should be auto-generated from the json files (or by the generator itself) since it might be subject to change.

A middle ground might be best: a manually maintained "a priori" schema (without types and APIs enums) and auto-generated metadata files that list the possible values. These metadata files may contain all sort of useful information (for example a map of symbols) and might spare projection maintainers some work.

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.

3 participants