Files
zeekay 1df3ddf6bd Regenerate against the document the deployment answers for
The projection these were generated from predated the compute migration, so
they described /v1/visor — which the API serves at zero paths now.

No /v1/visor path survives here.
2026-09-05 18:55:38 -07:00

51 lines
1.8 KiB
Swift

//
// Diagnostic.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
public struct Diagnostic: Sendable, Codable, ParameterConvertible, Hashable {
/** Code is the checker's own identifier for the rule, a string or a number depending on the server. Absent when it published none. */
public var code: JSONValue?
/** Message is the problem in the server's own words, meant to be shown. */
public var message: String?
/** Range is the span the problem is about. */
public var range: ModelRange?
/** Severity is the LSP's: 1 error, 2 warning, 3 information, 4 hint. A file with only 3s and 4s still compiles. */
public var severity: Int64?
/** Source is which checker reported it (\"compiler\", \"go vet\", a linter's name), which is what separates a build error from a style opinion. */
public var source: String?
public init(code: JSONValue? = nil, message: String? = nil, range: ModelRange? = nil, severity: Int64? = nil, source: String? = nil) {
self.code = code
self.message = message
self.range = range
self.severity = severity
self.source = source
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case code
case message
case range
case severity
case source
}
// Encodable protocol methods
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(code, forKey: .code)
try container.encodeIfPresent(message, forKey: .message)
try container.encodeIfPresent(range, forKey: .range)
try container.encodeIfPresent(severity, forKey: .severity)
try container.encodeIfPresent(source, forKey: .source)
}
}