Skip to content

Commit 2c41169

Browse files
authored
Merge pull request #300 from NHSDigital/bugfix/eja-ensure-ascendiing-example-sortng
bugfix - ensuring prism pattern matching
2 parents c17b5b8 + e0e0d99 commit 2c41169

4 files changed

Lines changed: 6 additions & 3 deletions

File tree

sandbox/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ This will stop the sandbox environment.
2828
There are a number of examples of responses which can be returned by passing specific NHS Numbers in the patient query parameter:
2929

3030
```bash
31-
curl -X GET "http://0.0.0.0:9000/patient-check/<NHS_NUMBER>
31+
curl -X GET "http://0.0.0.0:9000/patient-check/50000000101" -H "apikey:1"
3232
```
3333

3434
or for sandbox:

sandbox/app.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,8 @@ def get_prism_prompt_for_example(patient_examples: dict, request: Request) -> st
152152
Given the whole request, return the `Prefer:` header value if a specific
153153
example is desired. Otherwise, return `None`.
154154
"""
155-
for patient_id, example in patient_examples.items():
155+
sorted_examples = sorted(patient_examples.items(), key=lambda x: len(x[0]), reverse=True)
156+
for patient_id, example in sorted_examples:
156157
if patient_id in request.full_path:
157158
return example
158159
return None

scripts/config/vale/styles/config/vocabularies/words/accept.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ Dependabot
88
Gitleaks
99
Grype
1010
idempotence
11+
lxml
12+
Makefile
1113
npm
1214
OAuth
1315
Octokit

specification/proxygen-cli/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ to deploy our OAS specification to different environments, deploy a sandbox back
77

88
### Install Proxygen-CLI
99

10-
The `proxygen-cli` package currently requires Python v3.9 or greater, but not v3.13.
10+
The `proxygen-cli` package currently requires Python v3.9 or greater. Note: While `proxygen-cli` v2.x technically supports Python 3.13, its dependency constraints still require lxml <5.0, which is incompatible with Python 3.13. For Python 3.13 users, install `proxygen-cli` in a separate virtual environment using Python 3.11 or 3.12 until this is resolved upstream.
1111

1212
```bash
1313
pyenv install 3.11.1

0 commit comments

Comments
 (0)