Asterisk - The Open Source Telephony Project GIT-master-f36a736
|
Data Structures | |
class | AllowableList |
class | AllowableRange |
class | Api |
class | ApiDeclaration |
class | ErrorResponse |
class | Model |
class | Operation |
class | Parameter |
class | ParsingContext |
class | Property |
class | ResourceApi |
class | ResourceListing |
class | Stringify |
class | SwaggerError |
class | SwaggerPostProcessor |
class | SwaggerType |
Functions | |
def | compare_versions (lhs, rhs) |
def | get_list_parameter_type (type_string) |
def | load_allowable_values (json, context) |
def | validate_required_fields (json, required_fields, context) |
Variables | |
list | SWAGGER_PRIMITIVES |
list | SWAGGER_VERSIONS = ["1.1", "1.2"] |
def compare_versions | ( | lhs, | |
rhs | |||
) |
Performs a lexicographical comparison between two version numbers. This properly handles simple major.minor.whatever.sure.why.not version numbers, but fails miserably if there's any letters in there. For reference: 1.0 == 1.0 1.0 < 1.0.1 1.2 < 1.10 @param lhs Left hand side of the comparison @param rhs Right hand side of the comparison @return < 0 if lhs < rhs @return == 0 if lhs == rhs @return > 0 if lhs > rhs
Definition at line 60 of file swagger_model.py.
Referenced by ParsingContext.version_less_than().
def get_list_parameter_type | ( | type_string | ) |
Returns the type parameter if the given type_string is List[]. @param type_string: Type string to parse @returns Type parameter of the list, or None if not a List.
Definition at line 458 of file swagger_model.py.
Referenced by SwaggerType.load().
def load_allowable_values | ( | json, | |
context | |||
) |
Parse a JSON allowableValues object. This returns None, AllowableList or AllowableRange, depending on the valueType in the JSON. If the valueType is not recognized, a SwaggerError is raised.
Definition at line 240 of file swagger_model.py.
def validate_required_fields | ( | json, | |
required_fields, | |||
context | |||
) |
Checks a JSON object for a set of required fields. If any required field is missing, a SwaggerError is raised. @param json: JSON object to check. @param required_fields: List of required fields. @param context: Current context in the API.
Definition at line 762 of file swagger_model.py.
Referenced by ApiDeclaration.load(), Api.load(), ResourceApi.load(), ErrorResponse.load(), Model.load(), Operation.load(), Parameter.load(), Property.load(), and ResourceListing.load().
list SWAGGER_PRIMITIVES |
Definition at line 40 of file swagger_model.py.
list SWAGGER_VERSIONS = ["1.1", "1.2"] |
Definition at line 38 of file swagger_model.py.