library bear-json-schema-validation
Validation with json schema for BEAR Resource
webnium/bear-json-schema-validation
Validation with json schema for BEAR Resource
- Wednesday, January 29, 2014
- by MugeSo
- Repository
- 3 Watchers
- 0 Stars
- 16 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 1 Versions
- 0 % Grown
BEAR.JsonSchmaValidation
- master
Overview
Validation with json schema for BEAR Resource, (*1)
Usage
Install Webnium\BEAR\JsonSchmaValidation\ValidationModule in your AppModule.
Then this validator intercepts ResourceObject methods annotated with @Validate., (*2)
Validation process is below:, (*3)
- Retrieve schema definition specifed via
$ro->links['describedBy'].
- If schema does not have
link property or has empty link property, do nothing.
- Search an element of
link property under constraint that rel property is "self" and method property is called REST method(eg. GET when invocated method is onGet).
- If found a link element, validate invocation arguments with
schema property of it.
- If not found, search a link element unser constraint that
rel property is "self" and without method property.
- If found that, validate invocation arguments with
schema property of it.
- If not found again, do nothing.
License
This library is destributed under BSD-3-Clause license.
See LICENSE file for more infomation., (*4)
dev-master
9999999-dev
Validation with json schema for BEAR Resource
Sources
Download
BSD-3-Clause
The Requires
The Development Requires