Skip to content

Commit 0656c3d

Browse files
committed
make oas
1 parent f173d58 commit 0656c3d

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

Makefile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ SHELL=/usr/bin/env bash -euo pipefail
33
PYTHON_PROJECT_DIRS_WITH_UNIT_TESTS = lambdas/backend lambdas/ack_backend lambdas/batch_processor_filter lambdas/delta_backend lambdas/filenameprocessor lambdas/id_sync lambdas/mesh_processor lambdas/mns_subscription lambdas/recordforwarder lambdas/recordprocessor lambdas/redis_sync lambdas/shared
44
PYTHON_PROJECT_DIRS = tests/e2e tests/e2e_batch quality_checks $(PYTHON_PROJECT_DIRS_WITH_UNIT_TESTS)
55

6-
.PHONY: install lint format format-check clean publish build-proxy release initialise-all-python-venvs update-all-python-dependencies run-all-python-unit-tests build-all-docker-images
6+
.PHONY: install lint format format-check clean publish make-oas build-proxy release initialise-all-python-venvs update-all-python-dependencies run-all-python-unit-tests build-all-docker-images
77

88
#Installs dependencies using npm.
99
install:
@@ -19,18 +19,23 @@ format:
1919
format-check:
2020
npm run format-check
2121

22-
#Removes build/ + dist/ directories
22+
#Removes build/, dist/ and sandbox/specification/ directories
2323
clean:
2424
rm -rf build
2525
rm -rf dist
26+
rm -rf sandbox/specification
2627

27-
#Creates the fully expanded OAS spec in json
28+
#Creates the OAS spec in JSON for sandbox
2829
publish: clean
2930
mkdir -p build
3031
npm run publish 2> /dev/null
3132
cp build/immunisation-fhir-api.json sandbox/
3233
cp -r specification sandbox/specification
3334

35+
#Creates a versioned, minified OAS spec in JSON for sending to APIM
36+
oas: publish
37+
( cd utilities/scripts && python -m set_version < ../../build/immunisation-fhir-api.json | jq -c > ../../specification/immunisation-fhir-api.json )
38+
3439
#Runs build proxy script
3540
build-proxy:
3641
utilities/scripts/build_proxy.sh

0 commit comments

Comments
 (0)