Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate removing null as a permitted value for countryCode #379

Open
mrshll1001 opened this issue Feb 21, 2024 · 0 comments
Open

Investigate removing null as a permitted value for countryCode #379

mrshll1001 opened this issue Feb 21, 2024 · 0 comments

Comments

@mrshll1001
Copy link
Contributor

Stemming from #378

countryCode currently has the following schema:

{
  "countryCode": {
    "type": [
      "string",
      "null"
    ]
  }
}

Combined with the codelist, this essentially allows the value of countryCode to either be a string which is a country code OR null. In JSON Schema, this has specific semantics where the value is not absent but is indeed null.

This is the only place we see this in the schema, similar fields such as currency just permit the string value. This leads me to think that this was either:

  • a mistake and thus should be rectified.
  • a deliberate design feature to allow declaring a countryCode of null to represent something specific e.g. unrecognised territory.

We should try to determine whether this was as deliberate design feature or an error in the schema. If it is the latter, fixing it would technically constitute a breaking change and thus qualify as a MAJOR upgrade so can be considered for version 2.0.

This is otherwise a straightforward amendment to the schema and would not be intensive.

michaelwood added a commit to ThreeSixtyGiving/dataquality that referenced this issue Apr 1, 2024
This is now failing due to a quirk in the way in which null is
interpreted when not in an embedded codelist. The lack of message here
is consistent with other codelists. This behaviour changed as a result
of using a local version of the grant standard and downloaded codelist
when "resolving" the standard.

ThreeSixtyGiving/standard#379
michaelwood added a commit to ThreeSixtyGiving/dataquality that referenced this issue Apr 9, 2024
This is now failing due to a quirk in the way in which null is
interpreted when not in an embedded codelist. The lack of message here
is consistent with other codelists. This behaviour changed as a result
of using a local version of the grant standard and downloaded codelist
when "resolving" the standard.

ThreeSixtyGiving/standard#379
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant