Skip to content

Commit

Permalink
Merge pull request #266 from Workshed/feature/add-missing-certificate…
Browse files Browse the repository at this point in the history
…-type

Added “DEVELOPER_ID_APPLICATION_G2” to certificate enums
  • Loading branch information
AvdLee authored Apr 9, 2024
2 parents 9b8f8fa + 5e71eda commit cf24434
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions Sources/OpenAPI/Generated/Entities/CertificateType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
1 change: 1 addition & 0 deletions Sources/OpenAPI/Generated/Paths/PathsV1Certificates.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 4 additions & 2 deletions Sources/OpenAPI/app_store_connect_api.json
Original file line number Diff line number Diff line change
Expand Up @@ -24459,7 +24459,8 @@
"DEVELOPMENT",
"DISTRIBUTION",
"PASS_TYPE_ID",
"PASS_TYPE_ID_WITH_NFC"
"PASS_TYPE_ID_WITH_NFC",
"DEVELOPER_ID_APPLICATION_G2"
]
}
},
Expand Down Expand Up @@ -146887,7 +146888,8 @@
"DEVELOPMENT",
"DISTRIBUTION",
"PASS_TYPE_ID",
"PASS_TYPE_ID_WITH_NFC"
"PASS_TYPE_ID_WITH_NFC",
"DEVELOPER_ID_APPLICATION_G2"
]
},
"CiAction": {
Expand Down

0 comments on commit cf24434

Please sign in to comment.