-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathreference.sh
More file actions
executable file
·33 lines (28 loc) · 1001 Bytes
/
reference.sh
File metadata and controls
executable file
·33 lines (28 loc) · 1001 Bytes
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
#!/bin/sh
CONTRACTS=${CONTRACTS:-/openapi/contracts}
TCONTRACTS=${TCONTRACTS:-/openapi/contracts}
mkdir -p $TCONTRACTS/ref
echo "Aggregating cloud swaggers"
swagrag \
-file ${CONTRACTS}/cloud.yml \
-file ${CONTRACTS}/legacy.yml \
-file ${CONTRACTS}/mapsd.yml \
-file ${CONTRACTS}/invocable-scripts.yml \
-api-title "Complete InfluxDB Cloud API" \
| sed -e 's|^ /api/v2/ping| /ping|' \
| sed -e 's|^ /api/v2/:| /api/v2:|' \
> ${TCONTRACTS}/ref/cloud.yml
echo "Aggregating oss swaggers"
swagrag \
-file ${CONTRACTS}/oss.yml \
-file ${CONTRACTS}/legacy.yml \
-file ${CONTRACTS}/mapsd.yml \
-api-title "Complete InfluxDB OSS API" \
| sed -e 's|^ /api/v2/debug| /debug|' \
| sed -e 's|^ /api/v2/health| /health|' \
| sed -e 's|^ /api/v2/metrics| /metrics|' \
| sed -e 's|^ /api/v2/ping| /ping|' \
| sed -e 's|^ /api/v2/ready| /ready|' \
| sed -e 's|^ /api/v2/:| /api/v2:|' \
> ${TCONTRACTS}/ref/oss.yml
diff -r ${CONTRACTS}/ref ${TCONTRACTS}/ref/