Skip to content

Commit

Permalink
Merge pull request #256 from mat1th/feature/manually-update-api-spec-…
Browse files Browse the repository at this point in the history
…to-fix-api-response-in-perfPowerMetrics

fix: Update api spec and generate code for MetricInsight;
  • Loading branch information
AvdLee authored Jan 29, 2024
2 parents 530d580 + 7e35e3f commit 3489a06
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 16 deletions.
6 changes: 3 additions & 3 deletions Sources/OpenAPI/Generated/Entities/MetricsInsight.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public struct MetricsInsight: Codable {
public var latestVersion: String?
public var metric: String?
public var summaryString: String?
public var referenceVersions: String?
public var referenceVersions: [String]?
public var maxLatestVersionValue: Double?
public var subSystemLabel: String?
public var isHighImpact: Bool?
Expand Down Expand Up @@ -52,7 +52,7 @@ public struct MetricsInsight: Codable {
}
}

public init(metricCategory: MetricCategory? = nil, latestVersion: String? = nil, metric: String? = nil, summaryString: String? = nil, referenceVersions: String? = nil, maxLatestVersionValue: Double? = nil, subSystemLabel: String? = nil, isHighImpact: Bool? = nil, populations: [Population]? = nil) {
public init(metricCategory: MetricCategory? = nil, latestVersion: String? = nil, metric: String? = nil, summaryString: String? = nil, referenceVersions: [String]? = nil, maxLatestVersionValue: Double? = nil, subSystemLabel: String? = nil, isHighImpact: Bool? = nil, populations: [Population]? = nil) {
self.metricCategory = metricCategory
self.latestVersion = latestVersion
self.metric = metric
Expand All @@ -70,7 +70,7 @@ public struct MetricsInsight: Codable {
self.latestVersion = try values.decodeIfPresent(String.self, forKey: "latestVersion")
self.metric = try values.decodeIfPresent(String.self, forKey: "metric")
self.summaryString = try values.decodeIfPresent(String.self, forKey: "summaryString")
self.referenceVersions = try values.decodeIfPresent(String.self, forKey: "referenceVersions")
self.referenceVersions = try values.decodeIfPresent([String].self, forKey: "referenceVersions")
self.maxLatestVersionValue = try values.decodeIfPresent(Double.self, forKey: "maxLatestVersionValue")
self.subSystemLabel = try values.decodeIfPresent(String.self, forKey: "subSystemLabel")
self.isHighImpact = try values.decodeIfPresent(Bool.self, forKey: "highImpact")
Expand Down
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
24 changes: 15 additions & 9 deletions Sources/OpenAPI/app_store_connect_api.json
Original file line number Diff line number Diff line change
Expand Up @@ -133995,7 +133995,10 @@
"type": "string"
},
"referenceVersions": {
"type": "string"
"type": "array",
"items": {
"type": "string"
}
},
"maxLatestVersionValue": {
"type": "number"
Expand Down Expand Up @@ -134690,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 3489a06

Please sign in to comment.