Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Release v15.0.0-Beta" #496

Merged
merged 1 commit into from
Apr 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
14 changes: 0 additions & 14 deletions .github/release.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
run: sed -i "s;`pwd`/;;g" build/*.xml

- name: Run PHP Code Sniffer
run: vendor/bin/phpcs --exclude=Generic.Files.LineLength
run: vendor/bin/phpcs

- name: Make sure project files are compilable
run: find -L . -path ./vendor -prune -o -path ./tests -prune -o -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l
Expand Down
39 changes: 0 additions & 39 deletions .github/workflows/models.yml

This file was deleted.

40 changes: 0 additions & 40 deletions .github/workflows/services.yml

This file was deleted.

3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,3 @@ composer.lock
/build/
.php_cs.cache
.phpunit.result.cache

# Automation
/target/
74 changes: 21 additions & 53 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,106 +1,74 @@
openapi-generator-version:=6.4.0
openapi-generator-version:=6.3.0
openapi-generator-url:=https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/$(openapi-generator-version)/openapi-generator-cli-$(openapi-generator-version).jar
openapi-generator-jar:=target/openapi-generator-cli.jar
openapi-generator-cli:=java -jar $(openapi-generator-jar)

generator:=php
modelGen:=BalanceControl BalancePlatform Checkout StoredValue Payments Payout Management LegalEntityManagement Transfers BinLookup StoredValue POSTerminalManagement Recurring
services:=Checkout
models:=src/Adyen/Model
output:=target/out

# Generate models (for each service)
models: $(modelGen)
models: $(services)

BalanceControl: spec=BalanceControlService-v1
BalancePlatform: spec=BalancePlatformService-v2
BinLookup: spec=BinLookupService-v54
Binlookup: spec=BinLookupService-v52
Checkout: spec=CheckoutService-v70
DataProtection: spec=DataProtectionService-v1
StoredValue: spec=StoredValueService-v46
POSTerminalManagement: spec=TfmAPIService-v1
Payments: spec=PaymentService-v68
Recurring: spec=RecurringService-v68
Payout: spec=PayoutService-v68
Management: spec=ManagementService-v1
LegalEntityManagement: spec=LegalEntityService-v3
storedValue: spec=StoredValueService-v46
posterminalmanagement: spec=TfmAPIService-v1
payments: spec=PaymentService-v68
recurring: spec=RecurringService-v68
payout: spec=PayoutService-v68
management: spec=ManagementService-v1
management: resourceClass=Management
balanceplatform: spec=BalancePlatformService-v2
Transfers: spec=TransferService-v3

Transfers: service=transfers
legalentitymanagement: spec=LegalEntityService-v2
# Classic Platforms
marketpay/account: spec=AccountService-v6
marketpay/fund: spec=FundService-v6
marketpay/configuration: spec=NotificationConfigurationService-v6
marketpay/webhooks: spec=MarketPayNotificationService-v6
hop: spec=HopService-v6

$(modelGen): target/spec $(openapi-generator-jar)
$(services): target/spec $(openapi-generator-jar)
rm -rf $(models)/$@ $(output)
$(openapi-generator-cli) generate \
-i target/spec/json/$(spec).json \
-g $(generator) \
-o $(output) \
-t ./templates \
--inline-schema-name-mappings PaymentDonationRequest_paymentMethod=CheckoutPaymentMethod \
-c ./templates/config.yaml \
--model-package Model\\$@ \
--api-package Service\\$@ \
--reserved-words-mappings configuration=configuration \
--ignore-file-override ./.openapi-generator-ignore \
--skip-validate-spec \
--additional-properties variableNamingConvention=camelCase \
--additional-properties invokerPackage=Adyen \
--additional-properties packageName=Adyen
rm -rf src/Adyen/Service/$@ src/Adyen/Model/$@
mv $(output)/lib/Model/$@ $(models)/$@
mv $(output)/lib//ObjectSerializer.php $(models)/$@

# Service Generation; split up in to templates based on the size of the service. That is, some services have no subgroups and are thus generated in one single file, others are grouped in a directory.

Services:=BalancePlatform Checkout StoredValue Payments Payout Management LegalEntityManagement Transfers
SingleFileServices:=BalanceControl BinLookup DataProtection StoredValue POSTerminalManagement Recurring

all: $(Services) $(SingleFileServices)

$(Services): target/spec $(openapi-generator-jar)
Checkout: target/spec $(openapi-generator-jar)
rm -rf $(models)/$@ $(output)
$(openapi-generator-cli) generate \
-i target/spec/json/$(spec).json \
-g $(generator) \
-o $(output) \
-t ./templates \
--inline-schema-name-mappings PaymentDonationRequest_paymentMethod=CheckoutPaymentMethod \
-c ./templates/config.yaml \
--model-package Model\\$@ \
--api-package Service\\$@ \
--inline-schema-name-mappings BankAccountInfo_accountIdentification=BankAccount \
--reserved-words-mappings configuration=configuration \
--ignore-file-override ./.openapi-generator-ignore \
--skip-validate-spec \
--additional-properties variableNamingConvention=camelCase \
--additional-properties invokerPackage=Adyen \
--additional-properties packageName=Adyen
rm -rf src/Adyen/Service/$@ src/Adyen/Model/$@
mv $(output)/lib/Model/$@ $(models)/$@
mv $(output)/lib/ObjectSerializer.php $(models)/$@
mv $(output)/lib//ObjectSerializer.php $(models)/$@
mkdir src/Adyen/Service/$@
mv $(output)/lib/Service/* src/Adyen/Service

$(SingleFileServices): target/spec $(openapi-generator-jar)
rm -rf $(models)/$@ $(output)
$(openapi-generator-cli) generate \
-i target/spec/json/$(spec).json \
-g $(generator) \
-o $(output) \
-c templates/config.yaml \
--model-package Model\\$@ \
--api-package Service\\$@ \
--inline-schema-name-mappings PaymentDonationRequest_paymentMethod=CheckoutPaymentMethod \
--reserved-words-mappings configuration=configuration \
--skip-validate-spec \
--additional-properties variableNamingConvention=camelCase \
--additional-properties customApi=$@ \
--additional-properties invokerPackage=Adyen \
--additional-properties packageName=Adyen
rm -rf src/Adyen/Service/$@Api src/Adyen/Model/$@
mv $(output)/lib/Model/$@ $(models)/$@
mv $(output)/lib/ObjectSerializer.php $(models)/$@
mv $(output)/lib/Service/$@/GeneralApiSingle.php src/Adyen/Service/[email protected]

# Checkout spec (and patch version)
target/spec:
git clone https://github.com/Adyen/adyen-openapi.git target/spec
Expand Down
Loading