Skip to content

Commit

Permalink
feat: added tag internal-v1 to PDND-infocamere
Browse files Browse the repository at this point in the history
  • Loading branch information
gianmarcoplutino committed Nov 6, 2024
1 parent 8c78be9 commit fd0a489
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 25 deletions.
2 changes: 1 addition & 1 deletion app/src/main/resources/swagger/api-docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -1143,7 +1143,7 @@
},
"/infocamere-pdnd/institution/{taxCode}" : {
"get" : {
"tags" : [ "infocamere PDND" ],
"tags" : [ "internal-v1" ],
"summary" : "Get institution by institution taxCode",
"description" : "Get the company represented by taxCode of the institution passed as a parameter",
"operationId" : "institutionPdndByTaxCodeUsingGET",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.v3.oas.annotations.tags.Tag;
import it.pagopa.selfcare.party.registry_proxy.connector.model.nationalregistriespdnd.PDNDBusiness;
import it.pagopa.selfcare.party.registry_proxy.core.PDNDInfoCamereService;
import it.pagopa.selfcare.party.registry_proxy.web.model.PDNDBusinessResource;
Expand All @@ -21,31 +22,37 @@
@Api(tags = "infocamere PDND")
public class PDNDInfoCamereController {

private final PDNDInfoCamereService pdndInfoCamereService;
private final PDNDInfoCamereBusinessMapper pdndBusinessMapper;
private final PDNDInfoCamereService pdndInfoCamereService;
private final PDNDInfoCamereBusinessMapper pdndBusinessMapper;

public PDNDInfoCamereController(PDNDInfoCamereService pdndInfoCamereService, PDNDInfoCamereBusinessMapper pdndBusinessMapper) {
this.pdndInfoCamereService = pdndInfoCamereService;
this.pdndBusinessMapper = pdndBusinessMapper;
}
public PDNDInfoCamereController(
PDNDInfoCamereService pdndInfoCamereService,
PDNDInfoCamereBusinessMapper pdndBusinessMapper) {
this.pdndInfoCamereService = pdndInfoCamereService;
this.pdndBusinessMapper = pdndBusinessMapper;
}

@ResponseStatus(HttpStatus.OK)
@ApiOperation(value = "${swagger.api.infocamere-pdnd.institutions.summary}",
notes = "${swagger.api.infocamere-pdnd.institutions.notes}")
@GetMapping("/institutions")
public ResponseEntity<List<PDNDBusinessResource>> institutionsPdndByDescription(@ApiParam("${swagger.model.institution.description}")
@RequestParam String description) {
List<PDNDBusiness> businessList = pdndInfoCamereService.retrieveInstitutionsPdndByDescription(description);
return ResponseEntity.ok().body(pdndBusinessMapper.toResources(businessList));
}
@ResponseStatus(HttpStatus.OK)
@ApiOperation(
value = "${swagger.api.infocamere-pdnd.institutions.summary}",
notes = "${swagger.api.infocamere-pdnd.institutions.notes}")
@GetMapping("/institutions")
public ResponseEntity<List<PDNDBusinessResource>> institutionsPdndByDescription(
@ApiParam("${swagger.model.institution.description}") @RequestParam String description) {
List<PDNDBusiness> businessList =
pdndInfoCamereService.retrieveInstitutionsPdndByDescription(description);
return ResponseEntity.ok().body(pdndBusinessMapper.toResources(businessList));
}

@ResponseStatus(HttpStatus.OK)
@ApiOperation(value = "${swagger.api.infocamere-pdnd.institution.summary}",
notes = "${swagger.api.infocamere-pdnd.institution.notes}")
@GetMapping("/institution/{taxCode}")
public ResponseEntity<PDNDBusinessResource> institutionPdndByTaxCode(@ApiParam("${swagger.model.institution.taxCode}")
@PathVariable String taxCode) {
PDNDBusiness business = pdndInfoCamereService.retrieveInstitutionPdndByTaxCode(taxCode);
return ResponseEntity.ok().body(pdndBusinessMapper.toResource(business));
}
@Tag(name = "internal-v1")
@ResponseStatus(HttpStatus.OK)
@ApiOperation(
value = "${swagger.api.infocamere-pdnd.institution.summary}",
notes = "${swagger.api.infocamere-pdnd.institution.notes}")
@GetMapping("/institution/{taxCode}")
public ResponseEntity<PDNDBusinessResource> institutionPdndByTaxCode(
@ApiParam("${swagger.model.institution.taxCode}") @PathVariable String taxCode) {
PDNDBusiness business = pdndInfoCamereService.retrieveInstitutionPdndByTaxCode(taxCode);
return ResponseEntity.ok().body(pdndBusinessMapper.toResource(business));
}
}

0 comments on commit fd0a489

Please sign in to comment.