Skip to content

Commit 5afc229

Browse files
Robu6/api overview (#46)
* changes * remove sdk * changes * changes * sdk * sdk * sdk * sdk * sdk * sdk * sdk * sdk * sdk * sdk * sdk ipv4 leak ex
1 parent 245a4cd commit 5afc229

File tree

97 files changed

+7578
-1380
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+7578
-1380
lines changed

.devcontainer/devcontainer.json

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,37 @@
5959
}
6060
}
6161
},
62-
"forwardPorts": [
63-
4000
62+
"features": {
63+
"ghcr.io/azutake/devcontainer-features/go-packages-install:0": {
64+
"PACKAGES": "github.com/asdf-vm/asdf/cmd/[email protected]"
65+
},
66+
"ghcr.io/devcontainers-extra/features/zsh-plugins:0": {
67+
"omzPlugins": "https://github.com/zsh-users/zsh-autosuggestions.git https://github.com/zsh-users/zsh-syntax-highlighting.git",
68+
"plugins": "zsh-autosuggestions zsh-syntax-highlighting"
69+
},
70+
"ghcr.io/devcontainers/features/common-utils": {
71+
"configureZshAsDefaultShell": true,
72+
"installOhMyZsh": true,
73+
"installOhMyZshConfig": true,
74+
"installZsh": true
75+
},
76+
"ghcr.io/devcontainers/features/docker-in-docker:2": {
77+
"azureDnsAutoDetection": true,
78+
"dockerDashComposeVersion": "v2",
79+
"installDockerBuildx": true,
80+
"installDockerComposeSwitch": true,
81+
"moby": true,
82+
"version": "latest"
83+
},
84+
"ghcr.io/devcontainers/features/go:1": {},
85+
"ghcr.io/devcontainers/features/node:1": {},
86+
"ghcr.io/devcontainers/features/python:1": {},
87+
"ghcr.io/devcontainers/features/ruby:1": {}
88+
},
89+
"image": "mcr.microsoft.com/devcontainers/base:noble",
90+
"mounts": [
91+
"source=${localEnv:HOME}/.gnupg,target=/home/vscode/.gnupg,type=bind,consistency=cached"
6492
],
65-
"image": "ghcr.io/nhsdigital/nhs-notify-template-repository:latest",
66-
"name": "Jekyll",
67-
"runArgs": [
68-
"--platform=linux/amd64"
69-
]
93+
"name": "Ubuntu",
94+
"postCreateCommand": "pipx install pre-commit && make config && echo 'export GPG_TTY=$TTY' | cat - ~/.zshrc > temp && mv temp ~/.zshrc"
7095
}
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
{
2+
"customizations": {
3+
"codespaces": {
4+
"openFiles": [
5+
"README.md",
6+
".github/SECURITY.md",
7+
"docs/index.md"
8+
]
9+
},
10+
"vscode": {
11+
"extensions": [
12+
"alefragnani.bookmarks",
13+
"AmazonWebServices.aws-toolkit-vscode",
14+
"chdsbd.github-code-owners",
15+
"davidanson.vscode-markdownlint",
16+
"dbaeumer.vscode-eslint",
17+
"donjayamanne.githistory",
18+
"editorconfig.editorconfig",
19+
"esbenp.prettier-vscode",
20+
"fvclaus.sort-json-array",
21+
"github.codespaces",
22+
"github.github-vscode-theme",
23+
"github.remotehub",
24+
"github.vscode-github-actions",
25+
"github.vscode-pull-request-github",
26+
"hediet.vscode-drawio",
27+
"johnpapa.vscode-peacock",
28+
"joshx.workspace-terminals",
29+
"maattdd.gitless",
30+
"mhutchie.git-graph",
31+
"ms-azuretools.vscode-docker",
32+
"ms-vscode-remote.remote-containers",
33+
"ms-vscode-remote.remote-wsl",
34+
"ms-vscode.hexeditor",
35+
"ms-vscode.live-server",
36+
"ms-vsliveshare.vsliveshare",
37+
"redhat.vscode-xml",
38+
"streetsidesoftware.code-spell-checker-british-english",
39+
"takumii.markdowntable",
40+
"tamasfe.even-better-toml",
41+
"tomoki1207.pdf",
42+
"vscode-icons-team.vscode-icons",
43+
"vstirbu.vscode-mermaid-preview",
44+
"wayou.vscode-todo-highlight",
45+
"yzane.markdown-pdf",
46+
"yzhang.dictionary-completion",
47+
"yzhang.markdown-all-in-one",
48+
"zoma.vscode-auto-open-workspace"
49+
],
50+
"settings": {
51+
"[makefile]": {
52+
"editor.detectIndentation": false,
53+
"editor.insertSpaces": false
54+
},
55+
"autoOpenWorkspace.enableAutoOpenIfSingleWorkspace": true,
56+
"editor.formatOnSave": true,
57+
"extensions.ignoreRecommendations": true,
58+
"files.insertFinalNewline": true
59+
}
60+
}
61+
},
62+
"features": {
63+
"ghcr.io/azutake/devcontainer-features/go-packages-install:0": {
64+
"PACKAGES": "github.com/asdf-vm/asdf/cmd/[email protected]"
65+
},
66+
"ghcr.io/devcontainers-extra/features/zsh-plugins:0": {
67+
"omzPlugins": "https://github.com/zsh-users/zsh-autosuggestions.git https://github.com/zsh-users/zsh-syntax-highlighting.git",
68+
"plugins": "zsh-autosuggestions zsh-syntax-highlighting"
69+
},
70+
"ghcr.io/devcontainers/features/common-utils": {
71+
"configureZshAsDefaultShell": true,
72+
"installOhMyZsh": true,
73+
"installOhMyZshConfig": true,
74+
"installZsh": true
75+
},
76+
"ghcr.io/devcontainers/features/docker-in-docker:2": {
77+
"azureDnsAutoDetection": true,
78+
"dockerDashComposeVersion": "v2",
79+
"installDockerBuildx": true,
80+
"installDockerComposeSwitch": true,
81+
"moby": true,
82+
"version": "latest"
83+
},
84+
"ghcr.io/devcontainers/features/go:1": {},
85+
"ghcr.io/devcontainers/features/node:1": {},
86+
"ghcr.io/devcontainers/features/python:1": {}
87+
},
88+
"image": "mcr.microsoft.com/devcontainers/base:noble",
89+
"mounts": [
90+
"source=${localEnv:HOME}/.gnupg,target=/home/vscode/.gnupg,type=bind,consistency=cached"
91+
],
92+
"name": "Ubuntu",
93+
"postCreateCommand": "pipx install pre-commit && make config && echo 'export GPG_TTY=$TTY' | cat - ~/.zshrc > temp && mv temp ~/.zshrc"
94+
}

