116 hash<string, string> hashdecls();
131 string getTargetUrl();
145 hash<RestRequestClientInfo> processRequest(
string method,
string path, any
body, *
hash headers, *softlist<string> content_types);
158 hash<RestRequestServerInfo> parseRequest(
string method,
string path, *data http_body, reference<hash> headers);
177 hash<HttpResponseInfo> processResponse(
string method,
string path,
int code, any response_body, *
hash headers, *softlist<string> content_types);
189 hash<RestResponseClientInfo> parseResponse(
string method,
string path,
int code, *data response_body,
hash hdr);
198 hash<RestQoreExampleCodeInfo> getQoreExampleRequest(
string method,
string path);
208 hash<RestExampleRequestInfo> getExampleRequest(
string method,
string path, *softlist<string> content_types);
218 hash<RestQoreExampleCodeInfo> getQoreExampleResponse(
string method,
string path,
int code);
229 hash<RestExampleResponseInfo> getExampleResponse(
string method,
string path,
int code, *softlist<string> content_types);
235 hash<string, list<string>> getPathOperationHash();
241 string getBasePath();
247 setBasePath(
string basePath);
257 abstract string getTargetUrlImpl();
273 abstract hash<RestRequestClientInfo> processRequestImpl(
string method,
string path, any body, *
hash headers, *softlist<string> content_types);
288 abstract hash<RestRequestServerInfo> parseRequestImpl(
string method,
string path, *data http_body, reference<hash> headers);
309 abstract hash<HttpResponseInfo> processResponseImpl(
string method,
string path,
int code, any response_body, *
hash headers, *softlist<string> content_types);
323 abstract hash<RestResponseClientInfo> parseResponseImpl(
string method,
string path,
int code, *data response_body,
hash hdr);
331 abstract hash<string, list<string>> getPathOperationHashImpl();
339 abstract string getBasePathImpl();
347 abstract setBasePathImpl(
string basePath);
358 abstract hash<RestQoreExampleCodeInfo> getQoreExampleRequestImpl(
string method,
string path);
370 abstract hash<RestExampleRequestInfo> getExampleRequestImpl(
string method,
string path, *softlist<string> content_types);
382 abstract hash<RestQoreExampleCodeInfo> getQoreExampleResponseImpl(
string method,
string path,
int code);
395 abstract hash<RestExampleResponseInfo> getExampleResponseImpl(
string method,
string path,
int code, *softlist<string> content_types);
405 const DataSerializationSupport = {
406 MimeTypeJson: \make_json(),
407 MimeTypeYamlRpc: \make_yaml(),
408 MimeTypeYaml: \make_yaml(),
409 MimeTypeXml: \make_xmlrpc_value(),
412 MimeTypeFormUrlEncoded;
417 const DataSerializationSupportList = keys DataSerializationSupport;
419 const DeserializeYaml = (
423 const DeserializeXml = (
426 "in": any (
string xml, reference<string>
type) {
428 on_success type =
"xml";
429 return parse_xmlrpc_value(xml);
431 catch (hash<ExceptionInfo> ex);
437 const DataDeserializationSupport = {
438 MimeTypeFormUrlEncoded: (
440 "in": \mime_parse_form_urlencoded_string(),
446 MimeTypeYamlRpc: DeserializeYaml,
447 MimeTypeYaml: DeserializeYaml,
448 MimeTypeXml: DeserializeXml,
449 MimeTypeXmlApp: DeserializeXml,
452 "in":
string (
string s) {
return s; },
466 string getTargetUrlImpl();
483 hash<RestRequestClientInfo> processRequestImpl(
string method,
string path, any
body, *
hash headers, *softlist<string> content_types);
499 hash<RestRequestServerInfo> parseRequestImpl(
string method,
string path, *data http_body, reference<hash> headers);
521 hash<HttpResponseInfo> processResponseImpl(
string method,
string path,
int code, any response_body, *
hash headers, *softlist<string> content_types);
536 hash<RestResponseClientInfo> parseResponseImpl(
string method,
string path,
int code, *data response_body,
hash hdr);
545 hash<string, list<string>> getPathOperationHashImpl();
554 string getBasePathImpl();
561 setBasePathImpl(
string basePath);
572 hash<RestQoreExampleCodeInfo> getQoreExampleRequestImpl(
string method,
string path);
585 hash<RestExampleRequestInfo> getExampleRequestImpl(
string method,
string path, *softlist<string> content_types);
598 hash<RestQoreExampleCodeInfo> getQoreExampleResponseImpl(
string method,
string path,
int code);
612 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:104
hash info
miscellaneous free-form info about the parsed request
Definition: RestSchemaValidator.qm.dox.h:76
string body
the HTTP request body
Definition: RestSchemaValidator.qm.dox.h:98
string sprintf(string fmt,...)
main namespace for all public RestSchemaValidator declarations
Definition: RestSchemaValidator.qm.dox.h:56
a hash giving example info for example HTTP request messages
Definition: RestSchemaValidator.qm.dox.h:92
abstract REST schema validation classes
Definition: RestSchemaValidator.qm.dox.h:123
any body
the deserialized message body
Definition: RestSchemaValidator.qm.dox.h:84
hash hdr
the HTTP response header hash
Definition: RestSchemaValidator.qm.dox.h:108
a hash of information about a response from the server
Definition: RestSchemaValidator.qm.dox.h:80
string example
a string giving the example code generation
Definition: RestSchemaValidator.qm.dox.h:119
a hash of information about a client-side request
Definition: RestSchemaValidator.qm.dox.h:58
hash hdr
the HTTP headers received
Definition: RestSchemaValidator.qm.dox.h:86
any body
the deserialized message body data
Definition: RestSchemaValidator.qm.dox.h:74
string content
the Content-Type for the message
Definition: RestSchemaValidator.qm.dox.h:62
a hash giving example information for building a request or response in Qore
Definition: RestSchemaValidator.qm.dox.h:114
int code
the HTTP status code
Definition: RestSchemaValidator.qm.dox.h:106
null REST validator; no schema is used but default serialization and deserialization is performed ...
Definition: RestSchemaValidator.qm.dox.h:400
hash info
miscellaneous free-form info about the parsed response
Definition: RestSchemaValidator.qm.dox.h:88
a hash of information about a server-side request
Definition: RestSchemaValidator.qm.dox.h:68
a hash giving example info for example HTTP response messages
Definition: RestSchemaValidator.qm.dox.h:102
string request_uri
the HTTP request URI
Definition: RestSchemaValidator.qm.dox.h:94
int code
the HTTP status code
Definition: RestSchemaValidator.qm.dox.h:82
string body
the HTTP response body
Definition: RestSchemaValidator.qm.dox.h:110
string string(softstring str, *string enc)
hash hdr
the HTTP request header hash
Definition: RestSchemaValidator.qm.dox.h:96
string path
the URI path without query arguments
Definition: RestSchemaValidator.qm.dox.h:70
*hash query
any query arguments
Definition: RestSchemaValidator.qm.dox.h:72
string uri_path
the URI path for the request
Definition: RestSchemaValidator.qm.dox.h:60
*data body
the serialized message body hash
Definition: RestSchemaValidator.qm.dox.h:64