Skip to content

Commit

Permalink
fix: make percentageBreakdown a array;
Browse files Browse the repository at this point in the history
  • Loading branch information
mat1th committed Jan 23, 2024
1 parent 92275e5 commit 7e35e3f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
8 changes: 4 additions & 4 deletions Sources/OpenAPI/Generated/Entities/XcodeMetrics.swift
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@ public struct XcodeMetrics: Codable {
public var version: String?
public var value: Double?
public var errorMargin: Double?
public var percentageBreakdown: PercentageBreakdown?
public var percentageBreakdown: [PercentageBreakdownItem]?
public var goal: String?

public struct PercentageBreakdown: Codable {
public struct PercentageBreakdownItem: Codable {
public var value: Double?
public var subSystemLabel: String?

Expand All @@ -151,7 +151,7 @@ public struct XcodeMetrics: Codable {
}
}

public init(version: String? = nil, value: Double? = nil, errorMargin: Double? = nil, percentageBreakdown: PercentageBreakdown? = nil, goal: String? = nil) {
public init(version: String? = nil, value: Double? = nil, errorMargin: Double? = nil, percentageBreakdown: [PercentageBreakdownItem]? = nil, goal: String? = nil) {
self.version = version
self.value = value
self.errorMargin = errorMargin
Expand All @@ -164,7 +164,7 @@ public struct XcodeMetrics: Codable {
self.version = try values.decodeIfPresent(String.self, forKey: "version")
self.value = try values.decodeIfPresent(Double.self, forKey: "value")
self.errorMargin = try values.decodeIfPresent(Double.self, forKey: "errorMargin")
self.percentageBreakdown = try values.decodeIfPresent(PercentageBreakdown.self, forKey: "percentageBreakdown")
self.percentageBreakdown = try values.decodeIfPresent([PercentageBreakdownItem].self, forKey: "percentageBreakdown")
self.goal = try values.decodeIfPresent(String.self, forKey: "goal")
}

Expand Down
19 changes: 11 additions & 8 deletions Sources/OpenAPI/app_store_connect_api.json
Original file line number Diff line number Diff line change
Expand Up @@ -134693,15 +134693,18 @@
"type": "number"
},
"percentageBreakdown": {
"type": "object",
"properties": {
"value": {
"type": "number"
},
"subSystemLabel": {
"type": "string"
"type": "array",
"items": {
"type": "object",
"properties": {
"value": {
"type": "number"
},
"subSystemLabel": {
"type": "string"
}
}
}
}
},
"goal": {
"type": "string"
Expand Down

0 comments on commit 7e35e3f

Please sign in to comment.