-
Notifications
You must be signed in to change notification settings - Fork 109
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
Validation of DCAT-US record #4256
Comments
There is an code architecture question of how to best abstract this code and organize it so that it makes sense. What other functions will need to call the validation function? Are we going for a functional vs. object-oriented design? What are the high level abstractions other than "E", "T", "L" that we want to have (if any)? |
As part of cleanup of the repo, also look to tackle:
|
Ruff doesn't like unused imports. The issue derives from an imported fixture function being used as a string within |
Discovered that json-schema has releases to the spec. Since our spec uses release 4, we need to follow the upgrade path from the official documentation to get on the most supported/most recent json-schema spec. |
User Story
In order to validate a DCAT-US record, data.gov admins (and community) wants a well defined json-schema file.
Acceptance Criteria
[ACs should be clearly demoable/verifiable whenever possible. Try specifying them using BDD.]
GIVEN a valid DCAT-US record exists and the validation file
WHEN the record is processed via the validation file
THEN the record passes
AND a test replicates this process
GIVEN an invalid DCAT-US record exists and the validation file
WHEN the invalid record is processed via the validation file
THEN the record fails with meaningful response
AND a test replicates this process
Background
We currently have a custom configuration file that plugs into some custom logic. We theoretically do this now, except we use some strange function called
Draft4Validator
instead of the standard implementation.Security Considerations (required)
None
Sketch
This might be as simple as copying https://github.com/GSA/ckanext-datajson/tree/main/ckanext/datajson/pod_schema/federal-v1.1 to repo created from #4255, and installing https://github.com/python-jsonschema/jsonschema#jsonschema and validating working as expected. We would like to test against our current test files here. There might be new features/broken items lingering, so consider implementing some of the type of tests here (though not the actual code, as much of that isn't what we want or expect the output to look like).
The text was updated successfully, but these errors were encountered: