From 9fbd050a4cb2ef3f48e26412b6a50d592d5ae110 Mon Sep 17 00:00:00 2001 From: Francisco Videira Date: Thu, 23 Oct 2025 11:42:17 +0000 Subject: [PATCH 1/7] Fix swagger static and some typos --- .devcontainer/devcontainer.json | 3 ++ .github/actions/build-sdk/action.yml | 8 ----- .github/workflows/stage-5-publish.yaml | 45 ++++++++------------------ README.md | 17 +++------- sdk/Makefile | 1 + sdk/swagger-initializer.js | 2 +- sdk/swagger-static.sh | 2 +- sdk/swagger.sh | 3 +- server/Makefile | 2 -- 9 files changed, 26 insertions(+), 57 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 7e90f63d..91e5c470 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -76,6 +76,9 @@ "installDockerComposeSwitch": true, "moby": true, "version": "latest" + }, + "ghcr.io/devcontainers/features/dotnet:2.4.0": { + "version": "8.0" } }, "mounts": [ diff --git a/.github/actions/build-sdk/action.yml b/.github/actions/build-sdk/action.yml index 0443d76c..22d46521 100644 --- a/.github/actions/build-sdk/action.yml +++ b/.github/actions/build-sdk/action.yml @@ -49,7 +49,6 @@ runs: run: | make build VERSION="${{ inputs.version }}" - - name: Upload API OAS specification artifact uses: actions/upload-artifact@v4 with: @@ -86,13 +85,6 @@ runs: path: "sdk/csharp" name: sdk-csharp-${{ inputs.version }} - # - name: Upload artifact - # # Automatically uploads an artifact from the './_site' directory by default - # uses: actions/upload-pages-artifact@v3 - # with: - # path: "docs/_site/" - # name: jekyll-docs-${{ inputs.version }} - - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: diff --git a/.github/workflows/stage-5-publish.yaml b/.github/workflows/stage-5-publish.yaml index 48855352..768f054c 100644 --- a/.github/workflows/stage-5-publish.yaml +++ b/.github/workflows/stage-5-publish.yaml @@ -112,8 +112,7 @@ jobs: draft: false prerelease: ${{ inputs.is_version_prerelease == 'true'}} - - - name: "Upload jeykll docs release asset" + - name: "Upload jekyll docs release asset" uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -143,7 +142,6 @@ jobs: asset_name: sdk-swagger-docs-${{ inputs.version }}.tar asset_content_type: "application/gzip" - - name: "zip html release asset" # Git hub pages needs a single tar called artifact inside the zip. working-directory: ./artifacts/sdk-html-${{ inputs.version }} @@ -192,9 +190,6 @@ jobs: asset_name: sdk-python-${{ inputs.version }}.zip asset_content_type: "application/gzip" - - - - name: "zip sdk csharp release asset" # Git hub pages needs a single tar called artifact inside the zip. working-directory: ./artifacts/sdk-csharp-${{ inputs.version }} @@ -227,7 +222,6 @@ jobs: asset_name: api-oas-specification-${{ inputs.version }}.zip asset_content_type: "application/gzip" - - name: "zip csharp server release asset" # Git hub pages needs a single tar called artifact inside the zip. working-directory: ./artifacts/server-csharp-${{ inputs.version }} @@ -244,8 +238,7 @@ jobs: asset_name: server-csharp-${{ inputs.version }}.zip asset_content_type: "application/gzip" - -### PUBLISH DOCKER - THIS NEEDS CHANGING TO DO THE DOCKER BUILD IN THE BUILD STAGE AND ARTIFACT IT. SEE publishlibhostdocker below how how and the buildlibs action. + ### PUBLISH DOCKER - THIS NEEDS CHANGING TO DO THE DOCKER BUILD IN THE BUILD STAGE AND ARTIFACT IT. SEE publishlibhostdocker below how how and the buildlibs action. publishdocker: name: "Publish docker packages" runs-on: ubuntu-latest @@ -272,8 +265,7 @@ jobs: env: CR_PAT: ${{ secrets.GITHUB_TOKEN }} - -### PUBLISH NUGET + ### PUBLISH NUGET publishnuget: name: "Publish nuget packages to nuget.pkg.github.com" runs-on: ubuntu-latest @@ -328,7 +320,7 @@ jobs: TEST_NUGET_VERSION: ${{ steps.set-nuget-version.outputs.TEST_NUGET_VERSION }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -### Publish NPM + ### Publish NPM publishnpm: name: "Publish npm packages to npm.pkg.github.com" @@ -345,9 +337,9 @@ jobs: name: sdk-ts-${{ inputs.version }} - uses: actions/setup-node@v4 with: - node-version: '24.3' - registry-url: 'https://npm.pkg.github.com' - scope: '@NHSDigital' + node-version: "24.3" + registry-url: "https://npm.pkg.github.com" + scope: "@NHSDigital" - run: ls -la - run: npm cache clear --force @@ -358,9 +350,6 @@ jobs: env: NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - # - name: "Upload other release asset 1" # uses: actions/upload-release-asset@v1 # env: @@ -382,7 +371,7 @@ jobs: success: name: "Success notification" runs-on: ubuntu-latest - needs: [publish,publishnpm] + needs: [publish, publishnpm] steps: - name: "Check prerequisites for notification" id: check @@ -397,8 +386,7 @@ jobs: message-text: "This is a notification body" link: ${{ github.event.pull_request.html_url }} - -### PUBLISH LIBS ABSTRACTION NUGET + ### PUBLISH LIBS ABSTRACTION NUGET publishlibsabstractionsnuget: name: "Publish libs abstractions packages to nuget.pkg.github.com" runs-on: ubuntu-latest @@ -454,9 +442,7 @@ jobs: TEST_NUGET_VERSION: ${{ steps.set-nuget-version.outputs.TEST_NUGET_VERSION }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - -### PUBLISH LIBS LETTERS NUGET + ### PUBLISH LIBS LETTERS NUGET publishliblettersnuget: name: "Publish libs letter packages to nuget.pkg.github.com" runs-on: ubuntu-latest @@ -512,8 +498,7 @@ jobs: TEST_NUGET_VERSION: ${{ steps.set-nuget-version.outputs.TEST_NUGET_VERSION }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - -### PUBLISH LIBS data NUGET + ### PUBLISH LIBS data NUGET publishlibhostnuget: name: "Publish libs data packages to nuget.pkg.github.com" runs-on: ubuntu-latest @@ -569,9 +554,7 @@ jobs: TEST_NUGET_VERSION: ${{ steps.set-nuget-version.outputs.TEST_NUGET_VERSION }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - -### PUBLISH LIBS host NUGET + ### PUBLISH LIBS host NUGET publishlibdatanuget: name: "Publish libs host packages to nuget.pkg.github.com" runs-on: ubuntu-latest @@ -627,9 +610,7 @@ jobs: TEST_NUGET_VERSION: ${{ steps.set-nuget-version.outputs.TEST_NUGET_VERSION }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - -### PUBLISH LIBS host docker + ### PUBLISH LIBS host docker publishlibhostdocker: name: "Publish libs host docker" runs-on: ubuntu-latest diff --git a/README.md b/README.md index f7c3d1fa..86b538a7 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ The NHS Notify Supplier API is intended primarily for print suppliers to integrate with the NHS Notify message request queueing system. -It models the concepts needed to configure production of letters and other printed materials to specific specifications, provide proofs of these materials, receive batch production requests, provide details of returned letters and correspondence, and to report on the status of these artifacts and associated management information such as volumes and assocated costs. +It models the concepts needed to configure production of letters and other printed materials to specific specifications, provide proofs of these materials, receive batch production requests, provide details of returned letters and correspondence, and to report on the status of these artifacts and associated management information such as volumes and associated costs. This repository documents the Supplier API specification and provides an SDK with examples and reference client implementations for interacting with it. @@ -25,8 +25,7 @@ This repository documents the Supplier API specification and provides an SDK wit - [SDK Assets](#sdk-assets) - [Examples](#examples) - [API Developers](#api-developers) - - [Documentation](#documentation-1) - - [pre built servers](#pre-built-servers) + - [Pre built servers](#pre-built-servers) - [Setup](#setup) - [Prerequisites and Configuration](#prerequisites-and-configuration) - [SDKs](#sdks) @@ -71,15 +70,9 @@ TODO:CCM-11209 Links to example clients. ## API Developers -New developer of the NHS Notify Supplier API -should understand the below. +New developer of the NHS Notify Supplier API should understand the below. -### Documentation - -- [Built](/) -- [Source](/docs/README.md) - -### pre built servers +### Pre built servers - "Working" C# server [/src/server/host](/src/server/host) `docker run -p 8080:8080 ghcr.io/nhsdigital/libshostdocker:latest` - View at [http://localhost:8080/swagger/index.html](http://localhost:8080/swagger/index.html) @@ -109,7 +102,7 @@ should understand the below. ##### Libs -- [/src/server](/src/server) has various separate libaries that are used by: +- [/src/server](/src/server) has various separate libraries that are used by: - [/src/server/host](/src/server/host) custom loads libs for different parts of the server ### Build diff --git a/sdk/Makefile b/sdk/Makefile index 91bce278..76092481 100644 --- a/sdk/Makefile +++ b/sdk/Makefile @@ -8,6 +8,7 @@ build: version # Build the project artefact @Pipeline clean: # Clean-up project resources (main) @Operations rm -rf */ + swagger: ./swagger.sh diff --git a/sdk/swagger-initializer.js b/sdk/swagger-initializer.js index 7ea35f52..600ade2f 100644 --- a/sdk/swagger-initializer.js +++ b/sdk/swagger-initializer.js @@ -3,7 +3,7 @@ window.onload = function() { // the following lines will be replaced by docker/configurator, when it runs in a docker-container window.ui = SwaggerUIBundle({ - urls: [{url:"swagger.json", name: "current"}], + urls: [{url:"swagger.yml", name: "current"}], dom_id: '#swagger-ui', deepLinking: true, presets: [ diff --git a/sdk/swagger-static.sh b/sdk/swagger-static.sh index 5c418161..806c55d5 100755 --- a/sdk/swagger-static.sh +++ b/sdk/swagger-static.sh @@ -9,5 +9,5 @@ unzip swagger.zip "swagger-ui-$VERSION/dist/*" -d swagger mv swagger/swagger-ui-$VERSION/dist/* swagger rm -r swagger/swagger-ui-$VERSION cp swagger-initializer.js swagger/swagger-initializer.js -cp ../specification/api/notify-supplier-phase1.yml swagger/swagger.json +cp ../build/notify-supplier.yml swagger/swagger.yml rm swagger.zip diff --git a/sdk/swagger.sh b/sdk/swagger.sh index a77b4bae..25585d41 100755 --- a/sdk/swagger.sh +++ b/sdk/swagger.sh @@ -1,3 +1,4 @@ #!/bin/sh +set -eux -docker run -p 80:8080 -e SWAGGER_JSON=/swagger/swagger.json -v ../specification/api/notify-supplier.yml:/swagger/swagger.json docker.swagger.io/swaggerapi/swagger-ui +docker run -p 80:8080 -e SWAGGER_JSON=/swagger/swagger.yml -v ../build/notify-supplier.yml:/swagger/swagger.yml docker.swagger.io/swaggerapi/swagger-ui diff --git a/server/Makefile b/server/Makefile index 780ce990..7408b0ac 100644 --- a/server/Makefile +++ b/server/Makefile @@ -7,8 +7,6 @@ build: version # Build the project artefact @Pipeline clean: # Clean-up project resources (main) @Operations rm -rf */ -swagger: - ./swagger.sh version: touch _config.version.yml From ee0e483ee2e75a4ae6be186c7327f2fe4ed3bf4a Mon Sep 17 00:00:00 2001 From: Francisco Videira Date: Fri, 24 Oct 2025 15:09:54 +0000 Subject: [PATCH 2/7] WIP add swagger ui to tech docs --- .tool-versions | 1 + docs/Makefile | 10 ++++++++-- docs/generate-includes.sh | 5 ----- docs/pages/specification.html | 8 +++++++- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/.tool-versions b/.tool-versions index 7141c23f..0c674acf 100644 --- a/.tool-versions +++ b/.tool-versions @@ -9,6 +9,7 @@ terraform-docs 0.19.0 trivy 0.61.0 vale 3.6.0 poetry 2.1.4 +java openjdk-25.0.1 # ============================================================================== # The section below is reserved for Docker image versions. diff --git a/docs/Makefile b/docs/Makefile index 9ec6f5d1..eee65c92 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -1,6 +1,7 @@ BASE_URL ?= "/" VERSION ?= "" SHELL = /bin/bash +SDK_DIR := ../sdk default: install @@ -19,10 +20,12 @@ define baseurlparam = $(if $(BASE_URL),-- --baseurl $(BASE_URL),-- --baseurl "") endef -build: version .generate-includes +build: version .generate-includes $(SDK_DIR)/build + rsync -a --delete $(SDK_DIR)/swagger/ ./assets/swagger npm run build $(baseurlparam) -debug: version .generate-includes +debug: version .generate-includes $(SDK_DIR)/build + rsync -a --delete $(SDK_DIR)/swagger/ ./assets/swagger npm run debug version: @@ -41,3 +44,6 @@ version: .generate-includes: npm run generate-includes + +$(SDK_DIR)/build: + $(MAKE) -C $(SDK_DIR) build diff --git a/docs/generate-includes.sh b/docs/generate-includes.sh index 87987688..c3b5649b 100755 --- a/docs/generate-includes.sh +++ b/docs/generate-includes.sh @@ -10,10 +10,5 @@ mkdir -p ./docs/_includes/components/generated npm run -w internal/datastore diagrams cp ./internal/datastore/src/types.md ./docs/_includes/components/generated/types.md -# Specifications -npm run bundle-oas -npm run generate:html -cp ./sdk/html/index.html ./docs/_includes/components/generated/nhs-notify-supplier-api.html - #Contributing file cp ./CONTRIBUTING.md ./docs/_includes/components/generated/contributing.md diff --git a/docs/pages/specification.html b/docs/pages/specification.html index 7f2e0941..3b862cf3 100644 --- a/docs/pages/specification.html +++ b/docs/pages/specification.html @@ -14,4 +14,10 @@ permalink: /specification --- -{% include components/generated/nhs-notify-supplier-api.html %} +
+ +
From a6b7c239cd3148a7baa998fdeafd9d4244d36cb3 Mon Sep 17 00:00:00 2001 From: Francisco Videira Date: Tue, 28 Oct 2025 15:30:32 +0000 Subject: [PATCH 3/7] add swagger static gitignore --- docs/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/.gitignore b/docs/.gitignore index 54812bb5..892266c6 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -10,3 +10,4 @@ _config.version.yml # Generated or copied from other repo resources _includes/components/generated/* +assets/swagger/* From 10ab813b8ad8fd1422038e6ee2bc7b4c343c9de8 Mon Sep 17 00:00:00 2001 From: Francisco Videira Date: Thu, 30 Oct 2025 09:11:24 +0000 Subject: [PATCH 4/7] take csharp server out --- .github/workflows/stage-3-build.yaml | 60 ++++------------ .github/workflows/stage-5-publish.yaml | 94 ++++++++++++++------------ Makefile | 3 +- README.md | 10 +-- internal/datastore/src/types.md | 2 +- 5 files changed, 66 insertions(+), 103 deletions(-) diff --git a/.github/workflows/stage-3-build.yaml b/.github/workflows/stage-3-build.yaml index 2f362ecd..70c50760 100644 --- a/.github/workflows/stage-3-build.yaml +++ b/.github/workflows/stage-3-build.yaml @@ -38,7 +38,7 @@ on: permissions: id-token: write # This is required for requesting the JWT - contents: read # This is required for actions/checkout + contents: read # This is required for actions/checkout jobs: artefact-jekyll-docs: name: "Build Docs" @@ -64,17 +64,18 @@ jobs: with: version: "${{ inputs.version }}" - artefact-servers: - name: "Build servers" - runs-on: ubuntu-latest - timeout-minutes: 10 - steps: - - name: "Checkout code" - uses: actions/checkout@v4 - - name: "Build servers" - uses: ./.github/actions/build-server - with: - version: "${{ inputs.version }}" + # Take out for now - might add again in the future + # artefact-servers: + # name: "Build servers" + # runs-on: ubuntu-latest + # timeout-minutes: 10 + # steps: + # - name: "Checkout code" + # uses: actions/checkout@v4 + # - name: "Build servers" + # uses: ./.github/actions/build-server + # with: + # version: "${{ inputs.version }}" artefact-libs: name: "Build libs" @@ -109,38 +110,3 @@ jobs: runId: "${{ github.run_id }}" buildSandbox: true releaseVersion: ${{ github.head_ref || github.ref_name }} - - # artefact-1: - # name: "Artefact 1" - # runs-on: ubuntu-latest - # timeout-minutes: 3 - # steps: - # - name: "Checkout code" - # uses: actions/checkout@v4 - # - name: "Build artefact 1" - # run: | - # echo "Building artefact 1 ..." - # - name: "Check artefact 1" - # run: | - # echo "Checking artefact 1 ..." - # - name: "Upload artefact 1" - # run: | - # echo "Uploading artefact 1 ..." - # # Use either action/cache or action/upload-artifact - # artefact-n: - # name: "Artefact n" - # runs-on: ubuntu-latest - # timeout-minutes: 3 - # steps: - # - name: "Checkout code" - # uses: actions/checkout@v4 - # - name: "Build artefact n" - # run: | - # echo "Building artefact n ..." - # - name: "Check artefact n" - # run: | - # echo "Checking artefact n ..." - # - name: "Upload artefact n" - # run: | - # echo "Uploading artefact n ..." - # # Use either action/cache or action/upload-artifact diff --git a/.github/workflows/stage-5-publish.yaml b/.github/workflows/stage-5-publish.yaml index 768f054c..c6cd3071 100644 --- a/.github/workflows/stage-5-publish.yaml +++ b/.github/workflows/stage-5-publish.yaml @@ -93,11 +93,12 @@ jobs: path: ./artifacts/api-oas-specification-${{ inputs.version }} name: api-oas-specification-${{ inputs.version }} - - name: "Get the artefacts 9" - uses: actions/download-artifact@v4 - with: - path: ./artifacts/server-csharp-${{ inputs.version }} - name: server-csharp-${{ inputs.version }} + # Take out for now - might add again in the future + # - name: "Get the artefacts 9" + # uses: actions/download-artifact@v4 + # with: + # path: ./artifacts/server-csharp-${{ inputs.version }} + # name: server-csharp-${{ inputs.version }} - name: "Create release" id: create_release @@ -222,48 +223,51 @@ jobs: asset_name: api-oas-specification-${{ inputs.version }}.zip asset_content_type: "application/gzip" - - name: "zip csharp server release asset" - # Git hub pages needs a single tar called artifact inside the zip. - working-directory: ./artifacts/server-csharp-${{ inputs.version }} - run: zip -r ../server-csharp-${{ inputs.version }}.zip . - shell: bash + # Take out for now - might add again in the future + # - name: "zip csharp server release asset" + # # Git hub pages needs a single tar called artifact inside the zip. + # working-directory: ./artifacts/server-csharp-${{ inputs.version }} + # run: zip -r ../server-csharp-${{ inputs.version }}.zip . + # shell: bash - - name: "Upload csharp server release asset" - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: "${{ steps.create_release.outputs.upload_url }}" - asset_path: ./artifacts/server-csharp-${{ inputs.version }}.zip - asset_name: server-csharp-${{ inputs.version }}.zip - asset_content_type: "application/gzip" + # Take out for now - might add again in the future + # - name: "Upload csharp server release asset" + # uses: actions/upload-release-asset@v1 + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # with: + # upload_url: "${{ steps.create_release.outputs.upload_url }}" + # asset_path: ./artifacts/server-csharp-${{ inputs.version }}.zip + # asset_name: server-csharp-${{ inputs.version }}.zip + # asset_content_type: "application/gzip" - ### PUBLISH DOCKER - THIS NEEDS CHANGING TO DO THE DOCKER BUILD IN THE BUILD STAGE AND ARTIFACT IT. SEE publishlibhostdocker below how how and the buildlibs action. - publishdocker: - name: "Publish docker packages" - runs-on: ubuntu-latest - needs: [publish] - permissions: - packages: write - contents: read - steps: - - name: "Get the artefacts csharp docker" - uses: actions/download-artifact@v4 - with: - path: . - name: server-csharp-docker-${{ inputs.version }} - - name: "Get the artefacts csharp server" - uses: actions/download-artifact@v4 - with: - path: ./csharp-server - name: server-csharp-${{ inputs.version }} - - run: ls -la - - run: | - docker build . -t ghcr.io/nhsdigital/nhsnotifysupplierserver:latest - echo $CR_PAT | docker login ghcr.io -u nhs-notify-supplier-api --password-stdin - docker push ghcr.io/nhsdigital/nhsnotifysupplierserver:latest - env: - CR_PAT: ${{ secrets.GITHUB_TOKEN }} + # Take out for now - might add again in the future + # ### PUBLISH DOCKER - THIS NEEDS CHANGING TO DO THE DOCKER BUILD IN THE BUILD STAGE AND ARTIFACT IT. SEE publishlibhostdocker below how how and the buildlibs action. + # publishdocker: + # name: "Publish docker packages" + # runs-on: ubuntu-latest + # needs: [publish] + # permissions: + # packages: write + # contents: read + # steps: + # - name: "Get the artefacts csharp docker" + # uses: actions/download-artifact@v4 + # with: + # path: . + # name: server-csharp-docker-${{ inputs.version }} + # - name: "Get the artefacts csharp server" + # uses: actions/download-artifact@v4 + # with: + # path: ./csharp-server + # name: server-csharp-${{ inputs.version }} + # - run: ls -la + # - run: | + # docker build . -t ghcr.io/nhsdigital/nhsnotifysupplierserver:latest + # echo $CR_PAT | docker login ghcr.io -u nhs-notify-supplier-api --password-stdin + # docker push ghcr.io/nhsdigital/nhsnotifysupplierserver:latest + # env: + # CR_PAT: ${{ secrets.GITHUB_TOKEN }} ### PUBLISH NUGET publishnuget: diff --git a/Makefile b/Makefile index 91e8d688..3756ab54 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,8 @@ dependencies: # Install dependencies needed to build and test the project @Pipel # TODO: Implement installation of your project dependencies build: # Build the project artefact @Pipeline - (cd server && make build) +# Take out for now - might add again in the future +# (cd server && make build) (cd sdk && make build) (cd docs && make build) (cd src/server && make build) diff --git a/README.md b/README.md index 86b538a7..df6f28c8 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,6 @@ This repository documents the Supplier API specification and provides an SDK wit - [Setup](#setup) - [Prerequisites and Configuration](#prerequisites-and-configuration) - [SDKs](#sdks) - - [Servers](#servers) - [Libs](#libs) - [Build](#build) - [GitHub Actions CI/CD](#github-actions-cicd) @@ -75,9 +74,7 @@ New developer of the NHS Notify Supplier API should understand the below. ### Pre built servers - "Working" C# server [/src/server/host](/src/server/host) `docker run -p 8080:8080 ghcr.io/nhsdigital/libshostdocker:latest` - - View at [http://localhost:8080/swagger/index.html](http://localhost:8080/swagger/index.html) -- Docker OAS example Server (csharp) `docker run -p 3000:3000 ghcr.io/nhsdigital/nhsnotifysupplierserver:latest` -- CSharp `server-csharp-[Version].zip` +- OAS preview at [http://localhost:8080/swagger/index.html](http://localhost:8080/swagger/index.html) ### Setup @@ -95,11 +92,6 @@ New developer of the NHS Notify Supplier API should understand the below. and will be built as part of the CI/CD pipeline and released as a GitHub release. -##### Servers - -- Servers folder is being built at build time from OAS specs. -- TODO:CCM-12139 Build actual servers - ##### Libs - [/src/server](/src/server) has various separate libraries that are used by: diff --git a/internal/datastore/src/types.md b/internal/datastore/src/types.md index 06b65f0e..08e72d59 100644 --- a/internal/datastore/src/types.md +++ b/internal/datastore/src/types.md @@ -1,4 +1,4 @@ -# Data Store Schemas +## Data Store Schemas This document contains the mermaid diagrams for the data store schemas used in the application. From 40123451d0c1cda4622d770d28526a4e117dce76 Mon Sep 17 00:00:00 2001 From: Tim Ireland Date: Thu, 30 Oct 2025 12:03:29 +0000 Subject: [PATCH 5/7] Update .gitleaksignore added gitleaks ignore --- .gitleaksignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitleaksignore b/.gitleaksignore index 803deb3d..996b4388 100644 --- a/.gitleaksignore +++ b/.gitleaksignore @@ -15,3 +15,4 @@ b1f85a7faf54eaf66074d7a6daa093aefe6b3ebe:sdk/python/pyproject.toml:ipv4:25 93e54b6baa390529aab08d9fd956837f7bb3f30:src/src.sln:ipv4:3 493e54b6baa390529aab08d9fd956837f7bb3f30:src/src.sln:ipv4:3 d8aaf7e033bf78fff491caa148897be266b60f67:src/src.sln:ipv4:3 +e12407e09151898bfd8d049d57eee9db9977d56b:.github/copilot-instructions.md:generic-api-key:213 From b20b3e9a3e7e44df446b527b8e354c6dd0f3d1f8 Mon Sep 17 00:00:00 2001 From: Francisco Videira Date: Thu, 30 Oct 2025 12:51:27 +0000 Subject: [PATCH 6/7] take out nuget libs --- .github/workflows/stage-3-build.yaml | 23 +- .github/workflows/stage-5-publish.yaml | 513 ++++++++++++------------- Makefile | 11 +- README.md | 7 - 4 files changed, 265 insertions(+), 289 deletions(-) diff --git a/.github/workflows/stage-3-build.yaml b/.github/workflows/stage-3-build.yaml index 5e1882d0..73d74f4c 100644 --- a/.github/workflows/stage-3-build.yaml +++ b/.github/workflows/stage-3-build.yaml @@ -76,18 +76,17 @@ jobs: # uses: ./.github/actions/build-server # with: # version: "${{ inputs.version }}" - - artefact-libs: - name: "Build libs" - runs-on: ubuntu-latest - timeout-minutes: 10 - steps: - - name: "Checkout code" - uses: actions/checkout@v5 - - name: "Build servers" - uses: ./.github/actions/build-libraries - with: - version: "${{ inputs.version }}" + # artefact-libs: + # name: "Build libs" + # runs-on: ubuntu-latest + # timeout-minutes: 10 + # steps: + # - name: "Checkout code" + # uses: actions/checkout@v5 + # - name: "Build servers" + # uses: ./.github/actions/build-libraries + # with: + # version: "${{ inputs.version }}" artefact-proxies: name: "Build proxies" diff --git a/.github/workflows/stage-5-publish.yaml b/.github/workflows/stage-5-publish.yaml index 787b176a..1c7eb36f 100644 --- a/.github/workflows/stage-5-publish.yaml +++ b/.github/workflows/stage-5-publish.yaml @@ -354,24 +354,6 @@ jobs: env: NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # - name: "Upload other release asset 1" - # uses: actions/upload-release-asset@v1 - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # with: - # upload_url: "${{ steps.create_release.outputs.upload_url }}" - # asset_path: ./* - # asset_name: repository-template-${{ inputs.version }}.tar.gz - # asset_content_type: "application/gzip" - # - name: "Upload other release asset 2" - # uses: actions/upload-release-asset@v1 - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # with: - # upload_url: "${{ steps.create_release.outputs.upload_url }}" - # asset_path: ./* - # asset_name: repository-template-${{ inputs.version }}.tar.gz - # asset_content_type: "application/gzip" success: name: "Success notification" runs-on: ubuntu-latest @@ -390,250 +372,251 @@ jobs: message-text: "This is a notification body" link: ${{ github.event.pull_request.html_url }} - ### PUBLISH LIBS ABSTRACTION NUGET - publishlibsabstractionsnuget: - name: "Publish libs abstractions packages to nuget.pkg.github.com" - runs-on: ubuntu-latest - needs: [publish] - permissions: - packages: write - contents: read - steps: - - name: "Get the artefacts" - uses: actions/download-artifact@v5 - with: - path: . - name: libs-abstractions-${{ inputs.version }} - - run: | - ls -la - find . -name ".version" - - run: | - dotnet nuget add source \ - --username nhs-notify-supplier-api \ - --password ${{ secrets.GITHUB_TOKEN }} \ - --store-password-in-clear-text \ - --name github \ - "https://nuget.pkg.github.com/NHSDigital/index.json" - - run: | - echo "ROOT .version file is: $(cat .version)" - echo "GH variable version is: ${{ inputs.version }}" - name: Showing the base versions - - - run: | - VERSION=${{ inputs.version }} - SHORT_VERSION="$(echo $VERSION | rev | cut -d"." -f2- | rev)" - NUGET_VERSION="$(echo "$VERSION" | tr + .)" - echo $VERSION - echo $SHORT_VERSION - echo $NUGET_VERSION - SHORT_NUGET_VERSION="$(echo $NUGET_VERSION | rev | cut -d"." -f2- | rev)" - echo $SHORT_NUGET_VERSION - SHORTER_NUGET_VERSION="$(echo $SHORT_NUGET_VERSION | rev | cut -d"." -f2- | rev)" - echo $SHORTER_NUGET_VERSION - TEST_NUGET_VERSION="$(echo $NUGET_VERSION | sed -E 's/.([^.]*)$/\1/')" - TEST_NUGET_VERSION="$(echo $TEST_NUGET_VERSION | sed -E 's/.([^.]*)$/\1/')" - echo $TEST_NUGET_VERSION - echo "TEST_NUGET_VERSION=$TEST_NUGET_VERSION" >> "$GITHUB_OUTPUT" - name: Set the nuget version - id: set-nuget-version - - - run: | - dotnet nuget push \ - nhs.notify.suppliers.api.abstractions.${TEST_NUGET_VERSION}.nupkg \ - --source github \ - --api-key $GITHUB_TOKEN - env: - TEST_NUGET_VERSION: ${{ steps.set-nuget-version.outputs.TEST_NUGET_VERSION }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - ### PUBLISH LIBS LETTERS NUGET - publishliblettersnuget: - name: "Publish libs letter packages to nuget.pkg.github.com" - runs-on: ubuntu-latest - needs: [publish] - permissions: - packages: write - contents: read - steps: - - name: "Get the artefacts" - uses: actions/download-artifact@v5 - with: - path: . - name: libs-letter-${{ inputs.version }} - - run: | - ls -la - find . -name ".version" - - run: | - dotnet nuget add source \ - --username nhs-notify-supplier-api \ - --password ${{ secrets.GITHUB_TOKEN }} \ - --store-password-in-clear-text \ - --name github \ - "https://nuget.pkg.github.com/NHSDigital/index.json" - - run: | - echo "ROOT .version file is: $(cat .version)" - echo "GH variable version is: ${{ inputs.version }}" - name: Showing the base versions - - - run: | - VERSION=${{ inputs.version }} - SHORT_VERSION="$(echo $VERSION | rev | cut -d"." -f2- | rev)" - NUGET_VERSION="$(echo "$VERSION" | tr + .)" - echo $VERSION - echo $SHORT_VERSION - echo $NUGET_VERSION - SHORT_NUGET_VERSION="$(echo $NUGET_VERSION | rev | cut -d"." -f2- | rev)" - echo $SHORT_NUGET_VERSION - SHORTER_NUGET_VERSION="$(echo $SHORT_NUGET_VERSION | rev | cut -d"." -f2- | rev)" - echo $SHORTER_NUGET_VERSION - TEST_NUGET_VERSION="$(echo $NUGET_VERSION | sed -E 's/.([^.]*)$/\1/')" - TEST_NUGET_VERSION="$(echo $TEST_NUGET_VERSION | sed -E 's/.([^.]*)$/\1/')" - echo $TEST_NUGET_VERSION - echo "TEST_NUGET_VERSION=$TEST_NUGET_VERSION" >> "$GITHUB_OUTPUT" - name: Set the nuget version - id: set-nuget-version - - - run: | - dotnet nuget push \ - nhs.notify.suppliers.api.letter.${TEST_NUGET_VERSION}.nupkg \ - --source github \ - --api-key $GITHUB_TOKEN - env: - TEST_NUGET_VERSION: ${{ steps.set-nuget-version.outputs.TEST_NUGET_VERSION }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - ### PUBLISH LIBS data NUGET - publishlibhostnuget: - name: "Publish libs data packages to nuget.pkg.github.com" - runs-on: ubuntu-latest - needs: [publish] - permissions: - packages: write - contents: read - steps: - - name: "Get the artefacts" - uses: actions/download-artifact@v5 - with: - path: . - name: libs-data-${{ inputs.version }} - - run: | - ls -la - find . -name ".version" - - run: | - dotnet nuget add source \ - --username nhs-notify-supplier-api \ - --password ${{ secrets.GITHUB_TOKEN }} \ - --store-password-in-clear-text \ - --name github \ - "https://nuget.pkg.github.com/NHSDigital/index.json" - - run: | - echo "ROOT .version file is: $(cat .version)" - echo "GH variable version is: ${{ inputs.version }}" - name: Showing the base versions - - - run: | - VERSION=${{ inputs.version }} - SHORT_VERSION="$(echo $VERSION | rev | cut -d"." -f2- | rev)" - NUGET_VERSION="$(echo "$VERSION" | tr + .)" - echo $VERSION - echo $SHORT_VERSION - echo $NUGET_VERSION - SHORT_NUGET_VERSION="$(echo $NUGET_VERSION | rev | cut -d"." -f2- | rev)" - echo $SHORT_NUGET_VERSION - SHORTER_NUGET_VERSION="$(echo $SHORT_NUGET_VERSION | rev | cut -d"." -f2- | rev)" - echo $SHORTER_NUGET_VERSION - TEST_NUGET_VERSION="$(echo $NUGET_VERSION | sed -E 's/.([^.]*)$/\1/')" - TEST_NUGET_VERSION="$(echo $TEST_NUGET_VERSION | sed -E 's/.([^.]*)$/\1/')" - echo $TEST_NUGET_VERSION - echo "TEST_NUGET_VERSION=$TEST_NUGET_VERSION" >> "$GITHUB_OUTPUT" - name: Set the nuget version - id: set-nuget-version - - - run: | - dotnet nuget push \ - nhs.notify.suppliers.api.data.${TEST_NUGET_VERSION}.nupkg \ - --source github \ - --api-key $GITHUB_TOKEN - env: - TEST_NUGET_VERSION: ${{ steps.set-nuget-version.outputs.TEST_NUGET_VERSION }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - ### PUBLISH LIBS host NUGET - publishlibdatanuget: - name: "Publish libs host packages to nuget.pkg.github.com" - runs-on: ubuntu-latest - needs: [publish] - permissions: - packages: write - contents: read - steps: - - name: "Get the artefacts" - uses: actions/download-artifact@v5 - with: - path: . - name: libs-host-${{ inputs.version }} - - run: | - ls -la - find . -name ".version" - - run: | - dotnet nuget add source \ - --username nhs-notify-supplier-api \ - --password ${{ secrets.GITHUB_TOKEN }} \ - --store-password-in-clear-text \ - --name github \ - "https://nuget.pkg.github.com/NHSDigital/index.json" - - run: | - echo "ROOT .version file is: $(cat .version)" - echo "GH variable version is: ${{ inputs.version }}" - name: Showing the base versions - - - run: | - VERSION=${{ inputs.version }} - SHORT_VERSION="$(echo $VERSION | rev | cut -d"." -f2- | rev)" - NUGET_VERSION="$(echo "$VERSION" | tr + .)" - echo $VERSION - echo $SHORT_VERSION - echo $NUGET_VERSION - SHORT_NUGET_VERSION="$(echo $NUGET_VERSION | rev | cut -d"." -f2- | rev)" - echo $SHORT_NUGET_VERSION - SHORTER_NUGET_VERSION="$(echo $SHORT_NUGET_VERSION | rev | cut -d"." -f2- | rev)" - echo $SHORTER_NUGET_VERSION - TEST_NUGET_VERSION="$(echo $NUGET_VERSION | sed -E 's/.([^.]*)$/\1/')" - TEST_NUGET_VERSION="$(echo $TEST_NUGET_VERSION | sed -E 's/.([^.]*)$/\1/')" - echo $TEST_NUGET_VERSION - echo "TEST_NUGET_VERSION=$TEST_NUGET_VERSION" >> "$GITHUB_OUTPUT" - name: Set the nuget version - id: set-nuget-version - - - run: | - dotnet nuget push \ - nhs.notify.suppliers.api.host.${TEST_NUGET_VERSION}.nupkg \ - --source github \ - --api-key $GITHUB_TOKEN - env: - TEST_NUGET_VERSION: ${{ steps.set-nuget-version.outputs.TEST_NUGET_VERSION }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - ### PUBLISH LIBS host docker - publishlibhostdocker: - name: "Publish libs host docker" - runs-on: ubuntu-latest - needs: [publish] - permissions: - packages: write - contents: read - steps: - - name: "Get the artefacts" - uses: actions/download-artifact@v5 - with: - path: . - name: libs-host-docker-${{ inputs.version }} - - - run: | - ls -Rla - docker load --input myimage.tar - docker image ls -a - echo $CR_PAT | docker login ghcr.io -u nhs-notify-supplier-api --password-stdin - docker push ghcr.io/nhsdigital/libshostdocker:latest - env: - CR_PAT: ${{ secrets.GITHUB_TOKEN }} + # Take out for now - might add again in the future + # ### PUBLISH LIBS ABSTRACTION NUGET + # publishlibsabstractionsnuget: + # name: "Publish libs abstractions packages to nuget.pkg.github.com" + # runs-on: ubuntu-latest + # needs: [publish] + # permissions: + # packages: write + # contents: read + # steps: + # - name: "Get the artefacts" + # uses: actions/download-artifact@v5 + # with: + # path: . + # name: libs-abstractions-${{ inputs.version }} + # - run: | + # ls -la + # find . -name ".version" + # - run: | + # dotnet nuget add source \ + # --username nhs-notify-supplier-api \ + # --password ${{ secrets.GITHUB_TOKEN }} \ + # --store-password-in-clear-text \ + # --name github \ + # "https://nuget.pkg.github.com/NHSDigital/index.json" + # - run: | + # echo "ROOT .version file is: $(cat .version)" + # echo "GH variable version is: ${{ inputs.version }}" + # name: Showing the base versions + + # - run: | + # VERSION=${{ inputs.version }} + # SHORT_VERSION="$(echo $VERSION | rev | cut -d"." -f2- | rev)" + # NUGET_VERSION="$(echo "$VERSION" | tr + .)" + # echo $VERSION + # echo $SHORT_VERSION + # echo $NUGET_VERSION + # SHORT_NUGET_VERSION="$(echo $NUGET_VERSION | rev | cut -d"." -f2- | rev)" + # echo $SHORT_NUGET_VERSION + # SHORTER_NUGET_VERSION="$(echo $SHORT_NUGET_VERSION | rev | cut -d"." -f2- | rev)" + # echo $SHORTER_NUGET_VERSION + # TEST_NUGET_VERSION="$(echo $NUGET_VERSION | sed -E 's/.([^.]*)$/\1/')" + # TEST_NUGET_VERSION="$(echo $TEST_NUGET_VERSION | sed -E 's/.([^.]*)$/\1/')" + # echo $TEST_NUGET_VERSION + # echo "TEST_NUGET_VERSION=$TEST_NUGET_VERSION" >> "$GITHUB_OUTPUT" + # name: Set the nuget version + # id: set-nuget-version + + # - run: | + # dotnet nuget push \ + # nhs.notify.suppliers.api.abstractions.${TEST_NUGET_VERSION}.nupkg \ + # --source github \ + # --api-key $GITHUB_TOKEN + # env: + # TEST_NUGET_VERSION: ${{ steps.set-nuget-version.outputs.TEST_NUGET_VERSION }} + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + # ### PUBLISH LIBS LETTERS NUGET + # publishliblettersnuget: + # name: "Publish libs letter packages to nuget.pkg.github.com" + # runs-on: ubuntu-latest + # needs: [publish] + # permissions: + # packages: write + # contents: read + # steps: + # - name: "Get the artefacts" + # uses: actions/download-artifact@v5 + # with: + # path: . + # name: libs-letter-${{ inputs.version }} + # - run: | + # ls -la + # find . -name ".version" + # - run: | + # dotnet nuget add source \ + # --username nhs-notify-supplier-api \ + # --password ${{ secrets.GITHUB_TOKEN }} \ + # --store-password-in-clear-text \ + # --name github \ + # "https://nuget.pkg.github.com/NHSDigital/index.json" + # - run: | + # echo "ROOT .version file is: $(cat .version)" + # echo "GH variable version is: ${{ inputs.version }}" + # name: Showing the base versions + + # - run: | + # VERSION=${{ inputs.version }} + # SHORT_VERSION="$(echo $VERSION | rev | cut -d"." -f2- | rev)" + # NUGET_VERSION="$(echo "$VERSION" | tr + .)" + # echo $VERSION + # echo $SHORT_VERSION + # echo $NUGET_VERSION + # SHORT_NUGET_VERSION="$(echo $NUGET_VERSION | rev | cut -d"." -f2- | rev)" + # echo $SHORT_NUGET_VERSION + # SHORTER_NUGET_VERSION="$(echo $SHORT_NUGET_VERSION | rev | cut -d"." -f2- | rev)" + # echo $SHORTER_NUGET_VERSION + # TEST_NUGET_VERSION="$(echo $NUGET_VERSION | sed -E 's/.([^.]*)$/\1/')" + # TEST_NUGET_VERSION="$(echo $TEST_NUGET_VERSION | sed -E 's/.([^.]*)$/\1/')" + # echo $TEST_NUGET_VERSION + # echo "TEST_NUGET_VERSION=$TEST_NUGET_VERSION" >> "$GITHUB_OUTPUT" + # name: Set the nuget version + # id: set-nuget-version + + # - run: | + # dotnet nuget push \ + # nhs.notify.suppliers.api.letter.${TEST_NUGET_VERSION}.nupkg \ + # --source github \ + # --api-key $GITHUB_TOKEN + # env: + # TEST_NUGET_VERSION: ${{ steps.set-nuget-version.outputs.TEST_NUGET_VERSION }} + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + # ### PUBLISH LIBS data NUGET + # publishlibhostnuget: + # name: "Publish libs data packages to nuget.pkg.github.com" + # runs-on: ubuntu-latest + # needs: [publish] + # permissions: + # packages: write + # contents: read + # steps: + # - name: "Get the artefacts" + # uses: actions/download-artifact@v5 + # with: + # path: . + # name: libs-data-${{ inputs.version }} + # - run: | + # ls -la + # find . -name ".version" + # - run: | + # dotnet nuget add source \ + # --username nhs-notify-supplier-api \ + # --password ${{ secrets.GITHUB_TOKEN }} \ + # --store-password-in-clear-text \ + # --name github \ + # "https://nuget.pkg.github.com/NHSDigital/index.json" + # - run: | + # echo "ROOT .version file is: $(cat .version)" + # echo "GH variable version is: ${{ inputs.version }}" + # name: Showing the base versions + + # - run: | + # VERSION=${{ inputs.version }} + # SHORT_VERSION="$(echo $VERSION | rev | cut -d"." -f2- | rev)" + # NUGET_VERSION="$(echo "$VERSION" | tr + .)" + # echo $VERSION + # echo $SHORT_VERSION + # echo $NUGET_VERSION + # SHORT_NUGET_VERSION="$(echo $NUGET_VERSION | rev | cut -d"." -f2- | rev)" + # echo $SHORT_NUGET_VERSION + # SHORTER_NUGET_VERSION="$(echo $SHORT_NUGET_VERSION | rev | cut -d"." -f2- | rev)" + # echo $SHORTER_NUGET_VERSION + # TEST_NUGET_VERSION="$(echo $NUGET_VERSION | sed -E 's/.([^.]*)$/\1/')" + # TEST_NUGET_VERSION="$(echo $TEST_NUGET_VERSION | sed -E 's/.([^.]*)$/\1/')" + # echo $TEST_NUGET_VERSION + # echo "TEST_NUGET_VERSION=$TEST_NUGET_VERSION" >> "$GITHUB_OUTPUT" + # name: Set the nuget version + # id: set-nuget-version + + # - run: | + # dotnet nuget push \ + # nhs.notify.suppliers.api.data.${TEST_NUGET_VERSION}.nupkg \ + # --source github \ + # --api-key $GITHUB_TOKEN + # env: + # TEST_NUGET_VERSION: ${{ steps.set-nuget-version.outputs.TEST_NUGET_VERSION }} + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + # ### PUBLISH LIBS host NUGET + # publishlibdatanuget: + # name: "Publish libs host packages to nuget.pkg.github.com" + # runs-on: ubuntu-latest + # needs: [publish] + # permissions: + # packages: write + # contents: read + # steps: + # - name: "Get the artefacts" + # uses: actions/download-artifact@v5 + # with: + # path: . + # name: libs-host-${{ inputs.version }} + # - run: | + # ls -la + # find . -name ".version" + # - run: | + # dotnet nuget add source \ + # --username nhs-notify-supplier-api \ + # --password ${{ secrets.GITHUB_TOKEN }} \ + # --store-password-in-clear-text \ + # --name github \ + # "https://nuget.pkg.github.com/NHSDigital/index.json" + # - run: | + # echo "ROOT .version file is: $(cat .version)" + # echo "GH variable version is: ${{ inputs.version }}" + # name: Showing the base versions + + # - run: | + # VERSION=${{ inputs.version }} + # SHORT_VERSION="$(echo $VERSION | rev | cut -d"." -f2- | rev)" + # NUGET_VERSION="$(echo "$VERSION" | tr + .)" + # echo $VERSION + # echo $SHORT_VERSION + # echo $NUGET_VERSION + # SHORT_NUGET_VERSION="$(echo $NUGET_VERSION | rev | cut -d"." -f2- | rev)" + # echo $SHORT_NUGET_VERSION + # SHORTER_NUGET_VERSION="$(echo $SHORT_NUGET_VERSION | rev | cut -d"." -f2- | rev)" + # echo $SHORTER_NUGET_VERSION + # TEST_NUGET_VERSION="$(echo $NUGET_VERSION | sed -E 's/.([^.]*)$/\1/')" + # TEST_NUGET_VERSION="$(echo $TEST_NUGET_VERSION | sed -E 's/.([^.]*)$/\1/')" + # echo $TEST_NUGET_VERSION + # echo "TEST_NUGET_VERSION=$TEST_NUGET_VERSION" >> "$GITHUB_OUTPUT" + # name: Set the nuget version + # id: set-nuget-version + + # - run: | + # dotnet nuget push \ + # nhs.notify.suppliers.api.host.${TEST_NUGET_VERSION}.nupkg \ + # --source github \ + # --api-key $GITHUB_TOKEN + # env: + # TEST_NUGET_VERSION: ${{ steps.set-nuget-version.outputs.TEST_NUGET_VERSION }} + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + # ### PUBLISH LIBS host docker + # publishlibhostdocker: + # name: "Publish libs host docker" + # runs-on: ubuntu-latest + # needs: [publish] + # permissions: + # packages: write + # contents: read + # steps: + # - name: "Get the artefacts" + # uses: actions/download-artifact@v5 + # with: + # path: . + # name: libs-host-docker-${{ inputs.version }} + + # - run: | + # ls -Rla + # docker load --input myimage.tar + # docker image ls -a + # echo $CR_PAT | docker login ghcr.io -u nhs-notify-supplier-api --password-stdin + # docker push ghcr.io/nhsdigital/libshostdocker:latest + # env: + # CR_PAT: ${{ secrets.GITHUB_TOKEN }} diff --git a/Makefile b/Makefile index 3756ab54..7f5186ec 100644 --- a/Makefile +++ b/Makefile @@ -11,11 +11,11 @@ dependencies: # Install dependencies needed to build and test the project @Pipel # TODO: Implement installation of your project dependencies build: # Build the project artefact @Pipeline -# Take out for now - might add again in the future -# (cd server && make build) (cd sdk && make build) (cd docs && make build) - (cd src/server && make build) +# Take out for now - might add again in the future +# (cd server && make build) +# (cd src/server && make build) publish: # Publish the project artefact @Pipeline # TODO: Implement the artefact publishing step @@ -25,8 +25,9 @@ deploy: # Deploy the project artefact to the target environment @Pipeline clean:: # Clean-up project resources (main) @Operations rm -f .version (cd sdk && make clean) - (cd server && make clean) - (cd src/server && make clean) +# Take out for now - might add again in the future +# (cd server && make clean) +# (cd src/server && make clean) guard-%: @ if [ "${${*}}" = "" ]; then \ diff --git a/README.md b/README.md index 0de12423..77a17137 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,6 @@ This repository documents the Supplier API specification and provides an SDK wit - [Setup](#setup) - [Prerequisites and Configuration](#prerequisites-and-configuration) - [SDKs](#sdks) - - [Libs](#libs) - [Build](#build) - [GitHub Actions CI/CD](#github-actions-cicd) - [CI (Automatic)](#ci-automatic) @@ -73,7 +72,6 @@ New developer of the NHS Notify Supplier API should understand the below. ### Pre built servers -- "Working" C# server [/src/server/host](/src/server/host) `docker run -p 8080:8080 ghcr.io/nhsdigital/libshostdocker:latest` - OAS preview at [http://localhost:8080/swagger/index.html](http://localhost:8080/swagger/index.html) ### Setup @@ -92,11 +90,6 @@ New developer of the NHS Notify Supplier API should understand the below. and will be built as part of the CI/CD pipeline and released as a GitHub release. -##### Libs - -- [/src/server](/src/server) has various separate libraries that are used by: - - [/src/server/host](/src/server/host) custom loads libs for different parts of the server - ### Build To generate the SDK folder from changes to the [specification/api/notify-supplier.yml](specification/api/notify-supplier.yml) OAS specification: From 18c78759ce805209a7605f190c79c39c8820e173 Mon Sep 17 00:00:00 2001 From: Francisco Videira Date: Fri, 31 Oct 2025 10:33:04 +0000 Subject: [PATCH 7/7] minor fixes --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 77a17137..38df7c65 100644 --- a/README.md +++ b/README.md @@ -25,11 +25,11 @@ This repository documents the Supplier API specification and provides an SDK wit - [SDK Assets](#sdk-assets) - [Examples](#examples) - [API Developers](#api-developers) - - [Pre built servers](#pre-built-servers) - [Setup](#setup) - [Prerequisites and Configuration](#prerequisites-and-configuration) - [SDKs](#sdks) - [Build](#build) + - [Documentation](#documentation-1) - [GitHub Actions CI/CD](#github-actions-cicd) - [CI (Automatic)](#ci-automatic) - [CD (Manual)](#cd-manual) @@ -68,11 +68,7 @@ TODO:CCM-11209 Links to example clients. ## API Developers -New developer of the NHS Notify Supplier API should understand the below. - -### Pre built servers - -- OAS preview at [http://localhost:8080/swagger/index.html](http://localhost:8080/swagger/index.html) +New developers of the NHS Notify Supplier API should understand the below. ### Setup @@ -115,6 +111,10 @@ by default they will be available at [http://localhost:3050](http://localhost:30 These are generated using [https://hub.docker.com/r/openapitools/openapi-generator-cli](https://hub.docker.com/r/openapitools/openapi-generator-cli) +### Documentation + +- You can preview the OAS locally by running `make serve-oas` + ### GitHub Actions CI/CD #### CI (Automatic)