Swagger.qm.dox.h
// -*- mode: c++; indent-tabs-mode: nil -*-
/* Swagger.qm Copyright (C) 2017 Qore Technologies, s.r.o.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
*/
// make sure we have the required qore version
// try importing JSON and YAML modules
// need mime definitions
// requires the Util module
// requires the HttpServerUtil module
// requires the RestSchemaValidator module
namespace Swagger {
const ValidIntFormats = ("int32", "int64");
const ValidNumberFormats = ("double", "float");
const ValidStringFormats = ("binary", "byte", "date", "date-time", "password");
const CollectionFormats = (
"csv": True,
"ssv": True,
"tsv": True,
"pipes": True,
);
const ParameterCollectionFormats = CollectionFormats + (
"multi": True,
);
const ValidIntFormatsHash = map {$1: True}, ValidIntFormats;
const ValidNumberFormatsHash = map {$1: True}, ValidNumberFormats;
const ValidStringFormatsHash = map {$1: True}, ValidStringFormats;
const MimeDataTypes = {
MimeTypeJson: (
"serialize": \make_json(),
"serialize_verbose": string (auto val) {return make_json(val, JGF_ADD_FORMATTING);},
"deserialize": \parse_json(),
"module": "json",
),
MimeTypeYamlRpc: (
"serialize": \make_yaml(),
"serialize_verbose": string (auto val) {return make_yaml(val, BlockStyle);},
"deserialize": \parse_yaml(),
"module": "yaml",
),
// Content-Type: application/x-www-form-urlencoded
MimeTypeFormUrlEncoded: (
"serialize": \mime_get_form_urlencoded_string(),
"serialize_verbose": \mime_get_form_urlencoded_string(),
"deserialize": \mime_parse_form_urlencoded_string(),
),
// Content-Type: multipart/form-data (handled manually)
MimeTypeMultipartFormData: {},
};
const SerializationModules = map $1.module, MimeDataTypes.iterator(), $1;
const MimeContentTypes = keys MimeDataTypes;
const ValidSchemes = ("http", "https", "ws", "wss");
const ValidSchemesHash = map {$1: True}, ValidSchemes;
class ObjectBase {
public:
public :
hash vendorExtensions;
public:
constructor();
constructor(hash oh);
constructor(ObjectBase other);
initialize(hash oh);
};
class SchemaBase {
public:
public :
*float maximum;
*float minimum;
*bool exclusiveMax;
*bool exclusiveMin;
*int maxLength;
*int minLength;
*string pattern;
*int maxItems;
*int minItems;
*bool uniqueItems;
hash<string, bool> enum;
*float multipleOf;
public:
constructor(string objType, hash oh);
constructor(SchemaBase other);
private:
auto getExampleValue(string type, *string format);
public:
private:
check(bool serialize, bool request, string type, *string format, *SchemaObject items, string path, string method, string name, reference value);
public:
private:
checkStringIntern(string path, string method, string name, string value);
public:
private:
checkIntern(bool serialize, bool request, string type, *string format, string path, string method, string name, int v, reference<int> value);
public:
// NOTE: "number" also accepts "float"
private:
checkIntern(bool serialize, bool request, string type, *string format, string path, string method, string name, number v, reference<number> value);
public:
private:
checkIntern(bool serialize, bool request, string type, *string format, string path, string method, string name, binary v, reference value);
public:
private:
checkIntern(bool serialize, bool request, string type, *string format, string path, string method, string name, string v, reference value);
public:
private:
checkIntern(bool serialize, bool request, string type, *string format, string path, string method, string name, date v, reference value);
public:
private:
checkIntern(bool serialize, bool request, string type, *string format, string path, string method, string name, bool v, reference<bool> value);
public:
private:
checkIntern(bool serialize, bool request, string type, *string format, string path, string method, string name, nothing v, reference<nothing> value);
public:
private:
checkArrayParam(bool serialize, bool request, SchemaObject items, string path, string method, string name, reference<softlist> value);
public:
private:
static throwInvalidType(string name, string actual, string expected);
public:
};
class SwaggerLoader {
public:
static SwaggerSchema fromString(string swaggerSpecification, bool json = True);
static SwaggerSchema fromFile(string filepath);
static hash parseSchemaContent(string filepath, string str);
};
class SwaggerSchema : public ObjectBase,public AbstractRestSchemaValidator {
public:
public :
string swaggerSpec;
InfoObject info;
PathsObject paths;
*string host;
*string basePath;
hash<string, bool> schemes;
hash<string, bool> consumes;
hash<string, bool> produces;
hash<string, SchemaObject> definitions();
hash<string, AbstractParameterObject> parameters();
hash<string, ResponseObject> responses;
hash<string, SecuritySchemeObject> securityDefinitions;
hash<string, softlist<string>> security;
list<TagObject> tags;
*ExternalDocumentationObject externalDocs;
const SwaggerOptions = (
"compact_serialization": True,
"def_path": True,
"try_import": True,
);
public:
private :
bool compact_serialization;
*string def_path;
*code try_import;
public:
constructor(hash oh, *hash opts) ;
SchemaObject resolveSchemaObject(string name, string refstr, hash oh);
ParameterItemsSchemaObject resolveParameterItemsSchemaObject(string name, string refstr, hash oh);
AbstractParameterObject resolveParameter(string name, string refstr, hash oh);
ResponseObject resolveResponse(string name, string refstr, hash oh);
private:
string getTargetUrlImpl();
public:
private:
hash<RestSchemaValidator::RestRequestClientInfo> processRequestImpl(string method, string path, auto body, *hash headers, *softlist<string> content_types);
public:
private:
hash<RestSchemaValidator::RestRequestServerInfo> parseRequestImpl(string method, string path, *data http_body, reference<hash> headers);
public:
private:
hash<HttpResponseInfo> processResponseImpl(string method, string path, int code, auto response_body, *hash headers, *softlist<string> content_types);
public:
private:
hash<RestSchemaValidator::RestResponseClientInfo> parseResponseImpl(string method, string path, int code, *data response_body, hash hdr);
public:
private:
hash<string, list<string>> getPathOperationHashImpl();
public:
private:
string getBasePathImpl();
public:
private:
setBasePathImpl(string basePath);
public:
private:
hash<RestQoreExampleCodeInfo> getQoreExampleRequestImpl(string method, string path);
public:
private:
hash<RestSchemaValidator::RestExampleRequestInfo> getExampleRequestImpl(string method, string path, *softlist<string> content_types);
public:
private:
hash<RestQoreExampleCodeInfo> getQoreExampleResponseImpl(string method, string path, int code);
public:
private:
hash<RestExampleResponseInfo> getExampleResponseImpl(string method, string path, int code, *softlist<string> content_types);
public:
private:
hash getExternalReference(string refstr);
public:
private;
private;
private;
private;
private;
};
class InfoObject : public ObjectBase {
public:
public :
string title;
*string desc;
*string termsOfService;
string version;
*ContactObject contact;
*LicenseObject license;
public:
constructor(hash oh) ;
};
class ContactObject : public ObjectBase {
public:
public :
*string name;
*string url;
*string email;
public:
constructor(hash oh) ;
};
class LicenseObject : public ObjectBase {
public:
public :
string name;
*string url;
public:
constructor(hash oh) ;
};
class PathComponent {
public:
private :
string pfx;
string name;
*PathComponent wildcard;
*PathItemObject pio;
hash<string, PathComponent> paths;
public:
constructor(hash oh, string pfx, SwaggerSchema swagger);
private:
constructor(string full_path, list l, int offset, hash oh);
public:
private:
add(string full_path, list l, int offset, hash oh, SwaggerSchema swagger);
public:
PathItemObject match(list path);
getPathOperationHash(reference<hash<string, list<string>>> h);
};
class PathsObject : public ObjectBase {
public:
private :
PathComponent paths;
public:
constructor(hash oh, SwaggerSchema swagger) ;
PathItemObject match(string path);
hash<string, list<string>> getPathOperationHash();
};
class PathItemObject : public ObjectBase {
public:
public :
*string ref;
hash<string, AbstractParameterObject> parameters();
AbstractParameterObject body;
public:
private :
hash<string, OperationObject> operations;
public:
constructor(string path, hash oh, SwaggerSchema swagger) ;
OperationObject getOperation(string method, string path);
softlist getMethods();
};
class OperationObject : public ObjectBase {
public:
public :
string path;
string method;
list tags;
*string summary;
*string desc;
bool deprec = False;
*ExternalDocumentationObject externalDocs;
*string operationId;
hash<string, bool> consumes;
hash<string, bool> produces;
hash<string, AbstractParameterObject> parameters();
AbstractParameterObject body;
ResponsesObject responses;
list<string> schemes;
list<hash<string, list<string>>> security;
public:
constructor(string path, string method, hash oh, SwaggerSchema swagger) ;
validateRequest(bool serialize, PathItemObject pio, reference<hash<UriQueryInfo>> h, reference<auto> body, reference<hash> headers, *reference<hash<string, bool>> mime_types);
parseRequest(PathItemObject pio, reference<hash<UriQueryInfo>> h, reference<auto> body, reference<hash> headers);
validateResponse(string method, string path, PathItemObject pio, int code, reference<auto> response_body, reference<hash<string, bool>> mime_types);
hash<RestQoreExampleCodeInfo> getQoreExampleRequest(string method, string path, PathItemObject pio, SwaggerSchema swagger);
hash<RestSchemaValidator::RestExampleRequestInfo> getExampleRequest(string method, string path, PathItemObject pio, SwaggerSchema swagger, reference rbody);
hash<RestQoreExampleCodeInfo> getQoreExampleResponse(string method, string path, int code);
hash<RestExampleResponseInfo> getExampleResponse(string method, string path, int code, reference body);
private:
getQoreExampleParams(reference<hash> query, reference<hash> headers, hash<string, AbstractParameterObject> parameters, *hash<string, AbstractParameterObject> child_params);
public:
private:
doDefaultParams(reference<hash<UriQueryInfo>> h, reference<hash> headers, reference<auto> body, hash<string, AbstractParameterObject> parameters, *hash<string, AbstractParameterObject> child_params);
public:
private:
checkMissingParams(hash<UriQueryInfo> h, *hash headers, auto body, hash<string, AbstractParameterObject> parameters, *hash<string, AbstractParameterObject> child_params);
public:
private:
*ResponseObject getResponse(int code);
public:
private:
error(string err, string fmt);
public:
};
class ExternalDocumentationObject : public ObjectBase {
public:
public :
*string desc;
string url;
public:
constructor(hash oh) ;
};
class AbstractParameterObject : public ObjectBase {
public:
public :
string name;
string inLoc;
*string desc;
bool required = False;
public:
private :
const OtherParameterMap = (
"query": True,
"header": True,
"path": True,
"formData": True,
);
public:
constructor(hash oh) ;
abstract check(bool serialize, bool request, string path, string method, string name, reference value);
auto getDefaultValue();
static AbstractParameterObject newParameter(string name, hash oh, SwaggerSchema swagger);
};
class BodyParameter : public AbstractParameterObject {
public:
public :
SchemaObject schema;
public:
constructor(hash oh, SwaggerSchema swagger) ;
check(bool serialize, bool request, string path, string method, string name, reference value);
string getQoreExample(reference<hash<RestQoreExampleCodeInfo>> rv);
// returns an example value for a REST API call
auto getExampleValue();
};
class OtherParameter : public AbstractParameterObject,public SchemaBase {
public:
public :
string type;
*string format;
bool allowEmptyValue = False;
*ParameterItemsSchemaObject items;
*string collectionFormat;
auto defaultVal;
const ParameterTypes = SchemaObject::ScalarTypes + (
"file": True,
);
public:
constructor(string name, hash oh, SwaggerSchema swagger) ;
check(bool serialize, bool request, string path, string method, string name, reference value);
auto getDefaultValue();
auto getExampleValue();
private:
static checkValueType(auto value, string type, *SchemaObject items, *string loc);
public:
};
class ResponsesObject : public ObjectBase {
public:
public :
// The documentation of responses other than the ones declared for specific HTTP response codes.
ResponseObject defaultResp;
// A hash mapping HTTP status codes to @ref ResponseObject "ResponseObjects".
hash<string, ResponseObject> responses;
public:
constructor(string path, string method, hash oh, SwaggerSchema swagger) ;
};
class ResponseObject : public ObjectBase {
public:
public :
string desc;
*SchemaObject schema;
hash headers;
hash examples;
public:
private:
constructor(string key, hash oh, SwaggerSchema swagger) ;
public:
static ResponseObject newResponse(string key, hash oh, SwaggerSchema swagger);
};
class HeaderObject : public ObjectBase,public SchemaBase {
public:
public :
*string desc;
string type;
*string format;
*SchemaObject items;
*string collectionFormat;
auto defaultVal;
public:
constructor(hash oh, SwaggerSchema swagger) ;
private:
static checkValueType(auto value, string type, *SchemaObject items, *string loc);
public:
};
class TagObject : public ObjectBase {
public:
public :
string name;
*string desc;
*ExternalDocumentationObject externalDocs;
public:
constructor(hash oh) ;
};
class SchemaObject : public ObjectBase,public SchemaBase {
public:
public :
string name;
string type;
*string format;
*string title;
*string desc;
*SchemaObject items;
auto defaultVal;
*int maxProperties;
*int minProperties;
hash<string, SchemaObject> properties;
auto additionalProperties;
hash<string, bool> required;
*string discriminator;
bool readOnly = False;
list<SchemaObject> allOf();
*XmlObject xml;
*ExternalDocumentationObject externalDocs;
auto example;
const ScalarTypes = (
"string": True,
"number": True,
"integer": True,
"boolean": True,
"array": True,
);
const ReferenceTypes = ScalarTypes + (
"object": True,
);
public:
private:
constructor(string name, hash oh, SwaggerSchema swagger) ;
public:
string getQoreExample(reference<hash<RestQoreExampleCodeInfo>> rv, string name, bool decl);
// returns an example value for a REST API call
auto getExampleValue();
check(bool serialize, bool request, string path, string method, string name, reference value);
private:
checkObjectProperty(string name, string prop);
public:
private:
checkIntern(bool serialize, bool request, string type, *string format, string path, string method, string name, hash v, reference<hash> value);
public:
private:
static checkValueType(auto value, string type, *SchemaObject items, *string loc);
public:
static SchemaObject newSchemaObject(string name, hash oh, SwaggerSchema swagger);
static SchemaObject newSchemaObject(string name, auto error, SwaggerSchema swagger);
};
class ParameterItemsSchemaObject : public SchemaObject {
public:
public :
*string collectionFormat;
public:
private:
constructor(string name, hash oh, SwaggerSchema swagger) ;
public:
static ParameterItemsSchemaObject newSchemaObject(string name, hash oh, SwaggerSchema swagger);
static ParameterItemsSchemaObject newSchemaObject(string name, auto error, SwaggerSchema swagger);
};
class XmlObject : public ObjectBase {
public:
public :
*string name;
*string ns;
*string prefix;
bool attribute = False;
bool wrapped = False;
public:
constructor(hash oh) ;
};
class SecuritySchemeObject : public ObjectBase {
public:
public :
string type;
*string desc;
*string name;
*string inLoc;
*string flow;
*string authorizationUrl;
*string tokenUrl;
*ScopesObject scopes;
public:
constructor(hash oh) ;
};
class ScopesObject : public ObjectBase {
public:
public :
hash<string, string> fields;
public:
constructor(hash oh) ;
};
} // end namespace swagger
// private namespace for internal definitions
namespace Priv {
// a set of string values
const SwaggerListToStringSet = -1;
// a set of any type that can be converted to a string
const SwaggerListToAnySet = -2;
const SwaggerListToHashOfStrings = -3;
const TypeMap = (
NT_INT: "int",
NT_STRING: "string",
NT_FLOAT: "float",
NT_LIST: "list",
NT_HASH: "hash",
NT_NOTHING: "nothing",
NT_BOOLEAN: "bool",
SwaggerListToStringSet: "list<string>",
SwaggerListToAnySet: "list<auto>",
);
required_field(string objType, hash oh, string name, int typeCode, reference<auto> target);
required_field(string objType, hash oh, string name, hash<string, bool> typeCodes, reference<auto> target);
bool optional_field(string objType, hash oh, string name, int typeCode, reference<auto> target);
bool optional_field(string objType, hash oh, string name, hash<string, bool> typeCodes, reference<auto> target);
check_type_code(string objType, string name, auto val, int typeCode);
get_value(string objType, string name, int typeCode, auto val, reference<auto> target);
string get_qore_type(string name, string type, *string format, *SchemaObject items);
}
Swagger::SwaggerSchema::produces
hash< string, bool > produces
A set of MIME types (strings) the APIs can produce.
Definition: Swagger.qm.dox.h:487
Swagger::PathItemObject
Describes the operations available on a single path.
Definition: Swagger.qm.dox.h:1034
Swagger::SwaggerSchema::definitions
hash< string, SchemaObject > definitions()
An object to hold data types produced and consumed by operations.
Swagger::SchemaBase
Base used by OtherParameter, HeaderObject and SchemaObject.
Definition: Swagger.qm.dox.h:257
Swagger::ResponsesObject::responses
hash< string, ResponseObject > responses
Definition: Swagger.qm.dox.h:1608
date
date date(date dt)
Swagger::ResponsesObject::defaultResp
ResponseObject defaultResp
Definition: Swagger.qm.dox.h:1601
Swagger::SchemaObject::check
check(bool serialize, bool request, string path, string method, string name, reference value)
validates the value against the schema definition
Swagger::PathComponent::pfx
string pfx
path prefix
Definition: Swagger.qm.dox.h:946
Swagger::SwaggerSchema::consumes
hash< string, bool > consumes
A set of MIME types (strings) the APIs can consume.
Definition: Swagger.qm.dox.h:480
Swagger::OperationObject::getQoreExampleRequest
hash< RestQoreExampleCodeInfo > getQoreExampleRequest(string method, string path, PathItemObject pio, SwaggerSchema swagger)
returns example Qore code for the given request
Swagger::PathsObject
This class stores the path tree for URI path matching.
Definition: Swagger.qm.dox.h:994
Swagger::ResponseObject::newResponse
static ResponseObject newResponse(string key, hash oh, SwaggerSchema swagger)
returns a new ResponseObject corresponding to the schema definition passed
Swagger::PathComponent::pio
*PathItemObject pio
the PathItemObject associated with this path (if any)
Definition: Swagger.qm.dox.h:955
Swagger::SwaggerSchema::paths
PathsObject paths
Required. The available paths and operations for the API.
Definition: Swagger.qm.dox.h:448
NT_NOTHING
const NT_NOTHING
Swagger::SwaggerSchema::resolveParameter
AbstractParameterObject resolveParameter(string name, string refstr, hash oh)
resolves a reference to a parameter
Swagger::ValidStringFormatsHash
const ValidStringFormatsHash
A hash of valid string type formats.
Definition: Swagger.qm.dox.h:184
Swagger::BodyParameter::schema
SchemaObject schema
Required. The schema defining the type used for the body parameter.
Definition: Swagger.qm.dox.h:1467
Swagger::AbstractParameterObject::name
string name
Required. The name of the parameter. Parameter names are case sensitive.
Definition: Swagger.qm.dox.h:1407
Swagger::SchemaBase::throwInvalidType
static throwInvalidType(string name, string actual, string expected)
throws an SCHEMA-VALIDATION-ERROR exception
Swagger::SwaggerSchema::private
private
processes a client-side REST request and returns a hash that can be used to make the outgoing client-...
Definition: Swagger.qm.dox.h:789
Swagger::OperationObject
Describes a single API operation on a path.
Definition: Swagger.qm.dox.h:1111
Swagger::ContactObject::email
*string email
The email address of the contact person/organization. MUST be in the format of an email address...
Definition: Swagger.qm.dox.h:896
Swagger::SwaggerSchema::externalDocs
*ExternalDocumentationObject externalDocs
Additional external documentation.
Definition: Swagger.qm.dox.h:540
Swagger::SwaggerSchema
This is the root document object for the API specification. It combines what previously was the Resou...
Definition: Swagger.qm.dox.h:433
Swagger::SchemaObject::maxProperties
*int maxProperties
See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.4.1.
Definition: Swagger.qm.dox.h:1811
Swagger::BodyParameter::getQoreExample
string getQoreExample(reference< hash< RestQoreExampleCodeInfo >> rv)
generates Qore example code for a REST API call
Swagger::ExternalDocumentationObject::url
string url
Required. The URL for the target documentation. Value MUST be in the format of a URL.
Definition: Swagger.qm.dox.h:1343
Swagger::ValidNumberFormatsHash
const ValidNumberFormatsHash
A hash of valid number type formats.
Definition: Swagger.qm.dox.h:182
Swagger::InfoObject::title
string title
Required. The title of the application.
Definition: Swagger.qm.dox.h:854
Swagger::XmlObject::prefix
*string prefix
The prefix to be used for the name.
Definition: Swagger.qm.dox.h:2067
Swagger::SecuritySchemeObject::name
*string name
The name of the header or query parameter to be used.
Definition: Swagger.qm.dox.h:2111
Swagger::PathComponent::paths
hash< string, PathComponent > paths
hash of non-wildcard paths to the next level
Definition: Swagger.qm.dox.h:958
Swagger::OperationObject::checkMissingParams
checkMissingParams(hash< UriQueryInfo > h, *hash headers, auto body, hash< string, AbstractParameterObject > parameters, *hash< string, AbstractParameterObject > child_params)
checks for missing params
Swagger::PathComponent::wildcard
*PathComponent wildcard
if there is a wildcard to a PathComponent
Definition: Swagger.qm.dox.h:952
Swagger::OtherParameter::defaultVal
auto defaultVal
Declares the value of the parameter that the server will use if none is provided. ...
Definition: Swagger.qm.dox.h:1550
Swagger::TagObject::name
string name
Required. The name of the tag.
Definition: Swagger.qm.dox.h:1759
Swagger::PathComponent
Holds the relative paths to the individual endpoints.
Definition: Swagger.qm.dox.h:941
Swagger::ParameterItemsSchemaObject::newSchemaObject
static ParameterItemsSchemaObject newSchemaObject(string name, hash oh, SwaggerSchema swagger)
returns a SchemaObject for the schema definition; resolves references
Swagger::TagObject::externalDocs
*ExternalDocumentationObject externalDocs
Additional external documentation for this tag.
Definition: Swagger.qm.dox.h:1765
Swagger::SecuritySchemeObject
Allows the definition of a security scheme that can be used by the operations.
Definition: Swagger.qm.dox.h:2097
Swagger::SchemaObject::example
auto example
A free-form property to include an example of an instance for this schema.
Definition: Swagger.qm.dox.h:1892
Swagger::SchemaObject::items
*SchemaObject items
See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.3.1.
Definition: Swagger.qm.dox.h:1805
Swagger::ContactObject::name
*string name
The identifying name of the contact person/organization.
Definition: Swagger.qm.dox.h:890
Swagger::OtherParameter::allowEmptyValue
bool allowEmptyValue
Sets the ability to pass empty-valued parameters.
Definition: Swagger.qm.dox.h:1521
Swagger
main namespace for all public Swagger declarations
Definition: Swagger.qm.dox.h:158
Swagger::SwaggerSchema::resolveResponse
ResponseObject resolveResponse(string name, string refstr, hash oh)
resolves a reference to a response
Swagger::PathComponent::name
string name
current component name
Definition: Swagger.qm.dox.h:949
Swagger::SchemaObject
defines an object in a schema
Definition: Swagger.qm.dox.h:1781
Swagger::MimeDataTypes
const MimeDataTypes
supported mime types for de/serializing data
Definition: Swagger.qm.dox.h:187
Swagger::BodyParameter
AbstractParameterObject specialization for "body" parameters.
Definition: Swagger.qm.dox.h:1462
Swagger::ScopesObject
Lists the available scopes for an OAuth2 security scheme.
Definition: Swagger.qm.dox.h:2166
True
const True
Swagger::SchemaObject::ReferenceTypes
const ReferenceTypes
valid reference types
Definition: Swagger.qm.dox.h:1904
Swagger::MimeContentTypes
const MimeDataTypes const MimeContentTypes
MIME types for data serialization.
Definition: Swagger.qm.dox.h:214
Swagger::SchemaBase::check
check(bool serialize, bool request, string type, *string format, *SchemaObject items, string path, string method, string name, reference value)
validates the value against the schema definition
Swagger::OperationObject::method
string method
the HTTP method for the operation
Definition: Swagger.qm.dox.h:1119
mime_get_form_urlencoded_string
string mime_get_form_urlencoded_string(hash h)
Swagger::SchemaBase::minItems
*int minItems
See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.3.3.
Definition: Swagger.qm.dox.h:286
Swagger::OperationObject::schemes
list< string > schemes
The transfer protocol for the operation.
Definition: Swagger.qm.dox.h:1190
Swagger::InfoObject::termsOfService
*string termsOfService
The Terms of Service for the API.
Definition: Swagger.qm.dox.h:860
Swagger::SwaggerSchema::tags
list< TagObject > tags
A list of tags used by the specification with additional metadata.
Definition: Swagger.qm.dox.h:537
NT_FLOAT
const NT_FLOAT
Swagger::XmlObject
A metadata object that allows for more fine-tuned XML model definitions.
Definition: Swagger.qm.dox.h:2049
MimeTypeMultipartFormData
const MimeTypeMultipartFormData
Swagger::ParameterCollectionFormats
const ParameterCollectionFormats
valid parameter collection formats
Definition: Swagger.qm.dox.h:175
Swagger::OperationObject::produces
hash< string, bool > produces
A hash of MIME types (strings) the operation can produce.
Definition: Swagger.qm.dox.h:1166
Swagger::SecuritySchemeObject::inLoc
*string inLoc
The location of the API key. Valid values are "query" or "header".
Definition: Swagger.qm.dox.h:2117
Swagger::OperationObject::path
string path
the URI path for the operation
Definition: Swagger.qm.dox.h:1116
number
number number(softnumber n)
Swagger::SchemaObject::externalDocs
*ExternalDocumentationObject externalDocs
Additional external documentation for this schema.
Definition: Swagger.qm.dox.h:1889
Swagger::BodyParameter::check
check(bool serialize, bool request, string path, string method, string name, reference value)
verifies the parameter in an actual REST API call
NT_LIST
const NT_LIST
binary
binary binary()
Swagger::ValidSchemes
const ValidSchemes
Valid transfer protocol schemes.
Definition: Swagger.qm.dox.h:217
Swagger::SchemaObject::newSchemaObject
static SchemaObject newSchemaObject(string name, hash oh, SwaggerSchema swagger)
returns a SchemaObject for the schema definition; resolves references
MimeTypeJson
const MimeTypeJson
NT_STRING
const NT_STRING
Swagger::SwaggerSchema::security
hash< string, softlist< string > > security
A declaration of which security schemes are applied for the API as a whole.
Definition: Swagger.qm.dox.h:525
Swagger::ObjectBase::initialize
initialize(hash oh)
Initialize.
Swagger::PathItemObject::parameters
hash< string, AbstractParameterObject > parameters()
A hash of parameters that are applicable for all the operations described under this path...
Swagger::SwaggerSchema::schemes
hash< string, bool > schemes
The transfer protocol of the API.
Definition: Swagger.qm.dox.h:473
Swagger::SchemaObject::required
hash< string, bool > required
See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.4.3.
Definition: Swagger.qm.dox.h:1834
Swagger::LicenseObject::name
string name
Required. The license name used for the API.
Definition: Swagger.qm.dox.h:916
Swagger::ObjectBase::constructor
constructor()
Constructor.
Swagger::SchemaBase::multipleOf
*float multipleOf
See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.1.
Definition: Swagger.qm.dox.h:298
False
const False
Swagger::OperationObject::getQoreExampleResponse
hash< RestQoreExampleCodeInfo > getQoreExampleResponse(string method, string path, int code)
returns example Qore code for the given response
Swagger::SchemaObject::checkValueType
static checkValueType(auto value, string type, *SchemaObject items, *string loc)
validates default values
Swagger::HeaderObject::type
string type
Required. The type of the object.
Definition: Swagger.qm.dox.h:1702
Swagger::SwaggerSchema::host
*string host
The host (name or IP) serving the API.
Definition: Swagger.qm.dox.h:457
Swagger::OperationObject::getExampleRequest
hash< RestSchemaValidator::RestExampleRequestInfo > getExampleRequest(string method, string path, PathItemObject pio, SwaggerSchema swagger, reference rbody)
returns a hash of example message information for the given request
Swagger::SwaggerSchema::def_path
*string def_path
the default path to use when retrieving external schema references
Definition: Swagger.qm.dox.h:556
Swagger::OperationObject::validateRequest
validateRequest(bool serialize, PathItemObject pio, reference< hash< UriQueryInfo >> h, reference< auto > body, reference< hash > headers, *reference< hash< string, bool >> mime_types)
processes a REST API client-side request to the operation
list
list list(...)
Swagger::SchemaObject::defaultVal
auto defaultVal
See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2.
Definition: Swagger.qm.dox.h:1808
Swagger::SchemaObject::checkIntern
checkIntern(bool serialize, bool request, string type, *string format, string path, string method, string name, hash v, reference< hash > value)
validates a schema object against a value
Swagger::OperationObject::consumes
hash< string, bool > consumes
A list of MIME types (strings) the operation can consume.
Definition: Swagger.qm.dox.h:1158
Swagger::SchemaObject::allOf
list< SchemaObject > allOf()
See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.3.
Swagger::PathsObject::getPathOperationHash
hash< string, list< string > > getPathOperationHash()
returns a hash of URI paths as keys with values as lists of supported HTTP methods ...
Swagger::AbstractParameterObject::getDefaultValue
auto getDefaultValue()
returns the default value of the parameter (default: NOTHING)
Swagger::AbstractParameterObject::desc
*string desc
A brief description of the parameter. This could contain examples of use. GFM syntax can be used for ...
Definition: Swagger.qm.dox.h:1417
Swagger::SchemaObject::name
string name
the name of this object for documentation and example purposes
Definition: Swagger.qm.dox.h:1786
Swagger::SwaggerSchema::swaggerSpec
string swaggerSpec
Swagger Specification version being used.
Definition: Swagger.qm.dox.h:442
MimeTypeFormUrlEncoded
const MimeTypeFormUrlEncoded
Swagger::SecuritySchemeObject::desc
*string desc
A short description for security scheme.
Definition: Swagger.qm.dox.h:2105
Swagger::InfoObject::contact
*ContactObject contact
The contact information for the exposed API.
Definition: Swagger.qm.dox.h:866
Swagger::OperationObject::body
AbstractParameterObject body
the body parameter, if defined for this operation
Definition: Swagger.qm.dox.h:1180
Swagger::OperationObject::error
error(string err, string fmt)
raises an exception with context information
Swagger::AbstractParameterObject
Describes a single operation parameter.
Definition: Swagger.qm.dox.h:1395
Swagger::OperationObject::parseRequest
parseRequest(PathItemObject pio, reference< hash< UriQueryInfo >> h, reference< auto > body, reference< hash > headers)
parses and processes a REST request on the server side
Swagger::SchemaBase::maxItems
*int maxItems
See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.3.2.
Definition: Swagger.qm.dox.h:283
Swagger::LicenseObject
License information for the exposed API.
Definition: Swagger.qm.dox.h:911
Swagger::ValidStringFormats
const ValidStringFormats
Valid string type formats.
Definition: Swagger.qm.dox.h:164
Swagger::SchemaBase::exclusiveMin
*bool exclusiveMin
See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.3.
Definition: Swagger.qm.dox.h:271
MimeTypeYamlRpc
const MimeTypeYamlRpc
Swagger::SchemaObject::desc
*string desc
See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.1.
Definition: Swagger.qm.dox.h:1802
Swagger::SecuritySchemeObject::type
string type
Required. The type of the security scheme. Valid values are "basic", "apiKey" or "oauth2".
Definition: Swagger.qm.dox.h:2102
Swagger::InfoObject::version
string version
Required. Provides the version of the application API (not to be confused with the specification vers...
Definition: Swagger.qm.dox.h:863
Swagger::SecuritySchemeObject::scopes
*ScopesObject scopes
The available scopes for the OAuth2 security scheme.
Definition: Swagger.qm.dox.h:2147
Swagger::OtherParameter::ParameterTypes
const ParameterTypes
valid parameter types
Definition: Swagger.qm.dox.h:1553
Swagger::SchemaBase::maxLength
*int maxLength
See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.1.
Definition: Swagger.qm.dox.h:274
Swagger::ExternalDocumentationObject::desc
*string desc
A short description of the target documentation. GFM syntax can be used for rich text representation...
Definition: Swagger.qm.dox.h:1340
Swagger::PathItemObject::getOperation
OperationObject getOperation(string method, string path)
returns the operation object for the given method
Swagger::SwaggerSchema::getExternalReference
hash getExternalReference(string refstr)
retrieves external references
Swagger::SchemaObject::type
string type
See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.2.
Definition: Swagger.qm.dox.h:1793
Swagger::PathComponent::add
add(string full_path, list l, int offset, hash oh, SwaggerSchema swagger)
adds a component or a Path Item Object to the tree
Swagger::SwaggerSchema::getBasePathImpl
string getBasePathImpl()
returns the base path prefix for all requests in this schema
Swagger::CollectionFormats
const CollectionFormats
allowed collection formats
Definition: Swagger.qm.dox.h:167
Swagger::OtherParameter::format
*string format
The extending format for the previously mentioned type. See Data Type Formats for further details...
Definition: Swagger.qm.dox.h:1513
Swagger::OtherParameter::getExampleValue
auto getExampleValue()
returns an example value of the parameter (default: NOTHING)
Swagger::SwaggerLoader::parseSchemaContent
static hash parseSchemaContent(string filepath, string str)
Load a schema definition from a file.
Swagger::SwaggerSchema::getQoreExampleResponseImpl
hash< RestQoreExampleCodeInfo > getQoreExampleResponseImpl(string method, string path, int code)
returns example Qore code for the given response
Swagger::OtherParameter
AbstractParameterObject specialization for parameters other than "body".
Definition: Swagger.qm.dox.h:1496
Swagger::OperationObject::doDefaultParams
doDefaultParams(reference< hash< UriQueryInfo >> h, reference< hash > headers, reference< auto > body, hash< string, AbstractParameterObject > parameters, *hash< string, AbstractParameterObject > child_params)
add default parameters
Swagger::OtherParameter::checkValueType
static checkValueType(auto value, string type, *SchemaObject items, *string loc)
validates default values
Swagger::ObjectBase
Base class for the Swagger specification objects, wrapping the vendor extensions. ...
Definition: Swagger.qm.dox.h:221
Swagger::SwaggerSchema::securityDefinitions
hash< string, SecuritySchemeObject > securityDefinitions
Security scheme definitions that can be used across the specification.
Definition: Swagger.qm.dox.h:511
Swagger::PathsObject::paths
PathComponent paths
the tree of path components for path matching with wildcards
Definition: Swagger.qm.dox.h:999
Swagger::SchemaObject::readOnly
bool readOnly
Relevant only for Schema "properties" definitions. Declares the property as "read only"...
Definition: Swagger.qm.dox.h:1865
Swagger::SchemaObject::format
*string format
The extending format for the previously mentioned type. See Data Type Formats for further details...
Definition: Swagger.qm.dox.h:1796
Swagger::OperationObject::tags
list tags
A list of tags (strings or TagObjects) for API documentation control.
Definition: Swagger.qm.dox.h:1125
Swagger::SwaggerSchema::parseResponseImpl
hash< RestSchemaValidator::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 ...
NT_INT
const NT_INT
NT_BOOLEAN
const NT_BOOLEAN
Swagger::ValidNumberFormats
const ValidNumberFormats
Valid number type formats.
Definition: Swagger.qm.dox.h:162
Swagger::OtherParameter::items
*ParameterItemsSchemaObject items
Required if type is "array". Describes the type of items in the array.
Definition: Swagger.qm.dox.h:1524
Swagger::SchemaObject::ScalarTypes
const ScalarTypes
valid scalar types
Definition: Swagger.qm.dox.h:1895
Swagger::SwaggerSchema::resolveSchemaObject
SchemaObject resolveSchemaObject(string name, string refstr, hash oh)
resolves a reference to a schema object
Swagger::XmlObject::name
*string name
Replaces the name of the element/attribute used for the described schema property.
Definition: Swagger.qm.dox.h:2061
Swagger::HeaderObject::defaultVal
auto defaultVal
Declares the value of the header that the server will use if none is provided.
Definition: Swagger.qm.dox.h:1729
Swagger::SwaggerSchema::processRequestImpl
hash< RestSchemaValidator::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-...
Swagger::SwaggerSchema::responses
hash< string, ResponseObject > responses
Response definitions that can be used across operations. This property does not define global respons...
Definition: Swagger.qm.dox.h:505
Swagger::PathItemObject::body
AbstractParameterObject body
The body parameter, if defined for this path.
Definition: Swagger.qm.dox.h:1059
Swagger::SchemaObject::properties
hash< string, SchemaObject > properties
See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.4.4.
Definition: Swagger.qm.dox.h:1821
Swagger::ResponseObject::desc
string desc
Required. A short description of the response. GFM syntax can be used for rich text representation...
Definition: Swagger.qm.dox.h:1633
Swagger::XmlObject::wrapped
bool wrapped
MAY be used only for an array definition. Signifies whether the array is wrapped (for example...
Definition: Swagger.qm.dox.h:2077
Swagger::SwaggerSchema::info
InfoObject info
Required. Provides metadata about the API. The metadata can be used by the clients if needed...
Definition: Swagger.qm.dox.h:445
Swagger::PathItemObject::operations
hash< string, OperationObject > operations
A hash of OperationObjects correspoding to different methods.
Definition: Swagger.qm.dox.h:1075
Swagger::SwaggerSchema::basePath
*string basePath
The base path on which the API is served, which is relative to the host.
Definition: Swagger.qm.dox.h:465
Swagger::SwaggerSchema::parseRequestImpl
hash< RestSchemaValidator::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) ...
Swagger::SchemaBase::checkArrayParam
checkArrayParam(bool serialize, bool request, SchemaObject items, string path, string method, string name, reference< softlist > value)
validates the value against the schema definition
Swagger::PathComponent::constructor
constructor(hash oh, string pfx, SwaggerSchema swagger)
creates the object
Swagger::HeaderObject::collectionFormat
*string collectionFormat
Determines the format of the array if type array is used.
Definition: Swagger.qm.dox.h:1720
Swagger::SwaggerLoader::fromFile
static SwaggerSchema fromFile(string filepath)
Load Swagger definition from a file.
Swagger::SwaggerSchema::getExampleResponseImpl
hash< RestExampleResponseInfo > getExampleResponseImpl(string method, string path, int code, *softlist< string > content_types)
returns a hash of example message information for the given request
Swagger::SwaggerSchema::processResponseImpl
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 ...
Swagger::OtherParameter::getDefaultValue
auto getDefaultValue()
returns the default value of the parameter (default: NOTHING)
type
string type(auto arg)
Swagger::AbstractParameterObject::required
bool required
Determines whether this parameter is mandatory.
Definition: Swagger.qm.dox.h:1425
Swagger::SchemaBase::minimum
*float minimum
See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.3.
Definition: Swagger.qm.dox.h:265
Swagger::SchemaObject::minProperties
*int minProperties
See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.4.2.
Definition: Swagger.qm.dox.h:1814
Swagger::SchemaBase::uniqueItems
*bool uniqueItems
See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.3.4.
Definition: Swagger.qm.dox.h:289
Swagger::HeaderObject::checkValueType
static checkValueType(auto value, string type, *SchemaObject items, *string loc)
validates default values
Swagger::OperationObject::parameters
hash< string, AbstractParameterObject > parameters()
A hash of parameters that are applicable for this operation.
Swagger::SecuritySchemeObject::flow
*string flow
The flow used by the OAuth2 security scheme.
Definition: Swagger.qm.dox.h:2125
Swagger::HeaderObject::format
*string format
The extending format for the previously mentioned type. See Data Type Formats for further details...
Definition: Swagger.qm.dox.h:1705
Swagger::ContactObject
Contact information for the exposed API.
Definition: Swagger.qm.dox.h:885
Swagger::SwaggerSchema::setBasePathImpl
setBasePathImpl(string basePath)
overrides the basePath value
Swagger::SwaggerSchema::resolveParameterItemsSchemaObject
ParameterItemsSchemaObject resolveParameterItemsSchemaObject(string name, string refstr, hash oh)
resolves a reference to a parameter items schema object
Swagger::ExternalDocumentationObject
Allows referencing an external resource for extended documentation.
Definition: Swagger.qm.dox.h:1335
Swagger::OperationObject::operationId
*string operationId
Unique string used to identify the operation.
Definition: Swagger.qm.dox.h:1150
Swagger::ContactObject::url
*string url
The URL pointing to the contact information. MUST be in the format of a URL.
Definition: Swagger.qm.dox.h:893
Swagger::OperationObject::validateResponse
validateResponse(string method, string path, PathItemObject pio, int code, reference< auto > response_body, reference< hash< string, bool >> mime_types)
validates a response against the response definition, if any
Swagger::HeaderObject::desc
*string desc
A short description of the header.
Definition: Swagger.qm.dox.h:1695
Swagger::PathItemObject::getMethods
softlist getMethods()
returns a list of HTTP methods supported by this object
Swagger::SchemaObject::additionalProperties
auto additionalProperties
See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.4.4.
Definition: Swagger.qm.dox.h:1828
Swagger::LicenseObject::url
*string url
A URL to the license used for the API. MUST be in the format of a URL.
Definition: Swagger.qm.dox.h:919
string
string string(softstring str, *string enc)
Swagger::PathItemObject::ref
*string ref
Allows for an external definition of this path item.
Definition: Swagger.qm.dox.h:1044
Swagger::XmlObject::ns
*string ns
The URL of the namespace definition. Value SHOULD be in the form of a URL.
Definition: Swagger.qm.dox.h:2064
Swagger::SchemaBase::exclusiveMax
*bool exclusiveMax
See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.2.
Definition: Swagger.qm.dox.h:268
Swagger::SchemaBase::maximum
*float maximum
See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.2.
Definition: Swagger.qm.dox.h:262
Swagger::XmlObject::attribute
bool attribute
Declares whether the property definition translates to an attribute instead of an element...
Definition: Swagger.qm.dox.h:2070
Priv
Definition: Swagger.qm.dox.h:2191
Swagger::ValidIntFormatsHash
const ValidIntFormatsHash
A hash of valid integer type formats.
Definition: Swagger.qm.dox.h:180
Swagger::PathComponent::getPathOperationHash
getPathOperationHash(reference< hash< string, list< string >>> h)
returns a hash of URI paths as keys with values as lists of supported HTTP methods ...
Swagger::OperationObject::responses
ResponsesObject responses
Required. The list of possible responses as they are returned from executing this operation...
Definition: Swagger.qm.dox.h:1183
Swagger::SecuritySchemeObject::tokenUrl
*string tokenUrl
The token URL to be used for this flow. This SHOULD be in the form of a URL.
Definition: Swagger.qm.dox.h:2137
Swagger::InfoObject::desc
*string desc
A short description of the application. GFM syntax can be used for rich text representation.
Definition: Swagger.qm.dox.h:857
Swagger::SwaggerSchema::parameters
hash< string, AbstractParameterObject > parameters()
Parameter definitions that can be used across operations. This property does not define global parame...
Swagger::SecuritySchemeObject::authorizationUrl
*string authorizationUrl
The authorization URL to be used for this flow. This SHOULD be in the form of a URL.
Definition: Swagger.qm.dox.h:2131
Swagger::AbstractParameterObject::newParameter
static AbstractParameterObject newParameter(string name, hash oh, SwaggerSchema swagger)
gets a concrete instance of an AbstractParameterObject
NT_HASH
const NT_HASH
Swagger::OperationObject::getExampleResponse
hash< RestExampleResponseInfo > getExampleResponse(string method, string path, int code, reference body)
returns a hash of example message information for the given request
Swagger::SwaggerSchema::getTargetUrlImpl
string getTargetUrlImpl()
returns the target URL for the schema
Swagger::AbstractParameterObject::inLoc
string inLoc
Required. The location of the parameter.
Definition: Swagger.qm.dox.h:1414
Swagger::ValidIntFormats
const ValidIntFormats
Valid integer type formats.
Definition: Swagger.qm.dox.h:160
Swagger::SwaggerSchema::compact_serialization
bool compact_serialization
if serialized data should be subject to compact serialization (default: True)
Definition: Swagger.qm.dox.h:553
Swagger::ResponseObject::schema
*SchemaObject schema
A definition of the response structure.
Definition: Swagger.qm.dox.h:1642
Swagger::TagObject::desc
*string desc
A short description for the tag. GFM syntax can be used for rich text representation.
Definition: Swagger.qm.dox.h:1762
Swagger::OperationObject::externalDocs
*ExternalDocumentationObject externalDocs
Additional external documentation for this operation.
Definition: Swagger.qm.dox.h:1141
Swagger::AbstractParameterObject::check
abstract check(bool serialize, bool request, string path, string method, string name, reference value)
verifies the parameter in an actual REST API call
Swagger::SwaggerSchema::SwaggerOptions
const SwaggerOptions
SwaggerSchema options.
Definition: Swagger.qm.dox.h:543
Swagger::SwaggerSchema::try_import
*code try_import
a call reference or closure to be passed a string name for external schema references, must take a string argument (the resource name) and return a string (the resource data)
Definition: Swagger.qm.dox.h:559
Swagger::OperationObject::security
list< hash< string, list< string > > > security
A declaration of which security schemes are applied for this operation.
Definition: Swagger.qm.dox.h:1205
Swagger::ParameterItemsSchemaObject
items schema object for non-body parameters
Definition: Swagger.qm.dox.h:1981
Swagger::HeaderObject
describes a single HTTP header
Definition: Swagger.qm.dox.h:1690
Swagger::ResponsesObject
contains the possible responses for an operation
Definition: Swagger.qm.dox.h:1593
Swagger::ObjectBase::vendorExtensions
hash vendorExtensions
Allows extensions to the Swagger Schema.
Definition: Swagger.qm.dox.h:230
hash
hash hash(object obj)
Swagger::SchemaBase::constructor
constructor(string objType, hash oh)
Constructor.
Swagger::ParameterItemsSchemaObject::collectionFormat
*string collectionFormat
Determines the format of the array if type array is used.
Definition: Swagger.qm.dox.h:1999
Swagger::SwaggerSchema::getPathOperationHashImpl
hash< string, list< string > > getPathOperationHashImpl()
returns a hash of URI paths as keys with values as lists of supported HTTP methods ...
Swagger::SerializationModules
const SerializationModules
modules available for data serialization and/or deserialization
Definition: Swagger.qm.dox.h:211
Swagger::PathsObject::match
PathItemObject match(string path)
matches a URI path with a PathItemObject
Swagger::SwaggerSchema::getExampleRequestImpl
hash< RestSchemaValidator::RestExampleRequestInfo > getExampleRequestImpl(string method, string path, *softlist< string > content_types)
returns a hash of example message information for the given request
Swagger::SchemaBase::getExampleValue
auto getExampleValue(string type, *string format)
returns an example value for the given type
Swagger::SchemaObject::title
*string title
See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.1.
Definition: Swagger.qm.dox.h:1799
Swagger::SchemaBase::pattern
*string pattern
See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3.
Definition: Swagger.qm.dox.h:280
Swagger::SchemaObject::getQoreExample
string getQoreExample(reference< hash< RestQoreExampleCodeInfo >> rv, string name, bool decl)
returns example Qore code for the object
Swagger::InfoObject
The object provides metadata about the API. The metadata can be used by the clients if needed...
Definition: Swagger.qm.dox.h:849
Swagger::OtherParameter::collectionFormat
*string collectionFormat
Determines the format of the array if type array is used.
Definition: Swagger.qm.dox.h:1540
Swagger::ResponseObject::headers
hash headers
A hash of headers that are (can be) sent with the response.
Definition: Swagger.qm.dox.h:1648
Swagger::HeaderObject::items
*SchemaObject items
Required if type is "array". Describes the type of items in the array.
Definition: Swagger.qm.dox.h:1708
Swagger::SwaggerLoader
Used for loading the Swagger definitions.
Definition: Swagger.qm.dox.h:395
Swagger::ResponseObject::examples
hash examples
A hash of example response messages.
Definition: Swagger.qm.dox.h:1658
Swagger::ScopesObject::fields
hash< string, string > fields
Maps between a name of a scope to a short description of it (as the value of the property).
Definition: Swagger.qm.dox.h:2174
Swagger::OperationObject::getResponse
*ResponseObject getResponse(int code)
returns the ResponseObject for hthe given HTTP code or NOTHING if none is configured ...
Swagger::SchemaObject::discriminator
*string discriminator
Adds support for polymorphism.
Definition: Swagger.qm.dox.h:1855
Swagger::OtherParameter::type
string type
Required. The type of the parameter.
Definition: Swagger.qm.dox.h:1510
mime_parse_form_urlencoded_string
hash< auto > mime_parse_form_urlencoded_string(string str)
Swagger::ResponseObject
Describes a single response from an API Operation.
Definition: Swagger.qm.dox.h:1628
Swagger::PathComponent::match
PathItemObject match(list path)
returns either a PathItemObject for the path
Swagger::TagObject
Allows adding metadata to a single tag that is used by the OperationObject. It is not mandatory to ha...
Definition: Swagger.qm.dox.h:1754
Swagger::SchemaObject::xml
*XmlObject xml
This MAY be used only on properties schemas. It has no effect on root schemas.
Definition: Swagger.qm.dox.h:1886
Swagger::SwaggerLoader::fromString
static SwaggerSchema fromString(string swaggerSpecification, bool json=True)
Load Swagger definition from a string.
Swagger::OperationObject::desc
*string desc
A verbose explanation of the operation behavior. GFM syntax can be used for rich text representation...
Definition: Swagger.qm.dox.h:1131
Swagger::OtherParameter::check
check(bool serialize, bool request, string path, string method, string name, reference value)
validates the value against the schema definition
Swagger::OperationObject::deprec
bool deprec
Declares this operation to be deprecated.
Definition: Swagger.qm.dox.h:1138
Swagger::OperationObject::summary
*string summary
A short summary of what the operation does.
Definition: Swagger.qm.dox.h:1128
Swagger::InfoObject::license
*LicenseObject license
The license information for the exposed API.
Definition: Swagger.qm.dox.h:869
Swagger::SchemaBase::minLength
*int minLength
See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.2.
Definition: Swagger.qm.dox.h:277
Swagger::SwaggerSchema::getQoreExampleRequestImpl
hash< RestQoreExampleCodeInfo > getQoreExampleRequestImpl(string method, string path)
returns example Qore code for the given request