STRUCT

FormActionModel

Contents

public struct FormActionModel: Decodable, Equatable

Model for FormAction, providing the information specific to form actions, such as the form fields.

Properties

actionTitle

public let actionTitle: Message?

Title of the action of the model, typically visible to the user as a button label. Should be human-readable.

continueActions

public let continueActions: [Action]

A array of Action which allows the client to proceed with the flow.

errorActions

public let errorActions: [Action]

A array of Action which can be used if an error happens.

fields

public let fields: [FormField]

A array of FormField that needs to be rendered on the screen so the user can interact with it.

type

public let type: String

A String that represents a media-type used to represent the form's contents.

method

public let method: String

A String that represents the HTTP method.

href

public let href: String

A String that represents a target URI.

Methods

init(from:)

public init(from decoder: Decoder) throws

Parameters

Name Description
decoder The decoder to read data from.

==(::)

public static func == (lhs: FormActionModel, rhs: FormActionModel) -> Bool

Parameters

Name Description
lhs A value to compare.
rhs Another value to compare.