FHIRValidationError
public struct FHIRValidationError: Error, CustomStringConvertible
Errors thrown during serialization and deserialization.
-
The error type.
Declaration
Swift
public var code: FHIRValidationErrorType -
The property key to which the error applies; may be empty for errors raised by primitives.
Declaration
Swift
public var key: String -
The path to the key, excluding the key itself.
Declaration
Swift
public var path: String? -
The full path to the property.
Declaration
Swift
public var fullPath: String -
The type expected for values of this key.
Declaration
Swift
public var wants: Any.Type? -
The type received for this key.
Declaration
Swift
public var has: Any.Type? -
A problem description.
Declaration
Swift
public var problem: String? -
Sub-errors.
Declaration
Swift
public var subErrors: [FHIRValidationError]? -
Initializer to use when a given key is missing.
Declaration
Swift
public init(missing key: String)Parameters
keyThe missing key
-
Initializer to use when a given key is present but is not expected.
Declaration
Swift
public init(unknown key: String, ofType type: Any.Type)Parameters
keyThe unknown key
typeThe type of the object associated with the unknown key
-
Initializer to use when there is a problem with a given key (other than the key missing or being unknown).
Declaration
Swift
public init(key: String, problem: String)Parameters
keyThe problematic key
problemA description of the problem
-
Initializer to use when the value of the given key is of a wrong type.
Declaration
Swift
public init(key: String, wants: Any.Type, has: Any.Type)Parameters
keyThe key for which there is a type mismatch
wantsThe type expected for the key
hasThe (wrong) type received for the key
-
Initializer to use for a validation error containing child errors. The
keywill be set to an empty string, the parent will need to fill this value.Declaration
Swift
public init(errors: [FHIRValidationError])Parameters
errorsThe errors to contain
-
Undocumented
Declaration
Swift
public struct FHIRValidationError: Error, CustomStringConvertible
-
Declaration
Swift
public var description: String
View on GitHub
Install in Dash
FHIRValidationError Struct Reference