Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SELC-5962] feat: added tag internal-v1 to PDND-infocamere #238

Merged
merged 2 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions app/src/main/resources/swagger/api-docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"name" : "infocamere",
"description" : "Info Camere Controller"
}, {
"name" : "infocamere PDND",
"name" : "infocamere-pdnd",
"description" : "PDND Info Camere Controller"
}, {
"name" : "institution",
Expand Down Expand Up @@ -1143,7 +1143,7 @@
},
"/infocamere-pdnd/institution/{taxCode}" : {
"get" : {
"tags" : [ "infocamere PDND" ],
"tags" : [ "infocamere-pdnd", "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 Expand Up @@ -1216,7 +1216,7 @@
},
"/infocamere-pdnd/institutions" : {
"get" : {
"tags" : [ "infocamere PDND" ],
"tags" : [ "infocamere-pdnd" ],
"summary" : "Get institutions by institution description",
"description" : "Get the list of companies represented by description of the institutions passed as a parameter",
"operationId" : "institutionsPdndByDescriptionUsingGET",
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 @@ -18,34 +19,41 @@
@Slf4j
@RestController
@RequestMapping(value = "/infocamere-pdnd", produces = MediaType.APPLICATION_JSON_VALUE)
@Api(tags = "infocamere PDND")
@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")
@Tag(name = "infocamere-pdnd")
@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));
}
}
Loading