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

[#PE-168] - Here geolocation API integration #802

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

AleDore
Copy link
Contributor

@AleDore AleDore commented May 25, 2021

List of Changes

Integration with HERE Geolocation API.
We expose only 3 APIs through IO APP:

  • Autocomplete
  • Geocoding
  • Lookup

Motivation and Context

This feature is needed by Carta Giovani Nazionale Operators search through IO APP when a citizen deny to get tracked by GPS coordinates, so he needs to insert an address manually.

How Has This Been Tested?

Unit test

Screenshots (if appropriate):

Types of changes

  • Chore (nothing changes by a user perspective)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@pagopa-github-bot
Copy link
Contributor

Warnings
⚠️

Please include a Pivotal story at the beginning of the PR title (see below).

Example of PR titles that include pivotal stories:

  • single story: [#123456] my PR title
  • multiple stories: [#123456,#123457,#123458] my PR title

Generated by 🚫 dangerJS

@AleDore AleDore changed the title PE-168 - Here geolocation API integration [#PE-168] - Here geolocation API integration May 31, 2021
@@ -64,6 +64,7 @@ const aPagoPABasePath = "/pagopa/api/v1";
const aMyPortalBasePath = "/myportal/api/v1";
const aBPDBasePath = "/bpd/api/v1";
const aCgnAPIBasePath = "/api/v1/cgn";
const aGeoAPIBasePath = "/api/v1/geo";
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we be a little more specific here? Maybe /api/v1/cgn/geo or /api/v1/cgn-geo or /api/v1/here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'd rather maintain this naming since this set of APIS should be used by other App functionalities(i.e. services geolocation )

src/app.ts Outdated
@@ -402,6 +417,16 @@ export function newApp({
authMiddlewares.bearerSession
);
}

// eslint-disable-next-line @typescript-eslint/no-use-before-define
registerGeoAPIRoutes(
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to mount this sub-path after a condition on a feature flag?

Copy link
Contributor Author

@AleDore AleDore Jun 4, 2021

Choose a reason for hiding this comment

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

Yep, you're right.

);

app.get(
`${basePath}/geo/autocomplete`,
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't geo already included in basePath

Copy link
Contributor Author

@AleDore AleDore Jun 4, 2021

Choose a reason for hiding this comment

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

Nope, basePath includes only /api/v1. It's similar to CGN schema, see

`${basePath}/cgn/status`,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants