ids-specification
ids-specification copied to clipboard
Pipeline to check the Correctness of Schemas, Shapes, and Examples
While updating the documents, we sometimes miss to touch all affected files, or add typos when touching example or schema files. Having a pipeline that checks the correctness will significantly increase the quality of the protocol.
Proposal:
- Check all JSON Schema files that they are correct JSON Schema by simply loading them into a JSON Schema Validator. Parsing successful --> schema files are syntactically correct.
- Check all SHACL files by loading them into a SHACL Validator. Parsing successful --> shape files are syntactically correct.
- Validate all example files against both the JSON Schemas and the Shapes.
A PR can only be merged if all three checks are successful.
Github Actions provide many of the required features. We need to create a PoC to see if anything is missing.
Update: General JSON Schema validation works, however, not yet for more than one JSON file.
Solution has been prepared here:
- https://github.com/simantvermasap/ids-specification/blob/5145306dae3d8a7691c63f92652c191976a02df8/.github/workflows/validate-shapes.yml
- https://github.com/simantvermasap/ids-specification/blob/5145306dae3d8a7691c63f92652c191976a02df8/.github/workflows/validate-json-schemas.yml
@ssteinbuss please move this issue to the new repo. No further activity will happen in this one. The proposed solution will work also in the new repo as long as the folder structure and file naming convention won't be changed.