Skip to content

Commit cfd9867

Browse files
authored
SYN-735: Update spec to include 'modules' in Medicines API (#89)
* Added webpage to example JSON * Added missing “webpage” properties in sandbox example JSON responses * Added ‘modules’ param to medicines spec
1 parent 39bc219 commit cfd9867

4 files changed

Lines changed: 23 additions & 4 deletions

File tree

sandbox/responses/conditions-acne-modules-true.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
{
2-
"about": { "name": "Acne", "url": "https://api.service.nhs.uk/nhs-website-content/conditions/acne/" },
2+
"about": {
3+
"name": "Acne",
4+
"url": "https://api.service.nhs.uk/nhs-website-content/conditions/acne/",
5+
"webpage": "https://www.nhs.uk/conditions/acne/"
6+
},
37
"modules": [
48
{
59
"@type": "HealthTopicContent",

sandbox/responses/medicines-acrivastine-modules-true.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
{
2-
"about": { "name": "Acrivastine", "url": "https://api.service.nhs.uk/nhs-website-content/medicines/acrivastine/" },
2+
"about": {
3+
"name": "Acrivastine",
4+
"url": "https://api.service.nhs.uk/nhs-website-content/medicines/acrivastine/",
5+
"webpage": "https://www.nhs.uk/medicines/acrivastine/"
6+
},
37
"modules": [
48
{
59
"@type": "HealthTopicContent",

specification/components/examples/CommonHealthQuestionsContentPage.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,5 +258,6 @@
258258
"linkRelationship": "Navigation",
259259
"position": 2
260260
}
261-
]
261+
],
262+
"webpage": "https://www.nhs.uk/common-health-questions/dental-health/why-should-i-use-dental-floss/"
262263
}

specification/nhs-website-content-api.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,14 +391,24 @@ paths:
391391
/medicines/*:
392392
parameters:
393393
- $ref: "#/components/parameters/apikey"
394+
- $ref: "#/components/parameters/modules"
394395
get:
395396
summary: Get specific medicine page
396397
operationId: get-medicine-page
397398
description: |
398399
## Overview
399-
There is an endpoint for each page under the Medicines A to Z, for example https://www.nhs.uk/medicines/amoxicillin.
400+
There is an endpoint for each page under the Medicines A to Z, for example https://www.nhs.uk/medicines/acrivastine.
400401
401402
This can be used to get specific information about individual medicines.
403+
404+
There is only one query parameter for these pages:
405+
406+
| Query parameter | Description | Type |
407+
| ----------------- | ---------------------------------------------------------------------- | ----------- |
408+
| modules | If topic is modularised, only return these modules | boolean |
409+
410+
# Modularisation
411+
We modularise some of our content, meaning that individual parts of the page can be reused. If a page is modularised, content appears in the `hasPart` field.
402412
responses:
403413
"200":
404414
description: |

0 commit comments

Comments
 (0)