Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ publish-oas:
$(MAKE) copy-examples
npm run publish-oas

set-authorization: guard-APIM_ENV
@ AUTHORIZATION=authorization-$$APIM_ENV.yml \
envsubst '$${AUTHORIZATION}' \
< specification/api/components/parameters/authorization/authorization-template.yml > specification/api/components/parameters/authorization/authorization.yml

set-target: guard-APIM_ENV
@ TARGET=target-$$APIM_ENV.yml \
envsubst '$${TARGET}' \
Expand All @@ -64,6 +69,7 @@ set-security: guard-APIM_ENV
< specification/api/components/security-schemes/security-schemes-template.yml > specification/api/components/security-schemes/security-schemes.yml

construct-spec: guard-APIM_ENV
$(MAKE) set-authorization APIM_ENV=$$APIM_ENV
$(MAKE) set-target APIM_ENV=$$APIM_ENV
$(MAKE) set-access APIM_ENV=$$APIM_ENV
$(MAKE) set-security APIM_ENV=$$APIM_ENV
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.0-${yyyy}${mm}${dd}.${HH}${MM}${SS}+${hash}
1.0.1-${yyyy}${mm}${dd}.${HH}${MM}${SS}+${hash}
2 changes: 1 addition & 1 deletion sdk/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ VERSION ?= ""
SHELL = /bin/bash

build: version # Build the project artefact @Pipeline
VER=$$(cat .version) && cd .. && npm run build --buildver=$$VER && cd sdk
VER=$$(cat .version) && cd .. && make build-yml-oas-spec APIM_ENV=prod && npm run generate --buildver=$$VER && cd sdk
./swagger-static.sh

clean: # Clean-up project resources (main) @Operations
Expand Down
2 changes: 1 addition & 1 deletion sdk/_config.version.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version: 0.2.0-20251120.121539+0c18993
version: 1.0.1-20251125.131623+3d60875
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: Authorization
in: header
description: |-
An OAuth 2.0 bearer token. Required in integration and production environments.
required: true
schema:
type: string
pattern: ^Bearer [[:ascii:]]+$
example: Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: apikey
in: header
description: |-
API Key to authorize in dynamic environments only.
required: false
schema:
type: string
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: Authorization
in: header
description: |-
An OAuth 2.0 bearer token. Required in integration and production environments.
required: false
schema:
type: string
pattern: ^Bearer [[:ascii:]]+$
example: Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: Authorization
in: header
description: |-
An OAuth 2.0 bearer token. Required in integration and production environments.
required: true
schema:
type: string
pattern: ^Bearer [[:ascii:]]+$
example: Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: Authorization
in: header
description: |-
An OAuth 2.0 bearer token. Required in integration and production environments.
required: true
schema:
type: string
pattern: ^Bearer [[:ascii:]]+$
example: Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: Authorization
in: header
description: |-
An OAuth 2.0 bearer token. Required in integration and production environments.
required: false
schema:
type: string
pattern: ^Bearer [[:ascii:]]+$
example: Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$ref: $AUTHORIZATION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$ref: authorization-prod.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
$ref: security-schemes-internal-dev-pr.yml
$ref: security-schemes-prod.yml
2 changes: 1 addition & 1 deletion specification/api/components/security/security.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
$ref: security-internal-dev-pr.yml
$ref: security-prod.yml
2 changes: 1 addition & 1 deletion specification/api/components/x-nhsd-apim/access.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
$ref: access-internal-dev-pr.yml
$ref: access-prod.yml
2 changes: 1 addition & 1 deletion specification/api/components/x-nhsd-apim/target.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
$ref: target-internal-dev-pr.yml
$ref: target-prod.yml
4 changes: 4 additions & 0 deletions specification/api/notify-supplier-phase1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ security:
paths:
/letters:
parameters:
- $ref: 'components/parameters/authorization/authorization.yml'
- $ref: 'components/parameters/requestId.yml'
- $ref: 'components/parameters/correlationId.yml'
post:
Expand All @@ -17,6 +18,7 @@ paths:
$ref: 'components/endpoints/listLetters.yml'
'/letters/{id}':
parameters:
- $ref: 'components/parameters/authorization/authorization.yml'
- $ref: 'components/parameters/requestId.yml'
- $ref: 'components/parameters/correlationId.yml'
- $ref: 'components/parameters/resourceId.yml'
Expand All @@ -26,6 +28,7 @@ paths:
$ref: 'components/endpoints/patchLetter.yml'
'/letters/{id}/data':
parameters:
- $ref: 'components/parameters/authorization/authorization.yml'
- $ref: 'components/parameters/resourceId.yml'
- $ref: 'components/parameters/requestId.yml'
- $ref: 'components/parameters/correlationId.yml'
Expand All @@ -35,6 +38,7 @@ paths:
# $ref: 'components/endpoints/headDataId.yml'
/mi:
parameters:
- $ref: 'components/parameters/authorization/authorization.yml'
- $ref: 'components/parameters/requestId.yml'
- $ref: 'components/parameters/correlationId.yml'
post:
Expand Down
Loading