Skip to content

Commit

Permalink
Merge pull request #33 from hmrc/TAV-347
Browse files Browse the repository at this point in the history
[PS] TAV-347 - Add API platform documentation for search by postcode POST endpoint
  • Loading branch information
beyond-code-github authored Sep 6, 2021
2 parents 0537e12 + 50d6697 commit 212fb1d
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 1 deletion.
18 changes: 17 additions & 1 deletion public/api/conf/1.0/application.raml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ uses:

/misc/address-verification/lookup:
get:
displayName: Lookup address
displayName: Lookup address (deprecated)
description: |
Lookup of postal and BFPO (British Forces Post Office) address details within the UK
is: [headers.acceptHeader]
Expand All @@ -46,3 +46,19 @@ uses:
application/json:
type: !include docs/uk-address-object.json
example: !include docs/example-response.json
post:
displayName: Lookup address
description: |
Lookup of postal and BFPO (British Forces Post Office) address details within the UK
is: [headers.acceptHeader]
securedBy: [ sec.x-application ]
body:
application/json:
type: !include docs/post-request.json
example: !include docs/example-post-request.json
responses:
200:
body:
application/json:
type: !include docs/uk-address-object.json
example: !include docs/example-response.json
4 changes: 4 additions & 0 deletions public/api/conf/1.0/docs/example-post-request.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"postcode": "AA1 1ZZ",
"filter": "The Rectory"
}
32 changes: 32 additions & 0 deletions public/api/conf/1.0/docs/post-request.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"definitions": {},
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://example.com/object1614266033.json",
"title": "Root",
"type": "object",
"required": [
"postcode"
],
"properties": {
"postcode": {
"$id": "#root/postcode",
"title": "Postcode",
"description": "Full postcode to search for, all uppercase. The internal space may be omitted",
"type": "string",
"examples": [
"AA1 1ZZ",
"BB00 0BB"
]
},
"filter": {
"$id": "#root/filter",
"title": "Filter",
"description": "Refine the search results further based on house number or street name",
"type": "string",
"examples": [
"The Rectory",
"1 High Street"
]
}
}
}

0 comments on commit 212fb1d

Please sign in to comment.