Qore Swagger Module Reference  1.0.2
Swagger::PathsObject Class Reference

This class stores the path tree for URI path matching. More...

Inheritance diagram for Swagger::PathsObject:

Public Member Functions

 constructor (hash oh, SwaggerSchema swagger)
 Constructor. More...
 
hash< string, list< string > > getPathOperationHash ()
 returns a hash of URI paths as keys with values as lists of supported HTTP methods More...
 
PathItemObject match (string path)
 matches a URI path with a PathItemObject More...
 
- Public Member Functions inherited from Swagger::ObjectBase
 constructor ()
 Constructor.
 
 constructor (hash oh)
 Constructor. More...
 
 constructor (ObjectBase other)
 copy constructor
 
 initialize (hash oh)
 Initialize. More...
 

Private Attributes

PathComponent paths
 the tree of path components for path matching with wildcards
 

Additional Inherited Members

- Public Attributes inherited from Swagger::ObjectBase
hash vendorExtensions
 Allows extensions to the Swagger Schema. More...
 

Detailed Description

This class stores the path tree for URI path matching.

Member Function Documentation

◆ constructor()

Swagger::PathsObject::constructor ( hash  oh,
SwaggerSchema  swagger 
)

Constructor.

Parameters
ohdeserialized hash from the source schema description describing paths to schema endpoints
swaggerthe REST schema for resolving references
Exceptions
INVALID-FIELD-FORMATfield has invalid format
INVALID-FIELD-TYPEfield has invalid type
INVALID-FIELD-VALUEfield has invalid value

◆ getPathOperationHash()

hash<string, list<string> > Swagger::PathsObject::getPathOperationHash ( )

returns a hash of URI paths as keys with values as lists of supported HTTP methods

Returns
a hash of URI paths as keys with values as lists of supported HTTP methods

◆ match()

PathItemObject Swagger::PathsObject::match ( string  path)

matches a URI path with a PathItemObject

Exceptions
INVALID-PATHthe path could not be matched