-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (45 loc) · 1.68 KB
/
Copy pathgenerate-sdk.yml
File metadata and controls
55 lines (45 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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 ./api
rm -rf ./models
- 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: 'Regenerate API SDKs'
push: true