124 hash<string, string> hashdecls();
139 string getTargetUrl();
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);
208 hash<RestQoreExampleCodeInfo> getQoreExampleRequest(
string method,
string path);
218 hash<RestExampleRequestInfo> getExampleRequest(
string method,
string path, *softlist<string> content_types);
228 hash<RestQoreExampleCodeInfo> getQoreExampleResponse(
string method,
string path,
int code);
239 hash<RestExampleResponseInfo> getExampleResponse(
string method,
string path,
int code, *softlist<string> content_types);
245 hash<string, list<string>> getPathOperationHash();
251 string getBasePath();
257 setBasePath(
string basePath);
267 abstract string getTargetUrlImpl();
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);
343 abstract hash<string, list<string>> getPathOperationHashImpl();
351 abstract string getBasePathImpl();
359 abstract setBasePathImpl(
string basePath);
370 abstract hash<RestQoreExampleCodeInfo> getQoreExampleRequestImpl(
string method,
string path);
382 abstract hash<RestExampleRequestInfo> getExampleRequestImpl(
string method,
string path, *softlist<string> content_types);
394 abstract hash<RestQoreExampleCodeInfo> getQoreExampleResponseImpl(
string method,
string path,
int code);
407 abstract hash<RestExampleResponseInfo> getExampleResponseImpl(
string method,
string path,
int code, *softlist<string> content_types);
417 const DataSerializationSupport = {
418 MimeTypeJson: \make_json(),
419 MimeTypeYamlRpc: \make_yaml(),
420 MimeTypeYaml: \make_yaml(),
421 MimeTypeXml: \make_xmlrpc_value(),
424 MimeTypeFormUrlEncoded;
432 const DataSerializationSupportList = keys DataSerializationSupport;
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);
452 const DataDeserializationSupport = {
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: {
487 string getTargetUrlImpl();
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);
568 hash<string, list<string>> getPathOperationHashImpl();
577 string getBasePathImpl();
584 setBasePathImpl(
string basePath);
595 hash<RestQoreExampleCodeInfo> getQoreExampleRequestImpl(
string method,
string path);
608 hash<RestExampleRequestInfo> getExampleRequestImpl(
string method,
string path, *softlist<string> content_types);
621 hash<RestQoreExampleCodeInfo> getQoreExampleResponseImpl(
string method,
string path,
int code);
635 hash<RestExampleResponseInfo> getExampleResponseImpl(
string method,
string path,
int code, *softlist<string> content_types);
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
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 REST schema validation classes
Definition: RestSchemaValidator.qm.dox.h:131
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 example
a string giving the example code generation
Definition: RestSchemaValidator.qm.dox.h:127
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
auto body
the deserialized message body data
Definition: RestSchemaValidator.qm.dox.h:82
string content
the Content-Type for the message
Definition: RestSchemaValidator.qm.dox.h:70
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
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
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
string body
the HTTP response body
Definition: RestSchemaValidator.qm.dox.h:118
hash hdr
the HTTP request header hash
Definition: RestSchemaValidator.qm.dox.h:104
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 query
any query arguments
Definition: RestSchemaValidator.qm.dox.h:80
string uri_path
the URI path for the request
Definition: RestSchemaValidator.qm.dox.h:68
*data body
the serialized message body hash
Definition: RestSchemaValidator.qm.dox.h:72