Files
adyen-node-api-library/Makefile
Michael Paul 7300b9e37b PW-6846: Platforms and financial products - Configuration (#949)
* PW-6846: Add Balance Platform to generator

* PW-6846: Models

* PW-6846: Add configuration options

* PW-6846: Account holders

* PW-6846: Add AccountHolders tests

* PW-6846: Add query string parameters

* PW-6846: Make `AccountHolder.id` optional

The `AccountHolder.id` field is required at the specs level.

It should be optional (or not exist) when sending an update request.

* PW-6846: Add Balance accounts endpoints

* PW-6846: General endpoints

* PW-6846: Add Payment Instruments endpoints

* PW-6846: Add Payment Instrument Groups endpoints

* PW-6846: Add Transaction Rules endpoints

* PW-6846: Fix linting issues
2022-08-09 11:10:53 +02:00

45 lines
1.7 KiB
Makefile

generator:=typescript-node
openapi-generator-cli:=docker run --user $(shell id -u):$(shell id -g) --rm -v ${PWD}:/local -w /local openapitools/openapi-generator-cli:v5.4.0
services:=checkout storedValue terminalManagement payments recurring payouts management balancePlatform platformsAccount platformsFund platformsNotificationConfiguration platformsHostedOnboardingPage
# Generate models (for each service)
models: $(services)
checkout: spec=CheckoutService-v69
storedValue: spec=StoredValueService-v46
terminalManagement: spec=TfmAPIService-v1
payments: spec=PaymentService-v68
recurring: spec=RecurringService-v68
payouts: spec=PayoutService-v68
management: spec=ManagementService-v1
balancePlatform: spec=BalancePlatformService-v2
platformsAccount: spec=AccountService-v6
platformsFund: spec=FundService-v6
platformsNotificationConfiguration: spec=NotificationConfigurationService-v6
platformsHostedOnboardingPage: spec=HopService-v6
$(services): build/spec
rm -rf src/typings/$@ build/model
$(openapi-generator-cli) generate \
-i build/spec/json/$(spec).json \
-g $(generator) \
-t templates/typescript \
-o build \
--global-property models,supportingFiles
mv build/model src/typings/$@
# Checkout spec (and patch version)
build/spec:
git clone https://github.com/Adyen/adyen-openapi.git build/spec
sed -i 's/"openapi" : "3.[0-9].[0-9]"/"openapi" : "3.0.0"/' build/spec/json/*.json
# Extract templates (copy them for modifications)
templates:
$(openapi-generator-cli) author template -g $(generator) -o build/templates/typescript
# Discard generated artifacts and changed models
clean:
git checkout src/typings
git clean -f -d src/typings
.PHONY: templates models $(services)