From 97e0ba2ecbe2209954280b1ba8f4336d9e019b26 Mon Sep 17 00:00:00 2001 From: mat1th <6486389+mat1th@users.noreply.github.com> Date: Tue, 23 Jan 2024 14:37:21 +0100 Subject: [PATCH] fix: make percentageBreakdown a array; --- .../Generated/Entities/XcodeMetrics.swift | 8 ++++---- Sources/OpenAPI/app_store_connect_api.json | 19 +++++++++++-------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/Sources/OpenAPI/Generated/Entities/XcodeMetrics.swift b/Sources/OpenAPI/Generated/Entities/XcodeMetrics.swift index 139d803c..f05f0c7b 100644 --- a/Sources/OpenAPI/Generated/Entities/XcodeMetrics.swift +++ b/Sources/OpenAPI/Generated/Entities/XcodeMetrics.swift @@ -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? @@ -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 @@ -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") } diff --git a/Sources/OpenAPI/app_store_connect_api.json b/Sources/OpenAPI/app_store_connect_api.json index b2fb4ab5..79d137cd 100644 --- a/Sources/OpenAPI/app_store_connect_api.json +++ b/Sources/OpenAPI/app_store_connect_api.json @@ -146260,15 +146260,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"