Added a task to the Makefile that updates the App Store Connect Open API specification document in the library target.
This commit is contained in:
@@ -19,6 +19,14 @@ DOCC_GITHUB_OUTPUT=./docs
|
|||||||
DOCC_GITHUB_BASE_PATH=asconnect-service
|
DOCC_GITHUB_BASE_PATH=asconnect-service
|
||||||
DOCC_PREVIEW_URL=http://localhost:8080/documentation/asconnectservice
|
DOCC_PREVIEW_URL=http://localhost:8080/documentation/asconnectservice
|
||||||
|
|
||||||
|
# --- OPEN API SPECIFICATION ---
|
||||||
|
|
||||||
|
OAS_DOWNLOAD_FOLDER=./oas-download
|
||||||
|
OAS_DOWNLOAD_FILE=$(OAS_DOWNLOAD_FOLDER)/openapi.oas.json
|
||||||
|
OAS_DOWNLOAD_INPUT=$(OAS_DOWNLOAD_FOLDER)/asconnect-openapi-specification.zip
|
||||||
|
OAS_DOWNLOAD_OUTPUT=Sources/$(SPM_LIBRARY_TARGET)/openapi.json
|
||||||
|
OAS_DOWNLOAD_URL=https://developer.apple.com/sample-code/app-store-connect/app-store-connect-openapi-specification.zip
|
||||||
|
|
||||||
# -- SWIFT PACKAGE MANAGER ---
|
# -- SWIFT PACKAGE MANAGER ---
|
||||||
|
|
||||||
SPM_LIBRARY_TARGET=ASConnectService
|
SPM_LIBRARY_TARGET=ASConnectService
|
||||||
@@ -86,6 +86,17 @@ doc-preview: ## Previews the library documentation in Safari
|
|||||||
--include-extended-types \
|
--include-extended-types \
|
||||||
--enable-inherited-docs
|
--enable-inherited-docs
|
||||||
|
|
||||||
|
# OPEN API SPECIFICATION
|
||||||
|
|
||||||
|
oas-download: ## Downloads the latest App Store Connect OpenAPI specification document
|
||||||
|
@mkdir -p $(OAS_DOWNLOAD_FOLDER)
|
||||||
|
@curl -fsSL \
|
||||||
|
"$(OAS_DOWNLOAD_URL)" \
|
||||||
|
-o "$(OAS_DOWNLOAD_INPUT)"
|
||||||
|
@unzip -q "$(OAS_DOWNLOAD_INPUT)" -d "$(OAS_DOWNLOAD_FOLDER)"
|
||||||
|
@mv "$(OAS_DOWNLOAD_FILE)" "$(OAS_DOWNLOAD_OUTPUT)"
|
||||||
|
@rm -rf "$(OAS_DOWNLOAD_FOLDER)"
|
||||||
|
|
||||||
# IDE
|
# IDE
|
||||||
|
|
||||||
ide-xcode: ## Opens this package with Xcode
|
ide-xcode: ## Opens this package with Xcode
|
||||||
|
|||||||
Reference in New Issue
Block a user