Qore Swagger Module Reference
0.1
|
The Swagger module provides a Swagger 2.0 REST API validation API to Qore.
The primary classes provided by this module:
This class is most often used in the RestClient and RestHandler modules to register a Swagger 2.0 schema for automatic REST API validation.
JSON and YAML serialization and deserialization are supported; XML is currently not supported.
Use the swagger or validator options in the RestClient::constructor()
call to use Swagger 2.0 REST schema validation on the client side with the RestClient
class.
To override the target URL specified in the Swagger schema, use the "url"
option in the RestClient::constructor()
call.
To override the URI base path specified in the Swagger schema, get the Swagger schema object by calling RestClient::getValidator()
, and then call AbstractRestSchemaValidator::setBasePath() on the validator object.
Enforce Swagger REST API validation on the server side by passing a SwaggerSchema object to the RestHandler::constructor()
call as in the following example.