open-contracting / standard

Documentation of the Open Contracting Data Standard (OCDS)
http://standard.open-contracting.org/
Other
138 stars 46 forks source link

Consider moving codelist and openCodelist to correct subschema #1631

Open jpmckinney opened 1 year ago

jpmckinney commented 1 year ago

Presently, codelist and openCodelist are at the OCDS "field" level, e.g. properties/tag.

However, tag is an array of codes. In JSON Schema, it would make more sense to add these fields at properties/tag/items (where enum is already, in OCDS 1.1).

By not having the validation properties at the correct level, lib-cove-ocds (and any other JSON Schema validator) needs to implement workarounds.

That said, the effort to update tools might be too great. One option would be to start having tools pre-process schema and move these properties to the correct location. Once all tools have done this, it will be easier to change the schema.

Edit: Since March 2023, lib-cove checks for these at the array item level: https://github.com/OpenDataServices/lib-cove/commit/8e97601ccc263da6671f5ae7cc08c4ff9c2b6fdc

duncandewhurst commented 1 year ago

Noting that OCDS Kit's mapping sheet command would need updating as it expects codelist to be at field level.