Skip to content

Commit 4538edc

Browse files
authored
DTSRD-5698 Updates to retrieveCourtVenuesBySearchString API - depricate court_type parameter (#1131)
1 parent ab91065 commit 4538edc

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

src/main/java/uk/gov/hmcts/reform/lrdapi/controllers/LrdCourtVenueController.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@
6868
@Slf4j
6969
public class LrdCourtVenueController {
7070

71+
private static final String DEPRECATED_COURT_TYPE_ID = "Deprecated parameter, please use `service_code` instead.";
72+
private static final String WARNING_COURT_VENUE_ID = "⚠ **Note: the `court_venue_id` property returned "
73+
+ "should not be used: as it is an internal value that may change.**";
7174

7275
@Value("${loggingComponentName}")
7376
private String loggingComponentName;
@@ -219,17 +222,17 @@ public ResponseEntity<Object> retrieveCourtVenuesByServiceCode(
219222
return ResponseEntity.status(HttpStatus.OK).body(response);
220223
}
221224

225+
222226
@Operation(
223227
summary = "This endpoint will be used for Court Venues search based on partial query. When the consumers "
224228
+ "inputs any 3 characters, they will call this api to fetch "
225229
+ "the required result.",
226-
description = "No roles required to access this API",
230+
description = "No roles required to access this API<br/><br/>" + WARNING_COURT_VENUE_ID,
227231
security = {
228232
@SecurityRequirement(name = "ServiceAuthorization"),
229233
@SecurityRequirement(name = "Authorization")
230234
}
231235
)
232-
233236
@ApiResponse(
234237
responseCode = "200",
235238
description = "Successfully retrieved list of Court Venues for the request provided",
@@ -250,7 +253,6 @@ public ResponseEntity<Object> retrieveCourtVenuesByServiceCode(
250253
description = "Internal Server Error",
251254
content = @Content
252255
)
253-
254256
@GetMapping(
255257
path = "/venue-search",
256258
produces = APPLICATION_JSON_VALUE
@@ -264,7 +266,8 @@ public ResponseEntity<List<LrdCourtVenueResponse>> retrieveCourtVenuesBySearchSt
264266
String searchString,
265267
@RequestParam(value = "court-type-id", required = false)
266268
@Parameter(name = "court-type-id",
267-
description = "Alphabets and Numeric values only allowed in comma separated format")
269+
description = "Alphabets and Numeric values only allowed in comma separated format. <br/><br/>"
270+
+ DEPRECATED_COURT_TYPE_ID, deprecated = true)
268271
String courtTypeId,
269272
@RequestParam(value = "service_code", required = false)
270273
@Parameter(name = "service_code",

0 commit comments

Comments
 (0)