From 5e71eda9f85b3241b8ecac6739cbfb0019e327be Mon Sep 17 00:00:00 2001 From: Daniel Leivers Date: Mon, 1 Apr 2024 19:13:57 +0100 Subject: [PATCH] =?UTF-8?q?Added=20=E2=80=9CDEVELOPER=5FID=5FAPPLICATION?= =?UTF-8?q?=5FG2=E2=80=9D=20to=20certificate=20enums=20when=20generating?= =?UTF-8?q?=20API=20code?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 2 +- Sources/OpenAPI/Generated/Entities/CertificateType.swift | 1 + Sources/OpenAPI/Generated/Paths/PathsV1Certificates.swift | 1 + Sources/OpenAPI/app_store_connect_api.json | 6 ++++-- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 675e1230..fc028f1b 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ update: download generate # see https://github.com/AvdLee/appstoreconnect-swift-sdk/pull/197 .PHONY: download download: - curl -fsSL -o - https://developer.apple.com/sample-code/app-store-connect/app-store-connect-openapi-specification.zip | bsdtar -xOf - | jq '.components.schemas.BundleIdPlatform.enum |= [ "IOS", "MAC_OS", "UNIVERSAL" ] | del(.["x-important"]) | del(.. |."enum"? | select(. != null and length == 0))' > Sources/OpenAPI/app_store_connect_api.json + curl -fsSL -o - https://developer.apple.com/sample-code/app-store-connect/app-store-connect-openapi-specification.zip | bsdtar -xOf - | jq '.components.schemas.BundleIdPlatform.enum |= [ "IOS", "MAC_OS", "UNIVERSAL" ] | .paths."/v1/certificates".get.parameters = (.paths."/v1/certificates".get.parameters | map(if .name == "filter[certificateType]" then .schema.items.enum += ["DEVELOPER_ID_APPLICATION_G2"] else . end)) | .components.schemas.CertificateType.enum += ["DEVELOPER_ID_APPLICATION_G2"] | del(.["x-important"]) | del(.. |."enum"? | select(. != null and length == 0))' > Sources/OpenAPI/app_store_connect_api.json # Runs the CreateAPI generator to update generated source code .PHONY: generate diff --git a/Sources/OpenAPI/Generated/Entities/CertificateType.swift b/Sources/OpenAPI/Generated/Entities/CertificateType.swift index 138653bd..3e98680b 100644 --- a/Sources/OpenAPI/Generated/Entities/CertificateType.swift +++ b/Sources/OpenAPI/Generated/Entities/CertificateType.swift @@ -15,4 +15,5 @@ public enum CertificateType: String, Codable, CaseIterable { case distribution = "DISTRIBUTION" case passTypeID = "PASS_TYPE_ID" case passTypeIDWithNfc = "PASS_TYPE_ID_WITH_NFC" + case developerIDApplicationG2 = "DEVELOPER_ID_APPLICATION_G2" } diff --git a/Sources/OpenAPI/Generated/Paths/PathsV1Certificates.swift b/Sources/OpenAPI/Generated/Paths/PathsV1Certificates.swift index 3758496f..b7a29167 100644 --- a/Sources/OpenAPI/Generated/Paths/PathsV1Certificates.swift +++ b/Sources/OpenAPI/Generated/Paths/PathsV1Certificates.swift @@ -38,6 +38,7 @@ extension APIEndpoint.V1 { case distribution = "DISTRIBUTION" case passTypeID = "PASS_TYPE_ID" case passTypeIDWithNfc = "PASS_TYPE_ID_WITH_NFC" + case developerIDApplicationG2 = "DEVELOPER_ID_APPLICATION_G2" } public enum Sort: String, Codable, CaseIterable { diff --git a/Sources/OpenAPI/app_store_connect_api.json b/Sources/OpenAPI/app_store_connect_api.json index dc919d45..b188a2c4 100644 --- a/Sources/OpenAPI/app_store_connect_api.json +++ b/Sources/OpenAPI/app_store_connect_api.json @@ -24459,7 +24459,8 @@ "DEVELOPMENT", "DISTRIBUTION", "PASS_TYPE_ID", - "PASS_TYPE_ID_WITH_NFC" + "PASS_TYPE_ID_WITH_NFC", + "DEVELOPER_ID_APPLICATION_G2" ] } }, @@ -146887,7 +146888,8 @@ "DEVELOPMENT", "DISTRIBUTION", "PASS_TYPE_ID", - "PASS_TYPE_ID_WITH_NFC" + "PASS_TYPE_ID_WITH_NFC", + "DEVELOPER_ID_APPLICATION_G2" ] }, "CiAction": {