@@ -29,11 +29,12 @@ format: ## Format and fix code
2929 poetry run ruff check . --fix-only
3030
3131# Creates the fully expanded OAS spec in json
32- publish : clean
32+ generate-sandbox-spec : clean
3333 mkdir -p build
3434 mkdir -p sandbox/specification
3535 npm run publish 2> /dev/null
36- cp build/sandbox/eligibility-signposting-api.json sandbox/specification/eligibility-signposting-api.json
36+ cp build/specification/sandbox/eligibility-signposting-api.json sandbox/specification/eligibility-signposting-api.json
37+
3738# Files to loop over in release
3839_dist_include ="pytest.ini poetry.lock poetry.toml pyproject.toml Makefile build/. tests"
3940
@@ -68,11 +69,11 @@ get-spec-uat: # Get the most recent specification live in proxygen
6869
6970publish-spec : # Publish the specification to proxygen
7071 $(MAKE ) setup-proxygen-credentials
71- proxygen spec publish --specification-file build/prod/eligibility-signposting-api.json
72+ proxygen spec publish --specification-file build/prod/eligibility-signposting-api.yaml
7273
7374publish-spec-uat : # Publish the specification to proxygen
7475 $(MAKE ) setup-proxygen-credentials
75- proxygen spec publish --specification-file build/preprod/eligibility-signposting-api.json --uat
76+ proxygen spec publish --specification-file build/preprod/eligibility-signposting-api.yaml --uat
7677
7778delete-spec : # Delete the specification from proxygen
7879 $(MAKE ) setup-proxygen-credentials
@@ -126,6 +127,9 @@ construct-spec: guard-APIM_ENV
126127 mkdir -p build/specification/$(APIM_ENV ) && \
127128 npx redocly bundle specification/eligibility-signposting-api.yaml --remove-unused-components --keep-url-references --ext yaml \
128129 > build/specification/$(APIM_ENV ) /eligibility-signposting-api.yaml
130+ ifeq ($(APIM_ENV ) ,sandbox)
131+ yq -y 'del(.components.securitySchemes) | select(.components.securitySchemes == {} or .components.securitySchemes == null)' -i build/specification/sandbox/eligibility-signposting-api.yaml
132+ endif
129133
130134SPEC_DIR := $(CURDIR ) /specification
131135POSTMAN_DIR := $(SPEC_DIR ) /postman
0 commit comments