Skip to content

Commit e7b6c0a

Browse files
committed
Fix broken JSON-in-Markdown
MDX struggled to parse the deeply (and inconsisently) indented code blocks, so this change replaces them for fenced code blocks which explictly mark them as JSON to allow syntax highlighting
1 parent 1b1dd93 commit e7b6c0a

17 files changed

+482
-454
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
---
2+
sidebar_position: 0
3+
---
14
# Introduction
25

36
As we continue to build on the number of APIs currently in service we provide a central repository for all of the specificactions that have been agreed. The Swagger documentation provides a concise view of the various endpoints of our APIs and how to use them. Our API specifications document our journey to establishing how the APIs were designed and the many decisions that were taken. This will give us the opportunity to learn from our past choices and continue to build and improve as we go.

docs/api-specifications/accounts-api.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ A decoupled architecture that allows this entity to be reused across multiple se
2929
Accounts workshop - https://ideaflip.com/b/75dgi3rx6h2t/
3030

3131
## Endpoints to be created
32-
1. GET **//accounts?targetId={targetId}&type={accountType}**
32+
1. GET **//accounts?targetId=[targetId]&type=[accountType]**
3333

3434
**Function:** Gets a collection of accounts for a person or organisation
3535

@@ -75,7 +75,7 @@ Accounts workshop - https://ideaflip.com/b/75dgi3rx6h2t/
7575
]
7676
```
7777

78-
2. GET **/accounts/arrears?type={accountType}&sort={propertyName}&direction={asc/desc}&resultsCount=[number of items]**
78+
2. GET **/accounts/arrears?type=[accountType]&sort=[propertyName]&direction=[asc/desc]&resultsCount=[number of items]**
7979

8080
**Function:** Gets a collection of accounts that are in arrears
8181

@@ -121,7 +121,7 @@ Accounts workshop - https://ideaflip.com/b/75dgi3rx6h2t/
121121
]
122122
```
123123
124-
3. GET **/accounts/{id}**
124+
3. GET **/accounts/[id]**
125125
126126
**Function:** Gets a single account record from the supplied id
127127
@@ -196,7 +196,7 @@ Accounts workshop - https://ideaflip.com/b/75dgi3rx6h2t/
196196
}
197197
```
198198
199-
5. PATCH **/accounts/{id}**
199+
5. PATCH **/accounts/[id]**
200200
201201
**Function:** Updates a person’s account details
202202

docs/api-specifications/activities_api.md

Lines changed: 34 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -131,35 +131,37 @@ Internal Server Error
131131

132132
## Example Payload
133133

134-
{
135-
"id": "6f22e9ae3e8a4e0eaf46db02eb87f8e6",
136-
"type": "create|update",
137-
"target type": "person|asset|tenure....",
138-
"target id": "TWVoZGlLaW1ha2hlCg==",
139-
"datetime": "2021-02-19 15:12:00",
140-
"time to live for the record": “365 days”,
141-
142-
//if we want to store data
143-
"old data": {
144-
"id": "TWVoZGlLaW1ha2hlCg==",
145-
"title": "Mr",
146-
"forename": "M",
147-
"middle name": "",
148-
"surname": "K",
149-
...
150-
},
151-
"new data": {
152-
"id": "TWVoZGlLaW1ha2hlCg==",
153-
"title": "Mr",
154-
"forename": "Mehdi",
155-
"middle name": "",
156-
"surname": "Kimakhe",
157-
...
158-
},
159-
160-
"Author": {
161-
"id": "TWVoZGlLaW1ha2hlCg==",
162-
"full name": "Mehdi Kimakhe",
163-
"email": "[email protected]"
164-
}
165-
}
134+
```json
135+
{
136+
"id": "6f22e9ae3e8a4e0eaf46db02eb87f8e6",
137+
"type": "create|update",
138+
"target type": "person|asset|tenure....",
139+
"target id": "TWVoZGlLaW1ha2hlCg==",
140+
"datetime": "2021-02-19 15:12:00",
141+
"time to live for the record": “365 days”,
142+
143+
//if we want to store data
144+
"old data": {
145+
"id": "TWVoZGlLaW1ha2hlCg==",
146+
"title": "Mr",
147+
"forename": "M",
148+
"middle name": "",
149+
"surname": "K",
150+
...
151+
},
152+
"new data": {
153+
"id": "TWVoZGlLaW1ha2hlCg==",
154+
"title": "Mr",
155+
"forename": "Mehdi",
156+
"middle name": "",
157+
"surname": "Kimakhe",
158+
...
159+
},
160+
161+
"Author": {
162+
"id": "TWVoZGlLaW1ha2hlCg==",
163+
"full name": "Mehdi Kimakhe",
164+
"email": "[email protected]"
165+
}
166+
}
167+
```

docs/api-specifications/asset_info.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,8 @@ Below is the proposal link to all the new fields.
142142
Endpoint URLs:
143143

144144
/assets
145-
/assets/{prop-ref}
146-
/assets?llpg-ref={llpg-ref}
145+
/assets/[prop-ref]
146+
/assets?llpg-ref=[llpg-ref]
147147
/assets/?postcode=E8 1DY
148148

149149
Method: GET (list, search, view)
@@ -370,7 +370,7 @@ Internal Server Error
370370
3. ** Put Properties **
371371
** Purpose: ** Update a particular asset
372372

373-
Endpoint URL: asset/{id}
373+
Endpoint URL: asset/[id]
374374

375375
Method: Put
376376
Request put object:
@@ -385,17 +385,19 @@ Asset Updated
385385
404
386386
Not found
387387

388-
{
389-
"DevErrorMessages ": ["validation errors"],
390-
"UserErrorMessage": "Your item could not be updated for the following
391-
reasons..."
392-
}
388+
```json
389+
{
390+
"DevErrorMessages ": ["validation errors"],
391+
"UserErrorMessage": "Your item could not be updated for the following
392+
reasons..."
393+
}
394+
``
393395
500
394396

