185 "serialize": \make_json(),
186 "serialize_verbose":
string (
auto val) {
return make_json(val, JGF_ADD_FORMATTING);},
187 "deserialize": \parse_json(),
191 "serialize": \make_yaml(),
192 "serialize_verbose":
string (
auto val) {
return make_yaml(val, BlockStyle);},
193 "deserialize": \parse_yaml(),
291 hash<string, bool>
enum;
319 check(
bool serialize,
bool request,
string type, *
string format, *
SchemaObject items,
string path,
string method,
string name, reference value);
325 checkStringIntern(
string path,
string method,
string name,
string value);
331 checkIntern(
bool serialize,
bool request,
string type, *
string format,
string path,
string method,
string name,
int v, reference<int> value);
338 checkIntern(
bool serialize,
bool request,
string type, *
string format,
string path,
string method,
string name,
number v, reference<number> value);
345 checkIntern(
bool serialize,
bool request,
string type, *
string format,
string path,
string method,
string name,
binary v, reference value);
352 checkIntern(
bool serialize,
bool request,
string type, *
string format,
string path,
string method,
string name,
string v, reference value);
359 checkIntern(
bool serialize,
bool request,
string type, *
string format,
string path,
string method,
string name,
date v, reference value);
365 checkIntern(
bool serialize,
bool request,
string type, *
string format,
string path,
string method,
string name,
bool v, reference<bool> value);
371 checkIntern(
bool serialize,
bool request,
string type, *
string format,
string path,
string method,
string name, nothing v, reference<nothing> value);
378 checkArrayParam(
bool serialize,
bool request,
SchemaObject items,
string path,
string method,
string name, reference<softlist> value);
495 hash<string, AbstractParameterObject>
parameters();
540 "compact_serialization":
True,
626 hash<RestSchemaValidator::RestRequestClientInfo>
processRequestImpl(
string method,
string path,
auto body, *
hash headers, *softlist<string> content_types);
642 hash<RestSchemaValidator::RestRequestServerInfo>
parseRequestImpl(
string method,
string path, *data http_body, reference<hash> headers);
664 hash<HttpResponseInfo>
processResponseImpl(
string method,
string path,
int code,
auto response_body, *
hash headers, *softlist<string> content_types);
681 hash<RestSchemaValidator::RestResponseClientInfo>
parseResponseImpl(
string method,
string path,
int code, *data response_body,
hash hdr);
733 hash<RestSchemaValidator::RestExampleRequestInfo>
getExampleRequestImpl(
string method,
string path, *softlist<string> content_types);
760 hash<RestExampleResponseInfo>
getExampleResponseImpl(
string method,
string path,
int code, *softlist<string> content_types);
1041 hash<string, AbstractParameterObject>
parameters();
1162 hash<string, AbstractParameterObject>
parameters();
1217 validateRequest(
bool serialize,
PathItemObject pio, reference<hash<UriQueryInfo>> h, reference<auto>
body, reference<hash> headers, *reference<hash<string, bool>> mime_types);
1284 getQoreExampleParams(reference<hash> query, reference<hash> headers, hash<string, AbstractParameterObject>
parameters, *hash<string, AbstractParameterObject> child_params);
1291 doDefaultParams(reference<hash<UriQueryInfo>> h, reference<hash> headers, reference<auto>
body, hash<string, AbstractParameterObject>
parameters, *hash<string, AbstractParameterObject> child_params);
1314 error(
string err,
string fmt);
1415 const OtherParameterMap = (
1436 abstract check(
bool serialize,
bool request,
string path,
string method,
string name, reference value);
1468 check(
bool serialize,
bool request,
string path,
string method,
string name, reference value);
1472 string getQoreExample(reference<hash<RestQoreExampleCodeInfo>> rv);
1476 auto getExampleValue();
1558 check(
bool serialize,
bool request,
string path,
string method,
string name, reference value);
1861 list<SchemaObject>
allOf();
1914 string getQoreExample(reference<hash<RestQoreExampleCodeInfo>> rv,
string name,
bool decl);
1918 auto getExampleValue();
1922 check(
bool serialize,
bool request,
string path,
string method,
string name, reference value);
1927 checkObjectProperty(
string name,
string prop);
1934 checkIntern(
bool serialize,
bool request,
string type, *
string format,
string path,
string method,
string name,
hash v, reference<hash> value);
2178 const SwaggerListToStringSet = -1;
2180 const SwaggerListToAnySet = -2;
2181 const SwaggerListToHashOfStrings = -3;
2191 SwaggerListToStringSet:
"list<string>",
2192 SwaggerListToAnySet:
"list<auto>",
2206 required_field(
string objType,
hash oh,
string name,
int typeCode, reference<auto> target);
2220 required_field(
string objType,
hash oh,
string name, hash<string, bool> typeCodes, reference<auto> target);
2235 bool optional_field(
string objType,
hash oh,
string name,
int typeCode, reference<auto> target);
2250 bool optional_field(
string objType,
hash oh,
string name, hash<string, bool> typeCodes, reference<auto> target);
2254 check_type_code(
string objType,
string name,
auto val,
int typeCode);
2258 get_value(
string objType,
string name,
int typeCode,
auto val, reference<auto> target);
2262 string get_qore_type(
string name,
string type, *
string format, *SchemaObject items);
hash< string, bool > produces
A set of MIME types (strings) the APIs can produce.
Definition: Swagger.qm.dox.h:483
Describes the operations available on a single path.
Definition: Swagger.qm.dox.h:1019
hash< string, SchemaObject > definitions()
An object to hold data types produced and consumed by operations.
Base used by OtherParameter, HeaderObject and SchemaObject.
Definition: Swagger.qm.dox.h:253
hash< string, ResponseObject > responses
Definition: Swagger.qm.dox.h:1593
ResponseObject defaultResp
Definition: Swagger.qm.dox.h:1586
check(bool serialize, bool request, string path, string method, string name, reference value)
validates the value against the schema definition
string pfx
path prefix
Definition: Swagger.qm.dox.h:931
hash< string, bool > consumes
A set of MIME types (strings) the APIs can consume.
Definition: Swagger.qm.dox.h:476
hash< RestQoreExampleCodeInfo > getQoreExampleRequest(string method, string path, PathItemObject pio, SwaggerSchema swagger)
returns example Qore code for the given request
This class stores the path tree for URI path matching.
Definition: Swagger.qm.dox.h:979
static ResponseObject newResponse(string key, hash oh, SwaggerSchema swagger)
returns a new ResponseObject corresponding to the schema definition passed
*PathItemObject pio
the PathItemObject associated with this path (if any)
Definition: Swagger.qm.dox.h:940
PathsObject paths
Required. The available paths and operations for the API.
Definition: Swagger.qm.dox.h:444
AbstractParameterObject resolveParameter(string name, string refstr, hash oh)
resolves a reference to a parameter
const ValidStringFormatsHash
A hash of valid string type formats.
Definition: Swagger.qm.dox.h:180
SchemaObject schema
Required. The schema defining the type used for the body parameter.
Definition: Swagger.qm.dox.h:1452
string name
Required. The name of the parameter. Parameter names are case sensitive.
Definition: Swagger.qm.dox.h:1392
static throwInvalidType(string name, string actual, string expected)
throws an SCHEMA-VALIDATION-ERROR exception
Describes a single API operation on a path.
Definition: Swagger.qm.dox.h:1096
*ExternalDocumentationObject externalDocs
Additional external documentation.
Definition: Swagger.qm.dox.h:536
This is the root document object for the API specification. It combines what previously was the Resou...
Definition: Swagger.qm.dox.h:429
*int maxProperties
See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.4.1.
Definition: Swagger.qm.dox.h:1796
string getQoreExample(reference< hash< RestQoreExampleCodeInfo >> rv)
generates Qore example code for a REST API call
string url
Required. The URL for the target documentation. Value MUST be in the format of a URL.
Definition: Swagger.qm.dox.h:1328
const ValidNumberFormatsHash
A hash of valid number type formats.
Definition: Swagger.qm.dox.h:178
string title
Required. The title of the application.
Definition: Swagger.qm.dox.h:839
*string prefix
The prefix to be used for the name.
Definition: Swagger.qm.dox.h:2052
*string name
The name of the header or query parameter to be used.
Definition: Swagger.qm.dox.h:2096
hash< string, PathComponent > paths
hash of non-wildcard paths to the next level
Definition: Swagger.qm.dox.h:943
checkMissingParams(hash< UriQueryInfo > h, *hash headers, auto body, hash< string, AbstractParameterObject > parameters, *hash< string, AbstractParameterObject > child_params)
checks for missing params
*PathComponent wildcard
if there is a wildcard to a PathComponent
Definition: Swagger.qm.dox.h:937
auto defaultVal
Declares the value of the parameter that the server will use if none is provided. ...
Definition: Swagger.qm.dox.h:1535
string name
Required. The name of the tag.
Definition: Swagger.qm.dox.h:1744
Holds the relative paths to the individual endpoints.
Definition: Swagger.qm.dox.h:926
static ParameterItemsSchemaObject newSchemaObject(string name, hash oh, SwaggerSchema swagger)
returns a SchemaObject for the schema definition; resolves references
*ExternalDocumentationObject externalDocs
Additional external documentation for this tag.
Definition: Swagger.qm.dox.h:1750
Allows the definition of a security scheme that can be used by the operations.
Definition: Swagger.qm.dox.h:2082
auto example
A free-form property to include an example of an instance for this schema.
Definition: Swagger.qm.dox.h:1877
*SchemaObject items
See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.3.1.
Definition: Swagger.qm.dox.h:1790
bool allowEmptyValue
Sets the ability to pass empty-valued parameters.
Definition: Swagger.qm.dox.h:1506
ResponseObject resolveResponse(string name, string refstr, hash oh)
resolves a reference to a response
string name
current component name
Definition: Swagger.qm.dox.h:934
defines an object in a schema
Definition: Swagger.qm.dox.h:1766
const MimeDataTypes
supported mime types for de/serializing data
Definition: Swagger.qm.dox.h:183
AbstractParameterObject specialization for "body" parameters.
Definition: Swagger.qm.dox.h:1447
Lists the available scopes for an OAuth2 security scheme.
Definition: Swagger.qm.dox.h:2151
const ReferenceTypes
valid reference types
Definition: Swagger.qm.dox.h:1889
const MimeDataTypes const MimeContentTypes
MIME types for data serialization.
Definition: Swagger.qm.dox.h:210
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
string method
the HTTP method for the operation
Definition: Swagger.qm.dox.h:1104
string mime_get_form_urlencoded_string(hash h)
*int minItems
See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.3.3.
Definition: Swagger.qm.dox.h:282
list< string > schemes
The transfer protocol for the operation.
Definition: Swagger.qm.dox.h:1175
*string termsOfService
The Terms of Service for the API.
Definition: Swagger.qm.dox.h:845
list< TagObject > tags
A list of tags used by the specification with additional metadata.
Definition: Swagger.qm.dox.h:533
A metadata object that allows for more fine-tuned XML model definitions.
Definition: Swagger.qm.dox.h:2034
const MimeTypeMultipartFormData
const ParameterCollectionFormats
valid parameter collection formats
Definition: Swagger.qm.dox.h:171
hash< string, bool > produces
A hash of MIME types (strings) the operation can produce.
Definition: Swagger.qm.dox.h:1151
*string inLoc
The location of the API key. Valid values are "query" or "header".
Definition: Swagger.qm.dox.h:2102
string path
the URI path for the operation
Definition: Swagger.qm.dox.h:1101
number number(softnumber n)
*ExternalDocumentationObject externalDocs
Additional external documentation for this schema.
Definition: Swagger.qm.dox.h:1874
check(bool serialize, bool request, string path, string method, string name, reference value)
verifies the parameter in an actual REST API call
const ValidSchemes
Valid transfer protocol schemes.
Definition: Swagger.qm.dox.h:213
static SchemaObject newSchemaObject(string name, hash oh, SwaggerSchema swagger)
returns a SchemaObject for the schema definition; resolves references
hash< string, softlist< string > > security
A declaration of which security schemes are applied for the API as a whole.
Definition: Swagger.qm.dox.h:521
initialize(hash oh)
Initialize.
hash< string, AbstractParameterObject > parameters()
A hash of parameters that are applicable for all the operations described under this path...
hash< string, bool > schemes
The transfer protocol of the API.
Definition: Swagger.qm.dox.h:469
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:1819
string name
Required. The license name used for the API.
Definition: Swagger.qm.dox.h:901
constructor()
Constructor.
*float multipleOf
See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.1.
Definition: Swagger.qm.dox.h:294
hash< RestQoreExampleCodeInfo > getQoreExampleResponse(string method, string path, int code)
returns example Qore code for the given response
static checkValueType(auto value, string type, *SchemaObject items, *string loc)
validates default values
*string host
The host (name or IP) serving the API.
Definition: Swagger.qm.dox.h:453
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
*string def_path
the default path to use when retrieving external schema references
Definition: Swagger.qm.dox.h:552
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
auto defaultVal
See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2.
Definition: Swagger.qm.dox.h:1793
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
hash< string, bool > consumes
A list of MIME types (strings) the operation can consume.
Definition: Swagger.qm.dox.h:1143
list< SchemaObject > allOf()
See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.3.
hash< string, list< string > > getPathOperationHash()
returns a hash of URI paths as keys with values as lists of supported HTTP methods ...
auto getDefaultValue()
returns the default value of the parameter (default: NOTHING)
*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:1402
string name
the name of this object for documentation and example purposes
Definition: Swagger.qm.dox.h:1771
string swaggerSpec
Swagger Specification version being used.
Definition: Swagger.qm.dox.h:438
const MimeTypeFormUrlEncoded
*string desc
A short description for security scheme.
Definition: Swagger.qm.dox.h:2090
*ContactObject contact
The contact information for the exposed API.
Definition: Swagger.qm.dox.h:851
AbstractParameterObject body
the body parameter, if defined for this operation
Definition: Swagger.qm.dox.h:1165
error(string err, string fmt)
raises an exception with context information
Describes a single operation parameter.
Definition: Swagger.qm.dox.h:1380
parseRequest(PathItemObject pio, reference< hash< UriQueryInfo >> h, reference< auto > body, reference< hash > headers)
parses and processes a REST request on the server side
*int maxItems
See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.3.2.
Definition: Swagger.qm.dox.h:279
License information for the exposed API.
Definition: Swagger.qm.dox.h:896
const ValidStringFormats
Valid string type formats.
Definition: Swagger.qm.dox.h:160
*bool exclusiveMin
See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.3.
Definition: Swagger.qm.dox.h:267
*string desc
See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.1.
Definition: Swagger.qm.dox.h:1787
string type
Required. The type of the security scheme. Valid values are "basic", "apiKey" or "oauth2".
Definition: Swagger.qm.dox.h:2087
string version
Required. Provides the version of the application API (not to be confused with the specification vers...
Definition: Swagger.qm.dox.h:848
*ScopesObject scopes
The available scopes for the OAuth2 security scheme.
Definition: Swagger.qm.dox.h:2132
const ParameterTypes
valid parameter types
Definition: Swagger.qm.dox.h:1538
*int maxLength
See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.1.
Definition: Swagger.qm.dox.h:270
*string desc
A short description of the target documentation. GFM syntax can be used for rich text representation...
Definition: Swagger.qm.dox.h:1325
OperationObject getOperation(string method, string path)
returns the operation object for the given method
hash getExternalReference(string refstr)
retrieves external references
string type
See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.2.
Definition: Swagger.qm.dox.h:1778
add(string full_path, list l, int offset, hash oh, SwaggerSchema swagger)
adds a component or a Path Item Object to the tree
string getBasePathImpl()
returns the base path prefix for all requests in this schema
const CollectionFormats
allowed collection formats
Definition: Swagger.qm.dox.h:163
*string format
The extending format for the previously mentioned type. See Data Type Formats for further details...
Definition: Swagger.qm.dox.h:1498
auto getExampleValue()
returns an example value of the parameter (default: NOTHING)
static hash parseSchemaContent(string filepath, string str)
Load a schema definition from a file.
hash< RestQoreExampleCodeInfo > getQoreExampleResponseImpl(string method, string path, int code)
returns example Qore code for the given response
AbstractParameterObject specialization for parameters other than "body".
Definition: Swagger.qm.dox.h:1481
doDefaultParams(reference< hash< UriQueryInfo >> h, reference< hash > headers, reference< auto > body, hash< string, AbstractParameterObject > parameters, *hash< string, AbstractParameterObject > child_params)
add default parameters
static checkValueType(auto value, string type, *SchemaObject items, *string loc)
validates default values
Base class for the Swagger specification objects, wrapping the vendor extensions. ...
Definition: Swagger.qm.dox.h:217
hash< string, SecuritySchemeObject > securityDefinitions
Security scheme definitions that can be used across the specification.
Definition: Swagger.qm.dox.h:507
PathComponent paths
the tree of path components for path matching with wildcards
Definition: Swagger.qm.dox.h:984
bool readOnly
Relevant only for Schema "properties" definitions. Declares the property as "read only"...
Definition: Swagger.qm.dox.h:1850
*string format
The extending format for the previously mentioned type. See Data Type Formats for further details...
Definition: Swagger.qm.dox.h:1781
list tags
A list of tags (strings or TagObjects) for API documentation control.
Definition: Swagger.qm.dox.h:1110
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 ...
const ValidNumberFormats
Valid number type formats.
Definition: Swagger.qm.dox.h:158
*ParameterItemsSchemaObject items
Required if type is "array". Describes the type of items in the array.
Definition: Swagger.qm.dox.h:1509
const ScalarTypes
valid scalar types
Definition: Swagger.qm.dox.h:1880
SchemaObject resolveSchemaObject(string name, string refstr, hash oh)
resolves a reference to a schema object
*string name
Replaces the name of the element/attribute used for the described schema property.
Definition: Swagger.qm.dox.h:2046
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-...
hash< string, ResponseObject > responses
Response definitions that can be used across operations. This property does not define global respons...
Definition: Swagger.qm.dox.h:501
AbstractParameterObject body
The body parameter, if defined for this path.
Definition: Swagger.qm.dox.h:1044
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:1806
string desc
Required. A short description of the response. GFM syntax can be used for rich text representation...
Definition: Swagger.qm.dox.h:1618
bool wrapped
MAY be used only for an array definition. Signifies whether the array is wrapped (for example...
Definition: Swagger.qm.dox.h:2062
InfoObject info
Required. Provides metadata about the API. The metadata can be used by the clients if needed...
Definition: Swagger.qm.dox.h:441
hash< string, OperationObject > operations
A hash of OperationObjects correspoding to different methods.
Definition: Swagger.qm.dox.h:1060
*string basePath
The base path on which the API is served, which is relative to the host.
Definition: Swagger.qm.dox.h:461
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) ...
checkArrayParam(bool serialize, bool request, SchemaObject items, string path, string method, string name, reference< softlist > value)
validates the value against the schema definition
constructor(hash oh, string pfx, SwaggerSchema swagger)
creates the object
static SwaggerSchema fromFile(string filepath)
Load Swagger definition from a file.
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< 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 ...
auto getDefaultValue()
returns the default value of the parameter (default: NOTHING)
bool required
Determines whether this parameter is mandatory.
Definition: Swagger.qm.dox.h:1410
*float minimum
See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.3.
Definition: Swagger.qm.dox.h:261
*int minProperties
See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.4.2.
Definition: Swagger.qm.dox.h:1799
*bool uniqueItems
See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.3.4.
Definition: Swagger.qm.dox.h:285
hash< string, AbstractParameterObject > parameters()
A hash of parameters that are applicable for this operation.
*string flow
The flow used by the OAuth2 security scheme.
Definition: Swagger.qm.dox.h:2110
setBasePathImpl(string basePath)
overrides the basePath value
ParameterItemsSchemaObject resolveParameterItemsSchemaObject(string name, string refstr, hash oh)
resolves a reference to a parameter items schema object
Allows referencing an external resource for extended documentation.
Definition: Swagger.qm.dox.h:1320
*string operationId
Unique string used to identify the operation.
Definition: Swagger.qm.dox.h:1135
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
softlist getMethods()
returns a list of HTTP methods supported by this object
auto additionalProperties
See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.4.4.
Definition: Swagger.qm.dox.h:1813
*string url
A URL to the license used for the API. MUST be in the format of a URL.
Definition: Swagger.qm.dox.h:904
string string(softstring str, *string enc)
*string ref
Allows for an external definition of this path item.
Definition: Swagger.qm.dox.h:1029
*string ns
The URL of the namespace definition. Value SHOULD be in the form of a URL.
Definition: Swagger.qm.dox.h:2049
*bool exclusiveMax
See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.2.
Definition: Swagger.qm.dox.h:264
*float maximum
See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.2.
Definition: Swagger.qm.dox.h:258
bool attribute
Declares whether the property definition translates to an attribute instead of an element...
Definition: Swagger.qm.dox.h:2055
const ValidIntFormatsHash
A hash of valid integer type formats.
Definition: Swagger.qm.dox.h:176
getPathOperationHash(reference< hash< string, list< string >>> h)
returns a hash of URI paths as keys with values as lists of supported HTTP methods ...
ResponsesObject responses
Required. The list of possible responses as they are returned from executing this operation...
Definition: Swagger.qm.dox.h:1168
*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:2122
*string desc
A short description of the application. GFM syntax can be used for rich text representation.
Definition: Swagger.qm.dox.h:842
hash< string, AbstractParameterObject > parameters()
Parameter definitions that can be used across operations. This property does not define global parame...
*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:2116
static AbstractParameterObject newParameter(string name, hash oh, SwaggerSchema swagger)
gets a concrete instance of an AbstractParameterObject
hash< RestExampleResponseInfo > getExampleResponse(string method, string path, int code, reference body)
returns a hash of example message information for the given request
string getTargetUrlImpl()
returns the target URL for the schema
string inLoc
Required. The location of the parameter.
Definition: Swagger.qm.dox.h:1399
const ValidIntFormats
Valid integer type formats.
Definition: Swagger.qm.dox.h:156
bool compact_serialization
if serialized data should be subject to compact serialization (default: True)
Definition: Swagger.qm.dox.h:549
*SchemaObject schema
A definition of the response structure.
Definition: Swagger.qm.dox.h:1627
*string desc
A short description for the tag. GFM syntax can be used for rich text representation.
Definition: Swagger.qm.dox.h:1747
*ExternalDocumentationObject externalDocs
Additional external documentation for this operation.
Definition: Swagger.qm.dox.h:1126
abstract check(bool serialize, bool request, string path, string method, string name, reference value)
verifies the parameter in an actual REST API call
const SwaggerOptions
SwaggerSchema options.
Definition: Swagger.qm.dox.h:539
*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:555
list< hash< string, list< string > > > security
A declaration of which security schemes are applied for this operation.
Definition: Swagger.qm.dox.h:1190
items schema object for non-body parameters
Definition: Swagger.qm.dox.h:1966
contains the possible responses for an operation
Definition: Swagger.qm.dox.h:1578
hash vendorExtensions
Allows extensions to the Swagger Schema.
Definition: Swagger.qm.dox.h:226
constructor(string objType, hash oh)
Constructor.
*string collectionFormat
Determines the format of the array if type array is used.
Definition: Swagger.qm.dox.h:1984
hash< string, list< string > > getPathOperationHashImpl()
returns a hash of URI paths as keys with values as lists of supported HTTP methods ...
const SerializationModules
modules available for data serialization and/or deserialization
Definition: Swagger.qm.dox.h:207
PathItemObject match(string path)
matches a URI path with a PathItemObject
hash< RestSchemaValidator::RestExampleRequestInfo > getExampleRequestImpl(string method, string path, *softlist< string > content_types)
returns a hash of example message information for the given request
auto getExampleValue(string type, *string format)
returns an example value for the given type
*string title
See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.1.
Definition: Swagger.qm.dox.h:1784
*string pattern
See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3.
Definition: Swagger.qm.dox.h:276
string getQoreExample(reference< hash< RestQoreExampleCodeInfo >> rv, string name, bool decl)
returns example Qore code for the object
The object provides metadata about the API. The metadata can be used by the clients if needed...
Definition: Swagger.qm.dox.h:834
*string collectionFormat
Determines the format of the array if type array is used.
Definition: Swagger.qm.dox.h:1525
hash headers
A hash of headers that are (can be) sent with the response.
Definition: Swagger.qm.dox.h:1633
Used for loading the Swagger definitions.
Definition: Swagger.qm.dox.h:391
hash examples
A hash of example response messages.
Definition: Swagger.qm.dox.h:1643
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:2159
*ResponseObject getResponse(int code)
returns the ResponseObject for hthe given HTTP code or NOTHING if none is configured ...
*string discriminator
Adds support for polymorphism.
Definition: Swagger.qm.dox.h:1840
string type
Required. The type of the parameter.
Definition: Swagger.qm.dox.h:1495
hash< auto > mime_parse_form_urlencoded_string(string str)
Describes a single response from an API Operation.
Definition: Swagger.qm.dox.h:1613
PathItemObject match(list path)
returns either a PathItemObject for the path
Allows adding metadata to a single tag that is used by the OperationObject. It is not mandatory to ha...
Definition: Swagger.qm.dox.h:1739
*XmlObject xml
This MAY be used only on properties schemas. It has no effect on root schemas.
Definition: Swagger.qm.dox.h:1871
static SwaggerSchema fromString(string swaggerSpecification, bool json=True)
Load Swagger definition from a string.
*string desc
A verbose explanation of the operation behavior. GFM syntax can be used for rich text representation...
Definition: Swagger.qm.dox.h:1116
check(bool serialize, bool request, string path, string method, string name, reference value)
validates the value against the schema definition
bool deprec
Declares this operation to be deprecated.
Definition: Swagger.qm.dox.h:1123
*string summary
A short summary of what the operation does.
Definition: Swagger.qm.dox.h:1113
*LicenseObject license
The license information for the exposed API.
Definition: Swagger.qm.dox.h:854
*int minLength
See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.2.
Definition: Swagger.qm.dox.h:273
hash< RestQoreExampleCodeInfo > getQoreExampleRequestImpl(string method, string path)
returns example Qore code for the given request