bcgov / nr-forest-client-api

Forest client API allows systems to consume forest client data without having to connect to a database
Apache License 2.0
6 stars 1 forks source link

feat(FSADT1-1307): adding search by ids #218

Closed paulushcgcj closed 4 months ago

paulushcgcj commented 4 months ago

Description

As a forest client api user I want to be able to submit a list of forest client ids So that the endpoint returns me a list of matching forest clients.

Fixes #217

Type of change

How Has This Been Tested?

Checklist

Further comments


Thanks for the PR!

Any successful deployments (not always required) will be available below. API available

Once merged, code will be promoted and handed off to following workflow run. Main Merge Workflow

github-actions[bot] commented 4 months ago
Overall Project 99.48% :green_apple:
Files changed 100% :green_apple:


File Coverage
ClientSearchService.java 100% :green_apple:
ClientSearchController.java 100% :green_apple:
ClientMapper.java 100% :green_apple:
github-actions[bot] commented 4 months ago
Overall Project 99.48% :green_apple:
Files changed 100% :green_apple:


File Coverage
ClientLocationService.java 100% :green_apple:
ClientSearchService.java 100% :green_apple:
ClientSearchController.java 100% :green_apple:
ClientMapper.java 100% :green_apple:
github-actions[bot] commented 4 months ago
Overall Project 99.48% :green_apple:
Files changed 100% :green_apple:


File Coverage
ClientLocationService.java 100% :green_apple:
ClientSearchService.java 100% :green_apple:
ClientSearchController.java 100% :green_apple:
ClientMapper.java 100% :green_apple:
github-actions[bot] commented 4 months ago
Overall Project 99.48% :green_apple:
Files changed 100% :green_apple:


File Coverage
ClientLocationService.java 100% :green_apple:
ClientSearchService.java 100% :green_apple:
ClientSearchController.java 100% :green_apple:
ClientMapper.java 100% :green_apple:
craigyu commented 4 months ago

Works great! does it have to be paginated though?

craigyu commented 4 months ago

I was expecting it to be under its own endpoint, similar to /api/clients/findByClientNumber/{clientNumber}, like /api/clients/findByClientNumbers

paulushcgcj commented 4 months ago

Works great! does it have to be paginated though?

Yes, as it prevents an overflow of data. Keep in mind that nothing prevents you from requesting 100 items per page though

paulushcgcj commented 4 months ago

I was expecting it to be under its own endpoint, similar to /api/clients/findByClientNumber/{clientNumber}, like /api/clients/findByClientNumbers

We're reworking some of the endpoints naming convention. This one is a more straightforward endpoint, as it is related to search. The idea is all future global search (something that does not have a specific filter like search actives or search individuals only) will be handled here, and you will be able to group multiple query parameters at once to compound your search.

For now you can use multiple IDs, but in the future you can want to search some IDs and want to limit it to be for one specific type and so on.

craigyu commented 4 months ago

Works great! does it have to be paginated though?

Yes, as it prevents an overflow of data. Keep in mind that nothing prevents you from requesting 100 items per page though

My preference is to have this feature under its own endpoint, you could put an upper limit, say 50, but this works too :D

github-actions[bot] commented 4 months ago

Your Pull Request code is being promoted! Please follow the link below. Main Merge Workflow