Apply custom validation rules to REST API node creation #2521
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.
This adds a new hook to the DKAN Dataset REST API module that allows adding to or removing the default validation rules in the module.
The new hook is documented in dkan_dataset_rest_api.api.php.
QA Steps
The fact that the API tests pass should demonstrate that it's working -- this is a developer-facing feature that you would need to write a custom module to test out manually.
Merge notes
I've created this against 7.x-1.x because it is a minor enhancement to existing functionality, with no effect on the database.