From e76f624439dd271034cefb55b563e6795b1fb6d5 Mon Sep 17 00:00:00 2001 From: Pascal Wilbrink Date: Fri, 24 Mar 2023 16:07:37 +0100 Subject: [PATCH] Renamed BayTypicalResponse.BayTypical to BayTypicalResponse.BayTypicalItem Signed-off-by: Pascal Wilbrink --- .../sitipe/rest/v1/BayTypicalResource.java | 2 +- .../sitipe/rest/v1/model/BayTypicalResponse.java | 16 +++++++--------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/app/src/main/java/org/lfenergy/compas/sitipe/rest/v1/BayTypicalResource.java b/app/src/main/java/org/lfenergy/compas/sitipe/rest/v1/BayTypicalResource.java index cc67d79..a22cb17 100644 --- a/app/src/main/java/org/lfenergy/compas/sitipe/rest/v1/BayTypicalResource.java +++ b/app/src/main/java/org/lfenergy/compas/sitipe/rest/v1/BayTypicalResource.java @@ -41,7 +41,7 @@ public Uni getAssignedBayTypicals() { response.setBayTypicals( this.bayTypicalService.getAssignedBayTypicals() .stream() - .map(BayTypicalResponse.BayTypical::new) + .map(BayTypicalResponse.BayTypicalItem::new) .collect(Collectors.toList()) ); diff --git a/app/src/main/java/org/lfenergy/compas/sitipe/rest/v1/model/BayTypicalResponse.java b/app/src/main/java/org/lfenergy/compas/sitipe/rest/v1/model/BayTypicalResponse.java index b142741..2442bed 100644 --- a/app/src/main/java/org/lfenergy/compas/sitipe/rest/v1/model/BayTypicalResponse.java +++ b/app/src/main/java/org/lfenergy/compas/sitipe/rest/v1/model/BayTypicalResponse.java @@ -7,8 +7,6 @@ import org.eclipse.microprofile.openapi.annotations.media.Schema; import org.lfenergy.compas.sitipe.data.entity.BayTypical; -import javax.persistence.Column; -import javax.persistence.Id; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; @@ -24,19 +22,19 @@ public class BayTypicalResponse { @Schema(description = "List of found BayTypicals in the database.") @XmlElement(name = "BayTypical", namespace = SITIPE_SERVICE_V1_NS_URI) - private List bayTypicals; + private List bayTypicals; - public void setBayTypicals(final List bayTypicals) { + public void setBayTypicals(final List bayTypicals) { this.bayTypicals = bayTypicals; } - public List getBayTypicals() { + public List getBayTypicals() { return bayTypicals; } @Schema(description = "BayTypical found in the database.") @XmlAccessorType(XmlAccessType.FIELD) - public static class BayTypical { + public static class BayTypicalItem { @Schema(description = "Id of the BayTypical.", example = "1") @XmlElement(name = "Id", namespace = SITIPE_SERVICE_V1_NS_URI) @@ -54,7 +52,7 @@ public static class BayTypical { @XmlElement(name = "Version", namespace = SITIPE_SERVICE_V1_NS_URI) private String version; - @Schema(description = "Description of the BayTypical.", example = "") + @Schema(description = "Description of the BayTypical.") @XmlElement(name = "Description", namespace = SITIPE_SERVICE_V1_NS_URI) private String description; @@ -86,8 +84,8 @@ public static class BayTypical { @XmlElement(name = "ReferenceAccessId", namespace = SITIPE_SERVICE_V1_NS_URI) private String referenceAccessId; - public BayTypical( - final org.lfenergy.compas.sitipe.data.entity.BayTypical bt + public BayTypicalItem( + final BayTypical bt ) { this.id = bt.getId(); this.accessId = bt.getAccessId();