Skip to content

Generate & Update SDK #1580

Generate & Update SDK

Generate & Update SDK #1580

Workflow file for this run

name: Generate & Update SDK
on:
schedule:
- cron: '30 10 * * *'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '14'
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '15'
distribution: 'adopt'
- name: Install OpenAPI Tools
run: npm install @openapitools/openapi-generator-cli -g
- name: Cleanup folders
run: |
rm -rf ./spec
rm -rf ./lib
rm -rf ./docs
- name: Download OpenAPI Spec
run: curl https://api.mydatamyconsent.com/openapi-spec.json --output openapi-spec.json
- name: Cleanup Spec
run: |
sed -i 's/FinancialAccount\[\(.*\)]/FinancialAccount\1/' openapi-spec.json
sed -i 's/FinancialAccountTransaction\[\(.*\)]/FinancialAccount\1/' openapi-spec.json
sed -i 's/PaginatedList<\(.*\)>/PaginatedListOf\1s/' openapi-spec.json
- name: Generate SDK's
run: npx @openapitools/openapi-generator-cli generate
- name: Repository update
uses: EndBug/add-and-commit@v9
with:
author_name: Balamurali Pandranki
author_email: balamurali@live.com
default_author: github_actor
message: 'Generate API SDK'
push: true