PrimitiveTypeResolver
enum PrimitiveTypeResolver
Resolves primitive types defined in open api document e.g. for object properties or method parameters
-
Resolves Strings with special formats
Declaration
Swift
static func resolveTypeFormat(context: JSONSchema.CoreContext<JSONTypeFormat.StringFormat>) -> String
Parameters
context
string context
Return Value
type as String
-
Resolves Integer with special formats
Declaration
Swift
static func resolveTypeFormat(context: JSONSchema.CoreContext<JSONTypeFormat.IntegerFormat>) -> String
Parameters
context
integer context
Return Value
type as String
-
Resolves Number with special formats
Declaration
Swift
static func resolveTypeFormat(context: JSONSchema.CoreContext<JSONTypeFormat.NumberFormat>) -> String
Parameters
context
number context
Return Value
type as String
-
Undocumented
Declaration
Swift
static func resolveDefaultValue(schema: DereferencedJSONSchema?) -> String?
-
Undocumented
Declaration
Swift
static func resolveMinMax(schema: DereferencedJSONSchema?) -> (Int?, Int?)
-
Resolves primitive types defined in open api document
Throws
error if type cannot be resolvedDeclaration
Swift
static func resolveTypeFormat(schema: JSONSchema) throws -> String
Parameters
schema
schema to check
Return Value
type as String
-
Resolves primitive types defined in open api document
Throws
error if type cannot be resolvedDeclaration
Swift
static func resolveTypeFormat(schema: DereferencedJSONSchema) throws -> String
Parameters
schema
dereferenced schema to check
Return Value
type as String
-
Resolves types defined in open api document
Throws
error if type cannot be resolvedDeclaration
Swift
static func resolveTypeFormat(schema: Either<JSONReference<JSONSchema>, JSONSchema>?) throws -> String
Parameters
schema
OpenAPIKit type - either references or schema type
Return Value
type as String