From 0856107db7b605009b16f3dcab528fe83e092771 Mon Sep 17 00:00:00 2001 From: Mykola Buhaiov Date: Tue, 30 Apr 2024 15:28:25 +0300 Subject: [PATCH] fix: update swift lint documentation --- Sources/HealthChecks/HealthChecks.swift | 1 - Sources/HealthChecks/Models/HealthCheck.swift | 19 ++++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Sources/HealthChecks/HealthChecks.swift b/Sources/HealthChecks/HealthChecks.swift index ef4a602..3e4c4ec 100644 --- a/Sources/HealthChecks/HealthChecks.swift +++ b/Sources/HealthChecks/HealthChecks.swift @@ -26,7 +26,6 @@ import Vapor /// Service that provides app health check functionality public struct HealthChecks { - /// Initializer for HealthChecks public init() {} diff --git a/Sources/HealthChecks/Models/HealthCheck.swift b/Sources/HealthChecks/Models/HealthCheck.swift index 41c3ff8..1dd893b 100644 --- a/Sources/HealthChecks/Models/HealthCheck.swift +++ b/Sources/HealthChecks/Models/HealthCheck.swift @@ -33,34 +33,34 @@ public struct HealthCheck: Content { /// Public version of the service /// Example: `1` public var version: String? - + /// Release id of the service /// Example: `1.0.0` public var releaseId: String? - + /// Array of notes relevant to current state of health /// Example: `["All ok"]` public var notes: [String]? - + /// Raw error output, in case of `fail` or `warn` states /// Example: `"Redis database not exist"` public var output: String? - + /// Dictionary of array that provides all health check item public var checks: [String: [HealthCheckItem]]? /// Dictionary of links for show more information /// Example: `["about": "https://example.com/about/service"]` public var links: [String: String]? - + /// Is a unique identifier of the service, in the application scope /// Example: `43119325-63f5-4e14-9175-84e0e296c527` public var serviceId: UUID? - + /// Is a human-friendly description of the service /// Example: `"This service use for get application health"` public var description: String? - + /// Initializer for HealthCheck /// - Parameters: /// - status: optional `HealthCheckStatus` @@ -78,8 +78,8 @@ public struct HealthCheck: Content { releaseId: String? = nil, notes: [String]? = nil, output: String? = nil, - checks: [String : [HealthCheckItem]]? = nil, - links: [String : String]? = nil, + checks: [String: [HealthCheckItem]]? = nil, + links: [String: String]? = nil, serviceId: UUID? = nil, description: String? = nil ) { @@ -97,6 +97,7 @@ public struct HealthCheck: Content { /// Example of `HealthCheck` extension HealthCheck { + /// Structure instance of `HealthCheck` public static var example: HealthCheck { HealthCheck( status: .pass,