.editorconfig

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,31 @@ trim_trailing_whitespace = unset
2929
indent_style = unset
3030
indent_size = unset
3131
generated_code = true
32+
33+
[package-lock.json]
34+
charset = unset
35+
end_of_line = unset
36+
insert_final_newline = unset
37+
trim_trailing_whitespace = unset
38+
indent_style = unset
39+
indent_size = unset
40+
generated_code = true
41+
42+
[package.json]
43+
charset = unset
44+
end_of_line = unset
45+
insert_final_newline = unset
46+
trim_trailing_whitespace = unset
47+
indent_style = unset
48+
indent_size = unset
49+
generated_code = true
50+
51+
[*/sdk/**]
52+
generated_code = true
53+
charset = unset
54+
end_of_line = unset
55+
insert_final_newline = unset
56+
trim_trailing_whitespace = unset
57+
indent_style = unset
58+
indent_size = unset
59+
generated_code = true

.editorconfig-checker.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"AllowedContentTypes": [],
3+
"Debug": false,
4+
"Disable": {
5+
"EndOfLine": false,
6+
"IndentSize": false,
7+
"Indentation": false,
8+
"InsertFinalNewline": false,
9+
"MaxLineLength": false,
10+
"TrimTrailingWhitespace": false
11+
},
12+
"Exclude": [
13+
"sdk"
14+
],
15+
"IgnoreDefaults": false,
16+
"NoColor": false,
17+
"PassedFiles": [],
18+
"SpacesAfterTabs": false,
19+
"Verbose": false
20+
}

.gitleaksignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ cd9c0efec38c5d63053dd865e5d4e207c0760d91:docs/guides/Perform_static_analysis.md:
66
4f4e8c15629b2cb09356a7fed4d72953590227ce:docs/Gemfile.lock:ipv4:4
77
b1f85a7faf54eaf66074d7a6daa093aefe6b3ebe:sdk/python/test-requirements.txt:ipv4:5
88
b1f85a7faf54eaf66074d7a6daa093aefe6b3ebe:sdk/python/pyproject.toml:ipv4:25
9+
05e13eeb439bb25f02cb1c94694c8f4b4708722f:sdk/python/pyproject.toml:ipv4:31
10+
05e13eeb439bb25f02cb1c94694c8f4b4708722f:sdk/python/test-requirements.txt:ipv4:5
911

1012
# Example ECDA key in OAPI spec
1113
4118582e5009685c1ac31fc664371649602a8a0e:specification/api/notify-supplier.yml:generic-api-key:115

.markdownlintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
**/sdk/*

.tool-versions

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
act 0.2.64
2+
editorconfig-checker 3.3.0
23
gitleaks 8.24.0
34
jq 1.6
5+
markdownlint-cli2 0.18.1
46
nodejs 22.11.0
57
pnpm 10.4.1
68
pre-commit 3.6.0

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"**/.svn": true,
99
"**/CVS": true,
1010
"**/Thumbs.db": true,
11-
".devcontainer": true,
11+
//".devcontainer": true,
1212
".github": false,
1313
".vscode": false
1414
}

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ dependencies: # Install dependencies needed to build and test the project @Pipel
1111
# TODO: Implement installation of your project dependencies
1212

