Severity
Describes the severity of a diagnostic.
enum Severity
Describes the severity of a diagnostic.
enum Severity
import _OpenAPIGeneratorCore
Invoke the core logic of the Swift OpenAPI Generator tool and plugin.
struct Diagnostic
A message emitted by the generator.
case note
An informative message, does not represent an issue.
case warning
A non-fatal issue that should be addressed, but the generator is able to recover.
case error
A fatal issue from which the generator cannot recover.
init(from decoder: any Decoder) throws
static func error(message: String, location: Location? = nil, context: [String : String] = [:]) -> Diagnostic
Creates a non-recoverable issue, which leads the generator to stop.
static func note(message: String, location: Location? = nil, context: [String : String] = [:]) -> Diagnostic
Creates an informative message, which doesn’t represent an issue.
static func unsupported(_ feature: String, foundIn: String, location: Location? = nil, context: [String : String] = [:]) -> Diagnostic
Creates a diagnostic for an unsupported feature.
static func unsupportedSchema(reason: String, schema: JSONSchema, foundIn: String, location: Location? = nil, context: [String : String] = [:]) -> Diagnostic
Creates a diagnostic for an unsupported schema.
static func warning(message: String, location: Location? = nil, context: [String : String] = [:]) -> Diagnostic
Creates a recoverable issue, which doesn’t prevent the generator from continuing.
var context: [String : String]
Additional information about where the issue occurred.
var description: String { get }
A textual representation of the diagnostic, including location, severity, message, and context.
var errorDescription: String? { get }
A localized description of the diagnostic.
var location: Location?
The source file that triggered the diagnostic.
var message: String
A user-friendly description of the diagnostic.
var severity: Severity
The severity of the diagnostic.
struct Location
Describes the source file that triggered a diagnostic.
protocol Copyable
A type whose values can be implicitly or explicitly copied.
protocol CustomStringConvertible
A type with a customized textual representation.
protocol Decodable
A type that can decode itself from an external representation.
protocol Encodable
A type that can encode itself to an external representation.
protocol Equatable
A type that can be compared for value equality.
protocol Escapable
protocol Hashable : Equatable
A type that can be hashed into a Hasher
to produce an integer hash value.
protocol RawRepresentable<RawValue>
A type that can be converted to and from an associated raw value.
protocol Sendable
init?(rawValue: String)
var description: String { get }
A textual representation of the diagnostic severity.
init(from decoder: any Decoder) throws
Creates a new instance by decoding from the given decoder, when the type’s RawValue
is String
.
var hashValue: Int { get }
static func != (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether two values are not equal.
func encode(to encoder: any Encoder) throws
Encodes this value into the given encoder, when the type’s RawValue
is String
.
func hash(into hasher: inout Hasher)