ReferenceResolver
enum ReferenceResolver
Resolves $ref references as stated in open api document
-
List of parsed component schemas from open api document
Declaration
Swift
static var components: OpenAPI.Components? -
Resolving a simple $ref
Throws
ModelError if the reference is not in the local fileDeclaration
Swift
static func resolveName(schema: JSONSchema) throws -> StringParameters
schemaschema to check
Return Value
Type of referenced object as String
-
Resolves to a list of attributes within the $ref object
Throws
ModelError if the reference is not in the local fileDeclaration
Swift
static func resolveAttributes(reference: JSONReference<JSONSchema>) throws -> [AttributeModel]Parameters
schemaschema to check
Return Value
An array of AttributeModels to be added to another object model (e.g. in case of allOf)
-
Resolves the type of a JSONReference
Throws
error if type cannot be resolvedDeclaration
Swift
static func resolveType(schema: JSONReference<JSONSchema>) throws -> StringParameters
schemaschema reference to check
Return Value
type as String
View on GitHub
ReferenceResolver Enumeration Reference