From 937f8bcc57cc61adfaa69bb8f5d700dd41f2d4b1 Mon Sep 17 00:00:00 2001 From: gianmarcoplutino Date: Wed, 11 Sep 2024 09:26:48 +0200 Subject: [PATCH 1/2] feat: added additionalInformation to Onboarding model --- app/src/main/resources/swagger/api-docs.json | 37 +++++++++++++++++++ .../onboarding/AdditionalInformations.java | 16 ++++++++ .../model/onboarding/OnboardingData.java | 1 + .../openapi/api-selfcare-onboarding-docs.json | 3 ++ .../api/ms_internal_api/v1/openapi.prod.json | 35 ++++++++++++++++++ .../onboarding/AdditionalInformationsDto.java | 16 ++++++++ .../onboarding/OnboardingProductDto.java | 3 ++ .../resources/swagger/swagger_en.properties | 1 + 8 files changed, 112 insertions(+) create mode 100644 connector-api/src/main/java/it/pagopa/selfcare/external_api/model/onboarding/AdditionalInformations.java create mode 100644 web/src/main/java/it/pagopa/selfcare/external_api/web/model/onboarding/AdditionalInformationsDto.java diff --git a/app/src/main/resources/swagger/api-docs.json b/app/src/main/resources/swagger/api-docs.json index a34a35cb..e49b1562 100644 --- a/app/src/main/resources/swagger/api-docs.json +++ b/app/src/main/resources/swagger/api-docs.json @@ -1416,6 +1416,39 @@ }, "components" : { "schemas" : { + "AdditionalInformationsDto" : { + "title" : "AdditionalInformationsDto", + "type" : "object", + "properties" : { + "agentOfPublicService" : { + "type" : "boolean" + }, + "agentOfPublicServiceNote" : { + "type" : "string" + }, + "belongRegulatedMarket" : { + "type" : "boolean" + }, + "establishedByRegulatoryProvision" : { + "type" : "boolean" + }, + "establishedByRegulatoryProvisionNote" : { + "type" : "string" + }, + "ipa" : { + "type" : "boolean" + }, + "ipaCode" : { + "type" : "string" + }, + "otherNote" : { + "type" : "string" + }, + "regulatedMarketNote" : { + "type" : "string" + } + } + }, "AssistanceContactsDto" : { "title" : "AssistanceContactsDto", "type" : "object", @@ -2205,6 +2238,10 @@ "required" : [ "geographicTaxonomies", "institutionType", "productId", "users" ], "type" : "object", "properties" : { + "additionalInformations" : { + "description" : "GSP institution's additional informations", + "$ref" : "#/components/schemas/AdditionalInformationsDto" + }, "assistanceContacts" : { "description" : "Institution's assistance contacts", "$ref" : "#/components/schemas/AssistanceContactsDto" diff --git a/connector-api/src/main/java/it/pagopa/selfcare/external_api/model/onboarding/AdditionalInformations.java b/connector-api/src/main/java/it/pagopa/selfcare/external_api/model/onboarding/AdditionalInformations.java new file mode 100644 index 00000000..e225a151 --- /dev/null +++ b/connector-api/src/main/java/it/pagopa/selfcare/external_api/model/onboarding/AdditionalInformations.java @@ -0,0 +1,16 @@ +package it.pagopa.selfcare.external_api.model.onboarding; + +import lombok.Data; + +@Data +public class AdditionalInformations { + private boolean belongRegulatedMarket; + private String regulatedMarketNote; + private boolean ipa; + private String ipaCode; + private boolean establishedByRegulatoryProvision; + private String establishedByRegulatoryProvisionNote; + private boolean agentOfPublicService; + private String agentOfPublicServiceNote; + private String otherNote; +} diff --git a/connector-api/src/main/java/it/pagopa/selfcare/external_api/model/onboarding/OnboardingData.java b/connector-api/src/main/java/it/pagopa/selfcare/external_api/model/onboarding/OnboardingData.java index ef54f382..f174f59a 100644 --- a/connector-api/src/main/java/it/pagopa/selfcare/external_api/model/onboarding/OnboardingData.java +++ b/connector-api/src/main/java/it/pagopa/selfcare/external_api/model/onboarding/OnboardingData.java @@ -30,6 +30,7 @@ public class OnboardingData { private Boolean sendCompleteOnboardingEmail; private InstitutionLocation location; private OnboardingImportContract contractImported; + private AdditionalInformations additionalInformations; public List getUsers() { return Optional.ofNullable(users).orElse(Collections.emptyList()); diff --git a/connector/rest/docs/openapi/api-selfcare-onboarding-docs.json b/connector/rest/docs/openapi/api-selfcare-onboarding-docs.json index 22ba8a14..03ead155 100644 --- a/connector/rest/docs/openapi/api-selfcare-onboarding-docs.json +++ b/connector/rest/docs/openapi/api-selfcare-onboarding-docs.json @@ -1996,6 +1996,9 @@ }, "billing" : { "$ref" : "#/components/schemas/BillingPaRequest" + }, + "additionalInformations" : { + "$ref" : "#/components/schemas/AdditionalInformationsDto" } } }, diff --git a/infra/apim_v2/api/ms_internal_api/v1/openapi.prod.json b/infra/apim_v2/api/ms_internal_api/v1/openapi.prod.json index 717e2c67..5402c99f 100644 --- a/infra/apim_v2/api/ms_internal_api/v1/openapi.prod.json +++ b/infra/apim_v2/api/ms_internal_api/v1/openapi.prod.json @@ -1314,6 +1314,9 @@ "$ref": "#/components/schemas/GeographicTaxonomyDto" } }, + "additionalInformations" : { + "$ref" : "#/components/schemas/AdditionalInformationsDto" + }, "institutionLocationData": { "description": "Institution's location Data", "$ref": "#/components/schemas/InstitutionLocationDataDto" @@ -1439,6 +1442,38 @@ } } }, + "AdditionalInformationsDto" : { + "type" : "object", + "properties" : { + "belongRegulatedMarket" : { + "type" : "boolean" + }, + "regulatedMarketNote" : { + "type" : "string" + }, + "ipa" : { + "type" : "boolean" + }, + "ipaCode" : { + "type" : "string" + }, + "establishedByRegulatoryProvision" : { + "type" : "boolean" + }, + "establishedByRegulatoryProvisionNote" : { + "type" : "string" + }, + "agentOfPublicService" : { + "type" : "boolean" + }, + "agentOfPublicServiceNote" : { + "type" : "string" + }, + "otherNote" : { + "type" : "string" + } + } + }, "CompanyInformationsDto": { "title": "CompanyInformationsDto", "type": "object", diff --git a/web/src/main/java/it/pagopa/selfcare/external_api/web/model/onboarding/AdditionalInformationsDto.java b/web/src/main/java/it/pagopa/selfcare/external_api/web/model/onboarding/AdditionalInformationsDto.java new file mode 100644 index 00000000..b3133a63 --- /dev/null +++ b/web/src/main/java/it/pagopa/selfcare/external_api/web/model/onboarding/AdditionalInformationsDto.java @@ -0,0 +1,16 @@ +package it.pagopa.selfcare.external_api.web.model.onboarding; + +import lombok.Data; + +@Data +public class AdditionalInformationsDto { + private boolean belongRegulatedMarket; + private String regulatedMarketNote; + private boolean ipa; + private String ipaCode; + private boolean establishedByRegulatoryProvision; + private String establishedByRegulatoryProvisionNote; + private boolean agentOfPublicService; + private String agentOfPublicServiceNote; + private String otherNote; +} diff --git a/web/src/main/java/it/pagopa/selfcare/external_api/web/model/onboarding/OnboardingProductDto.java b/web/src/main/java/it/pagopa/selfcare/external_api/web/model/onboarding/OnboardingProductDto.java index 7fde9352..4629f1e7 100644 --- a/web/src/main/java/it/pagopa/selfcare/external_api/web/model/onboarding/OnboardingProductDto.java +++ b/web/src/main/java/it/pagopa/selfcare/external_api/web/model/onboarding/OnboardingProductDto.java @@ -68,4 +68,7 @@ public class OnboardingProductDto { @ApiModelProperty(value = "${swagger.external_api.institutions.model.subUnitType}") private String subunitType; + + @ApiModelProperty(value = "${swagger.external_api.institutions.model.additionalInformations}") + private AdditionalInformationsDto additionalInformations; } diff --git a/web/src/main/resources/swagger/swagger_en.properties b/web/src/main/resources/swagger/swagger_en.properties index 37242be7..6030ea1b 100644 --- a/web/src/main/resources/swagger/swagger_en.properties +++ b/web/src/main/resources/swagger/swagger_en.properties @@ -43,6 +43,7 @@ swagger.external_api.institutions.model.userRole=Logged user's role swagger.external_api.institutions.model.geographicTaxonomy=Institution's geographic taxonomy swagger.external_api.institutions.model.geographicTaxonomies=List of geographic Taxonomies swagger.external_api.institutions.model.productRoles=Logged user's roles on product +swagger.external_api.institutions.model.additionalInformations=GSP institution's additional informations swagger.external_api.institutions.model.importContract=Institution's old contract information swagger.external_api.institutions.model.rea=Institution's REA swagger.external_api.institutions.model.shareCapital=Institution's share capital value From 192cf5bfc142a09ec85bba57ff81f1867c724ad0 Mon Sep 17 00:00:00 2001 From: gianmarcoplutino Date: Wed, 11 Sep 2024 09:44:28 +0200 Subject: [PATCH 2/2] feat: removed additionalInformationsDto to openapi.prod.json --- .../api/ms_internal_api/v1/openapi.prod.json | 35 ------------------- 1 file changed, 35 deletions(-) diff --git a/infra/apim_v2/api/ms_internal_api/v1/openapi.prod.json b/infra/apim_v2/api/ms_internal_api/v1/openapi.prod.json index 5402c99f..717e2c67 100644 --- a/infra/apim_v2/api/ms_internal_api/v1/openapi.prod.json +++ b/infra/apim_v2/api/ms_internal_api/v1/openapi.prod.json @@ -1314,9 +1314,6 @@ "$ref": "#/components/schemas/GeographicTaxonomyDto" } }, - "additionalInformations" : { - "$ref" : "#/components/schemas/AdditionalInformationsDto" - }, "institutionLocationData": { "description": "Institution's location Data", "$ref": "#/components/schemas/InstitutionLocationDataDto" @@ -1442,38 +1439,6 @@ } } }, - "AdditionalInformationsDto" : { - "type" : "object", - "properties" : { - "belongRegulatedMarket" : { - "type" : "boolean" - }, - "regulatedMarketNote" : { - "type" : "string" - }, - "ipa" : { - "type" : "boolean" - }, - "ipaCode" : { - "type" : "string" - }, - "establishedByRegulatoryProvision" : { - "type" : "boolean" - }, - "establishedByRegulatoryProvisionNote" : { - "type" : "string" - }, - "agentOfPublicService" : { - "type" : "boolean" - }, - "agentOfPublicServiceNote" : { - "type" : "string" - }, - "otherNote" : { - "type" : "string" - } - } - }, "CompanyInformationsDto": { "title": "CompanyInformationsDto", "type": "object",