-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathgenerate-ts.sh
More file actions
executable file
·27 lines (22 loc) · 896 Bytes
/
generate-ts.sh
File metadata and controls
executable file
·27 lines (22 loc) · 896 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
#!/bin/sh
# run this from directory above, or with npm run generate:ts from parent directory.
VERSION=${1:-"$(cat .version)"}
echo $VERSION
set -x
docker run \
--rm \
--user $(id -u) \
-v ${PWD}:/local \
-e VERSION="$VERSION" \
openapitools/openapi-generator-cli \
generate \
-i /local/build/notify-supplier.yml \
-g typescript \
--additional-properties="npmRepository=https://npm.pkg.github.com,npmName=@NHSDigital/nhsnotifysupplier,npmVersion=$VERSION,licenseName=MIT" \
-o /local/sdk/typescript \
--skip-validate-spec
set +x
sed -i -e 's|https://github.com/GIT_USER_ID/GIT_REPO_ID.git|https://github.com/NHSDigital/nhs-notify-supplier-api.git|g' ./sdk/typescript/package.json
sed -i -e 's|OpenAPI client for nhsnotifysupplier|NHS Notify Supplier SDK|g' ./sdk/typescript/package.json
sed -i -e 's|OpenAPI-Generator Contributors|NHS Notify|g' ./sdk/typescript/package.json
echo $VERSION