395397
Internal Server Error
396398

397399

398-
4. PATCH properties `/assets/{id}`
400+
4. PATCH properties `/assets/[id]`
399401

400402
** Purpose: ** Updates an existing asset in dynamoDB database.
401403
We are using patch to allow for in place editing (single field updates).

docs/api-specifications/configuration.md

Lines changed: 41 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -44,42 +44,44 @@ Used to retrieve a list of configurations
4444

4545
## Example Payload:
4646

47-
[
48-
{
49-
"Type": "Person",
50-
"Configuration": {
51-
"ApiUrl": "http://www.hackney.gov.uk/person"
52-
},
53-
"FeatureToggles": {
54-
"CreatePerson": true,
55-
"EditPerson": false
56-
}
57-
},
58-
{
59-
"Type": "ContactDetails",
60-
"Configuration": {
61-
"ApiUrl": "http://www.hackney.gov.uk/contactdetails"
62-
},
63-
"FeatureToggles": {
64-
"AddContactDetails": true
65-
}
66-
},
67-
{
68-
"Type": "Tenure",
69-
"Configuration": {
70-
"ApiUrl": "http://www.hackney.gov.uk/tenure"
71-
},
72-
"FeatureToggles": {
73-
"CreateTenure": true
74-
}
75-
},
76-
{
77-
"Domain": "Asset",
78-
"Configuration": {
79-
"ApiUrl": "http://www.hackney.gov.uk/asset"
80-
},
81-
"FeatureToggles": {
82-
"ViewAsset": false
83-
}
84-
}
85-
]
47+
```json
48+
[
49+
{
50+
"Type": "Person",
51+
"Configuration": {
52+
"ApiUrl": "http://www.hackney.gov.uk/person"
53+
},
54+
"FeatureToggles": {
55+
"CreatePerson": true,
56+
"EditPerson": false
57+
}
58+
},
59+
{
60+
"Type": "ContactDetails",
61+
"Configuration": {
62+
"ApiUrl": "http://www.hackney.gov.uk/contactdetails"
63+
},
64+
"FeatureToggles": {
65+
"AddContactDetails": true
66+
}
67+
},
68+
{
69+
"Type": "Tenure",
70+
"Configuration": {
71+
"ApiUrl": "http://www.hackney.gov.uk/tenure"
72+
},
73+
"FeatureToggles": {
74+
"CreateTenure": true
75+
}
76+
},
77+
{
78+
"Domain": "Asset",
79+
"Configuration": {
80+
"ApiUrl": "http://www.hackney.gov.uk/asset"
81+
},
82+
"FeatureToggles": {
83+
"ViewAsset": false
84+
}
85+
}
86+
]
87+
```