1313
build: # Build the project artefact @Pipeline
14+
npm run build
1415
(cd docs && make build)
1516

1617
publish: # Publish the project artefact @Pipeline
@@ -21,10 +22,13 @@ deploy: # Deploy the project artefact to the target environment @Pipeline
2122

2223
clean:: # Clean-up project resources (main) @Operations
2324
rm -f .version
25+
rm -rf sdk/*/
2426
# TODO: Implement project resources clean-up step
2527

2628
config:: _install-dependencies version # Configure development environment (main) @Configuration
27-
(cd docs && make install)
29+
npm install
30+
(cd docs && make install && cd ..)
31+
2832

2933
version:
3034
rm -f .version

README.md

Lines changed: 9 additions & 114 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,19 @@ It models the concepts needed to configure production of letters and other print
99

1010
This repository documents the Supplier API specification and provides an SDK with examples and reference client implementations for interacting with it.
1111

12+
## OAS Specifications
13+
14+
- [Current Version](specification/api/notify-supplier.yml)
15+
- [vNext](specification/api/notify-supplier-next.yml)
16+
1217
## Table of Contents
1318

1419
- [NHS Notify Supplier API](#nhs-notify-supplier-api)
20+
- [OAS Specifications](#oas-specifications)
1521
- [Table of Contents](#table-of-contents)
1622
- [Documentation](#documentation)
1723
- [Setup](#setup)
18-
- [Prerequisites](#prerequisites)
19-
- [Configuration](#configuration)
20-
- [Usage](#usage)
21-
- [Testing](#testing)
22-
- [Design](#design)
23-
- [Diagrams](#diagrams)
24-
- [Modularity](#modularity)
25-
- [Contributing](#contributing)
26-
- [Contacts](#contacts)
24+
- [Prerequisites and Configuration](#prerequisites-and-configuration)
2725
- [Licence](#licence)
2826

2927
## Documentation
@@ -33,112 +31,9 @@ This repository documents the Supplier API specification and provides an SDK wit
3331

3432
## Setup
3533

36-
> TODO
37-
38-
By including preferably a one-liner or if necessary a set of clear CLI instructions we improve user experience. This should be a frictionless installation process that works on various operating systems (macOS, Linux, Windows WSL) and handles all the dependencies.
39-
40-
Clone the repository
41-
42-
```shell
43-
git clone https://github.com/nhs-england-tools/repository-template.git
44-
cd nhs-england-tools/repository-template
45-
```
46-
47-
### Prerequisites
48-
49-
> TODO
50-
51-
The following software packages, or their equivalents, are expected to be installed and configured:
52-
53-
- [Docker](https://www.docker.com/) container runtime or a compatible tool, e.g. [Podman](https://podman.io/),
54-
- [asdf](https://asdf-vm.com/) version manager,
55-
- [GNU make](https://www.gnu.org/software/make/) 3.82 or later,
56-
57-
> [!NOTE]<br>
58-
> The version of GNU make available by default on macOS is earlier than 3.82. You will need to upgrade it or certain `make` tasks will fail. On macOS, you will need [Homebrew](https://brew.sh/) installed, then to install `make`, like so:
59-
>
60-
> ```shell
61-
> brew install make
62-
> ```
63-
>
64-
> You will then see instructions to fix your [`$PATH`](https://github.com/nhs-england-tools/dotfiles/blob/main/dot_path.tmpl) variable to make the newly installed version available. If you are using [dotfiles](https://github.com/nhs-england-tools/dotfiles), this is all done for you.
65-
66-
- [GNU sed](https://www.gnu.org/software/sed/) and [GNU grep](https://www.gnu.org/software/grep/) are required for the scripted command-line output processing,
67-
- [GNU coreutils](https://www.gnu.org/software/coreutils/) and [GNU binutils](https://www.gnu.org/software/binutils/) may be required to build dependencies like Python, which may need to be compiled during installation,
68-
69-
> [!NOTE]<br>
70-
> For macOS users, installation of the GNU toolchain has been scripted and automated as part of the `dotfiles` project. Please see this [script](https://github.com/nhs-england-tools/dotfiles/blob/main/assets/20-install-base-packages.macos.sh) for details.
71-
72-
- [Python](https://www.python.org/) required to run Git hooks,
73-
- [`jq`](https://jqlang.github.io/jq/) a lightweight and flexible command-line JSON processor.
74-
75-
### Configuration
76-
77-
> TODO
78-
79-
Installation and configuration of the toolchain dependencies
80-
81-
```shell
82-
make config
83-
```
84-
85-
## Usage
86-
87-
> TODO
88-
89-
After a successful installation, provide an informative example of how this project can be used. Additional code snippets, screenshots and demos work well in this space. You may also link to the other documentation resources, e.g. the [User Guide](./docs/user-guide.md) to demonstrate more use cases and to show more features.
90-
91-
### Testing
92-
93-
> TODO
94-
95-
There are `make` tasks for you to configure to run your tests. Run `make test` to see how they work. You should be able to use the same entry points for local development as in your CI pipeline.
96-
97-
## Design
98-
99-
### Diagrams
100-
101-
> TODO
102-
103-
The [C4 model](https://c4model.com/) is a simple and intuitive way to create software architecture diagrams that are clear, consistent, scalable and most importantly collaborative. This should result in documenting all the system interfaces, external dependencies and integration points.
104-
105-
![Repository Template](./docs/diagrams/Repository_Template_GitHub_Generic.png)
106-
107-
The source for diagrams should be in Git for change control and review purposes. Recommendations are [draw.io](https://app.diagrams.net/) (example above in [docs](.docs/diagrams/) folder) and [Mermaids](https://github.com/mermaid-js/mermaid). Here is an example Mermaids sequence diagram:
108-
109-
```mermaid
110-
sequenceDiagram
111-
User->>+Service: GET /users?params=...
112-
Service->>Service: auth request
113-
Service->>Database: get all users
114-
Database-->>Service: list of users
115-
Service->>Service: filter users
116-
Service-->>-User: list[User]
117-
```
118-
119-
### Modularity
120-
121-
> TODO
122-
123-
Most of the projects are built with customisability and extendability in mind. At a minimum, this can be achieved by implementing service level configuration options and settings. The intention of this section is to show how this can be used. If the system processes data, you could mention here for example how the input is prepared for testing - anonymised, synthetic or live data.
124-
125-
## Contributing
126-
127-
> TODO
128-
129-
Describe or link templates on how to raise an issue, feature request or make a contribution to the codebase. Reference the other documentation files, like
130-
131-
- Environment setup for contribution, i.e. `CONTRIBUTING.md`
132-
- Coding standards, branching, linting, practices for development and testing
133-
- Release process, versioning, changelog
134-
- Backlog, board, roadmap, ways of working
135-
- High-level requirements, guiding principles, decision records, etc.
136-
137-
## Contacts
138-
139-
> TODO
34+
### Prerequisites and Configuration
14035

141-
Provide a way to contact the owners of this project. It can be a team, an individual or information on the means of getting in touch via active communication channels, e.g. opening a GitHub discussion, raising an issue, etc.
36+
Utilised the devcontainer, for pre reqs and configuration.
14237

14338
## Licence
14439

0 commit comments

Comments
 (0)