Skip to content

Commit 687d1cf

Browse files
committed
Commit via running ake Sources/dependency-graph
1 parent 5c4729e commit 687d1cf

File tree

1 file changed

+46
-37
lines changed

1 file changed

+46
-37
lines changed

Sources/dependency-graph/Types.swift

Lines changed: 46 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,15 @@ extension APIProtocol {
9797

9898
/// Server URLs defined in the OpenAPI document.
9999
public enum Servers {
100+
public enum Server1 {
101+
public static func url() throws -> Foundation.URL {
102+
try Foundation.URL(
103+
validatingOpenAPIServerURL: "https://api.github.com",
104+
variables: []
105+
)
106+
}
107+
}
108+
@available(*, deprecated, renamed: "Servers.Server1.url")
100109
public static func server1() throws -> Foundation.URL {
101110
try Foundation.URL(
102111
validatingOpenAPIServerURL: "https://api.github.com",
@@ -149,7 +158,7 @@ public enum Components {
149158
/// - Remark: Generated from `#/components/schemas/dependency_hyphen_graph_hyphen_diff`.
150159
public struct dependency_hyphen_graph_hyphen_diffPayload: Codable, Hashable, Sendable {
151160
/// - Remark: Generated from `#/components/schemas/dependency_hyphen_graph_hyphen_diff/change_type`.
152-
@frozen public enum change_typePayload: String, Codable, Hashable, Sendable {
161+
@frozen public enum change_typePayload: String, Codable, Hashable, Sendable, CaseIterable {
153162
case added = "added"
154163
case removed = "removed"
155164
}
@@ -211,7 +220,7 @@ public enum Components {
211220
/// Where the dependency is utilized. `development` means that the dependency is only utilized in the development environment. `runtime` means that the dependency is utilized at runtime and in the development environment.
212221
///
213222
/// - Remark: Generated from `#/components/schemas/dependency_hyphen_graph_hyphen_diff/scope`.
214-
@frozen public enum scopePayload: String, Codable, Hashable, Sendable {
223+
@frozen public enum scopePayload: String, Codable, Hashable, Sendable, CaseIterable {
215224
case unknown = "unknown"
216225
case runtime = "runtime"
217226
case development = "development"
@@ -593,25 +602,25 @@ public enum Components {
593602
public init(from decoder: any Decoder) throws {
594603
var errors: [any Error] = []
595604
do {
596-
value1 = try decoder.decodeFromSingleValueContainer()
605+
self.value1 = try decoder.decodeFromSingleValueContainer()
597606
} catch {
598607
errors.append(error)
599608
}
600609
do {
601-
value2 = try decoder.decodeFromSingleValueContainer()
610+
self.value2 = try decoder.decodeFromSingleValueContainer()
602611
} catch {
603612
errors.append(error)
604613
}
605614
do {
606-
value3 = try decoder.decodeFromSingleValueContainer()
615+
self.value3 = try decoder.decodeFromSingleValueContainer()
607616
} catch {
608617
errors.append(error)
609618
}
610619
try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil(
611620
[
612-
value1,
613-
value2,
614-
value3
621+
self.value1,
622+
self.value2,
623+
self.value3
615624
],
616625
type: Self.self,
617626
codingPath: decoder.codingPath,
@@ -620,9 +629,9 @@ public enum Components {
620629
}
621630
public func encode(to encoder: any Encoder) throws {
622631
try encoder.encodeFirstNonNilValueToSingleValueContainer([
623-
value1,
624-
value2,
625-
value3
632+
self.value1,
633+
self.value2,
634+
self.value3
626635
])
627636
}
628637
}
@@ -653,7 +662,7 @@ public enum Components {
653662
/// A notation of whether a dependency is requested directly by this manifest or is a dependency of another dependency.
654663
///
655664
/// - Remark: Generated from `#/components/schemas/dependency/relationship`.
656-
@frozen public enum relationshipPayload: String, Codable, Hashable, Sendable {
665+
@frozen public enum relationshipPayload: String, Codable, Hashable, Sendable, CaseIterable {
657666
case direct = "direct"
658667
case indirect = "indirect"
659668
}
@@ -664,7 +673,7 @@ public enum Components {
664673
/// A notation of whether the dependency is required for the primary build artifact (runtime) or is only used for development. Future versions of this specification may allow for more granular scopes.
665674
///
666675
/// - Remark: Generated from `#/components/schemas/dependency/scope`.
667-
@frozen public enum scopePayload: String, Codable, Hashable, Sendable {
676+
@frozen public enum scopePayload: String, Codable, Hashable, Sendable, CaseIterable {
668677
case runtime = "runtime"
669678
case development = "development"
670679
}
@@ -706,23 +715,23 @@ public enum Components {
706715
}
707716
public init(from decoder: any Decoder) throws {
708717
let container = try decoder.container(keyedBy: CodingKeys.self)
709-
package_url = try container.decodeIfPresent(
718+
self.package_url = try container.decodeIfPresent(
710719
Swift.String.self,
711720
forKey: .package_url
712721
)
713-
metadata = try container.decodeIfPresent(
722+
self.metadata = try container.decodeIfPresent(
714723
Components.Schemas.metadata.self,
715724
forKey: .metadata
716725
)
717-
relationship = try container.decodeIfPresent(
726+
self.relationship = try container.decodeIfPresent(
718727
Components.Schemas.dependency.relationshipPayload.self,
719728
forKey: .relationship
720729
)
721-
scope = try container.decodeIfPresent(
730+
self.scope = try container.decodeIfPresent(
722731
Components.Schemas.dependency.scopePayload.self,
723732
forKey: .scope
724733
)
725-
dependencies = try container.decodeIfPresent(
734+
self.dependencies = try container.decodeIfPresent(
726735
[Swift.String].self,
727736
forKey: .dependencies
728737
)
@@ -759,7 +768,7 @@ public enum Components {
759768
}
760769
public init(from decoder: any Decoder) throws {
761770
let container = try decoder.container(keyedBy: CodingKeys.self)
762-
source_location = try container.decodeIfPresent(
771+
self.source_location = try container.decodeIfPresent(
763772
Swift.String.self,
764773
forKey: .source_location
765774
)
@@ -822,19 +831,19 @@ public enum Components {
822831
}
823832
public init(from decoder: any Decoder) throws {
824833
let container = try decoder.container(keyedBy: CodingKeys.self)
825-
name = try container.decode(
834+
self.name = try container.decode(
826835
Swift.String.self,
827836
forKey: .name
828837
)
829-
file = try container.decodeIfPresent(
838+
self.file = try container.decodeIfPresent(
830839
Components.Schemas.manifest.filePayload.self,
831840
forKey: .file
832841
)
833-
metadata = try container.decodeIfPresent(
842+
self.metadata = try container.decodeIfPresent(
834843
Components.Schemas.metadata.self,
835844
forKey: .metadata
836845
)
837-
resolved = try container.decodeIfPresent(
846+
self.resolved = try container.decodeIfPresent(
838847
Components.Schemas.manifest.resolvedPayload.self,
839848
forKey: .resolved
840849
)
@@ -890,15 +899,15 @@ public enum Components {
890899
}
891900
public init(from decoder: any Decoder) throws {
892901
let container = try decoder.container(keyedBy: CodingKeys.self)
893-
id = try container.decode(
902+
self.id = try container.decode(
894903
Swift.String.self,
895904
forKey: .id
896905
)
897-
correlator = try container.decode(
906+
self.correlator = try container.decode(
898907
Swift.String.self,
899908
forKey: .correlator
900909
)
901-
html_url = try container.decodeIfPresent(
910+
self.html_url = try container.decodeIfPresent(
902911
Swift.String.self,
903912
forKey: .html_url
904913
)
@@ -957,15 +966,15 @@ public enum Components {
957966
}
958967
public init(from decoder: any Decoder) throws {
959968
let container = try decoder.container(keyedBy: CodingKeys.self)
960-
name = try container.decode(
969+
self.name = try container.decode(
961970
Swift.String.self,
962971
forKey: .name
963972
)
964-
version = try container.decode(
973+
self.version = try container.decode(
965974
Swift.String.self,
966975
forKey: .version
967976
)
968-
url = try container.decode(
977+
self.url = try container.decode(
969978
Swift.String.self,
970979
forKey: .url
971980
)
@@ -1052,35 +1061,35 @@ public enum Components {
10521061
}
10531062
public init(from decoder: any Decoder) throws {
10541063
let container = try decoder.container(keyedBy: CodingKeys.self)
1055-
version = try container.decode(
1064+
self.version = try container.decode(
10561065
Swift.Int.self,
10571066
forKey: .version
10581067
)
1059-
job = try container.decode(
1068+
self.job = try container.decode(
10601069
Components.Schemas.snapshot.jobPayload.self,
10611070
forKey: .job
10621071
)
1063-
sha = try container.decode(
1072+
self.sha = try container.decode(
10641073
Swift.String.self,
10651074
forKey: .sha
10661075
)
1067-
ref = try container.decode(
1076+
self.ref = try container.decode(
10681077
Swift.String.self,
10691078
forKey: .ref
10701079
)
1071-
detector = try container.decode(
1080+
self.detector = try container.decode(
10721081
Components.Schemas.snapshot.detectorPayload.self,
10731082
forKey: .detector
10741083
)
1075-
metadata = try container.decodeIfPresent(
1084+
self.metadata = try container.decodeIfPresent(
10761085
Components.Schemas.metadata.self,
10771086
forKey: .metadata
10781087
)
1079-
manifests = try container.decodeIfPresent(
1088+
self.manifests = try container.decodeIfPresent(
10801089
Components.Schemas.snapshot.manifestsPayload.self,
10811090
forKey: .manifests
10821091
)
1083-
scanned = try container.decode(
1092+
self.scanned = try container.decode(
10841093
Foundation.Date.self,
10851094
forKey: .scanned
10861095
)

0 commit comments

Comments
 (0)