oemetadata icon indicating copy to clipboard operation
oemetadata copied to clipboard

Draft v2.0.0 - Error in new build system prevents correct schema generation

Open jh-RLI opened this issue 4 months ago • 0 comments

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

  1. Start the schema generation script
  2. Validate the resulting schema.json
  3. 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

jh-RLI avatar Oct 04 '24 14:10 jh-RLI