Json schema does not specify any mandatory fields
I noticed that the json-schema does not specify any field as required despite json schema supporting such information. This is already inconsistent with how OMI and other tools implement this specification - e.g. id is often required. There are also probably some mandatory fields in resources as discussed in OMI
This is probably something that should be changed to make tools more consistent.
@christian-rli This issue is still there. Are there plans to fix this?
This will be considered in the next minor version.
Is this done in the open PR? https://github.com/OpenEnergyPlatform/oemetadata/pull/43
@Ludee @wingechr @christian-rli I think the issue is not solved with #43. We should determine which fields are considered required e.g. by omi and then mark them accordingly in schema.json.
@Ludee Do we want to add this to v1.5.1? If so, we would need to work out a definition of which fields are mandatory.
Yes, that would be great. I would go with a bare minimum:
- name
- title
- description
- contributors
This issue will be solved by the new badge system developed by @steull All fields from the iron badge must be mandatory! Please link and document here.
We can add the mandatory fields from the bages via the required keyword to the json schema https://json-schema.org/understanding-json-schema/reference/object.html#required-properties
Here is an overview of all mandatory fields:
name resources - name resources - schema - fields - name resources - schema - fields - type resources - schema - primaryKey resources - schema - foreignKeys - fields resources - schema - foreignKeys - reference - resource resources - schema - foreignKeys - reference - fields
@Ludee I got no time to include this in the v1.5.2 release as this might trigger more updates in other repos we can do another v1.5.3 release next week if needed.