ids-specification icon indicating copy to clipboard operation
ids-specification copied to clipboard

Pipeline to check the Correctness of Schemas, Shapes, and Examples

Open sebbader-sap opened this issue 1 year ago • 4 comments

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:

  1. 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.
  2. Check all SHACL files by loading them into a SHACL Validator. Parsing successful --> shape files are syntactically correct.
  3. Validate all example files against both the JSON Schemas and the Shapes.

A PR can only be merged if all three checks are successful.

sebbader-sap avatar Nov 29 '23 14:11 sebbader-sap

Github Actions provide many of the required features. We need to create a PoC to see if anything is missing.

sebbader-sap avatar Nov 29 '23 14:11 sebbader-sap

Update: General JSON Schema validation works, however, not yet for more than one JSON file.

sebbader-sap avatar Feb 16 '24 17:02 sebbader-sap

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

sebbader-sap avatar Jun 20 '24 08:06 sebbader-sap

@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.

sebbader-sap avatar Jun 20 '24 08:06 sebbader-sap