Qore RestSchemaValidator Module Reference  2.1.2
RestSchemaValidator::AbstractRestSchemaValidator Class Referenceabstract

abstract REST schema validation classes More...

Public Member Methods

 constructor ()
 Creates the object without a logger.
 
 constructor (Logger::Logger logger)
 Creates the object with the given logger.
 
string getBasePath ()
 returns the base path prefix for all requests in this schema More...
 
DataProvider::AbstractDataProvider getDataProvider (HTTPClient rest)
 returns a data provider object for this connection, if supported by any REST schema validator object More...
 
hash< RestExampleRequestInfogetExampleRequest (string method, string path, *softlist< string > content_types)
 returns a hash of example message information for the given request More...
 
hash< RestExampleResponseInfogetExampleResponse (string method, string path, int code, *softlist< string > content_types)
 returns a hash of example message information for the given request More...
 
string getHash ()
 returns a unique hash for the schema that can be used to compare schemas More...
 
hash< string, list< string > > getPathOperationHash ()
 returns a hash of URI paths as keys with values as lists of supported HTTP methods More...
 
hash< RestQoreExampleCodeInfogetQoreExampleRequest (string method, string path)
 returns a hash of example Qore code for the given request More...
 
hash< RestQoreExampleCodeInfogetQoreExampleResponse (string method, string path, int code)
 returns example Qore code for the given response More...
 
string getTargetUrl ()
 returns the target URL for the schema More...
 
bool managesUriPath ()
 returns True if the provider manages the URI path More...
 
hash< RestRequestServerInfoparseRequest (string method, string path, *data http_body, reference< hash< auto >> headers)
 processes and parses a client request and returns the deserialized message body (if any) More...
 
hash< RestResponseClientInfoparseResponse (string method, string path, int code, *data response_body, hash< auto > hdr)
 parses and validates the response from the server and returns a hash of the processed info More...
 
hash< RestRequestClientInfoprocessRequest (string method, string path, auto body, *hash< auto > headers, *softlist< string > content_types)
 processes a client-side REST request and returns a hash that can be used to make the outgoing client-side HTTP request More...
 
hash< HttpResponseInfo > processResponse (string method, string path, int code, auto response_body, *hash< auto > headers, *softlist< string > content_types)
 Processes a REST response with a serialized message body. More...
 
 setBasePath (string basePath)
 overrides the basePath value More...
 
 setLogger (Logger::Logger logger)
 Sets a new logger.
 

Private Member Methods

bool checkResponseContentTypeHeader (reference< hash< HttpResponseInfo >> resp, auto body, *hash< auto > headers, *softlist< string > content_types)
 Check if the headers contain a content-type header which is accepted and if so, modify the response hash. More...
 
string getBasePathImpl ()
 returns the base path prefix for all requests in this schema More...
 
DataProvider::AbstractDataProvider getDataProviderImpl (HTTPClient rest)
 returns a data provider object for this connection, if supported by any REST schema validator object More...
 
hash< RestExampleRequestInfogetExampleRequestImpl (string method, string path, *softlist< string > content_types)
 returns a hash of example message information for the given request More...
 
hash< RestExampleResponseInfogetExampleResponseImpl (string method, string path, int code, *softlist< string > content_types)
 returns a hash of example message information for the given request More...
 
abstract string getHashImpl ()
 returns a unique hash for the schema that can be used to compare schemas More...
 
string getHashImpl ()
 returns a unique hash for the schema that can be used to compare schemas More...
 
hash< string, list< string > > getPathOperationHashImpl ()
 returns a hash of URI paths as keys with values as lists of supported HTTP methods More...
 
hash< RestQoreExampleCodeInfogetQoreExampleRequestImpl (string method, string path)
 returns a hash of example Qore code for the given request More...
 
hash< RestQoreExampleCodeInfogetQoreExampleResponseImpl (string method, string path, int code)
 returns example Qore code for the given response More...
 
abstract string getTargetUrlImpl ()
 returns the target URL for the schema More...
 
string getTargetUrlImpl ()
 returns the target URL for the schema More...
 
