Skip to content

Commit dcf6731

Browse files
Update builds to use generated spec file
1 parent 579bd65 commit dcf6731

File tree

8 files changed

+11
-11
lines changed

8 files changed

+11
-11
lines changed

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,17 @@
4545
"react": "^19.0.0"
4646
},
4747
"scripts": {
48-
"build": "npm run generate --buildver=$npm_config_buildver",
48+
"build": "npm run bundle-oas && npm run generate --buildver=$npm_config_buildver",
4949
"bundle-oas": "mkdir -p build && redocly bundle specification/api/notify-supplier-phase1.yml --dereferenced --remove-unused-components --ext yml > build/notify-supplier.yml",
5050
"generate": "npm run generate:cs --buildver=$npm_config_buildver && npm run generate:html && npm run generate:ts --buildver=$npm_config_buildver && npm run generate:python",
5151
"generate-dependencies": "npm run generate-dependencies --workspaces --if-present",
5252
"generate:cs": "./sdk/generate-cs.sh $npm_config_buildver",
5353
"generate:cs-server": "./server/generate-cs-server.sh $npm_config_buildver",
54-
"generate:html": "docker run --rm --user $(id -u) -v ${PWD}:/local openapitools/openapi-generator-cli generate -i /local/specification/api/notify-supplier.yml -g html -o /local/sdk/html --skip-validate-spec",
55-
"generate:python": "docker run --rm --user $(id -u) -v ${PWD}:/local openapitools/openapi-generator-cli generate -i /local/specification/api/notify-supplier.yml -g python -o /local/sdk/python --skip-validate-spec",
54+
"generate:html": "docker run --rm --user $(id -u) -v ${PWD}:/local openapitools/openapi-generator-cli generate -i /local/build/notify-supplier.yml -g html -o /local/sdk/html --skip-validate-spec",
55+
"generate:python": "docker run --rm --user $(id -u) -v ${PWD}:/local openapitools/openapi-generator-cli generate -i /local/build/notify-supplier.yml -g python -o /local/sdk/python --skip-validate-spec",
5656
"generate:ts": "./sdk/generate-ts.sh $npm_config_buildver",
5757
"lint": "npm run lint --workspaces",
58-
"lint-oas": "redocly lint specification/api/notify-supplier.yml",
58+
"lint-oas": "redocly lint specification/api/notify-supplier-phase1.yml",
5959
"lint:fix": "npm run lint:fix --workspaces",
6060
"publish-oas": "mkdir -p build && redocly bundle specification/api/notify-supplier-phase1.yml --dereferenced --remove-unused-components --ext json > build/notify-supplier.json",
6161
"serve": "npm run serve-html-docs",

sdk/_config.version.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version: 0.2.0-20250709.100804+10788f5
1+
version: 0.2.0-20250724.105025+579bd65

sdk/generate-cs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ generate () {
1212
-e VERSION="$SHORT_VERSION" \
1313
openapitools/openapi-generator-cli \
1414
generate \
15-
-i /local/specification/api/notify-supplier.yml \
15+
-i /local/build/notify-supplier.yml \
1616
-g csharp \
1717
--additional-properties="packageName=nhsnotifysupplier,packageVersion=$SHORT_VERSION,licenseId=MIT,targetFramework=net8.0" \
1818
-o /local/sdk/csharp \

sdk/generate-ts.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ docker run \
1212
-e VERSION="$VERSION" \
1313
openapitools/openapi-generator-cli \
1414
generate \
15-
-i /local/specification/api/notify-supplier.yml \
15+
-i /local/build/notify-supplier.yml \
1616
-g typescript \
1717
--additional-properties="npmRepository=https://npm.pkg.github.com,npmName=@NHSDigital/nhsnotifysupplier,npmVersion=$VERSION,licenseName=MIT" \
1818
-o /local/sdk/typescript \

sdk/swagger-static.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ unzip swagger.zip "swagger-ui-$VERSION/dist/*" -d swagger
99
mv swagger/swagger-ui-$VERSION/dist/* swagger
1010
rm -r swagger/swagger-ui-$VERSION
1111
cp swagger-initializer.js swagger/swagger-initializer.js
12-
cp ../specification/api/notify-supplier.yml swagger/swagger.json
12+
cp ../specification/api/notify-supplier-phase1.yml swagger/swagger.json
1313
cp ../specification/api/notify-supplier-next.yml swagger/swagger-vnext.json
1414
rm swagger.zip

server/_config.version.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version: 0.2.0-20250709.100758+10788f5
1+
version: 0.2.0-20250724.105019+579bd65

server/generate-cs-server.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ generate (){
1212
-v ${PWD}/../:/local \
1313
openapitools/openapi-generator-cli \
1414
generate \
15-
-i /local/specification/api/notify-supplier.yml \
15+
-i /local/build/notify-supplier.yml \
1616
-g aspnetcore \
1717
--additional-properties="aspnetCoreVersion=8.0,buildTarget=program,packageName=nhsnotifysupplierserver,packageVersion=$SHORT_VERSION,licenseId=MIT,targetFramework=net8.0" \
1818
-o /local/server/csharp-server \

src/server/_config.version.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version: 0.2.0-20250709.093756+af49022
1+
version: 0.2.0-20250724.105048+579bd65

0 commit comments

Comments
 (0)