Location
Describes the source file that triggered a diagnostic.
struct Location
Describes the source file that triggered a diagnostic.
struct Location
import _OpenAPIGeneratorCore
Invoke the core logic of the Swift OpenAPI Generator tool and plugin.
struct Diagnostic
A message emitted by the generator.
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.
enum Severity
Describes the severity of a diagnostic.
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 Sendable
init(from decoder: any Decoder) throws
var filePath: String
The absolute path to a specific source file that triggered the diagnostic.
var lineNumber: Int?
The line number (if known) of the line within the source file that triggered the diagnostic.