refactor(pcp-request-service): rename REST endpoints and DTOs for clarity

- GET /v1/requests/with-geometry → /v1/requests/map
- GET /v1/requests/{id}/with-cells → /v1/requests/{id}/cells
- GET /v1/cells/with-requests → /v1/cells/priority-map
- CreateRequestRequestDto → CreateRequestDto
- ListRequestsQueryDto → RequestListFilter
- RequestWithGeometry* → RequestMap* (RequestMapItemDto, RequestMapPageDto)
- CellsWithRequestsResponseDto → CellPriorityMapResponseDto
- DeleteRequestStatusDto removed; status field removed from DeleteRequestResponseDto

Updated all consumers (pcp-complex-mission-service, pcp-ui-service, slots-service),
tests, and OpenAPI YAML.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Дмитрий Соловьев
2026-05-30 23:28:45 +03:00
parent 3d508b6be9
commit bb84844674
21 changed files with 545 additions and 136 deletions
@@ -50,7 +50,7 @@ class EarthGridService(webClientBuilderProvider: ObjectProvider<WebClient.Builde
val params = mutableListOf("minImportance=$REQUEST_GRID_MIN_IMPORTANCE")
countLat?.let { params += "countLat=$it" }
countLong?.let { params += "countLong=$it" }
return "/v1/cells/with-requests?${params.joinToString("&")}"
return "/v1/cells/priority-map?${params.joinToString("&")}"
}
private fun CellWithRequestsResponseDto.toEarthCellWithRequestsDto(): EarthCellWithRequestsDTO =
@@ -33,7 +33,7 @@ class EarthGridServiceTest {
val cell = cells.single()
val request = cell.requests.single()
assertEquals("/v1/cells/with-requests", requestedUris.single().path)
assertEquals("/v1/cells/priority-map", requestedUris.single().path)
assertEquals("minImportance=0.001", requestedUris.single().query)
assertFalse(requestedUris.any { uri -> uri.path == "/api/earth-grid/with-requests" })
assertEquals(1L, cell.id)
@@ -55,7 +55,7 @@ class EarthGridServiceTest {
earthGridService().cells(countLat = 12, countLong = 24).toList()
assertEquals("/v1/cells/with-requests", requestedUris.single().path)
assertEquals("/v1/cells/priority-map", requestedUris.single().path)
assertEquals("minImportance=0.001&countLat=12&countLong=24", requestedUris.single().query)
assertFalse(requestedUris.any { uri -> uri.path == "/api/earth-grid/with-requests" })
}
@@ -93,7 +93,7 @@ class EarthGridServiceTest {
}.cells().toList()
assertEquals(itemCount, cells.size)
assertEquals("/v1/cells/with-requests", requestedUris.single().path)
assertEquals("/v1/cells/priority-map", requestedUris.single().path)
assertEquals("minImportance=0.001", requestedUris.single().query)
}
@@ -128,7 +128,7 @@ class EarthGridServiceTest {
responseBody: String
): HttpServer =
HttpServer.create(InetSocketAddress(0), 0).apply {
createContext("/v1/cells/with-requests") { exchange ->
createContext("/v1/cells/priority-map") { exchange ->
requestedUris += exchange.requestURI
exchange.responseHeaders.add("Content-Type", "application/json")
exchange.sendResponseHeaders(200, responseBody.toByteArray().size.toLong())