bool managesUriPath ()
 returns True if the provider manages the URI path More...
 
hash< RestRequestServerInfoparseRequestImpl (string method, string path, *data http_body, reference< hash > headers)
 processes and parses a client request and returns the deserialized message body (if any) More...
 
hash< RestResponseClientInfoparseResponseImpl (string method, string path, int code, *data response_body, hash< auto > hdr)
 parses and validates the response from the server and returns a hash of the processed info More...
 
abstract hash< RestRequestClientInfoprocessRequestImpl (string method, string path, auto body, *hash< auto > headers, *softlist< string > content_types)
 processes a client-side REST request and returns a hash that can be used to make the outgoing client-side HTTP request More...
 
hash< RestRequestClientInfoprocessRequestImpl (string method, string path, auto body, *hash< auto > headers, *softlist< string > content_types)
 processes a client-side REST request and returns a hash that can be used to make the outgoing client-side HTTP request More...
 
hash< HttpResponseInfo > processResponseImpl (string method, string path, int code, auto response_body, *hash< auto > headers, *softlist< string > content_types)
 processes a REST response with a serialized message body, validates any response data against schema definitions if possible More...
 
 setBasePathImpl (string basePath)
 overrides the basePath value More...
 

Private Attributes

const DataDeserializationSupport = ...
 Data deserialization support MIME types to codes and de/serialization functions.
 
const DataSerializationSupport = ...
 processes and parses a client request and returns the deserialized message body (if any) /‍** More...
 
const NullSchemaHashStr = "<null rest schema>"
 a unique hash for the null schema More...
 

Detailed Description

abstract REST schema validation classes

Member Function Documentation

◆ checkResponseContentTypeHeader()

bool RestSchemaValidator::AbstractRestSchemaValidator::checkResponseContentTypeHeader ( reference< hash< HttpResponseInfo >>  resp,
auto  body,
*hash< auto >  headers,
*softlist< string content_types 
)
private

Check if the headers contain a content-type header which is accepted and if so, modify the response hash.

Parameters
respresponse hash
bodyresponse body data (if any)
headersHTTP headers to include in the response
content_typesthe accepted MIME types in order of preference
Returns
whether the headers contained a Content-Type header and the rv was modified
Note
if there are more Content-Type headers, then False is returned and response is not modified

◆ getBasePath()

string RestSchemaValidator::AbstractRestSchemaValidator::getBasePath ( )

returns the base path prefix for all requests in this schema

Returns
the base path prefix for all requests in this schema

◆ getBasePathImpl()

string RestSchemaValidator::AbstractRestSchemaValidator::getBasePathImpl ( )
private

returns the base path prefix for all requests in this schema

Returns
the base path prefix for all requests in this schema

◆ getDataProvider()

DataProvider::AbstractDataProvider RestSchemaValidator::AbstractRestSchemaValidator::getDataProvider ( HTTPClient  rest)

returns a data provider object for this connection, if supported by any REST schema validator object

Parameters
restthe RestClient object to make the connection
Returns
a data provider object for this connection, if supported by any REST schema validator object
Exceptions
DATA-PROVIDER-ERRORthis class does not support the data provider API
Note
rest must be a RestClient object; this parameter is declared with a base class to avoid a circular dependency between modules

◆ getDataProviderImpl()

DataProvider::AbstractDataProvider RestSchemaValidator::AbstractRestSchemaValidator::getDataProviderImpl ( HTTPClient  rest)
private

returns a data provider object for this connection, if supported by any REST schema validator object

Parameters
restthe RestClient object to make the connection
Returns
a data provider object for this connection, if supported by any REST schema validator object
Exceptions
DATA-PROVIDER-ERRORthis class does not support the data provider API
Note
rest must be a RestClient object; this parameter is declared with a base class to avoid a circular dependency between modules

◆ getExampleRequest()

hash<RestExampleRequestInfo> RestSchemaValidator::AbstractRestSchemaValidator::getExampleRequest ( string  method,
string  path,
*softlist< string content_types 
)

returns a hash of example message information for the given request

