From c8d6ce59bad036b4aa7db3eb442ebbd603d77fd5 Mon Sep 17 00:00:00 2001 From: Giulia Tremolada <124147597+giulia-tremolada@users.noreply.github.com> Date: Fri, 14 Jun 2024 09:13:36 +0200 Subject: [PATCH] [SELC-5093] chore: add support-pnpg tag to getInstitutions (#514) --- app/src/main/resources/swagger/api-docs.json | 2 +- .../mscore/web/controller/InstitutionController.java | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/app/src/main/resources/swagger/api-docs.json b/app/src/main/resources/swagger/api-docs.json index 32bf9b4ed..6ac305111 100644 --- a/app/src/main/resources/swagger/api-docs.json +++ b/app/src/main/resources/swagger/api-docs.json @@ -813,7 +813,7 @@ }, "/institutions" : { "get" : { - "tags" : [ "Institution", "external-v2", "support" ], + "tags" : [ "Institution", "external-v2", "support", "support-pnpg" ], "summary" : "Gets institutions filtering by taxCode and/or subunitCode", "description" : "Gets institutions filtering by taxCode and/or subunitCode", "operationId" : "getInstitutionsUsingGET", diff --git a/web/src/main/java/it/pagopa/selfcare/mscore/web/controller/InstitutionController.java b/web/src/main/java/it/pagopa/selfcare/mscore/web/controller/InstitutionController.java index 2f8e55c24..83bd169fe 100644 --- a/web/src/main/java/it/pagopa/selfcare/mscore/web/controller/InstitutionController.java +++ b/web/src/main/java/it/pagopa/selfcare/mscore/web/controller/InstitutionController.java @@ -32,7 +32,6 @@ import java.util.List; import java.util.Objects; import java.util.Optional; -import java.util.stream.Collectors; @RestController @RequestMapping(value = "/institutions", produces = MediaType.APPLICATION_JSON_VALUE) @@ -72,7 +71,10 @@ public InstitutionController(InstitutionService institutionService, * * Code: 400, Message: Bad Request, DataType: Problem * * Code: 404, Message: Products not found, DataType: Problem */ - @Tags({@Tag(name = "support"), @Tag(name = "external-v2"), @Tag(name = "Institution")}) + @Tag(name = "support") + @Tag(name = "support-pnpg") + @Tag(name = "external-v2") + @Tag(name = "Institution") @ResponseStatus(HttpStatus.OK) @ApiOperation(value = "${swagger.mscore.institutions}", notes = "${swagger.mscore.institutions}") @GetMapping(produces = MediaType.APPLICATION_JSON_VALUE) @@ -96,7 +98,7 @@ public ResponseEntity getInstitutions(@ApiParam("${swagger InstitutionsResponse institutionsResponse = new InstitutionsResponse(); institutionsResponse.setInstitutions(institutions.stream() .map(institutionResourceMapper::toInstitutionResponse) - .collect(Collectors.toList())); + .toList()); return ResponseEntity.ok(institutionsResponse); } @@ -422,7 +424,7 @@ public ResponseEntity getOnboardingsInstitution(@ApiParam(" OnboardingsResponse onboardingsResponse = new OnboardingsResponse(); onboardingsResponse.setOnboardings(onboardings.stream() .map(onboardingResourceMapper::toResponse) - .collect(Collectors.toList())); + .toList()); return ResponseEntity.ok().body(onboardingsResponse); } @@ -494,7 +496,7 @@ public ResponseEntity findFromProduct(@ApiPar InstitutionOnboardingListResponse institutionListResponse = new InstitutionOnboardingListResponse( institutions.stream() .map(InstitutionMapperCustom::toInstitutionOnboardingResponse) - .collect(Collectors.toList())); + .toList()); log.trace("findFromProduct end"); return ResponseEntity.ok().body(institutionListResponse);