153 hash<RestRequestClientInfo>
processRequest(
string method,
string path,
auto body, *
hash headers, *softlist<string> content_types);
168 hash<RestRequestServerInfo>
parseRequest(
string method,
string path, *data http_body, reference<hash> headers);
187 hash<HttpResponseInfo>
processResponse(
string method,
string path,
int code,
auto response_body, *
hash headers, *softlist<string> content_types);
199 hash<RestResponseClientInfo>
parseResponse(
string method,
string path,
int code, *data response_body,
hash hdr);
218 hash<RestExampleRequestInfo>
getExampleRequest(
string method,
string path, *softlist<string> content_types);
239 hash<RestExampleResponseInfo>
getExampleResponse(
string method,
string path,
int code, *softlist<string> content_types);
283 abstract hash<RestRequestClientInfo>
processRequestImpl(
string method,
string path,
auto body, *
hash headers, *softlist<string> content_types);
300 abstract hash<RestRequestServerInfo>
parseRequestImpl(
string method,
string path, *data http_body, reference<hash> headers);
321 abstract hash<HttpResponseInfo>
processResponseImpl(
string method,
string path,
int code, any response_body, *
hash headers, *softlist<string> content_types);
335 abstract hash<RestResponseClientInfo>
parseResponseImpl(
string method,
string path,
int code, *data response_body,
hash hdr);
382 abstract hash<RestExampleRequestInfo>
getExampleRequestImpl(
string method,
string path, *softlist<string> content_types);
407 abstract hash<RestExampleResponseInfo>
getExampleResponseImpl(
string method,
string path,
int code, *softlist<string> content_types);
418 MimeTypeJson: \make_json(),
419 MimeTypeYamlRpc: \make_yaml(),
420 MimeTypeYaml: \make_yaml(),
421 MimeTypeXml: \make_xmlrpc_value(),
424 MimeTypeFormUrlEncoded;
434 const DeserializeYaml = (
438 const DeserializeXml = (
441 "in":
auto (
string xml, reference<string>
type) {
443 on_success
type =
"xml";
444 return parse_xmlrpc_value(xml);
446 catch (hash<ExceptionInfo> ex);
453 MimeTypeFormUrlEncoded: (
455 "in": \mime_parse_form_urlencoded_string(),
461 MimeTypeYamlRpc: DeserializeYaml,
462 MimeTypeYaml: DeserializeYaml,
463 MimeTypeXml: DeserializeXml,
464 MimeTypeXmlApp: DeserializeXml,
467 "in": data (data s) {
return s; },
470 MimeTypeOctetStream: {
504 hash<RestRequestClientInfo>
processRequestImpl(
string method,
string path,
auto body, *
hash headers, *softlist<string> content_types);
522 hash<RestRequestServerInfo>
parseRequestImpl(
string method,
string path, *data http_body, reference<hash> headers);
544 hash<HttpResponseInfo>
processResponseImpl(
string method,
string path,
int code,
auto response_body, *
hash headers, *softlist<string> content_types);
559 hash<RestResponseClientInfo>
parseResponseImpl(
string method,
string path,
int code, *data response_body,
hash hdr);
608 hash<RestExampleRequestInfo>
getExampleRequestImpl(
string method,
string path, *softlist<string> content_types);
635 hash<RestExampleResponseInfo>
getExampleResponseImpl(
string method,
string path,
int code, *softlist<string> content_types);
abstract hash< string, list< string > > getPathOperationHashImpl()
returns a hash of URI paths as keys with values as lists of supported HTTP methods ...
string response_uri
the HTTP response URI
Definition: RestSchemaValidator.qm.dox.h:112
hash info
miscellaneous free-form info about the parsed request
Definition: RestSchemaValidator.qm.dox.h:84
hash< RestExampleResponseInfo > getExampleResponseImpl(string method, string path, int code, *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:417
string body
the HTTP request body
Definition: RestSchemaValidator.qm.dox.h:106
main namespace for all public RestSchemaValidator declarations
Definition: RestSchemaValidator.qm.dox.h:64
a hash giving example info for example HTTP request messages
Definition: RestSchemaValidator.qm.dox.h:100
abstract hash< RestQoreExampleCodeInfo > getQoreExampleRequestImpl(string method, string path)
returns a hash of example Qore code for the given request
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 REST schema validation classes
Definition: RestSchemaValidator.qm.dox.h:131
hash< string, list< string > > getPathOperationHashImpl()
returns a hash of URI paths as keys with values as lists of supported HTTP methods ...
hash< RestExampleRequestInfo > getExampleRequestImpl(string method, string path, *softlist< string > content_types)
returns a hash of example message information for the given request
abstract string getTargetUrlImpl()
returns the target URL for the schema
setBasePathImpl(string basePath)
overrides the basePath value
hash hdr
the HTTP response header hash
Definition: RestSchemaValidator.qm.dox.h:116
a hash of information about a response from the server
Definition: RestSchemaValidator.qm.dox.h:88
string getBasePathImpl()
returns the base path prefix for all requests in this schema
hash< RestQoreExampleCodeInfo > getQoreExampleResponse(string method, string path, int code)
returns example Qore code for the given response
string example
a string giving the example code generation
Definition: RestSchemaValidator.qm.dox.h:127
hash< RestRequestServerInfo > parseRequest(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< RestExampleRequestInfo > getExampleRequestImpl(string method, string path, *softlist< string > content_types)
returns a hash of example message information for the given request
a hash of information about a client-side request
Definition: RestSchemaValidator.qm.dox.h:66
hash hdr
the HTTP headers received
Definition: RestSchemaValidator.qm.dox.h:94
string getTargetUrl()
returns the target URL for the schema
hash< HttpResponseInfo > processResponseImpl(string method, string path, int code, auto response_body, *hash 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
abstract setBasePathImpl(string basePath)
overrides the basePath value
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
auto body
the deserialized message body data
Definition: RestSchemaValidator.qm.dox.h:82
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 hdr)
parses and validates the response from the server and returns a hash of the processed info ...
hash< RestRequestClientInfo > processRequest(string method, string path, auto body, *hash headers, *softlist< string > content_types)
processes a client-side REST request and returns a hash that can be used to make the outgoing client-...
hash< RestRequestClientInfo > processRequestImpl(string method, string path, auto body, *hash headers, *softlist< string > content_types)
processes a client-side REST request and returns a hash that can be used to make the outgoing client-...
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
string content
the Content-Type for the message
Definition: RestSchemaValidator.qm.dox.h:70
abstract hash< RestResponseClientInfo > parseResponseImpl(string method, string path, int code, *data response_body, hash hdr)
parses and validates the response from the server and returns a hash of the processed info ...
a hash giving example information for building a request or response in Qore
Definition: RestSchemaValidator.qm.dox.h:122
int code
the HTTP status code
Definition: RestSchemaValidator.qm.dox.h:114
string getTargetUrlImpl()
returns the target URL for the schema
const DataDeserializationSupport
Data deserialization support MIME types to codes and de/serialization functions.
Definition: RestSchemaValidator.qm.dox.h:452
null REST validator; no schema is used but default serialization and deserialization is performed ...
Definition: RestSchemaValidator.qm.dox.h:412
hash info
miscellaneous free-form info about the parsed response
Definition: RestSchemaValidator.qm.dox.h:96
a hash of information about a server-side request
Definition: RestSchemaValidator.qm.dox.h:76
a hash giving example info for example HTTP response messages
Definition: RestSchemaValidator.qm.dox.h:110
hash< HttpResponseInfo > processResponse(string method, string path, int code, auto response_body, *hash headers, *softlist< string > content_types)
processes a REST response with a serialized message body, validates any response data against schema ...
string request_uri
the HTTP request URI
Definition: RestSchemaValidator.qm.dox.h:102
int code
the HTTP status code
Definition: RestSchemaValidator.qm.dox.h:90
abstract hash< RestQoreExampleCodeInfo > getQoreExampleResponseImpl(string method, string path, int code)
returns example Qore code for the given response
string body
the HTTP response body
Definition: RestSchemaValidator.qm.dox.h:118
hash< RestQoreExampleCodeInfo > getQoreExampleRequestImpl(string method, string path)
returns a hash of example Qore code for the given request
hash< RestQoreExampleCodeInfo > getQoreExampleRequest(string method, string path)
returns a hash of example Qore code for the given request
setBasePath(string basePath)
overrides the basePath value
hash hdr
the HTTP request header hash
Definition: RestSchemaValidator.qm.dox.h:104
abstract hash< HttpResponseInfo > processResponseImpl(string method, string path, int code, any response_body, *hash headers, *softlist< string > content_types)
processes a REST response with a serialized message body, validates any response data against schema ...
auto body
the deserialized message body
Definition: RestSchemaValidator.qm.dox.h:92
string path
the URI path without query arguments
Definition: RestSchemaValidator.qm.dox.h:78
hash< RestResponseClientInfo > parseResponseImpl(string method, string path, int code, *data response_body, hash hdr)
parses and validates the response from the server and returns a hash of the processed info ...
*hash query
any query arguments
Definition: RestSchemaValidator.qm.dox.h:80
hash< RestExampleRequestInfo > getExampleRequest(string method, string path, *softlist< string > content_types)
returns a hash of example message information for the given request
abstract string getBasePathImpl()
returns the base path prefix for all requests in this schema
hash< string, string > hashdecls()
a hash giving example struct declarations for hash objects in the message; keys are struct names; str...
string uri_path
the URI path for the request
Definition: RestSchemaValidator.qm.dox.h:68
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 headers, *softlist< string > content_types)
processes a client-side REST request and returns a hash that can be used to make the outgoing client-...
*data body
the serialized message body hash
Definition: RestSchemaValidator.qm.dox.h:72