Parameters
methodthe HTTP method (case insensitive)
paththe URI path of the request
content_typesthe desired MIME types for serialization in order of preference; if none are usable then an exception is thrown
Returns
a RestExampleRequestInfo of example message information for the given request

◆ getExampleRequestImpl()

hash<RestExampleRequestInfo> RestSchemaValidator::AbstractRestSchemaValidator::getExampleRequestImpl ( string  method,
string  path,
*softlist< string content_types 
)
private

returns a hash of example message information for the given request

Parameters
methodthe HTTP method (case insensitive)
paththe URI path of the request
content_typesthe desired MIME types for serialization in order of preference; if none are usable then an exception is thrown
Returns
a RestExampleRequestInfo of example message information for the given request

◆ getExampleResponse()

hash<RestExampleResponseInfo> RestSchemaValidator::AbstractRestSchemaValidator::getExampleResponse ( string  method,
string  path,
int  code,
*softlist< string content_types 
)

returns a hash of example message information for the given request

Parameters
methodthe HTTP method of the original request (case insensitive)
paththe URI path of the original request
codethe HTTP response code of the response
content_typesthe desired MIME types for serialization in order of preference; if none are usable then an exception is thrown
Returns
a RestExampleResponseInfo hash giving example response message info

◆ getExampleResponseImpl()

hash<RestExampleResponseInfo> RestSchemaValidator::AbstractRestSchemaValidator::getExampleResponseImpl ( string  method,
string  path,
int  code,
*softlist< string content_types 
)
private

returns a hash of example message information for the given request

Parameters
methodthe HTTP method of the original request (case insensitive)
paththe URI path of the original request
codethe HTTP response code of the response
content_typesthe desired MIME types for serialization in order of preference; if none are usable then an exception is thrown
Returns
a RestExampleResponseInfo hash giving example response message info

◆ getHash()

string RestSchemaValidator::AbstractRestSchemaValidator::getHash ( )

returns a unique hash for the schema that can be used to compare schemas

Returns
a unique hash for the schema that can be used to compare schemas
Since
RestSchemaValidator 2.0

◆ getHashImpl() [1/2]

abstract string RestSchemaValidator::AbstractRestSchemaValidator::getHashImpl ( )
privatepure virtual

returns a unique hash for the schema that can be used to compare schemas

Returns
a unique hash for the schema that can be used to compare schemas
Since
RestSchemaValidator 2.0

◆ getHashImpl() [2/2]

string RestSchemaValidator::AbstractRestSchemaValidator::getHashImpl ( )
private

returns a unique hash for the schema that can be used to compare schemas

Returns
a unique hash for the schema that can be used to compare schemas
Since
RestSchemaValidator 2.0

◆ getPathOperationHash()

hash<string, list<string> > RestSchemaValidator::AbstractRestSchemaValidator::getPathOperationHash ( )

returns a hash of URI paths as keys with values as lists of supported HTTP methods

Returns
a hash of URI paths as keys with values as lists of supported HTTP methods

◆ getPathOperationHashImpl()

hash<string, list<string> > RestSchemaValidator::AbstractRestSchemaValidator::getPathOperationHashImpl ( )
private

returns a hash of URI paths as keys with values as lists of supported HTTP methods

Returns
a hash of URI paths as keys with values as lists of supported HTTP methods

◆ getQoreExampleRequest()

hash<RestQoreExampleCodeInfo> RestSchemaValidator::AbstractRestSchemaValidator::getQoreExampleRequest ( string  method,
string  path 
)

returns a hash of example Qore code for the given request

Parameters
methodthe HTTP method (case insensitive)
paththe URI path of the request
Returns
a RestQoreExampleCodeInfo hash giving example Qore code to generate the given request message

◆ getQoreExampleRequestImpl()

hash<RestQoreExampleCodeInfo> RestSchemaValidator::AbstractRestSchemaValidator::getQoreExampleRequestImpl ( string  method,
string  path 
)
private

returns a hash of example Qore code for the given request

Parameters
methodthe HTTP method (case insensitive)
paththe URI path of the request
Returns
a RestQoreExampleCodeInfo hash giving example Qore code to generate the given request message

◆ getQoreExampleResponse()

hash<RestQoreExampleCodeInfo> RestSchemaValidator::AbstractRestSchemaValidator::getQoreExampleResponse ( string  method,
string  path,
int  code 
)

returns example Qore code for the given response

Parameters
methodthe HTTP method of the original request (case insensitive)
paththe URI path of the original request
codethe HTTP response code of the response
Returns
a RestQoreExampleCodeInfo hash giving example Qore code to generate the given response message

◆ getQoreExampleResponseImpl()

hash<RestQoreExampleCodeInfo> RestSchemaValidator::AbstractRestSchemaValidator::getQoreExampleResponseImpl ( string  method,
string  path,
int  code 
)
private

returns example Qore code for the given response

Parameters
methodthe HTTP method of the original request (case insensitive)
paththe URI path of the original request
codethe HTTP response code of the response
Returns
a RestQoreExampleCodeInfo hash giving example Qore code to generate the given response message

◆ getTargetUrl()

string RestSchemaValidator::AbstractRestSchemaValidator::getTargetUrl ( )

returns the target URL for the schema

Returns
the target URL for the schema
Exceptions
MISSING-TARGET-URLno target URL provided for the schema

◆ getTargetUrlImpl() [1/2]

abstract string RestSchemaValidator::AbstractRestSchemaValidator::getTargetUrlImpl ( )
privatepure virtual

returns the target URL for the schema

Returns
the target URL for the schema
Exceptions
MISSING-TARGET-URLno target URL provided for the schema

◆ getTargetUrlImpl() [2/2]

string RestSchemaValidator::AbstractRestSchemaValidator::getTargetUrlImpl ( )
private

returns the target URL for the schema

Returns
the target URL for the schema
Exceptions
MISSING-TARGET-URLno target URL provided for the schema

◆ managesUriPath() [1/2]

bool RestSchemaValidator::AbstractRestSchemaValidator::managesUriPath ( )

returns True if the provider manages the URI path

The base class method returns True by default, override in child classes to return False

◆ managesUriPath() [2/2]

bool RestSchemaValidator::AbstractRestSchemaValidator::managesUriPath ( )
private

returns True if the provider manages the URI path

This method returns False

◆ parseRequest()

hash<RestRequestServerInfo> RestSchemaValidator::AbstractRestSchemaValidator::parseRequest ( string  method,
string  path,
*data  http_body,
reference< hash< auto >>  headers 
)

processes and parses a client request and returns the deserialized message body (if any)

Parameters
methodthe HTTP method (case-insensitive)
paththe URI path with any query arguments
http_bodythe serialized message body
headersa reference to the hash of HTTP headers received; any default header values to be assumed by the server for the request will be added here
Returns
a RestRequestServerInfo hash of request information
Exceptions
DESERIALIZATION-ERRORthe request body could not be deserialized, results in a 400 Bad Request response returned to the caller
SCHEMA-VALIDATION-ERRORthis exception should be thrown if there is a validation error in the request so that a 400 Bad Request response can be returned to the caller
INVALID-METHODinvalid HTTP method for the request; the arg argument should have a list of acceptable HTTP methods for this request

◆ parseRequestImpl()

hash<RestRequestServerInfo> RestSchemaValidator::AbstractRestSchemaValidator::parseRequestImpl ( string  method,
string  path,
*data  http_body,
reference< hash headers 
)
private

processes and parses a client request and returns the deserialized message body (if any)

Parameters
methodthe HTTP method (case-insensitive)
paththe URI path with any query arguments
http_bodythe serialized message body
headersa reference to the hash of HTTP headers received; any default header values to be assumed by the server for the request will be added here
Returns
a RestRequestServerInfo hash of request information
Exceptions
DESERIALIZATION-ERRORthe request body could not be deserialized, results in a 400 Bad Request response returned to the caller
SCHEMA-VALIDATION-ERRORthis exception should be thrown if there is a validation error in the request so that a 400 Bad Request response can be returned to the caller
INVALID-METHODinvalid HTTP method for the request; the arg argument should have a list of acceptable HTTP methods for this request

◆ parseResponse()

hash<RestResponseClientInfo> RestSchemaValidator::AbstractRestSchemaValidator::parseResponse ( string  method,
string  path,
int  code,
*data  response_body,
hash< auto >  hdr 
)

parses and validates the response from the server and returns a hash of the processed info

Parameters
methodthe HTTP method (case insensitive)
paththe URI path of the original request (without any query arguments)
codethe HTTP response code
response_bodythe HTTP response body data (if any)
hdras hash of HTTP headers received
Exceptions
DESERIALIZATION-ERRORthe request body could not be deserialized or had an invalid Content-Type

◆ parseResponseImpl()

hash<RestResponseClientInfo> RestSchemaValidator::AbstractRestSchemaValidator::parseResponseImpl ( string  method,
string  path,
int  code,
*data  response_body,
hash< auto >  hdr 
)
private

parses and validates the response from the server and returns a hash of the processed info

Parameters
methodthe HTTP method (case insensitive)
paththe URI path of the original request (without any query arguments)
codethe HTTP response code
response_bodythe HTTP response body data (if any)
hdras hash of HTTP headers received
Exceptions
DESERIALIZATION-ERRORthe request body could not be deserialized or had an invalid Content-Type

◆ processRequest()

hash<RestRequestClientInfo> RestSchemaValidator::AbstractRestSchemaValidator::processRequest ( string  method,
string  path,
auto  body,
*hash< auto >  headers,
*softlist< string content_types 
)

processes a client-side REST request and returns a hash that can be used to make the outgoing client-side HTTP request

Parameters
methodthe HTTP method (case-insensitive)
paththe URI path with any query arguments
bodythe unserialized message body data
headersany headers to include in the request; note that the Content-Type header should not be sent here as it will be overridden when the message is serialized
content_typesthe desired MIME types for serialization in order of preference; if none are usable then an exception is thrown
Returns
a RestRequestClientInfo hash with information about the request
Exceptions
SERIALIZATION-ERRORunsupported message body MIME type requested or missing serialization module

◆ processRequestImpl() [1/2]

abstract hash<RestRequestClientInfo> RestSchemaValidator::AbstractRestSchemaValidator::processRequestImpl ( string  method,
string  path,
auto  body,
*hash< auto >  headers,
*softlist< string content_types 
)
privatepure virtual

processes a client-side REST request and returns a hash that can be used to make the outgoing client-side HTTP request

Parameters
methodthe HTTP method (case-insensitive)
paththe URI path with any query arguments
bodythe unserialized message body data
headersany headers to include in the request; note that the Content-Type header should not be sent here as it will be overridden when the message is serialized
content_typesthe desired MIME types for serialization in order of preference; if none are usable then an exception is thrown
Returns
a RestRequestClientInfo hash with information about the request
Exceptions
SERIALIZATION-ERRORunsupported message body MIME type requested or missing serialization module

◆ processRequestImpl() [2/2]

hash<RestRequestClientInfo> RestSchemaValidator::AbstractRestSchemaValidator::processRequestImpl ( string  method,
string  path,
auto  body,
*hash< auto >  headers,
*softlist< string content_types 
)
private

processes a client-side REST request and returns a hash that can be used to make the outgoing client-side HTTP request

Parameters
methodthe HTTP method (case-insensitive)
paththe URI path with any query arguments
bodythe unserialized message body data
headersany headers to include in the request; note that the Content-Type header should not be sent here as it will be overridden when the message is serialized
content_typesthe desired MIME types for serialization in order of preference; if none are usable then an exception is thrown
Returns
a RestRequestClientInfo hash with information about the request
Exceptions
SERIALIZATION-ERRORunsupported message body MIME type requested or missing serialization module

◆ processResponse()

hash<HttpResponseInfo> RestSchemaValidator::AbstractRestSchemaValidator::processResponse ( string  method,
string  path,
int  code,
auto  response_body,
*hash< auto >  headers,
*softlist< string content_types 
)

Processes a REST response with a serialized message body.

Validates any response data against schema definitions if possible

Parameters
methodthe HTTP method of the original request
paththe URI path of the original request (without query arguments)
codethe HTTP response code
response_bodythe response body data (if any)
headersHTTP headers to include in the response
content_typesthe desired MIME types for serialization in order of preference; if none are usable then an exception is thrown; if this argument is not present, then json is preferred over yaml
Returns
an HttpServer::HttpResponseInfo hash for the response
Exceptions
ACCEPT-ERRORthe response body could not be serialized because the client does not accept a supported type
SERIALIZATION-ERRORthe response body could not be serialized due to an error
Note
<a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html>RFC 2616 section 14: If an Accept header field is present, and if the server cannot send a response which is acceptable according to the combined Accept field value, then the server SHOULD send a 406 (not acceptable) response. To ensure this happens, if an Accept error of this nature occurs in this call, an "ACCEPT-ERROR" must be thrown

◆ processResponseImpl()

hash<HttpResponseInfo> RestSchemaValidator::AbstractRestSchemaValidator::processResponseImpl ( string  method,
string  path,
int  code,
auto  response_body,
*hash< auto >  headers,
*softlist< string content_types 
)
private

processes a REST response with a serialized message body, validates any response data against schema definitions if possible

Parameters
methodthe HTTP method of the original request
paththe URI path of the original request (without query arguments)
codethe HTTP response code
response_bodythe response body data (if any)
headersHTTP headers to include in the response
content_typesthe desired MIME types for serialization in order of preference; if none are usable then an exception is thrown; if this argument is not present, then json is preferred over yaml
Returns
an HttpResponseInfo hash for the response
Exceptions
ACCEPT-ERRORthe response body could not be serialized because the client does not accept a supported type
SERIALIZATION-ERRORthe response body could not be serialized due to an error
Note
<a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html>RFC 2616 section 14: If an Accept header field is present, and if the server cannot send a response which is acceptable according to the combined Accept field value, then the server SHOULD send a 406 (not acceptable) response. To ensure this happens, if an Accept error of this nature occurs in this call, an "ACCEPT-ERROR" must be thrown

◆ setBasePath()

RestSchemaValidator::AbstractRestSchemaValidator::setBasePath ( string  basePath)

overrides the basePath value

Parameters
basePaththe new base path value; use an empty string here to clear the basePath

◆ setBasePathImpl()

RestSchemaValidator::AbstractRestSchemaValidator::setBasePathImpl ( string  basePath)
private

overrides the basePath value

Parameters
basePaththe new base path value; use an empty string here to clear the basePath

Member Data Documentation

◆ DataSerializationSupport

const RestSchemaValidator::AbstractRestSchemaValidator::DataSerializationSupport = ...
private

processes and parses a client request and returns the deserialized message body (if any) /‍**

