Skip to content

Commit 1df6a33

Browse files
adrianparrigba1980
andauthored
Node.js Express Sandbox (#23)
* Updated package.lock file * WIP * Init basic routes * Added more responses * Added more responses * Added more responses and formatted JSON * Added more responses * Added two more * Checking for ‘subscription-key’ * Catching 404 errors * Added more responses * Added Acne with modules=true * Tidy up * WIP * Added more endpoints * More endpoints * Fixed query params * More endpoints * Added a markdown file with localhost links * Added comments for Apigee Int and Prod environments * Adding in the ‘sandbox’ environment --------- Co-authored-by: Igba ujege <iujege@gmail.com>
1 parent c9f29c4 commit 1df6a33

60 files changed

Lines changed: 23713 additions & 254 deletions

File tree

Some content is hidden

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

azure/azure-release-pipeline.yml

Lines changed: 59 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -4,69 +4,68 @@ trigger: none
44
pr: none
55

66
resources:
7-
repositories:
8-
- repository: common
9-
type: github
10-
name: NHSDigital/api-management-utils
11-
ref: refs/heads/edge
12-
endpoint: NHSDigital
13-
pipelines:
14-
- pipeline: build_pipeline
15-
source: "Nhs-Website-Content-Api-Build"
16-
trigger:
17-
branches:
18-
include:
19-
- refs/tags/v*
7+
repositories:
8+
- repository: common
9+
type: github
10+
name: NHSDigital/api-management-utils
11+
ref: refs/heads/edge
12+
endpoint: NHSDigital
13+
pipelines:
14+
- pipeline: build_pipeline
15+
source: "Nhs-Website-Content-Api-Build"
16+
trigger:
17+
branches:
18+
include:
19+
- refs/tags/v*
2020

2121
pool:
22-
name: 'AWS-ECS'
22+
name: "AWS-ECS"
2323

2424
variables:
25-
- template: project.yml
25+
- template: project.yml
2626

2727
extends:
28-
template: azure/common/apigee-deployment.yml@common
29-
parameters:
30-
service_name: ${{ variables.service_name }}
31-
short_service_name: ${{ variables.short_service_name }}
32-
service_base_path: ${{ variables.service_base_path }}
33-
jinja_templates:
34-
NHS_CONTENT_API_TARGET_SERVER: nhs-website-content-api
35-
apigee_deployments:
36-
- environment: internal-dev
37-
post_deploy:
38-
- template: ./templates/run-tests.yml
39-
parameters:
40-
full: true
41-
- environment: internal-qa
42-
post_deploy:
43-
- template: ./templates/run-tests.yml
44-
parameters:
45-
full: true
46-
- environment: internal-dev-sandbox
47-
proxy_path: sandbox
48-
post_deploy:
49-
- template: ./templates/run-tests.yml
50-
- environment: internal-qa-sandbox
51-
proxy_path: sandbox
52-
post_deploy:
53-
- template: ./templates/run-tests.yml
54-
- environment: int
55-
depends_on:
56-
- internal_qa
57-
- internal_qa_sandbox
58-
post_deploy:
59-
- template: ./templates/run-tests.yml
60-
parameters:
61-
full: false
62-
# - environment: ref
63-
# depends_on:
64-
# - internal_qa
65-
# - internal_qa_sandbox
66-
# post_deploy:
67-
# - template: ./templates/run-tests.yml
68-
# - environment: sandbox
69-
# proxy_path: sandbox
70-
# post_deploy:
71-
# - template: ./templates/run-tests.yml
72-
28+
template: azure/common/apigee-deployment.yml@common
29+
parameters:
30+
service_name: ${{ variables.service_name }}
31+
short_service_name: ${{ variables.short_service_name }}
32+
service_base_path: ${{ variables.service_base_path }}
33+
jinja_templates:
34+
NHS_CONTENT_API_TARGET_SERVER: nhs-website-content-api
35+
apigee_deployments:
36+
- environment: internal-dev
37+
post_deploy:
38+
- template: ./templates/run-tests.yml
39+
parameters:
40+
full: true
41+
- environment: internal-qa
42+
post_deploy:
43+
- template: ./templates/run-tests.yml
44+
parameters:
45+
full: true
46+
- environment: internal-dev-sandbox
47+
proxy_path: sandbox
48+
post_deploy:
49+
- template: ./templates/run-tests.yml
50+
- environment: internal-qa-sandbox
51+
proxy_path: sandbox
52+
post_deploy:
53+
- template: ./templates/run-tests.yml
54+
- environment: int
55+
depends_on:
56+
- internal_qa
57+
- internal_qa_sandbox
58+
post_deploy:
59+
- template: ./templates/run-tests.yml
60+
parameters:
61+
full: false
62+
- environment: sandbox
63+
proxy_path: sandbox
64+
post_deploy:
65+
- template: ./templates/run-tests.yml
66+
# - environment: ref
67+
# depends_on:
68+
# - internal_qa
69+
# - internal_qa_sandbox
70+
# post_deploy:
71+
# - template: ./templates/run-tests.yml

manifest_template.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ APIGEE_ENVIRONMENTS:
1919
portal_visibility: false
2020
- name: int
2121
display_name: Integration Testing
22+
- name: sandbox
23+
display_name: Sandbox
24+
portal_visibility: false
2225
# Enable environments when ready by uncommenting:
2326
# - name: internal-qa
2427
# display_name: Internal QA
2528
# has_mock_auth: true
2629
# portal_visibility: false
27-
# - name: sandbox
28-
# display_name: Sandbox
29-
# portal_visibility: false
3030
---
3131
meta:
3232
api:

sandbox/.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
12+
[*.md]
13+
trim_trailing_whitespace = false

sandbox/.prettierrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"arrowParens": "always",
3+
"printWidth": 130,
4+
"semi": false,
5+
"singleQuote": true
6+
}
Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
# NHS Website Content API - Sandbox endpoints
2+
3+
## API Root
4+
5+
[API Root - Without subscription-key](http://localhost:9000/)
6+
7+
[API Root - With example subscription-key](http://localhost:9000/?subscription-key=123456)
8+
9+
## Common Health Questions
10+
11+
[Common Health Questions Root - Without subscription-key](http://localhost:9000/common-health-questions/)
12+
13+
[Common Health Questions Root - With example subscription-key](http://localhost:9000/common-health-questions/?subscription-key=123456)
14+
15+
[Accidents, first aid and treatments](http://localhost:9000/common-health-questions/accidents-first-aid-and-treatments/?subscription-key=123456)
16+
17+
[Caring, carers and long-term conditions](http://localhost:9000/common-health-questions/caring-carers-and-long-term-conditions/?subscription-key=123456)
18+
19+
[Children's health - Can my baby go swimming before or after vaccinations?](http://localhost:9000/common-health-questions/childrens-health/can-my-baby-go-swimming-before-or-after-vaccinations/?subscription-key=123456)
20+
21+
## Conditions
22+
23+
[Conditions Root - Without subscription-key](http://localhost:9000/conditions/)
24+
25+
[Conditions Root - With example subscription-key](http://localhost:9000/conditions/?subscription-key=123456)
26+
27+
[Conditions Root - Category: A](http://localhost:9000/conditions/?subscription-key=123456&category=a)
28+
29+
[Conditions Root - Category: A & Genre: Condition](http://localhost:9000/conditions/?subscription-key=123456&category=a&genre=condition)
30+
31+
[Conditions Root - Category: A & Genre: Guide](http://localhost:9000/conditions/?subscription-key=123456&category=a&genre=guide)
32+
33+
[Conditions Root - Category: A & Genre: Hub](http://localhost:9000/conditions/?subscription-key=123456&category=a&genre=hub)
34+
35+
[Conditions Root - Category: B](http://localhost:9000/conditions/?subscription-key=123456&category=b)
36+
37+
[Conditions Root - Category: Z](http://localhost:9000/conditions/?subscription-key=123456&category=z)
38+
39+
[Conditions Root - Page: 1](http://localhost:9000/conditions/?subscription-key=123456&page=1)
40+
41+
[Conditions Root - Page: 2](http://localhost:9000/conditions/?subscription-key=123456&page=2)
42+
43+
[Conditions Root - Page: 70](http://localhost:9000/conditions/?subscription-key=123456&page=70)
44+
45+
[Acanthosis nigricans](http://localhost:9000/conditions/acanthosis-nigricans/?subscription-key=123456)
46+
47+
[Achalasia](http://localhost:9000/conditions/achalasia/?subscription-key=123456)
48+
49+
[Acne - Modules: false](http://localhost:9000/conditions/acne/?subscription-key=123456&modules=false)
50+
51+
[Acne - Modules: true](http://localhost:9000/conditions/acne/?subscription-key=123456&modules=true)
52+
53+
[Angiography](http://localhost:9000/conditions/angiography/?subscription-key=123456)
54+
55+
[Cancer](http://localhost:9000/conditions/cancer/?subscription-key=123456)
56+
57+
[Zika](http://localhost:9000/conditions/zika/?subscription-key=123456)
58+
59+
## Live Well
60+
61+
[Live Well Root - Without subscription-key](http://localhost:9000/live-well/)
62+
63+
[Live Well Root - With example subscription-key](http://localhost:9000/live-well/?subscription-key=123456)
64+
65+
[Alcohol advice - Alcohol support](http://localhost:9000/live-well/alcohol-advice/alcohol-support/?subscription-key=123456)
66+
67+
[Exercise](http://localhost:9000/live-well/exercise/?subscription-key=123456)
68+
69+
[Healthy weight](http://localhost:9000/live-well/healthy-weight/?subscription-key=123456)
70+
71+
## Medicines
72+
73+
[Medicines Root - Without subscription-key](http://localhost:9000/medicines/)
74+
75+
[Medicines Root - With example subscription-key](http://localhost:9000/medicines/?subscription-key=123456)
76+
77+
[Medicines Root - Category: A](http://localhost:9000/medicines/?subscription-key=123456&category=a)
78+
79+
[Medicines Root - Category: B](http://localhost:9000/medicines/?subscription-key=123456&category=b)
80+
81+
[Medicines Root - Category: Z](http://localhost:9000/medicines/?subscription-key=123456&category=z)
82+
83+
[Medicines Root - Page: 1](http://localhost:9000/medicines/?subscription-key=123456&page=1)
84+
85+
[Medicines Root - Page: 11](http://localhost:9000/medicines/?subscription-key=123456&page=11)
86+
87+
[Aciclovir](http://localhost:9000/medicines/aciclovir/?subscription-key=123456)
88+
89+
[Acrivastine](http://localhost:9000/medicines/acrivastine/?subscription-key=123456)
90+
91+
[Zopiclone](http://localhost:9000/medicines/zopiclone/?subscription-key=123456)
92+
93+
## Mental Health
94+
95+
[Mental Health Root - Without subscription-key](http://localhost:9000/mental-health/)
96+
97+
[Mental Health Root - With example subscription-key](http://localhost:9000/mental-health/?subscription-key=123456)
98+
99+
[Advice for life situations and events - Bullying at work](http://localhost:9000/mental-health/advice-for-life-situations-and-events/support-for-workplace-bullying/?subscription-key=123456)
100+
101+
[Mental health conditions](http://localhost:9000/mental-health/conditions/?subscription-key=123456)
102+
103+
[Feelings, symptoms and behaviours](http://localhost:9000/mental-health/feelings-symptoms-behaviours/?subscription-key=123456)
104+
105+
## NHS Services
106+
107+
[NHS Services Root - Without subscription-key](http://localhost:9000/nhs-services/)
108+
109+
[NHS Services Root - With example subscription-key](http://localhost:9000/nhs-services/?subscription-key=123456)
110+
111+
[GPs](http://localhost:9000/nhs-services/gps/?subscription-key=123456)
112+
113+
[GPs - How to register with a GP surgery](http://localhost:9000/nhs-services/gps/how-to-register-with-a-gp-surgery/?subscription-key=123456)
114+
115+
[Prescriptions and pharmacies](http://localhost:9000/nhs-services/prescriptions-and-pharmacies/?subscription-key=123456)
116+
117+
## Pregnancy
118+
119+
[Pregnancy Root - Without subscription-key](http://localhost:9000/pregnancy/)
120+
121+
[Pregnancy Root - With example subscription-key](http://localhost:9000/pregnancy/?subscription-key=123456)
122+
123+
[Finding out you're pregnant - Finding out you're pregnant](http://localhost:9000/pregnancy/finding-out/finding-out-you-are-pregnant/?subscription-key=123456)
124+
125+
[Having a baby if you're LGBT+](http://localhost:9000/pregnancy/having-a-baby-if-you-are-lgbt-plus/?subscription-key=123456)
126+
127+
[Trying for a baby](http://localhost:9000/pregnancy/trying-for-a-baby/?subscription-key=123456)

0 commit comments

Comments
 (0)