33name : " OpenAPI"
44
55on :
6- schedule :
7- # Update Monday
8- - cron : " 31 04 * * 1"
96 workflow_dispatch : null
107
118permissions :
@@ -54,23 +51,17 @@ jobs:
5451 echo "version=${VERSION}" >>"${GITHUB_OUTPUT}"
5552 -
5653 name : " Determine latest spec version"
57- id : " billingo_spec "
54+ id : " simple_pay "
5855 run : |
5956 VERSION="$(
60- wget -qO- "https://api.swaggerhub.com/apis/Billingo/Billingo/settings/default" \
61- | jq -r '."version"'
57+ jq -r '."version"' ./openapi.json
6258 )"
6359 echo "version=${VERSION}" >>"${GITHUB_OUTPUT}"
6460 -
6561 name : " Install OpenAPI"
6662 run : |
6763 wget -O "${{ runner.temp }}/openapi-generator-cli.jar" \
6864 "https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/${{ steps.openapi_cli.outputs.version }}/openapi-generator-cli-${{ steps.openapi_cli.outputs.version }}.jar"
69- -
70- name : " Download spec"
71- run : |
72- wget -O "${{ runner.temp }}/spec.json" \
73- "https://api.swaggerhub.com/apis/Billingo/Billingo/${{ steps.billingo_spec.outputs.version }}?resolved=false&flatten=false"
7465 -
7566 name : " Clean up previously generated files"
7667 run : |
@@ -81,11 +72,11 @@ jobs:
8172 PHP_POST_PROCESS_FILE : " php-cs-fixer fix --allow-risky yes"
8273 run : |
8374 java -jar "${{ runner.temp }}/openapi-generator-cli.jar" generate \
84- --input-spec "${{ runner.temp }}/spec .json" \
75+ --input-spec ./openapi .json \
8576 --generator-name php-nextgen \
8677 --output ./ \
8778 --enable-post-process-file \
88- --additional-properties 'invokerPackage=Cone\Billingo ,variableNamingConvention=camelCase,srcBasePath=src'
79+ --additional-properties 'invokerPackage=Cone\SimplePay ,variableNamingConvention=camelCase,srcBasePath=src'
8980 -
9081 name : " Check difference to repository"
9182 run : |
10091 add-paths : " ./"
10192 branch : " php-client"
10293 commit-message : " Upgrade client"
103- title : " Upgrade PHP client to ${{ steps.billingo_spec .outputs.version }}"
94+ title : " Upgrade PHP client to ${{ steps.simple_pay .outputs.version }}"
10495 body : |
10596 Automated changes by running `openapi-generator-cli.jar generate`.
10697 delete-branch : true
0 commit comments