The idea is to provide separate schemata for the SpecIF elements, such as 'dataType', 'resourceClass' or 'resource'. Separate schemata can be used by an API to check incoming data.
There are two alternatives:
JSON Schema allows to separate a schema into multiple files. Then, a schema for each SpecIF element is provided and the SpecIF schema references them.
Keep the SpecIF schema as it is and to provide element-schemata in addition. Advantage is that a single schema file is quicker to load and disadvantage is that duplicate definitions need to be maintained in parallel.
Further thoughts:
the partial element schemata could be used in the API definition, rather than appending separate schema definitions (@oalt )
While a segmented schema with references is preferrable in terms of redundancy avoidance (DRY principle), it is perhaps more difficult to handle, as the complete schema consists of multiple files.
The idea is to provide separate schemata for the SpecIF elements, such as 'dataType', 'resourceClass' or 'resource'. Separate schemata can be used by an API to check incoming data.
There are two alternatives:
Further thoughts: