-
Notifications
You must be signed in to change notification settings - Fork 18
116 lines (109 loc) · 4.6 KB
/
build-dereferenced-spec.yml
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
name: "Build Dereferenced IDN specs"
on:
push:
branches:
- main
paths:
- idn/sailpoint-api.v3.yaml
- idn/v3/**
- idn/sailpoint-api.v2024.yaml
- idn/v2024/**
- idn/sailpoint-api.beta.yaml
- idn/beta/**
- nerm/**
workflow_dispatch:
jobs:
dereference_spec:
runs-on: ubuntu-latest
steps:
- name: Checkout PR branch
uses: actions/checkout@v3
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: "18"
- name: Install swagger-cli and postman
run: |
npm install -g swagger-cli
npm install -g openapi-to-postmanv2
- name: Dereference API Specification and build Postman collection
run: |
swagger-cli bundle --dereference idn/sailpoint-api.v3.yaml -t yaml -o dereferenced/deref-sailpoint-api.v3.yaml
openapi2postmanv2 -s dereferenced/deref-sailpoint-api.v3.yaml -o postman/collections/sailpoint-api-v3.json -p -c postman-script/openapi2postman-config.json
node postman-script/modify-collection.js postman/collections/sailpoint-api-v3.json
swagger-cli bundle --dereference idn/sailpoint-api.beta.yaml -t yaml -o dereferenced/deref-sailpoint-api.beta.yaml
openapi2postmanv2 -s dereferenced/deref-sailpoint-api.beta.yaml -o postman/collections/sailpoint-api-beta.json -p -c postman-script/openapi2postman-config.json
node postman-script/modify-collection.js postman/collections/sailpoint-api-beta.json
swagger-cli bundle --dereference nerm/openapi.yaml -t yaml -o dereferenced/deref-sailpoint-api.nerm.yaml
openapi2postmanv2 -s dereferenced/deref-sailpoint-api.nerm.yaml -o postman/collections/sailpoint-api-nerm.json -p -c postman-script/openapi2postman-config.json
swagger-cli bundle --dereference idn/sailpoint-api.v3.yaml -t json -o dereferenced/deref-sailpoint-api.v3.json
swagger-cli bundle --dereference idn/sailpoint-api.beta.yaml -t json -o dereferenced/deref-sailpoint-api.beta.json
swagger-cli bundle --dereference idn/sailpoint-api.v2024.yaml -t yaml -o dereferenced/deref-sailpoint-api.v2024.yaml
openapi2postmanv2 -s dereferenced/deref-sailpoint-api.v2024.yaml -o postman/collections/sailpoint-api-v2024.json -p -c postman-script/openapi2postman-config.json
node postman-script/modify-collection.js postman/collections/sailpoint-api-v2024.json
swagger-cli bundle --dereference idn/sailpoint-api.v2024.yaml -t json -o dereferenced/deref-sailpoint-api.v2024.json
- uses: stefanzweifel/git-auto-commit-action@v4
push_v3_specs_to_postman:
runs-on: ubuntu-latest
needs: [dereference_spec]
steps:
- name: Checkout PR branch
uses: actions/checkout@v3
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: "18"
- name: Dereference API Specification and build Postman collection
run: |
cd postman-script/update-by-folder-ts
echo "POSTMAN_API_KEY=${{ secrets.POSTMAN_API_KEY }}" > .env
npm ci
npm run v3
push_v2024_specs_to_postman:
runs-on: ubuntu-latest
needs: [dereference_spec]
steps:
- name: Checkout PR branch
uses: actions/checkout@v3
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: "18"
- name: Dereference API Specification and build Postman collection
run: |
cd postman-script/update-by-folder-ts
echo "POSTMAN_API_KEY=${{ secrets.POSTMAN_API_KEY }}" > .env
npm ci
npm run v2024
push_beta_specs_to_postman:
runs-on: ubuntu-latest
needs: [dereference_spec]
steps:
- name: Checkout PR branch
uses: actions/checkout@v3
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: "18"
- name: Dereference API Specification and build Postman collection
run: |
cd postman-script/update-by-folder-ts
echo "POSTMAN_API_KEY=${{ secrets.POSTMAN_API_KEY }}" > .env
npm ci
npm run beta
push_nerm_specs_to_postman:
runs-on: ubuntu-latest
needs: [dereference_spec]
steps:
- name: Checkout PR branch
uses: actions/checkout@v3
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: "18"
- name: Dereference API Specification and build Postman collection
run: |
cd postman-script/update-by-folder-ts
echo "POSTMAN_API_KEY=${{ secrets.POSTMAN_API_KEY }}" > .env
npm ci
npm run nerm