-
Notifications
You must be signed in to change notification settings - Fork 13
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
person-statement.json & ownership-or-control-statement.json - statementType should not have codelist options #375
Comments
(Done as part of #64 ) Also see openownership/data-standard#375
I think it's redundant to have the enum values in the json schema as well as in the codelist csvs. Now the compile tool fills in the enums automatically I can't think of a good reason to add them by hand to the json schema, so we can remove them. In the The statementType.csv codelist is there for the purpose of documenting the types of statements available though. If we keep the csv file but remove the links to it from the schema, a test should fail. There's already a small tweak for |
So would we use
Would that break anything in the docs, or are the docs generated from the compiled schema anyway? (I think it was @odscjames who suggested that we add a compiled version of the schema to the repo. For the record, I agree. And its availability should be flagged in the docs.) Obviously these last points aren't directly related to this issue, so if we think we want to remove the enums, let's spin up another ticket asap. |
No, Enum - this is already in place and won't be changed by this work. The validation libraries are already looking for enum. Created new issue for codelist values being duplicated: #380 Done pull request to fix this issue: #382 |
Note each of the following, for statementType, has an enum with only one option and NO codelist options:
These ones, for statementType, has an enum with only one option but DO have codelist options:
Them having the code list options is a problem because when you compile the schema with compiletojsonschema, the tool sees the codelist options and then helpfully fills in the Enum with all the options. Then the oneOf mechanism that selects between the 3 statement types is broken and validation fails.
I see they were deliberately put back recently:
However I can't see any description for this change beyond "make it consistent", so I'm hoping we can remove it?
The text was updated successfully, but these errors were encountered: