225 hash<RestRequestClientInfo>
processRequest(
string method,
string path,
auto body, *hash<auto> headers, *softlist<string> content_types);
244 hash<RestRequestServerInfo>
parseRequest(
string method,
string path, *data http_body, reference<hash<auto>> headers);
270 hash<HttpResponseInfo>
processResponse(
string method,
string path,
int code,
auto response_body, *hash<auto> headers, *softlist<string> content_types);
282 hash<RestResponseClientInfo>
parseResponse(
string method,
string path,
int code, *data response_body, hash<auto> hdr);
301 hash<RestExampleRequestInfo>
getExampleRequest(
string method,
string path, *softlist<string> content_types);
322 hash<RestExampleResponseInfo>
getExampleResponse(
string method,
string path,
int code, *softlist<string> content_types);
423 abstract hash<RestRequestClientInfo>
processRequestImpl(
string method,
string path,
auto body, *hash<auto> headers, *softlist<string> content_types);
439 abstract hash<RestRequestServerInfo>
parseRequestImpl(
string method,
string path, *data http_body, reference<hash> headers);
459 abstract hash<HttpResponseInfo>
processResponseImpl(
string method,
string path,
int code,
auto response_body, *hash<auto> headers, *softlist<string> content_types);
472 abstract hash<RestResponseClientInfo>
parseResponseImpl(
string method,
string path,
int code, *data response_body, hash<auto> hdr);
514 abstract hash<RestExampleRequestInfo>
getExampleRequestImpl(
string method,
string path, *softlist<string> content_types);
537 abstract hash<RestExampleResponseInfo>
getExampleResponseImpl(
string method,
string path,
int code, *softlist<string> content_types);
569 const DeserializeYaml = ...;
571 const DeserializeXml = ...;
629 hash<RestRequestClientInfo>
processRequestImpl(
string method,
string path,
auto body, *hash<auto> headers, *softlist<string> content_types);
646 hash<RestRequestServerInfo>
parseRequestImpl(
string method,
string path, *data http_body, reference<hash> headers);
675 hash<HttpResponseInfo>
processResponseImpl(
string method,
string path,
int code,
auto response_body, *hash<auto> headers, *softlist<string> content_types);
689 hash<RestResponseClientInfo>
parseResponseImpl(
string method,
string path,
int code, *data response_body, hash<auto> hdr);
776 hash<RestExampleResponseInfo>
getExampleResponseImpl(
string method,
string path,
int code, *softlist<string> content_types);
transient *LoggerInterface logger
abstract REST schema validation classes
Definition RestSchemaValidator.qm.dox.h:187
bool managesUriPath()
returns True if the provider manages the URI path
abstract hash< RestRequestServerInfo > parseRequestImpl(string method, string path, *data http_body, reference< hash > headers)
processes and parses a client request and returns the deserialized message body (if any)
abstract hash< RestRequestClientInfo > processRequestImpl(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-...
abstract hash< RestExampleRequestInfo > getExampleRequestImpl(string method, string path, *softlist< string > content_types)
returns a hash of example message information for the given request
hash< RestRequestClientInfo > 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-...
abstract hash< RestResponseClientInfo > parseResponseImpl(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
abstract hash< RestExampleResponseInfo > getExampleResponseImpl(string method, string path, int code, *softlist< string > content_types)
returns a hash of example message information for the given request
hash< RestExampleRequestInfo > getExampleRequest(string method, string path, *softlist< string > content_types)
returns a hash of example message information for the given request
*TimeZone getTimeZoneLocale()
Returns the time zone locale used for serialization / deserialization.
DataProvider::AbstractDataProvider getDataProviderImpl(HTTPClient rest)
returns a data provider object for this connection, if supported by any REST schema validator object
string getTargetUrl()
returns the target URL for the schema
abstract string getHashImpl()
returns a unique hash for the schema that can be used to compare schemas
hash< RestQoreExampleCodeInfo > getQoreExampleRequest(string method, string path)
returns a hash of example Qore code for the given request
abstract setBasePathImpl(string basePath)
overrides the basePath value
hash< RestQoreExampleCodeInfo > getQoreExampleResponse(string method, string path, int code)
returns example Qore code for the given response
abstract setTimeZoneLocaleImpl(*TimeZone tz)
Allows the time zone locale to be set for serialization / deserialization.
abstract string getTargetUrlImpl()
returns the target URL for the schema
constructor(Logger::LoggerInterface logger)
Creates the object with the given logger.
abstract *TimeZone getTimeZoneLocaleImpl()
Returns the time zone locale used for serialization / deserialization.
constructor()
Creates the object without a logger.
abstract hash< string, list< string > > getPathOperationHashImpl()
returns a hash of URI paths as keys with values as lists of supported HTTP methods
hash< RestRequestServerInfo > 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)
abstract string getBasePathImpl()
returns the base path prefix for all requests in this schema
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.
setTimeZoneLocale(*TimeZone tz)
Allows the time zone locale to be set for serialization / deserialization.
string getHash()
returns a unique hash for the schema that can be used to compare schemas
DataProvider::AbstractDataProvider getDataProvider(HTTPClient rest)
returns a data provider object for this connection, if supported by any REST schema validator object
hash< string, list< string > > getPathOperationHash()
returns a hash of URI paths as keys with values as lists of supported HTTP methods
hash< RestResponseClientInfo > 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
abstract hash< RestQoreExampleCodeInfo > getQoreExampleResponseImpl(string method, string path, int code)
returns example Qore code for the given response
string getBasePath()
returns the base path prefix for all requests in this schema
abstract hash< RestQoreExampleCodeInfo > getQoreExampleRequestImpl(string method, string path)
returns a hash of example Qore code for the given request
abstract 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 ...
hash< RestExampleResponseInfo > getExampleResponse(string method, string path, int code, *softlist< string > content_types)
returns a hash of example message information for the given request
setBasePath(string basePath)
overrides the basePath value
null REST validator; no schema is used but default serialization and deserialization is performed
Definition RestSchemaValidator.qm.dox.h:560
setBasePathImpl(string basePath)
overrides the basePath value
string getHashImpl()
returns a unique hash for the schema that can be used to compare schemas
const DataDeserializationSupport
Data deserialization support MIME types to codes and de/serialization functions.
Definition RestSchemaValidator.qm.dox.h:575
hash< RestExampleRequestInfo > getExampleRequestImpl(string method, string path, *softlist< string > content_types)
returns a hash of example message information for the given request
const DataSerializationSupport
Data serialization support mapping codes to MIME types and de/serialization functions.
Definition RestSchemaValidator.qm.dox.h:564
constructor(Logger::LoggerInterface logger)
Creates the object with the given logger.
*TimeZone getTimeZoneLocaleImpl()
Returns the time zone locale used for serialization / deserialization.
hash< RestRequestClientInfo > processRequestImpl(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-...
const NullSchemaHashStr
a unique hash for the null schema
Definition RestSchemaValidator.qm.dox.h:581
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 ...
setTimeZoneLocaleImpl(*TimeZone tz)
Allows the time zone locale to be set for serialization / deserialization.
string getTargetUrlImpl()
returns the target URL for the schema
bool managesUriPath()
returns True if the provider manages the URI path
hash< RestQoreExampleCodeInfo > getQoreExampleResponseImpl(string method, string path, int code)
returns example Qore code for the given response
hash< RestQoreExampleCodeInfo > getQoreExampleRequestImpl(string method, string path)
returns a hash of example Qore code for the given request
constructor()
Creates the object without a logger.
hash< RestRequestServerInfo > parseRequestImpl(string method, string path, *data http_body, reference< hash > headers)
processes and parses a client request and returns the deserialized message body (if any)
hash< RestExampleResponseInfo > getExampleResponseImpl(string method, string path, int code, *softlist< string > content_types)
returns a hash of example message information for the given request
string getBasePathImpl()
returns the base path prefix for all requests in this schema
hash< string, list< string > > getPathOperationHashImpl()
returns a hash of URI paths as keys with values as lists of supported HTTP methods
hash< RestResponseClientInfo > parseResponseImpl(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
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 h...
main namespace for all public RestSchemaValidator declarations
Definition RestSchemaValidator.qm.dox.h:114
a hash giving example info for example HTTP request messages
Definition RestSchemaValidator.qm.dox.h:156
string body
the HTTP request body
Definition RestSchemaValidator.qm.dox.h:162
hash< auto > hdr
the HTTP request header hash
Definition RestSchemaValidator.qm.dox.h:160
string request_uri
the HTTP request URI
Definition RestSchemaValidator.qm.dox.h:158
a hash giving example info for example HTTP response messages
Definition RestSchemaValidator.qm.dox.h:166
int code
the HTTP status code
Definition RestSchemaValidator.qm.dox.h:170
string response_uri
the HTTP response URI
Definition RestSchemaValidator.qm.dox.h:168
string body
the HTTP response body
Definition RestSchemaValidator.qm.dox.h:174
hash< auto > hdr
the HTTP response header hash
Definition RestSchemaValidator.qm.dox.h:172
a hash giving example information for building a request or response in Qore
Definition RestSchemaValidator.qm.dox.h:178
string example
a string giving the example code generation
Definition RestSchemaValidator.qm.dox.h:183
hash< string, string > hashdecls()
a hash giving example hashdecl declarations for hash objects in the message; keys are hashdecl names; str...
a hash of information about a client-side request
Definition RestSchemaValidator.qm.dox.h:116
*list< string > response_content
Content-Type for the response message if available.
Definition RestSchemaValidator.qm.dox.h:124
*data body
the serialized message body hash
Definition RestSchemaValidator.qm.dox.h:126
string content
the Content-Type for the message
Definition RestSchemaValidator.qm.dox.h:120
string uri_path
the URI path for the request
Definition RestSchemaValidator.qm.dox.h:118
a hash of information about a server-side request
Definition RestSchemaValidator.qm.dox.h:130
*hash< auto > path_args
any path arguments
Definition RestSchemaValidator.qm.dox.h:136
hash< auto > info
miscellaneous free-form info about the parsed request
Definition RestSchemaValidator.qm.dox.h:140
string path
the URI path without query arguments
Definition RestSchemaValidator.qm.dox.h:132
*hash< auto > query
any query arguments
Definition RestSchemaValidator.qm.dox.h:134
auto body
the deserialized message body data
Definition RestSchemaValidator.qm.dox.h:138
a hash of information about a response from the server
Definition RestSchemaValidator.qm.dox.h:144
hash< auto > hdr
the HTTP headers received
Definition RestSchemaValidator.qm.dox.h:150
int code
the HTTP status code
Definition RestSchemaValidator.qm.dox.h:146
hash< auto > info
miscellaneous free-form info about the parsed response
Definition RestSchemaValidator.qm.dox.h:152
auto body
the deserialized message body
Definition RestSchemaValidator.qm.dox.h:148