Qore Swagger Module Reference
2.0.9
|
Used for loading the Swagger definitions. More...
Static Public Member Methods | |
static string | detectSourceEncoding (string str) |
tries to determine the Swagger schema source encoding automatically | |
static SwaggerSchema | fromFile (string filepath) |
Load Swagger definition from a file. More... | |
static SwaggerSchema | fromString (string swaggerSpecification, *bool json) |
Load Swagger definition from a string. More... | |
static SwaggerSchema | fromUrl (string url, *bool json) |
Load Swagger definition from a URL or file path. More... | |
static hash< auto > | parseSchemaContent (string filepath, string str) |
Load a schema definition from a file. More... | |
static hash< auto > | parseSchemaSource (string str, string ser) |
parses the source encoding from the given string | |
Used for loading the Swagger definitions.
|
static |
Load Swagger definition from a file.
filepath | path to the Swagger file |
EMPTY-SCHEMA-FILE | Swagger file is empty |
JSON-MODULE-MISSING | trying to parse a JSON Swagger specification with the json module unavailable |
YAML-MODULE-MISSING | trying to parse a YAML Swagger specification with the yaml module unavailable |
XML-MODULE-MISSING | trying to parse an XML Swagger specification with the xml module unavailable |
|
static |
Load Swagger definition from a string.
swaggerSpecification | Swagger API specification |
json | whether the specification is in JSON or YAML format; if not given the source encoding will be detected automatically |
JSON-MODULE-MISSING | trying to parse a JSON Swagger specification with JSON module unavailable |
YAML-MODULE-MISSING | trying to parse a YAML Swagger specification with YAML module unavailable |
|
static |
Load Swagger definition from a URL or file path.
url | URL to the Swagger file; uses the FileLocationHandler to load the file |
json | whether the specification is in JSON or YAML format; if not given the source encoding will be detected automatically |
EMPTY-SCHEMA-FILE | Swagger file is empty |
JSON-MODULE-MISSING | trying to parse a JSON Swagger specification with the json module unavailable |
YAML-MODULE-MISSING | trying to parse a YAML Swagger specification with the yaml module unavailable |
XML-MODULE-MISSING | trying to parse an XML Swagger specification with the xml module unavailable |
Load a schema definition from a file.
filepath | path to the schema file |
str | the file content to parse |
EMPTY-SCHEMA-FILE | schema file is empty |
JSON-MODULE-MISSING | trying to parse a JSON schema with the json module unavailable |
YAML-MODULE-MISSING | trying to parse a YAML schema specification with the yaml module unavailable |
XML-MODULE-MISSING | trying to parse an XML schema specification with the xml module unavailable |