[OS-17] JSON Schema validation
Unknown(s), to debate(s), discussables:
- Where should we raise JsonApi::Parameters translator errors? In which cases? This is important, because if we do not raise an error, then in the default behaviour - no validation will happen.
- How to handle JSON Schema invalidation / updates?
Things left to do:
- make the schema more liberal for root path keys OR handle removal of
action,controllerand other Rails-specific middleware parameters that are added during the request cycle to the ActionController::Parameters object instance (right now they are validated as well and the schema makes a note about it that these are not recognized or expected keys), - find out how to handle this as a major or minor (non-breaking) version
The current version works "good enough" for us at LL, there are exactly 3 tests failing and they are just nontypical usage of jsonapi-parameters . Our recommendation is for the current version to be merged but with at least the "MINOR" version increase
@ipepe I'm wondering whether other users may see a breaking change while updating. If I understand correctly, you are experiencing this, so this would imply a breaking change version bump.
Could you share (perhaps in a confidential environment) what are the non-typical usages? Specific code lines where you execute jsonapi_parameters translation?
Maybe this way we could provide an interface that would not enforce the change so the existing users would be able to take control over the update.