diff --git a/bpdm-common/src/main/kotlin/org/eclipse/tractusx/bpdm/common/dto/AreaDistrictAlternativDto.kt b/bpdm-common/src/main/kotlin/org/eclipse/tractusx/bpdm/common/dto/AreaDistrictAlternativDto.kt index 6fc6b3d5a..a7a87d295 100644 --- a/bpdm-common/src/main/kotlin/org/eclipse/tractusx/bpdm/common/dto/AreaDistrictAlternativDto.kt +++ b/bpdm-common/src/main/kotlin/org/eclipse/tractusx/bpdm/common/dto/AreaDistrictAlternativDto.kt @@ -26,11 +26,4 @@ data class AreaDistrictAlternativDto( @get:Schema(description = "Identifying code of the Region within the country (e.g. Bayern)") val administrativeAreaLevel1: String? = null, - - @get:Schema(description = "Divides the city in several smaller areas") - val districtLevel1: String? = null, - - @get:Schema(description = "Divides the DistrictLevel1 in several smaller areas. Synonym: Subdistrict") - val districtLevel2: String? = null, - - ) +) diff --git a/bpdm-common/src/main/kotlin/org/eclipse/tractusx/bpdm/common/dto/IdentifierTypeDetailDto.kt b/bpdm-common/src/main/kotlin/org/eclipse/tractusx/bpdm/common/dto/IdentifierTypeDetailDto.kt index 6e442e836..7d0c71a8c 100644 --- a/bpdm-common/src/main/kotlin/org/eclipse/tractusx/bpdm/common/dto/IdentifierTypeDetailDto.kt +++ b/bpdm-common/src/main/kotlin/org/eclipse/tractusx/bpdm/common/dto/IdentifierTypeDetailDto.kt @@ -24,9 +24,9 @@ import io.swagger.v3.oas.annotations.media.Schema @Schema(name = "IdentifierTypeDetailDto", description = "Identifier type validity details") data class IdentifierTypeDetailDto( - @Schema(description = "Country in which this identifier is valid, null for universal identifiers") + @get:Schema(description = "Country in which this identifier is valid, null for universal identifiers") val country: CountryCode?, - @Schema(description = "True if identifier is mandatory in this country") + @get:Schema(description = "True if identifier is mandatory in this country") val mandatory: Boolean ) diff --git a/bpdm-common/src/main/kotlin/org/eclipse/tractusx/bpdm/common/dto/IdentifierTypeDto.kt b/bpdm-common/src/main/kotlin/org/eclipse/tractusx/bpdm/common/dto/IdentifierTypeDto.kt index 5daf58418..260656901 100644 --- a/bpdm-common/src/main/kotlin/org/eclipse/tractusx/bpdm/common/dto/IdentifierTypeDto.kt +++ b/bpdm-common/src/main/kotlin/org/eclipse/tractusx/bpdm/common/dto/IdentifierTypeDto.kt @@ -23,15 +23,15 @@ import io.swagger.v3.oas.annotations.media.Schema @Schema(name = "IdentifierTypeDto", description = "Identifier type definition for legal entity or address") data class IdentifierTypeDto( - @Schema(description = "Unique key (in combination with lsaType) to be used as reference") + @get:Schema(description = "Unique key (in combination with lsaType) to be used as reference") val technicalKey: String, - @Schema(description = "Specifies if this identifier type is valid for legal entities (L) or addresses (A)") + @get:Schema(description = "Specifies if this identifier type is valid for legal entities (L) or addresses (A)") val lsaType: IdentifierLsaType, - @Schema(description = "Full name") + @get:Schema(description = "Full name") val name: String, - @Schema(description = "Validity details") + @get:Schema(description = "Validity details") val details: Collection = listOf() ) diff --git a/bpdm-common/src/main/kotlin/org/eclipse/tractusx/bpdm/common/dto/LegalEntityDto.kt b/bpdm-common/src/main/kotlin/org/eclipse/tractusx/bpdm/common/dto/LegalEntityDto.kt index 694b20039..f0cd3f515 100644 --- a/bpdm-common/src/main/kotlin/org/eclipse/tractusx/bpdm/common/dto/LegalEntityDto.kt +++ b/bpdm-common/src/main/kotlin/org/eclipse/tractusx/bpdm/common/dto/LegalEntityDto.kt @@ -27,10 +27,10 @@ data class LegalEntityDto( @ArraySchema(arraySchema = Schema(description = "Additional identifiers (except BPN)", required = false)) val identifiers: Collection = emptyList(), - @Schema(description = "Legal name the partner goes by") + @get:Schema(description = "Legal name the partner goes by") val legalName: NameDto, - @Schema(description = "Technical key of the legal form") + @get:Schema(description = "Technical key of the legal form") val legalForm: String? = null, @ArraySchema(arraySchema = Schema(description = "Business status")) @@ -39,7 +39,7 @@ data class LegalEntityDto( @ArraySchema(arraySchema = Schema(description = "Classifications", required = false)) val classifications: Collection = emptyList(), - @Schema(description = "Address of the official seat of this legal entity") + @get:Schema(description = "Address of the official seat of this legal entity") val legalAddress: LogisticAddressDto, -) + ) diff --git a/bpdm-common/src/main/kotlin/org/eclipse/tractusx/bpdm/common/dto/LegalEntityIdentifierDto.kt b/bpdm-common/src/main/kotlin/org/eclipse/tractusx/bpdm/common/dto/LegalEntityIdentifierDto.kt index 8be0e21ca..5e418a6b6 100644 --- a/bpdm-common/src/main/kotlin/org/eclipse/tractusx/bpdm/common/dto/LegalEntityIdentifierDto.kt +++ b/bpdm-common/src/main/kotlin/org/eclipse/tractusx/bpdm/common/dto/LegalEntityIdentifierDto.kt @@ -23,12 +23,12 @@ import io.swagger.v3.oas.annotations.media.Schema @Schema(name = "LegalEntityIdentifier", description = "Identifier record for a legal entity") data class LegalEntityIdentifierDto( - @Schema(description = "Value of the identifier") + @get:Schema(description = "Value of the identifier") val value: String, - @Schema(description = "Technical key of the type to which this identifier belongs to") + @get:Schema(description = "Technical key of the type to which this identifier belongs to") val type: String, - @Schema(description = "Body which issued the identifier") + @get:Schema(description = "Body which issued the identifier") val issuingBody: String? ) \ No newline at end of file diff --git a/bpdm-common/src/main/kotlin/org/eclipse/tractusx/bpdm/common/dto/LegalEntityStateDto.kt b/bpdm-common/src/main/kotlin/org/eclipse/tractusx/bpdm/common/dto/LegalEntityStateDto.kt index 0043cad49..09c465105 100644 --- a/bpdm-common/src/main/kotlin/org/eclipse/tractusx/bpdm/common/dto/LegalEntityStateDto.kt +++ b/bpdm-common/src/main/kotlin/org/eclipse/tractusx/bpdm/common/dto/LegalEntityStateDto.kt @@ -25,15 +25,15 @@ import java.time.LocalDateTime @Schema(name = "LegalEntityState", description = "Status record of a legal entity") data class LegalEntityStateDto( - @Schema(description = "Exact, official denotation of the status") + @get:Schema(description = "Exact, official denotation of the status") val officialDenotation: String?, - @Schema(description = "Since when the status is/was valid") + @get:Schema(description = "Since when the status is/was valid") val validFrom: LocalDateTime?, - @Schema(description = "Until the status was valid, if applicable") + @get:Schema(description = "Until the status was valid, if applicable") val validTo: LocalDateTime?, - @Schema(description = "The type of this specified status") + @get:Schema(description = "The type of this specified status") val type: BusinessStateType ) \ No newline at end of file diff --git a/bpdm-common/src/main/kotlin/org/eclipse/tractusx/bpdm/common/dto/LogisticAddressDto.kt b/bpdm-common/src/main/kotlin/org/eclipse/tractusx/bpdm/common/dto/LogisticAddressDto.kt index 70a0a8236..e5f6128ab 100644 --- a/bpdm-common/src/main/kotlin/org/eclipse/tractusx/bpdm/common/dto/LogisticAddressDto.kt +++ b/bpdm-common/src/main/kotlin/org/eclipse/tractusx/bpdm/common/dto/LogisticAddressDto.kt @@ -25,8 +25,10 @@ import io.swagger.v3.oas.annotations.media.Schema @Schema(name = "LogisticAddressDto", description = "Address record for a business partner") data class LogisticAddressDto( - @Schema(description = "Name of the logistic address of the business partner. This is not according to official\n" + - "registers but according to the name the uploading sharing member chooses.") + @get:Schema( + description = "Name of the logistic address of the business partner. This is not according to official\n" + + "registers but according to the name the uploading sharing member chooses." + ) val name: String? = null, @ArraySchema(arraySchema = Schema(description = "Indicates if the LogisticAddress is \"Active\" or \"Inactive\".")) @@ -35,9 +37,9 @@ data class LogisticAddressDto( @ArraySchema(arraySchema = Schema(description = "List of identifiers")) val identifiers: Collection = emptyList(), - @Schema(description = "Physical postal address") + @get:Schema(description = "Physical postal address") val physicalPostalAddress: PhysicalPostalAddressDto, - @Schema(description = "Alternative postal address") + @get:Schema(description = "Alternative postal address") val alternativePostalAddress: AlternativePostalAddressDto? = null ) \ No newline at end of file diff --git a/bpdm-common/src/main/kotlin/org/eclipse/tractusx/bpdm/common/dto/NameDto.kt b/bpdm-common/src/main/kotlin/org/eclipse/tractusx/bpdm/common/dto/NameDto.kt index 4294087af..33b5aef8a 100644 --- a/bpdm-common/src/main/kotlin/org/eclipse/tractusx/bpdm/common/dto/NameDto.kt +++ b/bpdm-common/src/main/kotlin/org/eclipse/tractusx/bpdm/common/dto/NameDto.kt @@ -23,9 +23,9 @@ import io.swagger.v3.oas.annotations.media.Schema @Schema(name = "Name", description = "Name record for a business partner") data class NameDto( - @Schema(description = "Full name") + @get:Schema(description = "Full name") val value: String, - @Schema(description = "Abbreviated name or shorthand") + @get:Schema(description = "Abbreviated name or shorthand") val shortName: String? ) \ No newline at end of file diff --git a/bpdm-common/src/main/kotlin/org/eclipse/tractusx/bpdm/common/dto/NameRegioncodeDto.kt b/bpdm-common/src/main/kotlin/org/eclipse/tractusx/bpdm/common/dto/NameRegioncodeDto.kt index c7936817b..116e0bad9 100644 --- a/bpdm-common/src/main/kotlin/org/eclipse/tractusx/bpdm/common/dto/NameRegioncodeDto.kt +++ b/bpdm-common/src/main/kotlin/org/eclipse/tractusx/bpdm/common/dto/NameRegioncodeDto.kt @@ -23,9 +23,9 @@ import io.swagger.v3.oas.annotations.media.Schema @Schema(name = "NameRegioncodeDto", description = "Region within a country") data class NameRegioncodeDto( - @Schema(description = "Describes the full name of the region within a country according to ISO 3166-214") + @get:Schema(description = "Describes the full name of the region within a country according to ISO 3166-214") val name: String, - @Schema(description = "Abbreviation or shorthand of the area") + @get:Schema(description = "Abbreviation or shorthand of the area") val regionCode: String, ) \ No newline at end of file diff --git a/bpdm-common/src/main/kotlin/org/eclipse/tractusx/bpdm/common/dto/SiteDto.kt b/bpdm-common/src/main/kotlin/org/eclipse/tractusx/bpdm/common/dto/SiteDto.kt index 132a47545..bf2449087 100644 --- a/bpdm-common/src/main/kotlin/org/eclipse/tractusx/bpdm/common/dto/SiteDto.kt +++ b/bpdm-common/src/main/kotlin/org/eclipse/tractusx/bpdm/common/dto/SiteDto.kt @@ -24,12 +24,12 @@ import io.swagger.v3.oas.annotations.media.Schema @Schema(name = "Site", description = "Site record") data class SiteDto( - @Schema(description = "Site name") + @get:Schema(description = "Site name") val name: String, @ArraySchema(arraySchema = Schema(description = "Business status")) val states: Collection = emptyList(), - @Schema(description = "Main address where this site resides") + @get:Schema(description = "Main address where this site resides") val mainAddress: LogisticAddressDto ) \ No newline at end of file diff --git a/bpdm-common/src/main/kotlin/org/eclipse/tractusx/bpdm/common/dto/SiteStateDto.kt b/bpdm-common/src/main/kotlin/org/eclipse/tractusx/bpdm/common/dto/SiteStateDto.kt index 1f95af256..301da9fc4 100644 --- a/bpdm-common/src/main/kotlin/org/eclipse/tractusx/bpdm/common/dto/SiteStateDto.kt +++ b/bpdm-common/src/main/kotlin/org/eclipse/tractusx/bpdm/common/dto/SiteStateDto.kt @@ -25,15 +25,15 @@ import java.time.LocalDateTime @Schema(name = "SiteState", description = "Status record of a site") data class SiteStateDto( - @Schema(description = "Description of the status") + @get:Schema(description = "Description of the status") val description: String?, - @Schema(description = "Since when the status is/was valid") + @get:Schema(description = "Since when the status is/was valid") val validFrom: LocalDateTime?, - @Schema(description = "Until the status was valid, if applicable") + @get:Schema(description = "Until the status was valid, if applicable") val validTo: LocalDateTime?, - @Schema(description = "The type of this specified status") + @get:Schema(description = "The type of this specified status") val type: BusinessStateType ) \ No newline at end of file diff --git a/bpdm-common/src/main/kotlin/org/eclipse/tractusx/bpdm/common/dto/StreetDto.kt b/bpdm-common/src/main/kotlin/org/eclipse/tractusx/bpdm/common/dto/StreetDto.kt index 54b6a1b4d..801e5a8c2 100644 --- a/bpdm-common/src/main/kotlin/org/eclipse/tractusx/bpdm/common/dto/StreetDto.kt +++ b/bpdm-common/src/main/kotlin/org/eclipse/tractusx/bpdm/common/dto/StreetDto.kt @@ -23,15 +23,15 @@ import io.swagger.v3.oas.annotations.media.Schema @Schema(name = "Street", description = "A public road in a city, town, or village, typically with houses and buildings on one or both sides.") data class StreetDto( - @Schema(description = "Describes the official Name of the Street.") + @get:Schema(description = "Describes the official Name of the Street.") val name: String? = null, - @Schema(description = "Describes the House Number") + @get:Schema(description = "Describes the House Number") val houseNumber: String? = null, - @Schema(description = "The Milestone is relevant for long roads without specific house numbers.") + @get:Schema(description = "The Milestone is relevant for long roads without specific house numbers.") val milestone: String? = null, - @Schema(description = "Describes the direction") - val direction: String? = null + @get:Schema(description = "Describes the direction") + val direction: String? = null ) \ No newline at end of file diff --git a/bpdm-common/src/main/kotlin/org/eclipse/tractusx/bpdm/common/service/SaasMappings.kt b/bpdm-common/src/main/kotlin/org/eclipse/tractusx/bpdm/common/service/SaasMappings.kt index 43eee7097..cd3439830 100644 --- a/bpdm-common/src/main/kotlin/org/eclipse/tractusx/bpdm/common/service/SaasMappings.kt +++ b/bpdm-common/src/main/kotlin/org/eclipse/tractusx/bpdm/common/service/SaasMappings.kt @@ -254,9 +254,7 @@ object SaasMappings { deliveryServiceNumber = deliveryServiceNumber, deliveryServiceType = deliveryServiceType, areaPart = AreaDistrictAlternativDto( - administrativeAreaLevel1 = map.adminAreaLevel1(), - districtLevel1 = map.districtLevel1(), - districtLevel2 = map.districtLevel2(), + administrativeAreaLevel1 = map.adminAreaLevel1() ), baseAddress = BasePostalAddressDto( geographicCoordinates = map.geoCoordinates(), diff --git a/bpdm-gate/src/main/kotlin/org/eclipse/tractusx/bpdm/gate/service/ResponseMappings.kt b/bpdm-gate/src/main/kotlin/org/eclipse/tractusx/bpdm/gate/service/ResponseMappings.kt index b7e3af0b3..9209e4cd4 100644 --- a/bpdm-gate/src/main/kotlin/org/eclipse/tractusx/bpdm/gate/service/ResponseMappings.kt +++ b/bpdm-gate/src/main/kotlin/org/eclipse/tractusx/bpdm/gate/service/ResponseMappings.kt @@ -65,8 +65,6 @@ fun AlternativePostalAddressDto.toAlternativePostalAddressEntity(): AlternativeP administrativeAreaLevel1 = null, // TODO Add region mapping Logic postCode = baseAddress.postCode, city = baseAddress.city, - districtLevel1 = areaPart.districtLevel1, - districtLevel2 = areaPart.districtLevel2, street = baseAddress.street?.toStreetEntity(), deliveryServiceType = deliveryServiceType, deliveryServiceNumber = deliveryServiceNumber diff --git a/bpdm-gate/src/main/kotlin/org/eclipse/tractusx/bpdm/gate/service/SaasDtoToSaasAddressMapping.kt b/bpdm-gate/src/main/kotlin/org/eclipse/tractusx/bpdm/gate/service/SaasDtoToSaasAddressMapping.kt index 2a8764e1f..ebd49b834 100644 --- a/bpdm-gate/src/main/kotlin/org/eclipse/tractusx/bpdm/gate/service/SaasDtoToSaasAddressMapping.kt +++ b/bpdm-gate/src/main/kotlin/org/eclipse/tractusx/bpdm/gate/service/SaasDtoToSaasAddressMapping.kt @@ -89,17 +89,7 @@ class SaasDtoToSaasAddressMapping(private val postalAdress: BasePostalAddressDto return listOfNotNull( LocalitySaas( value = postalAdress.city, type = SaasLocalityType.CITY.toSaasTypeDto() - ), - alternateAddress?.areaPart?.districtLevel1?.let { - LocalitySaas( - value = it, type = SaasLocalityType.DISTRICT.toSaasTypeDto() - ) - }, - alternateAddress?.areaPart?.districtLevel2?.let { - LocalitySaas( - value = it, type = SaasLocalityType.QUARTER.toSaasTypeDto() - ) - } + ) ) } diff --git a/bpdm-pool/src/main/kotlin/org/eclipse/tractusx/bpdm/pool/service/BusinessPartnerBuildService.kt b/bpdm-pool/src/main/kotlin/org/eclipse/tractusx/bpdm/pool/service/BusinessPartnerBuildService.kt index 6224cd34f..27764e710 100644 --- a/bpdm-pool/src/main/kotlin/org/eclipse/tractusx/bpdm/pool/service/BusinessPartnerBuildService.kt +++ b/bpdm-pool/src/main/kotlin/org/eclipse/tractusx/bpdm/pool/service/BusinessPartnerBuildService.kt @@ -458,8 +458,6 @@ class BusinessPartnerBuildService( administrativeAreaLevel1 = null, postCode = baseAddress.postCode, city = baseAddress.city, - districtLevel1 = area.districtLevel1, - districtLevel2 = area.districtLevel2, street = baseAddress.street?.let { createStreet(it) }, deliveryServiceType = alternativeAddress.deliveryServiceType, deliveryServiceNumber = alternativeAddress.deliveryServiceNumber