CLASS
Problem
Contents
- Properties
typemetadatatitlemessageslinks
- Methods
==(_:_:)init(from:)
public class Problem: ProblemRepresentation, Decodable, Equatable
Problem response indicates an error occurred on the server. Responses of this type obey the schema defined in RFC-7807 (Problem Details for HTTP APIs).
Properties
type
public let type: ProblemType
metadata
public let metadata: Metadata?
An optional object with additional information about the response. A client may ignore the information present in this object.
title
public let title: Message?
An optional Message that represents the title of the problem.
messages
public let messages: [UserMessage]
An optional array of UserMessage that represents the messages that should be displayed to users to help them understand the context of an interaction.
links
public let links: [Link]
An array of Link that represents the links that may be used to offer an user alternative flows.
Methods
==(::)
public static func == (lhs: Problem, rhs: Problem) -> Bool
Parameters
| Name | Description |
|---|---|
| lhs | A value to compare. |
| rhs | Another value to compare. |
init(from:)
public required init(from decoder: Decoder) throws
Parameters
| Name | Description |
|---|---|
| decoder | The decoder to read data from. |