| Qore Swagger Module Reference 2.2.3

Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
Swagger::PathsObject Class Reference

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

Inheritance diagram for Swagger::PathsObject:
[legend]

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

## Protected Attributes
PathComponent | paths
| the tree of path components for path matching with wildcards

## Additional Inherited Members
Public Attributes inherited from Swagger::ObjectBase
hash< auto > | vendorExtensions
| Allows extensions to the Swagger Schema.

## Detailed Description

This class stores the path tree for URI path matching.

## Member Function Documentation

## ◆ constructor()

Swagger::PathsObject::constructor | ( | hash< auto > | oh,
|  | SwaggerSchema | swagger )

Constructor.

Parameters

  oh | deserialized hash from the source schema description describing paths to schema endpoints
  swagger | the REST schema for resolving references

Exceptions

  INVALID-FIELD-FORMAT | field has invalid format
  INVALID-FIELD-TYPE | field has invalid type
  INVALID-FIELD-VALUE | field 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-PATH | the path could not be matched

## ◆ tryMatch()

*PathItemObject Swagger::PathsObject::tryMatch | ( | string | path | ) |

matches a URI path with a PathItemObject

Exceptions

  INVALID-PATH | the path could not be matched