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
14 changes: 7 additions & 7 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**

- OS: [e.g. iOS]
- Browser: [e.g. chrome, safari]
- Version: [e.g. 22]
- OS: [e.g. iOS]
- Browser: [e.g. chrome, safari]
- Version: [e.g. 22]

**Smartphone (please complete the following information):**

- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser: [e.g. stock browser, safari]
- Version: [e.g. 22]
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser: [e.g. stock browser, safari]
- Version: [e.g. 22]

**Additional context**
Add any other context about the problem here.
6 changes: 3 additions & 3 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ Stages to complete before opening the Pull Request:

:information_source: This section is to be filled in by the **reviewer**.

- [ ] I have reviewed the changes in this PR and they fill all or part of the acceptance criteria of the ticket, and the code is in a mergeable state.
- [ ] If there were infrastructure, operational, or build changes, I have made sure there is sufficient evidence that the changes will work.
- [ ] I have ensured the changelog has been updated by the submitter, if necessary.
- [ ] I have reviewed the changes in this PR and they fill all or part of the acceptance criteria of the ticket, and the code is in a mergeable state.
- [ ] If there were infrastructure, operational, or build changes, I have made sure there is sufficient evidence that the changes will work.
- [ ] I have ensured the changelog has been updated by the submitter, if necessary.

## Post-merge

Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/prettier-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Prettier Checks
on:
pull_request:
branches: [master]
permissions:
contents: read
jobs:
PrettierChecks:
name: Prettier Checks
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22

- name: Install dependencies
shell: bash
run: npm install

