webnium / bear-json-schema-validation
Validation with json schema for BEAR Resource
Installs: 22
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 0
Open Issues: 0
pkg:composer/webnium/bear-json-schema-validation
Requires
Requires (Dev)
- phake/phake: *
 
This package is not auto-updated.
Last update: 2025-10-21 10:42:09 UTC
README
Overview
Validation with json schema for BEAR Resource
Usage
Install Webnium\BEAR\JsonSchmaValidation\ValidationModule in your AppModule.
Then this validator intercepts ResourceObject methods annotated with @Validate.
Validation process is below:
- Retrieve schema definition specifed via 
$ro->links['describedBy']. - If schema does not have 
linkproperty or has empty link property, do nothing. - Search an element of 
linkproperty under constraint thatrelproperty is "self" andmethodproperty is called REST method(eg.GETwhen invocated method isonGet). - If found a link element, validate invocation arguments with 
schemaproperty of it. - If not found, search a link element unser constraint that 
relproperty is "self" and withoutmethodproperty. - If found that, validate invocation arguments with 
schemaproperty of it. - If not found again, do nothing.
 
License
This library is destributed under BSD-3-Clause license. See LICENSE file for more infomation.