From 93f6df6d6f7b08fd4d322eb25d4ecefb4eca65bc Mon Sep 17 00:00:00 2001 From: Martin Kaeser Date: Wed, 20 Sep 2023 15:30:03 +0200 Subject: [PATCH] feat(generic bp model): DTO model changes - improved OpenAPI description --- .../bpdm/gate/api/model/IBaseBusinessPartnerDto.kt | 12 ++++++------ .../api/model/response/BusinessPartnerOutputDto.kt | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/bpdm-gate-api/src/main/kotlin/org/eclipse/tractusx/bpdm/gate/api/model/IBaseBusinessPartnerDto.kt b/bpdm-gate-api/src/main/kotlin/org/eclipse/tractusx/bpdm/gate/api/model/IBaseBusinessPartnerDto.kt index eb487f2cf..aec5bc18e 100644 --- a/bpdm-gate-api/src/main/kotlin/org/eclipse/tractusx/bpdm/gate/api/model/IBaseBusinessPartnerDto.kt +++ b/bpdm-gate-api/src/main/kotlin/org/eclipse/tractusx/bpdm/gate/api/model/IBaseBusinessPartnerDto.kt @@ -30,25 +30,25 @@ interface IBaseBusinessPartnerDto { @get:Schema(description = CommonDescription.externalId) val externalId: String - @get:Schema(description = "") + @get:ArraySchema(arraySchema = Schema(description = "The list of name parts to accommodate the different number of name fields in different systems.")) val nameParts: List - @get:Schema(description = "Abbreviated name or shorthand") + @get:Schema(description = "Abbreviated name or shorthand.") val shortName: String? - @get:ArraySchema(arraySchema = Schema(description = "The list of identifiers of the business partner.")) + @get:ArraySchema(arraySchema = Schema(description = "The list of identifiers of the business partner. Sorted and duplicates are removed.")) val identifiers: Collection @get:Schema(description = "Technical key of the legal form.") val legalForm: String? - @get:ArraySchema(arraySchema = Schema(description = "The list of (temporary) states of the business partner.")) + @get:ArraySchema(arraySchema = Schema(description = "The list of (temporary) states of the business partner. Sorted and duplicates are removed.")) val states: Collection - @get:ArraySchema(arraySchema = Schema(description = "The list of classifications of the legal entity, such as a specific industry.")) + @get:ArraySchema(arraySchema = Schema(description = "The list of classifications of the business partner, such as a specific industry. Sorted and duplicates are removed.")) val classifications: Collection - @get:ArraySchema(arraySchema = Schema(description = CommonDescription.roles)) + @get:ArraySchema(arraySchema = Schema(description = "Roles this business partner takes in relation to the sharing member. Sorted and duplicates are removed.")) val roles: Collection @get:Schema(name = "isOwner", description = "True if the sharing member declares itself as the owner of the business partner.") diff --git a/bpdm-gate-api/src/main/kotlin/org/eclipse/tractusx/bpdm/gate/api/model/response/BusinessPartnerOutputDto.kt b/bpdm-gate-api/src/main/kotlin/org/eclipse/tractusx/bpdm/gate/api/model/response/BusinessPartnerOutputDto.kt index b1490aa9e..e4559e855 100644 --- a/bpdm-gate-api/src/main/kotlin/org/eclipse/tractusx/bpdm/gate/api/model/response/BusinessPartnerOutputDto.kt +++ b/bpdm-gate-api/src/main/kotlin/org/eclipse/tractusx/bpdm/gate/api/model/response/BusinessPartnerOutputDto.kt @@ -26,7 +26,7 @@ import org.eclipse.tractusx.bpdm.gate.api.model.* import java.time.Instant -@Schema(description = "Generic business partner output with external id", requiredProperties = ["externalId", "postalAddress", "bpna", "bpnl"]) +@Schema(description = "Generic business partner output with external id", requiredProperties = ["externalId", "postalAddress", "bpnL", "bpnA"]) data class BusinessPartnerOutputDto( override val externalId: String, override val nameParts: List = emptyList(),