Preload schemas on startup for validation #39
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Preload schemas into JSON::Validator
Local referencing seems to be an issue with the json-schema gem. There are a number of issues open:
voxpupuli/json-schema#190
voxpupuli/json-schema#370
voxpupuli/json-schema#411
To get around this we are preloading all the schemas into the
JSON::Validator
at startup using the_name
property as the identifier for each schema. This should allow theJSON::Validator
the ability to more easily find the necessary referenced schemas.Add unit test for MetadataSerialiser
This is a basic schema validation for the attributes that the MetadataSerialiser will be returning when requested.
Also add a fixture for a service. This is only for when creating a service and as such will not have the service_id or created_at as those are set by the metadata api before being returned.
Use larger metadata fixture for integration tests
The integration tests now use the newer service and version fixtures. The version fixture has additional pages and a service id which is more like what the editor will be sending the metadata api.
Bump public suffix to 4.0.6