Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(DTFS-7052): added GET /geospatial/addresses/postcode endpoint for Ordnance Survey API data #804

Merged
merged 61 commits into from
May 13, 2024

Conversation

avaitonis
Copy link
Collaborator

Introduction ✏️

We are moving integration with Ordnance Survey API from DTFS to MDM API.

Resolution ✔️

  • Added new helper module ordnance-survey
  • Added new module geospatial with endpoint /geospatial/addresses/postcode?postcode=SW1A2AQ
    • returns same response format as DTFS.
    • returns country field, DTFS was always returning {country: null}
    • returns 200 [] for empty unsuccessful search.

Response example:

[
    {
        "organisationName": "CHURCHILL MUSEUM & CABINET WAR ROOMS",
        "addressLine1": "CLIVE STEPS KING CHARLES STREET",
        "addressLine2": null,
        "addressLine3": null,
        "locality": "LONDON",
        "postalCode": "SW1A 2AQ",
        "country": "England"
    }
]

Miscellaneous ➕

  • Refactored api-tests to solve typescript type error. Looks like it started because of supertest update.

@avaitonis avaitonis changed the title feat: added GET /geospatial/addresses/postcode?postcode=SW1A2AQ endpoint for Ordnance Survey API data feat(DTFS-7052): added GET /geospatial/addresses/postcode?postcode=SW1A2AQ endpoint for Ordnance Survey API data Apr 15, 2024
Copy link

sonarcloud bot commented May 13, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
3.9% Duplication on New Code

See analysis details on SonarCloud

Copy link
Collaborator

@abhi-markan abhi-markan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍🏼

@avaitonis avaitonis merged commit 4963371 into main May 13, 2024
13 of 14 checks passed
@avaitonis avaitonis deleted the feat/DTFS2-7052/new-external-ordnance-survey-api branch May 13, 2024 13:21
abhi-markan added a commit that referenced this pull request May 22, 2024
🤖 I have created a release *beep* *boop*
---


##
[1.18.0](v1.17.0...v1.18.0)
(2024-05-22)


### Features