docs/api-specifications/contact_details.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ https://ideaflip.com/b/bk558iy45tyt/
4949
- Forwarding addresses for future correspondence
5050
- Email address(es) for informed communication.
5151
- Endpoints to be created
52-
- GET /contact-details/{id} //will we ever have a use case to retrieve a single contact details record?
53-
- GET /contact-details?targetId={id}&includeHistoric=true //id of person/organization to retrieve all contact details, with optional filtering of whether historic details should be included. Default should be false.
52+
- GET /contact-details/[id] //will we ever have a use case to retrieve a single contact details record?
53+
- GET /contact-details?targetId=[id]&includeHistoric=true //id of person/organization to retrieve all contact details, with optional filtering of whether historic details should be included. Default should be false.
5454
- POST /contact-details
5555
- Inserts a new contact details record
56-
- PUT /contact-details/{id}
56+
- PUT /contact-details/[id]
5757
- Updates a contact details record.
5858
- In previous use cases, value of record was not updated - e.g. if a new phone number is created, a new record was added and old record was marked as inactive if applicable
5959
- Fields that should be updatable -

docs/api-specifications/contracts_api.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ Gets one or more Contracts from the Contract table. Requests can be made by spe
3434

3535
**Response:**
3636
- 200 OK
37-
```
37+
38+
```json
3839
{
3940
"results": [
4041
{
@@ -218,7 +219,7 @@ Gets one or more Contracts from the Contract table. Requests can be made by spe
218219
}
219220
}
220221
```
221-
- /contracts/{contractId}
222+
- /contracts/[contractId]
222223

223224
Get individual contract
224225

@@ -371,7 +372,7 @@ Create a new Contract
371372
Updates a Contract
372373

373374
**Endpoint URL's:**
374-
/contracts/{contractId}
375+
/contracts/[contractId]
375376

376377
**Request object:**
377378
```
@@ -420,7 +421,7 @@ Updates a Contract
420421
Updates a new Contract
421422

422423
**Endpoint URL's:**
423-
- /contracts/{contractId}
424+
- /contracts/[contractId]
424425

425426
### DELETE Contracts:
426427

@@ -430,4 +431,4 @@ Updates a new Contract
430431
Removes a new Contract
431432

432433
**Endpoint URL's:**
433-
- /contracts/{contractId}
434+
- /contracts/[contractId]

docs/api-specifications/equality-information-api.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ In the second workshop, we discussed the necessity of the equalities information
5757

5858
### Endpoints to be created for the equality information microservice
5959

60-
1. GET **/equality-information/{equality-information-id}**
61-
2. GET **/equality-information/{target-id}**
62-
3. PATCH **/equality-information/{equality-information-id}**
63-
4. POST **/equality-information/{equality-information-id}**
60+
1. GET **/equality-information/[equality-information-id]**
61+
2. GET **/equality-information/[target-id]**
62+
3. PATCH **/equality-information/[equality-information-id]**
63+
4. POST **/equality-information/[equality-information-id]**
6464

6565
**Example payload**
6666
```

docs/api-specifications/notes.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,12 @@ https://ideaflip.com/edit/uhe2bvdkm8fj/3TqQ2hqBlWef
7878
404
7979
If item was not found
8080

81-
{
82-
“devErrorMessages”: [“debug info or stack trace”],
83-
“userErrorMessage”: “The item you search for was not found”
84-
}
85-
81+
```json
82+
{
83+
“devErrorMessages”: [“debug info or stack trace”],
84+
“userErrorMessage”: “The item you search for was not found”
85+
}
86+
```
8687

8788
** Post Note **
8889
Purpose: Creates one or more notes.
@@ -110,7 +111,7 @@ Internal Server Error
110111
** Put Note **
111112
** Purpose: ** Update a particular note
112113

113-
Endpoint URL: notes/{id}
114+
Endpoint URL: notes/[id]
114115

115116
Method: Put
116117
Request put object:
@@ -133,7 +134,7 @@ Internal Server Error
133134
** Delete Note **
134135
** Purpose: ** Delete a particular note
135136

136-
Endpoint URL: notes/{id}
137+
Endpoint URL: notes/[id]
137138

138139
Method: Delete
139140

docs/api-specifications/notificationss-api.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ I can take necessary action
133133
}
134134
]
135135
```
136-
3. GET **/message-status/{service}/{notificationId}**
136+
3. GET **/message-status/[service]/[notificationId]**
137137
**Function:** Gets the status of a message sent within the retention period (7 days)
138138
**Response Payload**
139139
```
@@ -165,7 +165,7 @@ I can take necessary action
165165
}
166166
```
167167
168-
5. PATCH **/notifications/{id}**
168+
5. PATCH **/notifications/[id]**
169169
**Function:** Updates the action details of a notification
170170
**Request Payload:**
171171
```
@@ -175,7 +175,7 @@ I can take necessary action
175175
“actionNote”:””
176176
}
177177
```
178-
6. DELETE **/notifications/{id}**
178+
6. DELETE **/notifications/[id]**
179179
**Function:** Deletes the specified notification
180180
181181
## Other considerations

0 commit comments

Comments
 (0)