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
4 changes: 4 additions & 0 deletions .github/instructions/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ The container must be running in order to successfully run any of the test suite

The schema for this API can be found in `gateway-api/openapi.yaml`.

## Code reviews

When reviewing code, ensure you compare the changes made to files to all README.md containing directory structures, and update the directory structures accordingly.

## Docstrings and comments

- Use precise variable and function names to reduce the need for comments
Expand Down
220 changes: 149 additions & 71 deletions README.md

Large diffs are not rendered by default.

26 changes: 23 additions & 3 deletions bruno/README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,38 @@
# Bruno

## Bruno/ Structure

```text
bruno/
├── README.md
└── gateway-api/
├── workspace.yml # Bruno workspace configuration
└── collections/
├── Steel_Thread/ # Steel Thread request collection
│ ├── bruno.json # Bruno collection metadata
│ ├── collection.bru # Collection-level headers, auth config
│ ├── .env.template # Template for required env vars (see below)
│ ├── Access_Structured_Record.bru # Request: POST $gpc.getstructuredrecord
│ └── environments/ # Per-target environment configs
│ ├── local.bru # Points at local container
│ └── PR_Proxy.bru # Points at Apigee PR proxy
```

> **Note:** `.env` files are git-ignored and must be created locally from the `.env.template`.

## `gateway-api` Workspace

### Steel Thread Collection

#### Environment Setup

The collection pulls in secrets from a `.env` file from the top level of the collection, `bruno/gateway-api/preview-env`. To reference these variables within the collection you use `{{process.env.<key>}}`, where `<key>` is the environment variable name in `.env`.
The collection pulls in secrets from a `.env` file at the top level of the collection (`bruno/gateway-api/collections/Steel_Thread/.env`). To reference these variables within the collection you use `{{process.env.<key>}}`, where `<key>` is the environment variable name in `.env`.

There is a template `.env` file, `bruno/gateway-api/collections/preview-env/.env.template`, to fill in as described below.
There is a template `.env` file, `bruno/gateway-api/collections/Steel_Thread/.env.template`, to fill in as described below.

##### Test application

The proxy for Gateway API is hosted in Apigee. In order to call an Apigee proxy, a consumer of the API needs an Apigee application. As such, we need an Apigee application through which we can test our API. A static test application has been created for this purpose. You can view its details by going through In order to view its details, go to [the Clinical Data Sharing APIs applications](https://dos-internal.ptl.api.platform.nhs.uk/). when making a call to the API through the proxy, the test applications API key and secret are fed in to the OAuth 2.0 journey as the `CLIENT_KEY` and `CLIENT_SECRET` respectively. As such, you will need a `bruno/gateway-api/preview-preview-env/.env` file containing
The proxy for Gateway API is hosted in Apigee. To call this proxy, you need an Apigee application. A static test application has been created for this purpose. You can view its details in [the Clinical Data Sharing APIs applications](https://dos-internal.ptl.api.platform.nhs.uk/). When making a call to the API through the proxy, the test application's API key and secret are fed into the OAuth 2.0 journey as the `CLIENT_KEY` and `CLIENT_SECRET` respectively. As such, you will need a `bruno/gateway-api/collections/Steel_Thread/.env` file containing

```plaintext
CLIENT_ID=<test application's api key>
Expand Down

This file was deleted.

149 changes: 0 additions & 149 deletions docs/adr/ADR-002_Scan_repository_for_hardcoded_secrets.md

This file was deleted.

Loading
Loading