diff --git a/openapi/openapi.json b/openapi/openapi.json index f69f0b2..5b75bd3 100644 --- a/openapi/openapi.json +++ b/openapi/openapi.json @@ -667,7 +667,7 @@ "tags": [ "Creditor Institutions" ], - "summary": "Get the list of creditor institutions associated to a station", + "summary": "Get the list of creditor institutions that can be associated to a station", "operationId": "getStationCreditorInstitutions", "parameters": [ { @@ -678,6 +678,20 @@ "schema": { "type": "string" } + }, + { + "name": "ciTaxCodeList", + "in": "query", + "description": "List of Creditor Institution's tax code, restrict the research to this tax code list only", + "required": true, + "schema": { + "maxItems": 10, + "minItems": 0, + "type": "array", + "items": { + "type": "string" + } + } } ], "responses": { @@ -696,7 +710,7 @@ "schema": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/CreditorInstitutionInfo" } } } @@ -2263,7 +2277,7 @@ "CreditorInstitutionInfo": { "required": [ "business_name", - "creditor_institution_code" + "ci_tax_code" ], "type": "object", "properties": { @@ -2272,7 +2286,7 @@ "description": "The business name of the creditor institution", "example": "Comune di Roma" }, - "creditor_institution_code": { + "ci_tax_code": { "type": "string", "description": "The tax code of the creditor institution", "example": "02438750586" @@ -2734,4 +2748,4 @@ } } } -} +} \ No newline at end of file diff --git a/src/main/java/it/gov/pagopa/apiconfig/selfcareintegration/controller/CreditorInstitutionController.java b/src/main/java/it/gov/pagopa/apiconfig/selfcareintegration/controller/CreditorInstitutionController.java index c4da62f..daae327 100644 --- a/src/main/java/it/gov/pagopa/apiconfig/selfcareintegration/controller/CreditorInstitutionController.java +++ b/src/main/java/it/gov/pagopa/apiconfig/selfcareintegration/controller/CreditorInstitutionController.java @@ -104,7 +104,7 @@ public ResponseEntity getStationsDetailsFromCreditorInstitut @GetMapping(value = "/stations/{station-code}", produces = {MediaType.APPLICATION_JSON_VALUE}) public ResponseEntity> getStationCreditorInstitutions( @Parameter(description = "Station's code") @PathVariable("station-code") String stationCode, - @Parameter(description = "List of Creditor Institution's tax code") @RequestParam @Size(max = 10) List ciTaxCodeList + @Parameter(description = "List of Creditor Institution's tax code, restrict the research to this tax code list only") @RequestParam @Size(max = 10) List ciTaxCodeList ) { return ResponseEntity.ok(this.creditorInstitutionsService.getStationCreditorInstitutions(stationCode, ciTaxCodeList)); }