* **DTFS-7052:** added GET `/geospatial/addresses/postcode` endpoint for
Ordnance Survey API data
([#804](#804))
([4963371](4963371))
* **DTFS2-7049:** adding new env variables to docker-compose.yml
([3ca57f0](3ca57f0))
* **DTFS2-7052:** actioning PR comments
([e012eb4](e012eb4))
* **DTFS2-7052:** actioning PR comments
([7d15b07](7d15b07))
* **DTFS2-7052:** adding constants and examples
([a3d5433](a3d5433))
* **DTFS2-7052:** adding typescript include for json files, to satify
lint. I added big examples to json files
([0b79772](0b79772))
* **DTFS2-7052:** api-tests for geospatial/get-address-by-postcode
([c8cb1bc](c8cb1bc))
* **DTFS2-7052:** applying Oscars suggestions on my PR
([f68ac66](f68ac66))
* **DTFS2-7052:** change GET /geospatial/addresses/postcode?postcode=
empty response from 200 to 404
([33c9e65](33c9e65))
* **DTFS2-7052:** change husky install to same way as in DTFS project
([889fe1b](889fe1b))
* **DTFS2-7052:** changed documentation for .env setting
ORDNANCE_SURVEY_URL
([18fdf4a](18fdf4a))
* **DTFS2-7052:** changed numeric status code 200 to HttpStatus.OK, but
just in controller
([3751992](3751992))
* **DTFS2-7052:** changing variables to use plural
([c020867](c020867))
* **DTFS2-7052:** code style improvements based on PR feedback
([38939db](38939db))
* **DTFS2-7052:** comments copy and variable name improvements
([5a0ee93](5a0ee93))
* **DTFS2-7052:** downgrade @commitlint/cli from 19.3.0 to 18.6.0
([132d179](132d179))
* **DTFS2-7052:** fix address line 1 formating
([db50210](db50210))
* **DTFS2-7052:** fixed lint errors
([17fea54](17fea54))
* **DTFS2-7052:** improve address test data
([ff5ac7b](ff5ac7b))
* **DTFS2-7052:** moving address examples to constants
([de7a0e5](de7a0e5))
* **DTFS2-7052:** moving uk postcode regex to constants and doc
improvements
([75b34ac](75b34ac))
* **DTFS2-7052:** new API modules and endpoint
/api/v1/geospatial/addresses/postcode?postcode=W1A1AA
([2cdd0de](2cdd0de))
* **DTFS2-7052:** new module geospatial
([14a6a08](14a6a08))
* **DTFS2-7052:** package update
([3259347](3259347))
* **DTFS2-7052:** refactor api tests to match TFS and solve type issues
([c91144d](c91144d))
* **DTFS2-7052:** removing unused class
GetSearchPostcodeOrdnanceSurveyQueryDto
([32aa1ef](32aa1ef))
* **DTFS2-7052:** renaming enums/geospatial.ts to
enums/geospatialCountries.ts
([252b5a1](252b5a1))
* **DTFS2-7052:** spelling fix
([4c503ca](4c503ca))
* **DTFS2-7052:** tests for ordnance survey API endpoint
([837a482](837a482))
* **DTFS2-7052:** tidying up map function
([0da25c3](0da25c3))
* **DTFS2-7052:** trying to automate husky run on commit
([5fbf3d7](5fbf3d7))
* **DTFS2-7052:** trying to automate husky run on commit
([1b6cf30](1b6cf30))
* **DTFS2-7052:** typescript type improvement in api-test helper
([6bf5a4d](6bf5a4d))
* **DTFS2-7052:** updating API spec
([15743c0](15743c0))
* **DTFS2-7052:** updating api spec definition
([fa73657](fa73657))
* **DTFS2-7052:** updating api spec snapshot
([3e215d7](3e215d7))
* **DTFS2-7052:** updating spec snapshot
([c7ac787](c7ac787))
* **DTFS2-7052:** work in progress of geospatial-get-address api tests
([21f8006](21f8006))
* **github-actions:** enable various imperative github actions
([#847](#847))
([fbfafa9](fbfafa9))


### Bug Fixes

* **release-please-version:** set version to v1.17.0
([#689](#689))
([90c6b08](90c6b08))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
abhi-markan added a commit that referenced this pull request May 22, 2024
🤖 I have created a release *beep* *boop*
---


##
[1.19.0](v1.18.0...v1.19.0)
(2024-05-22)


### Features

* **ami:** migration to Azure AMI
([9854d57](9854d57))
* **ami:** migration to Azure AMI
([#514](#514))
([bfeaa1e](bfeaa1e))
* **APIM-344:** added test to redact using regex in
'redactStringsInLogArgs'
([709477d](709477d))
* **APIM-344:** changed redaction in crashed bootstrap and changed
redaction in recovered bootstrap
([3a3b646](3a3b646))
* **APIM-344:** fix 2 PR feedback items, change comment and var type
([da02c07](da02c07))
* **APIM-344:** handle sensitive details in log messages
([#324](#324))
([2e5a948](2e5a948))
* **APIM-344:** unit test for logger class ConsoleLoggerWithRedact
([4950a04](4950a04))
* **APIM-344:** use process variable to enable/disable redacting at
bootstrap
([f1c101a](f1c101a))
* **APIM-468:** change how integer config values are parsed
([94dffdd](94dffdd))
* **APIM-468:** change how integer config values are parsed
([#357](#357))
([ee24d08](ee24d08))
* **APIM-468:** copying missed unit test for get-int-config helper
([9a2a452](9a2a452))
* **APIM-468:** merge main branch
([2ec2c5f](2ec2c5f))
* **APIM-468:** removed undefined return var type
([835b65f](835b65f))
* **APIM-468:** renaming section in unit test
([1b5cfe3](1b5cfe3))
* **apim-538:** add environment variable for log format
([#337](#337))
([fc54db2](fc54db2))
* **APIM-538:** update single line log format env var
([#365](#365))
([957c95a](957c95a))
* **APIM-582:** remove unused endpoint GET /constants/spi
([04cac62](04cac62))
* **APIM-582:** remove unused endpoint GET /constants/spi
([#427](#427))
([b431841](b431841))
* **DTFS-7052:** added GET `/geospatial/addresses/postcode` endpoint for
Ordnance Survey API data
([#804](#804))
([4963371](4963371))
* **DTFS2-7049:** adding new env variables to docker-compose.yml
([3ca57f0](3ca57f0))
* **DTFS2-7052:** actioning PR comments
([e012eb4](e012eb4))
* **DTFS2-7052:** actioning PR comments
([7d15b07](7d15b07))
* **DTFS2-7052:** adding constants and examples
([a3d5433](a3d5433))
* **DTFS2-7052:** adding typescript include for json files, to satify
lint. I added big examples to json files
([0b79772](0b79772))
* **DTFS2-7052:** api-tests for geospatial/get-address-by-postcode
([c8cb1bc](c8cb1bc))
* **DTFS2-7052:** applying Oscars suggestions on my PR
([f68ac66](f68ac66))
* **DTFS2-7052:** change GET /geospatial/addresses/postcode?postcode=
empty response from 200 to 404
([33c9e65](33c9e65))
* **DTFS2-7052:** change husky install to same way as in DTFS project
([889fe1b](889fe1b))
* **DTFS2-7052:** changed documentation for .env setting
ORDNANCE_SURVEY_URL
([18fdf4a](18fdf4a))
* **DTFS2-7052:** changed numeric status code 200 to HttpStatus.OK, but
just in controller
([3751992](3751992))
* **DTFS2-7052:** changing variables to use plural
([c020867](c020867))
* **DTFS2-7052:** code style improvements based on PR feedback
([38939db](38939db))
* **DTFS2-7052:** comments copy and variable name improvements
([5a0ee93](5a0ee93))
* **DTFS2-7052:** downgrade @commitlint/cli from 19.3.0 to 18.6.0
([132d179](132d179))
* **DTFS2-7052:** fix address line 1 formating
([db50210](db50210))
* **DTFS2-7052:** fixed lint errors
([17fea54](17fea54))
* **DTFS2-7052:** improve address test data
([ff5ac7b](ff5ac7b))
* **DTFS2-7052:** moving address examples to constants
([de7a0e5](de7a0e5))
* **DTFS2-7052:** moving uk postcode regex to constants and doc
improvements
([75b34ac](75b34ac))
* **DTFS2-7052:** new API modules and endpoint
/api/v1/geospatial/addresses/postcode?postcode=W1A1AA
([2cdd0de](2cdd0de))
* **DTFS2-7052:** new module geospatial
([14a6a08](14a6a08))
* **DTFS2-7052:** package update
([3259347](3259347))
* **DTFS2-7052:** refactor api tests to match TFS and solve type issues
([c91144d](c91144d))
* **DTFS2-7052:** removing unused class
GetSearchPostcodeOrdnanceSurveyQueryDto
([32aa1ef](32aa1ef))
* **DTFS2-7052:** renaming enums/geospatial.ts to
enums/geospatialCountries.ts
([252b5a1](252b5a1))
* **DTFS2-7052:** spelling fix
([4c503ca](4c503ca))
* **DTFS2-7052:** tests for ordnance survey API endpoint
([837a482](837a482))
* **DTFS2-7052:** tidying up map function
([0da25c3](0da25c3))
* **DTFS2-7052:** trying to automate husky run on commit
([5fbf3d7](5fbf3d7))
* **DTFS2-7052:** trying to automate husky run on commit
([1b6cf30](1b6cf30))
* **DTFS2-7052:** typescript type improvement in api-test helper
([6bf5a4d](6bf5a4d))
* **DTFS2-7052:** updating API spec
([15743c0](15743c0))
* **DTFS2-7052:** updating api spec definition
([fa73657](fa73657))
* **DTFS2-7052:** updating api spec snapshot
([3e215d7](3e215d7))
* **DTFS2-7052:** updating spec snapshot
([c7ac787](c7ac787))
* **DTFS2-7052:** work in progress of geospatial-get-address api tests
([21f8006](21f8006))
* **github-actions:** enable various imperative github actions
([#847](#847))
([fbfafa9](fbfafa9))
* **release-please-v4:** updated release-please to v4
[#491](#491)
([#688](#688))
([cc07b84](cc07b84))
* **template:** pull request template
([b8506bb](b8506bb))
* **template:** pull request template
([#624](#624))
([847bdeb](847bdeb))


### Bug Fixes

* **ci:** run ci with legacy-peer-deps argument
([d77d8f3](d77d8f3))
* **deps:** update all
([#396](#396))
([f851b7b](f851b7b))
* **deps:** update all
([#461](#461))
([6bf386c](6bf386c))
* **deps:** update all
([#469](#469))
([096b68b](096b68b))
* **deps:** update dependency @nestjs/swagger to v7.1.2
([#331](#331))
([db807a6](db807a6))
* **deps:** update dependency mssql to v10
([#463](#463))
([993410d](993410d))
* **deps:** update dependency tslib to v2.6.1
([#338](#338))
([824cc52](824cc52))
* **deps:** upgrade pino-http to 10.0.0
([#888](#888))
([fac01d4](fac01d4))
* **env:** updated .env.sample
([bd3f594](bd3f594))
* **env:** updated `.env.sample`
([#516](#516))
([c09f145](c09f145))
* **format:** formatting fixes
([b14807a](b14807a))
* **format:** Formatting fixes
([#517](#517))
([baa3713](baa3713))
* **gitignore:** environment variable introduction
([#364](#364))
([3336d22](3336d22))
* **iac:** ACR
([#343](#343))
([51d2316](51d2316))
* **premium-schedule:** added 0 and 4 as acceptable inputs
([#440](#440))
([270b405](270b405))
* **release-please-version:** set version to v1.17.0
([#689](#689))
([90c6b08](90c6b08))
* **release:** release version manager
([#532](#532))
([8a2a3a2](8a2a3a2))
* **spellcheck:** added spellcheck to the pipeline
([#511](#511))
([8b84855](8b84855))
* **tsconfig:** fixed tsconfig file
([d8df948](d8df948))
* **tsconfig:** tsconfig file fix
([e470ec5](e470ec5))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: Abhi Markan <amarkan@ukexportfinance.gov.uk>
abhi-markan added a commit that referenced this pull request May 22, 2024
🤖 I have created a release *beep* *boop*
---


##
[1.20.0](v1.19.0...v1.20.0)
(2024-05-22)


### Features

* **ami:** migration to Azure AMI
([9854d57](9854d57))
* **ami:** migration to Azure AMI
([#514](#514))
([bfeaa1e](bfeaa1e))
* **APIM-344:** added test to redact using regex in
'redactStringsInLogArgs'
([709477d](709477d))
* **APIM-344:** fix 2 PR feedback items, change comment and var type
([da02c07](da02c07))
* **APIM-344:** handle sensitive details in log messages
([#324](#324))
([2e5a948](2e5a948))
* **APIM-344:** use process variable to enable/disable redacting at
bootstrap
([f1c101a](f1c101a))
* **APIM-468:** change how integer config values are parsed
([94dffdd](94dffdd))
* **APIM-468:** change how integer config values are parsed
([#357](#357))
([ee24d08](ee24d08))
* **APIM-468:** copying missed unit test for get-int-config helper
([9a2a452](9a2a452))
* **APIM-468:** merge main branch
([2ec2c5f](2ec2c5f))
* **APIM-468:** removed undefined return var type
([835b65f](835b65f))
* **APIM-468:** renaming section in unit test
([1b5cfe3](1b5cfe3))
* **apim-538:** add environment variable for log format
([#337](#337))
([fc54db2](fc54db2))
* **APIM-538:** update single line log format env var
([#365](#365))
([957c95a](957c95a))
* **APIM-582:** remove unused endpoint GET /constants/spi
([04cac62](04cac62))
* **APIM-582:** remove unused endpoint GET /constants/spi
([#427](#427))
([b431841](b431841))
* **DTFS-7052:** added GET `/geospatial/addresses/postcode` endpoint for
Ordnance Survey API data
([#804](#804))
([4963371](4963371))
* **DTFS2-7049:** adding new env variables to docker-compose.yml
([3ca57f0](3ca57f0))
* **DTFS2-7052:** actioning PR comments
([e012eb4](e012eb4))
* **DTFS2-7052:** actioning PR comments
([7d15b07](7d15b07))
* **DTFS2-7052:** adding constants and examples
([a3d5433](a3d5433))
* **DTFS2-7052:** adding typescript include for json files, to satify
lint. I added big examples to json files
([0b79772](0b79772))
* **DTFS2-7052:** api-tests for geospatial/get-address-by-postcode
([c8cb1bc](c8cb1bc))
* **DTFS2-7052:** applying Oscars suggestions on my PR
([f68ac66](f68ac66))
* **DTFS2-7052:** change GET /geospatial/addresses/postcode?postcode=
empty response from 200 to 404
([33c9e65](33c9e65))
* **DTFS2-7052:** change husky install to same way as in DTFS project
([889fe1b](889fe1b))
* **DTFS2-7052:** changed documentation for .env setting
ORDNANCE_SURVEY_URL
([18fdf4a](18fdf4a))
* **DTFS2-7052:** changed numeric status code 200 to HttpStatus.OK, but
just in controller
([3751992](3751992))
* **DTFS2-7052:** changing variables to use plural
([c020867](c020867))
* **DTFS2-7052:** code style improvements based on PR feedback
([38939db](38939db))
* **DTFS2-7052:** comments copy and variable name improvements
([5a0ee93](5a0ee93))
* **DTFS2-7052:** downgrade @commitlint/cli from 19.3.0 to 18.6.0
([132d179](132d179))
* **DTFS2-7052:** fix address line 1 formating
([db50210](db50210))
* **DTFS2-7052:** fixed lint errors
([17fea54](17fea54))
* **DTFS2-7052:** improve address test data
([ff5ac7b](ff5ac7b))
* **DTFS2-7052:** moving address examples to constants
([de7a0e5](de7a0e5))
* **DTFS2-7052:** moving uk postcode regex to constants and doc
improvements
([75b34ac](75b34ac))
* **DTFS2-7052:** new API modules and endpoint
/api/v1/geospatial/addresses/postcode?postcode=W1A1AA
([2cdd0de](2cdd0de))
* **DTFS2-7052:** new module geospatial
([14a6a08](14a6a08))
* **DTFS2-7052:** package update
([3259347](3259347))
* **DTFS2-7052:** refactor api tests to match TFS and solve type issues
([c91144d](c91144d))
* **DTFS2-7052:** removing unused class
GetSearchPostcodeOrdnanceSurveyQueryDto
([32aa1ef](32aa1ef))
* **DTFS2-7052:** renaming enums/geospatial.ts to
enums/geospatialCountries.ts
([252b5a1](252b5a1))
* **DTFS2-7052:** spelling fix
([4c503ca](4c503ca))
* **DTFS2-7052:** tests for ordnance survey API endpoint
([837a482](837a482))
* **DTFS2-7052:** tidying up map function
([0da25c3](0da25c3))
* **DTFS2-7052:** trying to automate husky run on commit
([5fbf3d7](5fbf3d7))
* **DTFS2-7052:** trying to automate husky run on commit
([1b6cf30](1b6cf30))
* **DTFS2-7052:** typescript type improvement in api-test helper
([6bf5a4d](6bf5a4d))
* **DTFS2-7052:** updating API spec
([15743c0](15743c0))
* **DTFS2-7052:** updating api spec definition
([fa73657](fa73657))
* **DTFS2-7052:** updating api spec snapshot
([3e215d7](3e215d7))
* **DTFS2-7052:** updating spec snapshot
([c7ac787](c7ac787))
* **DTFS2-7052:** work in progress of geospatial-get-address api tests
([21f8006](21f8006))
* **github-actions:** enable various imperative github actions
([#847](#847))
([fbfafa9](fbfafa9))
* **release-please-v4:** updated release-please to v4
[#491](#491)
([#688](#688))
([cc07b84](cc07b84))
* **template:** pull request template
([b8506bb](b8506bb))
* **template:** pull request template
([#624](#624))
([847bdeb](847bdeb))


### Bug Fixes

* **ci:** run ci with legacy-peer-deps argument
([d77d8f3](d77d8f3))
* **deps:** update all
([#396](#396))
([f851b7b](f851b7b))
* **deps:** update all
([#461](#461))
([6bf386c](6bf386c))
* **deps:** update all
([#469](#469))
([096b68b](096b68b))
* **deps:** update dependency @nestjs/swagger to v7.1.2
([#331](#331))
([db807a6](db807a6))
* **deps:** update dependency mssql to v10
([#463](#463))
([993410d](993410d))
* **deps:** update dependency tslib to v2.6.1
([#338](#338))
([824cc52](824cc52))
* **deps:** upgrade pino-http to 10.0.0
([#888](#888))
([fac01d4](fac01d4))
* **env:** updated .env.sample
([bd3f594](bd3f594))
* **env:** updated `.env.sample`
([#516](#516))
([c09f145](c09f145))
* **format:** formatting fixes
([b14807a](b14807a))
* **format:** Formatting fixes
([#517](#517))
([baa3713](baa3713))
* **gitignore:** environment variable introduction
([#364](#364))
([3336d22](3336d22))
* **iac:** ACR
([#343](#343))
([51d2316](51d2316))
* **premium-schedule:** added 0 and 4 as acceptable inputs
([#440](#440))
([270b405](270b405))
* **release-please-version:** set version to v1.17.0
([#689](#689))
([90c6b08](90c6b08))
* **release-please:** changed to GitHub plugin
([#891](#891))
([8f3b044](8f3b044))
* **release:** release version manager
([#532](#532))
([8a2a3a2](8a2a3a2))
* **spellcheck:** added spellcheck to the pipeline
([#511](#511))
([8b84855](8b84855))
* **tsconfig:** fixed tsconfig file
([d8df948](d8df948))
* **tsconfig:** tsconfig file fix
([e470ec5](e470ec5))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants