openownership / data-standard

The Beneficial Ownership Data Standard (BODS) is an open standard providing a specification for modelling and publishing information on the beneficial ownership and control of corporate vehicles
http://standard.openownership.org
Other
63 stars 13 forks source link

adding in entity subtype validation logic and test files #644

Closed kathryn-ods closed 7 months ago

kathryn-ods commented 7 months ago

Overview

Closes #519

Translations

Documentation & Release

kathryn-ods commented 7 months ago
  • a valid test which has an entitytype.type value, but no entitytype.subtype value

Haven't added this explicitly because the majority of the valid entity files are formatted this way (e.g. entity.json) - does it need a dedicated file?

  • an invalid test which has an entitytype.subtype value, but no entitytype.type value

For 'entityType.type is required' we'll presumably have a file with the type missing. Is it also useful to have a file with no type and a subtype? I've added one in but the error message is just that entityType is required.

Also, could you edit all the test filenames to include the field name, i.e "type" (so e.g. "entity_type_state_stateAgency"). It makes it easier to spot at a glance all the test fields for a particular field?

Done

kathryn-ods commented 7 months ago

Agreed with Kadie we didn't need specific tests for a statement without a subtype, a statement with a subtype and no type. Added in test files for missing type and missing entityType as these are required fields.