Base interface for HTTP request validation with API specification
Interface for OpenAPI3RouterFactory. <br/> To add an handler, use @see \io\vertx\jphp\ext\web\api\contract\openapi3\OpenAPI3RouterFactory::addHandlerByOperationId<br/> Usage example: <pre> <code>OpenAPI3RouterFactory.create(vertx, "src/resources/spec.yaml", asyncResult -> { if (!asyncResult.succeeded()) { // IO failure or spec invalid</code> else { OpenAPI3RouterFactory routerFactory = asyncResult.result(); routerFactory.addHandlerByOperationId("operation_id", routingContext -> { // Do something }, routingContext -> { // Do something with failure handler }); Router router = routerFactory.getRouter(); } }); } </pre> <br/> Handlers are loaded in this order:<br/> <ol> <li>Body handler (Customizable with </li> <li>Custom global handlers configurable with </li> <li>Global security handlers defined in upper spec level</li> <li>Operation specific security handlers</li> <li>Generated validation handler</li> <li>User handlers or "Not implemented" handler</li> </ol>
Interface that define methods for deserialization of array and objects
This interface is used to add custom <b>synchronous</b> functions inside validation process. You can add it in
An interface for add HTTP Request validation. This class can validate parameters inside query, path, headers an body (watch below) <br/> You can assign multiple body type at the same time(for example a JSON schema together with a XML schema). This interface support: <ul> <li>application/x-www-form-urlencoded</li> <li>multipart/form-data</li> <li>application/xml</li> <li>application/json</li> </ul> Also you can add a form parameter for validation without care about content type of your request. For form parameters this interface support both "multipart/form-data" and "application/x-www-form-urlencoded" <br/> This interface allow extra parameters in the request, so it doesn't care if in a request there's a parameter without a specified validation rule <br/> If a parameter is flagged as an array, it will be validated also if the size of array is 1 element
Interface for declaration of method for validate a specific parameter type.<br/> If you want to implement your own type validator, you need only to implement