Parameters
methodthe HTTP method (case-insensitive)
paththe URI path with any query arguments
http_bodythe serialized message body
headersa reference to the hash of HTTP headers received; any default header values to be assumed by the server for the request will be added here
Returns
a RestRequestServerInfo hash of request information
Exceptions
DESERIALIZATION-ERRORthe request body could not be deserialized, results in a 400 Bad Request response returned to the caller
SCHEMA-VALIDATION-ERRORthis exception should be thrown if there is a validation error in the request so that a 400 Bad Request response can be returned to the caller
INVALID-METHODinvalid HTTP method for the request; the arg argument should have a list of acceptable HTTP methods for this request *‍/ abstract hash<RestRequestServerInfo> parseRequestImpl(string method, string path, *data http_body, reference<hash> headers); #! processes a REST response with a serialized message body, validates any response data against schema definitions if possible /‍**
Parameters
methodthe HTTP method of the original request
paththe URI path of the original request (without query arguments)
codethe HTTP response code
response_bodythe response body data (if any)
headersHTTP headers to include in the response
content_typesthe desired MIME types for serialization in order of preference; if none are usable then an exception is thrown; if this argument is not present, then json is preferred over yaml
Returns
an HttpResponseInfo hash for the response
Exceptions
ACCEPT-ERRORthe response body could not be serialized because the client does not accept a supported type
SERIALIZATION-ERRORthe response body could not be serialized due to an error
Note
<a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html>RFC 2616 section 14</a>: If an Accept header field is present, and if the server cannot send a response which is acceptable according to the combined Accept field value, then the server SHOULD send a 406 (not acceptable) response. To ensure this happens, if an Accept error of this nature occurs in this call, an \c "ACCEPT-ERROR" must be thrown *&zwj;/ abstract hash<HttpResponseInfo> processResponseImpl(string method, string path, int code, auto response_body, *hash<auto> headers, *softlist<string> content_types); #! parses and validates the response from the server and returns a hash of the processed info /&zwj;** @param method the HTTP method (case insensitive) @param path the URI path of the original request (without any query arguments) @param code the HTTP response code @param response_body the HTTP response body data (if any) @param hdr as hash of HTTP headers received @throw DESERIALIZATION-ERROR the request body could not be deserialized or had an invalid \c Content-Type *&zwj;/ abstract hash<RestResponseClientInfo> parseResponseImpl(string method, string path, int code, *data response_body, hash<auto> hdr); #! returns a hash of URI paths as keys with values as lists of supported HTTP methods /&zwj;** @return a hash of URI paths as keys with values as lists of supported HTTP methods *&zwj;/ abstract hash<string, list<string>> getPathOperationHashImpl(); #! returns the base path prefix for all requests in this schema /&zwj;** @return the base path prefix for all requests in this schema *&zwj;/ abstract string getBasePathImpl(); #! overrides the basePath value /&zwj;** @param basePath the new base path value; use an empty string here to clear the basePath *&zwj;/ abstract setBasePathImpl(string basePath); #! returns a hash of example Qore code for the given request /&zwj;** @param method the HTTP method (case insensitive) @param path the URI path of the request @return a @ref RestSchemaValidator::RestQoreExampleCodeInfo "RestQoreExampleCodeInfo" hash giving example Qore code to generate the given request message *&zwj;/ abstract hash<RestQoreExampleCodeInfo> getQoreExampleRequestImpl(string method, string path); #! returns a hash of example message information for the given request /&zwj;** @param method the HTTP method (case insensitive) @param path the URI path of the request @param content_types the desired MIME types for serialization in order of preference; if none are usable then an exception is thrown @return a @ref RestExampleRequestInfo of example message information for the given request *&zwj;/ abstract hash<RestExampleRequestInfo> getExampleRequestImpl(string method, string path, *softlist<string> content_types); #! returns example Qore code for the given response /&zwj;** @param method the HTTP method of the original request (case insensitive) @param path the URI path of the original request @param code the HTTP response code of the response @return a @ref RestSchemaValidator::RestQoreExampleCodeInfo "RestQoreExampleCodeInfo" hash giving example Qore code to generate the given response message *&zwj;/ abstract hash<RestQoreExampleCodeInfo> getQoreExampleResponseImpl(string method, string path, int code); #! returns a hash of example message information for the given request /&zwj;** @param method the HTTP method of the original request (case insensitive) @param path the URI path of the original request @param code the HTTP response code of the response @param content_types the desired MIME types for serialization in order of preference; if none are usable then an exception is thrown @return a @ref RestSchemaValidator::RestExampleResponseInfo "RestExampleResponseInfo" hash giving example response message info *‍/ abstract hash<RestExampleResponseInfo> getExampleResponseImpl(string method, string path, int code, *softlist<string> content_types); } #! null REST validator; no schema is used but default serialization and deserialization is performed class NullRestSchemaValidator inherits AbstractRestSchemaValidator { //! Data serialization support mapping codes to MIME types and de/serialization functions

◆ NullSchemaHashStr

const RestSchemaValidator::AbstractRestSchemaValidator::NullSchemaHashStr = "<null rest schema>"
private

a unique hash for the null schema

Since
RestSchemaValidator 2.0