oemetadata
oemetadata copied to clipboard
Draft v2.0.0 - Error in new build system prevents correct schema generation
Description of the issue
The new build system to generate the full chain of: schema.json -> template.json / example.json is currently broken. There is an error that occurs during the schema resolve step. In this step the structure is read and the $refs are resolved. Based on the structure, the resources list element is generated. This element contains n objects. The jsonschema property is missing some properties:
type": "object", properties": {
This leads to a malformed jsonschema.
Additionally, the group keys from the structure files are copied to the the generated schema.json. This is not expected as they are only used to better group the $ref elements. Thy should be replaced with the content form the reference file.
Steps to Reproduce
- Start the schema generation script
- Validate the resulting schema.json
- try to generate an example or template json file
Ideas of solution
Fix the scripts to properly resolve the refs and replace the ref group field names in the resulting schema.json.
Workflow checklist
- [ ] I am aware of the workflow in CONTRIBUTING.md