open-contracting / lib-cove-ocds

A data review library for the Open Contracting Data Standard (OCDS)
Other
0 stars 0 forks source link

Closed codelists are not validated in record packages that declare extensions #112

Closed duncandewhurst closed 1 year ago

duncandewhurst commented 3 years ago

Example

To reproduce:

  1. Take the example record
  2. Declare the additional contact points extension
  3. In the compiled release, change initiationType to 'abc' and tender.status to 'abc'
  4. Check the data using the DRT. It reports no errors.

The issue applies to compiled and embedded releases, but not to linked releases.

Related to CRM-7263

jpmckinney commented 1 year ago

In fact, hardly anything is validated in record packages when using extensions.

That is because items was missing from this JSON path:

https://github.com/open-contracting/lib-cove-ocds/blob/19ed9b3f0e392e9341206c5296d79c4bcc6f1206/libcoveocds/schema.py#L223-L225

jpmckinney commented 1 year ago

FYI @yolile No record packages that used extensions would return any structural errors (except at the package level) since at least August 2020 (https://github.com/open-contracting/lib-cove-ocds/commit/388df456112c5c6277ede07cd93f67cd763cb8b6#diff-28e5f63f790bad3d4f5a9ae1446a567329ceb1fff9234109c2cb6b5c628a1d0b), and maybe earlier (I'm not going to dig through lib-cove history at this point).