WIP city search
LocationBasedServices/mowesta/pipeline/head This commit looks good

This commit is contained in:
2021-02-23 00:43:40 +01:00
parent 1ee872e668
commit 252ee01ca0
10 changed files with 75 additions and 23 deletions
@@ -59,6 +59,27 @@ public interface ILocationService {
@ApiParam(value="The search term.", required=true) @QueryParam("term") @NotNull @Valid String term);
/**
* Returns a page of cities that match the query.
*
* @param pageConfig The page configuration.
* @param context The search context.
* @param term The search term.
* @return A page of hierarchically organized locations that match
* the query.
*/
@GET
@Path("locations/search")
@ApiOperation(value = "Returns a page of cities whose name matches the term.", tags = { Tags.DEFAULT, Tags.LOCATION })
@ApiResponses({
@ApiResponse(code=HttpServletResponse.SC_OK, message="Location hierarchy page retrieved successfully.", response=LocationHierarchyPage.class),
@ApiResponse(code=HttpServletResponse.SC_BAD_REQUEST, message="Invalid request parameter.")
})
@PermitAll
Response searchCities(@BeanParam @Valid PageConfig pageConfig, @BeanParam @Valid SearchContext context,
@ApiParam(value="The search term.", required=true) @QueryParam("term") @NotNull @Valid String term);
/**
* Returns a page of cities that are inside a particular area defined by two coordinates.