open-contracting / lib-cove-ocds

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

Additional fields are under-reported: Check against schema, not just regex #73

Open robredpath opened 4 years ago

robredpath commented 4 years ago

In https://github.com/OpenDataServices/cove/issues/679 we identified an issue with fields containing an _ not being detected as additional fields.

Functionally, this is identical to https://github.com/OpenDataServices/cove/issues/402

We now correctly report additional fields that contain an _ as long as the part that follows the _ doesn't conform to the format of a BCP 47 language tag. However, that's quite a wide range! @jpmckinney 's comment at https://github.com/OpenDataServices/cove/issues/679#issuecomment-338310525 gives a clear example.

We should make the check smarter, such that if the first part before the _ isn't a field in the standard, we assume that it's an additional field and report on it.

jpmckinney commented 4 years ago

Requires a change to get_additional_fields_info (or sub-functions) in lib-cove.