From 23a4c94980fa62be9a06cdf0a65718afbdc9468f Mon Sep 17 00:00:00 2001 From: Edd Almond Date: Mon, 19 May 2025 12:18:06 +0100 Subject: [PATCH] eja - amending make commands to allow for environment specific builds of spec, and updating sandbox commands to make use of this --- Makefile | 4 +--- sandbox/Makefile | 1 + specification/README.md | 2 +- specification/eligibility-signposting-api.yaml | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index ee929d0..af7e88d 100644 --- a/Makefile +++ b/Makefile @@ -127,9 +127,7 @@ construct-spec: guard-APIM_ENV mkdir -p build/specification/$(APIM_ENV) && \ npx redocly bundle specification/eligibility-signposting-api.yaml --remove-unused-components --keep-url-references --ext yaml \ > build/specification/$(APIM_ENV)/eligibility-signposting-api.yaml -ifeq ($(APIM_ENV),sandbox) - yq 'del(.components.securitySchemes)' build/specification/sandbox/eligibility-signposting-api.yaml > build/specification/sandbox/eligibility-signposting-api.yaml.tmp && mv build/specification/sandbox/eligibility-signposting-api.yaml.tmp build/specification/sandbox/eligibility-signposting-api.yaml -endif + SPEC_DIR := $(CURDIR)/specification POSTMAN_DIR := $(SPEC_DIR)/postman diff --git a/sandbox/Makefile b/sandbox/Makefile index 26a086d..cf0d1b5 100644 --- a/sandbox/Makefile +++ b/sandbox/Makefile @@ -25,6 +25,7 @@ update: spec: mkdir -p specification + make -C .. construct-spec APIM_ENV=sandbox make -C .. generate-sandbox-spec test: diff --git a/specification/README.md b/specification/README.md index a4ff5b1..8bf653c 100644 --- a/specification/README.md +++ b/specification/README.md @@ -41,7 +41,7 @@ We deploy our specifications using the Proxygen CLI. In order to do this, the fo 2. Activate a poetry environment `poetry env activate` - you may need to run `make install-python` to install poetry etc. first. 3. Run `make retrieve-proxygen-key` from the root directory to retrieve the private key needed to authenticate with Proxygen. 4. Run `make setup-proxygen-credentials` from the root directory to set up credentials needed to interact with our API proxy. -5. Run `proxygen instance deploy eligibility-signposting-api ./build/specification/eligibility-signposting-api.yaml` to deploy the specification to +5. Run `proxygen instance deploy eligibility-signposting-api ./build/specification//eligibility-signposting-api.yaml` to deploy the specification to a chosen environment. ### Publishing specifications diff --git a/specification/eligibility-signposting-api.yaml b/specification/eligibility-signposting-api.yaml index 49343c9..02e87c1 100644 --- a/specification/eligibility-signposting-api.yaml +++ b/specification/eligibility-signposting-api.yaml @@ -1,4 +1,4 @@ -openapi: 3.0.1 +openapi: 3.0.3 info: title: Patient Eligibility Signposting API version: 1.0.10-alpha