- name: Run Prettier
shell: bash
run: npx prettier --check .
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*.yaml
*.yml
postman/*
*.js
5 changes: 1 addition & 4 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
{
"recommendations": [
"mermade.openapi-lint",
"42Crunch.vscode-openapi"
]
"recommendations": ["mermade.openapi-lint", "42Crunch.vscode-openapi"]
}
26 changes: 13 additions & 13 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,22 @@ appearance, race, religion, or sexual identity and orientation.
Examples of behaviour that contributes to creating a positive environment
include:

- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behaviour by participants include:

- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting
- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Expand Down
26 changes: 13 additions & 13 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
> [!WARNING]
> Some of the documentation and links in this file are specific to the maintainers of this repository and are only available to NHS England staff.

- [Contribution Guidelines](#contribution-guidelines)
- [Raising an Issue](#raising-an-issue)
- [Contributing code](#contributing-code)
- [Merge responsibility](#merge-responsibility)
- [Branch naming](#branch-naming)
- [Developers within the NHS](#developers-within-the-nhs)
- [Developers outside of the NHS](#developers-outside-of-the-nhs)
- [Commit messages](#commit-messages)
- [Developers within the NHS](#developers-within-the-nhs-1)
- [Developers outside of the NHS](#developers-outside-of-the-nhs-1)
- [Contribution Guidelines](#contribution-guidelines)
- [Raising an Issue](#raising-an-issue)
- [Contributing code](#contributing-code)
- [Merge responsibility](#merge-responsibility)
- [Branch naming](#branch-naming)
- [Developers within the NHS](#developers-within-the-nhs)
- [Developers outside of the NHS](#developers-outside-of-the-nhs)
- [Commit messages](#commit-messages)
- [Developers within the NHS](#developers-within-the-nhs-1)
- [Developers outside of the NHS](#developers-outside-of-the-nhs-1)

## Raising an Issue

Expand All @@ -29,9 +29,9 @@ so please explain why the changes need to be made (unless it is self-evident).

### Merge responsibility

- It is the responsibility of the reviewer to merge branches they have approved.
- It is the responsibility of the author of the merge to ensure their merge is in a mergeable state.
- It is the responsibility of the maintainers to ensure the merge process is unambiguous and automated where possible.
- It is the responsibility of the reviewer to merge branches they have approved.
- It is the responsibility of the author of the merge to ensure their merge is in a mergeable state.
- It is the responsibility of the maintainers to ensure the merge process is unambiguous and automated where possible.

### Branch naming

Expand Down
76 changes: 38 additions & 38 deletions DEVELOPMENT_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,27 @@ This documentation is intended for developers to develop the schema, sandbox and

## Table of Contents

- [Development Guide](#development-guide)
- [Table of Contents](#table-of-contents)
- [Development](#development)
- [Requirements](#requirements)
- [Make commands](#make-commands)
- [Testing](#testing)
- [Platform setup](#platform-setup)
- [Detailed folder walk through](#detailed-folder-walk-through)
- [`/.github`:](#github)
- [`/azure`:](#azure)
- [`/proxies`:](#proxies)
- [`/scripts`:](#scripts)
- [`/specification`:](#specification)
- [`/tests`:](#tests)
- [`Makefile`:](#makefile)
- [`ecs-proxies-containers.yml ` and `ecs-proxies-deploy.yml`:](#ecs-proxies-containersyml--and-ecs-proxies-deployyml)
- [`manifest_template.yml`:](#manifest_templateyml)
- [Releasing a new schema version](#releasing-a-new-schema-version)
- [Caveats](#caveats)
- [Swagger UI](#swagger-ui)
- [Apigee Portal](#apigee-portal)
- [Development Guide](#development-guide)
- [Table of Contents](#table-of-contents)
- [Development](#development)
- [Requirements](#requirements)
- [Make commands](#make-commands)
- [Testing](#testing)
- [Platform setup](#platform-setup)
- [Detailed folder walk through](#detailed-folder-walk-through)
- [`/.github`:](#github)
- [`/azure`:](#azure)
- [`/proxies`:](#proxies)
- [`/scripts`:](#scripts)
- [`/specification`:](#specification)
- [`/tests`:](#tests)
- [`Makefile`:](#makefile)
- [`ecs-proxies-containers.yml ` and `ecs-proxies-deploy.yml`:](#ecs-proxies-containersyml--and-ecs-proxies-deployyml)
- [`manifest_template.yml`:](#manifest_templateyml)
- [Releasing a new schema version](#releasing-a-new-schema-version)
- [Caveats](#caveats)
- [Swagger UI](#swagger-ui)
- [Apigee Portal](#apigee-portal)

## Development

Expand All @@ -36,22 +36,22 @@ This documentation is intended for developers to develop the schema, sandbox and

### Requirements

- GNU make
- nodejs 22+
- npm 10.8+
- Python 3.8 +
- [poetry](https://github.com/python-poetry/poetry) 1.8+
- Java 8+
- GNU make
- nodejs 22+
- npm 10.8+
- Python 3.8 +
- [poetry](https://github.com/python-poetry/poetry) 1.8+
- Java 8+

### Make commands

To run the below make targets you will first need to run `make install-node`

There are `make` commands that alias scripts in the `package.json`

- `lint` -- Lints the spec and code
- `publish` -- Outputs the specification as a **single file** into the `build/` directory
- `serve` -- Serves a preview of the specification in human-readable format
- `lint` -- Lints the spec and code
- `publish` -- Outputs the specification as a **single file** into the `build/` directory
- `serve` -- Serves a preview of the specification in human-readable format

### Testing

Expand All @@ -77,19 +77,19 @@ For further information about Apigee and APIM see [API Producer Zone confluence]

`/.github/workflows`: This folder contains GitHub workflows, these workflow are mainly used to check pull requests and publish releases.

- `pr-lint.yaml`: This workflow links Pull Request's to Jira tickets and runs when a pull request is opened/updated.
- `continuous-integration.yml`: This workflow publishes a Github release when pushing to master.
- `sandbox-checks.yaml`: This workflow checks the sandbox meets the formatting and linting rules (Black + Flake8). Also it runs the sandbox unit tests (Pytest)
- `dependency-review.yml`: This workflow checks for any vulnerabilities in dependencies to be added to the project.
- `codeql-analysis.yml`: This workflow checks for any code vulnerabilities in the project.
- `pr-lint.yaml`: This workflow links Pull Request's to Jira tickets and runs when a pull request is opened/updated.
- `continuous-integration.yml`: This workflow publishes a Github release when pushing to master.
- `sandbox-checks.yaml`: This workflow checks the sandbox meets the formatting and linting rules (Black + Flake8). Also it runs the sandbox unit tests (Pytest)
- `dependency-review.yml`: This workflow checks for any vulnerabilities in dependencies to be added to the project.
- `codeql-analysis.yml`: This workflow checks for any code vulnerabilities in the project.

#### `/azure`:

Contains Azure Devops pipelines for building and deploying to Apigee:

- `azure-build-pipeline.yml`: Assembles the contents of your repository into a single file ("artifact") on Azure Devops and pushes any containers to our Docker registry. This pipeline is enabled for all branches.
- `azure-pr-pipeline.yml`: Deploys ephemeral versions of your proxy/spec to Apigee (and docker containers on AWS) to internal environments. This will deploy a internal-dev environment and internal-dev-sandbox for each pull request.
- `azure-release-pipeline.yml`: Deploys the long-lived version of your pipeline to internal and external environments, when you merge to master.
- `azure-build-pipeline.yml`: Assembles the contents of your repository into a single file ("artifact") on Azure Devops and pushes any containers to our Docker registry. This pipeline is enabled for all branches.
- `azure-pr-pipeline.yml`: Deploys ephemeral versions of your proxy/spec to Apigee (and docker containers on AWS) to internal environments. This will deploy a internal-dev environment and internal-dev-sandbox for each pull request.
- `azure-release-pipeline.yml`: Deploys the long-lived version of your pipeline to internal and external environments, when you merge to master.

`/azure/templates`: Here you can define reusable actions, such as running tests, and call these actions during Azure Devops pipelines.

Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ This repository does _not_ include the Validated Relationship Service FHIR API b

## Table of Contents

- [Validated Relationship Service API](#validated-relationship-service-api)
- [Table of Contents](#table-of-contents)
- [Repository Structure](#repository-structure)
- [Contributing](#contributing)
- [Development \& Testing](#development--testing)
- [Licensing](#licensing)
- [Validated Relationship Service API](#validated-relationship-service-api)
- [Table of Contents](#table-of-contents)
- [Repository Structure](#repository-structure)
- [Contributing](#contributing)
- [Development \& Testing](#development--testing)
- [Licensing](#licensing)

## Repository Structure

This repository includes:

- [specification/validated-relationships-service-api.yaml](./specification/validated-relationships-service-api.yaml) - The [Open API Specification](https://swagger.io/docs/specification/about/) describes the endpoints, methods and messages exchanged by the API. Used to generate interactive documentation for the NHS API Catalogue; the contract between the API and its consumers.
- `sandbox/` - A flask (Python) API that implements a mock implementation of the service. It's to be used as interactive documentation to illustrate interactions and concepts. It is not intended to provide an exhaustive/faithful environment suitable for full development and testing.
- `scripts/` - Utilities helpful to developers for the development and release of the specification.
- `proxies/` - Live and sandbox Apigee API Proxy definitions.
- [specification/validated-relationships-service-api.yaml](./specification/validated-relationships-service-api.yaml) - The [Open API Specification](https://swagger.io/docs/specification/about/) describes the endpoints, methods and messages exchanged by the API. Used to generate interactive documentation for the NHS API Catalogue; the contract between the API and its consumers.
- `sandbox/` - A flask (Python) API that implements a mock implementation of the service. It's to be used as interactive documentation to illustrate interactions and concepts. It is not intended to provide an exhaustive/faithful environment suitable for full development and testing.
- `scripts/` - Utilities helpful to developers for the development and release of the specification.
- `proxies/` - Live and sandbox Apigee API Proxy definitions.

## Contributing

Expand Down
4 changes: 2 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ reproduce it.

You can reach us at:

- cybersecurity@nhs.net
- api.management@nhs.net
- cybersecurity@nhs.net
- api.management@nhs.net

### HackerOne

Expand Down
28 changes: 14 additions & 14 deletions sandbox/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ For more information about building sandbox APIs see the [API Producer Zone conf
## Table of Contents

- [Sandbox](#sandbox)
- [Table of Contents](#table-of-contents)
- [Architecture](#architecture)
- [Prerequisites](#prerequisites)
- [Quick Start](#quick-start)
- [Installing dependencies](#installing-dependencies)
- [Starting the API](#starting-the-api)
- [Development](#development)
- [Starting the API with Hot Reloading](#starting-the-api-with-hot-reloading)
- [Testing](#testing)
- [Unit Tests](#unit-tests)
- [Useful commands](#useful-commands)
- [Table of Contents](#table-of-contents)
- [Architecture](#architecture)
- [Prerequisites](#prerequisites)
- [Quick Start](#quick-start)
- [Installing dependencies](#installing-dependencies)
- [Starting the API](#starting-the-api)
- [Development](#development)
- [Starting the API with Hot Reloading](#starting-the-api-with-hot-reloading)
- [Testing](#testing)
- [Unit Tests](#unit-tests)
- [Useful commands](#useful-commands)

## Architecture

Expand All @@ -31,9 +31,9 @@ The [Postman Collection](./postman/Validate_Relationship_Service_Sandbox.postman

## Prerequisites

- Python 3.8
- [Poetry](https://python-poetry.org/docs/)
- [Docker](https://docs.docker.com/get-docker/)
- Python 3.8
- [Poetry](https://python-poetry.org/docs/)
- [Docker](https://docs.docker.com/get-docker/)

## Quick Start

Expand Down