From 45a6bfc9e35fd12d36faae6c63a126a7f5d31372 Mon Sep 17 00:00:00 2001 From: ashanmugavel Date: Thu, 5 Oct 2023 14:43:58 +0200 Subject: [PATCH 01/39] chore: Completed TODO task --- .../common/model/SecurityUtils.java | 6 +-- .../request/StartQualityAlertRequest.java | 12 +++++ .../alert/rest/AlertController.java | 19 ++++---- ... => StartQualityInvestigationRequest.java} | 13 ++++- .../service/QualityNotificationService.java | 8 +--- .../rest/InvestigationsController.java | 25 +++++----- .../exception/StartQualityNotification.java | 47 +++++++++++++++++++ .../alert/service/AlertServiceImpl.java | 9 ++-- .../service/InvestigationServiceImpl.java | 9 ++-- .../edc/model/EdcNotificationModelTest.java | 10 ++-- .../assets/DashboardControllerIT.java | 5 +- .../PublisherInvestigationsControllerIT.java | 14 +++--- .../alert/rest/AlertControllerTest.java | 11 ++--- 13 files changed, 124 insertions(+), 64 deletions(-) rename tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/{StartQualityNotificationRequest.java => StartQualityInvestigationRequest.java} (76%) create mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/model/exception/StartQualityNotification.java diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/model/SecurityUtils.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/model/SecurityUtils.java index d0d2bda19e..b89f412e54 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/model/SecurityUtils.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/model/SecurityUtils.java @@ -23,7 +23,7 @@ import org.apache.commons.text.StringEscapeUtils; import org.eclipse.tractusx.traceability.qualitynotification.application.alert.request.StartQualityAlertRequest; import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.CloseQualityNotificationRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityNotificationRequest; +import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityInvestigationRequest; import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationRequest; import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotification; import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotificationContent; @@ -54,11 +54,11 @@ public static List sanitize(List unSanitizedList) { return null; } - public static StartQualityNotificationRequest sanitize(StartQualityNotificationRequest request) { + public static StartQualityInvestigationRequest sanitize(StartQualityInvestigationRequest request) { String cleanDescription = sanitize(request.getDescription()); String cleanReceiverBpn = sanitize(request.getReceiverBpn()); List cleanPartIds = sanitize(request.getPartIds()); - return StartQualityNotificationRequest.builder() + return StartQualityInvestigationRequest.builder() .description(cleanDescription) .targetDate(request.getTargetDate()) .severity(request.getSeverity()) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/request/StartQualityAlertRequest.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/request/StartQualityAlertRequest.java index 243908186b..2266088c19 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/request/StartQualityAlertRequest.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/request/StartQualityAlertRequest.java @@ -28,6 +28,7 @@ import lombok.Data; import lombok.NoArgsConstructor; import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.QualityNotificationSeverityRequest; +import org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception.StartQualityNotification; import java.time.Instant; import java.util.List; @@ -55,4 +56,15 @@ public class StartQualityAlertRequest { private String bpn; @ApiModelProperty(example = "true") private boolean isAsBuilt = true; + + public static StartQualityNotification toDomain(StartQualityAlertRequest startQualityAlertRequest) { + return StartQualityNotification.builder() + .partIds(startQualityAlertRequest.getPartIds()) + .description(startQualityAlertRequest.getDescription()) + .targetDate(startQualityAlertRequest.getTargetDate()) + .severity(startQualityAlertRequest.getSeverity().toDomain()) + .bpn(startQualityAlertRequest.getBpn()) + .isAsBuilt(startQualityAlertRequest.isAsBuilt()) + .build(); + } } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertController.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertController.java index 0fc06aae27..e0dfdb33b1 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertController.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertController.java @@ -45,11 +45,18 @@ import org.springframework.http.HttpStatus; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseStatus; +import org.springframework.web.bind.annotation.RestController; import qualitynotification.alert.response.AlertResponse; import qualitynotification.base.response.QualityNotificationIdResponse; import static org.eclipse.tractusx.traceability.common.model.SecurityUtils.sanitize; +import static org.eclipse.tractusx.traceability.qualitynotification.application.alert.request.StartQualityAlertRequest.toDomain; import static org.eclipse.tractusx.traceability.qualitynotification.application.validation.UpdateQualityNotificationValidator.validate; @Profile(FeatureFlags.NOTIFICATIONS_ENABLED_PROFILES) @@ -122,15 +129,7 @@ public AlertController(@Qualifier("alertServiceImpl") QualityNotificationService public QualityNotificationIdResponse alertAssets(@RequestBody @Valid StartQualityAlertRequest request) { StartQualityAlertRequest cleanStartQualityAlertRequest = sanitize(request); log.info(API_LOG_START + " with params: {}", cleanStartQualityAlertRequest); - //TODO refactor this method to only take request as parameter - return new QualityNotificationIdResponse(alertService.start( - cleanStartQualityAlertRequest.getPartIds(), - cleanStartQualityAlertRequest.getDescription(), - cleanStartQualityAlertRequest.getTargetDate(), - cleanStartQualityAlertRequest.getSeverity().toDomain(), - cleanStartQualityAlertRequest.getBpn(), - cleanStartQualityAlertRequest.isAsBuilt() - ).value()); + return new QualityNotificationIdResponse(alertService.start(toDomain(cleanStartQualityAlertRequest)).value()); } @Operation(operationId = "getCreatedAlerts", diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/StartQualityNotificationRequest.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/StartQualityInvestigationRequest.java similarity index 76% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/StartQualityNotificationRequest.java rename to tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/StartQualityInvestigationRequest.java index c9a4515fc5..18081424a4 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/StartQualityNotificationRequest.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/StartQualityInvestigationRequest.java @@ -29,6 +29,7 @@ import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; +import org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception.StartQualityNotification; import java.time.Instant; import java.util.List; @@ -37,7 +38,7 @@ @Builder @NoArgsConstructor @AllArgsConstructor -public class StartQualityNotificationRequest { +public class StartQualityInvestigationRequest { @Size(min = 1, max = 100, message = "Specify at least 1 and at most 100 partIds") @ApiModelProperty(example = "[\"urn:uuid:fe99da3d-b0de-4e80-81da-882aebcca978\"]") private List partIds; @@ -54,4 +55,14 @@ public class StartQualityNotificationRequest { private boolean isAsBuilt = true; @ApiModelProperty(example = "BPN00001123123AS") private String receiverBpn; + + public static StartQualityNotification toDomain(StartQualityInvestigationRequest startQualityNotificationRequest) { + return StartQualityNotification.builder() + .partIds(startQualityNotificationRequest.getPartIds()) + .description(startQualityNotificationRequest.getDescription()) + .targetDate(startQualityNotificationRequest.getTargetDate()) + .severity(startQualityNotificationRequest.getSeverity().toDomain()) + .isAsBuilt(startQualityNotificationRequest.isAsBuilt()) + .build(); + } } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/service/QualityNotificationService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/service/QualityNotificationService.java index b70df4e566..32901be7f9 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/service/QualityNotificationService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/service/QualityNotificationService.java @@ -19,19 +19,15 @@ package org.eclipse.tractusx.traceability.qualitynotification.application.base.service; import org.eclipse.tractusx.traceability.common.model.PageResult; +import org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception.StartQualityNotification; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotification; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationId; -import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationSeverity; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationStatus; import org.springframework.data.domain.Pageable; -import java.time.Instant; -import java.util.List; - public interface QualityNotificationService { - // TODO refactor to use request object instead of all params. - QualityNotificationId start(List partIds, String description, Instant targetDate, QualityNotificationSeverity severity, String targetBpn, boolean isAsBuilt); + QualityNotificationId start(StartQualityNotification startQualityAlertDomain); PageResult getCreated(Pageable pageable); diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/investigation/rest/InvestigationsController.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/investigation/rest/InvestigationsController.java index 0f1f332be4..9dd54a4be0 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/investigation/rest/InvestigationsController.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/investigation/rest/InvestigationsController.java @@ -38,7 +38,7 @@ import org.eclipse.tractusx.traceability.common.response.ErrorResponse; import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.CloseQualityNotificationRequest; import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.QualityNotificationStatusRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityNotificationRequest; +import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityInvestigationRequest; import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationRequest; import org.eclipse.tractusx.traceability.qualitynotification.application.base.service.QualityNotificationService; import org.eclipse.tractusx.traceability.qualitynotification.application.investigation.mapper.InvestigationResponseMapper; @@ -47,11 +47,18 @@ import org.springframework.http.HttpStatus; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseStatus; +import org.springframework.web.bind.annotation.RestController; import qualitynotification.base.response.QualityNotificationIdResponse; import qualitynotification.investigation.response.InvestigationResponse; import static org.eclipse.tractusx.traceability.common.model.SecurityUtils.sanitize; +import static org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityInvestigationRequest.toDomain; import static org.eclipse.tractusx.traceability.qualitynotification.application.validation.UpdateQualityNotificationValidator.validate; @Profile(FeatureFlags.NOTIFICATIONS_ENABLED_PROFILES) @@ -122,17 +129,11 @@ public InvestigationsController(@Qualifier("investigationServiceImpl") QualityNo schema = @Schema(implementation = ErrorResponse.class)))}) @PostMapping @ResponseStatus(HttpStatus.CREATED) - public QualityNotificationIdResponse investigateAssets(@RequestBody @Valid StartQualityNotificationRequest request) { - StartQualityNotificationRequest cleanRequest = sanitize(request); + public QualityNotificationIdResponse investigateAssets(@RequestBody @Valid StartQualityInvestigationRequest request) { + StartQualityInvestigationRequest cleanRequest = sanitize(request); log.info(API_LOG_START + " with params: {}", cleanRequest); - return new QualityNotificationIdResponse(investigationService.start( - cleanRequest.getPartIds(), - cleanRequest.getDescription(), - cleanRequest.getTargetDate(), - cleanRequest.getSeverity().toDomain(), - cleanRequest.getReceiverBpn(), - cleanRequest.isAsBuilt()) - .value()); + return new QualityNotificationIdResponse(investigationService.start(toDomain(cleanRequest)).value()); + } @Operation(operationId = "getCreatedInvestigations", diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/model/exception/StartQualityNotification.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/model/exception/StartQualityNotification.java new file mode 100644 index 0000000000..493dfa7c03 --- /dev/null +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/model/exception/StartQualityNotification.java @@ -0,0 +1,47 @@ +/******************************************************************************** + * Copyright (c) 2023 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ + +package org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception; + +import lombok.Builder; +import lombok.Data; +import lombok.Getter; +import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationSeverity; + +import java.time.Instant; +import java.util.List; + +@Builder +@Getter +@Data +public class StartQualityNotification { + + private List partIds; + + private String description; + + private Instant targetDate; + + private QualityNotificationSeverity severity; + + private String bpn; + + private boolean isAsBuilt = true; + +} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/service/AlertServiceImpl.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/service/AlertServiceImpl.java index 9ab66a6840..2f1883ade1 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/service/AlertServiceImpl.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/service/AlertServiceImpl.java @@ -23,18 +23,15 @@ import lombok.extern.slf4j.Slf4j; import org.eclipse.tractusx.traceability.assets.domain.asbuilt.service.AssetAsBuiltServiceImpl; import org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception.AlertNotFoundException; +import org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception.StartQualityNotification; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.AlertRepository; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotification; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationId; -import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationSeverity; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.service.AbstractQualityNotificationService; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.service.NotificationPublisherService; import org.eclipse.tractusx.traceability.qualitynotification.domain.repository.QualityNotificationRepository; import org.springframework.stereotype.Service; -import java.time.Instant; -import java.util.List; - @Slf4j @Service("alertServiceImpl") @RequiredArgsConstructor @@ -60,8 +57,8 @@ protected AssetAsBuiltServiceImpl getAssetAsBuiltServiceImpl() { } @Override - public QualityNotificationId start(List partIds, String description, Instant targetDate, QualityNotificationSeverity severity, String targetBpn, boolean isAsBuilt) { - QualityNotification notification = notificationPublisherService.startAlert(partIds, description, targetDate, severity, targetBpn, isAsBuilt); + public QualityNotificationId start(StartQualityNotification startQualityAlertDomain) { + QualityNotification notification = notificationPublisherService.startAlert(startQualityAlertDomain.getPartIds(), startQualityAlertDomain.getDescription(), startQualityAlertDomain.getTargetDate(), startQualityAlertDomain.getSeverity(), startQualityAlertDomain.getBpn(), startQualityAlertDomain.isAsBuilt()); QualityNotificationId createdAlertId = alertRepository.saveQualityNotificationEntity(notification); log.info("Start Alert {}", notification); diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/investigation/service/InvestigationServiceImpl.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/investigation/service/InvestigationServiceImpl.java index 118fcba13c..ac50d9514f 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/investigation/service/InvestigationServiceImpl.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/investigation/service/InvestigationServiceImpl.java @@ -22,19 +22,16 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.eclipse.tractusx.traceability.assets.domain.asbuilt.service.AssetAsBuiltServiceImpl; +import org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception.StartQualityNotification; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.InvestigationRepository; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotification; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationId; -import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationSeverity; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.service.AbstractQualityNotificationService; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.service.NotificationPublisherService; import org.eclipse.tractusx.traceability.qualitynotification.domain.investigation.model.exception.InvestigationNotFoundException; import org.eclipse.tractusx.traceability.qualitynotification.domain.repository.QualityNotificationRepository; import org.springframework.stereotype.Service; -import java.time.Instant; -import java.util.List; - @Slf4j @RequiredArgsConstructor @Service("investigationServiceImpl") @@ -60,8 +57,8 @@ protected AssetAsBuiltServiceImpl getAssetAsBuiltServiceImpl() { } @Override - public QualityNotificationId start(List partIds, String description, Instant targetDate, QualityNotificationSeverity severity, String receiverBpn, boolean isAsBuilt) { - QualityNotification notification = getNotificationPublisherService().startInvestigation(partIds, description, targetDate, severity, receiverBpn, isAsBuilt); + public QualityNotificationId start(StartQualityNotification startQualityAlertDomain) { + QualityNotification notification = getNotificationPublisherService().startInvestigation(startQualityAlertDomain.getPartIds(), startQualityAlertDomain.getDescription(), startQualityAlertDomain.getTargetDate(), startQualityAlertDomain.getSeverity(), startQualityAlertDomain.getBpn(), startQualityAlertDomain.isAsBuilt()); QualityNotificationId createdInvestigationId = getQualityNotificationRepository().saveQualityNotificationEntity(notification); log.info("Start Investigation {}", notification); diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/model/EdcNotificationModelTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/model/EdcNotificationModelTest.java index bb96fee0ad..ca72696cfc 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/model/EdcNotificationModelTest.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/model/EdcNotificationModelTest.java @@ -19,7 +19,11 @@ package org.eclipse.tractusx.traceability.infrastructure.edc.model; import org.eclipse.tractusx.traceability.qualitynotification.application.alert.request.StartQualityAlertRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.*; +import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.CloseQualityNotificationRequest; +import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.QualityNotificationSeverityRequest; +import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityInvestigationRequest; +import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationRequest; +import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationStatusRequest; import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotification; import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotificationContent; import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotificationHeader; @@ -81,11 +85,11 @@ public void testSanitizeStartQualityNotificationRequest() { partIds.add("urn:uuid:fe99da3d-b0de-4e80-81da-882aebcca979\n"); Instant targetDate = Instant.parse("2023-09-22T14:30:00Z".trim()); QualityNotificationSeverityRequest severity = QualityNotificationSeverityRequest.MINOR; - StartQualityNotificationRequest request = new StartQualityNotificationRequest(partIds, "The description\n", targetDate, severity, true, "BPN00001123123AS\n"); + StartQualityInvestigationRequest request = new StartQualityInvestigationRequest(partIds, "The description\n", targetDate, severity, true, "BPN00001123123AS\n"); //WHEN - StartQualityNotificationRequest cleanRequest = sanitize(request); + StartQualityInvestigationRequest cleanRequest = sanitize(request); //THEN assertEquals("urn:uuid:fe99da3d-b0de-4e80-81da-882aebcca979 ", cleanRequest.getPartIds().get(1)); diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/DashboardControllerIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/DashboardControllerIT.java index 6bdd59adef..8bd9974dcd 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/DashboardControllerIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/DashboardControllerIT.java @@ -29,8 +29,7 @@ import org.eclipse.tractusx.traceability.integration.common.support.AssetsSupport; import org.eclipse.tractusx.traceability.integration.common.support.InvestigationsSupport; import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.QualityNotificationSeverityRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityNotificationRequest; -import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.model.NotificationStatusBaseEntity; +import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityInvestigationRequest; import org.jose4j.lang.JoseException; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -145,7 +144,7 @@ void givenPendingInvestigation_whenGetDashboard_thenReturnPendingInvestigation() assetsSupport.defaultAssetsStored(); investigationsSupport.defaultReceivedInvestigationStored(); String assetId = "urn:uuid:fe99da3d-b0de-4e80-81da-882aebcca978"; - var notificationRequest = StartQualityNotificationRequest.builder() + var notificationRequest = StartQualityInvestigationRequest.builder() .partIds(List.of(assetId)) .description("at least 15 characters long investigation description") .severity(QualityNotificationSeverityRequest.MINOR) diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/investigation/PublisherInvestigationsControllerIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/investigation/PublisherInvestigationsControllerIT.java index beba5ae8c2..8e649fe4d4 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/investigation/PublisherInvestigationsControllerIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/investigation/PublisherInvestigationsControllerIT.java @@ -32,7 +32,7 @@ import org.eclipse.tractusx.traceability.qualitynotification.application.alert.request.StartQualityAlertRequest; import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.CloseQualityNotificationRequest; import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.QualityNotificationSeverityRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityNotificationRequest; +import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityInvestigationRequest; import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationRequest; import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationStatusRequest; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationAffectedPart; @@ -122,7 +122,7 @@ void shouldStartInvestigation() throws JsonProcessingException, JoseException { assetsSupport.defaultAssetsStored(); - val request = StartQualityNotificationRequest.builder() + val request = StartQualityInvestigationRequest.builder() .partIds(partIds) .description(description) .severity(QualityNotificationSeverityRequest.MINOR) @@ -173,7 +173,7 @@ void givenMissingSeverity_whenStartInvestigation_thenBadRequest() throws JsonPro ); String description = "at least 15 characters long investigation description"; - val request = StartQualityNotificationRequest.builder() + val request = StartQualityInvestigationRequest.builder() .partIds(partIds) .description(description) .build(); @@ -262,7 +262,7 @@ void givenWrongStatus_whenUpdateInvestigation_thenBadRequest() throws JsonProces void shouldCancelInvestigation() throws JsonProcessingException, JoseException { // given assetsSupport.defaultAssetsStored(); - val startInvestigationRequest = StartQualityNotificationRequest.builder() + val startInvestigationRequest = StartQualityInvestigationRequest.builder() .partIds(List.of("urn:uuid:fe99da3d-b0de-4e80-81da-882aebcca978")) .description("at least 15 characters long investigation description") .severity(QualityNotificationSeverityRequest.MAJOR) @@ -324,7 +324,7 @@ void shouldApproveInvestigationStatus() throws JsonProcessingException, JoseExce String description = "at least 15 characters long investigation description"; assetsSupport.defaultAssetsStored(); - val startInvestigationRequest = StartQualityNotificationRequest.builder() + val startInvestigationRequest = StartQualityInvestigationRequest.builder() .partIds(partIds) .description(description) .severity(QualityNotificationSeverityRequest.MINOR) @@ -377,7 +377,7 @@ void shouldCloseInvestigationStatus() throws JsonProcessingException, JoseExcept String description = "at least 15 characters long investigation description"; assetsSupport.defaultAssetsStored(); - val startInvestigationRequest = StartQualityNotificationRequest.builder() + val startInvestigationRequest = StartQualityInvestigationRequest.builder() .partIds(partIds) .description(description) .severity(QualityNotificationSeverityRequest.MINOR) @@ -485,7 +485,7 @@ void shouldBeCreatedBySender() throws JsonProcessingException, JoseException { ); String description = "at least 15 characters long investigation description"; assetsSupport.defaultAssetsStored(); - val startInvestigationRequest = StartQualityNotificationRequest.builder() + val startInvestigationRequest = StartQualityInvestigationRequest.builder() .partIds(partIds) .description(description) .severity(QualityNotificationSeverityRequest.MINOR) diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertControllerTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertControllerTest.java index cee1f3f9ad..cbae0b6aa0 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertControllerTest.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertControllerTest.java @@ -34,6 +34,7 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InjectMocks; import org.mockito.Mock; +import org.mockito.Mockito; import org.mockito.junit.jupiter.MockitoExtension; import qualitynotification.alert.response.AlertResponse; import qualitynotification.base.response.QualityNotificationIdResponse; @@ -46,6 +47,7 @@ import java.util.List; import static org.assertj.core.api.Assertions.assertThat; +import static org.eclipse.tractusx.traceability.qualitynotification.application.alert.request.StartQualityAlertRequest.toDomain; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; @@ -56,6 +58,7 @@ class AlertControllerTest { @Mock private QualityNotificationService alertService; + @InjectMocks private AlertController controller; @@ -72,13 +75,7 @@ void givenRequestBody_whenAlertAssets_thenResponse() { .severity(QualityNotificationSeverityRequest.MINOR) .bpn("BPN00001") .build(); - when(alertService.start( - request.getPartIds(), - request.getDescription(), - request.getTargetDate(), - request.getSeverity().toDomain(), - request.getBpn(), request.isAsBuilt() - )).thenReturn(notificationId); + when(alertService.start(Mockito.eq(toDomain(request)))).thenReturn(notificationId); // when final QualityNotificationIdResponse result = controller.alertAssets(request); From ed495d2baf7b6648adf0cb2730d93c3210b0ba8f Mon Sep 17 00:00:00 2001 From: ashanmugavel Date: Thu, 5 Oct 2023 14:49:23 +0200 Subject: [PATCH 02/39] chore: Completed TODO task --- .../domain/alert/model/exception/StartQualityNotification.java | 2 +- .../investigation/PublisherInvestigationsControllerIT.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/model/exception/StartQualityNotification.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/model/exception/StartQualityNotification.java index 493dfa7c03..199eb74190 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/model/exception/StartQualityNotification.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/model/exception/StartQualityNotification.java @@ -42,6 +42,6 @@ public class StartQualityNotification { private String bpn; - private boolean isAsBuilt = true; + private boolean isAsBuilt; } diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/investigation/PublisherInvestigationsControllerIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/investigation/PublisherInvestigationsControllerIT.java index 8e649fe4d4..5e8b39788d 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/investigation/PublisherInvestigationsControllerIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/investigation/PublisherInvestigationsControllerIT.java @@ -111,6 +111,7 @@ void shouldReceiveNotification() { investigationNotificationsSupport.assertNotificationsSize(1); } + @Test void shouldStartInvestigation() throws JsonProcessingException, JoseException { // given List partIds = List.of( From e8fe3feea43edd08b25a0b569dc1197040c20f67 Mon Sep 17 00:00:00 2001 From: ashanmugavel Date: Fri, 6 Oct 2023 14:31:44 +0200 Subject: [PATCH 03/39] chore: Completed TODO task "move to tx-models" --- .../common/model/SecurityUtils.java | 6 +- .../request/StartQualityAlertRequest.java | 12 +--- .../alert/rest/AlertController.java | 4 +- ...a => StartQualityNotificationRequest.java} | 12 +--- .../service/QualityNotificationService.java | 4 +- .../rest/InvestigationsController.java | 10 +-- .../exception/StartQualityNotification.java | 47 ------------ .../StartQualityNotificationDomain.java | 71 +++++++++++++++++++ .../alert/service/AlertServiceImpl.java | 4 +- .../service/InvestigationServiceImpl.java | 4 +- .../edc/model/EdcNotificationModelTest.java | 6 +- .../assets/DashboardControllerIT.java | 4 +- .../PublisherInvestigationsControllerIT.java | 14 ++-- .../alert/rest/AlertControllerTest.java | 4 +- 14 files changed, 103 insertions(+), 99 deletions(-) rename tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/{StartQualityInvestigationRequest.java => StartQualityNotificationRequest.java} (76%) delete mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/model/exception/StartQualityNotification.java create mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/model/exception/StartQualityNotificationDomain.java diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/model/SecurityUtils.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/model/SecurityUtils.java index b89f412e54..57ee9e29e6 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/model/SecurityUtils.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/model/SecurityUtils.java @@ -23,7 +23,7 @@ import org.apache.commons.text.StringEscapeUtils; import org.eclipse.tractusx.traceability.qualitynotification.application.alert.request.StartQualityAlertRequest; import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.CloseQualityNotificationRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityInvestigationRequest; +import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityNotificationRequest; import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationRequest; import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotification; import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotificationContent; @@ -54,11 +54,11 @@ public static List sanitize(List unSanitizedList) { return null; } - public static StartQualityInvestigationRequest sanitize(StartQualityInvestigationRequest request) { + public static StartQualityNotificationRequest sanitize(StartQualityNotificationRequest request) { String cleanDescription = sanitize(request.getDescription()); String cleanReceiverBpn = sanitize(request.getReceiverBpn()); List cleanPartIds = sanitize(request.getPartIds()); - return StartQualityInvestigationRequest.builder() + return StartQualityNotificationRequest.builder() .description(cleanDescription) .targetDate(request.getTargetDate()) .severity(request.getSeverity()) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/request/StartQualityAlertRequest.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/request/StartQualityAlertRequest.java index 2266088c19..2c0d3d7f04 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/request/StartQualityAlertRequest.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/request/StartQualityAlertRequest.java @@ -28,7 +28,6 @@ import lombok.Data; import lombok.NoArgsConstructor; import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.QualityNotificationSeverityRequest; -import org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception.StartQualityNotification; import java.time.Instant; import java.util.List; @@ -57,14 +56,5 @@ public class StartQualityAlertRequest { @ApiModelProperty(example = "true") private boolean isAsBuilt = true; - public static StartQualityNotification toDomain(StartQualityAlertRequest startQualityAlertRequest) { - return StartQualityNotification.builder() - .partIds(startQualityAlertRequest.getPartIds()) - .description(startQualityAlertRequest.getDescription()) - .targetDate(startQualityAlertRequest.getTargetDate()) - .severity(startQualityAlertRequest.getSeverity().toDomain()) - .bpn(startQualityAlertRequest.getBpn()) - .isAsBuilt(startQualityAlertRequest.isAsBuilt()) - .build(); - } + } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertController.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertController.java index e0dfdb33b1..8ff41c844e 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertController.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertController.java @@ -56,8 +56,8 @@ import qualitynotification.base.response.QualityNotificationIdResponse; import static org.eclipse.tractusx.traceability.common.model.SecurityUtils.sanitize; -import static org.eclipse.tractusx.traceability.qualitynotification.application.alert.request.StartQualityAlertRequest.toDomain; import static org.eclipse.tractusx.traceability.qualitynotification.application.validation.UpdateQualityNotificationValidator.validate; +import static org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception.StartQualityNotificationDomain.from; @Profile(FeatureFlags.NOTIFICATIONS_ENABLED_PROFILES) @RestController @@ -129,7 +129,7 @@ public AlertController(@Qualifier("alertServiceImpl") QualityNotificationService public QualityNotificationIdResponse alertAssets(@RequestBody @Valid StartQualityAlertRequest request) { StartQualityAlertRequest cleanStartQualityAlertRequest = sanitize(request); log.info(API_LOG_START + " with params: {}", cleanStartQualityAlertRequest); - return new QualityNotificationIdResponse(alertService.start(toDomain(cleanStartQualityAlertRequest)).value()); + return new QualityNotificationIdResponse(alertService.start(from(cleanStartQualityAlertRequest)).value()); } @Operation(operationId = "getCreatedAlerts", diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/StartQualityInvestigationRequest.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/StartQualityNotificationRequest.java similarity index 76% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/StartQualityInvestigationRequest.java rename to tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/StartQualityNotificationRequest.java index 18081424a4..5661100190 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/StartQualityInvestigationRequest.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/StartQualityNotificationRequest.java @@ -29,7 +29,6 @@ import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception.StartQualityNotification; import java.time.Instant; import java.util.List; @@ -38,7 +37,7 @@ @Builder @NoArgsConstructor @AllArgsConstructor -public class StartQualityInvestigationRequest { +public class StartQualityNotificationRequest { @Size(min = 1, max = 100, message = "Specify at least 1 and at most 100 partIds") @ApiModelProperty(example = "[\"urn:uuid:fe99da3d-b0de-4e80-81da-882aebcca978\"]") private List partIds; @@ -56,13 +55,4 @@ public class StartQualityInvestigationRequest { @ApiModelProperty(example = "BPN00001123123AS") private String receiverBpn; - public static StartQualityNotification toDomain(StartQualityInvestigationRequest startQualityNotificationRequest) { - return StartQualityNotification.builder() - .partIds(startQualityNotificationRequest.getPartIds()) - .description(startQualityNotificationRequest.getDescription()) - .targetDate(startQualityNotificationRequest.getTargetDate()) - .severity(startQualityNotificationRequest.getSeverity().toDomain()) - .isAsBuilt(startQualityNotificationRequest.isAsBuilt()) - .build(); - } } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/service/QualityNotificationService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/service/QualityNotificationService.java index 32901be7f9..95a742faed 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/service/QualityNotificationService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/service/QualityNotificationService.java @@ -19,7 +19,7 @@ package org.eclipse.tractusx.traceability.qualitynotification.application.base.service; import org.eclipse.tractusx.traceability.common.model.PageResult; -import org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception.StartQualityNotification; +import org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception.StartQualityNotificationDomain; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotification; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationId; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationStatus; @@ -27,7 +27,7 @@ public interface QualityNotificationService { - QualityNotificationId start(StartQualityNotification startQualityAlertDomain); + QualityNotificationId start(StartQualityNotificationDomain startQualityAlertDomain); PageResult getCreated(Pageable pageable); diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/investigation/rest/InvestigationsController.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/investigation/rest/InvestigationsController.java index 9dd54a4be0..8ec2cb18f4 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/investigation/rest/InvestigationsController.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/investigation/rest/InvestigationsController.java @@ -38,7 +38,7 @@ import org.eclipse.tractusx.traceability.common.response.ErrorResponse; import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.CloseQualityNotificationRequest; import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.QualityNotificationStatusRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityInvestigationRequest; +import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityNotificationRequest; import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationRequest; import org.eclipse.tractusx.traceability.qualitynotification.application.base.service.QualityNotificationService; import org.eclipse.tractusx.traceability.qualitynotification.application.investigation.mapper.InvestigationResponseMapper; @@ -58,8 +58,8 @@ import qualitynotification.investigation.response.InvestigationResponse; import static org.eclipse.tractusx.traceability.common.model.SecurityUtils.sanitize; -import static org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityInvestigationRequest.toDomain; import static org.eclipse.tractusx.traceability.qualitynotification.application.validation.UpdateQualityNotificationValidator.validate; +import static org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception.StartQualityNotificationDomain.from; @Profile(FeatureFlags.NOTIFICATIONS_ENABLED_PROFILES) @RestController @@ -129,10 +129,10 @@ public InvestigationsController(@Qualifier("investigationServiceImpl") QualityNo schema = @Schema(implementation = ErrorResponse.class)))}) @PostMapping @ResponseStatus(HttpStatus.CREATED) - public QualityNotificationIdResponse investigateAssets(@RequestBody @Valid StartQualityInvestigationRequest request) { - StartQualityInvestigationRequest cleanRequest = sanitize(request); + public QualityNotificationIdResponse investigateAssets(@RequestBody @Valid StartQualityNotificationRequest request) { + StartQualityNotificationRequest cleanRequest = sanitize(request); log.info(API_LOG_START + " with params: {}", cleanRequest); - return new QualityNotificationIdResponse(investigationService.start(toDomain(cleanRequest)).value()); + return new QualityNotificationIdResponse(investigationService.start(from(cleanRequest)).value()); } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/model/exception/StartQualityNotification.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/model/exception/StartQualityNotification.java deleted file mode 100644 index 199eb74190..0000000000 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/model/exception/StartQualityNotification.java +++ /dev/null @@ -1,47 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2023 Contributors to the Eclipse Foundation - * - * See the NOTICE file(s) distributed with this work for additional - * information regarding copyright ownership. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ********************************************************************************/ - -package org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception; - -import lombok.Builder; -import lombok.Data; -import lombok.Getter; -import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationSeverity; - -import java.time.Instant; -import java.util.List; - -@Builder -@Getter -@Data -public class StartQualityNotification { - - private List partIds; - - private String description; - - private Instant targetDate; - - private QualityNotificationSeverity severity; - - private String bpn; - - private boolean isAsBuilt; - -} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/model/exception/StartQualityNotificationDomain.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/model/exception/StartQualityNotificationDomain.java new file mode 100644 index 0000000000..97fe173345 --- /dev/null +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/model/exception/StartQualityNotificationDomain.java @@ -0,0 +1,71 @@ +/******************************************************************************** + * Copyright (c) 2023 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ + +package org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception; + +import lombok.Builder; +import lombok.Data; +import lombok.Getter; +import org.eclipse.tractusx.traceability.qualitynotification.application.alert.request.StartQualityAlertRequest; +import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityNotificationRequest; +import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationSeverity; + +import java.time.Instant; +import java.util.List; + +@Builder +@Getter +@Data +public class StartQualityNotificationDomain { + + private List partIds; + + private String description; + + private Instant targetDate; + + private QualityNotificationSeverity severity; + + private String bpn; + + private boolean isAsBuilt; + + public static StartQualityNotificationDomain from(StartQualityNotificationRequest startQualityNotificationRequest) { + return StartQualityNotificationDomain.builder() + .partIds(startQualityNotificationRequest.getPartIds()) + .description(startQualityNotificationRequest.getDescription()) + .targetDate(startQualityNotificationRequest.getTargetDate()) + .severity(startQualityNotificationRequest.getSeverity().toDomain()) + .bpn(startQualityNotificationRequest.getReceiverBpn()) + .isAsBuilt(startQualityNotificationRequest.isAsBuilt()) + .build(); + } + + public static StartQualityNotificationDomain from(StartQualityAlertRequest startQualityAlertRequest) { + return StartQualityNotificationDomain.builder() + .partIds(startQualityAlertRequest.getPartIds()) + .description(startQualityAlertRequest.getDescription()) + .targetDate(startQualityAlertRequest.getTargetDate()) + .severity(startQualityAlertRequest.getSeverity().toDomain()) + .bpn(startQualityAlertRequest.getBpn()) + .isAsBuilt(startQualityAlertRequest.isAsBuilt()) + .build(); + } + +} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/service/AlertServiceImpl.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/service/AlertServiceImpl.java index 2f1883ade1..061d529388 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/service/AlertServiceImpl.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/service/AlertServiceImpl.java @@ -23,7 +23,7 @@ import lombok.extern.slf4j.Slf4j; import org.eclipse.tractusx.traceability.assets.domain.asbuilt.service.AssetAsBuiltServiceImpl; import org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception.AlertNotFoundException; -import org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception.StartQualityNotification; +import org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception.StartQualityNotificationDomain; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.AlertRepository; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotification; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationId; @@ -57,7 +57,7 @@ protected AssetAsBuiltServiceImpl getAssetAsBuiltServiceImpl() { } @Override - public QualityNotificationId start(StartQualityNotification startQualityAlertDomain) { + public QualityNotificationId start(StartQualityNotificationDomain startQualityAlertDomain) { QualityNotification notification = notificationPublisherService.startAlert(startQualityAlertDomain.getPartIds(), startQualityAlertDomain.getDescription(), startQualityAlertDomain.getTargetDate(), startQualityAlertDomain.getSeverity(), startQualityAlertDomain.getBpn(), startQualityAlertDomain.isAsBuilt()); QualityNotificationId createdAlertId = alertRepository.saveQualityNotificationEntity(notification); diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/investigation/service/InvestigationServiceImpl.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/investigation/service/InvestigationServiceImpl.java index ac50d9514f..2101a50c8a 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/investigation/service/InvestigationServiceImpl.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/investigation/service/InvestigationServiceImpl.java @@ -22,7 +22,7 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.eclipse.tractusx.traceability.assets.domain.asbuilt.service.AssetAsBuiltServiceImpl; -import org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception.StartQualityNotification; +import org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception.StartQualityNotificationDomain; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.InvestigationRepository; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotification; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationId; @@ -57,7 +57,7 @@ protected AssetAsBuiltServiceImpl getAssetAsBuiltServiceImpl() { } @Override - public QualityNotificationId start(StartQualityNotification startQualityAlertDomain) { + public QualityNotificationId start(StartQualityNotificationDomain startQualityAlertDomain) { QualityNotification notification = getNotificationPublisherService().startInvestigation(startQualityAlertDomain.getPartIds(), startQualityAlertDomain.getDescription(), startQualityAlertDomain.getTargetDate(), startQualityAlertDomain.getSeverity(), startQualityAlertDomain.getBpn(), startQualityAlertDomain.isAsBuilt()); QualityNotificationId createdInvestigationId = getQualityNotificationRepository().saveQualityNotificationEntity(notification); diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/model/EdcNotificationModelTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/model/EdcNotificationModelTest.java index ca72696cfc..40e1919b73 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/model/EdcNotificationModelTest.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/model/EdcNotificationModelTest.java @@ -21,7 +21,7 @@ import org.eclipse.tractusx.traceability.qualitynotification.application.alert.request.StartQualityAlertRequest; import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.CloseQualityNotificationRequest; import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.QualityNotificationSeverityRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityInvestigationRequest; +import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityNotificationRequest; import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationRequest; import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationStatusRequest; import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotification; @@ -85,11 +85,11 @@ public void testSanitizeStartQualityNotificationRequest() { partIds.add("urn:uuid:fe99da3d-b0de-4e80-81da-882aebcca979\n"); Instant targetDate = Instant.parse("2023-09-22T14:30:00Z".trim()); QualityNotificationSeverityRequest severity = QualityNotificationSeverityRequest.MINOR; - StartQualityInvestigationRequest request = new StartQualityInvestigationRequest(partIds, "The description\n", targetDate, severity, true, "BPN00001123123AS\n"); + StartQualityNotificationRequest request = new StartQualityNotificationRequest(partIds, "The description\n", targetDate, severity, true, "BPN00001123123AS\n"); //WHEN - StartQualityInvestigationRequest cleanRequest = sanitize(request); + StartQualityNotificationRequest cleanRequest = sanitize(request); //THEN assertEquals("urn:uuid:fe99da3d-b0de-4e80-81da-882aebcca979 ", cleanRequest.getPartIds().get(1)); diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/DashboardControllerIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/DashboardControllerIT.java index 8bd9974dcd..1d8d4282c3 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/DashboardControllerIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/DashboardControllerIT.java @@ -29,7 +29,7 @@ import org.eclipse.tractusx.traceability.integration.common.support.AssetsSupport; import org.eclipse.tractusx.traceability.integration.common.support.InvestigationsSupport; import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.QualityNotificationSeverityRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityInvestigationRequest; +import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityNotificationRequest; import org.jose4j.lang.JoseException; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -144,7 +144,7 @@ void givenPendingInvestigation_whenGetDashboard_thenReturnPendingInvestigation() assetsSupport.defaultAssetsStored(); investigationsSupport.defaultReceivedInvestigationStored(); String assetId = "urn:uuid:fe99da3d-b0de-4e80-81da-882aebcca978"; - var notificationRequest = StartQualityInvestigationRequest.builder() + var notificationRequest = StartQualityNotificationRequest.builder() .partIds(List.of(assetId)) .description("at least 15 characters long investigation description") .severity(QualityNotificationSeverityRequest.MINOR) diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/investigation/PublisherInvestigationsControllerIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/investigation/PublisherInvestigationsControllerIT.java index 5e8b39788d..2a4fed072c 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/investigation/PublisherInvestigationsControllerIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/investigation/PublisherInvestigationsControllerIT.java @@ -32,7 +32,7 @@ import org.eclipse.tractusx.traceability.qualitynotification.application.alert.request.StartQualityAlertRequest; import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.CloseQualityNotificationRequest; import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.QualityNotificationSeverityRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityInvestigationRequest; +import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityNotificationRequest; import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationRequest; import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationStatusRequest; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationAffectedPart; @@ -123,7 +123,7 @@ void shouldStartInvestigation() throws JsonProcessingException, JoseException { assetsSupport.defaultAssetsStored(); - val request = StartQualityInvestigationRequest.builder() + val request = StartQualityNotificationRequest.builder() .partIds(partIds) .description(description) .severity(QualityNotificationSeverityRequest.MINOR) @@ -174,7 +174,7 @@ void givenMissingSeverity_whenStartInvestigation_thenBadRequest() throws JsonPro ); String description = "at least 15 characters long investigation description"; - val request = StartQualityInvestigationRequest.builder() + val request = StartQualityNotificationRequest.builder() .partIds(partIds) .description(description) .build(); @@ -263,7 +263,7 @@ void givenWrongStatus_whenUpdateInvestigation_thenBadRequest() throws JsonProces void shouldCancelInvestigation() throws JsonProcessingException, JoseException { // given assetsSupport.defaultAssetsStored(); - val startInvestigationRequest = StartQualityInvestigationRequest.builder() + val startInvestigationRequest = StartQualityNotificationRequest.builder() .partIds(List.of("urn:uuid:fe99da3d-b0de-4e80-81da-882aebcca978")) .description("at least 15 characters long investigation description") .severity(QualityNotificationSeverityRequest.MAJOR) @@ -325,7 +325,7 @@ void shouldApproveInvestigationStatus() throws JsonProcessingException, JoseExce String description = "at least 15 characters long investigation description"; assetsSupport.defaultAssetsStored(); - val startInvestigationRequest = StartQualityInvestigationRequest.builder() + val startInvestigationRequest = StartQualityNotificationRequest.builder() .partIds(partIds) .description(description) .severity(QualityNotificationSeverityRequest.MINOR) @@ -378,7 +378,7 @@ void shouldCloseInvestigationStatus() throws JsonProcessingException, JoseExcept String description = "at least 15 characters long investigation description"; assetsSupport.defaultAssetsStored(); - val startInvestigationRequest = StartQualityInvestigationRequest.builder() + val startInvestigationRequest = StartQualityNotificationRequest.builder() .partIds(partIds) .description(description) .severity(QualityNotificationSeverityRequest.MINOR) @@ -486,7 +486,7 @@ void shouldBeCreatedBySender() throws JsonProcessingException, JoseException { ); String description = "at least 15 characters long investigation description"; assetsSupport.defaultAssetsStored(); - val startInvestigationRequest = StartQualityInvestigationRequest.builder() + val startInvestigationRequest = StartQualityNotificationRequest.builder() .partIds(partIds) .description(description) .severity(QualityNotificationSeverityRequest.MINOR) diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertControllerTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertControllerTest.java index cbae0b6aa0..b7604086ca 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertControllerTest.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertControllerTest.java @@ -47,7 +47,7 @@ import java.util.List; import static org.assertj.core.api.Assertions.assertThat; -import static org.eclipse.tractusx.traceability.qualitynotification.application.alert.request.StartQualityAlertRequest.toDomain; +import static org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception.StartQualityNotificationDomain.from; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; @@ -75,7 +75,7 @@ void givenRequestBody_whenAlertAssets_thenResponse() { .severity(QualityNotificationSeverityRequest.MINOR) .bpn("BPN00001") .build(); - when(alertService.start(Mockito.eq(toDomain(request)))).thenReturn(notificationId); + when(alertService.start(Mockito.eq(from(request)))).thenReturn(notificationId); // when final QualityNotificationIdResponse result = controller.alertAssets(request); From 691d6561e78af7e1f526a8655eeccb48b6f7c790 Mon Sep 17 00:00:00 2001 From: ashanmugavel Date: Fri, 6 Oct 2023 14:57:49 +0200 Subject: [PATCH 04/39] chore: Completed TODO task "move to tx-models" --- .../traceability/common/model/SecurityUtils.java | 8 ++++---- .../application/alert/rest/AlertController.java | 13 +++++++------ .../rest/InvestigationsController.java | 14 +++++++------- .../UpdateQualityNotificationValidator.java | 2 +- .../exception/StartQualityNotificationDomain.java | 8 ++++---- .../base/model/QualityNotificationSeverity.java | 5 +++++ .../base/model/QualityNotificationStatus.java | 11 +++++++++++ .../edc/model/EdcNotificationModelTest.java | 12 ++++++------ .../integration/assets/DashboardControllerIT.java | 4 ++-- .../alert/PublisherAlertsControllerIT.java | 10 +++++----- .../alert/ReceiverAlertsControllerIT.java | 2 +- .../PublisherInvestigationsControllerIT.java | 12 ++++++------ .../ReceiverInvestigationsControllerIT.java | 2 +- .../alert/rest/AlertControllerTest.java | 10 +++++----- .../QualityNotificationSeverityRequestTest.java | 2 +- .../UpdateQualityNotificationValidatorTest.java | 4 ++-- .../alert/request/StartQualityAlertRequest.java | 6 +++--- .../request/CloseQualityNotificationRequest.java | 4 ++-- .../QualityNotificationSeverityRequest.java | 8 ++------ .../request/QualityNotificationStatusRequest.java | 9 +++------ .../request/StartQualityNotificationRequest.java | 4 ++-- .../request/UpdateQualityNotificationRequest.java | 4 ++-- .../UpdateQualityNotificationStatusRequest.java | 8 ++------ 23 files changed, 84 insertions(+), 78 deletions(-) rename {tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application => tx-models/src/main/java/qualitynotification}/alert/request/StartQualityAlertRequest.java (90%) rename {tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application => tx-models/src/main/java/qualitynotification}/base/request/CloseQualityNotificationRequest.java (92%) rename {tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application => tx-models/src/main/java/qualitynotification}/base/request/QualityNotificationSeverityRequest.java (87%) rename {tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application => tx-models/src/main/java/qualitynotification}/base/request/QualityNotificationStatusRequest.java (70%) rename {tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application => tx-models/src/main/java/qualitynotification}/base/request/StartQualityNotificationRequest.java (95%) rename {tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application => tx-models/src/main/java/qualitynotification}/base/request/UpdateQualityNotificationRequest.java (92%) rename {tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application => tx-models/src/main/java/qualitynotification}/base/request/UpdateQualityNotificationStatusRequest.java (85%) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/model/SecurityUtils.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/model/SecurityUtils.java index 57ee9e29e6..43a85be899 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/model/SecurityUtils.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/model/SecurityUtils.java @@ -21,13 +21,13 @@ import org.apache.commons.text.StringEscapeUtils; -import org.eclipse.tractusx.traceability.qualitynotification.application.alert.request.StartQualityAlertRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.CloseQualityNotificationRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityNotificationRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationRequest; import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotification; import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotificationContent; import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotificationHeader; +import qualitynotification.alert.request.StartQualityAlertRequest; +import qualitynotification.base.request.CloseQualityNotificationRequest; +import qualitynotification.base.request.StartQualityNotificationRequest; +import qualitynotification.base.request.UpdateQualityNotificationRequest; import java.util.List; import java.util.Objects; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertController.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertController.java index 8ff41c844e..d5a1f44211 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertController.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertController.java @@ -35,10 +35,6 @@ import org.eclipse.tractusx.traceability.common.request.OwnPageable; import org.eclipse.tractusx.traceability.common.response.ErrorResponse; import org.eclipse.tractusx.traceability.qualitynotification.application.alert.mapper.AlertResponseMapper; -import org.eclipse.tractusx.traceability.qualitynotification.application.alert.request.StartQualityAlertRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.CloseQualityNotificationRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.QualityNotificationStatusRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationRequest; import org.eclipse.tractusx.traceability.qualitynotification.application.base.service.QualityNotificationService; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.context.annotation.Profile; @@ -52,12 +48,17 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseStatus; import org.springframework.web.bind.annotation.RestController; +import qualitynotification.alert.request.StartQualityAlertRequest; import qualitynotification.alert.response.AlertResponse; +import qualitynotification.base.request.CloseQualityNotificationRequest; +import qualitynotification.base.request.QualityNotificationStatusRequest; +import qualitynotification.base.request.UpdateQualityNotificationRequest; import qualitynotification.base.response.QualityNotificationIdResponse; import static org.eclipse.tractusx.traceability.common.model.SecurityUtils.sanitize; import static org.eclipse.tractusx.traceability.qualitynotification.application.validation.UpdateQualityNotificationValidator.validate; import static org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception.StartQualityNotificationDomain.from; +import static org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationStatus.from; @Profile(FeatureFlags.NOTIFICATIONS_ENABLED_PROFILES) @RestController @@ -488,7 +489,7 @@ public void closeAlert( @Valid @RequestBody CloseQualityNotificationRequest closeAlertRequest) { CloseQualityNotificationRequest cleanCloseAlertRequest = sanitize(closeAlertRequest); log.info(API_LOG_START + "/{}/close with params {}", alertId, cleanCloseAlertRequest); - alertService.update(alertId, QualityNotificationStatusRequest.toDomain(QualityNotificationStatusRequest.CLOSED), cleanCloseAlertRequest.getReason()); + alertService.update(alertId, from(QualityNotificationStatusRequest.CLOSED), cleanCloseAlertRequest.getReason()); } @Operation(operationId = "updateAlert", @@ -553,7 +554,7 @@ public void updateAlert( UpdateQualityNotificationRequest cleanUpdateAlertRequest = sanitize(updateAlertRequest); validate(cleanUpdateAlertRequest); log.info(API_LOG_START + "/{}/update with params {}", alertId, cleanUpdateAlertRequest); - alertService.update(alertId, cleanUpdateAlertRequest.getStatus().toDomain(), cleanUpdateAlertRequest.getReason()); + alertService.update(alertId, from(cleanUpdateAlertRequest.getStatus()), cleanUpdateAlertRequest.getReason()); } } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/investigation/rest/InvestigationsController.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/investigation/rest/InvestigationsController.java index 8ec2cb18f4..511f3e3fdf 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/investigation/rest/InvestigationsController.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/investigation/rest/InvestigationsController.java @@ -36,10 +36,6 @@ import org.eclipse.tractusx.traceability.common.model.PageResult; import org.eclipse.tractusx.traceability.common.request.OwnPageable; import org.eclipse.tractusx.traceability.common.response.ErrorResponse; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.CloseQualityNotificationRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.QualityNotificationStatusRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityNotificationRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationRequest; import org.eclipse.tractusx.traceability.qualitynotification.application.base.service.QualityNotificationService; import org.eclipse.tractusx.traceability.qualitynotification.application.investigation.mapper.InvestigationResponseMapper; import org.springframework.beans.factory.annotation.Qualifier; @@ -54,13 +50,17 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseStatus; import org.springframework.web.bind.annotation.RestController; +import qualitynotification.base.request.CloseQualityNotificationRequest; +import qualitynotification.base.request.QualityNotificationStatusRequest; +import qualitynotification.base.request.StartQualityNotificationRequest; +import qualitynotification.base.request.UpdateQualityNotificationRequest; import qualitynotification.base.response.QualityNotificationIdResponse; import qualitynotification.investigation.response.InvestigationResponse; import static org.eclipse.tractusx.traceability.common.model.SecurityUtils.sanitize; import static org.eclipse.tractusx.traceability.qualitynotification.application.validation.UpdateQualityNotificationValidator.validate; import static org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception.StartQualityNotificationDomain.from; - +import static org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationStatus.from; @Profile(FeatureFlags.NOTIFICATIONS_ENABLED_PROFILES) @RestController @RequestMapping(value = "/investigations", consumes = "application/json", produces = "application/json") @@ -485,7 +485,7 @@ public void cancelInvestigation(@PathVariable Long investigationId) { public void closeInvestigation(@PathVariable Long investigationId, @Valid @RequestBody CloseQualityNotificationRequest closeInvestigationRequest) { CloseQualityNotificationRequest cleanCloseQualityNotificationRequest = sanitize(closeInvestigationRequest); log.info(API_LOG_START + "/{}/close with params {}", investigationId, cleanCloseQualityNotificationRequest); - investigationService.update(investigationId, QualityNotificationStatusRequest.toDomain(QualityNotificationStatusRequest.CLOSED), cleanCloseQualityNotificationRequest.getReason()); + investigationService.update(investigationId, from(QualityNotificationStatusRequest.CLOSED), cleanCloseQualityNotificationRequest.getReason()); } @Operation(operationId = "updateInvestigation", @@ -548,7 +548,7 @@ public void updateInvestigation(@PathVariable Long investigationId, @Valid @Requ UpdateQualityNotificationRequest cleanUpdateQualityNotificationRequest = sanitize(updateInvestigationRequest); validate(cleanUpdateQualityNotificationRequest); log.info(API_LOG_START + "/{}/update with params {}", investigationId, cleanUpdateQualityNotificationRequest); - investigationService.update(investigationId, cleanUpdateQualityNotificationRequest.getStatus().toDomain(), cleanUpdateQualityNotificationRequest.getReason()); + investigationService.update(investigationId, from(cleanUpdateQualityNotificationRequest.getStatus()), cleanUpdateQualityNotificationRequest.getReason()); } } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/validation/UpdateQualityNotificationValidator.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/validation/UpdateQualityNotificationValidator.java index 0065b143c5..68ec0733df 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/validation/UpdateQualityNotificationValidator.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/validation/UpdateQualityNotificationValidator.java @@ -21,8 +21,8 @@ package org.eclipse.tractusx.traceability.qualitynotification.application.validation; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationRequest; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationStatus; +import qualitynotification.base.request.UpdateQualityNotificationRequest; import java.util.Set; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/model/exception/StartQualityNotificationDomain.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/model/exception/StartQualityNotificationDomain.java index 97fe173345..6d0546c3e4 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/model/exception/StartQualityNotificationDomain.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/model/exception/StartQualityNotificationDomain.java @@ -22,9 +22,9 @@ import lombok.Builder; import lombok.Data; import lombok.Getter; -import org.eclipse.tractusx.traceability.qualitynotification.application.alert.request.StartQualityAlertRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityNotificationRequest; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationSeverity; +import qualitynotification.alert.request.StartQualityAlertRequest; +import qualitynotification.base.request.StartQualityNotificationRequest; import java.time.Instant; import java.util.List; @@ -51,7 +51,7 @@ public static StartQualityNotificationDomain from(StartQualityNotificationReques .partIds(startQualityNotificationRequest.getPartIds()) .description(startQualityNotificationRequest.getDescription()) .targetDate(startQualityNotificationRequest.getTargetDate()) - .severity(startQualityNotificationRequest.getSeverity().toDomain()) + .severity(QualityNotificationSeverity.from(startQualityNotificationRequest.getSeverity())) .bpn(startQualityNotificationRequest.getReceiverBpn()) .isAsBuilt(startQualityNotificationRequest.isAsBuilt()) .build(); @@ -62,7 +62,7 @@ public static StartQualityNotificationDomain from(StartQualityAlertRequest start .partIds(startQualityAlertRequest.getPartIds()) .description(startQualityAlertRequest.getDescription()) .targetDate(startQualityAlertRequest.getTargetDate()) - .severity(startQualityAlertRequest.getSeverity().toDomain()) + .severity(QualityNotificationSeverity.from(startQualityAlertRequest.getSeverity())) .bpn(startQualityAlertRequest.getBpn()) .isAsBuilt(startQualityAlertRequest.isAsBuilt()) .build(); diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/model/QualityNotificationSeverity.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/model/QualityNotificationSeverity.java index 188e4a98da..daaea19d3a 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/model/QualityNotificationSeverity.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/model/QualityNotificationSeverity.java @@ -21,6 +21,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import qualitynotification.base.request.QualityNotificationSeverityRequest; @ApiModel(description = "Describes the criticality of a notification") public enum QualityNotificationSeverity { @@ -48,4 +49,8 @@ public static QualityNotificationSeverity fromString(String str) { public String getRealName() { return realName; } + + public static QualityNotificationSeverity from(QualityNotificationSeverityRequest qualityNotificationSeverityRequest) { + return QualityNotificationSeverity.fromString(qualityNotificationSeverityRequest.getRealName()); + } } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/model/QualityNotificationStatus.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/model/QualityNotificationStatus.java index 813b632ebb..72d784a646 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/model/QualityNotificationStatus.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/model/QualityNotificationStatus.java @@ -19,6 +19,9 @@ package org.eclipse.tractusx.traceability.qualitynotification.domain.base.model; +import qualitynotification.base.request.QualityNotificationStatusRequest; +import qualitynotification.base.request.UpdateQualityNotificationStatusRequest; + import java.util.Arrays; import java.util.List; import java.util.Map; @@ -95,4 +98,12 @@ private boolean isSideEligibleForTransition(QualityNotificationStatus from, Qual public boolean isActiveState() { return ACTIVE_STATES.contains(this); } + + public static QualityNotificationStatus from(QualityNotificationStatusRequest qualityNotificationStatusRequest) { + return QualityNotificationStatus.fromStringValue(qualityNotificationStatusRequest.name()); + } + + public static QualityNotificationStatus from(UpdateQualityNotificationStatusRequest qualityNotificationStatusRequest) { + return QualityNotificationStatus.fromStringValue(qualityNotificationStatusRequest.name()); + } } diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/model/EdcNotificationModelTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/model/EdcNotificationModelTest.java index 40e1919b73..4b0fadee6d 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/model/EdcNotificationModelTest.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/model/EdcNotificationModelTest.java @@ -18,16 +18,16 @@ ********************************************************************************/ package org.eclipse.tractusx.traceability.infrastructure.edc.model; -import org.eclipse.tractusx.traceability.qualitynotification.application.alert.request.StartQualityAlertRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.CloseQualityNotificationRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.QualityNotificationSeverityRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityNotificationRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationStatusRequest; import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotification; import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotificationContent; import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotificationHeader; import org.junit.jupiter.api.Test; +import qualitynotification.alert.request.StartQualityAlertRequest; +import qualitynotification.base.request.CloseQualityNotificationRequest; +import qualitynotification.base.request.QualityNotificationSeverityRequest; +import qualitynotification.base.request.StartQualityNotificationRequest; +import qualitynotification.base.request.UpdateQualityNotificationRequest; +import qualitynotification.base.request.UpdateQualityNotificationStatusRequest; import java.time.Instant; import java.util.ArrayList; diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/DashboardControllerIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/DashboardControllerIT.java index 1d8d4282c3..9f39dbd89d 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/DashboardControllerIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/DashboardControllerIT.java @@ -28,8 +28,6 @@ import org.eclipse.tractusx.traceability.integration.common.support.AlertsSupport; import org.eclipse.tractusx.traceability.integration.common.support.AssetsSupport; import org.eclipse.tractusx.traceability.integration.common.support.InvestigationsSupport; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.QualityNotificationSeverityRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityNotificationRequest; import org.jose4j.lang.JoseException; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -39,6 +37,8 @@ import org.springframework.beans.factory.annotation.Autowired; import org.testcontainers.shaded.com.fasterxml.jackson.core.JsonProcessingException; import org.testcontainers.shaded.com.fasterxml.jackson.databind.ObjectMapper; +import qualitynotification.base.request.QualityNotificationSeverityRequest; +import qualitynotification.base.request.StartQualityNotificationRequest; import java.util.List; import java.util.stream.Stream; diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/alert/PublisherAlertsControllerIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/alert/PublisherAlertsControllerIT.java index ca2386eccb..825d29dd70 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/alert/PublisherAlertsControllerIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/alert/PublisherAlertsControllerIT.java @@ -30,11 +30,6 @@ import org.eclipse.tractusx.traceability.integration.common.support.AlertNotificationsSupport; import org.eclipse.tractusx.traceability.integration.common.support.AlertsSupport; import org.eclipse.tractusx.traceability.integration.common.support.AssetsSupport; -import org.eclipse.tractusx.traceability.qualitynotification.application.alert.request.StartQualityAlertRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.CloseQualityNotificationRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.QualityNotificationSeverityRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationStatusRequest; import org.eclipse.tractusx.traceability.qualitynotification.domain.alert.service.AlertsReceiverService; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationAffectedPart; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationMessage; @@ -51,6 +46,11 @@ import org.springframework.transaction.annotation.Transactional; import org.testcontainers.shaded.com.fasterxml.jackson.core.JsonProcessingException; import org.testcontainers.shaded.com.fasterxml.jackson.databind.ObjectMapper; +import qualitynotification.alert.request.StartQualityAlertRequest; +import qualitynotification.base.request.CloseQualityNotificationRequest; +import qualitynotification.base.request.QualityNotificationSeverityRequest; +import qualitynotification.base.request.UpdateQualityNotificationRequest; +import qualitynotification.base.request.UpdateQualityNotificationStatusRequest; import java.time.Instant; import java.util.List; diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/alert/ReceiverAlertsControllerIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/alert/ReceiverAlertsControllerIT.java index 79ad799030..18fccbcf74 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/alert/ReceiverAlertsControllerIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/alert/ReceiverAlertsControllerIT.java @@ -22,7 +22,6 @@ import io.restassured.http.ContentType; import org.eclipse.tractusx.traceability.integration.IntegrationTestSpecification; import org.eclipse.tractusx.traceability.integration.common.support.AlertsSupport; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationStatusRequest; import org.hamcrest.Matchers; import org.jose4j.lang.JoseException; import org.junit.jupiter.api.Test; @@ -30,6 +29,7 @@ import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; import org.springframework.beans.factory.annotation.Autowired; +import qualitynotification.base.request.UpdateQualityNotificationStatusRequest; import java.util.stream.Stream; diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/investigation/PublisherInvestigationsControllerIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/investigation/PublisherInvestigationsControllerIT.java index 2a4fed072c..c485b01e63 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/investigation/PublisherInvestigationsControllerIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/investigation/PublisherInvestigationsControllerIT.java @@ -29,12 +29,6 @@ import org.eclipse.tractusx.traceability.integration.common.support.AssetsSupport; import org.eclipse.tractusx.traceability.integration.common.support.InvestigationNotificationsSupport; import org.eclipse.tractusx.traceability.integration.common.support.InvestigationsSupport; -import org.eclipse.tractusx.traceability.qualitynotification.application.alert.request.StartQualityAlertRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.CloseQualityNotificationRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.QualityNotificationSeverityRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityNotificationRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationStatusRequest; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationAffectedPart; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationMessage; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationSeverity; @@ -51,6 +45,12 @@ import org.springframework.transaction.annotation.Transactional; import org.testcontainers.shaded.com.fasterxml.jackson.core.JsonProcessingException; import org.testcontainers.shaded.com.fasterxml.jackson.databind.ObjectMapper; +import qualitynotification.alert.request.StartQualityAlertRequest; +import qualitynotification.base.request.CloseQualityNotificationRequest; +import qualitynotification.base.request.QualityNotificationSeverityRequest; +import qualitynotification.base.request.StartQualityNotificationRequest; +import qualitynotification.base.request.UpdateQualityNotificationRequest; +import qualitynotification.base.request.UpdateQualityNotificationStatusRequest; import java.time.Instant; import java.util.List; diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/investigation/ReceiverInvestigationsControllerIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/investigation/ReceiverInvestigationsControllerIT.java index 89f4ca8832..0cc19a3436 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/investigation/ReceiverInvestigationsControllerIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/investigation/ReceiverInvestigationsControllerIT.java @@ -23,7 +23,6 @@ import lombok.val; import org.eclipse.tractusx.traceability.integration.IntegrationTestSpecification; import org.eclipse.tractusx.traceability.integration.common.support.InvestigationsSupport; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationStatusRequest; import org.hamcrest.Matchers; import org.jose4j.lang.JoseException; import org.junit.jupiter.api.Test; @@ -31,6 +30,7 @@ import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; import org.springframework.beans.factory.annotation.Autowired; +import qualitynotification.base.request.UpdateQualityNotificationStatusRequest; import java.util.stream.Stream; diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertControllerTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertControllerTest.java index b7604086ca..87765c97c2 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertControllerTest.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertControllerTest.java @@ -19,11 +19,6 @@ package org.eclipse.tractusx.traceability.qualitynotification.application.alert.rest; -import org.eclipse.tractusx.traceability.qualitynotification.application.alert.request.StartQualityAlertRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.CloseQualityNotificationRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.QualityNotificationSeverityRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationStatusRequest; import org.eclipse.tractusx.traceability.qualitynotification.application.base.service.QualityNotificationService; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotification; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationId; @@ -36,7 +31,12 @@ import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.junit.jupiter.MockitoExtension; +import qualitynotification.alert.request.StartQualityAlertRequest; import qualitynotification.alert.response.AlertResponse; +import qualitynotification.base.request.CloseQualityNotificationRequest; +import qualitynotification.base.request.QualityNotificationSeverityRequest; +import qualitynotification.base.request.UpdateQualityNotificationRequest; +import qualitynotification.base.request.UpdateQualityNotificationStatusRequest; import qualitynotification.base.response.QualityNotificationIdResponse; import qualitynotification.base.response.QualityNotificationReasonResponse; import qualitynotification.base.response.QualityNotificationSeverityResponse; diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/application/request/QualityNotificationSeverityRequestTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/application/request/QualityNotificationSeverityRequestTest.java index bde14b9781..876f5e0ba1 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/application/request/QualityNotificationSeverityRequestTest.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/application/request/QualityNotificationSeverityRequestTest.java @@ -21,12 +21,12 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.exc.ValueInstantiationException; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.QualityNotificationSeverityRequest; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; +import qualitynotification.base.request.QualityNotificationSeverityRequest; import java.io.IOException; import java.util.NoSuchElementException; diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/investigation/rest/validation/UpdateQualityNotificationValidatorTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/investigation/rest/validation/UpdateQualityNotificationValidatorTest.java index 9ef7cb93ea..70f0f312f2 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/investigation/rest/validation/UpdateQualityNotificationValidatorTest.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/investigation/rest/validation/UpdateQualityNotificationValidatorTest.java @@ -21,8 +21,6 @@ package org.eclipse.tractusx.traceability.qualitynotification.investigation.rest.validation; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationStatusRequest; import org.eclipse.tractusx.traceability.qualitynotification.application.validation.UpdateQualityNotificationValidationException; import org.eclipse.tractusx.traceability.qualitynotification.application.validation.UpdateQualityNotificationValidator; import org.junit.jupiter.api.DisplayName; @@ -30,6 +28,8 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InjectMocks; import org.mockito.junit.jupiter.MockitoExtension; +import qualitynotification.base.request.UpdateQualityNotificationRequest; +import qualitynotification.base.request.UpdateQualityNotificationStatusRequest; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/request/StartQualityAlertRequest.java b/tx-models/src/main/java/qualitynotification/alert/request/StartQualityAlertRequest.java similarity index 90% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/request/StartQualityAlertRequest.java rename to tx-models/src/main/java/qualitynotification/alert/request/StartQualityAlertRequest.java index 2c0d3d7f04..28b193126d 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/request/StartQualityAlertRequest.java +++ b/tx-models/src/main/java/qualitynotification/alert/request/StartQualityAlertRequest.java @@ -17,7 +17,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.qualitynotification.application.alert.request; +package qualitynotification.alert.request; import io.swagger.annotations.ApiModelProperty; import jakarta.validation.constraints.Future; @@ -27,12 +27,12 @@ import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.QualityNotificationSeverityRequest; +import qualitynotification.base.request.QualityNotificationSeverityRequest; import java.time.Instant; import java.util.List; -// TODO move to tx-models + @Data @Builder @NoArgsConstructor diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/CloseQualityNotificationRequest.java b/tx-models/src/main/java/qualitynotification/base/request/CloseQualityNotificationRequest.java similarity index 92% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/CloseQualityNotificationRequest.java rename to tx-models/src/main/java/qualitynotification/base/request/CloseQualityNotificationRequest.java index f325607e0e..f28020c8d6 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/CloseQualityNotificationRequest.java +++ b/tx-models/src/main/java/qualitynotification/base/request/CloseQualityNotificationRequest.java @@ -19,14 +19,14 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.qualitynotification.application.base.request; +package qualitynotification.base.request; import io.swagger.annotations.ApiModelProperty; import jakarta.validation.constraints.Size; import lombok.Getter; import lombok.Setter; import lombok.ToString; -// TODO move to tx-models + @Setter @Getter @ToString diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/QualityNotificationSeverityRequest.java b/tx-models/src/main/java/qualitynotification/base/request/QualityNotificationSeverityRequest.java similarity index 87% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/QualityNotificationSeverityRequest.java rename to tx-models/src/main/java/qualitynotification/base/request/QualityNotificationSeverityRequest.java index ebb8c79179..4aadc9fe0e 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/QualityNotificationSeverityRequest.java +++ b/tx-models/src/main/java/qualitynotification/base/request/QualityNotificationSeverityRequest.java @@ -17,18 +17,17 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.qualitynotification.application.base.request; +package qualitynotification.base.request; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationSeverity; import java.util.NoSuchElementException; import java.util.stream.Collectors; import java.util.stream.Stream; -// TODO move to tx-models + @ApiModel(description = "Describes the criticality of a notification") public enum QualityNotificationSeverityRequest { MINOR("MINOR"), @@ -58,9 +57,6 @@ private static String supportedQualityNotificationSeverityRequest() { .collect(Collectors.joining(", ")); } - public QualityNotificationSeverity toDomain() { - return QualityNotificationSeverity.fromString(this.getRealName()); - } public String getRealName() { return this.realName; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/QualityNotificationStatusRequest.java b/tx-models/src/main/java/qualitynotification/base/request/QualityNotificationStatusRequest.java similarity index 70% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/QualityNotificationStatusRequest.java rename to tx-models/src/main/java/qualitynotification/base/request/QualityNotificationStatusRequest.java index a04d28ca7b..ed6ffd195a 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/QualityNotificationStatusRequest.java +++ b/tx-models/src/main/java/qualitynotification/base/request/QualityNotificationStatusRequest.java @@ -16,16 +16,13 @@ * * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.qualitynotification.application.base.request; +package qualitynotification.base.request; import io.swagger.annotations.ApiModel; -import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationStatus; -// TODO move to tx-models + @ApiModel(description = "Describes status for closed action") public enum QualityNotificationStatusRequest { CLOSED; - public static QualityNotificationStatus toDomain(QualityNotificationStatusRequest qualityNotificationStatusRequest) { - return QualityNotificationStatus.fromStringValue(qualityNotificationStatusRequest.name()); - } + } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/StartQualityNotificationRequest.java b/tx-models/src/main/java/qualitynotification/base/request/StartQualityNotificationRequest.java similarity index 95% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/StartQualityNotificationRequest.java rename to tx-models/src/main/java/qualitynotification/base/request/StartQualityNotificationRequest.java index 5661100190..deac1229ea 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/StartQualityNotificationRequest.java +++ b/tx-models/src/main/java/qualitynotification/base/request/StartQualityNotificationRequest.java @@ -19,7 +19,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.qualitynotification.application.base.request; +package qualitynotification.base.request; import io.swagger.annotations.ApiModelProperty; import jakarta.validation.constraints.Future; @@ -32,7 +32,7 @@ import java.time.Instant; import java.util.List; -// TODO move to tx-models + @Data @Builder @NoArgsConstructor diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/UpdateQualityNotificationRequest.java b/tx-models/src/main/java/qualitynotification/base/request/UpdateQualityNotificationRequest.java similarity index 92% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/UpdateQualityNotificationRequest.java rename to tx-models/src/main/java/qualitynotification/base/request/UpdateQualityNotificationRequest.java index db705e1dbc..3e7a71394a 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/UpdateQualityNotificationRequest.java +++ b/tx-models/src/main/java/qualitynotification/base/request/UpdateQualityNotificationRequest.java @@ -19,12 +19,12 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.qualitynotification.application.base.request; +package qualitynotification.base.request; import io.swagger.annotations.ApiModelProperty; import jakarta.validation.constraints.NotNull; import lombok.Data; -// TODO move to tx-models + @Data public class UpdateQualityNotificationRequest { @NotNull(message = "status must be present") diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/UpdateQualityNotificationStatusRequest.java b/tx-models/src/main/java/qualitynotification/base/request/UpdateQualityNotificationStatusRequest.java similarity index 85% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/UpdateQualityNotificationStatusRequest.java rename to tx-models/src/main/java/qualitynotification/base/request/UpdateQualityNotificationStatusRequest.java index d4facdbcaa..c14c664db4 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/UpdateQualityNotificationStatusRequest.java +++ b/tx-models/src/main/java/qualitynotification/base/request/UpdateQualityNotificationStatusRequest.java @@ -17,16 +17,15 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.qualitynotification.application.base.request; +package qualitynotification.base.request; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.v3.oas.annotations.media.Schema; -import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationStatus; import java.util.NoSuchElementException; import java.util.stream.Collectors; import java.util.stream.Stream; -// TODO move to tx-models + @Schema(description = "The UpdateInvestigationStatus") public enum UpdateQualityNotificationStatusRequest { ACKNOWLEDGED, @@ -47,9 +46,6 @@ private static String supportedUpdateInvestigationStatus() { return Stream.of(UpdateQualityNotificationStatusRequest.values()).map(Enum::name).collect(Collectors.joining(", ")); } - public QualityNotificationStatus toDomain() { - return QualityNotificationStatus.fromStringValue(this.name()); - } } From 61f0d695369dc266c8081584e161ec6b49080313 Mon Sep 17 00:00:00 2001 From: ashanmugavel Date: Mon, 9 Oct 2023 11:14:03 +0200 Subject: [PATCH 05/39] chore: Completed TODO task "move to tx-models" and removed StartQualityAlertRequest --- CHANGELOG.md | 2 + .../modules/shared/service/alerts.service.ts | 2 +- .../openapi/traceability-foss-backend.json | 1858 ++++++++--------- .../common/model/SecurityUtils.java | 14 - .../alert/rest/AlertController.java | 10 +- .../StartQualityNotificationDomain.java | 19 +- .../alert/service/AlertServiceImpl.java | 2 +- .../service/InvestigationServiceImpl.java | 2 +- .../edc/model/EdcNotificationModelTest.java | 23 - .../alert/PublisherAlertsControllerIT.java | 36 +- .../PublisherInvestigationsControllerIT.java | 3 +- .../alert/rest/AlertControllerTest.java | 6 +- .../request/StartQualityAlertRequest.java | 60 - .../QualityNotificationStatusRequest.java | 2 +- 14 files changed, 951 insertions(+), 1088 deletions(-) delete mode 100644 tx-models/src/main/java/qualitynotification/alert/request/StartQualityAlertRequest.java diff --git a/CHANGELOG.md b/CHANGELOG.md index 5030eb78b9..06595fd358 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### Changed - updated IRS helm chart from 6.6.1 to 6.7.2 - Updated policy related logic to reflect IRS changes +- Moved response handling from the backend folder to the model folder, addressing a TODO item. +- StartQualityAlertRequest class and replaced it with extant StartQualityNotification class ### Removed - Owner filter and replaced it with the new filter query param diff --git a/frontend/src/app/modules/shared/service/alerts.service.ts b/frontend/src/app/modules/shared/service/alerts.service.ts index 4bc549da45..2963098d5d 100644 --- a/frontend/src/app/modules/shared/service/alerts.service.ts +++ b/frontend/src/app/modules/shared/service/alerts.service.ts @@ -83,7 +83,7 @@ export class AlertsService { } public postAlert(partIds: string[], description: string, severity: Severity, bpn: string, isAsBuilt: boolean): Observable { - const body = { partIds, description, severity, bpn, isAsBuilt }; + const body = { partIds, description, severity, receiverBpn: bpn, isAsBuilt }; return this.apiService.post(`${this.url}/alerts`, body).pipe(map(({ id }) => id)); } diff --git a/tx-backend/openapi/traceability-foss-backend.json b/tx-backend/openapi/traceability-foss-backend.json index ae88c4ff01..0e6dc514a8 100644 --- a/tx-backend/openapi/traceability-foss-backend.json +++ b/tx-backend/openapi/traceability-foss-backend.json @@ -51,8 +51,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -61,20 +61,18 @@ } } }, - "200" : { - "description" : "Returns the paged result found", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -83,12 +81,14 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "200" : { + "description" : "Returns the paged result found", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } @@ -103,8 +103,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -113,8 +113,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -165,8 +165,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -175,20 +175,18 @@ } } }, - "200" : { - "description" : "Returns the paged result found for BpnEdcMapping", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -197,8 +195,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -207,8 +205,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -217,18 +215,20 @@ } } }, - "403" : { - "description" : "Forbidden.", + "200" : { + "description" : "Returns the paged result found for BpnEdcMapping", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -279,8 +279,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -289,20 +289,18 @@ } } }, - "200" : { - "description" : "Returns the paged result found for BpnEdcMapping", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -311,8 +309,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -321,8 +319,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -331,18 +329,20 @@ } } }, - "403" : { - "description" : "Forbidden.", + "200" : { + "description" : "Returns the paged result found for BpnEdcMapping", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -380,12 +380,6 @@ } ], "responses" : { - "200" : { - "description" : "Returns the paged result found", - "content" : { - "application/json" : {} - } - }, "404" : { "description" : "Not found.", "content" : { @@ -396,8 +390,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -406,8 +400,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -416,8 +410,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -436,8 +430,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -446,8 +440,14 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "200" : { + "description" : "Returns the paged result found", + "content" : { + "application/json" : {} + } + }, + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -503,8 +503,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -513,8 +513,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -523,8 +523,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -533,9 +533,6 @@ } } }, - "204" : { - "description" : "No Content." - }, "400" : { "description" : "Bad request.", "content" : { @@ -546,8 +543,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -556,8 +553,11 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "204" : { + "description" : "No Content." + }, + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -605,8 +605,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -615,8 +615,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -625,8 +625,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -635,18 +635,18 @@ } } }, - "201" : { - "description" : "Created.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/QualityNotificationIdResponse" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -655,18 +655,18 @@ } } }, - "403" : { - "description" : "Forbidden.", + "201" : { + "description" : "Created.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "$ref" : "#/components/schemas/QualityNotificationIdResponse" } } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -715,9 +715,6 @@ "required" : true }, "responses" : { - "204" : { - "description" : "No content." - }, "404" : { "description" : "Not found.", "content" : { @@ -728,8 +725,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -738,8 +735,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -748,8 +745,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -758,6 +755,9 @@ } } }, + "204" : { + "description" : "No content." + }, "400" : { "description" : "Bad request.", "content" : { @@ -768,8 +768,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -778,8 +778,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -828,9 +828,6 @@ "required" : true }, "responses" : { - "204" : { - "description" : "No content." - }, "404" : { "description" : "Not found.", "content" : { @@ -841,8 +838,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -851,8 +848,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -861,8 +858,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -871,6 +868,9 @@ } } }, + "204" : { + "description" : "No content." + }, "400" : { "description" : "Bad request.", "content" : { @@ -881,8 +881,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -891,8 +891,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -941,8 +941,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -951,12 +951,9 @@ } } }, - "204" : { - "description" : "No content." - }, - "429" : { - "description" : "Too many requests.", - "content" : { + "403" : { + "description" : "Forbidden.", + "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ErrorResponse" @@ -964,8 +961,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -984,8 +981,11 @@ } } }, - "403" : { - "description" : "Forbidden.", + "204" : { + "description" : "No content." + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -994,8 +994,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1034,9 +1034,6 @@ } ], "responses" : { - "204" : { - "description" : "No content." - }, "404" : { "description" : "Not found.", "content" : { @@ -1047,8 +1044,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1057,8 +1054,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1067,8 +1064,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1077,6 +1074,9 @@ } } }, + "204" : { + "description" : "No content." + }, "400" : { "description" : "Bad request.", "content" : { @@ -1087,8 +1087,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1097,8 +1097,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1146,8 +1146,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1156,8 +1156,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1166,8 +1166,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1176,18 +1176,18 @@ } } }, - "201" : { - "description" : "Created.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/CreateNotificationContractResponse" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1196,18 +1196,18 @@ } } }, - "403" : { - "description" : "Forbidden.", + "201" : { + "description" : "Created.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "$ref" : "#/components/schemas/CreateNotificationContractResponse" } } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1255,8 +1255,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1265,8 +1265,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1275,8 +1275,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1285,9 +1285,6 @@ } } }, - "201" : { - "description" : "Created." - }, "400" : { "description" : "Bad request.", "content" : { @@ -1298,8 +1295,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1308,8 +1305,11 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "201" : { + "description" : "Created." + }, + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1357,8 +1357,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1367,8 +1367,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1377,8 +1377,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1387,30 +1387,30 @@ } } }, - "200" : { - "description" : "Returns the paged result found for Asset", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "400" : { - "description" : "Bad request.", + "200" : { + "description" : "Returns the paged result found for Asset", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } }, - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1419,8 +1419,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1468,8 +1468,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1478,8 +1478,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1488,8 +1488,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1498,9 +1498,6 @@ } } }, - "201" : { - "description" : "Created." - }, "400" : { "description" : "Bad request.", "content" : { @@ -1511,8 +1508,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1521,8 +1518,11 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "201" : { + "description" : "Created." + }, + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1570,30 +1570,30 @@ } } }, - "200" : { - "description" : "Returns the paged result found for Asset", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "500" : { - "description" : "Internal server error.", + "200" : { + "description" : "Returns the paged result found for Asset", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } }, - "429" : { - "description" : "Too many requests.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1602,8 +1602,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1622,8 +1622,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1632,8 +1632,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1664,7 +1664,7 @@ "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/StartQualityAlertRequest" + "$ref" : "#/components/schemas/StartQualityNotificationRequest" } } }, @@ -1681,8 +1681,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1691,8 +1691,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1701,8 +1701,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1711,18 +1711,18 @@ } } }, - "201" : { - "description" : "Created.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/QualityNotificationIdResponse" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1731,18 +1731,18 @@ } } }, - "403" : { - "description" : "Forbidden.", + "201" : { + "description" : "Created.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "$ref" : "#/components/schemas/QualityNotificationIdResponse" } } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1791,9 +1791,6 @@ "required" : true }, "responses" : { - "204" : { - "description" : "No content." - }, "404" : { "description" : "Not found.", "content" : { @@ -1804,8 +1801,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1814,8 +1811,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1824,8 +1821,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1834,6 +1831,9 @@ } } }, + "204" : { + "description" : "No content." + }, "400" : { "description" : "Bad request.", "content" : { @@ -1844,8 +1844,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1854,8 +1854,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1904,9 +1904,6 @@ "required" : true }, "responses" : { - "204" : { - "description" : "No content." - }, "404" : { "description" : "Not found.", "content" : { @@ -1917,8 +1914,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1927,8 +1924,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1937,8 +1934,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1947,6 +1944,9 @@ } } }, + "204" : { + "description" : "No content." + }, "400" : { "description" : "Bad request.", "content" : { @@ -1957,8 +1957,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1967,8 +1967,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2007,9 +2007,6 @@ } ], "responses" : { - "204" : { - "description" : "No content." - }, "404" : { "description" : "Not found.", "content" : { @@ -2020,8 +2017,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -2030,8 +2027,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2040,8 +2037,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2050,6 +2047,9 @@ } } }, + "204" : { + "description" : "No content." + }, "400" : { "description" : "Bad request.", "content" : { @@ -2060,8 +2060,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2070,8 +2070,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2120,8 +2120,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -2130,11 +2130,8 @@ } } }, - "204" : { - "description" : "No content." - }, - "429" : { - "description" : "Too many requests.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2143,8 +2140,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2163,8 +2160,11 @@ } } }, - "403" : { - "description" : "Forbidden.", + "204" : { + "description" : "No content." + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2173,8 +2173,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2222,36 +2222,6 @@ } } }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "200" : { "description" : "Returns the assets found", "content" : { @@ -2379,8 +2349,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -2408,6 +2378,36 @@ } } } + }, + "400" : { + "description" : "Bad request.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "401" : { + "description" : "Authorization failed.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "500" : { + "description" : "Internal server error.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } } }, "security" : [ @@ -2456,16 +2456,6 @@ } } }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "429" : { "description" : "Too many requests.", "content" : { @@ -2476,16 +2466,6 @@ } } }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "200" : { "description" : "Returns the updated asset", "content" : { @@ -2613,6 +2593,26 @@ } } }, + "403" : { + "description" : "Forbidden.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "415" : { + "description" : "Unsupported media type", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, "400" : { "description" : "Bad request.", "content" : { @@ -2623,8 +2623,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2633,8 +2633,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2682,8 +2682,48 @@ } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "415" : { + "description" : "Unsupported media type", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "400" : { + "description" : "Bad request.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2819,48 +2859,8 @@ } } }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2906,6 +2906,76 @@ "required" : true }, "responses" : { + "404" : { + "description" : "Not found.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "429" : { + "description" : "Too many requests.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "415" : { + "description" : "Unsupported media type", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "400" : { + "description" : "Bad request.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "401" : { + "description" : "Authorization failed.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "500" : { + "description" : "Internal server error.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, "200" : { "description" : "Returns the updated asset", "content" : { @@ -3032,76 +3102,6 @@ } } } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } } }, "security" : [ @@ -3132,8 +3132,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -3142,21 +3142,18 @@ } } }, - "200" : { - "description" : "ShellDescriptors found.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ShellDescriptorResponse" - } + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3165,8 +3162,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3175,18 +3172,21 @@ } } }, - "400" : { - "description" : "Bad request.", + "200" : { + "description" : "ShellDescriptors found.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ShellDescriptorResponse" + } } } } }, - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -3195,8 +3195,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3233,11 +3233,8 @@ } } }, - "204" : { - "description" : "Deleted." - }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -3246,8 +3243,11 @@ } } }, - "429" : { - "description" : "Too many requests.", + "204" : { + "description" : "Deleted." + }, + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3256,8 +3256,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3276,8 +3276,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -3286,8 +3286,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3325,8 +3325,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -3335,11 +3335,8 @@ } } }, - "202" : { - "description" : "Created registry reload job." - }, - "429" : { - "description" : "Too many requests.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3348,8 +3345,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3368,8 +3365,11 @@ } } }, - "403" : { - "description" : "Forbidden.", + "202" : { + "description" : "Created registry reload job." + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -3378,8 +3378,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3428,6 +3428,16 @@ } } }, + "429" : { + "description" : "Too many requests.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, "200" : { "description" : "OK.", "content" : { @@ -3444,18 +3454,8 @@ } } }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3464,8 +3464,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3484,8 +3484,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -3494,8 +3494,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3543,30 +3543,30 @@ } } }, - "200" : { - "description" : "Returns the paged result found for Asset", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "500" : { - "description" : "Internal server error.", + "200" : { + "description" : "Returns the paged result found for Asset", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } }, - "429" : { - "description" : "Too many requests.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3575,8 +3575,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3595,8 +3595,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -3605,8 +3605,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3644,20 +3644,18 @@ } ], "responses" : { - "200" : { - "description" : "Returns the paged result found for Asset", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "404" : { - "description" : "Not found.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -3666,18 +3664,20 @@ } } }, - "500" : { - "description" : "Internal server error.", + "200" : { + "description" : "Returns the paged result found for Asset", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } }, - "429" : { - "description" : "Too many requests.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3686,8 +3686,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3706,8 +3706,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -3716,8 +3716,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3755,8 +3755,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -3765,8 +3765,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3775,8 +3775,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3785,18 +3785,18 @@ } } }, - "200" : { - "description" : "Returns dashboard data", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/DashboardResponse" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -3805,18 +3805,18 @@ } } }, - "403" : { - "description" : "Forbidden.", + "200" : { + "description" : "Returns dashboard data", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "$ref" : "#/components/schemas/DashboardResponse" } } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3872,6 +3872,46 @@ } } }, + "429" : { + "description" : "Too many requests.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "415" : { + "description" : "Unsupported media type", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "400" : { + "description" : "Bad request.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, "200" : { "description" : "Returns the paged result found for Asset", "content" : { @@ -4004,26 +4044,6 @@ } } }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "401" : { "description" : "Authorization failed.", "content" : { @@ -4034,28 +4054,8 @@ } } }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -4101,6 +4101,56 @@ } ], "responses" : { + "404" : { + "description" : "Not found.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "429" : { + "description" : "Too many requests.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "415" : { + "description" : "Unsupported media type", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "400" : { + "description" : "Bad request.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, "200" : { "description" : "Returns the asset by childId", "content" : { @@ -4204,56 +4254,26 @@ ] }, "classification" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string" - }, - "detailAspectModels" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/DetailAspectModelResponse" - } - }, - "qualityAlertsInStatusActive" : { - "type" : "integer", - "format" : "int32" - }, - "qualityInvestigationsInStatusActive" : { - "type" : "integer", - "format" : "int32" - } - } - } - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxLength" : 255, + "minLength" : 0, + "type" : "string" + }, + "detailAspectModels" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/DetailAspectModelResponse" + } + }, + "qualityAlertsInStatusActive" : { + "type" : "integer", + "format" : "int32" + }, + "qualityInvestigationsInStatusActive" : { + "type" : "integer", + "format" : "int32" + } + } + } } } } @@ -4268,28 +4288,8 @@ } } }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -4347,8 +4347,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -4357,8 +4357,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -4367,20 +4367,18 @@ } } }, - "200" : { - "description" : "Returns a distinct filter values for given fieldName.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "401" : { - "description" : "Authorization failed.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -4389,8 +4387,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -4399,18 +4397,20 @@ } } }, - "403" : { - "description" : "Forbidden.", + "200" : { + "description" : "Returns a distinct filter values for given fieldName.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -4466,8 +4466,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -4476,8 +4476,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -4486,8 +4486,18 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -4628,18 +4638,8 @@ } } }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -4648,8 +4648,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -4695,6 +4695,66 @@ } ], "responses" : { + "404" : { + "description" : "Not found.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "429" : { + "description" : "Too many requests.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "415" : { + "description" : "Unsupported media type", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "400" : { + "description" : "Bad request.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "401" : { + "description" : "Authorization failed.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, "200" : { "description" : "Returns the asset by childId", "content" : { @@ -4822,16 +4882,6 @@ } } }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "500" : { "description" : "Internal server error.", "content" : { @@ -4841,56 +4891,6 @@ } } } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } } }, "security" : [ @@ -4941,8 +4941,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -4951,8 +4951,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -4961,20 +4961,18 @@ } } }, - "200" : { - "description" : "Returns a distinct filter values for given fieldName.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "401" : { - "description" : "Authorization failed.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -4983,8 +4981,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -4993,18 +4991,20 @@ } } }, - "403" : { - "description" : "Forbidden.", + "200" : { + "description" : "Returns a distinct filter values for given fieldName.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5042,32 +5042,32 @@ } } }, - "200" : { - "description" : "Returns the assets found", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { - "type" : "object", - "additionalProperties" : { - "type" : "integer", - "format" : "int64" - } + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "500" : { - "description" : "Internal server error.", + "200" : { + "description" : "Returns the assets found", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "type" : "object", + "additionalProperties" : { + "type" : "integer", + "format" : "int64" + } } } } }, - "429" : { - "description" : "Too many requests.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5076,8 +5076,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -5096,8 +5096,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -5106,8 +5106,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5156,6 +5156,16 @@ } } }, + "429" : { + "description" : "Too many requests.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, "200" : { "description" : "OK.", "content" : { @@ -5171,18 +5181,8 @@ } } }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5191,8 +5191,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -5211,8 +5211,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -5221,8 +5221,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5270,8 +5270,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -5280,8 +5280,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5290,8 +5290,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -5300,29 +5300,29 @@ } } }, - "200" : { - "description" : "Returns the paged result found for Asset", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "400" : { - "description" : "Bad request.", + "200" : { + "description" : "Returns the paged result found for Asset", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "type" : "array" } } } }, - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -5331,8 +5331,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5380,8 +5380,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -5390,8 +5390,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5400,8 +5400,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -5410,29 +5410,29 @@ } } }, - "200" : { - "description" : "Returns the paged result found for Asset", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "400" : { - "description" : "Bad request.", + "200" : { + "description" : "Returns the paged result found for Asset", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "type" : "array" } } } }, - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -5441,8 +5441,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5480,8 +5480,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -5490,8 +5490,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5500,8 +5500,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -5510,9 +5510,6 @@ } } }, - "204" : { - "description" : "No Content." - }, "400" : { "description" : "Bad request.", "content" : { @@ -5523,8 +5520,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -5533,8 +5530,11 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "204" : { + "description" : "No Content." + }, + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5582,11 +5582,8 @@ } } }, - "204" : { - "description" : "Deleted." - }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -5595,8 +5592,11 @@ } } }, - "429" : { - "description" : "Too many requests.", + "204" : { + "description" : "Deleted." + }, + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5605,8 +5605,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -5625,8 +5625,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -5635,8 +5635,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5832,47 +5832,6 @@ } } }, - "StartQualityAlertRequest" : { - "required" : [ - "bpn", - "severity" - ], - "type" : "object", - "properties" : { - "partIds" : { - "maxItems" : 100, - "minItems" : 1, - "type" : "array", - "items" : { - "type" : "string" - } - }, - "description" : { - "maxLength" : 1000, - "minLength" : 15, - "type" : "string" - }, - "targetDate" : { - "type" : "string", - "format" : "date-time" - }, - "severity" : { - "type" : "string", - "enum" : [ - "MINOR", - "MAJOR", - "CRITICAL", - "LIFE_THREATENING" - ] - }, - "bpn" : { - "type" : "string" - }, - "asBuilt" : { - "type" : "boolean" - } - } - }, "UpdateAssetRequest" : { "required" : [ "qualityType" @@ -6237,6 +6196,15 @@ "items" : { "type" : "string" } + }, + "filterOperator" : { + "type" : "string", + "description" : "The filter logical operator", + "example" : "AND", + "enum" : [ + "AND", + "OR" + ] } } }, diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/model/SecurityUtils.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/model/SecurityUtils.java index 43a85be899..3631e29ba7 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/model/SecurityUtils.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/model/SecurityUtils.java @@ -24,7 +24,6 @@ import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotification; import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotificationContent; import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotificationHeader; -import qualitynotification.alert.request.StartQualityAlertRequest; import qualitynotification.base.request.CloseQualityNotificationRequest; import qualitynotification.base.request.StartQualityNotificationRequest; import qualitynotification.base.request.UpdateQualityNotificationRequest; @@ -68,19 +67,6 @@ public static StartQualityNotificationRequest sanitize(StartQualityNotificationR .build(); } - public static StartQualityAlertRequest sanitize(StartQualityAlertRequest request) { - String cleanDescription = sanitize(request.getDescription()); - List cleanPartIds = sanitize(request.getPartIds()); - String cleanBpn = sanitize(request.getBpn()); - return StartQualityAlertRequest.builder() - .partIds(cleanPartIds) - .description(cleanDescription) - .targetDate(request.getTargetDate()) - .severity(request.getSeverity()) - .bpn(cleanBpn) - .isAsBuilt(request.isAsBuilt()) - .build(); - } public static CloseQualityNotificationRequest sanitize(CloseQualityNotificationRequest closeInvestigationRequest) { String cleanReason = sanitize(closeInvestigationRequest.getReason()); diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertController.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertController.java index d5a1f44211..4d4a60ca8d 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertController.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertController.java @@ -48,10 +48,10 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseStatus; import org.springframework.web.bind.annotation.RestController; -import qualitynotification.alert.request.StartQualityAlertRequest; import qualitynotification.alert.response.AlertResponse; import qualitynotification.base.request.CloseQualityNotificationRequest; import qualitynotification.base.request.QualityNotificationStatusRequest; +import qualitynotification.base.request.StartQualityNotificationRequest; import qualitynotification.base.request.UpdateQualityNotificationRequest; import qualitynotification.base.response.QualityNotificationIdResponse; @@ -127,10 +127,10 @@ public AlertController(@Qualifier("alertServiceImpl") QualityNotificationService schema = @Schema(implementation = ErrorResponse.class)))}) @PostMapping @ResponseStatus(HttpStatus.CREATED) - public QualityNotificationIdResponse alertAssets(@RequestBody @Valid StartQualityAlertRequest request) { - StartQualityAlertRequest cleanStartQualityAlertRequest = sanitize(request); - log.info(API_LOG_START + " with params: {}", cleanStartQualityAlertRequest); - return new QualityNotificationIdResponse(alertService.start(from(cleanStartQualityAlertRequest)).value()); + public QualityNotificationIdResponse alertAssets(@RequestBody @Valid StartQualityNotificationRequest request) { + StartQualityNotificationRequest cleanStartQualityNotificationRequest = sanitize(request); + log.info(API_LOG_START + " with params: {}", cleanStartQualityNotificationRequest); + return new QualityNotificationIdResponse(alertService.start(from(cleanStartQualityNotificationRequest)).value()); } @Operation(operationId = "getCreatedAlerts", diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/model/exception/StartQualityNotificationDomain.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/model/exception/StartQualityNotificationDomain.java index 6d0546c3e4..bc92d6bba6 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/model/exception/StartQualityNotificationDomain.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/model/exception/StartQualityNotificationDomain.java @@ -23,7 +23,6 @@ import lombok.Data; import lombok.Getter; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationSeverity; -import qualitynotification.alert.request.StartQualityAlertRequest; import qualitynotification.base.request.StartQualityNotificationRequest; import java.time.Instant; @@ -42,30 +41,22 @@ public class StartQualityNotificationDomain { private QualityNotificationSeverity severity; - private String bpn; - private boolean isAsBuilt; + private String receiverBpn; + + + public static StartQualityNotificationDomain from(StartQualityNotificationRequest startQualityNotificationRequest) { return StartQualityNotificationDomain.builder() .partIds(startQualityNotificationRequest.getPartIds()) .description(startQualityNotificationRequest.getDescription()) .targetDate(startQualityNotificationRequest.getTargetDate()) .severity(QualityNotificationSeverity.from(startQualityNotificationRequest.getSeverity())) - .bpn(startQualityNotificationRequest.getReceiverBpn()) + .receiverBpn(startQualityNotificationRequest.getReceiverBpn()) .isAsBuilt(startQualityNotificationRequest.isAsBuilt()) .build(); } - public static StartQualityNotificationDomain from(StartQualityAlertRequest startQualityAlertRequest) { - return StartQualityNotificationDomain.builder() - .partIds(startQualityAlertRequest.getPartIds()) - .description(startQualityAlertRequest.getDescription()) - .targetDate(startQualityAlertRequest.getTargetDate()) - .severity(QualityNotificationSeverity.from(startQualityAlertRequest.getSeverity())) - .bpn(startQualityAlertRequest.getBpn()) - .isAsBuilt(startQualityAlertRequest.isAsBuilt()) - .build(); - } } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/service/AlertServiceImpl.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/service/AlertServiceImpl.java index 061d529388..af95dc32fd 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/service/AlertServiceImpl.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/service/AlertServiceImpl.java @@ -58,7 +58,7 @@ protected AssetAsBuiltServiceImpl getAssetAsBuiltServiceImpl() { @Override public QualityNotificationId start(StartQualityNotificationDomain startQualityAlertDomain) { - QualityNotification notification = notificationPublisherService.startAlert(startQualityAlertDomain.getPartIds(), startQualityAlertDomain.getDescription(), startQualityAlertDomain.getTargetDate(), startQualityAlertDomain.getSeverity(), startQualityAlertDomain.getBpn(), startQualityAlertDomain.isAsBuilt()); + QualityNotification notification = notificationPublisherService.startAlert(startQualityAlertDomain.getPartIds(), startQualityAlertDomain.getDescription(), startQualityAlertDomain.getTargetDate(), startQualityAlertDomain.getSeverity(), startQualityAlertDomain.getReceiverBpn(), startQualityAlertDomain.isAsBuilt()); QualityNotificationId createdAlertId = alertRepository.saveQualityNotificationEntity(notification); log.info("Start Alert {}", notification); diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/investigation/service/InvestigationServiceImpl.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/investigation/service/InvestigationServiceImpl.java index 2101a50c8a..5a82e06340 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/investigation/service/InvestigationServiceImpl.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/investigation/service/InvestigationServiceImpl.java @@ -58,7 +58,7 @@ protected AssetAsBuiltServiceImpl getAssetAsBuiltServiceImpl() { @Override public QualityNotificationId start(StartQualityNotificationDomain startQualityAlertDomain) { - QualityNotification notification = getNotificationPublisherService().startInvestigation(startQualityAlertDomain.getPartIds(), startQualityAlertDomain.getDescription(), startQualityAlertDomain.getTargetDate(), startQualityAlertDomain.getSeverity(), startQualityAlertDomain.getBpn(), startQualityAlertDomain.isAsBuilt()); + QualityNotification notification = getNotificationPublisherService().startInvestigation(startQualityAlertDomain.getPartIds(), startQualityAlertDomain.getDescription(), startQualityAlertDomain.getTargetDate(), startQualityAlertDomain.getSeverity(), startQualityAlertDomain.getReceiverBpn(), startQualityAlertDomain.isAsBuilt()); QualityNotificationId createdInvestigationId = getQualityNotificationRepository().saveQualityNotificationEntity(notification); log.info("Start Investigation {}", notification); diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/model/EdcNotificationModelTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/model/EdcNotificationModelTest.java index 4b0fadee6d..55f9d31039 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/model/EdcNotificationModelTest.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/model/EdcNotificationModelTest.java @@ -22,7 +22,6 @@ import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotificationContent; import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotificationHeader; import org.junit.jupiter.api.Test; -import qualitynotification.alert.request.StartQualityAlertRequest; import qualitynotification.base.request.CloseQualityNotificationRequest; import qualitynotification.base.request.QualityNotificationSeverityRequest; import qualitynotification.base.request.StartQualityNotificationRequest; @@ -99,28 +98,6 @@ public void testSanitizeStartQualityNotificationRequest() { } - @Test - public void testSanitizeStartQualityAlertRequest() { - //GIVEN - List partIds = new ArrayList<>(); - partIds.add("urn:uuid:fe99da3d-b0de-4e80-81da-882aebcca978"); - partIds.add("urn:uuid:fe99da3d-b0de-4e80-81da-882aebcca979\n"); - Instant targetDate = Instant.parse("2023-09-22T14:30:00Z".trim()); - QualityNotificationSeverityRequest severity = QualityNotificationSeverityRequest.MINOR; - StartQualityAlertRequest request = new StartQualityAlertRequest(partIds, "The description\n", targetDate, severity, "BPN00001123123AS\n", true); - - - //WHEN - StartQualityAlertRequest cleanRequest = sanitize(request); - - //THEN - assertEquals("urn:uuid:fe99da3d-b0de-4e80-81da-882aebcca979 ", cleanRequest.getPartIds().get(1)); - assertEquals("The description ", cleanRequest.getDescription()); - assertTrue(cleanRequest.isAsBuilt()); - assertEquals("BPN00001123123AS ", cleanRequest.getBpn()); - - } - @Test public void testSanitizeCloseInvestigationRequest() { //GIVEN diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/alert/PublisherAlertsControllerIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/alert/PublisherAlertsControllerIT.java index 825d29dd70..f288e3cb21 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/alert/PublisherAlertsControllerIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/alert/PublisherAlertsControllerIT.java @@ -46,9 +46,9 @@ import org.springframework.transaction.annotation.Transactional; import org.testcontainers.shaded.com.fasterxml.jackson.core.JsonProcessingException; import org.testcontainers.shaded.com.fasterxml.jackson.databind.ObjectMapper; -import qualitynotification.alert.request.StartQualityAlertRequest; import qualitynotification.base.request.CloseQualityNotificationRequest; import qualitynotification.base.request.QualityNotificationSeverityRequest; +import qualitynotification.base.request.StartQualityNotificationRequest; import qualitynotification.base.request.UpdateQualityNotificationRequest; import qualitynotification.base.request.UpdateQualityNotificationStatusRequest; @@ -121,15 +121,15 @@ void shouldStartAlert() throws JsonProcessingException, JoseException { ); String description = "at least 15 characters long investigation description"; QualityNotificationSeverityRequest severity = QualityNotificationSeverityRequest.MINOR; - String bpn = "BPN"; + String receiverBpn = "BPN"; assetsSupport.defaultAssetsStored(); - val request = StartQualityAlertRequest.builder() + val request = StartQualityNotificationRequest.builder() .partIds(partIds) .description(description) .severity(severity) - .bpn(bpn) + .receiverBpn(receiverBpn) .isAsBuilt(true) .build(); @@ -177,15 +177,15 @@ void shouldStartAlertForAsPlanned() throws JsonProcessingException, JoseExceptio ); String description = "at least 15 characters long investigation description"; QualityNotificationSeverityRequest severity = QualityNotificationSeverityRequest.MINOR; - String bpn = "BPN"; + String receiverBpn = "BPN"; assetsSupport.defaultAssetsAsPlannedStored(); - val request = StartQualityAlertRequest.builder() + val request = StartQualityNotificationRequest.builder() .partIds(partIds) .description(description) .severity(severity) - .bpn(bpn) + .receiverBpn(receiverBpn) .isAsBuilt(false) .build(); @@ -234,7 +234,7 @@ void givenMissingSeverity_whenStartAlert_thenBadRequest() throws JsonProcessingE "urn:uuid:0ce83951-bc18-4e8f-892d-48bad4eb67ef" // BPN: BPNL00000003AXS3 ); String description = "at least 15 characters long investigation description"; - val request = StartQualityAlertRequest.builder() + val request = StartQualityNotificationRequest.builder() .partIds(partIds) .description(description) .build(); @@ -261,11 +261,11 @@ void givenDescriptionOverMaxLength_whenStartAlert_thenBadRequest() throws JsonPr String description = RandomStringUtils.random(1001); - val request = StartQualityAlertRequest.builder() + val request = StartQualityNotificationRequest.builder() .partIds(partIds) .description(description) .severity(QualityNotificationSeverityRequest.MINOR) - .bpn("BPN") + .receiverBpn("BPN") .build(); // when/then @@ -326,11 +326,11 @@ void givenWrongStatus_whenUpdateAlert_thenBadRequest() throws JsonProcessingExce void shouldCancelAlert() throws JsonProcessingException, JoseException { // given assetsSupport.defaultAssetsStored(); - val startAlertRequest = StartQualityAlertRequest.builder() + val startAlertRequest = StartQualityNotificationRequest.builder() .partIds(List.of("urn:uuid:fe99da3d-b0de-4e80-81da-882aebcca978")) .description("at least 15 characters long investigation description") .severity(QualityNotificationSeverityRequest.MAJOR) - .bpn("BPN") + .receiverBpn("BPN") .isAsBuilt(true) .build(); @@ -392,11 +392,11 @@ void shouldApproveAlertStatus() throws JsonProcessingException, JoseException { assetsSupport.defaultAssetsStored(); - val startAlertRequest = StartQualityAlertRequest.builder() + val startAlertRequest = StartQualityNotificationRequest.builder() .partIds(partIds) .description(description) .severity(QualityNotificationSeverityRequest.MINOR) - .bpn("BPN") + .receiverBpn("BPN") .isAsBuilt(true) .build(); @@ -447,11 +447,11 @@ void shouldCloseAlertStatus() throws JsonProcessingException, JoseException { assetsSupport.defaultAssetsStored(); - val startAlertRequest = StartQualityAlertRequest.builder() + val startAlertRequest = StartQualityNotificationRequest.builder() .partIds(partIds) .description(description) .severity(QualityNotificationSeverityRequest.MINOR) - .bpn("BPN") + .receiverBpn("BPN") .isAsBuilt(true) .build(); @@ -556,11 +556,11 @@ void shouldBeCreatedBySender() throws JsonProcessingException, JoseException { ); String description = "at least 15 characters long investigation description"; assetsSupport.defaultAssetsStored(); - val startAlertRequest = StartQualityAlertRequest.builder() + val startAlertRequest = StartQualityNotificationRequest.builder() .partIds(partIds) .description(description) .severity(QualityNotificationSeverityRequest.MINOR) - .bpn("BPN") + .receiverBpn("BPN") .isAsBuilt(true) .build(); diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/investigation/PublisherInvestigationsControllerIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/investigation/PublisherInvestigationsControllerIT.java index c485b01e63..ac0dab8e81 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/investigation/PublisherInvestigationsControllerIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/investigation/PublisherInvestigationsControllerIT.java @@ -45,7 +45,6 @@ import org.springframework.transaction.annotation.Transactional; import org.testcontainers.shaded.com.fasterxml.jackson.core.JsonProcessingException; import org.testcontainers.shaded.com.fasterxml.jackson.databind.ObjectMapper; -import qualitynotification.alert.request.StartQualityAlertRequest; import qualitynotification.base.request.CloseQualityNotificationRequest; import qualitynotification.base.request.QualityNotificationSeverityRequest; import qualitynotification.base.request.StartQualityNotificationRequest; @@ -200,7 +199,7 @@ void givenDescriptionExceedsMaxLength_whenStartInvestigation_thenBadRequest() th String description = RandomStringUtils.random(1001); - val request = StartQualityAlertRequest.builder() + val request = StartQualityNotificationRequest.builder() .partIds(partIds) .description(description) .severity(QualityNotificationSeverityRequest.MINOR) diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertControllerTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertControllerTest.java index 87765c97c2..828f56ba9a 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertControllerTest.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertControllerTest.java @@ -31,10 +31,10 @@ import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.junit.jupiter.MockitoExtension; -import qualitynotification.alert.request.StartQualityAlertRequest; import qualitynotification.alert.response.AlertResponse; import qualitynotification.base.request.CloseQualityNotificationRequest; import qualitynotification.base.request.QualityNotificationSeverityRequest; +import qualitynotification.base.request.StartQualityNotificationRequest; import qualitynotification.base.request.UpdateQualityNotificationRequest; import qualitynotification.base.request.UpdateQualityNotificationStatusRequest; import qualitynotification.base.response.QualityNotificationIdResponse; @@ -68,12 +68,12 @@ void givenRequestBody_whenAlertAssets_thenResponse() { final List partIds = List.of("partId1", "partId2"); final Instant targetDate = Instant.parse("2099-03-11T22:44:06.333826952Z"); final QualityNotificationId notificationId = new QualityNotificationId(666L); - final StartQualityAlertRequest request = StartQualityAlertRequest.builder() + final StartQualityNotificationRequest request = StartQualityNotificationRequest.builder() .partIds(partIds) .description("description") .targetDate(targetDate) .severity(QualityNotificationSeverityRequest.MINOR) - .bpn("BPN00001") + .receiverBpn("BPN00001") .build(); when(alertService.start(Mockito.eq(from(request)))).thenReturn(notificationId); diff --git a/tx-models/src/main/java/qualitynotification/alert/request/StartQualityAlertRequest.java b/tx-models/src/main/java/qualitynotification/alert/request/StartQualityAlertRequest.java deleted file mode 100644 index 28b193126d..0000000000 --- a/tx-models/src/main/java/qualitynotification/alert/request/StartQualityAlertRequest.java +++ /dev/null @@ -1,60 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2023 Contributors to the Eclipse Foundation - * - * See the NOTICE file(s) distributed with this work for additional - * information regarding copyright ownership. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ********************************************************************************/ - -package qualitynotification.alert.request; - -import io.swagger.annotations.ApiModelProperty; -import jakarta.validation.constraints.Future; -import jakarta.validation.constraints.NotNull; -import jakarta.validation.constraints.Size; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; -import qualitynotification.base.request.QualityNotificationSeverityRequest; - -import java.time.Instant; -import java.util.List; - - -@Data -@Builder -@NoArgsConstructor -@AllArgsConstructor -public class StartQualityAlertRequest { - @Size(min = 1, max = 100, message = "Specify at least 1 and at most 100 partIds") - @ApiModelProperty(example = "[\"urn:uuid:fe99da3d-b0de-4e80-81da-882aebcca978\"]") - private List partIds; - @Size(min = 15, max = 1000, message = "Description should have at least 15 characters and at most 1000 characters") - @ApiModelProperty(example = "The description") - private String description; - @ApiModelProperty(example = "2099-03-11T22:44:06.333826952Z") - @Future(message = "Specify at least the current day or a date in future") - private Instant targetDate; - @NotNull - @ApiModelProperty(example = "MINOR") - private QualityNotificationSeverityRequest severity; - @NotNull - @ApiModelProperty(example = "BPN00001123123AS") - private String bpn; - @ApiModelProperty(example = "true") - private boolean isAsBuilt = true; - - -} diff --git a/tx-models/src/main/java/qualitynotification/base/request/QualityNotificationStatusRequest.java b/tx-models/src/main/java/qualitynotification/base/request/QualityNotificationStatusRequest.java index ed6ffd195a..2d8a0a098d 100644 --- a/tx-models/src/main/java/qualitynotification/base/request/QualityNotificationStatusRequest.java +++ b/tx-models/src/main/java/qualitynotification/base/request/QualityNotificationStatusRequest.java @@ -22,7 +22,7 @@ @ApiModel(description = "Describes status for closed action") public enum QualityNotificationStatusRequest { - CLOSED; + CLOSED } From df2d1cc83b162db19ab5c8548d92fb1c9d6c3f32 Mon Sep 17 00:00:00 2001 From: ashanmugavel Date: Mon, 9 Oct 2023 12:48:31 +0200 Subject: [PATCH 06/39] fixed: Missing Override annotation --- .../infrastructure/alert/model/AlertNotificationEntity.java | 2 +- .../investigation/model/InvestigationNotificationEntity.java | 2 +- .../java/assets/response/asplanned/AssetAsPlannedResponse.java | 3 +-- .../java/qualitynotification/alert/response/AlertResponse.java | 2 ++ .../investigation/response/InvestigationResponse.java | 2 ++ 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/alert/model/AlertNotificationEntity.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/alert/model/AlertNotificationEntity.java index e94734efb2..461b1e151a 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/alert/model/AlertNotificationEntity.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/alert/model/AlertNotificationEntity.java @@ -48,7 +48,7 @@ @SuperBuilder @AllArgsConstructor @NoArgsConstructor -@EqualsAndHashCode +@EqualsAndHashCode(callSuper = true) @Entity @Table(name = "alert_notification") public class AlertNotificationEntity extends QualityNotificationMessageBaseEntity { diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/investigation/model/InvestigationNotificationEntity.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/investigation/model/InvestigationNotificationEntity.java index f1fd75abb5..a776f8f904 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/investigation/model/InvestigationNotificationEntity.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/investigation/model/InvestigationNotificationEntity.java @@ -48,7 +48,7 @@ @SuperBuilder @AllArgsConstructor @NoArgsConstructor -@EqualsAndHashCode +@EqualsAndHashCode(callSuper = true) @Entity @Table(name = "investigation_notification") public class InvestigationNotificationEntity extends QualityNotificationMessageBaseEntity { diff --git a/tx-models/src/main/java/assets/response/asplanned/AssetAsPlannedResponse.java b/tx-models/src/main/java/assets/response/asplanned/AssetAsPlannedResponse.java index 9877f10ca4..befd06b1d6 100644 --- a/tx-models/src/main/java/assets/response/asplanned/AssetAsPlannedResponse.java +++ b/tx-models/src/main/java/assets/response/asplanned/AssetAsPlannedResponse.java @@ -22,11 +22,10 @@ import assets.response.base.AssetBaseResponse; import io.swagger.v3.oas.annotations.media.ArraySchema; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.*; import lombok.experimental.SuperBuilder; + @SuperBuilder -@Data @ArraySchema(arraySchema = @Schema(description = "Assets", additionalProperties = Schema.AdditionalPropertiesValue.FALSE), maxItems = Integer.MAX_VALUE) public class AssetAsPlannedResponse extends AssetBaseResponse { diff --git a/tx-models/src/main/java/qualitynotification/alert/response/AlertResponse.java b/tx-models/src/main/java/qualitynotification/alert/response/AlertResponse.java index da4067c601..2bc945e408 100644 --- a/tx-models/src/main/java/qualitynotification/alert/response/AlertResponse.java +++ b/tx-models/src/main/java/qualitynotification/alert/response/AlertResponse.java @@ -22,10 +22,12 @@ import io.swagger.v3.oas.annotations.media.ArraySchema; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import lombok.EqualsAndHashCode; import lombok.ToString; import lombok.experimental.SuperBuilder; import qualitynotification.base.response.QualityNotificationResponse; +@EqualsAndHashCode(callSuper = true) @Data @ToString(callSuper = true) @SuperBuilder diff --git a/tx-models/src/main/java/qualitynotification/investigation/response/InvestigationResponse.java b/tx-models/src/main/java/qualitynotification/investigation/response/InvestigationResponse.java index da3be53330..de5ef7332a 100644 --- a/tx-models/src/main/java/qualitynotification/investigation/response/InvestigationResponse.java +++ b/tx-models/src/main/java/qualitynotification/investigation/response/InvestigationResponse.java @@ -22,10 +22,12 @@ import io.swagger.v3.oas.annotations.media.ArraySchema; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import lombok.EqualsAndHashCode; import lombok.experimental.SuperBuilder; import qualitynotification.base.response.QualityNotificationResponse; +@EqualsAndHashCode(callSuper = true) @Data @SuperBuilder @ArraySchema(arraySchema = @Schema(description = "Investigations", additionalProperties = Schema.AdditionalPropertiesValue.FALSE), minItems = Integer.MIN_VALUE, maxItems = Integer.MAX_VALUE) From 688088937d75fd8dbd7ac5c1a491ce7f1c922559 Mon Sep 17 00:00:00 2001 From: ashanmugavel Date: Mon, 9 Oct 2023 12:53:47 +0200 Subject: [PATCH 07/39] chore: Completed TODO task "move to tx-models" and removed StartQualityAlertRequest --- .../openapi/traceability-foss-backend.json | 1759 ++++++++--------- 1 file changed, 859 insertions(+), 900 deletions(-) diff --git a/tx-backend/openapi/traceability-foss-backend.json b/tx-backend/openapi/traceability-foss-backend.json index 2f91b71f48..64c9809558 100644 --- a/tx-backend/openapi/traceability-foss-backend.json +++ b/tx-backend/openapi/traceability-foss-backend.json @@ -41,8 +41,8 @@ "description" : "The endpoint returns a result of BPN EDC URL mappings.", "operationId" : "getBpnEdcs", "responses" : { - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -61,8 +61,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -71,8 +71,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -81,12 +81,14 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "200" : { + "description" : "Returns the paged result found", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } @@ -101,20 +103,18 @@ } } }, - "200" : { - "description" : "Returns the paged result found", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -155,20 +155,18 @@ "required" : true }, "responses" : { - "200" : { - "description" : "Returns the paged result found for BpnEdcMapping", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "403" : { - "description" : "Forbidden.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -177,8 +175,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -187,8 +185,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -197,8 +195,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -207,18 +205,20 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "200" : { + "description" : "Returns the paged result found for BpnEdcMapping", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -227,8 +227,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -269,20 +269,18 @@ "required" : true }, "responses" : { - "200" : { - "description" : "Returns the paged result found for BpnEdcMapping", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "403" : { - "description" : "Forbidden.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -291,8 +289,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -301,8 +299,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -311,8 +309,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -321,18 +319,20 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "200" : { + "description" : "Returns the paged result found for BpnEdcMapping", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -341,8 +341,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -380,18 +380,14 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", + "200" : { + "description" : "Returns the paged result found", "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } + "application/json" : {} } }, - "415" : { - "description" : "Unsupported media type", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -400,8 +396,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -410,8 +406,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -440,14 +436,18 @@ } } }, - "200" : { - "description" : "Returns the paged result found", + "404" : { + "description" : "Not found.", "content" : { - "application/json" : {} + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -493,8 +493,8 @@ "required" : true }, "responses" : { - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -513,8 +513,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -523,8 +523,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -533,8 +533,11 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "204" : { + "description" : "No Content." + }, + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -543,8 +546,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -553,11 +556,8 @@ } } }, - "204" : { - "description" : "No Content." - }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -595,8 +595,8 @@ "required" : true }, "responses" : { - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -615,8 +615,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -625,8 +625,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -635,8 +635,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -645,12 +645,12 @@ } } }, - "429" : { - "description" : "Too many requests.", + "201" : { + "description" : "Created.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "$ref" : "#/components/schemas/QualityNotificationIdResponse" } } } @@ -665,12 +665,12 @@ } } }, - "201" : { - "description" : "Created.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/QualityNotificationIdResponse" + "$ref" : "#/components/schemas/ErrorResponse" } } } @@ -715,8 +715,8 @@ "required" : true }, "responses" : { - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -735,8 +735,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -748,8 +748,8 @@ "204" : { "description" : "No content." }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -758,8 +758,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -768,8 +768,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -778,8 +778,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -828,8 +828,8 @@ "required" : true }, "responses" : { - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -848,8 +848,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -861,8 +861,8 @@ "204" : { "description" : "No content." }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -871,8 +871,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -881,8 +881,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -891,8 +891,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -931,8 +931,8 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -951,8 +951,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -961,8 +961,11 @@ } } }, - "400" : { - "description" : "Bad request.", + "204" : { + "description" : "No content." + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -971,8 +974,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -981,8 +984,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -991,11 +994,8 @@ } } }, - "204" : { - "description" : "No content." - }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1034,8 +1034,8 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1054,8 +1054,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1067,8 +1067,8 @@ "204" : { "description" : "No content." }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1077,8 +1077,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1087,8 +1087,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1097,8 +1097,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1136,8 +1136,8 @@ "required" : true }, "responses" : { - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1156,8 +1156,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1166,8 +1166,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1176,8 +1176,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1186,12 +1186,12 @@ } } }, - "429" : { - "description" : "Too many requests.", + "201" : { + "description" : "Created.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "$ref" : "#/components/schemas/CreateNotificationContractResponse" } } } @@ -1206,12 +1206,12 @@ } } }, - "201" : { - "description" : "Created.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/CreateNotificationContractResponse" + "$ref" : "#/components/schemas/ErrorResponse" } } } @@ -1245,8 +1245,8 @@ "required" : true }, "responses" : { - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1265,8 +1265,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1275,8 +1275,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1285,8 +1285,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1295,8 +1295,11 @@ } } }, - "429" : { - "description" : "Too many requests.", + "201" : { + "description" : "Created." + }, + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1305,8 +1308,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1314,9 +1317,6 @@ } } } - }, - "201" : { - "description" : "Created." } }, "security" : [ @@ -1347,8 +1347,8 @@ "required" : true }, "responses" : { - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1367,18 +1367,20 @@ } } }, - "500" : { - "description" : "Internal server error.", + "200" : { + "description" : "Returns the paged result found for Asset", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1407,20 +1409,18 @@ } } }, - "200" : { - "description" : "Returns the paged result found for Asset", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1458,8 +1458,8 @@ "required" : true }, "responses" : { - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1478,8 +1478,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1488,8 +1488,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1498,8 +1498,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1508,8 +1508,11 @@ } } }, - "429" : { - "description" : "Too many requests.", + "201" : { + "description" : "Created." + }, + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1518,8 +1521,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1527,9 +1530,6 @@ } } } - }, - "201" : { - "description" : "Created." } }, "security" : [ @@ -1560,20 +1560,8 @@ "required" : true }, "responses" : { - "200" : { - "description" : "Returns the paged result found for Asset", - "content" : { - "application/json" : { - "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" - } - } - } - }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1592,8 +1580,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1602,12 +1590,14 @@ } } }, - "400" : { - "description" : "Bad request.", + "200" : { + "description" : "Returns the paged result found for Asset", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } @@ -1641,6 +1631,16 @@ } } } + }, + "500" : { + "description" : "Internal server error.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } } }, "security" : [ @@ -1664,15 +1664,15 @@ "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/StartQualityAlertRequest" + "$ref" : "#/components/schemas/StartQualityNotificationRequest" } } }, "required" : true }, "responses" : { - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1691,8 +1691,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1701,8 +1701,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1711,8 +1711,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1721,12 +1721,12 @@ } } }, - "429" : { - "description" : "Too many requests.", + "201" : { + "description" : "Created.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "$ref" : "#/components/schemas/QualityNotificationIdResponse" } } } @@ -1741,12 +1741,12 @@ } } }, - "201" : { - "description" : "Created.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/QualityNotificationIdResponse" + "$ref" : "#/components/schemas/ErrorResponse" } } } @@ -1791,8 +1791,8 @@ "required" : true }, "responses" : { - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1811,8 +1811,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1824,16 +1824,6 @@ "204" : { "description" : "No content." }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "401" : { "description" : "Authorization failed.", "content" : { @@ -1863,9 +1853,19 @@ } } } - } - }, - "security" : [ + }, + "500" : { + "description" : "Internal server error.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security" : [ { "oAuth2" : [ "profile email" @@ -1904,8 +1904,8 @@ "required" : true }, "responses" : { - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1924,8 +1924,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1937,8 +1937,8 @@ "204" : { "description" : "No content." }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1947,8 +1947,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1957,8 +1957,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1967,8 +1967,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2007,8 +2007,8 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2027,8 +2027,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2040,8 +2040,8 @@ "204" : { "description" : "No content." }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2050,8 +2050,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -2060,8 +2060,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -2070,8 +2070,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2110,8 +2110,8 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2130,8 +2130,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2140,8 +2140,11 @@ } } }, - "400" : { - "description" : "Bad request.", + "204" : { + "description" : "No content." + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2150,8 +2153,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -2160,8 +2163,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -2170,11 +2173,8 @@ } } }, - "204" : { - "description" : "No content." - }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2212,46 +2212,6 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "200" : { "description" : "Returns the assets found", "content" : { @@ -2379,6 +2339,36 @@ } } }, + "400" : { + "description" : "Bad request.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "415" : { + "description" : "Unsupported media type", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, "401" : { "description" : "Authorization failed.", "content" : { @@ -2408,6 +2398,16 @@ } } } + }, + "500" : { + "description" : "Internal server error.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } } }, "security" : [ @@ -2446,8 +2446,8 @@ "required" : true }, "responses" : { - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2466,18 +2466,8 @@ } } }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2642,6 +2632,16 @@ } } } + }, + "500" : { + "description" : "Internal server error.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } } }, "security" : [ @@ -2672,36 +2672,6 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "400" : { "description" : "Bad request.", "content" : { @@ -2712,18 +2682,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2732,8 +2692,8 @@ } } }, - "404" : { - "description" : "Not found.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2868,46 +2828,9 @@ } } } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - }, - "patch" : { - "tags" : [ - "AssetsAsBuilt" - ], - "summary" : "Updates asset", - "description" : "The endpoint updates asset by provided quality type.", - "operationId" : "updateAsset_1", - "parameters" : [ - { - "name" : "assetId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } - ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UpdateAssetRequest" - } - } }, - "required" : true - }, - "responses" : { - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2916,8 +2839,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -2926,8 +2849,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -2936,8 +2859,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2945,7 +2868,44 @@ } } } + } + }, + "security" : [ + { + "oAuth2" : [ + "profile email" + ] + } + ] + }, + "patch" : { + "tags" : [ + "AssetsAsBuilt" + ], + "summary" : "Updates asset", + "description" : "The endpoint updates asset by provided quality type.", + "operationId" : "updateAsset_1", + "parameters" : [ + { + "name" : "assetId", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + } + ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/UpdateAssetRequest" + } + } }, + "required" : true + }, + "responses" : { "200" : { "description" : "Returns the updated asset", "content" : { @@ -3073,6 +3033,36 @@ } } }, + "400" : { + "description" : "Bad request.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "415" : { + "description" : "Unsupported media type", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, "401" : { "description" : "Authorization failed.", "content" : { @@ -3102,6 +3092,16 @@ } } } + }, + "500" : { + "description" : "Internal server error.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } } }, "security" : [ @@ -3122,8 +3122,8 @@ "description" : "The endpoint returns all shell descriptors.", "operationId" : "findAll", "responses" : { - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3142,8 +3142,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3152,12 +3152,15 @@ } } }, - "400" : { - "description" : "Bad request.", + "200" : { + "description" : "ShellDescriptors found.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ShellDescriptorResponse" + } } } } @@ -3182,21 +3185,18 @@ } } }, - "200" : { - "description" : "ShellDescriptors found.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ShellDescriptorResponse" - } + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3223,8 +3223,11 @@ "description" : "The endpoint deletes all shell descriptors.", "operationId" : "deleteAll", "responses" : { - "403" : { - "description" : "Forbidden.", + "204" : { + "description" : "Deleted." + }, + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3243,8 +3246,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3253,8 +3256,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -3263,11 +3266,8 @@ } } }, - "204" : { - "description" : "Deleted." - }, - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -3276,8 +3276,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -3286,8 +3286,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3315,8 +3315,8 @@ "description" : "The endpoint Triggers reload of shell descriptors.", "operationId" : "reload", "responses" : { - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3335,8 +3335,11 @@ } } }, - "500" : { - "description" : "Internal server error.", + "202" : { + "description" : "Created registry reload job." + }, + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3345,8 +3348,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -3355,8 +3358,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -3365,8 +3368,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -3375,11 +3378,8 @@ } } }, - "202" : { - "description" : "Created registry reload job." - }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3418,18 +3418,24 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", + "200" : { + "description" : "OK.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : -2147483648, + "type" : "array", + "description" : "Investigations", + "items" : { + "$ref" : "#/components/schemas/InvestigationResponse" + } } } } }, - "415" : { - "description" : "Unsupported media type", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3438,8 +3444,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3448,8 +3454,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3458,24 +3464,18 @@ } } }, - "200" : { - "description" : "OK.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : -2147483648, - "type" : "array", - "description" : "Investigations", - "items" : { - "$ref" : "#/components/schemas/InvestigationResponse" - } + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -3484,8 +3484,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -3494,8 +3494,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3533,18 +3533,20 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", + "200" : { + "description" : "Returns the paged result found for Asset", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } }, - "415" : { - "description" : "Unsupported media type", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3553,8 +3555,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3563,8 +3565,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3593,20 +3595,18 @@ } } }, - "200" : { - "description" : "Returns the paged result found for Asset", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3644,18 +3644,20 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", + "200" : { + "description" : "Returns the paged result found for Asset", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } }, - "415" : { - "description" : "Unsupported media type", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3664,8 +3666,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3674,8 +3676,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3704,20 +3706,18 @@ } } }, - "200" : { - "description" : "Returns the paged result found for Asset", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3745,8 +3745,8 @@ "description" : "The endpoint can return limited data based on the user role", "operationId" : "dashboard", "responses" : { - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3765,18 +3765,8 @@ } } }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3824,6 +3814,16 @@ } } } + }, + "500" : { + "description" : "Internal server error.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } } }, "security" : [ @@ -3862,46 +3862,6 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "200" : { "description" : "Returns the paged result found for Asset", "content" : { @@ -4034,75 +3994,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/assets/as-planned/{assetId}/children/{childId}" : { - "get" : { - "tags" : [ - "AssetsAsPlanned" - ], - "summary" : "Get asset by child id", - "description" : "The endpoint returns an asset filtered by child id.", - "operationId" : "assetByChildId", - "parameters" : [ - { - "name" : "assetId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, - { - "name" : "childId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } - ], - "responses" : { - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -4121,8 +4014,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -4131,8 +4024,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -4141,8 +4034,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -4151,8 +4044,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -4161,8 +4054,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -4170,7 +4063,44 @@ } } } + } + }, + "security" : [ + { + "oAuth2" : [ + "profile email" + ] + } + ] + } + }, + "/assets/as-planned/{assetId}/children/{childId}" : { + "get" : { + "tags" : [ + "AssetsAsPlanned" + ], + "summary" : "Get asset by child id", + "description" : "The endpoint returns an asset filtered by child id.", + "operationId" : "assetByChildId", + "parameters" : [ + { + "name" : "assetId", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } }, + { + "name" : "childId", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + } + ], + "responses" : { "200" : { "description" : "Returns the asset by childId", "content" : { @@ -4297,6 +4227,76 @@ } } } + }, + "400" : { + "description" : "Bad request.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "415" : { + "description" : "Unsupported media type", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "401" : { + "description" : "Authorization failed.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "429" : { + "description" : "Too many requests.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "500" : { + "description" : "Internal server error.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } } }, "security" : [ @@ -4337,8 +4337,8 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -4357,8 +4357,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -4367,8 +4367,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -4377,20 +4377,18 @@ } } }, - "200" : { - "description" : "Returns a distinct filter values for given fieldName.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -4399,18 +4397,20 @@ } } }, - "429" : { - "description" : "Too many requests.", + "200" : { + "description" : "Returns a distinct filter values for given fieldName.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -4456,36 +4456,6 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "400" : { "description" : "Bad request.", "content" : { @@ -4496,8 +4466,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -4506,8 +4476,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -4648,6 +4618,26 @@ } } }, + "401" : { + "description" : "Authorization failed.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "429" : { + "description" : "Too many requests.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, "404" : { "description" : "Not found.", "content" : { @@ -4657,6 +4647,16 @@ } } } + }, + "500" : { + "description" : "Internal server error.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } } }, "security" : [ @@ -4695,8 +4695,8 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -4715,8 +4715,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -4725,8 +4725,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -4735,8 +4735,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -4745,8 +4745,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -4882,8 +4882,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -4931,8 +4931,8 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -4951,8 +4951,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -4961,8 +4961,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -4971,20 +4971,18 @@ } } }, - "200" : { - "description" : "Returns a distinct filter values for given fieldName.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -4993,18 +4991,20 @@ } } }, - "429" : { - "description" : "Too many requests.", + "200" : { + "description" : "Returns a distinct filter values for given fieldName.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5032,18 +5032,22 @@ "description" : "The endpoint returns a map for assets consumed by the map.", "operationId" : "assetsCountryMap", "responses" : { - "403" : { - "description" : "Forbidden.", + "200" : { + "description" : "Returns the assets found", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "type" : "object", + "additionalProperties" : { + "type" : "integer", + "format" : "int64" + } } } } }, - "415" : { - "description" : "Unsupported media type", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -5052,8 +5056,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -5062,8 +5066,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5072,22 +5076,18 @@ } } }, - "200" : { - "description" : "Returns the assets found", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { - "type" : "object", - "additionalProperties" : { - "type" : "integer", - "format" : "int64" - } + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -5096,8 +5096,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -5106,8 +5106,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5146,18 +5146,23 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", + "200" : { + "description" : "OK.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "type" : "array", + "description" : "Alerts", + "items" : { + "$ref" : "#/components/schemas/AlertResponse" + } } } } }, - "415" : { - "description" : "Unsupported media type", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -5166,8 +5171,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -5176,8 +5181,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5186,23 +5191,18 @@ } } }, - "200" : { - "description" : "OK.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Alerts", - "items" : { - "$ref" : "#/components/schemas/AlertResponse" - } + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -5211,8 +5211,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -5221,8 +5221,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5260,8 +5260,8 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -5280,18 +5280,19 @@ } } }, - "500" : { - "description" : "Internal server error.", + "200" : { + "description" : "Returns the paged result found for Asset", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "type" : "array" } } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5320,19 +5321,18 @@ } } }, - "200" : { - "description" : "Returns the paged result found for Asset", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5370,8 +5370,8 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -5390,18 +5390,19 @@ } } }, - "500" : { - "description" : "Internal server error.", + "200" : { + "description" : "Returns the paged result found for Asset", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "type" : "array" } } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5430,19 +5431,18 @@ } } }, - "200" : { - "description" : "Returns the paged result found for Asset", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5470,8 +5470,8 @@ "description" : "Deletes all submodels from the system.", "operationId" : "deleteSubmodels", "responses" : { - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -5490,8 +5490,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5500,8 +5500,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -5510,8 +5510,11 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "204" : { + "description" : "No Content." + }, + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -5520,8 +5523,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -5530,11 +5533,8 @@ } } }, - "204" : { - "description" : "No Content." - }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5572,8 +5572,8 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -5592,8 +5592,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5602,8 +5602,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -5612,8 +5612,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -5622,8 +5622,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -5635,8 +5635,8 @@ "204" : { "description" : "Deleted." }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5832,47 +5832,6 @@ } } }, - "StartQualityAlertRequest" : { - "required" : [ - "bpn", - "severity" - ], - "type" : "object", - "properties" : { - "partIds" : { - "maxItems" : 100, - "minItems" : 1, - "type" : "array", - "items" : { - "type" : "string" - } - }, - "description" : { - "maxLength" : 1000, - "minLength" : 15, - "type" : "string" - }, - "targetDate" : { - "type" : "string", - "format" : "date-time" - }, - "severity" : { - "type" : "string", - "enum" : [ - "MINOR", - "MAJOR", - "CRITICAL", - "LIFE_THREATENING" - ] - }, - "bpn" : { - "type" : "string" - }, - "asBuilt" : { - "type" : "boolean" - } - } - }, "UpdateAssetRequest" : { "required" : [ "qualityType" From 280088cafd54e90e5d82e84622d704e595c34761 Mon Sep 17 00:00:00 2001 From: ashanmugavel Date: Mon, 9 Oct 2023 13:36:02 +0200 Subject: [PATCH 08/39] Revert "fixed: Missing Override annotation" This reverts commit df2d1cc83b162db19ab5c8548d92fb1c9d6c3f32. --- .../infrastructure/alert/model/AlertNotificationEntity.java | 2 +- .../investigation/model/InvestigationNotificationEntity.java | 2 +- .../java/assets/response/asplanned/AssetAsPlannedResponse.java | 3 ++- .../java/qualitynotification/alert/response/AlertResponse.java | 2 -- .../investigation/response/InvestigationResponse.java | 2 -- 5 files changed, 4 insertions(+), 7 deletions(-) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/alert/model/AlertNotificationEntity.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/alert/model/AlertNotificationEntity.java index 461b1e151a..e94734efb2 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/alert/model/AlertNotificationEntity.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/alert/model/AlertNotificationEntity.java @@ -48,7 +48,7 @@ @SuperBuilder @AllArgsConstructor @NoArgsConstructor -@EqualsAndHashCode(callSuper = true) +@EqualsAndHashCode @Entity @Table(name = "alert_notification") public class AlertNotificationEntity extends QualityNotificationMessageBaseEntity { diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/investigation/model/InvestigationNotificationEntity.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/investigation/model/InvestigationNotificationEntity.java index a776f8f904..f1fd75abb5 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/investigation/model/InvestigationNotificationEntity.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/investigation/model/InvestigationNotificationEntity.java @@ -48,7 +48,7 @@ @SuperBuilder @AllArgsConstructor @NoArgsConstructor -@EqualsAndHashCode(callSuper = true) +@EqualsAndHashCode @Entity @Table(name = "investigation_notification") public class InvestigationNotificationEntity extends QualityNotificationMessageBaseEntity { diff --git a/tx-models/src/main/java/assets/response/asplanned/AssetAsPlannedResponse.java b/tx-models/src/main/java/assets/response/asplanned/AssetAsPlannedResponse.java index befd06b1d6..9877f10ca4 100644 --- a/tx-models/src/main/java/assets/response/asplanned/AssetAsPlannedResponse.java +++ b/tx-models/src/main/java/assets/response/asplanned/AssetAsPlannedResponse.java @@ -22,10 +22,11 @@ import assets.response.base.AssetBaseResponse; import io.swagger.v3.oas.annotations.media.ArraySchema; import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; import lombok.experimental.SuperBuilder; - @SuperBuilder +@Data @ArraySchema(arraySchema = @Schema(description = "Assets", additionalProperties = Schema.AdditionalPropertiesValue.FALSE), maxItems = Integer.MAX_VALUE) public class AssetAsPlannedResponse extends AssetBaseResponse { diff --git a/tx-models/src/main/java/qualitynotification/alert/response/AlertResponse.java b/tx-models/src/main/java/qualitynotification/alert/response/AlertResponse.java index 2bc945e408..da4067c601 100644 --- a/tx-models/src/main/java/qualitynotification/alert/response/AlertResponse.java +++ b/tx-models/src/main/java/qualitynotification/alert/response/AlertResponse.java @@ -22,12 +22,10 @@ import io.swagger.v3.oas.annotations.media.ArraySchema; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; -import lombok.EqualsAndHashCode; import lombok.ToString; import lombok.experimental.SuperBuilder; import qualitynotification.base.response.QualityNotificationResponse; -@EqualsAndHashCode(callSuper = true) @Data @ToString(callSuper = true) @SuperBuilder diff --git a/tx-models/src/main/java/qualitynotification/investigation/response/InvestigationResponse.java b/tx-models/src/main/java/qualitynotification/investigation/response/InvestigationResponse.java index de5ef7332a..da3be53330 100644 --- a/tx-models/src/main/java/qualitynotification/investigation/response/InvestigationResponse.java +++ b/tx-models/src/main/java/qualitynotification/investigation/response/InvestigationResponse.java @@ -22,12 +22,10 @@ import io.swagger.v3.oas.annotations.media.ArraySchema; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; -import lombok.EqualsAndHashCode; import lombok.experimental.SuperBuilder; import qualitynotification.base.response.QualityNotificationResponse; -@EqualsAndHashCode(callSuper = true) @Data @SuperBuilder @ArraySchema(arraySchema = @Schema(description = "Investigations", additionalProperties = Schema.AdditionalPropertiesValue.FALSE), minItems = Integer.MIN_VALUE, maxItems = Integer.MAX_VALUE) From 551b2f774de0693ba4673a229df728d4e69334d7 Mon Sep 17 00:00:00 2001 From: ashanmugavel Date: Mon, 9 Oct 2023 13:42:50 +0200 Subject: [PATCH 09/39] fixed: Missing Override annotation --- .../infrastructure/alert/model/AlertNotificationEntity.java | 2 -- .../investigation/model/InvestigationNotificationEntity.java | 2 -- .../java/assets/response/asplanned/AssetAsPlannedResponse.java | 2 -- .../java/qualitynotification/alert/response/AlertResponse.java | 3 +-- .../investigation/response/InvestigationResponse.java | 2 -- 5 files changed, 1 insertion(+), 10 deletions(-) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/alert/model/AlertNotificationEntity.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/alert/model/AlertNotificationEntity.java index e94734efb2..222c7d3bb1 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/alert/model/AlertNotificationEntity.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/alert/model/AlertNotificationEntity.java @@ -27,7 +27,6 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; import lombok.AllArgsConstructor; -import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @@ -48,7 +47,6 @@ @SuperBuilder @AllArgsConstructor @NoArgsConstructor -@EqualsAndHashCode @Entity @Table(name = "alert_notification") public class AlertNotificationEntity extends QualityNotificationMessageBaseEntity { diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/investigation/model/InvestigationNotificationEntity.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/investigation/model/InvestigationNotificationEntity.java index f1fd75abb5..69bee1f0cd 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/investigation/model/InvestigationNotificationEntity.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/investigation/model/InvestigationNotificationEntity.java @@ -27,7 +27,6 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; import lombok.AllArgsConstructor; -import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @@ -48,7 +47,6 @@ @SuperBuilder @AllArgsConstructor @NoArgsConstructor -@EqualsAndHashCode @Entity @Table(name = "investigation_notification") public class InvestigationNotificationEntity extends QualityNotificationMessageBaseEntity { diff --git a/tx-models/src/main/java/assets/response/asplanned/AssetAsPlannedResponse.java b/tx-models/src/main/java/assets/response/asplanned/AssetAsPlannedResponse.java index 9877f10ca4..6fd517ea9b 100644 --- a/tx-models/src/main/java/assets/response/asplanned/AssetAsPlannedResponse.java +++ b/tx-models/src/main/java/assets/response/asplanned/AssetAsPlannedResponse.java @@ -22,11 +22,9 @@ import assets.response.base.AssetBaseResponse; import io.swagger.v3.oas.annotations.media.ArraySchema; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.*; import lombok.experimental.SuperBuilder; @SuperBuilder -@Data @ArraySchema(arraySchema = @Schema(description = "Assets", additionalProperties = Schema.AdditionalPropertiesValue.FALSE), maxItems = Integer.MAX_VALUE) public class AssetAsPlannedResponse extends AssetBaseResponse { diff --git a/tx-models/src/main/java/qualitynotification/alert/response/AlertResponse.java b/tx-models/src/main/java/qualitynotification/alert/response/AlertResponse.java index da4067c601..89035568ac 100644 --- a/tx-models/src/main/java/qualitynotification/alert/response/AlertResponse.java +++ b/tx-models/src/main/java/qualitynotification/alert/response/AlertResponse.java @@ -21,12 +21,11 @@ import io.swagger.v3.oas.annotations.media.ArraySchema; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; import lombok.ToString; import lombok.experimental.SuperBuilder; import qualitynotification.base.response.QualityNotificationResponse; -@Data + @ToString(callSuper = true) @SuperBuilder @ArraySchema(arraySchema = @Schema(description = "Alerts", additionalProperties = Schema.AdditionalPropertiesValue.FALSE), maxItems = Integer.MAX_VALUE) diff --git a/tx-models/src/main/java/qualitynotification/investigation/response/InvestigationResponse.java b/tx-models/src/main/java/qualitynotification/investigation/response/InvestigationResponse.java index da3be53330..c9538083a4 100644 --- a/tx-models/src/main/java/qualitynotification/investigation/response/InvestigationResponse.java +++ b/tx-models/src/main/java/qualitynotification/investigation/response/InvestigationResponse.java @@ -21,12 +21,10 @@ import io.swagger.v3.oas.annotations.media.ArraySchema; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; import lombok.experimental.SuperBuilder; import qualitynotification.base.response.QualityNotificationResponse; -@Data @SuperBuilder @ArraySchema(arraySchema = @Schema(description = "Investigations", additionalProperties = Schema.AdditionalPropertiesValue.FALSE), minItems = Integer.MIN_VALUE, maxItems = Integer.MAX_VALUE) public class InvestigationResponse extends QualityNotificationResponse { From a15022e0b5689490e0b3be81ccc679ada0c22aba Mon Sep 17 00:00:00 2001 From: ashanmugavel Date: Mon, 9 Oct 2023 16:52:40 +0200 Subject: [PATCH 10/39] fixed: security issues --- .../openapi/traceability-foss-backend.json | 1442 ++++++++--------- .../base/mapper/AssetBaseResponseMapper.java | 2 - .../common/config/OpenApiConfig.java | 2 - .../common/config/SecurityConfig.java | 1 + .../FeignDiscoveryRepositoryImpl.java | 3 +- 5 files changed, 711 insertions(+), 739 deletions(-) diff --git a/tx-backend/openapi/traceability-foss-backend.json b/tx-backend/openapi/traceability-foss-backend.json index 0e6dc514a8..9422520a09 100644 --- a/tx-backend/openapi/traceability-foss-backend.json +++ b/tx-backend/openapi/traceability-foss-backend.json @@ -41,8 +41,8 @@ "description" : "The endpoint returns a result of BPN EDC URL mappings.", "operationId" : "getBpnEdcs", "responses" : { - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -81,20 +81,18 @@ } } }, - "200" : { - "description" : "Returns the paged result found", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "400" : { - "description" : "Bad request.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -103,18 +101,20 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "200" : { + "description" : "Returns the paged result found", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } }, - "500" : { - "description" : "Internal server error.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -155,8 +155,8 @@ "required" : true }, "responses" : { - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -195,12 +195,14 @@ } } }, - "400" : { - "description" : "Bad request.", + "200" : { + "description" : "Returns the paged result found for BpnEdcMapping", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } @@ -215,20 +217,18 @@ } } }, - "200" : { - "description" : "Returns the paged result found for BpnEdcMapping", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "500" : { - "description" : "Internal server error.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -269,8 +269,8 @@ "required" : true }, "responses" : { - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -309,12 +309,14 @@ } } }, - "400" : { - "description" : "Bad request.", + "200" : { + "description" : "Returns the paged result found for BpnEdcMapping", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } @@ -329,20 +331,18 @@ } } }, - "200" : { - "description" : "Returns the paged result found for BpnEdcMapping", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "500" : { - "description" : "Internal server error.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -380,8 +380,8 @@ } ], "responses" : { - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -420,14 +420,10 @@ } } }, - "400" : { - "description" : "Bad request.", + "200" : { + "description" : "Returns the paged result found", "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } + "application/json" : {} } }, "401" : { @@ -440,14 +436,18 @@ } } }, - "200" : { - "description" : "Returns the paged result found", + "500" : { + "description" : "Internal server error.", "content" : { - "application/json" : {} + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } } }, - "500" : { - "description" : "Internal server error.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -493,8 +493,8 @@ "required" : true }, "responses" : { - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -533,8 +533,11 @@ } } }, - "400" : { - "description" : "Bad request.", + "204" : { + "description" : "No Content." + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -543,8 +546,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -553,11 +556,8 @@ } } }, - "204" : { - "description" : "No Content." - }, - "500" : { - "description" : "Internal server error.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -595,8 +595,8 @@ "required" : true }, "responses" : { - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -635,8 +635,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -645,8 +645,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -665,8 +665,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -715,8 +715,8 @@ "required" : true }, "responses" : { - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -755,11 +755,8 @@ } } }, - "204" : { - "description" : "No content." - }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -768,8 +765,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -778,8 +775,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -787,6 +784,9 @@ } } } + }, + "204" : { + "description" : "No content." } }, "security" : [ @@ -828,8 +828,8 @@ "required" : true }, "responses" : { - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -868,11 +868,8 @@ } } }, - "204" : { - "description" : "No content." - }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -881,8 +878,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -891,8 +888,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -900,6 +897,9 @@ } } } + }, + "204" : { + "description" : "No content." } }, "security" : [ @@ -931,8 +931,8 @@ } ], "responses" : { - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -971,8 +971,11 @@ } } }, - "400" : { - "description" : "Bad request.", + "204" : { + "description" : "No content." + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -981,11 +984,8 @@ } } }, - "204" : { - "description" : "No content." - }, - "401" : { - "description" : "Authorization failed.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -994,8 +994,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1034,8 +1034,8 @@ } ], "responses" : { - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1074,11 +1074,8 @@ } } }, - "204" : { - "description" : "No content." - }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1087,8 +1084,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1097,8 +1094,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1106,6 +1103,9 @@ } } } + }, + "204" : { + "description" : "No content." } }, "security" : [ @@ -1136,8 +1136,8 @@ "required" : true }, "responses" : { - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1176,8 +1176,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1186,8 +1186,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1206,8 +1206,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1245,8 +1245,8 @@ "required" : true }, "responses" : { - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1285,8 +1285,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1295,8 +1295,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1308,8 +1308,8 @@ "201" : { "description" : "Created." }, - "500" : { - "description" : "Internal server error.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1347,8 +1347,8 @@ "required" : true }, "responses" : { - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1367,18 +1367,20 @@ } } }, - "403" : { - "description" : "Forbidden.", + "200" : { + "description" : "Returns the paged result found for Asset", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } }, - "415" : { - "description" : "Unsupported media type", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1387,8 +1389,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1397,20 +1399,18 @@ } } }, - "200" : { - "description" : "Returns the paged result found for Asset", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "401" : { - "description" : "Authorization failed.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1419,8 +1419,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1458,8 +1458,8 @@ "required" : true }, "responses" : { - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1498,8 +1498,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1508,8 +1508,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1521,8 +1521,8 @@ "201" : { "description" : "Created." }, - "500" : { - "description" : "Internal server error.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1560,8 +1560,8 @@ "required" : true }, "responses" : { - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1580,18 +1580,6 @@ } } }, - "200" : { - "description" : "Returns the paged result found for Asset", - "content" : { - "application/json" : { - "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" - } - } - } - }, "403" : { "description" : "Forbidden.", "content" : { @@ -1612,12 +1600,14 @@ } } }, - "400" : { - "description" : "Bad request.", + "200" : { + "description" : "Returns the paged result found for Asset", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } @@ -1641,6 +1631,16 @@ } } } + }, + "404" : { + "description" : "Not found.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } } }, "security" : [ @@ -1671,8 +1671,8 @@ "required" : true }, "responses" : { - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1711,8 +1711,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1721,8 +1721,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1741,8 +1741,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1791,8 +1791,8 @@ "required" : true }, "responses" : { - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1831,11 +1831,8 @@ } } }, - "204" : { - "description" : "No content." - }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1844,8 +1841,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1854,8 +1851,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1863,6 +1860,9 @@ } } } + }, + "204" : { + "description" : "No content." } }, "security" : [ @@ -1904,8 +1904,8 @@ "required" : true }, "responses" : { - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1944,11 +1944,8 @@ } } }, - "204" : { - "description" : "No content." - }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1957,8 +1954,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1967,8 +1964,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1976,6 +1973,9 @@ } } } + }, + "204" : { + "description" : "No content." } }, "security" : [ @@ -2007,8 +2007,8 @@ } ], "responses" : { - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2047,11 +2047,8 @@ } } }, - "204" : { - "description" : "No content." - }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2060,8 +2057,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2070,8 +2067,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -2079,6 +2076,9 @@ } } } + }, + "204" : { + "description" : "No content." } }, "security" : [ @@ -2110,8 +2110,8 @@ } ], "responses" : { - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2150,8 +2150,11 @@ } } }, - "400" : { - "description" : "Bad request.", + "204" : { + "description" : "No content." + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2160,11 +2163,8 @@ } } }, - "204" : { - "description" : "No content." - }, - "401" : { - "description" : "Authorization failed.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2173,8 +2173,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -2212,8 +2212,38 @@ } ], "responses" : { - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "429" : { + "description" : "Too many requests.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2349,18 +2379,8 @@ } } }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2369,8 +2389,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2379,28 +2399,8 @@ } } }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -2446,8 +2446,8 @@ "required" : true }, "responses" : { - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2466,6 +2466,26 @@ } } }, + "403" : { + "description" : "Forbidden.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "415" : { + "description" : "Unsupported media type", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, "200" : { "description" : "Returns the updated asset", "content" : { @@ -2593,28 +2613,8 @@ } } }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2623,8 +2623,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2633,8 +2633,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -2672,8 +2672,8 @@ } ], "responses" : { - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2712,26 +2712,6 @@ } } }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "200" : { "description" : "Returns the assets found", "content" : { @@ -2859,6 +2839,16 @@ } } }, + "401" : { + "description" : "Authorization failed.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, "500" : { "description" : "Internal server error.", "content" : { @@ -2868,6 +2858,16 @@ } } } + }, + "404" : { + "description" : "Not found.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } } }, "security" : [ @@ -2906,76 +2906,6 @@ "required" : true }, "responses" : { - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "200" : { "description" : "Returns the updated asset", "content" : { @@ -3102,6 +3032,76 @@ } } } + }, + "400" : { + "description" : "Bad request.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "429" : { + "description" : "Too many requests.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "415" : { + "description" : "Unsupported media type", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "401" : { + "description" : "Authorization failed.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "500" : { + "description" : "Internal server error.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } } }, "security" : [ @@ -3122,8 +3122,8 @@ "description" : "The endpoint returns all shell descriptors.", "operationId" : "findAll", "responses" : { - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3162,16 +3162,6 @@ } } }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "200" : { "description" : "ShellDescriptors found.", "content" : { @@ -3204,6 +3194,16 @@ } } } + }, + "404" : { + "description" : "Not found.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } } }, "security" : [ @@ -3223,8 +3223,8 @@ "description" : "The endpoint deletes all shell descriptors.", "operationId" : "deleteAll", "responses" : { - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3243,9 +3243,6 @@ } } }, - "204" : { - "description" : "Deleted." - }, "403" : { "description" : "Forbidden.", "content" : { @@ -3266,8 +3263,11 @@ } } }, - "400" : { - "description" : "Bad request.", + "204" : { + "description" : "Deleted." + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -3276,8 +3276,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3286,8 +3286,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -3315,8 +3315,8 @@ "description" : "The endpoint Triggers reload of shell descriptors.", "operationId" : "reload", "responses" : { - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3355,8 +3355,11 @@ } } }, - "400" : { - "description" : "Bad request.", + "202" : { + "description" : "Created registry reload job." + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -3365,11 +3368,8 @@ } } }, - "202" : { - "description" : "Created registry reload job." - }, - "401" : { - "description" : "Authorization failed.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3378,8 +3378,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -3418,8 +3418,8 @@ } ], "responses" : { - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3438,22 +3438,6 @@ } } }, - "200" : { - "description" : "OK.", - "content" : { - "application/json" : { - "schema" : { - "maxItems" : 2147483647, - "minItems" : -2147483648, - "type" : "array", - "description" : "Investigations", - "items" : { - "$ref" : "#/components/schemas/InvestigationResponse" - } - } - } - } - }, "403" : { "description" : "Forbidden.", "content" : { @@ -3474,12 +3458,18 @@ } } }, - "400" : { - "description" : "Bad request.", + "200" : { + "description" : "OK.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : -2147483648, + "type" : "array", + "description" : "Investigations", + "items" : { + "$ref" : "#/components/schemas/InvestigationResponse" + } } } } @@ -3503,6 +3493,16 @@ } } } + }, + "404" : { + "description" : "Not found.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } } }, "security" : [ @@ -3533,8 +3533,8 @@ } ], "responses" : { - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3553,18 +3553,6 @@ } } }, - "200" : { - "description" : "Returns the paged result found for Asset", - "content" : { - "application/json" : { - "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" - } - } - } - }, "403" : { "description" : "Forbidden.", "content" : { @@ -3585,12 +3573,14 @@ } } }, - "400" : { - "description" : "Bad request.", + "200" : { + "description" : "Returns the paged result found for Asset", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } @@ -3614,6 +3604,16 @@ } } } + }, + "404" : { + "description" : "Not found.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } } }, "security" : [ @@ -3644,18 +3644,20 @@ } ], "responses" : { - "404" : { - "description" : "Not found.", + "200" : { + "description" : "Returns the paged result found for Asset", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } }, - "429" : { - "description" : "Too many requests.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3664,14 +3666,12 @@ } } }, - "200" : { - "description" : "Returns the paged result found for Asset", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } @@ -3696,8 +3696,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -3706,8 +3706,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3716,8 +3716,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -3745,8 +3745,8 @@ "description" : "The endpoint can return limited data based on the user role", "operationId" : "dashboard", "responses" : { - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3765,18 +3765,18 @@ } } }, - "403" : { - "description" : "Forbidden.", + "200" : { + "description" : "Returns dashboard data", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "$ref" : "#/components/schemas/DashboardResponse" } } } }, - "415" : { - "description" : "Unsupported media type", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3785,8 +3785,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3805,18 +3805,18 @@ } } }, - "200" : { - "description" : "Returns dashboard data", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/DashboardResponse" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "500" : { - "description" : "Internal server error.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -3862,8 +3862,8 @@ } ], "responses" : { - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3902,16 +3902,6 @@ } } }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "200" : { "description" : "Returns the paged result found for Asset", "content" : { @@ -4063,6 +4053,16 @@ } } } + }, + "404" : { + "description" : "Not found.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } } }, "security" : [ @@ -4101,8 +4101,8 @@ } ], "responses" : { - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -4141,16 +4141,6 @@ } } }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "200" : { "description" : "Returns the asset by childId", "content" : { @@ -4297,6 +4287,16 @@ } } } + }, + "404" : { + "description" : "Not found.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } } }, "security" : [ @@ -4337,8 +4337,8 @@ } ], "responses" : { - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -4377,12 +4377,14 @@ } } }, - "400" : { - "description" : "Bad request.", + "200" : { + "description" : "Returns a distinct filter values for given fieldName.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } @@ -4397,20 +4399,18 @@ } } }, - "200" : { - "description" : "Returns a distinct filter values for given fieldName.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "500" : { - "description" : "Internal server error.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -4456,56 +4456,6 @@ } ], "responses" : { - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "200" : { "description" : "Returns the paged result found for Asset", "content" : { @@ -4638,6 +4588,46 @@ } } }, + "400" : { + "description" : "Bad request.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "429" : { + "description" : "Too many requests.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "415" : { + "description" : "Unsupported media type", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, "401" : { "description" : "Authorization failed.", "content" : { @@ -4657,6 +4647,16 @@ } } } + }, + "404" : { + "description" : "Not found.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } } }, "security" : [ @@ -4695,28 +4695,8 @@ } ], "responses" : { - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -4724,9 +4704,9 @@ } } } - }, - "415" : { - "description" : "Unsupported media type", + }, + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -4735,8 +4715,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -4745,8 +4725,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -4882,6 +4862,16 @@ } } }, + "401" : { + "description" : "Authorization failed.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, "500" : { "description" : "Internal server error.", "content" : { @@ -4891,6 +4881,16 @@ } } } + }, + "404" : { + "description" : "Not found.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } } }, "security" : [ @@ -4931,8 +4931,8 @@ } ], "responses" : { - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -4971,12 +4971,14 @@ } } }, - "400" : { - "description" : "Bad request.", + "200" : { + "description" : "Returns a distinct filter values for given fieldName.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } @@ -4991,20 +4993,18 @@ } } }, - "200" : { - "description" : "Returns a distinct filter values for given fieldName.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "500" : { - "description" : "Internal server error.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -5032,8 +5032,8 @@ "description" : "The endpoint returns a map for assets consumed by the map.", "operationId" : "assetsCountryMap", "responses" : { - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -5052,20 +5052,6 @@ } } }, - "200" : { - "description" : "Returns the assets found", - "content" : { - "application/json" : { - "schema" : { - "type" : "object", - "additionalProperties" : { - "type" : "integer", - "format" : "int64" - } - } - } - } - }, "403" : { "description" : "Forbidden.", "content" : { @@ -5086,12 +5072,16 @@ } } }, - "400" : { - "description" : "Bad request.", + "200" : { + "description" : "Returns the assets found", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "type" : "object", + "additionalProperties" : { + "type" : "integer", + "format" : "int64" + } } } } @@ -5115,6 +5105,16 @@ } } } + }, + "404" : { + "description" : "Not found.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } } }, "security" : [ @@ -5146,8 +5146,8 @@ } ], "responses" : { - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -5166,21 +5166,6 @@ } } }, - "200" : { - "description" : "OK.", - "content" : { - "application/json" : { - "schema" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Alerts", - "items" : { - "$ref" : "#/components/schemas/AlertResponse" - } - } - } - } - }, "403" : { "description" : "Forbidden.", "content" : { @@ -5201,12 +5186,17 @@ } } }, - "400" : { - "description" : "Bad request.", + "200" : { + "description" : "OK.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "type" : "array", + "description" : "Alerts", + "items" : { + "$ref" : "#/components/schemas/AlertResponse" + } } } } @@ -5230,6 +5220,16 @@ } } } + }, + "404" : { + "description" : "Not found.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } } }, "security" : [ @@ -5260,8 +5260,8 @@ } ], "responses" : { - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -5280,18 +5280,19 @@ } } }, - "403" : { - "description" : "Forbidden.", + "200" : { + "description" : "Returns the paged result found for Asset", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "type" : "array" } } } }, - "415" : { - "description" : "Unsupported media type", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5300,8 +5301,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -5310,19 +5311,18 @@ } } }, - "200" : { - "description" : "Returns the paged result found for Asset", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "401" : { - "description" : "Authorization failed.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5331,8 +5331,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -5370,8 +5370,8 @@ } ], "responses" : { - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -5390,18 +5390,19 @@ } } }, - "403" : { - "description" : "Forbidden.", + "200" : { + "description" : "Returns the paged result found for Asset", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "type" : "array" } } } }, - "415" : { - "description" : "Unsupported media type", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5410,8 +5411,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -5420,19 +5421,18 @@ } } }, - "200" : { - "description" : "Returns the paged result found for Asset", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "401" : { - "description" : "Authorization failed.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5441,8 +5441,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -5470,8 +5470,8 @@ "description" : "Deletes all submodels from the system.", "operationId" : "deleteSubmodels", "responses" : { - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -5510,8 +5510,11 @@ } } }, - "400" : { - "description" : "Bad request.", + "204" : { + "description" : "No Content." + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -5520,8 +5523,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5530,11 +5533,8 @@ } } }, - "204" : { - "description" : "No Content." - }, - "500" : { - "description" : "Internal server error.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -5572,8 +5572,8 @@ } ], "responses" : { - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -5592,9 +5592,6 @@ } } }, - "204" : { - "description" : "Deleted." - }, "403" : { "description" : "Forbidden.", "content" : { @@ -5615,8 +5612,11 @@ } } }, - "400" : { - "description" : "Bad request.", + "204" : { + "description" : "Deleted." + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -5625,8 +5625,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5635,8 +5635,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -6307,32 +6307,6 @@ } } }, - "responses" : { - "badRequestAPI" : { - "description" : "Bad request", - "content" : { - "application/json" : { - "examples" : { - "default" : { - "value" : "{\"code\" : 400, \"Status\" : \"Bad request\", \"Message\" : \"Bad request\"}" - } - } - } - } - }, - "internalServerErrorAPI" : { - "description" : "Internal server error", - "content" : { - "application/json" : { - "examples" : { - "default" : { - "value" : "{\"code\" : 500, \"Status\" : \"Internal server error\", \"Message\" : \"Internal server error\"}" - } - } - } - } - } - }, "securitySchemes" : { "oAuth2" : { "type" : "oauth2", diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/base/mapper/AssetBaseResponseMapper.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/base/mapper/AssetBaseResponseMapper.java index 3b30cdc323..6f3d2b37f6 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/base/mapper/AssetBaseResponseMapper.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/base/mapper/AssetBaseResponseMapper.java @@ -32,7 +32,6 @@ import assets.response.base.SemanticDataModelResponse; import lombok.AllArgsConstructor; import lombok.Data; -import lombok.experimental.SuperBuilder; import lombok.extern.slf4j.Slf4j; import org.eclipse.tractusx.traceability.assets.domain.asbuilt.model.aspect.DetailAspectDataAsBuilt; import org.eclipse.tractusx.traceability.assets.domain.asbuilt.model.aspect.DetailAspectDataTractionBatteryCode; @@ -55,7 +54,6 @@ @AllArgsConstructor @Slf4j @Data -@SuperBuilder public class AssetBaseResponseMapper { public static List fromList(List detailAspectModels) { diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/OpenApiConfig.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/OpenApiConfig.java index c809883178..279bfa64f6 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/OpenApiConfig.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/OpenApiConfig.java @@ -59,8 +59,6 @@ public OpenAPI baseOpenAPI() { new Example().value("{\"code\" : 500, \"Status\" : \"Internal server error\", \"Message\" : \"Internal server error\"}") ))).description("Internal server error"); Components components = new Components(); - components.addResponses("badRequestAPI", badRequestAPI); - components.addResponses("internalServerErrorAPI", internalServerErrorAPI); components.addSecuritySchemes("oAuth2", new SecurityScheme().type(SecurityScheme.Type.OAUTH2) .flows(new OAuthFlows().clientCredentials( new OAuthFlow().scopes( diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/SecurityConfig.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/SecurityConfig.java index d1c7204cff..bbda0c1e65 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/SecurityConfig.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/SecurityConfig.java @@ -62,6 +62,7 @@ public class SecurityConfig { @Value("${jwt.resource-client}") private String resourceClient; + @Deprecated @Bean SecurityFilterChain securityFilterChain(final HttpSecurity httpSecurity) throws Exception { diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/discovery/infrastructure/repository/FeignDiscoveryRepositoryImpl.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/discovery/infrastructure/repository/FeignDiscoveryRepositoryImpl.java index 4cb72726e2..9adbff4a9a 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/discovery/infrastructure/repository/FeignDiscoveryRepositoryImpl.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/discovery/infrastructure/repository/FeignDiscoveryRepositoryImpl.java @@ -24,9 +24,9 @@ import org.eclipse.tractusx.irs.registryclient.discovery.DiscoveryFinderRequest; import org.eclipse.tractusx.irs.registryclient.discovery.DiscoveryResponse; import org.eclipse.tractusx.irs.registryclient.discovery.EdcDiscoveryResult; +import org.eclipse.tractusx.traceability.common.properties.EdcProperties; import org.eclipse.tractusx.traceability.discovery.domain.model.Discovery; import org.eclipse.tractusx.traceability.discovery.domain.repository.DiscoveryRepository; -import org.eclipse.tractusx.traceability.common.properties.EdcProperties; import org.springframework.stereotype.Component; import java.util.ArrayList; @@ -43,6 +43,7 @@ public class FeignDiscoveryRepositoryImpl implements DiscoveryRepository { private final EdcProperties edcProperties; private final DiscoveryFinderClient discoveryFinderClient; + @Override public Optional retrieveDiscoveryByFinderAndEdcDiscoveryService(String bpn) { DiscoveryFinderRequest request = new DiscoveryFinderRequest(List.of("bpn")); DiscoveryResponse discoveryEndpoints = discoveryFinderClient.findDiscoveryEndpoints(request); From 0c8082d9f3fc776aa847aa1011b7a183f9f7905b Mon Sep 17 00:00:00 2001 From: ashanmugavel Date: Mon, 9 Oct 2023 16:57:22 +0200 Subject: [PATCH 11/39] fixed: security issues --- .../openapi/traceability-foss-backend.json | 1578 ++++++++--------- .../common/config/OpenApiConfig.java | 18 - .../common/config/SecurityConfig.java | 2 +- 3 files changed, 790 insertions(+), 808 deletions(-) diff --git a/tx-backend/openapi/traceability-foss-backend.json b/tx-backend/openapi/traceability-foss-backend.json index 9422520a09..a517d42578 100644 --- a/tx-backend/openapi/traceability-foss-backend.json +++ b/tx-backend/openapi/traceability-foss-backend.json @@ -41,8 +41,8 @@ "description" : "The endpoint returns a result of BPN EDC URL mappings.", "operationId" : "getBpnEdcs", "responses" : { - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -51,8 +51,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -61,8 +61,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -71,8 +71,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -81,8 +81,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -91,30 +91,30 @@ } } }, - "500" : { - "description" : "Internal server error.", + "200" : { + "description" : "Returns the paged result found", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } }, - "200" : { - "description" : "Returns the paged result found", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "404" : { - "description" : "Not found.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -155,8 +155,8 @@ "required" : true }, "responses" : { - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -165,8 +165,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -175,8 +175,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -185,8 +185,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -195,20 +195,18 @@ } } }, - "200" : { - "description" : "Returns the paged result found for BpnEdcMapping", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "401" : { - "description" : "Authorization failed.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -217,18 +215,20 @@ } } }, - "500" : { - "description" : "Internal server error.", + "200" : { + "description" : "Returns the paged result found for BpnEdcMapping", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } }, - "404" : { - "description" : "Not found.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -269,8 +269,8 @@ "required" : true }, "responses" : { - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -279,8 +279,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -289,8 +289,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -299,8 +299,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -309,20 +309,18 @@ } } }, - "200" : { - "description" : "Returns the paged result found for BpnEdcMapping", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "401" : { - "description" : "Authorization failed.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -331,18 +329,20 @@ } } }, - "500" : { - "description" : "Internal server error.", + "200" : { + "description" : "Returns the paged result found for BpnEdcMapping", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } }, - "404" : { - "description" : "Not found.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -380,8 +380,8 @@ } ], "responses" : { - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -390,8 +390,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -400,8 +400,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -410,8 +410,14 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "200" : { + "description" : "Returns the paged result found", + "content" : { + "application/json" : {} + } + }, + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -420,14 +426,8 @@ } } }, - "200" : { - "description" : "Returns the paged result found", - "content" : { - "application/json" : {} - } - }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -436,8 +436,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -446,8 +446,8 @@ } } }, - "404" : { - "description" : "Not found.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -493,8 +493,8 @@ "required" : true }, "responses" : { - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -503,8 +503,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -513,8 +513,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -523,8 +523,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -533,11 +533,8 @@ } } }, - "204" : { - "description" : "No Content." - }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -546,8 +543,11 @@ } } }, - "500" : { - "description" : "Internal server error.", + "204" : { + "description" : "No Content." + }, + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -556,8 +556,8 @@ } } }, - "404" : { - "description" : "Not found.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -595,8 +595,8 @@ "required" : true }, "responses" : { - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -605,8 +605,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -615,8 +615,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -625,8 +625,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -635,8 +635,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -645,8 +645,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -665,8 +665,8 @@ } } }, - "404" : { - "description" : "Not found.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -715,8 +715,8 @@ "required" : true }, "responses" : { - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -725,8 +725,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -735,8 +735,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -745,8 +745,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -755,8 +755,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -765,8 +765,11 @@ } } }, - "500" : { - "description" : "Internal server error.", + "204" : { + "description" : "No content." + }, + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -775,8 +778,8 @@ } } }, - "404" : { - "description" : "Not found.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -784,9 +787,6 @@ } } } - }, - "204" : { - "description" : "No content." } }, "security" : [ @@ -828,8 +828,8 @@ "required" : true }, "responses" : { - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -838,8 +838,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -848,8 +848,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -858,8 +858,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -868,8 +868,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -878,8 +878,11 @@ } } }, - "500" : { - "description" : "Internal server error.", + "204" : { + "description" : "No content." + }, + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -888,8 +891,8 @@ } } }, - "404" : { - "description" : "Not found.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -897,9 +900,6 @@ } } } - }, - "204" : { - "description" : "No content." } }, "security" : [ @@ -931,8 +931,8 @@ } ], "responses" : { - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -941,8 +941,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -951,8 +951,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -961,8 +961,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -971,11 +971,8 @@ } } }, - "204" : { - "description" : "No content." - }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -984,8 +981,11 @@ } } }, - "500" : { - "description" : "Internal server error.", + "204" : { + "description" : "No content." + }, + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -994,8 +994,8 @@ } } }, - "404" : { - "description" : "Not found.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1034,8 +1034,8 @@ } ], "responses" : { - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1044,8 +1044,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1054,8 +1054,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1064,8 +1064,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1074,8 +1074,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1084,8 +1084,11 @@ } } }, - "500" : { - "description" : "Internal server error.", + "204" : { + "description" : "No content." + }, + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1094,8 +1097,8 @@ } } }, - "404" : { - "description" : "Not found.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1103,9 +1106,6 @@ } } } - }, - "204" : { - "description" : "No content." } }, "security" : [ @@ -1136,8 +1136,8 @@ "required" : true }, "responses" : { - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1146,8 +1146,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1156,8 +1156,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1166,8 +1166,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1176,8 +1176,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1186,8 +1186,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1206,8 +1206,8 @@ } } }, - "404" : { - "description" : "Not found.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1245,8 +1245,8 @@ "required" : true }, "responses" : { - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1255,8 +1255,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1265,8 +1265,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1275,8 +1275,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1285,8 +1285,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1295,8 +1295,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1308,8 +1308,8 @@ "201" : { "description" : "Created." }, - "404" : { - "description" : "Not found.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1347,8 +1347,8 @@ "required" : true }, "responses" : { - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1357,8 +1357,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1367,20 +1367,18 @@ } } }, - "200" : { - "description" : "Returns the paged result found for Asset", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1389,8 +1387,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1399,8 +1397,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1409,18 +1407,20 @@ } } }, - "500" : { - "description" : "Internal server error.", + "200" : { + "description" : "Returns the paged result found for Asset", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } }, - "404" : { - "description" : "Not found.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1458,8 +1458,8 @@ "required" : true }, "responses" : { - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1468,8 +1468,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1478,8 +1478,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1488,8 +1488,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1498,8 +1498,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1508,8 +1508,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1521,8 +1521,8 @@ "201" : { "description" : "Created." }, - "404" : { - "description" : "Not found.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1560,18 +1560,20 @@ "required" : true }, "responses" : { - "400" : { - "description" : "Bad request.", + "200" : { + "description" : "Returns the paged result found for Asset", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1580,8 +1582,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1590,8 +1592,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1600,20 +1602,18 @@ } } }, - "200" : { - "description" : "Returns the paged result found for Asset", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1622,8 +1622,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1632,8 +1632,8 @@ } } }, - "404" : { - "description" : "Not found.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1671,8 +1671,8 @@ "required" : true }, "responses" : { - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1681,8 +1681,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1691,8 +1691,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1701,8 +1701,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1711,8 +1711,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1721,8 +1721,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1741,8 +1741,8 @@ } } }, - "404" : { - "description" : "Not found.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1791,8 +1791,8 @@ "required" : true }, "responses" : { - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1801,8 +1801,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1811,8 +1811,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1821,8 +1821,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1831,8 +1831,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1841,8 +1841,11 @@ } } }, - "500" : { - "description" : "Internal server error.", + "204" : { + "description" : "No content." + }, + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1851,8 +1854,8 @@ } } }, - "404" : { - "description" : "Not found.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1860,9 +1863,6 @@ } } } - }, - "204" : { - "description" : "No content." } }, "security" : [ @@ -1904,8 +1904,8 @@ "required" : true }, "responses" : { - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1914,8 +1914,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1924,8 +1924,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1934,8 +1934,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1944,8 +1944,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1954,8 +1954,11 @@ } } }, - "500" : { - "description" : "Internal server error.", + "204" : { + "description" : "No content." + }, + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1964,8 +1967,8 @@ } } }, - "404" : { - "description" : "Not found.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1973,9 +1976,6 @@ } } } - }, - "204" : { - "description" : "No content." } }, "security" : [ @@ -2007,8 +2007,8 @@ } ], "responses" : { - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2017,8 +2017,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2027,8 +2027,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2037,8 +2037,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -2047,8 +2047,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -2057,8 +2057,11 @@ } } }, - "500" : { - "description" : "Internal server error.", + "204" : { + "description" : "No content." + }, + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2067,8 +2070,8 @@ } } }, - "404" : { - "description" : "Not found.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2076,9 +2079,6 @@ } } } - }, - "204" : { - "description" : "No content." } }, "security" : [ @@ -2110,8 +2110,8 @@ } ], "responses" : { - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2120,8 +2120,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2130,8 +2130,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2140,8 +2140,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -2150,11 +2150,8 @@ } } }, - "204" : { - "description" : "No content." - }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -2163,8 +2160,11 @@ } } }, - "500" : { - "description" : "Internal server error.", + "204" : { + "description" : "No content." + }, + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2173,8 +2173,8 @@ } } }, - "404" : { - "description" : "Not found.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2212,8 +2212,8 @@ } ], "responses" : { - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2222,8 +2222,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2232,8 +2232,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2242,8 +2242,18 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -2379,18 +2389,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2399,8 +2399,8 @@ } } }, - "404" : { - "description" : "Not found.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2446,8 +2446,8 @@ "required" : true }, "responses" : { - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2456,8 +2456,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2466,8 +2466,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2476,8 +2476,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -2613,8 +2613,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -2623,8 +2623,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2633,8 +2633,8 @@ } } }, - "404" : { - "description" : "Not found.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2672,8 +2672,8 @@ } ], "responses" : { - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2682,8 +2682,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2692,8 +2692,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2702,8 +2702,18 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -2839,18 +2849,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2859,8 +2859,8 @@ } } }, - "404" : { - "description" : "Not found.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2906,6 +2906,36 @@ "required" : true }, "responses" : { + "401" : { + "description" : "Authorization failed.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "415" : { + "description" : "Unsupported media type", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "500" : { + "description" : "Internal server error.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, "200" : { "description" : "Returns the updated asset", "content" : { @@ -3033,16 +3063,6 @@ } } }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "429" : { "description" : "Too many requests.", "content" : { @@ -3053,28 +3073,8 @@ } } }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -3083,8 +3083,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3093,8 +3093,8 @@ } } }, - "404" : { - "description" : "Not found.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3122,8 +3122,8 @@ "description" : "The endpoint returns all shell descriptors.", "operationId" : "findAll", "responses" : { - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -3132,8 +3132,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3142,8 +3142,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3152,8 +3152,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -3162,31 +3162,31 @@ } } }, - "200" : { - "description" : "ShellDescriptors found.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ShellDescriptorResponse" - } + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "401" : { - "description" : "Authorization failed.", + "200" : { + "description" : "ShellDescriptors found.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ShellDescriptorResponse" + } } } } }, - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3195,8 +3195,8 @@ } } }, - "404" : { - "description" : "Not found.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3223,8 +3223,8 @@ "description" : "The endpoint deletes all shell descriptors.", "operationId" : "deleteAll", "responses" : { - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -3233,8 +3233,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3243,8 +3243,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3253,8 +3253,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -3266,8 +3266,8 @@ "204" : { "description" : "Deleted." }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -3276,8 +3276,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3286,8 +3286,8 @@ } } }, - "404" : { - "description" : "Not found.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3315,8 +3315,8 @@ "description" : "The endpoint Triggers reload of shell descriptors.", "operationId" : "reload", "responses" : { - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -3325,8 +3325,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3335,8 +3335,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3345,8 +3345,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -3355,11 +3355,8 @@ } } }, - "202" : { - "description" : "Created registry reload job." - }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -3368,8 +3365,11 @@ } } }, - "500" : { - "description" : "Internal server error.", + "202" : { + "description" : "Created registry reload job." + }, + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3378,8 +3378,8 @@ } } }, - "404" : { - "description" : "Not found.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3418,8 +3418,8 @@ } ], "responses" : { - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -3428,8 +3428,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3438,8 +3438,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3448,8 +3448,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -3474,8 +3474,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -3484,8 +3484,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3494,8 +3494,8 @@ } } }, - "404" : { - "description" : "Not found.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3533,8 +3533,8 @@ } ], "responses" : { - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -3543,8 +3543,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3553,8 +3553,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3563,8 +3563,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -3573,30 +3573,30 @@ } } }, - "200" : { - "description" : "Returns the paged result found for Asset", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "401" : { - "description" : "Authorization failed.", + "200" : { + "description" : "Returns the paged result found for Asset", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } }, - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3605,8 +3605,8 @@ } } }, - "404" : { - "description" : "Not found.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3644,20 +3644,18 @@ } ], "responses" : { - "200" : { - "description" : "Returns the paged result found for Asset", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "400" : { - "description" : "Bad request.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3666,8 +3664,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3676,8 +3674,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -3686,18 +3684,20 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "200" : { + "description" : "Returns the paged result found for Asset", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -3706,8 +3706,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3716,8 +3716,8 @@ } } }, - "404" : { - "description" : "Not found.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3745,8 +3745,8 @@ "description" : "The endpoint can return limited data based on the user role", "operationId" : "dashboard", "responses" : { - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -3755,8 +3755,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3765,18 +3765,18 @@ } } }, - "200" : { - "description" : "Returns dashboard data", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/DashboardResponse" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -3785,8 +3785,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -3795,18 +3795,18 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "200" : { + "description" : "Returns dashboard data", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "$ref" : "#/components/schemas/DashboardResponse" } } } }, - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3815,8 +3815,8 @@ } } }, - "404" : { - "description" : "Not found.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3862,8 +3862,8 @@ } ], "responses" : { - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -3872,8 +3872,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3882,8 +3882,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3892,8 +3892,18 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -4034,18 +4044,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -4054,8 +4054,8 @@ } } }, - "404" : { - "description" : "Not found.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -4101,8 +4101,8 @@ } ], "responses" : { - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -4111,8 +4111,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -4121,8 +4121,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -4131,8 +4131,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -4268,8 +4268,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -4278,8 +4278,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -4288,8 +4288,8 @@ } } }, - "404" : { - "description" : "Not found.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -4337,8 +4337,8 @@ } ], "responses" : { - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -4347,8 +4347,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -4357,8 +4357,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -4367,8 +4367,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -4389,8 +4389,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -4399,8 +4399,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -4409,8 +4409,8 @@ } } }, - "404" : { - "description" : "Not found.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -4456,6 +4456,56 @@ } ], "responses" : { + "401" : { + "description" : "Authorization failed.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "415" : { + "description" : "Unsupported media type", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "500" : { + "description" : "Internal server error.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "429" : { + "description" : "Too many requests.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, "200" : { "description" : "Returns the paged result found for Asset", "content" : { @@ -4598,16 +4648,6 @@ } } }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "403" : { "description" : "Forbidden.", "content" : { @@ -4617,46 +4657,6 @@ } } } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } } }, "security" : [ @@ -4695,8 +4695,8 @@ } ], "responses" : { - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -4705,8 +4705,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -4715,8 +4715,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -4725,8 +4725,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -4862,8 +4862,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -4872,8 +4872,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -4882,8 +4882,8 @@ } } }, - "404" : { - "description" : "Not found.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -4931,8 +4931,8 @@ } ], "responses" : { - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -4941,8 +4941,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -4951,8 +4951,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -4961,8 +4961,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -4983,8 +4983,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -4993,8 +4993,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -5003,8 +5003,8 @@ } } }, - "404" : { - "description" : "Not found.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5032,8 +5032,8 @@ "description" : "The endpoint returns a map for assets consumed by the map.", "operationId" : "assetsCountryMap", "responses" : { - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -5042,8 +5042,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -5052,8 +5052,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5062,8 +5062,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -5086,8 +5086,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -5096,8 +5096,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -5106,8 +5106,8 @@ } } }, - "404" : { - "description" : "Not found.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5146,8 +5146,8 @@ } ], "responses" : { - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -5156,8 +5156,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -5166,8 +5166,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5176,8 +5176,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -5201,8 +5201,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -5211,8 +5211,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -5221,8 +5221,8 @@ } } }, - "404" : { - "description" : "Not found.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5260,8 +5260,8 @@ } ], "responses" : { - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -5270,8 +5270,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -5280,19 +5280,18 @@ } } }, - "200" : { - "description" : "Returns the paged result found for Asset", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -5301,8 +5300,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -5311,18 +5310,19 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "200" : { + "description" : "Returns the paged result found for Asset", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "type" : "array" } } } }, - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -5331,8 +5331,8 @@ } } }, - "404" : { - "description" : "Not found.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5370,8 +5370,8 @@ } ], "responses" : { - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -5380,8 +5380,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -5390,19 +5390,18 @@ } } }, - "200" : { - "description" : "Returns the paged result found for Asset", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -5411,8 +5410,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -5421,18 +5420,19 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "200" : { + "description" : "Returns the paged result found for Asset", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "type" : "array" } } } }, - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -5441,8 +5441,8 @@ } } }, - "404" : { - "description" : "Not found.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5470,8 +5470,8 @@ "description" : "Deletes all submodels from the system.", "operationId" : "deleteSubmodels", "responses" : { - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -5480,8 +5480,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -5490,8 +5490,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5500,8 +5500,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -5510,11 +5510,8 @@ } } }, - "204" : { - "description" : "No Content." - }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -5523,8 +5520,11 @@ } } }, - "500" : { - "description" : "Internal server error.", + "204" : { + "description" : "No Content." + }, + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -5533,8 +5533,8 @@ } } }, - "404" : { - "description" : "Not found.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5572,8 +5572,8 @@ } ], "responses" : { - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -5582,8 +5582,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -5592,8 +5592,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5602,8 +5602,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -5612,11 +5612,8 @@ } } }, - "204" : { - "description" : "Deleted." - }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -5625,8 +5622,11 @@ } } }, - "500" : { - "description" : "Internal server error.", + "204" : { + "description" : "Deleted." + }, + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -5635,8 +5635,8 @@ } } }, - "404" : { - "description" : "Not found.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/OpenApiConfig.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/OpenApiConfig.java index 279bfa64f6..a2724001f6 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/OpenApiConfig.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/OpenApiConfig.java @@ -24,11 +24,8 @@ import io.swagger.v3.oas.annotations.OpenAPIDefinition; import io.swagger.v3.oas.models.Components; import io.swagger.v3.oas.models.OpenAPI; -import io.swagger.v3.oas.models.examples.Example; import io.swagger.v3.oas.models.info.Info; import io.swagger.v3.oas.models.info.License; -import io.swagger.v3.oas.models.media.Content; -import io.swagger.v3.oas.models.responses.ApiResponse; import io.swagger.v3.oas.models.security.OAuthFlow; import io.swagger.v3.oas.models.security.OAuthFlows; import io.swagger.v3.oas.models.security.Scopes; @@ -36,7 +33,6 @@ import io.swagger.v3.oas.models.security.SecurityScheme; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.http.MediaType; @Configuration @OpenAPIDefinition @@ -44,20 +40,6 @@ public class OpenApiConfig { @Bean public OpenAPI baseOpenAPI() { - ApiResponse badRequestAPI = new ApiResponse().content( - new Content().addMediaType( - MediaType.APPLICATION_JSON_VALUE, - new io.swagger.v3.oas.models.media.MediaType().addExamples( - "default", - new Example().value("{\"code\" : 400, \"Status\" : \"Bad request\", \"Message\" : \"Bad request\"}") - ))).description("Bad request"); - ApiResponse internalServerErrorAPI = new ApiResponse().content( - new Content().addMediaType( - MediaType.APPLICATION_JSON_VALUE, - new io.swagger.v3.oas.models.media.MediaType().addExamples( - "default", - new Example().value("{\"code\" : 500, \"Status\" : \"Internal server error\", \"Message\" : \"Internal server error\"}") - ))).description("Internal server error"); Components components = new Components(); components.addSecuritySchemes("oAuth2", new SecurityScheme().type(SecurityScheme.Type.OAUTH2) .flows(new OAuthFlows().clientCredentials( diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/SecurityConfig.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/SecurityConfig.java index bbda0c1e65..28c47664b2 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/SecurityConfig.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/SecurityConfig.java @@ -62,7 +62,7 @@ public class SecurityConfig { @Value("${jwt.resource-client}") private String resourceClient; - @Deprecated + @Bean SecurityFilterChain securityFilterChain(final HttpSecurity httpSecurity) throws Exception { From c4bc601f425edd147e8036fbad3aec153bc9396a Mon Sep 17 00:00:00 2001 From: ashanmugavel Date: Mon, 9 Oct 2023 16:58:34 +0200 Subject: [PATCH 12/39] fixed: security issues --- .../tractusx/traceability/common/config/SecurityConfig.java | 1 + 1 file changed, 1 insertion(+) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/SecurityConfig.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/SecurityConfig.java index 28c47664b2..e8338df155 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/SecurityConfig.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/SecurityConfig.java @@ -57,6 +57,7 @@ public class SecurityConfig { "/actuator/**", "/registry/reload", "/submodel/**" + }; @Value("${jwt.resource-client}") From 9bbf111b5246ff6968e4fffbfdc93b3d361e5844 Mon Sep 17 00:00:00 2001 From: ashanmugavel Date: Tue, 10 Oct 2023 10:08:45 +0200 Subject: [PATCH 13/39] chore: updated dependencies and plugins --- .../workflows/docker-image-branch_frontend.yml | 4 ++-- .github/workflows/docker-image-main_backend.yml | 4 ++-- .github/workflows/docker-image-main_frontend.yml | 4 ++-- .github/workflows/docker-image-tag-release.yaml | 8 ++++---- .github/workflows/helm-test.yaml | 4 ++-- .github/workflows/pull-request_backend.yml | 2 +- .github/workflows/release.yaml | 16 ++++++++-------- .github/workflows/trivy.yml | 2 +- CHANGELOG.md | 4 ++++ pom.xml | 4 ++-- 10 files changed, 28 insertions(+), 24 deletions(-) diff --git a/.github/workflows/docker-image-branch_frontend.yml b/.github/workflows/docker-image-branch_frontend.yml index d19c6e476f..5b77883b4d 100644 --- a/.github/workflows/docker-image-branch_frontend.yml +++ b/.github/workflows/docker-image-branch_frontend.yml @@ -55,7 +55,7 @@ jobs: env: DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} if: env.DOCKER_HUB_USER == '' - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: frontend push: true @@ -74,7 +74,7 @@ jobs: env: DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} if: env.DOCKER_HUB_USER != '' - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: frontend push: true diff --git a/.github/workflows/docker-image-main_backend.yml b/.github/workflows/docker-image-main_backend.yml index 486bc8c7f8..b54bc9b64c 100644 --- a/.github/workflows/docker-image-main_backend.yml +++ b/.github/workflows/docker-image-main_backend.yml @@ -61,7 +61,7 @@ jobs: env: DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} if: env.DOCKER_HUB_USER == '' - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . push: true @@ -80,7 +80,7 @@ jobs: env: DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} if: env.DOCKER_HUB_USER != '' - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . push: true diff --git a/.github/workflows/docker-image-main_frontend.yml b/.github/workflows/docker-image-main_frontend.yml index 054e6edb03..02e016740f 100644 --- a/.github/workflows/docker-image-main_frontend.yml +++ b/.github/workflows/docker-image-main_frontend.yml @@ -56,7 +56,7 @@ jobs: env: DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} if: env.DOCKER_HUB_USER == '' - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: frontend push: true @@ -75,7 +75,7 @@ jobs: env: DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} if: env.DOCKER_HUB_USER != '' - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: frontend push: true diff --git a/.github/workflows/docker-image-tag-release.yaml b/.github/workflows/docker-image-tag-release.yaml index 0bff05b2b6..2ec4ad918a 100644 --- a/.github/workflows/docker-image-tag-release.yaml +++ b/.github/workflows/docker-image-tag-release.yaml @@ -59,7 +59,7 @@ jobs: env: DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} if: env.DOCKER_HUB_USER == '' - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: frontend push: true @@ -78,7 +78,7 @@ jobs: env: DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} if: env.DOCKER_HUB_USER != '' - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: frontend push: true @@ -133,7 +133,7 @@ jobs: env: DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} if: env.DOCKER_HUB_USER == '' - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . push: true @@ -152,7 +152,7 @@ jobs: env: DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} if: env.DOCKER_HUB_USER != '' - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . push: true diff --git a/.github/workflows/helm-test.yaml b/.github/workflows/helm-test.yaml index df00ee8c42..950748c519 100644 --- a/.github/workflows/helm-test.yaml +++ b/.github/workflows/helm-test.yaml @@ -52,14 +52,14 @@ jobs: version: v0.20.0 - name: Build & push Image App to KinD - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . push: true tags: ${{ env.REGISTRY }}/${{ env.APP_NAME}}:${{ env.TAG }} - name: Build & push Image Frontend to KinD - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: ./frontend push: true diff --git a/.github/workflows/pull-request_backend.yml b/.github/workflows/pull-request_backend.yml index 34a25850c4..dfe6060961 100644 --- a/.github/workflows/pull-request_backend.yml +++ b/.github/workflows/pull-request_backend.yml @@ -101,7 +101,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build & Push docker image for GHCR ${{ env.GHCR_REGISTRY }}/${{ github.repository }}:${{ github.event.pull_request.head.sha }} - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . push: true diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 757f053022..8d43eb8fb8 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -17,42 +17,42 @@ jobs: run: echo HELM_VERSION=$(cat charts/traceability-foss/CHANGELOG.md | sed -n 's/.*\[\([0-9]\+\.[0-9]\+\.[0-9]\+\)\].*/\1/p' | head -n 1) >> $GITHUB_ENV - name: Update Chart.yaml appVersion - uses: mikefarah/yq@v4.35.1 + uses: mikefarah/yq@v4.35.2 with: cmd: yq -i eval '.appVersion = "${{ github.ref_name }}"' charts/traceability-foss/Chart.yaml - name: Update Chart.yaml version - uses: mikefarah/yq@v4.35.1 + uses: mikefarah/yq@v4.35.2 with: cmd: yq -i eval '.version = "${{ env.HELM_VERSION }}"' charts/traceability-foss/Chart.yaml - name: Update frontend dependency version in Chart.yaml - uses: mikefarah/yq@v4.35.1 + uses: mikefarah/yq@v4.35.2 with: cmd: yq -i eval '.dependencies[0].version = "${{ env.HELM_VERSION }}"' charts/traceability-foss/Chart.yaml - name: Update backend dependency version in Chart.yaml - uses: mikefarah/yq@v4.35.1 + uses: mikefarah/yq@v4.35.2 with: cmd: yq -i eval '.dependencies[1].version = "${{ env.HELM_VERSION }}"' charts/traceability-foss/Chart.yaml - name: Update frontend version in frontend/Chart.yaml - uses: mikefarah/yq@v4.35.1 + uses: mikefarah/yq@v4.35.2 with: cmd: yq -i eval '.version = "${{ env.HELM_VERSION }}"' charts/traceability-foss/charts/frontend/Chart.yaml - name: Update frontend appVersion in frontend/Chart.yaml - uses: mikefarah/yq@v4.35.1 + uses: mikefarah/yq@v4.35.2 with: cmd: yq -i eval '.appVersion = "${{ github.ref_name }}"' charts/traceability-foss/charts/frontend/Chart.yaml - name: Update backend version in backend/Chart.yaml - uses: mikefarah/yq@v4.35.1 + uses: mikefarah/yq@v4.35.2 with: cmd: yq -i eval '.version = "${{ env.HELM_VERSION }}"' charts/traceability-foss/charts/backend/Chart.yaml - name: Update backend appVersion in frontend/Chart.yaml - uses: mikefarah/yq@v4.35.1 + uses: mikefarah/yq@v4.35.2 with: cmd: yq -i eval '.appVersion = "${{ github.ref_name }}"' charts/traceability-foss/charts/backend/Chart.yaml diff --git a/.github/workflows/trivy.yml b/.github/workflows/trivy.yml index 617b4e6afc..599bf66f90 100644 --- a/.github/workflows/trivy.yml +++ b/.github/workflows/trivy.yml @@ -170,7 +170,7 @@ jobs: cache: 'maven' - name: Locally build docker image - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . push: false diff --git a/CHANGELOG.md b/CHANGELOG.md index bf4e3e7971..fbcbb7a94f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Updated policy related logic to reflect IRS changes - Moved response handling from the backend folder to the model folder, addressing a TODO item. - StartQualityAlertRequest class and replaced it with extant StartQualityNotification class +- updated mikefarah/yq from 4.35.1 to 4.35.2 +- updated maven-site-plugin from 4.0.0-M5 to 4.0.0-M9 +- updated testcontainer-postgresql from 1.17.6 to 1.19.0 +- updated docker/build-push-action from 4 to 5 - Updated user manual to reflect current state of the part views diff --git a/pom.xml b/pom.xml index 4b608949c3..32df26d7e4 100644 --- a/pom.xml +++ b/pom.xml @@ -62,7 +62,7 @@ SPDX-License-Identifier: Apache-2.0 3.9.1.2184 3.1.2 3.0.0-M8 - 4.0.0-M5 + 4.0.0-M9 0.1.3 0.0.1-SNAPSHOT @@ -86,7 +86,7 @@ SPDX-License-Identifier: Apache-2.0 2.13.0 0.9.3 1.1.0 - 1.17.6 + 1.19.0 5.3.2 2.0.4 From 6bce0286a5dd8571497c805a0eeb3a2c0f709649 Mon Sep 17 00:00:00 2001 From: ds-lcapellino Date: Tue, 10 Oct 2023 10:50:34 +0200 Subject: [PATCH 14/39] feature: TRACEFOSS-1439 add test scope to dash IP license check --- pom.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pom.xml b/pom.xml index 4b608949c3..5e262b8c1e 100644 --- a/pom.xml +++ b/pom.xml @@ -254,6 +254,17 @@ SPDX-License-Identifier: Apache-2.0 org.eclipse.dash license-tool-plugin ${eclipse-dash-ip.version} + + test + + + + license-check + + license-check + + + org.apache.maven.plugins From 1969ff1b032ea69ea26988e759f32d7d49c4a9aa Mon Sep 17 00:00:00 2001 From: ashanmugavel Date: Thu, 5 Oct 2023 14:43:58 +0200 Subject: [PATCH 15/39] chore: Completed TODO task --- .../common/model/SecurityUtils.java | 6 +-- .../request/StartQualityAlertRequest.java | 12 +++++ .../alert/rest/AlertController.java | 19 ++++---- ... => StartQualityInvestigationRequest.java} | 13 ++++- .../service/QualityNotificationService.java | 8 +--- .../rest/InvestigationsController.java | 25 +++++----- .../exception/StartQualityNotification.java | 47 +++++++++++++++++++ .../alert/service/AlertServiceImpl.java | 9 ++-- .../service/InvestigationServiceImpl.java | 9 ++-- .../edc/model/EdcNotificationModelTest.java | 10 ++-- .../assets/DashboardControllerIT.java | 5 +- .../PublisherInvestigationsControllerIT.java | 14 +++--- .../alert/rest/AlertControllerTest.java | 11 ++--- 13 files changed, 124 insertions(+), 64 deletions(-) rename tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/{StartQualityNotificationRequest.java => StartQualityInvestigationRequest.java} (76%) create mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/model/exception/StartQualityNotification.java diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/model/SecurityUtils.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/model/SecurityUtils.java index d0d2bda19e..b89f412e54 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/model/SecurityUtils.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/model/SecurityUtils.java @@ -23,7 +23,7 @@ import org.apache.commons.text.StringEscapeUtils; import org.eclipse.tractusx.traceability.qualitynotification.application.alert.request.StartQualityAlertRequest; import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.CloseQualityNotificationRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityNotificationRequest; +import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityInvestigationRequest; import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationRequest; import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotification; import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotificationContent; @@ -54,11 +54,11 @@ public static List sanitize(List unSanitizedList) { return null; } - public static StartQualityNotificationRequest sanitize(StartQualityNotificationRequest request) { + public static StartQualityInvestigationRequest sanitize(StartQualityInvestigationRequest request) { String cleanDescription = sanitize(request.getDescription()); String cleanReceiverBpn = sanitize(request.getReceiverBpn()); List cleanPartIds = sanitize(request.getPartIds()); - return StartQualityNotificationRequest.builder() + return StartQualityInvestigationRequest.builder() .description(cleanDescription) .targetDate(request.getTargetDate()) .severity(request.getSeverity()) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/request/StartQualityAlertRequest.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/request/StartQualityAlertRequest.java index 243908186b..2266088c19 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/request/StartQualityAlertRequest.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/request/StartQualityAlertRequest.java @@ -28,6 +28,7 @@ import lombok.Data; import lombok.NoArgsConstructor; import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.QualityNotificationSeverityRequest; +import org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception.StartQualityNotification; import java.time.Instant; import java.util.List; @@ -55,4 +56,15 @@ public class StartQualityAlertRequest { private String bpn; @ApiModelProperty(example = "true") private boolean isAsBuilt = true; + + public static StartQualityNotification toDomain(StartQualityAlertRequest startQualityAlertRequest) { + return StartQualityNotification.builder() + .partIds(startQualityAlertRequest.getPartIds()) + .description(startQualityAlertRequest.getDescription()) + .targetDate(startQualityAlertRequest.getTargetDate()) + .severity(startQualityAlertRequest.getSeverity().toDomain()) + .bpn(startQualityAlertRequest.getBpn()) + .isAsBuilt(startQualityAlertRequest.isAsBuilt()) + .build(); + } } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertController.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertController.java index 0fc06aae27..e0dfdb33b1 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertController.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertController.java @@ -45,11 +45,18 @@ import org.springframework.http.HttpStatus; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseStatus; +import org.springframework.web.bind.annotation.RestController; import qualitynotification.alert.response.AlertResponse; import qualitynotification.base.response.QualityNotificationIdResponse; import static org.eclipse.tractusx.traceability.common.model.SecurityUtils.sanitize; +import static org.eclipse.tractusx.traceability.qualitynotification.application.alert.request.StartQualityAlertRequest.toDomain; import static org.eclipse.tractusx.traceability.qualitynotification.application.validation.UpdateQualityNotificationValidator.validate; @Profile(FeatureFlags.NOTIFICATIONS_ENABLED_PROFILES) @@ -122,15 +129,7 @@ public AlertController(@Qualifier("alertServiceImpl") QualityNotificationService public QualityNotificationIdResponse alertAssets(@RequestBody @Valid StartQualityAlertRequest request) { StartQualityAlertRequest cleanStartQualityAlertRequest = sanitize(request); log.info(API_LOG_START + " with params: {}", cleanStartQualityAlertRequest); - //TODO refactor this method to only take request as parameter - return new QualityNotificationIdResponse(alertService.start( - cleanStartQualityAlertRequest.getPartIds(), - cleanStartQualityAlertRequest.getDescription(), - cleanStartQualityAlertRequest.getTargetDate(), - cleanStartQualityAlertRequest.getSeverity().toDomain(), - cleanStartQualityAlertRequest.getBpn(), - cleanStartQualityAlertRequest.isAsBuilt() - ).value()); + return new QualityNotificationIdResponse(alertService.start(toDomain(cleanStartQualityAlertRequest)).value()); } @Operation(operationId = "getCreatedAlerts", diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/StartQualityNotificationRequest.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/StartQualityInvestigationRequest.java similarity index 76% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/StartQualityNotificationRequest.java rename to tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/StartQualityInvestigationRequest.java index c9a4515fc5..18081424a4 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/StartQualityNotificationRequest.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/StartQualityInvestigationRequest.java @@ -29,6 +29,7 @@ import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; +import org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception.StartQualityNotification; import java.time.Instant; import java.util.List; @@ -37,7 +38,7 @@ @Builder @NoArgsConstructor @AllArgsConstructor -public class StartQualityNotificationRequest { +public class StartQualityInvestigationRequest { @Size(min = 1, max = 100, message = "Specify at least 1 and at most 100 partIds") @ApiModelProperty(example = "[\"urn:uuid:fe99da3d-b0de-4e80-81da-882aebcca978\"]") private List partIds; @@ -54,4 +55,14 @@ public class StartQualityNotificationRequest { private boolean isAsBuilt = true; @ApiModelProperty(example = "BPN00001123123AS") private String receiverBpn; + + public static StartQualityNotification toDomain(StartQualityInvestigationRequest startQualityNotificationRequest) { + return StartQualityNotification.builder() + .partIds(startQualityNotificationRequest.getPartIds()) + .description(startQualityNotificationRequest.getDescription()) + .targetDate(startQualityNotificationRequest.getTargetDate()) + .severity(startQualityNotificationRequest.getSeverity().toDomain()) + .isAsBuilt(startQualityNotificationRequest.isAsBuilt()) + .build(); + } } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/service/QualityNotificationService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/service/QualityNotificationService.java index b70df4e566..32901be7f9 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/service/QualityNotificationService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/service/QualityNotificationService.java @@ -19,19 +19,15 @@ package org.eclipse.tractusx.traceability.qualitynotification.application.base.service; import org.eclipse.tractusx.traceability.common.model.PageResult; +import org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception.StartQualityNotification; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotification; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationId; -import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationSeverity; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationStatus; import org.springframework.data.domain.Pageable; -import java.time.Instant; -import java.util.List; - public interface QualityNotificationService { - // TODO refactor to use request object instead of all params. - QualityNotificationId start(List partIds, String description, Instant targetDate, QualityNotificationSeverity severity, String targetBpn, boolean isAsBuilt); + QualityNotificationId start(StartQualityNotification startQualityAlertDomain); PageResult getCreated(Pageable pageable); diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/investigation/rest/InvestigationsController.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/investigation/rest/InvestigationsController.java index 0f1f332be4..9dd54a4be0 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/investigation/rest/InvestigationsController.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/investigation/rest/InvestigationsController.java @@ -38,7 +38,7 @@ import org.eclipse.tractusx.traceability.common.response.ErrorResponse; import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.CloseQualityNotificationRequest; import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.QualityNotificationStatusRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityNotificationRequest; +import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityInvestigationRequest; import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationRequest; import org.eclipse.tractusx.traceability.qualitynotification.application.base.service.QualityNotificationService; import org.eclipse.tractusx.traceability.qualitynotification.application.investigation.mapper.InvestigationResponseMapper; @@ -47,11 +47,18 @@ import org.springframework.http.HttpStatus; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseStatus; +import org.springframework.web.bind.annotation.RestController; import qualitynotification.base.response.QualityNotificationIdResponse; import qualitynotification.investigation.response.InvestigationResponse; import static org.eclipse.tractusx.traceability.common.model.SecurityUtils.sanitize; +import static org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityInvestigationRequest.toDomain; import static org.eclipse.tractusx.traceability.qualitynotification.application.validation.UpdateQualityNotificationValidator.validate; @Profile(FeatureFlags.NOTIFICATIONS_ENABLED_PROFILES) @@ -122,17 +129,11 @@ public InvestigationsController(@Qualifier("investigationServiceImpl") QualityNo schema = @Schema(implementation = ErrorResponse.class)))}) @PostMapping @ResponseStatus(HttpStatus.CREATED) - public QualityNotificationIdResponse investigateAssets(@RequestBody @Valid StartQualityNotificationRequest request) { - StartQualityNotificationRequest cleanRequest = sanitize(request); + public QualityNotificationIdResponse investigateAssets(@RequestBody @Valid StartQualityInvestigationRequest request) { + StartQualityInvestigationRequest cleanRequest = sanitize(request); log.info(API_LOG_START + " with params: {}", cleanRequest); - return new QualityNotificationIdResponse(investigationService.start( - cleanRequest.getPartIds(), - cleanRequest.getDescription(), - cleanRequest.getTargetDate(), - cleanRequest.getSeverity().toDomain(), - cleanRequest.getReceiverBpn(), - cleanRequest.isAsBuilt()) - .value()); + return new QualityNotificationIdResponse(investigationService.start(toDomain(cleanRequest)).value()); + } @Operation(operationId = "getCreatedInvestigations", diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/model/exception/StartQualityNotification.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/model/exception/StartQualityNotification.java new file mode 100644 index 0000000000..493dfa7c03 --- /dev/null +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/model/exception/StartQualityNotification.java @@ -0,0 +1,47 @@ +/******************************************************************************** + * Copyright (c) 2023 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ + +package org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception; + +import lombok.Builder; +import lombok.Data; +import lombok.Getter; +import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationSeverity; + +import java.time.Instant; +import java.util.List; + +@Builder +@Getter +@Data +public class StartQualityNotification { + + private List partIds; + + private String description; + + private Instant targetDate; + + private QualityNotificationSeverity severity; + + private String bpn; + + private boolean isAsBuilt = true; + +} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/service/AlertServiceImpl.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/service/AlertServiceImpl.java index 9ab66a6840..2f1883ade1 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/service/AlertServiceImpl.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/service/AlertServiceImpl.java @@ -23,18 +23,15 @@ import lombok.extern.slf4j.Slf4j; import org.eclipse.tractusx.traceability.assets.domain.asbuilt.service.AssetAsBuiltServiceImpl; import org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception.AlertNotFoundException; +import org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception.StartQualityNotification; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.AlertRepository; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotification; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationId; -import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationSeverity; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.service.AbstractQualityNotificationService; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.service.NotificationPublisherService; import org.eclipse.tractusx.traceability.qualitynotification.domain.repository.QualityNotificationRepository; import org.springframework.stereotype.Service; -import java.time.Instant; -import java.util.List; - @Slf4j @Service("alertServiceImpl") @RequiredArgsConstructor @@ -60,8 +57,8 @@ protected AssetAsBuiltServiceImpl getAssetAsBuiltServiceImpl() { } @Override - public QualityNotificationId start(List partIds, String description, Instant targetDate, QualityNotificationSeverity severity, String targetBpn, boolean isAsBuilt) { - QualityNotification notification = notificationPublisherService.startAlert(partIds, description, targetDate, severity, targetBpn, isAsBuilt); + public QualityNotificationId start(StartQualityNotification startQualityAlertDomain) { + QualityNotification notification = notificationPublisherService.startAlert(startQualityAlertDomain.getPartIds(), startQualityAlertDomain.getDescription(), startQualityAlertDomain.getTargetDate(), startQualityAlertDomain.getSeverity(), startQualityAlertDomain.getBpn(), startQualityAlertDomain.isAsBuilt()); QualityNotificationId createdAlertId = alertRepository.saveQualityNotificationEntity(notification); log.info("Start Alert {}", notification); diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/investigation/service/InvestigationServiceImpl.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/investigation/service/InvestigationServiceImpl.java index 118fcba13c..ac50d9514f 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/investigation/service/InvestigationServiceImpl.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/investigation/service/InvestigationServiceImpl.java @@ -22,19 +22,16 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.eclipse.tractusx.traceability.assets.domain.asbuilt.service.AssetAsBuiltServiceImpl; +import org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception.StartQualityNotification; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.InvestigationRepository; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotification; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationId; -import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationSeverity; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.service.AbstractQualityNotificationService; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.service.NotificationPublisherService; import org.eclipse.tractusx.traceability.qualitynotification.domain.investigation.model.exception.InvestigationNotFoundException; import org.eclipse.tractusx.traceability.qualitynotification.domain.repository.QualityNotificationRepository; import org.springframework.stereotype.Service; -import java.time.Instant; -import java.util.List; - @Slf4j @RequiredArgsConstructor @Service("investigationServiceImpl") @@ -60,8 +57,8 @@ protected AssetAsBuiltServiceImpl getAssetAsBuiltServiceImpl() { } @Override - public QualityNotificationId start(List partIds, String description, Instant targetDate, QualityNotificationSeverity severity, String receiverBpn, boolean isAsBuilt) { - QualityNotification notification = getNotificationPublisherService().startInvestigation(partIds, description, targetDate, severity, receiverBpn, isAsBuilt); + public QualityNotificationId start(StartQualityNotification startQualityAlertDomain) { + QualityNotification notification = getNotificationPublisherService().startInvestigation(startQualityAlertDomain.getPartIds(), startQualityAlertDomain.getDescription(), startQualityAlertDomain.getTargetDate(), startQualityAlertDomain.getSeverity(), startQualityAlertDomain.getBpn(), startQualityAlertDomain.isAsBuilt()); QualityNotificationId createdInvestigationId = getQualityNotificationRepository().saveQualityNotificationEntity(notification); log.info("Start Investigation {}", notification); diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/model/EdcNotificationModelTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/model/EdcNotificationModelTest.java index bb96fee0ad..ca72696cfc 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/model/EdcNotificationModelTest.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/model/EdcNotificationModelTest.java @@ -19,7 +19,11 @@ package org.eclipse.tractusx.traceability.infrastructure.edc.model; import org.eclipse.tractusx.traceability.qualitynotification.application.alert.request.StartQualityAlertRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.*; +import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.CloseQualityNotificationRequest; +import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.QualityNotificationSeverityRequest; +import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityInvestigationRequest; +import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationRequest; +import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationStatusRequest; import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotification; import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotificationContent; import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotificationHeader; @@ -81,11 +85,11 @@ public void testSanitizeStartQualityNotificationRequest() { partIds.add("urn:uuid:fe99da3d-b0de-4e80-81da-882aebcca979\n"); Instant targetDate = Instant.parse("2023-09-22T14:30:00Z".trim()); QualityNotificationSeverityRequest severity = QualityNotificationSeverityRequest.MINOR; - StartQualityNotificationRequest request = new StartQualityNotificationRequest(partIds, "The description\n", targetDate, severity, true, "BPN00001123123AS\n"); + StartQualityInvestigationRequest request = new StartQualityInvestigationRequest(partIds, "The description\n", targetDate, severity, true, "BPN00001123123AS\n"); //WHEN - StartQualityNotificationRequest cleanRequest = sanitize(request); + StartQualityInvestigationRequest cleanRequest = sanitize(request); //THEN assertEquals("urn:uuid:fe99da3d-b0de-4e80-81da-882aebcca979 ", cleanRequest.getPartIds().get(1)); diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/DashboardControllerIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/DashboardControllerIT.java index 6bdd59adef..8bd9974dcd 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/DashboardControllerIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/DashboardControllerIT.java @@ -29,8 +29,7 @@ import org.eclipse.tractusx.traceability.integration.common.support.AssetsSupport; import org.eclipse.tractusx.traceability.integration.common.support.InvestigationsSupport; import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.QualityNotificationSeverityRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityNotificationRequest; -import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.model.NotificationStatusBaseEntity; +import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityInvestigationRequest; import org.jose4j.lang.JoseException; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -145,7 +144,7 @@ void givenPendingInvestigation_whenGetDashboard_thenReturnPendingInvestigation() assetsSupport.defaultAssetsStored(); investigationsSupport.defaultReceivedInvestigationStored(); String assetId = "urn:uuid:fe99da3d-b0de-4e80-81da-882aebcca978"; - var notificationRequest = StartQualityNotificationRequest.builder() + var notificationRequest = StartQualityInvestigationRequest.builder() .partIds(List.of(assetId)) .description("at least 15 characters long investigation description") .severity(QualityNotificationSeverityRequest.MINOR) diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/investigation/PublisherInvestigationsControllerIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/investigation/PublisherInvestigationsControllerIT.java index beba5ae8c2..8e649fe4d4 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/investigation/PublisherInvestigationsControllerIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/investigation/PublisherInvestigationsControllerIT.java @@ -32,7 +32,7 @@ import org.eclipse.tractusx.traceability.qualitynotification.application.alert.request.StartQualityAlertRequest; import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.CloseQualityNotificationRequest; import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.QualityNotificationSeverityRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityNotificationRequest; +import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityInvestigationRequest; import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationRequest; import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationStatusRequest; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationAffectedPart; @@ -122,7 +122,7 @@ void shouldStartInvestigation() throws JsonProcessingException, JoseException { assetsSupport.defaultAssetsStored(); - val request = StartQualityNotificationRequest.builder() + val request = StartQualityInvestigationRequest.builder() .partIds(partIds) .description(description) .severity(QualityNotificationSeverityRequest.MINOR) @@ -173,7 +173,7 @@ void givenMissingSeverity_whenStartInvestigation_thenBadRequest() throws JsonPro ); String description = "at least 15 characters long investigation description"; - val request = StartQualityNotificationRequest.builder() + val request = StartQualityInvestigationRequest.builder() .partIds(partIds) .description(description) .build(); @@ -262,7 +262,7 @@ void givenWrongStatus_whenUpdateInvestigation_thenBadRequest() throws JsonProces void shouldCancelInvestigation() throws JsonProcessingException, JoseException { // given assetsSupport.defaultAssetsStored(); - val startInvestigationRequest = StartQualityNotificationRequest.builder() + val startInvestigationRequest = StartQualityInvestigationRequest.builder() .partIds(List.of("urn:uuid:fe99da3d-b0de-4e80-81da-882aebcca978")) .description("at least 15 characters long investigation description") .severity(QualityNotificationSeverityRequest.MAJOR) @@ -324,7 +324,7 @@ void shouldApproveInvestigationStatus() throws JsonProcessingException, JoseExce String description = "at least 15 characters long investigation description"; assetsSupport.defaultAssetsStored(); - val startInvestigationRequest = StartQualityNotificationRequest.builder() + val startInvestigationRequest = StartQualityInvestigationRequest.builder() .partIds(partIds) .description(description) .severity(QualityNotificationSeverityRequest.MINOR) @@ -377,7 +377,7 @@ void shouldCloseInvestigationStatus() throws JsonProcessingException, JoseExcept String description = "at least 15 characters long investigation description"; assetsSupport.defaultAssetsStored(); - val startInvestigationRequest = StartQualityNotificationRequest.builder() + val startInvestigationRequest = StartQualityInvestigationRequest.builder() .partIds(partIds) .description(description) .severity(QualityNotificationSeverityRequest.MINOR) @@ -485,7 +485,7 @@ void shouldBeCreatedBySender() throws JsonProcessingException, JoseException { ); String description = "at least 15 characters long investigation description"; assetsSupport.defaultAssetsStored(); - val startInvestigationRequest = StartQualityNotificationRequest.builder() + val startInvestigationRequest = StartQualityInvestigationRequest.builder() .partIds(partIds) .description(description) .severity(QualityNotificationSeverityRequest.MINOR) diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertControllerTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertControllerTest.java index cee1f3f9ad..cbae0b6aa0 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertControllerTest.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertControllerTest.java @@ -34,6 +34,7 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InjectMocks; import org.mockito.Mock; +import org.mockito.Mockito; import org.mockito.junit.jupiter.MockitoExtension; import qualitynotification.alert.response.AlertResponse; import qualitynotification.base.response.QualityNotificationIdResponse; @@ -46,6 +47,7 @@ import java.util.List; import static org.assertj.core.api.Assertions.assertThat; +import static org.eclipse.tractusx.traceability.qualitynotification.application.alert.request.StartQualityAlertRequest.toDomain; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; @@ -56,6 +58,7 @@ class AlertControllerTest { @Mock private QualityNotificationService alertService; + @InjectMocks private AlertController controller; @@ -72,13 +75,7 @@ void givenRequestBody_whenAlertAssets_thenResponse() { .severity(QualityNotificationSeverityRequest.MINOR) .bpn("BPN00001") .build(); - when(alertService.start( - request.getPartIds(), - request.getDescription(), - request.getTargetDate(), - request.getSeverity().toDomain(), - request.getBpn(), request.isAsBuilt() - )).thenReturn(notificationId); + when(alertService.start(Mockito.eq(toDomain(request)))).thenReturn(notificationId); // when final QualityNotificationIdResponse result = controller.alertAssets(request); From 20bcec8729409dbe6a8039036406b22a29d8f7e8 Mon Sep 17 00:00:00 2001 From: ashanmugavel Date: Thu, 5 Oct 2023 14:49:23 +0200 Subject: [PATCH 16/39] chore: Completed TODO task --- .../domain/alert/model/exception/StartQualityNotification.java | 2 +- .../investigation/PublisherInvestigationsControllerIT.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/model/exception/StartQualityNotification.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/model/exception/StartQualityNotification.java index 493dfa7c03..199eb74190 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/model/exception/StartQualityNotification.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/model/exception/StartQualityNotification.java @@ -42,6 +42,6 @@ public class StartQualityNotification { private String bpn; - private boolean isAsBuilt = true; + private boolean isAsBuilt; } diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/investigation/PublisherInvestigationsControllerIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/investigation/PublisherInvestigationsControllerIT.java index 8e649fe4d4..5e8b39788d 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/investigation/PublisherInvestigationsControllerIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/investigation/PublisherInvestigationsControllerIT.java @@ -111,6 +111,7 @@ void shouldReceiveNotification() { investigationNotificationsSupport.assertNotificationsSize(1); } + @Test void shouldStartInvestigation() throws JsonProcessingException, JoseException { // given List partIds = List.of( From b71e33dadbe486604c9102f8960ae7981f04d0e8 Mon Sep 17 00:00:00 2001 From: ashanmugavel Date: Fri, 6 Oct 2023 14:31:44 +0200 Subject: [PATCH 17/39] chore: Completed TODO task "move to tx-models" --- .../common/model/SecurityUtils.java | 6 +- .../request/StartQualityAlertRequest.java | 12 +--- .../alert/rest/AlertController.java | 4 +- ...a => StartQualityNotificationRequest.java} | 12 +--- .../service/QualityNotificationService.java | 4 +- .../rest/InvestigationsController.java | 10 +-- .../exception/StartQualityNotification.java | 47 ------------ .../StartQualityNotificationDomain.java | 71 +++++++++++++++++++ .../alert/service/AlertServiceImpl.java | 4 +- .../service/InvestigationServiceImpl.java | 4 +- .../edc/model/EdcNotificationModelTest.java | 6 +- .../assets/DashboardControllerIT.java | 4 +- .../PublisherInvestigationsControllerIT.java | 14 ++-- .../alert/rest/AlertControllerTest.java | 4 +- 14 files changed, 103 insertions(+), 99 deletions(-) rename tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/{StartQualityInvestigationRequest.java => StartQualityNotificationRequest.java} (76%) delete mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/model/exception/StartQualityNotification.java create mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/model/exception/StartQualityNotificationDomain.java diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/model/SecurityUtils.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/model/SecurityUtils.java index b89f412e54..57ee9e29e6 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/model/SecurityUtils.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/model/SecurityUtils.java @@ -23,7 +23,7 @@ import org.apache.commons.text.StringEscapeUtils; import org.eclipse.tractusx.traceability.qualitynotification.application.alert.request.StartQualityAlertRequest; import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.CloseQualityNotificationRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityInvestigationRequest; +import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityNotificationRequest; import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationRequest; import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotification; import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotificationContent; @@ -54,11 +54,11 @@ public static List sanitize(List unSanitizedList) { return null; } - public static StartQualityInvestigationRequest sanitize(StartQualityInvestigationRequest request) { + public static StartQualityNotificationRequest sanitize(StartQualityNotificationRequest request) { String cleanDescription = sanitize(request.getDescription()); String cleanReceiverBpn = sanitize(request.getReceiverBpn()); List cleanPartIds = sanitize(request.getPartIds()); - return StartQualityInvestigationRequest.builder() + return StartQualityNotificationRequest.builder() .description(cleanDescription) .targetDate(request.getTargetDate()) .severity(request.getSeverity()) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/request/StartQualityAlertRequest.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/request/StartQualityAlertRequest.java index 2266088c19..2c0d3d7f04 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/request/StartQualityAlertRequest.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/request/StartQualityAlertRequest.java @@ -28,7 +28,6 @@ import lombok.Data; import lombok.NoArgsConstructor; import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.QualityNotificationSeverityRequest; -import org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception.StartQualityNotification; import java.time.Instant; import java.util.List; @@ -57,14 +56,5 @@ public class StartQualityAlertRequest { @ApiModelProperty(example = "true") private boolean isAsBuilt = true; - public static StartQualityNotification toDomain(StartQualityAlertRequest startQualityAlertRequest) { - return StartQualityNotification.builder() - .partIds(startQualityAlertRequest.getPartIds()) - .description(startQualityAlertRequest.getDescription()) - .targetDate(startQualityAlertRequest.getTargetDate()) - .severity(startQualityAlertRequest.getSeverity().toDomain()) - .bpn(startQualityAlertRequest.getBpn()) - .isAsBuilt(startQualityAlertRequest.isAsBuilt()) - .build(); - } + } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertController.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertController.java index e0dfdb33b1..8ff41c844e 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertController.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertController.java @@ -56,8 +56,8 @@ import qualitynotification.base.response.QualityNotificationIdResponse; import static org.eclipse.tractusx.traceability.common.model.SecurityUtils.sanitize; -import static org.eclipse.tractusx.traceability.qualitynotification.application.alert.request.StartQualityAlertRequest.toDomain; import static org.eclipse.tractusx.traceability.qualitynotification.application.validation.UpdateQualityNotificationValidator.validate; +import static org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception.StartQualityNotificationDomain.from; @Profile(FeatureFlags.NOTIFICATIONS_ENABLED_PROFILES) @RestController @@ -129,7 +129,7 @@ public AlertController(@Qualifier("alertServiceImpl") QualityNotificationService public QualityNotificationIdResponse alertAssets(@RequestBody @Valid StartQualityAlertRequest request) { StartQualityAlertRequest cleanStartQualityAlertRequest = sanitize(request); log.info(API_LOG_START + " with params: {}", cleanStartQualityAlertRequest); - return new QualityNotificationIdResponse(alertService.start(toDomain(cleanStartQualityAlertRequest)).value()); + return new QualityNotificationIdResponse(alertService.start(from(cleanStartQualityAlertRequest)).value()); } @Operation(operationId = "getCreatedAlerts", diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/StartQualityInvestigationRequest.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/StartQualityNotificationRequest.java similarity index 76% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/StartQualityInvestigationRequest.java rename to tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/StartQualityNotificationRequest.java index 18081424a4..5661100190 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/StartQualityInvestigationRequest.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/StartQualityNotificationRequest.java @@ -29,7 +29,6 @@ import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception.StartQualityNotification; import java.time.Instant; import java.util.List; @@ -38,7 +37,7 @@ @Builder @NoArgsConstructor @AllArgsConstructor -public class StartQualityInvestigationRequest { +public class StartQualityNotificationRequest { @Size(min = 1, max = 100, message = "Specify at least 1 and at most 100 partIds") @ApiModelProperty(example = "[\"urn:uuid:fe99da3d-b0de-4e80-81da-882aebcca978\"]") private List partIds; @@ -56,13 +55,4 @@ public class StartQualityInvestigationRequest { @ApiModelProperty(example = "BPN00001123123AS") private String receiverBpn; - public static StartQualityNotification toDomain(StartQualityInvestigationRequest startQualityNotificationRequest) { - return StartQualityNotification.builder() - .partIds(startQualityNotificationRequest.getPartIds()) - .description(startQualityNotificationRequest.getDescription()) - .targetDate(startQualityNotificationRequest.getTargetDate()) - .severity(startQualityNotificationRequest.getSeverity().toDomain()) - .isAsBuilt(startQualityNotificationRequest.isAsBuilt()) - .build(); - } } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/service/QualityNotificationService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/service/QualityNotificationService.java index 32901be7f9..95a742faed 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/service/QualityNotificationService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/service/QualityNotificationService.java @@ -19,7 +19,7 @@ package org.eclipse.tractusx.traceability.qualitynotification.application.base.service; import org.eclipse.tractusx.traceability.common.model.PageResult; -import org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception.StartQualityNotification; +import org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception.StartQualityNotificationDomain; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotification; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationId; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationStatus; @@ -27,7 +27,7 @@ public interface QualityNotificationService { - QualityNotificationId start(StartQualityNotification startQualityAlertDomain); + QualityNotificationId start(StartQualityNotificationDomain startQualityAlertDomain); PageResult getCreated(Pageable pageable); diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/investigation/rest/InvestigationsController.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/investigation/rest/InvestigationsController.java index 9dd54a4be0..8ec2cb18f4 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/investigation/rest/InvestigationsController.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/investigation/rest/InvestigationsController.java @@ -38,7 +38,7 @@ import org.eclipse.tractusx.traceability.common.response.ErrorResponse; import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.CloseQualityNotificationRequest; import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.QualityNotificationStatusRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityInvestigationRequest; +import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityNotificationRequest; import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationRequest; import org.eclipse.tractusx.traceability.qualitynotification.application.base.service.QualityNotificationService; import org.eclipse.tractusx.traceability.qualitynotification.application.investigation.mapper.InvestigationResponseMapper; @@ -58,8 +58,8 @@ import qualitynotification.investigation.response.InvestigationResponse; import static org.eclipse.tractusx.traceability.common.model.SecurityUtils.sanitize; -import static org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityInvestigationRequest.toDomain; import static org.eclipse.tractusx.traceability.qualitynotification.application.validation.UpdateQualityNotificationValidator.validate; +import static org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception.StartQualityNotificationDomain.from; @Profile(FeatureFlags.NOTIFICATIONS_ENABLED_PROFILES) @RestController @@ -129,10 +129,10 @@ public InvestigationsController(@Qualifier("investigationServiceImpl") QualityNo schema = @Schema(implementation = ErrorResponse.class)))}) @PostMapping @ResponseStatus(HttpStatus.CREATED) - public QualityNotificationIdResponse investigateAssets(@RequestBody @Valid StartQualityInvestigationRequest request) { - StartQualityInvestigationRequest cleanRequest = sanitize(request); + public QualityNotificationIdResponse investigateAssets(@RequestBody @Valid StartQualityNotificationRequest request) { + StartQualityNotificationRequest cleanRequest = sanitize(request); log.info(API_LOG_START + " with params: {}", cleanRequest); - return new QualityNotificationIdResponse(investigationService.start(toDomain(cleanRequest)).value()); + return new QualityNotificationIdResponse(investigationService.start(from(cleanRequest)).value()); } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/model/exception/StartQualityNotification.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/model/exception/StartQualityNotification.java deleted file mode 100644 index 199eb74190..0000000000 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/model/exception/StartQualityNotification.java +++ /dev/null @@ -1,47 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2023 Contributors to the Eclipse Foundation - * - * See the NOTICE file(s) distributed with this work for additional - * information regarding copyright ownership. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ********************************************************************************/ - -package org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception; - -import lombok.Builder; -import lombok.Data; -import lombok.Getter; -import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationSeverity; - -import java.time.Instant; -import java.util.List; - -@Builder -@Getter -@Data -public class StartQualityNotification { - - private List partIds; - - private String description; - - private Instant targetDate; - - private QualityNotificationSeverity severity; - - private String bpn; - - private boolean isAsBuilt; - -} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/model/exception/StartQualityNotificationDomain.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/model/exception/StartQualityNotificationDomain.java new file mode 100644 index 0000000000..97fe173345 --- /dev/null +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/model/exception/StartQualityNotificationDomain.java @@ -0,0 +1,71 @@ +/******************************************************************************** + * Copyright (c) 2023 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ + +package org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception; + +import lombok.Builder; +import lombok.Data; +import lombok.Getter; +import org.eclipse.tractusx.traceability.qualitynotification.application.alert.request.StartQualityAlertRequest; +import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityNotificationRequest; +import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationSeverity; + +import java.time.Instant; +import java.util.List; + +@Builder +@Getter +@Data +public class StartQualityNotificationDomain { + + private List partIds; + + private String description; + + private Instant targetDate; + + private QualityNotificationSeverity severity; + + private String bpn; + + private boolean isAsBuilt; + + public static StartQualityNotificationDomain from(StartQualityNotificationRequest startQualityNotificationRequest) { + return StartQualityNotificationDomain.builder() + .partIds(startQualityNotificationRequest.getPartIds()) + .description(startQualityNotificationRequest.getDescription()) + .targetDate(startQualityNotificationRequest.getTargetDate()) + .severity(startQualityNotificationRequest.getSeverity().toDomain()) + .bpn(startQualityNotificationRequest.getReceiverBpn()) + .isAsBuilt(startQualityNotificationRequest.isAsBuilt()) + .build(); + } + + public static StartQualityNotificationDomain from(StartQualityAlertRequest startQualityAlertRequest) { + return StartQualityNotificationDomain.builder() + .partIds(startQualityAlertRequest.getPartIds()) + .description(startQualityAlertRequest.getDescription()) + .targetDate(startQualityAlertRequest.getTargetDate()) + .severity(startQualityAlertRequest.getSeverity().toDomain()) + .bpn(startQualityAlertRequest.getBpn()) + .isAsBuilt(startQualityAlertRequest.isAsBuilt()) + .build(); + } + +} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/service/AlertServiceImpl.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/service/AlertServiceImpl.java index 2f1883ade1..061d529388 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/service/AlertServiceImpl.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/service/AlertServiceImpl.java @@ -23,7 +23,7 @@ import lombok.extern.slf4j.Slf4j; import org.eclipse.tractusx.traceability.assets.domain.asbuilt.service.AssetAsBuiltServiceImpl; import org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception.AlertNotFoundException; -import org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception.StartQualityNotification; +import org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception.StartQualityNotificationDomain; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.AlertRepository; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotification; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationId; @@ -57,7 +57,7 @@ protected AssetAsBuiltServiceImpl getAssetAsBuiltServiceImpl() { } @Override - public QualityNotificationId start(StartQualityNotification startQualityAlertDomain) { + public QualityNotificationId start(StartQualityNotificationDomain startQualityAlertDomain) { QualityNotification notification = notificationPublisherService.startAlert(startQualityAlertDomain.getPartIds(), startQualityAlertDomain.getDescription(), startQualityAlertDomain.getTargetDate(), startQualityAlertDomain.getSeverity(), startQualityAlertDomain.getBpn(), startQualityAlertDomain.isAsBuilt()); QualityNotificationId createdAlertId = alertRepository.saveQualityNotificationEntity(notification); diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/investigation/service/InvestigationServiceImpl.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/investigation/service/InvestigationServiceImpl.java index ac50d9514f..2101a50c8a 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/investigation/service/InvestigationServiceImpl.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/investigation/service/InvestigationServiceImpl.java @@ -22,7 +22,7 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.eclipse.tractusx.traceability.assets.domain.asbuilt.service.AssetAsBuiltServiceImpl; -import org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception.StartQualityNotification; +import org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception.StartQualityNotificationDomain; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.InvestigationRepository; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotification; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationId; @@ -57,7 +57,7 @@ protected AssetAsBuiltServiceImpl getAssetAsBuiltServiceImpl() { } @Override - public QualityNotificationId start(StartQualityNotification startQualityAlertDomain) { + public QualityNotificationId start(StartQualityNotificationDomain startQualityAlertDomain) { QualityNotification notification = getNotificationPublisherService().startInvestigation(startQualityAlertDomain.getPartIds(), startQualityAlertDomain.getDescription(), startQualityAlertDomain.getTargetDate(), startQualityAlertDomain.getSeverity(), startQualityAlertDomain.getBpn(), startQualityAlertDomain.isAsBuilt()); QualityNotificationId createdInvestigationId = getQualityNotificationRepository().saveQualityNotificationEntity(notification); diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/model/EdcNotificationModelTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/model/EdcNotificationModelTest.java index ca72696cfc..40e1919b73 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/model/EdcNotificationModelTest.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/model/EdcNotificationModelTest.java @@ -21,7 +21,7 @@ import org.eclipse.tractusx.traceability.qualitynotification.application.alert.request.StartQualityAlertRequest; import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.CloseQualityNotificationRequest; import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.QualityNotificationSeverityRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityInvestigationRequest; +import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityNotificationRequest; import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationRequest; import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationStatusRequest; import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotification; @@ -85,11 +85,11 @@ public void testSanitizeStartQualityNotificationRequest() { partIds.add("urn:uuid:fe99da3d-b0de-4e80-81da-882aebcca979\n"); Instant targetDate = Instant.parse("2023-09-22T14:30:00Z".trim()); QualityNotificationSeverityRequest severity = QualityNotificationSeverityRequest.MINOR; - StartQualityInvestigationRequest request = new StartQualityInvestigationRequest(partIds, "The description\n", targetDate, severity, true, "BPN00001123123AS\n"); + StartQualityNotificationRequest request = new StartQualityNotificationRequest(partIds, "The description\n", targetDate, severity, true, "BPN00001123123AS\n"); //WHEN - StartQualityInvestigationRequest cleanRequest = sanitize(request); + StartQualityNotificationRequest cleanRequest = sanitize(request); //THEN assertEquals("urn:uuid:fe99da3d-b0de-4e80-81da-882aebcca979 ", cleanRequest.getPartIds().get(1)); diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/DashboardControllerIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/DashboardControllerIT.java index 8bd9974dcd..1d8d4282c3 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/DashboardControllerIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/DashboardControllerIT.java @@ -29,7 +29,7 @@ import org.eclipse.tractusx.traceability.integration.common.support.AssetsSupport; import org.eclipse.tractusx.traceability.integration.common.support.InvestigationsSupport; import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.QualityNotificationSeverityRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityInvestigationRequest; +import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityNotificationRequest; import org.jose4j.lang.JoseException; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -144,7 +144,7 @@ void givenPendingInvestigation_whenGetDashboard_thenReturnPendingInvestigation() assetsSupport.defaultAssetsStored(); investigationsSupport.defaultReceivedInvestigationStored(); String assetId = "urn:uuid:fe99da3d-b0de-4e80-81da-882aebcca978"; - var notificationRequest = StartQualityInvestigationRequest.builder() + var notificationRequest = StartQualityNotificationRequest.builder() .partIds(List.of(assetId)) .description("at least 15 characters long investigation description") .severity(QualityNotificationSeverityRequest.MINOR) diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/investigation/PublisherInvestigationsControllerIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/investigation/PublisherInvestigationsControllerIT.java index 5e8b39788d..2a4fed072c 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/investigation/PublisherInvestigationsControllerIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/investigation/PublisherInvestigationsControllerIT.java @@ -32,7 +32,7 @@ import org.eclipse.tractusx.traceability.qualitynotification.application.alert.request.StartQualityAlertRequest; import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.CloseQualityNotificationRequest; import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.QualityNotificationSeverityRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityInvestigationRequest; +import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityNotificationRequest; import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationRequest; import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationStatusRequest; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationAffectedPart; @@ -123,7 +123,7 @@ void shouldStartInvestigation() throws JsonProcessingException, JoseException { assetsSupport.defaultAssetsStored(); - val request = StartQualityInvestigationRequest.builder() + val request = StartQualityNotificationRequest.builder() .partIds(partIds) .description(description) .severity(QualityNotificationSeverityRequest.MINOR) @@ -174,7 +174,7 @@ void givenMissingSeverity_whenStartInvestigation_thenBadRequest() throws JsonPro ); String description = "at least 15 characters long investigation description"; - val request = StartQualityInvestigationRequest.builder() + val request = StartQualityNotificationRequest.builder() .partIds(partIds) .description(description) .build(); @@ -263,7 +263,7 @@ void givenWrongStatus_whenUpdateInvestigation_thenBadRequest() throws JsonProces void shouldCancelInvestigation() throws JsonProcessingException, JoseException { // given assetsSupport.defaultAssetsStored(); - val startInvestigationRequest = StartQualityInvestigationRequest.builder() + val startInvestigationRequest = StartQualityNotificationRequest.builder() .partIds(List.of("urn:uuid:fe99da3d-b0de-4e80-81da-882aebcca978")) .description("at least 15 characters long investigation description") .severity(QualityNotificationSeverityRequest.MAJOR) @@ -325,7 +325,7 @@ void shouldApproveInvestigationStatus() throws JsonProcessingException, JoseExce String description = "at least 15 characters long investigation description"; assetsSupport.defaultAssetsStored(); - val startInvestigationRequest = StartQualityInvestigationRequest.builder() + val startInvestigationRequest = StartQualityNotificationRequest.builder() .partIds(partIds) .description(description) .severity(QualityNotificationSeverityRequest.MINOR) @@ -378,7 +378,7 @@ void shouldCloseInvestigationStatus() throws JsonProcessingException, JoseExcept String description = "at least 15 characters long investigation description"; assetsSupport.defaultAssetsStored(); - val startInvestigationRequest = StartQualityInvestigationRequest.builder() + val startInvestigationRequest = StartQualityNotificationRequest.builder() .partIds(partIds) .description(description) .severity(QualityNotificationSeverityRequest.MINOR) @@ -486,7 +486,7 @@ void shouldBeCreatedBySender() throws JsonProcessingException, JoseException { ); String description = "at least 15 characters long investigation description"; assetsSupport.defaultAssetsStored(); - val startInvestigationRequest = StartQualityInvestigationRequest.builder() + val startInvestigationRequest = StartQualityNotificationRequest.builder() .partIds(partIds) .description(description) .severity(QualityNotificationSeverityRequest.MINOR) diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertControllerTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertControllerTest.java index cbae0b6aa0..b7604086ca 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertControllerTest.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertControllerTest.java @@ -47,7 +47,7 @@ import java.util.List; import static org.assertj.core.api.Assertions.assertThat; -import static org.eclipse.tractusx.traceability.qualitynotification.application.alert.request.StartQualityAlertRequest.toDomain; +import static org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception.StartQualityNotificationDomain.from; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; @@ -75,7 +75,7 @@ void givenRequestBody_whenAlertAssets_thenResponse() { .severity(QualityNotificationSeverityRequest.MINOR) .bpn("BPN00001") .build(); - when(alertService.start(Mockito.eq(toDomain(request)))).thenReturn(notificationId); + when(alertService.start(Mockito.eq(from(request)))).thenReturn(notificationId); // when final QualityNotificationIdResponse result = controller.alertAssets(request); From b27769e6372c9c1664530c8cfd964b5f32299c6b Mon Sep 17 00:00:00 2001 From: ashanmugavel Date: Fri, 6 Oct 2023 14:57:49 +0200 Subject: [PATCH 18/39] chore: Completed TODO task "move to tx-models" --- .../traceability/common/model/SecurityUtils.java | 8 ++++---- .../application/alert/rest/AlertController.java | 13 +++++++------ .../rest/InvestigationsController.java | 14 +++++++------- .../UpdateQualityNotificationValidator.java | 2 +- .../exception/StartQualityNotificationDomain.java | 8 ++++---- .../base/model/QualityNotificationSeverity.java | 5 +++++ .../base/model/QualityNotificationStatus.java | 11 +++++++++++ .../edc/model/EdcNotificationModelTest.java | 12 ++++++------ .../integration/assets/DashboardControllerIT.java | 4 ++-- .../alert/PublisherAlertsControllerIT.java | 10 +++++----- .../alert/ReceiverAlertsControllerIT.java | 2 +- .../PublisherInvestigationsControllerIT.java | 12 ++++++------ .../ReceiverInvestigationsControllerIT.java | 2 +- .../alert/rest/AlertControllerTest.java | 10 +++++----- .../QualityNotificationSeverityRequestTest.java | 2 +- .../UpdateQualityNotificationValidatorTest.java | 4 ++-- .../alert/request/StartQualityAlertRequest.java | 6 +++--- .../request/CloseQualityNotificationRequest.java | 4 ++-- .../QualityNotificationSeverityRequest.java | 8 ++------ .../request/QualityNotificationStatusRequest.java | 9 +++------ .../request/StartQualityNotificationRequest.java | 4 ++-- .../request/UpdateQualityNotificationRequest.java | 4 ++-- .../UpdateQualityNotificationStatusRequest.java | 8 ++------ 23 files changed, 84 insertions(+), 78 deletions(-) rename {tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application => tx-models/src/main/java/qualitynotification}/alert/request/StartQualityAlertRequest.java (90%) rename {tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application => tx-models/src/main/java/qualitynotification}/base/request/CloseQualityNotificationRequest.java (92%) rename {tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application => tx-models/src/main/java/qualitynotification}/base/request/QualityNotificationSeverityRequest.java (87%) rename {tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application => tx-models/src/main/java/qualitynotification}/base/request/QualityNotificationStatusRequest.java (70%) rename {tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application => tx-models/src/main/java/qualitynotification}/base/request/StartQualityNotificationRequest.java (95%) rename {tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application => tx-models/src/main/java/qualitynotification}/base/request/UpdateQualityNotificationRequest.java (92%) rename {tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application => tx-models/src/main/java/qualitynotification}/base/request/UpdateQualityNotificationStatusRequest.java (85%) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/model/SecurityUtils.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/model/SecurityUtils.java index 57ee9e29e6..43a85be899 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/model/SecurityUtils.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/model/SecurityUtils.java @@ -21,13 +21,13 @@ import org.apache.commons.text.StringEscapeUtils; -import org.eclipse.tractusx.traceability.qualitynotification.application.alert.request.StartQualityAlertRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.CloseQualityNotificationRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityNotificationRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationRequest; import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotification; import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotificationContent; import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotificationHeader; +import qualitynotification.alert.request.StartQualityAlertRequest; +import qualitynotification.base.request.CloseQualityNotificationRequest; +import qualitynotification.base.request.StartQualityNotificationRequest; +import qualitynotification.base.request.UpdateQualityNotificationRequest; import java.util.List; import java.util.Objects; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertController.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertController.java index 8ff41c844e..d5a1f44211 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertController.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertController.java @@ -35,10 +35,6 @@ import org.eclipse.tractusx.traceability.common.request.OwnPageable; import org.eclipse.tractusx.traceability.common.response.ErrorResponse; import org.eclipse.tractusx.traceability.qualitynotification.application.alert.mapper.AlertResponseMapper; -import org.eclipse.tractusx.traceability.qualitynotification.application.alert.request.StartQualityAlertRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.CloseQualityNotificationRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.QualityNotificationStatusRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationRequest; import org.eclipse.tractusx.traceability.qualitynotification.application.base.service.QualityNotificationService; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.context.annotation.Profile; @@ -52,12 +48,17 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseStatus; import org.springframework.web.bind.annotation.RestController; +import qualitynotification.alert.request.StartQualityAlertRequest; import qualitynotification.alert.response.AlertResponse; +import qualitynotification.base.request.CloseQualityNotificationRequest; +import qualitynotification.base.request.QualityNotificationStatusRequest; +import qualitynotification.base.request.UpdateQualityNotificationRequest; import qualitynotification.base.response.QualityNotificationIdResponse; import static org.eclipse.tractusx.traceability.common.model.SecurityUtils.sanitize; import static org.eclipse.tractusx.traceability.qualitynotification.application.validation.UpdateQualityNotificationValidator.validate; import static org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception.StartQualityNotificationDomain.from; +import static org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationStatus.from; @Profile(FeatureFlags.NOTIFICATIONS_ENABLED_PROFILES) @RestController @@ -488,7 +489,7 @@ public void closeAlert( @Valid @RequestBody CloseQualityNotificationRequest closeAlertRequest) { CloseQualityNotificationRequest cleanCloseAlertRequest = sanitize(closeAlertRequest); log.info(API_LOG_START + "/{}/close with params {}", alertId, cleanCloseAlertRequest); - alertService.update(alertId, QualityNotificationStatusRequest.toDomain(QualityNotificationStatusRequest.CLOSED), cleanCloseAlertRequest.getReason()); + alertService.update(alertId, from(QualityNotificationStatusRequest.CLOSED), cleanCloseAlertRequest.getReason()); } @Operation(operationId = "updateAlert", @@ -553,7 +554,7 @@ public void updateAlert( UpdateQualityNotificationRequest cleanUpdateAlertRequest = sanitize(updateAlertRequest); validate(cleanUpdateAlertRequest); log.info(API_LOG_START + "/{}/update with params {}", alertId, cleanUpdateAlertRequest); - alertService.update(alertId, cleanUpdateAlertRequest.getStatus().toDomain(), cleanUpdateAlertRequest.getReason()); + alertService.update(alertId, from(cleanUpdateAlertRequest.getStatus()), cleanUpdateAlertRequest.getReason()); } } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/investigation/rest/InvestigationsController.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/investigation/rest/InvestigationsController.java index 8ec2cb18f4..511f3e3fdf 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/investigation/rest/InvestigationsController.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/investigation/rest/InvestigationsController.java @@ -36,10 +36,6 @@ import org.eclipse.tractusx.traceability.common.model.PageResult; import org.eclipse.tractusx.traceability.common.request.OwnPageable; import org.eclipse.tractusx.traceability.common.response.ErrorResponse; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.CloseQualityNotificationRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.QualityNotificationStatusRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityNotificationRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationRequest; import org.eclipse.tractusx.traceability.qualitynotification.application.base.service.QualityNotificationService; import org.eclipse.tractusx.traceability.qualitynotification.application.investigation.mapper.InvestigationResponseMapper; import org.springframework.beans.factory.annotation.Qualifier; @@ -54,13 +50,17 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseStatus; import org.springframework.web.bind.annotation.RestController; +import qualitynotification.base.request.CloseQualityNotificationRequest; +import qualitynotification.base.request.QualityNotificationStatusRequest; +import qualitynotification.base.request.StartQualityNotificationRequest; +import qualitynotification.base.request.UpdateQualityNotificationRequest; import qualitynotification.base.response.QualityNotificationIdResponse; import qualitynotification.investigation.response.InvestigationResponse; import static org.eclipse.tractusx.traceability.common.model.SecurityUtils.sanitize; import static org.eclipse.tractusx.traceability.qualitynotification.application.validation.UpdateQualityNotificationValidator.validate; import static org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception.StartQualityNotificationDomain.from; - +import static org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationStatus.from; @Profile(FeatureFlags.NOTIFICATIONS_ENABLED_PROFILES) @RestController @RequestMapping(value = "/investigations", consumes = "application/json", produces = "application/json") @@ -485,7 +485,7 @@ public void cancelInvestigation(@PathVariable Long investigationId) { public void closeInvestigation(@PathVariable Long investigationId, @Valid @RequestBody CloseQualityNotificationRequest closeInvestigationRequest) { CloseQualityNotificationRequest cleanCloseQualityNotificationRequest = sanitize(closeInvestigationRequest); log.info(API_LOG_START + "/{}/close with params {}", investigationId, cleanCloseQualityNotificationRequest); - investigationService.update(investigationId, QualityNotificationStatusRequest.toDomain(QualityNotificationStatusRequest.CLOSED), cleanCloseQualityNotificationRequest.getReason()); + investigationService.update(investigationId, from(QualityNotificationStatusRequest.CLOSED), cleanCloseQualityNotificationRequest.getReason()); } @Operation(operationId = "updateInvestigation", @@ -548,7 +548,7 @@ public void updateInvestigation(@PathVariable Long investigationId, @Valid @Requ UpdateQualityNotificationRequest cleanUpdateQualityNotificationRequest = sanitize(updateInvestigationRequest); validate(cleanUpdateQualityNotificationRequest); log.info(API_LOG_START + "/{}/update with params {}", investigationId, cleanUpdateQualityNotificationRequest); - investigationService.update(investigationId, cleanUpdateQualityNotificationRequest.getStatus().toDomain(), cleanUpdateQualityNotificationRequest.getReason()); + investigationService.update(investigationId, from(cleanUpdateQualityNotificationRequest.getStatus()), cleanUpdateQualityNotificationRequest.getReason()); } } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/validation/UpdateQualityNotificationValidator.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/validation/UpdateQualityNotificationValidator.java index 0065b143c5..68ec0733df 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/validation/UpdateQualityNotificationValidator.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/validation/UpdateQualityNotificationValidator.java @@ -21,8 +21,8 @@ package org.eclipse.tractusx.traceability.qualitynotification.application.validation; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationRequest; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationStatus; +import qualitynotification.base.request.UpdateQualityNotificationRequest; import java.util.Set; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/model/exception/StartQualityNotificationDomain.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/model/exception/StartQualityNotificationDomain.java index 97fe173345..6d0546c3e4 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/model/exception/StartQualityNotificationDomain.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/model/exception/StartQualityNotificationDomain.java @@ -22,9 +22,9 @@ import lombok.Builder; import lombok.Data; import lombok.Getter; -import org.eclipse.tractusx.traceability.qualitynotification.application.alert.request.StartQualityAlertRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityNotificationRequest; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationSeverity; +import qualitynotification.alert.request.StartQualityAlertRequest; +import qualitynotification.base.request.StartQualityNotificationRequest; import java.time.Instant; import java.util.List; @@ -51,7 +51,7 @@ public static StartQualityNotificationDomain from(StartQualityNotificationReques .partIds(startQualityNotificationRequest.getPartIds()) .description(startQualityNotificationRequest.getDescription()) .targetDate(startQualityNotificationRequest.getTargetDate()) - .severity(startQualityNotificationRequest.getSeverity().toDomain()) + .severity(QualityNotificationSeverity.from(startQualityNotificationRequest.getSeverity())) .bpn(startQualityNotificationRequest.getReceiverBpn()) .isAsBuilt(startQualityNotificationRequest.isAsBuilt()) .build(); @@ -62,7 +62,7 @@ public static StartQualityNotificationDomain from(StartQualityAlertRequest start .partIds(startQualityAlertRequest.getPartIds()) .description(startQualityAlertRequest.getDescription()) .targetDate(startQualityAlertRequest.getTargetDate()) - .severity(startQualityAlertRequest.getSeverity().toDomain()) + .severity(QualityNotificationSeverity.from(startQualityAlertRequest.getSeverity())) .bpn(startQualityAlertRequest.getBpn()) .isAsBuilt(startQualityAlertRequest.isAsBuilt()) .build(); diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/model/QualityNotificationSeverity.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/model/QualityNotificationSeverity.java index 188e4a98da..daaea19d3a 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/model/QualityNotificationSeverity.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/model/QualityNotificationSeverity.java @@ -21,6 +21,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import qualitynotification.base.request.QualityNotificationSeverityRequest; @ApiModel(description = "Describes the criticality of a notification") public enum QualityNotificationSeverity { @@ -48,4 +49,8 @@ public static QualityNotificationSeverity fromString(String str) { public String getRealName() { return realName; } + + public static QualityNotificationSeverity from(QualityNotificationSeverityRequest qualityNotificationSeverityRequest) { + return QualityNotificationSeverity.fromString(qualityNotificationSeverityRequest.getRealName()); + } } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/model/QualityNotificationStatus.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/model/QualityNotificationStatus.java index 813b632ebb..72d784a646 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/model/QualityNotificationStatus.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/model/QualityNotificationStatus.java @@ -19,6 +19,9 @@ package org.eclipse.tractusx.traceability.qualitynotification.domain.base.model; +import qualitynotification.base.request.QualityNotificationStatusRequest; +import qualitynotification.base.request.UpdateQualityNotificationStatusRequest; + import java.util.Arrays; import java.util.List; import java.util.Map; @@ -95,4 +98,12 @@ private boolean isSideEligibleForTransition(QualityNotificationStatus from, Qual public boolean isActiveState() { return ACTIVE_STATES.contains(this); } + + public static QualityNotificationStatus from(QualityNotificationStatusRequest qualityNotificationStatusRequest) { + return QualityNotificationStatus.fromStringValue(qualityNotificationStatusRequest.name()); + } + + public static QualityNotificationStatus from(UpdateQualityNotificationStatusRequest qualityNotificationStatusRequest) { + return QualityNotificationStatus.fromStringValue(qualityNotificationStatusRequest.name()); + } } diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/model/EdcNotificationModelTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/model/EdcNotificationModelTest.java index 40e1919b73..4b0fadee6d 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/model/EdcNotificationModelTest.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/model/EdcNotificationModelTest.java @@ -18,16 +18,16 @@ ********************************************************************************/ package org.eclipse.tractusx.traceability.infrastructure.edc.model; -import org.eclipse.tractusx.traceability.qualitynotification.application.alert.request.StartQualityAlertRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.CloseQualityNotificationRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.QualityNotificationSeverityRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityNotificationRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationStatusRequest; import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotification; import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotificationContent; import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotificationHeader; import org.junit.jupiter.api.Test; +import qualitynotification.alert.request.StartQualityAlertRequest; +import qualitynotification.base.request.CloseQualityNotificationRequest; +import qualitynotification.base.request.QualityNotificationSeverityRequest; +import qualitynotification.base.request.StartQualityNotificationRequest; +import qualitynotification.base.request.UpdateQualityNotificationRequest; +import qualitynotification.base.request.UpdateQualityNotificationStatusRequest; import java.time.Instant; import java.util.ArrayList; diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/DashboardControllerIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/DashboardControllerIT.java index 1d8d4282c3..9f39dbd89d 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/DashboardControllerIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/DashboardControllerIT.java @@ -28,8 +28,6 @@ import org.eclipse.tractusx.traceability.integration.common.support.AlertsSupport; import org.eclipse.tractusx.traceability.integration.common.support.AssetsSupport; import org.eclipse.tractusx.traceability.integration.common.support.InvestigationsSupport; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.QualityNotificationSeverityRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityNotificationRequest; import org.jose4j.lang.JoseException; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -39,6 +37,8 @@ import org.springframework.beans.factory.annotation.Autowired; import org.testcontainers.shaded.com.fasterxml.jackson.core.JsonProcessingException; import org.testcontainers.shaded.com.fasterxml.jackson.databind.ObjectMapper; +import qualitynotification.base.request.QualityNotificationSeverityRequest; +import qualitynotification.base.request.StartQualityNotificationRequest; import java.util.List; import java.util.stream.Stream; diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/alert/PublisherAlertsControllerIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/alert/PublisherAlertsControllerIT.java index ca2386eccb..825d29dd70 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/alert/PublisherAlertsControllerIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/alert/PublisherAlertsControllerIT.java @@ -30,11 +30,6 @@ import org.eclipse.tractusx.traceability.integration.common.support.AlertNotificationsSupport; import org.eclipse.tractusx.traceability.integration.common.support.AlertsSupport; import org.eclipse.tractusx.traceability.integration.common.support.AssetsSupport; -import org.eclipse.tractusx.traceability.qualitynotification.application.alert.request.StartQualityAlertRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.CloseQualityNotificationRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.QualityNotificationSeverityRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationStatusRequest; import org.eclipse.tractusx.traceability.qualitynotification.domain.alert.service.AlertsReceiverService; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationAffectedPart; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationMessage; @@ -51,6 +46,11 @@ import org.springframework.transaction.annotation.Transactional; import org.testcontainers.shaded.com.fasterxml.jackson.core.JsonProcessingException; import org.testcontainers.shaded.com.fasterxml.jackson.databind.ObjectMapper; +import qualitynotification.alert.request.StartQualityAlertRequest; +import qualitynotification.base.request.CloseQualityNotificationRequest; +import qualitynotification.base.request.QualityNotificationSeverityRequest; +import qualitynotification.base.request.UpdateQualityNotificationRequest; +import qualitynotification.base.request.UpdateQualityNotificationStatusRequest; import java.time.Instant; import java.util.List; diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/alert/ReceiverAlertsControllerIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/alert/ReceiverAlertsControllerIT.java index 79ad799030..18fccbcf74 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/alert/ReceiverAlertsControllerIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/alert/ReceiverAlertsControllerIT.java @@ -22,7 +22,6 @@ import io.restassured.http.ContentType; import org.eclipse.tractusx.traceability.integration.IntegrationTestSpecification; import org.eclipse.tractusx.traceability.integration.common.support.AlertsSupport; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationStatusRequest; import org.hamcrest.Matchers; import org.jose4j.lang.JoseException; import org.junit.jupiter.api.Test; @@ -30,6 +29,7 @@ import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; import org.springframework.beans.factory.annotation.Autowired; +import qualitynotification.base.request.UpdateQualityNotificationStatusRequest; import java.util.stream.Stream; diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/investigation/PublisherInvestigationsControllerIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/investigation/PublisherInvestigationsControllerIT.java index 2a4fed072c..c485b01e63 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/investigation/PublisherInvestigationsControllerIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/investigation/PublisherInvestigationsControllerIT.java @@ -29,12 +29,6 @@ import org.eclipse.tractusx.traceability.integration.common.support.AssetsSupport; import org.eclipse.tractusx.traceability.integration.common.support.InvestigationNotificationsSupport; import org.eclipse.tractusx.traceability.integration.common.support.InvestigationsSupport; -import org.eclipse.tractusx.traceability.qualitynotification.application.alert.request.StartQualityAlertRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.CloseQualityNotificationRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.QualityNotificationSeverityRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.StartQualityNotificationRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationStatusRequest; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationAffectedPart; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationMessage; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationSeverity; @@ -51,6 +45,12 @@ import org.springframework.transaction.annotation.Transactional; import org.testcontainers.shaded.com.fasterxml.jackson.core.JsonProcessingException; import org.testcontainers.shaded.com.fasterxml.jackson.databind.ObjectMapper; +import qualitynotification.alert.request.StartQualityAlertRequest; +import qualitynotification.base.request.CloseQualityNotificationRequest; +import qualitynotification.base.request.QualityNotificationSeverityRequest; +import qualitynotification.base.request.StartQualityNotificationRequest; +import qualitynotification.base.request.UpdateQualityNotificationRequest; +import qualitynotification.base.request.UpdateQualityNotificationStatusRequest; import java.time.Instant; import java.util.List; diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/investigation/ReceiverInvestigationsControllerIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/investigation/ReceiverInvestigationsControllerIT.java index 89f4ca8832..0cc19a3436 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/investigation/ReceiverInvestigationsControllerIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/investigation/ReceiverInvestigationsControllerIT.java @@ -23,7 +23,6 @@ import lombok.val; import org.eclipse.tractusx.traceability.integration.IntegrationTestSpecification; import org.eclipse.tractusx.traceability.integration.common.support.InvestigationsSupport; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationStatusRequest; import org.hamcrest.Matchers; import org.jose4j.lang.JoseException; import org.junit.jupiter.api.Test; @@ -31,6 +30,7 @@ import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; import org.springframework.beans.factory.annotation.Autowired; +import qualitynotification.base.request.UpdateQualityNotificationStatusRequest; import java.util.stream.Stream; diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertControllerTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertControllerTest.java index b7604086ca..87765c97c2 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertControllerTest.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertControllerTest.java @@ -19,11 +19,6 @@ package org.eclipse.tractusx.traceability.qualitynotification.application.alert.rest; -import org.eclipse.tractusx.traceability.qualitynotification.application.alert.request.StartQualityAlertRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.CloseQualityNotificationRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.QualityNotificationSeverityRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationStatusRequest; import org.eclipse.tractusx.traceability.qualitynotification.application.base.service.QualityNotificationService; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotification; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationId; @@ -36,7 +31,12 @@ import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.junit.jupiter.MockitoExtension; +import qualitynotification.alert.request.StartQualityAlertRequest; import qualitynotification.alert.response.AlertResponse; +import qualitynotification.base.request.CloseQualityNotificationRequest; +import qualitynotification.base.request.QualityNotificationSeverityRequest; +import qualitynotification.base.request.UpdateQualityNotificationRequest; +import qualitynotification.base.request.UpdateQualityNotificationStatusRequest; import qualitynotification.base.response.QualityNotificationIdResponse; import qualitynotification.base.response.QualityNotificationReasonResponse; import qualitynotification.base.response.QualityNotificationSeverityResponse; diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/application/request/QualityNotificationSeverityRequestTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/application/request/QualityNotificationSeverityRequestTest.java index bde14b9781..876f5e0ba1 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/application/request/QualityNotificationSeverityRequestTest.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/application/request/QualityNotificationSeverityRequestTest.java @@ -21,12 +21,12 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.exc.ValueInstantiationException; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.QualityNotificationSeverityRequest; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; +import qualitynotification.base.request.QualityNotificationSeverityRequest; import java.io.IOException; import java.util.NoSuchElementException; diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/investigation/rest/validation/UpdateQualityNotificationValidatorTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/investigation/rest/validation/UpdateQualityNotificationValidatorTest.java index 9ef7cb93ea..70f0f312f2 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/investigation/rest/validation/UpdateQualityNotificationValidatorTest.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/investigation/rest/validation/UpdateQualityNotificationValidatorTest.java @@ -21,8 +21,6 @@ package org.eclipse.tractusx.traceability.qualitynotification.investigation.rest.validation; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationRequest; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.UpdateQualityNotificationStatusRequest; import org.eclipse.tractusx.traceability.qualitynotification.application.validation.UpdateQualityNotificationValidationException; import org.eclipse.tractusx.traceability.qualitynotification.application.validation.UpdateQualityNotificationValidator; import org.junit.jupiter.api.DisplayName; @@ -30,6 +28,8 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InjectMocks; import org.mockito.junit.jupiter.MockitoExtension; +import qualitynotification.base.request.UpdateQualityNotificationRequest; +import qualitynotification.base.request.UpdateQualityNotificationStatusRequest; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/request/StartQualityAlertRequest.java b/tx-models/src/main/java/qualitynotification/alert/request/StartQualityAlertRequest.java similarity index 90% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/request/StartQualityAlertRequest.java rename to tx-models/src/main/java/qualitynotification/alert/request/StartQualityAlertRequest.java index 2c0d3d7f04..28b193126d 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/request/StartQualityAlertRequest.java +++ b/tx-models/src/main/java/qualitynotification/alert/request/StartQualityAlertRequest.java @@ -17,7 +17,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.qualitynotification.application.alert.request; +package qualitynotification.alert.request; import io.swagger.annotations.ApiModelProperty; import jakarta.validation.constraints.Future; @@ -27,12 +27,12 @@ import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import org.eclipse.tractusx.traceability.qualitynotification.application.base.request.QualityNotificationSeverityRequest; +import qualitynotification.base.request.QualityNotificationSeverityRequest; import java.time.Instant; import java.util.List; -// TODO move to tx-models + @Data @Builder @NoArgsConstructor diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/CloseQualityNotificationRequest.java b/tx-models/src/main/java/qualitynotification/base/request/CloseQualityNotificationRequest.java similarity index 92% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/CloseQualityNotificationRequest.java rename to tx-models/src/main/java/qualitynotification/base/request/CloseQualityNotificationRequest.java index f325607e0e..f28020c8d6 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/CloseQualityNotificationRequest.java +++ b/tx-models/src/main/java/qualitynotification/base/request/CloseQualityNotificationRequest.java @@ -19,14 +19,14 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.qualitynotification.application.base.request; +package qualitynotification.base.request; import io.swagger.annotations.ApiModelProperty; import jakarta.validation.constraints.Size; import lombok.Getter; import lombok.Setter; import lombok.ToString; -// TODO move to tx-models + @Setter @Getter @ToString diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/QualityNotificationSeverityRequest.java b/tx-models/src/main/java/qualitynotification/base/request/QualityNotificationSeverityRequest.java similarity index 87% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/QualityNotificationSeverityRequest.java rename to tx-models/src/main/java/qualitynotification/base/request/QualityNotificationSeverityRequest.java index ebb8c79179..4aadc9fe0e 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/QualityNotificationSeverityRequest.java +++ b/tx-models/src/main/java/qualitynotification/base/request/QualityNotificationSeverityRequest.java @@ -17,18 +17,17 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.qualitynotification.application.base.request; +package qualitynotification.base.request; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationSeverity; import java.util.NoSuchElementException; import java.util.stream.Collectors; import java.util.stream.Stream; -// TODO move to tx-models + @ApiModel(description = "Describes the criticality of a notification") public enum QualityNotificationSeverityRequest { MINOR("MINOR"), @@ -58,9 +57,6 @@ private static String supportedQualityNotificationSeverityRequest() { .collect(Collectors.joining(", ")); } - public QualityNotificationSeverity toDomain() { - return QualityNotificationSeverity.fromString(this.getRealName()); - } public String getRealName() { return this.realName; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/QualityNotificationStatusRequest.java b/tx-models/src/main/java/qualitynotification/base/request/QualityNotificationStatusRequest.java similarity index 70% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/QualityNotificationStatusRequest.java rename to tx-models/src/main/java/qualitynotification/base/request/QualityNotificationStatusRequest.java index a04d28ca7b..ed6ffd195a 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/QualityNotificationStatusRequest.java +++ b/tx-models/src/main/java/qualitynotification/base/request/QualityNotificationStatusRequest.java @@ -16,16 +16,13 @@ * * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.qualitynotification.application.base.request; +package qualitynotification.base.request; import io.swagger.annotations.ApiModel; -import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationStatus; -// TODO move to tx-models + @ApiModel(description = "Describes status for closed action") public enum QualityNotificationStatusRequest { CLOSED; - public static QualityNotificationStatus toDomain(QualityNotificationStatusRequest qualityNotificationStatusRequest) { - return QualityNotificationStatus.fromStringValue(qualityNotificationStatusRequest.name()); - } + } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/StartQualityNotificationRequest.java b/tx-models/src/main/java/qualitynotification/base/request/StartQualityNotificationRequest.java similarity index 95% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/StartQualityNotificationRequest.java rename to tx-models/src/main/java/qualitynotification/base/request/StartQualityNotificationRequest.java index 5661100190..deac1229ea 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/StartQualityNotificationRequest.java +++ b/tx-models/src/main/java/qualitynotification/base/request/StartQualityNotificationRequest.java @@ -19,7 +19,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.qualitynotification.application.base.request; +package qualitynotification.base.request; import io.swagger.annotations.ApiModelProperty; import jakarta.validation.constraints.Future; @@ -32,7 +32,7 @@ import java.time.Instant; import java.util.List; -// TODO move to tx-models + @Data @Builder @NoArgsConstructor diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/UpdateQualityNotificationRequest.java b/tx-models/src/main/java/qualitynotification/base/request/UpdateQualityNotificationRequest.java similarity index 92% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/UpdateQualityNotificationRequest.java rename to tx-models/src/main/java/qualitynotification/base/request/UpdateQualityNotificationRequest.java index db705e1dbc..3e7a71394a 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/UpdateQualityNotificationRequest.java +++ b/tx-models/src/main/java/qualitynotification/base/request/UpdateQualityNotificationRequest.java @@ -19,12 +19,12 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.qualitynotification.application.base.request; +package qualitynotification.base.request; import io.swagger.annotations.ApiModelProperty; import jakarta.validation.constraints.NotNull; import lombok.Data; -// TODO move to tx-models + @Data public class UpdateQualityNotificationRequest { @NotNull(message = "status must be present") diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/UpdateQualityNotificationStatusRequest.java b/tx-models/src/main/java/qualitynotification/base/request/UpdateQualityNotificationStatusRequest.java similarity index 85% rename from tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/UpdateQualityNotificationStatusRequest.java rename to tx-models/src/main/java/qualitynotification/base/request/UpdateQualityNotificationStatusRequest.java index d4facdbcaa..c14c664db4 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/base/request/UpdateQualityNotificationStatusRequest.java +++ b/tx-models/src/main/java/qualitynotification/base/request/UpdateQualityNotificationStatusRequest.java @@ -17,16 +17,15 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -package org.eclipse.tractusx.traceability.qualitynotification.application.base.request; +package qualitynotification.base.request; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.v3.oas.annotations.media.Schema; -import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationStatus; import java.util.NoSuchElementException; import java.util.stream.Collectors; import java.util.stream.Stream; -// TODO move to tx-models + @Schema(description = "The UpdateInvestigationStatus") public enum UpdateQualityNotificationStatusRequest { ACKNOWLEDGED, @@ -47,9 +46,6 @@ private static String supportedUpdateInvestigationStatus() { return Stream.of(UpdateQualityNotificationStatusRequest.values()).map(Enum::name).collect(Collectors.joining(", ")); } - public QualityNotificationStatus toDomain() { - return QualityNotificationStatus.fromStringValue(this.name()); - } } From df72708c26bdd3b2779bf1ee5148be312d920cca Mon Sep 17 00:00:00 2001 From: ashanmugavel Date: Mon, 9 Oct 2023 11:14:03 +0200 Subject: [PATCH 19/39] chore: Completed TODO task "move to tx-models" and removed StartQualityAlertRequest --- CHANGELOG.md | 2 + .../modules/shared/service/alerts.service.ts | 2 +- .../common/model/SecurityUtils.java | 14 ----- .../alert/rest/AlertController.java | 10 ++-- .../StartQualityNotificationDomain.java | 19 ++---- .../alert/service/AlertServiceImpl.java | 2 +- .../service/InvestigationServiceImpl.java | 2 +- .../edc/model/EdcNotificationModelTest.java | 23 ------- .../alert/PublisherAlertsControllerIT.java | 36 +++++------ .../PublisherInvestigationsControllerIT.java | 3 +- .../alert/rest/AlertControllerTest.java | 6 +- .../request/StartQualityAlertRequest.java | 60 ------------------- .../QualityNotificationStatusRequest.java | 2 +- 13 files changed, 38 insertions(+), 143 deletions(-) delete mode 100644 tx-models/src/main/java/qualitynotification/alert/request/StartQualityAlertRequest.java diff --git a/CHANGELOG.md b/CHANGELOG.md index d6597b95ec..8236010cec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### Changed - updated IRS helm chart from 6.6.1 to 6.7.2 - Updated policy related logic to reflect IRS changes +- Moved response handling from the backend folder to the model folder, addressing a TODO item. +- StartQualityAlertRequest class and replaced it with extant StartQualityNotification class - Updated user manual to reflect current state of the part views diff --git a/frontend/src/app/modules/shared/service/alerts.service.ts b/frontend/src/app/modules/shared/service/alerts.service.ts index 4bc549da45..2963098d5d 100644 --- a/frontend/src/app/modules/shared/service/alerts.service.ts +++ b/frontend/src/app/modules/shared/service/alerts.service.ts @@ -83,7 +83,7 @@ export class AlertsService { } public postAlert(partIds: string[], description: string, severity: Severity, bpn: string, isAsBuilt: boolean): Observable { - const body = { partIds, description, severity, bpn, isAsBuilt }; + const body = { partIds, description, severity, receiverBpn: bpn, isAsBuilt }; return this.apiService.post(`${this.url}/alerts`, body).pipe(map(({ id }) => id)); } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/model/SecurityUtils.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/model/SecurityUtils.java index 43a85be899..3631e29ba7 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/model/SecurityUtils.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/model/SecurityUtils.java @@ -24,7 +24,6 @@ import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotification; import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotificationContent; import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotificationHeader; -import qualitynotification.alert.request.StartQualityAlertRequest; import qualitynotification.base.request.CloseQualityNotificationRequest; import qualitynotification.base.request.StartQualityNotificationRequest; import qualitynotification.base.request.UpdateQualityNotificationRequest; @@ -68,19 +67,6 @@ public static StartQualityNotificationRequest sanitize(StartQualityNotificationR .build(); } - public static StartQualityAlertRequest sanitize(StartQualityAlertRequest request) { - String cleanDescription = sanitize(request.getDescription()); - List cleanPartIds = sanitize(request.getPartIds()); - String cleanBpn = sanitize(request.getBpn()); - return StartQualityAlertRequest.builder() - .partIds(cleanPartIds) - .description(cleanDescription) - .targetDate(request.getTargetDate()) - .severity(request.getSeverity()) - .bpn(cleanBpn) - .isAsBuilt(request.isAsBuilt()) - .build(); - } public static CloseQualityNotificationRequest sanitize(CloseQualityNotificationRequest closeInvestigationRequest) { String cleanReason = sanitize(closeInvestigationRequest.getReason()); diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertController.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertController.java index d5a1f44211..4d4a60ca8d 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertController.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertController.java @@ -48,10 +48,10 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseStatus; import org.springframework.web.bind.annotation.RestController; -import qualitynotification.alert.request.StartQualityAlertRequest; import qualitynotification.alert.response.AlertResponse; import qualitynotification.base.request.CloseQualityNotificationRequest; import qualitynotification.base.request.QualityNotificationStatusRequest; +import qualitynotification.base.request.StartQualityNotificationRequest; import qualitynotification.base.request.UpdateQualityNotificationRequest; import qualitynotification.base.response.QualityNotificationIdResponse; @@ -127,10 +127,10 @@ public AlertController(@Qualifier("alertServiceImpl") QualityNotificationService schema = @Schema(implementation = ErrorResponse.class)))}) @PostMapping @ResponseStatus(HttpStatus.CREATED) - public QualityNotificationIdResponse alertAssets(@RequestBody @Valid StartQualityAlertRequest request) { - StartQualityAlertRequest cleanStartQualityAlertRequest = sanitize(request); - log.info(API_LOG_START + " with params: {}", cleanStartQualityAlertRequest); - return new QualityNotificationIdResponse(alertService.start(from(cleanStartQualityAlertRequest)).value()); + public QualityNotificationIdResponse alertAssets(@RequestBody @Valid StartQualityNotificationRequest request) { + StartQualityNotificationRequest cleanStartQualityNotificationRequest = sanitize(request); + log.info(API_LOG_START + " with params: {}", cleanStartQualityNotificationRequest); + return new QualityNotificationIdResponse(alertService.start(from(cleanStartQualityNotificationRequest)).value()); } @Operation(operationId = "getCreatedAlerts", diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/model/exception/StartQualityNotificationDomain.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/model/exception/StartQualityNotificationDomain.java index 6d0546c3e4..bc92d6bba6 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/model/exception/StartQualityNotificationDomain.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/model/exception/StartQualityNotificationDomain.java @@ -23,7 +23,6 @@ import lombok.Data; import lombok.Getter; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationSeverity; -import qualitynotification.alert.request.StartQualityAlertRequest; import qualitynotification.base.request.StartQualityNotificationRequest; import java.time.Instant; @@ -42,30 +41,22 @@ public class StartQualityNotificationDomain { private QualityNotificationSeverity severity; - private String bpn; - private boolean isAsBuilt; + private String receiverBpn; + + + public static StartQualityNotificationDomain from(StartQualityNotificationRequest startQualityNotificationRequest) { return StartQualityNotificationDomain.builder() .partIds(startQualityNotificationRequest.getPartIds()) .description(startQualityNotificationRequest.getDescription()) .targetDate(startQualityNotificationRequest.getTargetDate()) .severity(QualityNotificationSeverity.from(startQualityNotificationRequest.getSeverity())) - .bpn(startQualityNotificationRequest.getReceiverBpn()) + .receiverBpn(startQualityNotificationRequest.getReceiverBpn()) .isAsBuilt(startQualityNotificationRequest.isAsBuilt()) .build(); } - public static StartQualityNotificationDomain from(StartQualityAlertRequest startQualityAlertRequest) { - return StartQualityNotificationDomain.builder() - .partIds(startQualityAlertRequest.getPartIds()) - .description(startQualityAlertRequest.getDescription()) - .targetDate(startQualityAlertRequest.getTargetDate()) - .severity(QualityNotificationSeverity.from(startQualityAlertRequest.getSeverity())) - .bpn(startQualityAlertRequest.getBpn()) - .isAsBuilt(startQualityAlertRequest.isAsBuilt()) - .build(); - } } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/service/AlertServiceImpl.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/service/AlertServiceImpl.java index 061d529388..af95dc32fd 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/service/AlertServiceImpl.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/alert/service/AlertServiceImpl.java @@ -58,7 +58,7 @@ protected AssetAsBuiltServiceImpl getAssetAsBuiltServiceImpl() { @Override public QualityNotificationId start(StartQualityNotificationDomain startQualityAlertDomain) { - QualityNotification notification = notificationPublisherService.startAlert(startQualityAlertDomain.getPartIds(), startQualityAlertDomain.getDescription(), startQualityAlertDomain.getTargetDate(), startQualityAlertDomain.getSeverity(), startQualityAlertDomain.getBpn(), startQualityAlertDomain.isAsBuilt()); + QualityNotification notification = notificationPublisherService.startAlert(startQualityAlertDomain.getPartIds(), startQualityAlertDomain.getDescription(), startQualityAlertDomain.getTargetDate(), startQualityAlertDomain.getSeverity(), startQualityAlertDomain.getReceiverBpn(), startQualityAlertDomain.isAsBuilt()); QualityNotificationId createdAlertId = alertRepository.saveQualityNotificationEntity(notification); log.info("Start Alert {}", notification); diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/investigation/service/InvestigationServiceImpl.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/investigation/service/InvestigationServiceImpl.java index 2101a50c8a..5a82e06340 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/investigation/service/InvestigationServiceImpl.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/investigation/service/InvestigationServiceImpl.java @@ -58,7 +58,7 @@ protected AssetAsBuiltServiceImpl getAssetAsBuiltServiceImpl() { @Override public QualityNotificationId start(StartQualityNotificationDomain startQualityAlertDomain) { - QualityNotification notification = getNotificationPublisherService().startInvestigation(startQualityAlertDomain.getPartIds(), startQualityAlertDomain.getDescription(), startQualityAlertDomain.getTargetDate(), startQualityAlertDomain.getSeverity(), startQualityAlertDomain.getBpn(), startQualityAlertDomain.isAsBuilt()); + QualityNotification notification = getNotificationPublisherService().startInvestigation(startQualityAlertDomain.getPartIds(), startQualityAlertDomain.getDescription(), startQualityAlertDomain.getTargetDate(), startQualityAlertDomain.getSeverity(), startQualityAlertDomain.getReceiverBpn(), startQualityAlertDomain.isAsBuilt()); QualityNotificationId createdInvestigationId = getQualityNotificationRepository().saveQualityNotificationEntity(notification); log.info("Start Investigation {}", notification); diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/model/EdcNotificationModelTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/model/EdcNotificationModelTest.java index 4b0fadee6d..55f9d31039 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/model/EdcNotificationModelTest.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/model/EdcNotificationModelTest.java @@ -22,7 +22,6 @@ import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotificationContent; import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotificationHeader; import org.junit.jupiter.api.Test; -import qualitynotification.alert.request.StartQualityAlertRequest; import qualitynotification.base.request.CloseQualityNotificationRequest; import qualitynotification.base.request.QualityNotificationSeverityRequest; import qualitynotification.base.request.StartQualityNotificationRequest; @@ -99,28 +98,6 @@ public void testSanitizeStartQualityNotificationRequest() { } - @Test - public void testSanitizeStartQualityAlertRequest() { - //GIVEN - List partIds = new ArrayList<>(); - partIds.add("urn:uuid:fe99da3d-b0de-4e80-81da-882aebcca978"); - partIds.add("urn:uuid:fe99da3d-b0de-4e80-81da-882aebcca979\n"); - Instant targetDate = Instant.parse("2023-09-22T14:30:00Z".trim()); - QualityNotificationSeverityRequest severity = QualityNotificationSeverityRequest.MINOR; - StartQualityAlertRequest request = new StartQualityAlertRequest(partIds, "The description\n", targetDate, severity, "BPN00001123123AS\n", true); - - - //WHEN - StartQualityAlertRequest cleanRequest = sanitize(request); - - //THEN - assertEquals("urn:uuid:fe99da3d-b0de-4e80-81da-882aebcca979 ", cleanRequest.getPartIds().get(1)); - assertEquals("The description ", cleanRequest.getDescription()); - assertTrue(cleanRequest.isAsBuilt()); - assertEquals("BPN00001123123AS ", cleanRequest.getBpn()); - - } - @Test public void testSanitizeCloseInvestigationRequest() { //GIVEN diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/alert/PublisherAlertsControllerIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/alert/PublisherAlertsControllerIT.java index 825d29dd70..f288e3cb21 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/alert/PublisherAlertsControllerIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/alert/PublisherAlertsControllerIT.java @@ -46,9 +46,9 @@ import org.springframework.transaction.annotation.Transactional; import org.testcontainers.shaded.com.fasterxml.jackson.core.JsonProcessingException; import org.testcontainers.shaded.com.fasterxml.jackson.databind.ObjectMapper; -import qualitynotification.alert.request.StartQualityAlertRequest; import qualitynotification.base.request.CloseQualityNotificationRequest; import qualitynotification.base.request.QualityNotificationSeverityRequest; +import qualitynotification.base.request.StartQualityNotificationRequest; import qualitynotification.base.request.UpdateQualityNotificationRequest; import qualitynotification.base.request.UpdateQualityNotificationStatusRequest; @@ -121,15 +121,15 @@ void shouldStartAlert() throws JsonProcessingException, JoseException { ); String description = "at least 15 characters long investigation description"; QualityNotificationSeverityRequest severity = QualityNotificationSeverityRequest.MINOR; - String bpn = "BPN"; + String receiverBpn = "BPN"; assetsSupport.defaultAssetsStored(); - val request = StartQualityAlertRequest.builder() + val request = StartQualityNotificationRequest.builder() .partIds(partIds) .description(description) .severity(severity) - .bpn(bpn) + .receiverBpn(receiverBpn) .isAsBuilt(true) .build(); @@ -177,15 +177,15 @@ void shouldStartAlertForAsPlanned() throws JsonProcessingException, JoseExceptio ); String description = "at least 15 characters long investigation description"; QualityNotificationSeverityRequest severity = QualityNotificationSeverityRequest.MINOR; - String bpn = "BPN"; + String receiverBpn = "BPN"; assetsSupport.defaultAssetsAsPlannedStored(); - val request = StartQualityAlertRequest.builder() + val request = StartQualityNotificationRequest.builder() .partIds(partIds) .description(description) .severity(severity) - .bpn(bpn) + .receiverBpn(receiverBpn) .isAsBuilt(false) .build(); @@ -234,7 +234,7 @@ void givenMissingSeverity_whenStartAlert_thenBadRequest() throws JsonProcessingE "urn:uuid:0ce83951-bc18-4e8f-892d-48bad4eb67ef" // BPN: BPNL00000003AXS3 ); String description = "at least 15 characters long investigation description"; - val request = StartQualityAlertRequest.builder() + val request = StartQualityNotificationRequest.builder() .partIds(partIds) .description(description) .build(); @@ -261,11 +261,11 @@ void givenDescriptionOverMaxLength_whenStartAlert_thenBadRequest() throws JsonPr String description = RandomStringUtils.random(1001); - val request = StartQualityAlertRequest.builder() + val request = StartQualityNotificationRequest.builder() .partIds(partIds) .description(description) .severity(QualityNotificationSeverityRequest.MINOR) - .bpn("BPN") + .receiverBpn("BPN") .build(); // when/then @@ -326,11 +326,11 @@ void givenWrongStatus_whenUpdateAlert_thenBadRequest() throws JsonProcessingExce void shouldCancelAlert() throws JsonProcessingException, JoseException { // given assetsSupport.defaultAssetsStored(); - val startAlertRequest = StartQualityAlertRequest.builder() + val startAlertRequest = StartQualityNotificationRequest.builder() .partIds(List.of("urn:uuid:fe99da3d-b0de-4e80-81da-882aebcca978")) .description("at least 15 characters long investigation description") .severity(QualityNotificationSeverityRequest.MAJOR) - .bpn("BPN") + .receiverBpn("BPN") .isAsBuilt(true) .build(); @@ -392,11 +392,11 @@ void shouldApproveAlertStatus() throws JsonProcessingException, JoseException { assetsSupport.defaultAssetsStored(); - val startAlertRequest = StartQualityAlertRequest.builder() + val startAlertRequest = StartQualityNotificationRequest.builder() .partIds(partIds) .description(description) .severity(QualityNotificationSeverityRequest.MINOR) - .bpn("BPN") + .receiverBpn("BPN") .isAsBuilt(true) .build(); @@ -447,11 +447,11 @@ void shouldCloseAlertStatus() throws JsonProcessingException, JoseException { assetsSupport.defaultAssetsStored(); - val startAlertRequest = StartQualityAlertRequest.builder() + val startAlertRequest = StartQualityNotificationRequest.builder() .partIds(partIds) .description(description) .severity(QualityNotificationSeverityRequest.MINOR) - .bpn("BPN") + .receiverBpn("BPN") .isAsBuilt(true) .build(); @@ -556,11 +556,11 @@ void shouldBeCreatedBySender() throws JsonProcessingException, JoseException { ); String description = "at least 15 characters long investigation description"; assetsSupport.defaultAssetsStored(); - val startAlertRequest = StartQualityAlertRequest.builder() + val startAlertRequest = StartQualityNotificationRequest.builder() .partIds(partIds) .description(description) .severity(QualityNotificationSeverityRequest.MINOR) - .bpn("BPN") + .receiverBpn("BPN") .isAsBuilt(true) .build(); diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/investigation/PublisherInvestigationsControllerIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/investigation/PublisherInvestigationsControllerIT.java index c485b01e63..ac0dab8e81 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/investigation/PublisherInvestigationsControllerIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/qualitynotification/investigation/PublisherInvestigationsControllerIT.java @@ -45,7 +45,6 @@ import org.springframework.transaction.annotation.Transactional; import org.testcontainers.shaded.com.fasterxml.jackson.core.JsonProcessingException; import org.testcontainers.shaded.com.fasterxml.jackson.databind.ObjectMapper; -import qualitynotification.alert.request.StartQualityAlertRequest; import qualitynotification.base.request.CloseQualityNotificationRequest; import qualitynotification.base.request.QualityNotificationSeverityRequest; import qualitynotification.base.request.StartQualityNotificationRequest; @@ -200,7 +199,7 @@ void givenDescriptionExceedsMaxLength_whenStartInvestigation_thenBadRequest() th String description = RandomStringUtils.random(1001); - val request = StartQualityAlertRequest.builder() + val request = StartQualityNotificationRequest.builder() .partIds(partIds) .description(description) .severity(QualityNotificationSeverityRequest.MINOR) diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertControllerTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertControllerTest.java index 87765c97c2..828f56ba9a 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertControllerTest.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertControllerTest.java @@ -31,10 +31,10 @@ import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.junit.jupiter.MockitoExtension; -import qualitynotification.alert.request.StartQualityAlertRequest; import qualitynotification.alert.response.AlertResponse; import qualitynotification.base.request.CloseQualityNotificationRequest; import qualitynotification.base.request.QualityNotificationSeverityRequest; +import qualitynotification.base.request.StartQualityNotificationRequest; import qualitynotification.base.request.UpdateQualityNotificationRequest; import qualitynotification.base.request.UpdateQualityNotificationStatusRequest; import qualitynotification.base.response.QualityNotificationIdResponse; @@ -68,12 +68,12 @@ void givenRequestBody_whenAlertAssets_thenResponse() { final List partIds = List.of("partId1", "partId2"); final Instant targetDate = Instant.parse("2099-03-11T22:44:06.333826952Z"); final QualityNotificationId notificationId = new QualityNotificationId(666L); - final StartQualityAlertRequest request = StartQualityAlertRequest.builder() + final StartQualityNotificationRequest request = StartQualityNotificationRequest.builder() .partIds(partIds) .description("description") .targetDate(targetDate) .severity(QualityNotificationSeverityRequest.MINOR) - .bpn("BPN00001") + .receiverBpn("BPN00001") .build(); when(alertService.start(Mockito.eq(from(request)))).thenReturn(notificationId); diff --git a/tx-models/src/main/java/qualitynotification/alert/request/StartQualityAlertRequest.java b/tx-models/src/main/java/qualitynotification/alert/request/StartQualityAlertRequest.java deleted file mode 100644 index 28b193126d..0000000000 --- a/tx-models/src/main/java/qualitynotification/alert/request/StartQualityAlertRequest.java +++ /dev/null @@ -1,60 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2023 Contributors to the Eclipse Foundation - * - * See the NOTICE file(s) distributed with this work for additional - * information regarding copyright ownership. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ********************************************************************************/ - -package qualitynotification.alert.request; - -import io.swagger.annotations.ApiModelProperty; -import jakarta.validation.constraints.Future; -import jakarta.validation.constraints.NotNull; -import jakarta.validation.constraints.Size; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; -import qualitynotification.base.request.QualityNotificationSeverityRequest; - -import java.time.Instant; -import java.util.List; - - -@Data -@Builder -@NoArgsConstructor -@AllArgsConstructor -public class StartQualityAlertRequest { - @Size(min = 1, max = 100, message = "Specify at least 1 and at most 100 partIds") - @ApiModelProperty(example = "[\"urn:uuid:fe99da3d-b0de-4e80-81da-882aebcca978\"]") - private List partIds; - @Size(min = 15, max = 1000, message = "Description should have at least 15 characters and at most 1000 characters") - @ApiModelProperty(example = "The description") - private String description; - @ApiModelProperty(example = "2099-03-11T22:44:06.333826952Z") - @Future(message = "Specify at least the current day or a date in future") - private Instant targetDate; - @NotNull - @ApiModelProperty(example = "MINOR") - private QualityNotificationSeverityRequest severity; - @NotNull - @ApiModelProperty(example = "BPN00001123123AS") - private String bpn; - @ApiModelProperty(example = "true") - private boolean isAsBuilt = true; - - -} diff --git a/tx-models/src/main/java/qualitynotification/base/request/QualityNotificationStatusRequest.java b/tx-models/src/main/java/qualitynotification/base/request/QualityNotificationStatusRequest.java index ed6ffd195a..2d8a0a098d 100644 --- a/tx-models/src/main/java/qualitynotification/base/request/QualityNotificationStatusRequest.java +++ b/tx-models/src/main/java/qualitynotification/base/request/QualityNotificationStatusRequest.java @@ -22,7 +22,7 @@ @ApiModel(description = "Describes status for closed action") public enum QualityNotificationStatusRequest { - CLOSED; + CLOSED } From 4278b50bda2c02ee9e1165f188ce760f93d78c78 Mon Sep 17 00:00:00 2001 From: ashanmugavel Date: Mon, 9 Oct 2023 12:53:47 +0200 Subject: [PATCH 20/39] chore: Completed TODO task "move to tx-models" and removed StartQualityAlertRequest --- .../openapi/traceability-foss-backend.json | 1759 ++++++++--------- 1 file changed, 859 insertions(+), 900 deletions(-) diff --git a/tx-backend/openapi/traceability-foss-backend.json b/tx-backend/openapi/traceability-foss-backend.json index 2f91b71f48..64c9809558 100644 --- a/tx-backend/openapi/traceability-foss-backend.json +++ b/tx-backend/openapi/traceability-foss-backend.json @@ -41,8 +41,8 @@ "description" : "The endpoint returns a result of BPN EDC URL mappings.", "operationId" : "getBpnEdcs", "responses" : { - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -61,8 +61,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -71,8 +71,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -81,12 +81,14 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "200" : { + "description" : "Returns the paged result found", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } @@ -101,20 +103,18 @@ } } }, - "200" : { - "description" : "Returns the paged result found", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -155,20 +155,18 @@ "required" : true }, "responses" : { - "200" : { - "description" : "Returns the paged result found for BpnEdcMapping", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "403" : { - "description" : "Forbidden.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -177,8 +175,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -187,8 +185,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -197,8 +195,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -207,18 +205,20 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "200" : { + "description" : "Returns the paged result found for BpnEdcMapping", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -227,8 +227,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -269,20 +269,18 @@ "required" : true }, "responses" : { - "200" : { - "description" : "Returns the paged result found for BpnEdcMapping", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "403" : { - "description" : "Forbidden.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -291,8 +289,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -301,8 +299,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -311,8 +309,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -321,18 +319,20 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "200" : { + "description" : "Returns the paged result found for BpnEdcMapping", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -341,8 +341,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -380,18 +380,14 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", + "200" : { + "description" : "Returns the paged result found", "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } + "application/json" : {} } }, - "415" : { - "description" : "Unsupported media type", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -400,8 +396,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -410,8 +406,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -440,14 +436,18 @@ } } }, - "200" : { - "description" : "Returns the paged result found", + "404" : { + "description" : "Not found.", "content" : { - "application/json" : {} + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -493,8 +493,8 @@ "required" : true }, "responses" : { - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -513,8 +513,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -523,8 +523,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -533,8 +533,11 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "204" : { + "description" : "No Content." + }, + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -543,8 +546,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -553,11 +556,8 @@ } } }, - "204" : { - "description" : "No Content." - }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -595,8 +595,8 @@ "required" : true }, "responses" : { - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -615,8 +615,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -625,8 +625,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -635,8 +635,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -645,12 +645,12 @@ } } }, - "429" : { - "description" : "Too many requests.", + "201" : { + "description" : "Created.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "$ref" : "#/components/schemas/QualityNotificationIdResponse" } } } @@ -665,12 +665,12 @@ } } }, - "201" : { - "description" : "Created.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/QualityNotificationIdResponse" + "$ref" : "#/components/schemas/ErrorResponse" } } } @@ -715,8 +715,8 @@ "required" : true }, "responses" : { - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -735,8 +735,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -748,8 +748,8 @@ "204" : { "description" : "No content." }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -758,8 +758,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -768,8 +768,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -778,8 +778,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -828,8 +828,8 @@ "required" : true }, "responses" : { - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -848,8 +848,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -861,8 +861,8 @@ "204" : { "description" : "No content." }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -871,8 +871,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -881,8 +881,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -891,8 +891,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -931,8 +931,8 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -951,8 +951,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -961,8 +961,11 @@ } } }, - "400" : { - "description" : "Bad request.", + "204" : { + "description" : "No content." + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -971,8 +974,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -981,8 +984,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -991,11 +994,8 @@ } } }, - "204" : { - "description" : "No content." - }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1034,8 +1034,8 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1054,8 +1054,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1067,8 +1067,8 @@ "204" : { "description" : "No content." }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1077,8 +1077,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1087,8 +1087,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1097,8 +1097,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1136,8 +1136,8 @@ "required" : true }, "responses" : { - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1156,8 +1156,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1166,8 +1166,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1176,8 +1176,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1186,12 +1186,12 @@ } } }, - "429" : { - "description" : "Too many requests.", + "201" : { + "description" : "Created.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "$ref" : "#/components/schemas/CreateNotificationContractResponse" } } } @@ -1206,12 +1206,12 @@ } } }, - "201" : { - "description" : "Created.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/CreateNotificationContractResponse" + "$ref" : "#/components/schemas/ErrorResponse" } } } @@ -1245,8 +1245,8 @@ "required" : true }, "responses" : { - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1265,8 +1265,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1275,8 +1275,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1285,8 +1285,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1295,8 +1295,11 @@ } } }, - "429" : { - "description" : "Too many requests.", + "201" : { + "description" : "Created." + }, + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1305,8 +1308,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1314,9 +1317,6 @@ } } } - }, - "201" : { - "description" : "Created." } }, "security" : [ @@ -1347,8 +1347,8 @@ "required" : true }, "responses" : { - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1367,18 +1367,20 @@ } } }, - "500" : { - "description" : "Internal server error.", + "200" : { + "description" : "Returns the paged result found for Asset", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1407,20 +1409,18 @@ } } }, - "200" : { - "description" : "Returns the paged result found for Asset", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1458,8 +1458,8 @@ "required" : true }, "responses" : { - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1478,8 +1478,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1488,8 +1488,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1498,8 +1498,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1508,8 +1508,11 @@ } } }, - "429" : { - "description" : "Too many requests.", + "201" : { + "description" : "Created." + }, + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1518,8 +1521,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1527,9 +1530,6 @@ } } } - }, - "201" : { - "description" : "Created." } }, "security" : [ @@ -1560,20 +1560,8 @@ "required" : true }, "responses" : { - "200" : { - "description" : "Returns the paged result found for Asset", - "content" : { - "application/json" : { - "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" - } - } - } - }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1592,8 +1580,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1602,12 +1590,14 @@ } } }, - "400" : { - "description" : "Bad request.", + "200" : { + "description" : "Returns the paged result found for Asset", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } @@ -1641,6 +1631,16 @@ } } } + }, + "500" : { + "description" : "Internal server error.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } } }, "security" : [ @@ -1664,15 +1664,15 @@ "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/StartQualityAlertRequest" + "$ref" : "#/components/schemas/StartQualityNotificationRequest" } } }, "required" : true }, "responses" : { - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1691,8 +1691,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1701,8 +1701,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1711,8 +1711,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1721,12 +1721,12 @@ } } }, - "429" : { - "description" : "Too many requests.", + "201" : { + "description" : "Created.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "$ref" : "#/components/schemas/QualityNotificationIdResponse" } } } @@ -1741,12 +1741,12 @@ } } }, - "201" : { - "description" : "Created.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/QualityNotificationIdResponse" + "$ref" : "#/components/schemas/ErrorResponse" } } } @@ -1791,8 +1791,8 @@ "required" : true }, "responses" : { - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1811,8 +1811,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1824,16 +1824,6 @@ "204" : { "description" : "No content." }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "401" : { "description" : "Authorization failed.", "content" : { @@ -1863,9 +1853,19 @@ } } } - } - }, - "security" : [ + }, + "500" : { + "description" : "Internal server error.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security" : [ { "oAuth2" : [ "profile email" @@ -1904,8 +1904,8 @@ "required" : true }, "responses" : { - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1924,8 +1924,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1937,8 +1937,8 @@ "204" : { "description" : "No content." }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1947,8 +1947,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1957,8 +1957,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1967,8 +1967,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2007,8 +2007,8 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2027,8 +2027,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2040,8 +2040,8 @@ "204" : { "description" : "No content." }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2050,8 +2050,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -2060,8 +2060,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -2070,8 +2070,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2110,8 +2110,8 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2130,8 +2130,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2140,8 +2140,11 @@ } } }, - "400" : { - "description" : "Bad request.", + "204" : { + "description" : "No content." + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2150,8 +2153,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -2160,8 +2163,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -2170,11 +2173,8 @@ } } }, - "204" : { - "description" : "No content." - }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2212,46 +2212,6 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "200" : { "description" : "Returns the assets found", "content" : { @@ -2379,6 +2339,36 @@ } } }, + "400" : { + "description" : "Bad request.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "415" : { + "description" : "Unsupported media type", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, "401" : { "description" : "Authorization failed.", "content" : { @@ -2408,6 +2398,16 @@ } } } + }, + "500" : { + "description" : "Internal server error.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } } }, "security" : [ @@ -2446,8 +2446,8 @@ "required" : true }, "responses" : { - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2466,18 +2466,8 @@ } } }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2642,6 +2632,16 @@ } } } + }, + "500" : { + "description" : "Internal server error.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } } }, "security" : [ @@ -2672,36 +2672,6 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "400" : { "description" : "Bad request.", "content" : { @@ -2712,18 +2682,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2732,8 +2692,8 @@ } } }, - "404" : { - "description" : "Not found.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2868,46 +2828,9 @@ } } } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - }, - "patch" : { - "tags" : [ - "AssetsAsBuilt" - ], - "summary" : "Updates asset", - "description" : "The endpoint updates asset by provided quality type.", - "operationId" : "updateAsset_1", - "parameters" : [ - { - "name" : "assetId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } - ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UpdateAssetRequest" - } - } }, - "required" : true - }, - "responses" : { - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2916,8 +2839,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -2926,8 +2849,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -2936,8 +2859,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2945,7 +2868,44 @@ } } } + } + }, + "security" : [ + { + "oAuth2" : [ + "profile email" + ] + } + ] + }, + "patch" : { + "tags" : [ + "AssetsAsBuilt" + ], + "summary" : "Updates asset", + "description" : "The endpoint updates asset by provided quality type.", + "operationId" : "updateAsset_1", + "parameters" : [ + { + "name" : "assetId", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + } + ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/UpdateAssetRequest" + } + } }, + "required" : true + }, + "responses" : { "200" : { "description" : "Returns the updated asset", "content" : { @@ -3073,6 +3033,36 @@ } } }, + "400" : { + "description" : "Bad request.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "415" : { + "description" : "Unsupported media type", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, "401" : { "description" : "Authorization failed.", "content" : { @@ -3102,6 +3092,16 @@ } } } + }, + "500" : { + "description" : "Internal server error.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } } }, "security" : [ @@ -3122,8 +3122,8 @@ "description" : "The endpoint returns all shell descriptors.", "operationId" : "findAll", "responses" : { - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3142,8 +3142,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3152,12 +3152,15 @@ } } }, - "400" : { - "description" : "Bad request.", + "200" : { + "description" : "ShellDescriptors found.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ShellDescriptorResponse" + } } } } @@ -3182,21 +3185,18 @@ } } }, - "200" : { - "description" : "ShellDescriptors found.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ShellDescriptorResponse" - } + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3223,8 +3223,11 @@ "description" : "The endpoint deletes all shell descriptors.", "operationId" : "deleteAll", "responses" : { - "403" : { - "description" : "Forbidden.", + "204" : { + "description" : "Deleted." + }, + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3243,8 +3246,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3253,8 +3256,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -3263,11 +3266,8 @@ } } }, - "204" : { - "description" : "Deleted." - }, - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -3276,8 +3276,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -3286,8 +3286,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3315,8 +3315,8 @@ "description" : "The endpoint Triggers reload of shell descriptors.", "operationId" : "reload", "responses" : { - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3335,8 +3335,11 @@ } } }, - "500" : { - "description" : "Internal server error.", + "202" : { + "description" : "Created registry reload job." + }, + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3345,8 +3348,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -3355,8 +3358,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -3365,8 +3368,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -3375,11 +3378,8 @@ } } }, - "202" : { - "description" : "Created registry reload job." - }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3418,18 +3418,24 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", + "200" : { + "description" : "OK.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : -2147483648, + "type" : "array", + "description" : "Investigations", + "items" : { + "$ref" : "#/components/schemas/InvestigationResponse" + } } } } }, - "415" : { - "description" : "Unsupported media type", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3438,8 +3444,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3448,8 +3454,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3458,24 +3464,18 @@ } } }, - "200" : { - "description" : "OK.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : -2147483648, - "type" : "array", - "description" : "Investigations", - "items" : { - "$ref" : "#/components/schemas/InvestigationResponse" - } + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -3484,8 +3484,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -3494,8 +3494,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3533,18 +3533,20 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", + "200" : { + "description" : "Returns the paged result found for Asset", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } }, - "415" : { - "description" : "Unsupported media type", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3553,8 +3555,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3563,8 +3565,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3593,20 +3595,18 @@ } } }, - "200" : { - "description" : "Returns the paged result found for Asset", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3644,18 +3644,20 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", + "200" : { + "description" : "Returns the paged result found for Asset", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } }, - "415" : { - "description" : "Unsupported media type", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3664,8 +3666,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3674,8 +3676,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3704,20 +3706,18 @@ } } }, - "200" : { - "description" : "Returns the paged result found for Asset", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3745,8 +3745,8 @@ "description" : "The endpoint can return limited data based on the user role", "operationId" : "dashboard", "responses" : { - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3765,18 +3765,8 @@ } } }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3824,6 +3814,16 @@ } } } + }, + "500" : { + "description" : "Internal server error.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } } }, "security" : [ @@ -3862,46 +3862,6 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "200" : { "description" : "Returns the paged result found for Asset", "content" : { @@ -4034,75 +3994,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/assets/as-planned/{assetId}/children/{childId}" : { - "get" : { - "tags" : [ - "AssetsAsPlanned" - ], - "summary" : "Get asset by child id", - "description" : "The endpoint returns an asset filtered by child id.", - "operationId" : "assetByChildId", - "parameters" : [ - { - "name" : "assetId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, - { - "name" : "childId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } - ], - "responses" : { - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -4121,8 +4014,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -4131,8 +4024,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -4141,8 +4034,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -4151,8 +4044,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -4161,8 +4054,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -4170,7 +4063,44 @@ } } } + } + }, + "security" : [ + { + "oAuth2" : [ + "profile email" + ] + } + ] + } + }, + "/assets/as-planned/{assetId}/children/{childId}" : { + "get" : { + "tags" : [ + "AssetsAsPlanned" + ], + "summary" : "Get asset by child id", + "description" : "The endpoint returns an asset filtered by child id.", + "operationId" : "assetByChildId", + "parameters" : [ + { + "name" : "assetId", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } }, + { + "name" : "childId", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + } + ], + "responses" : { "200" : { "description" : "Returns the asset by childId", "content" : { @@ -4297,6 +4227,76 @@ } } } + }, + "400" : { + "description" : "Bad request.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "415" : { + "description" : "Unsupported media type", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "401" : { + "description" : "Authorization failed.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "429" : { + "description" : "Too many requests.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "500" : { + "description" : "Internal server error.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } } }, "security" : [ @@ -4337,8 +4337,8 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -4357,8 +4357,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -4367,8 +4367,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -4377,20 +4377,18 @@ } } }, - "200" : { - "description" : "Returns a distinct filter values for given fieldName.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -4399,18 +4397,20 @@ } } }, - "429" : { - "description" : "Too many requests.", + "200" : { + "description" : "Returns a distinct filter values for given fieldName.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -4456,36 +4456,6 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "400" : { "description" : "Bad request.", "content" : { @@ -4496,8 +4466,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -4506,8 +4476,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -4648,6 +4618,26 @@ } } }, + "401" : { + "description" : "Authorization failed.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "429" : { + "description" : "Too many requests.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, "404" : { "description" : "Not found.", "content" : { @@ -4657,6 +4647,16 @@ } } } + }, + "500" : { + "description" : "Internal server error.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } } }, "security" : [ @@ -4695,8 +4695,8 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -4715,8 +4715,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -4725,8 +4725,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -4735,8 +4735,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -4745,8 +4745,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -4882,8 +4882,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -4931,8 +4931,8 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -4951,8 +4951,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -4961,8 +4961,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -4971,20 +4971,18 @@ } } }, - "200" : { - "description" : "Returns a distinct filter values for given fieldName.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -4993,18 +4991,20 @@ } } }, - "429" : { - "description" : "Too many requests.", + "200" : { + "description" : "Returns a distinct filter values for given fieldName.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5032,18 +5032,22 @@ "description" : "The endpoint returns a map for assets consumed by the map.", "operationId" : "assetsCountryMap", "responses" : { - "403" : { - "description" : "Forbidden.", + "200" : { + "description" : "Returns the assets found", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "type" : "object", + "additionalProperties" : { + "type" : "integer", + "format" : "int64" + } } } } }, - "415" : { - "description" : "Unsupported media type", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -5052,8 +5056,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -5062,8 +5066,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5072,22 +5076,18 @@ } } }, - "200" : { - "description" : "Returns the assets found", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { - "type" : "object", - "additionalProperties" : { - "type" : "integer", - "format" : "int64" - } + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -5096,8 +5096,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -5106,8 +5106,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5146,18 +5146,23 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", + "200" : { + "description" : "OK.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "type" : "array", + "description" : "Alerts", + "items" : { + "$ref" : "#/components/schemas/AlertResponse" + } } } } }, - "415" : { - "description" : "Unsupported media type", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -5166,8 +5171,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -5176,8 +5181,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5186,23 +5191,18 @@ } } }, - "200" : { - "description" : "OK.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Alerts", - "items" : { - "$ref" : "#/components/schemas/AlertResponse" - } + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -5211,8 +5211,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -5221,8 +5221,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5260,8 +5260,8 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -5280,18 +5280,19 @@ } } }, - "500" : { - "description" : "Internal server error.", + "200" : { + "description" : "Returns the paged result found for Asset", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "type" : "array" } } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5320,19 +5321,18 @@ } } }, - "200" : { - "description" : "Returns the paged result found for Asset", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5370,8 +5370,8 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -5390,18 +5390,19 @@ } } }, - "500" : { - "description" : "Internal server error.", + "200" : { + "description" : "Returns the paged result found for Asset", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "type" : "array" } } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5430,19 +5431,18 @@ } } }, - "200" : { - "description" : "Returns the paged result found for Asset", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5470,8 +5470,8 @@ "description" : "Deletes all submodels from the system.", "operationId" : "deleteSubmodels", "responses" : { - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -5490,8 +5490,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5500,8 +5500,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -5510,8 +5510,11 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "204" : { + "description" : "No Content." + }, + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -5520,8 +5523,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -5530,11 +5533,8 @@ } } }, - "204" : { - "description" : "No Content." - }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5572,8 +5572,8 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -5592,8 +5592,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5602,8 +5602,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -5612,8 +5612,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -5622,8 +5622,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -5635,8 +5635,8 @@ "204" : { "description" : "Deleted." }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5832,47 +5832,6 @@ } } }, - "StartQualityAlertRequest" : { - "required" : [ - "bpn", - "severity" - ], - "type" : "object", - "properties" : { - "partIds" : { - "maxItems" : 100, - "minItems" : 1, - "type" : "array", - "items" : { - "type" : "string" - } - }, - "description" : { - "maxLength" : 1000, - "minLength" : 15, - "type" : "string" - }, - "targetDate" : { - "type" : "string", - "format" : "date-time" - }, - "severity" : { - "type" : "string", - "enum" : [ - "MINOR", - "MAJOR", - "CRITICAL", - "LIFE_THREATENING" - ] - }, - "bpn" : { - "type" : "string" - }, - "asBuilt" : { - "type" : "boolean" - } - } - }, "UpdateAssetRequest" : { "required" : [ "qualityType" From 3b76bba0f776a454e54540c2b87ae2a3667045a8 Mon Sep 17 00:00:00 2001 From: ashanmugavel Date: Mon, 9 Oct 2023 12:48:31 +0200 Subject: [PATCH 21/39] fixed: Missing Override annotation --- .../infrastructure/alert/model/AlertNotificationEntity.java | 2 +- .../investigation/model/InvestigationNotificationEntity.java | 2 +- .../java/assets/response/asplanned/AssetAsPlannedResponse.java | 3 +-- .../java/qualitynotification/alert/response/AlertResponse.java | 2 ++ .../investigation/response/InvestigationResponse.java | 2 ++ 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/alert/model/AlertNotificationEntity.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/alert/model/AlertNotificationEntity.java index e94734efb2..461b1e151a 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/alert/model/AlertNotificationEntity.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/alert/model/AlertNotificationEntity.java @@ -48,7 +48,7 @@ @SuperBuilder @AllArgsConstructor @NoArgsConstructor -@EqualsAndHashCode +@EqualsAndHashCode(callSuper = true) @Entity @Table(name = "alert_notification") public class AlertNotificationEntity extends QualityNotificationMessageBaseEntity { diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/investigation/model/InvestigationNotificationEntity.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/investigation/model/InvestigationNotificationEntity.java index f1fd75abb5..a776f8f904 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/investigation/model/InvestigationNotificationEntity.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/investigation/model/InvestigationNotificationEntity.java @@ -48,7 +48,7 @@ @SuperBuilder @AllArgsConstructor @NoArgsConstructor -@EqualsAndHashCode +@EqualsAndHashCode(callSuper = true) @Entity @Table(name = "investigation_notification") public class InvestigationNotificationEntity extends QualityNotificationMessageBaseEntity { diff --git a/tx-models/src/main/java/assets/response/asplanned/AssetAsPlannedResponse.java b/tx-models/src/main/java/assets/response/asplanned/AssetAsPlannedResponse.java index 9877f10ca4..befd06b1d6 100644 --- a/tx-models/src/main/java/assets/response/asplanned/AssetAsPlannedResponse.java +++ b/tx-models/src/main/java/assets/response/asplanned/AssetAsPlannedResponse.java @@ -22,11 +22,10 @@ import assets.response.base.AssetBaseResponse; import io.swagger.v3.oas.annotations.media.ArraySchema; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.*; import lombok.experimental.SuperBuilder; + @SuperBuilder -@Data @ArraySchema(arraySchema = @Schema(description = "Assets", additionalProperties = Schema.AdditionalPropertiesValue.FALSE), maxItems = Integer.MAX_VALUE) public class AssetAsPlannedResponse extends AssetBaseResponse { diff --git a/tx-models/src/main/java/qualitynotification/alert/response/AlertResponse.java b/tx-models/src/main/java/qualitynotification/alert/response/AlertResponse.java index da4067c601..2bc945e408 100644 --- a/tx-models/src/main/java/qualitynotification/alert/response/AlertResponse.java +++ b/tx-models/src/main/java/qualitynotification/alert/response/AlertResponse.java @@ -22,10 +22,12 @@ import io.swagger.v3.oas.annotations.media.ArraySchema; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import lombok.EqualsAndHashCode; import lombok.ToString; import lombok.experimental.SuperBuilder; import qualitynotification.base.response.QualityNotificationResponse; +@EqualsAndHashCode(callSuper = true) @Data @ToString(callSuper = true) @SuperBuilder diff --git a/tx-models/src/main/java/qualitynotification/investigation/response/InvestigationResponse.java b/tx-models/src/main/java/qualitynotification/investigation/response/InvestigationResponse.java index da3be53330..de5ef7332a 100644 --- a/tx-models/src/main/java/qualitynotification/investigation/response/InvestigationResponse.java +++ b/tx-models/src/main/java/qualitynotification/investigation/response/InvestigationResponse.java @@ -22,10 +22,12 @@ import io.swagger.v3.oas.annotations.media.ArraySchema; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import lombok.EqualsAndHashCode; import lombok.experimental.SuperBuilder; import qualitynotification.base.response.QualityNotificationResponse; +@EqualsAndHashCode(callSuper = true) @Data @SuperBuilder @ArraySchema(arraySchema = @Schema(description = "Investigations", additionalProperties = Schema.AdditionalPropertiesValue.FALSE), minItems = Integer.MIN_VALUE, maxItems = Integer.MAX_VALUE) From bd4bf30f2c5d78be703fcb410d17f307057726d4 Mon Sep 17 00:00:00 2001 From: ashanmugavel Date: Mon, 9 Oct 2023 13:36:02 +0200 Subject: [PATCH 22/39] Revert "fixed: Missing Override annotation" This reverts commit df2d1cc83b162db19ab5c8548d92fb1c9d6c3f32. --- .../infrastructure/alert/model/AlertNotificationEntity.java | 2 +- .../investigation/model/InvestigationNotificationEntity.java | 2 +- .../java/assets/response/asplanned/AssetAsPlannedResponse.java | 3 ++- .../java/qualitynotification/alert/response/AlertResponse.java | 2 -- .../investigation/response/InvestigationResponse.java | 2 -- 5 files changed, 4 insertions(+), 7 deletions(-) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/alert/model/AlertNotificationEntity.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/alert/model/AlertNotificationEntity.java index 461b1e151a..e94734efb2 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/alert/model/AlertNotificationEntity.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/alert/model/AlertNotificationEntity.java @@ -48,7 +48,7 @@ @SuperBuilder @AllArgsConstructor @NoArgsConstructor -@EqualsAndHashCode(callSuper = true) +@EqualsAndHashCode @Entity @Table(name = "alert_notification") public class AlertNotificationEntity extends QualityNotificationMessageBaseEntity { diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/investigation/model/InvestigationNotificationEntity.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/investigation/model/InvestigationNotificationEntity.java index a776f8f904..f1fd75abb5 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/investigation/model/InvestigationNotificationEntity.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/investigation/model/InvestigationNotificationEntity.java @@ -48,7 +48,7 @@ @SuperBuilder @AllArgsConstructor @NoArgsConstructor -@EqualsAndHashCode(callSuper = true) +@EqualsAndHashCode @Entity @Table(name = "investigation_notification") public class InvestigationNotificationEntity extends QualityNotificationMessageBaseEntity { diff --git a/tx-models/src/main/java/assets/response/asplanned/AssetAsPlannedResponse.java b/tx-models/src/main/java/assets/response/asplanned/AssetAsPlannedResponse.java index befd06b1d6..9877f10ca4 100644 --- a/tx-models/src/main/java/assets/response/asplanned/AssetAsPlannedResponse.java +++ b/tx-models/src/main/java/assets/response/asplanned/AssetAsPlannedResponse.java @@ -22,10 +22,11 @@ import assets.response.base.AssetBaseResponse; import io.swagger.v3.oas.annotations.media.ArraySchema; import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; import lombok.experimental.SuperBuilder; - @SuperBuilder +@Data @ArraySchema(arraySchema = @Schema(description = "Assets", additionalProperties = Schema.AdditionalPropertiesValue.FALSE), maxItems = Integer.MAX_VALUE) public class AssetAsPlannedResponse extends AssetBaseResponse { diff --git a/tx-models/src/main/java/qualitynotification/alert/response/AlertResponse.java b/tx-models/src/main/java/qualitynotification/alert/response/AlertResponse.java index 2bc945e408..da4067c601 100644 --- a/tx-models/src/main/java/qualitynotification/alert/response/AlertResponse.java +++ b/tx-models/src/main/java/qualitynotification/alert/response/AlertResponse.java @@ -22,12 +22,10 @@ import io.swagger.v3.oas.annotations.media.ArraySchema; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; -import lombok.EqualsAndHashCode; import lombok.ToString; import lombok.experimental.SuperBuilder; import qualitynotification.base.response.QualityNotificationResponse; -@EqualsAndHashCode(callSuper = true) @Data @ToString(callSuper = true) @SuperBuilder diff --git a/tx-models/src/main/java/qualitynotification/investigation/response/InvestigationResponse.java b/tx-models/src/main/java/qualitynotification/investigation/response/InvestigationResponse.java index de5ef7332a..da3be53330 100644 --- a/tx-models/src/main/java/qualitynotification/investigation/response/InvestigationResponse.java +++ b/tx-models/src/main/java/qualitynotification/investigation/response/InvestigationResponse.java @@ -22,12 +22,10 @@ import io.swagger.v3.oas.annotations.media.ArraySchema; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; -import lombok.EqualsAndHashCode; import lombok.experimental.SuperBuilder; import qualitynotification.base.response.QualityNotificationResponse; -@EqualsAndHashCode(callSuper = true) @Data @SuperBuilder @ArraySchema(arraySchema = @Schema(description = "Investigations", additionalProperties = Schema.AdditionalPropertiesValue.FALSE), minItems = Integer.MIN_VALUE, maxItems = Integer.MAX_VALUE) From d9539ec6eac60c772aa036fc0208c51b97917d79 Mon Sep 17 00:00:00 2001 From: ashanmugavel Date: Mon, 9 Oct 2023 13:42:50 +0200 Subject: [PATCH 23/39] fixed: Missing Override annotation --- .../infrastructure/alert/model/AlertNotificationEntity.java | 2 -- .../investigation/model/InvestigationNotificationEntity.java | 2 -- .../java/assets/response/asplanned/AssetAsPlannedResponse.java | 2 -- .../java/qualitynotification/alert/response/AlertResponse.java | 3 +-- .../investigation/response/InvestigationResponse.java | 2 -- 5 files changed, 1 insertion(+), 10 deletions(-) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/alert/model/AlertNotificationEntity.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/alert/model/AlertNotificationEntity.java index e94734efb2..222c7d3bb1 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/alert/model/AlertNotificationEntity.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/alert/model/AlertNotificationEntity.java @@ -27,7 +27,6 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; import lombok.AllArgsConstructor; -import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @@ -48,7 +47,6 @@ @SuperBuilder @AllArgsConstructor @NoArgsConstructor -@EqualsAndHashCode @Entity @Table(name = "alert_notification") public class AlertNotificationEntity extends QualityNotificationMessageBaseEntity { diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/investigation/model/InvestigationNotificationEntity.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/investigation/model/InvestigationNotificationEntity.java index f1fd75abb5..69bee1f0cd 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/investigation/model/InvestigationNotificationEntity.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/investigation/model/InvestigationNotificationEntity.java @@ -27,7 +27,6 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; import lombok.AllArgsConstructor; -import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @@ -48,7 +47,6 @@ @SuperBuilder @AllArgsConstructor @NoArgsConstructor -@EqualsAndHashCode @Entity @Table(name = "investigation_notification") public class InvestigationNotificationEntity extends QualityNotificationMessageBaseEntity { diff --git a/tx-models/src/main/java/assets/response/asplanned/AssetAsPlannedResponse.java b/tx-models/src/main/java/assets/response/asplanned/AssetAsPlannedResponse.java index 9877f10ca4..6fd517ea9b 100644 --- a/tx-models/src/main/java/assets/response/asplanned/AssetAsPlannedResponse.java +++ b/tx-models/src/main/java/assets/response/asplanned/AssetAsPlannedResponse.java @@ -22,11 +22,9 @@ import assets.response.base.AssetBaseResponse; import io.swagger.v3.oas.annotations.media.ArraySchema; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.*; import lombok.experimental.SuperBuilder; @SuperBuilder -@Data @ArraySchema(arraySchema = @Schema(description = "Assets", additionalProperties = Schema.AdditionalPropertiesValue.FALSE), maxItems = Integer.MAX_VALUE) public class AssetAsPlannedResponse extends AssetBaseResponse { diff --git a/tx-models/src/main/java/qualitynotification/alert/response/AlertResponse.java b/tx-models/src/main/java/qualitynotification/alert/response/AlertResponse.java index da4067c601..89035568ac 100644 --- a/tx-models/src/main/java/qualitynotification/alert/response/AlertResponse.java +++ b/tx-models/src/main/java/qualitynotification/alert/response/AlertResponse.java @@ -21,12 +21,11 @@ import io.swagger.v3.oas.annotations.media.ArraySchema; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; import lombok.ToString; import lombok.experimental.SuperBuilder; import qualitynotification.base.response.QualityNotificationResponse; -@Data + @ToString(callSuper = true) @SuperBuilder @ArraySchema(arraySchema = @Schema(description = "Alerts", additionalProperties = Schema.AdditionalPropertiesValue.FALSE), maxItems = Integer.MAX_VALUE) diff --git a/tx-models/src/main/java/qualitynotification/investigation/response/InvestigationResponse.java b/tx-models/src/main/java/qualitynotification/investigation/response/InvestigationResponse.java index da3be53330..c9538083a4 100644 --- a/tx-models/src/main/java/qualitynotification/investigation/response/InvestigationResponse.java +++ b/tx-models/src/main/java/qualitynotification/investigation/response/InvestigationResponse.java @@ -21,12 +21,10 @@ import io.swagger.v3.oas.annotations.media.ArraySchema; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; import lombok.experimental.SuperBuilder; import qualitynotification.base.response.QualityNotificationResponse; -@Data @SuperBuilder @ArraySchema(arraySchema = @Schema(description = "Investigations", additionalProperties = Schema.AdditionalPropertiesValue.FALSE), minItems = Integer.MIN_VALUE, maxItems = Integer.MAX_VALUE) public class InvestigationResponse extends QualityNotificationResponse { From 6e4690efdb61eecfa98f7945c8a530923670fe7b Mon Sep 17 00:00:00 2001 From: ashanmugavel Date: Tue, 10 Oct 2023 12:31:51 +0200 Subject: [PATCH 24/39] chore: updated dependencies and plugins --- .../openapi/traceability-foss-backend.json | 1670 ++++++++--------- 1 file changed, 835 insertions(+), 835 deletions(-) diff --git a/tx-backend/openapi/traceability-foss-backend.json b/tx-backend/openapi/traceability-foss-backend.json index a517d42578..d245301bc8 100644 --- a/tx-backend/openapi/traceability-foss-backend.json +++ b/tx-backend/openapi/traceability-foss-backend.json @@ -41,8 +41,8 @@ "description" : "The endpoint returns a result of BPN EDC URL mappings.", "operationId" : "getBpnEdcs", "responses" : { - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -51,8 +51,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -61,8 +61,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -71,18 +71,20 @@ } } }, - "429" : { - "description" : "Too many requests.", + "200" : { + "description" : "Returns the paged result found", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } }, - "404" : { - "description" : "Not found.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -91,20 +93,18 @@ } } }, - "200" : { - "description" : "Returns the paged result found", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "400" : { - "description" : "Bad request.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -113,8 +113,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -155,8 +155,8 @@ "required" : true }, "responses" : { - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -165,8 +165,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -175,8 +175,18 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -226,16 +236,6 @@ } } } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } } }, "security" : [ @@ -269,8 +269,8 @@ "required" : true }, "responses" : { - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -279,8 +279,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -289,8 +289,18 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -340,16 +350,6 @@ } } } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } } }, "security" : [ @@ -380,14 +380,10 @@ } ], "responses" : { - "401" : { - "description" : "Authorization failed.", + "200" : { + "description" : "Returns the paged result found", "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } + "application/json" : {} } }, "415" : { @@ -410,14 +406,18 @@ } } }, - "200" : { - "description" : "Returns the paged result found", + "403" : { + "description" : "Forbidden.", "content" : { - "application/json" : {} + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } } }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -426,8 +426,8 @@ } } }, - "404" : { - "description" : "Not found.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -436,8 +436,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -446,8 +446,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -493,8 +493,8 @@ "required" : true }, "responses" : { - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -503,8 +503,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -513,8 +513,18 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -555,16 +565,6 @@ } } } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } } }, "security" : [ @@ -595,8 +595,8 @@ "required" : true }, "responses" : { - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -605,8 +605,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -615,8 +615,18 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -664,16 +674,6 @@ } } } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } } }, "security" : [ @@ -715,8 +715,8 @@ "required" : true }, "responses" : { - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -725,8 +725,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -735,8 +735,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -745,8 +745,11 @@ } } }, - "429" : { - "description" : "Too many requests.", + "204" : { + "description" : "No content." + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -755,8 +758,8 @@ } } }, - "404" : { - "description" : "Not found.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -765,11 +768,8 @@ } } }, - "204" : { - "description" : "No content." - }, - "400" : { - "description" : "Bad request.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -778,8 +778,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -828,16 +828,6 @@ "required" : true }, "responses" : { - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "415" : { "description" : "Unsupported media type", "content" : { @@ -858,8 +848,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -868,21 +858,31 @@ } } }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { + "204" : { + "description" : "No content." + }, + "401" : { + "description" : "Authorization failed.", + "content" : { + "application/json" : { "schema" : { "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "204" : { - "description" : "No content." + "429" : { + "description" : "Too many requests.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } }, - "400" : { - "description" : "Bad request.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -891,8 +891,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -931,8 +931,8 @@ } ], "responses" : { - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -941,8 +941,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -951,8 +951,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -961,8 +961,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -971,8 +971,8 @@ } } }, - "404" : { - "description" : "Not found.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -984,8 +984,8 @@ "204" : { "description" : "No content." }, - "400" : { - "description" : "Bad request.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -994,8 +994,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1034,8 +1034,8 @@ } ], "responses" : { - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1044,8 +1044,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1054,8 +1054,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1064,8 +1064,11 @@ } } }, - "429" : { - "description" : "Too many requests.", + "204" : { + "description" : "No content." + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1074,8 +1077,8 @@ } } }, - "404" : { - "description" : "Not found.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1084,11 +1087,8 @@ } } }, - "204" : { - "description" : "No content." - }, - "400" : { - "description" : "Bad request.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1097,8 +1097,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1136,8 +1136,8 @@ "required" : true }, "responses" : { - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1146,8 +1146,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1156,8 +1156,18 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1205,16 +1215,6 @@ } } } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } } }, "security" : [ @@ -1245,8 +1245,8 @@ "required" : true }, "responses" : { - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1255,8 +1255,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1265,8 +1265,18 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1307,16 +1317,6 @@ }, "201" : { "description" : "Created." - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } } }, "security" : [ @@ -1347,8 +1347,8 @@ "required" : true }, "responses" : { - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1357,8 +1357,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1367,18 +1367,20 @@ } } }, - "500" : { - "description" : "Internal server error.", + "200" : { + "description" : "Returns the paged result found for Asset", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } }, - "429" : { - "description" : "Too many requests.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1387,8 +1389,8 @@ } } }, - "404" : { - "description" : "Not found.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1397,8 +1399,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1407,20 +1409,18 @@ } } }, - "200" : { - "description" : "Returns the paged result found for Asset", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1458,8 +1458,8 @@ "required" : true }, "responses" : { - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1468,8 +1468,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1478,8 +1478,18 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1520,16 +1530,6 @@ }, "201" : { "description" : "Created." - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } } }, "security" : [ @@ -1572,8 +1572,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1582,8 +1582,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1592,8 +1592,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1602,8 +1602,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1612,8 +1612,8 @@ } } }, - "404" : { - "description" : "Not found.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1622,8 +1622,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1632,8 +1632,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1671,8 +1671,8 @@ "required" : true }, "responses" : { - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1681,8 +1681,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1691,8 +1691,18 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1740,16 +1750,6 @@ } } } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } } }, "security" : [ @@ -1791,8 +1791,8 @@ "required" : true }, "responses" : { - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1801,8 +1801,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1811,8 +1811,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1821,8 +1821,11 @@ } } }, - "429" : { - "description" : "Too many requests.", + "204" : { + "description" : "No content." + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1831,8 +1834,8 @@ } } }, - "404" : { - "description" : "Not found.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1841,11 +1844,8 @@ } } }, - "204" : { - "description" : "No content." - }, - "400" : { - "description" : "Bad request.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1854,8 +1854,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1904,8 +1904,8 @@ "required" : true }, "responses" : { - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1914,8 +1914,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1924,8 +1924,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1934,8 +1934,11 @@ } } }, - "429" : { - "description" : "Too many requests.", + "204" : { + "description" : "No content." + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1944,8 +1947,8 @@ } } }, - "404" : { - "description" : "Not found.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1954,11 +1957,8 @@ } } }, - "204" : { - "description" : "No content." - }, - "400" : { - "description" : "Bad request.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1967,8 +1967,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2007,8 +2007,8 @@ } ], "responses" : { - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2017,8 +2017,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2027,8 +2027,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2037,8 +2037,11 @@ } } }, - "429" : { - "description" : "Too many requests.", + "204" : { + "description" : "No content." + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2047,8 +2050,8 @@ } } }, - "404" : { - "description" : "Not found.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -2057,11 +2060,8 @@ } } }, - "204" : { - "description" : "No content." - }, - "400" : { - "description" : "Bad request.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -2070,8 +2070,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2110,8 +2110,8 @@ } ], "responses" : { - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2120,8 +2120,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2130,8 +2130,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2140,8 +2140,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2150,8 +2150,8 @@ } } }, - "404" : { - "description" : "Not found.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -2163,8 +2163,8 @@ "204" : { "description" : "No content." }, - "400" : { - "description" : "Bad request.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -2173,8 +2173,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2212,8 +2212,8 @@ } ], "responses" : { - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2222,8 +2222,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2232,8 +2232,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2242,8 +2242,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2252,8 +2252,8 @@ } } }, - "404" : { - "description" : "Not found.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -2389,8 +2389,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -2399,8 +2399,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2446,46 +2446,6 @@ "required" : true }, "responses" : { - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "200" : { "description" : "Returns the updated asset", "content" : { @@ -2613,8 +2573,8 @@ } } }, - "404" : { - "description" : "Not found.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2623,8 +2583,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2642,36 +2602,7 @@ } } } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/assets/as-built/{assetId}" : { - "get" : { - "tags" : [ - "AssetsAsBuilt" - ], - "summary" : "Get asset by id", - "description" : "The endpoint returns an asset filtered by id .", - "operationId" : "assetById_1", - "parameters" : [ - { - "name" : "assetId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } - ], - "responses" : { + }, "401" : { "description" : "Authorization failed.", "content" : { @@ -2682,8 +2613,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -2692,8 +2623,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -2702,8 +2633,47 @@ } } }, - "429" : { - "description" : "Too many requests.", + "400" : { + "description" : "Bad request.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security" : [ + { + "oAuth2" : [ + "profile email" + ] + } + ] + } + }, + "/assets/as-built/{assetId}" : { + "get" : { + "tags" : [ + "AssetsAsBuilt" + ], + "summary" : "Get asset by id", + "description" : "The endpoint returns an asset filtered by id .", + "operationId" : "assetById_1", + "parameters" : [ + { + "name" : "assetId", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + } + ], + "responses" : { + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2712,8 +2682,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2849,8 +2819,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2859,8 +2829,38 @@ } } }, - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "429" : { + "description" : "Too many requests.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2906,6 +2906,36 @@ "required" : true }, "responses" : { + "415" : { + "description" : "Unsupported media type", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "500" : { + "description" : "Internal server error.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, "401" : { "description" : "Authorization failed.", "content" : { @@ -2916,8 +2946,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -2926,8 +2956,18 @@ } } }, - "500" : { - "description" : "Internal server error.", + "404" : { + "description" : "Not found.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3062,46 +3102,6 @@ } } } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } } }, "security" : [ @@ -3122,8 +3122,8 @@ "description" : "The endpoint returns all shell descriptors.", "operationId" : "findAll", "responses" : { - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3132,8 +3132,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3142,8 +3142,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3152,8 +3152,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -3162,8 +3162,8 @@ } } }, - "404" : { - "description" : "Not found.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -3185,8 +3185,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -3195,8 +3195,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3223,8 +3223,8 @@ "description" : "The endpoint deletes all shell descriptors.", "operationId" : "deleteAll", "responses" : { - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3233,8 +3233,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3243,8 +3243,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3253,8 +3253,11 @@ } } }, - "429" : { - "description" : "Too many requests.", + "204" : { + "description" : "Deleted." + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -3263,11 +3266,8 @@ } } }, - "204" : { - "description" : "Deleted." - }, - "404" : { - "description" : "Not found.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -3276,8 +3276,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -3286,8 +3286,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3315,8 +3315,8 @@ "description" : "The endpoint Triggers reload of shell descriptors.", "operationId" : "reload", "responses" : { - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3325,8 +3325,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3335,8 +3335,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3345,8 +3345,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -3355,8 +3355,8 @@ } } }, - "404" : { - "description" : "Not found.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -3368,8 +3368,8 @@ "202" : { "description" : "Created registry reload job." }, - "400" : { - "description" : "Bad request.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -3378,8 +3378,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3418,16 +3418,6 @@ } ], "responses" : { - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "415" : { "description" : "Unsupported media type", "content" : { @@ -3448,8 +3438,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3474,8 +3464,8 @@ } } }, - "404" : { - "description" : "Not found.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -3484,8 +3474,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -3494,8 +3484,18 @@ } } }, - "403" : { - "description" : "Forbidden.", + "404" : { + "description" : "Not found.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3533,8 +3533,8 @@ } ], "responses" : { - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3543,8 +3543,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3553,8 +3553,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3563,18 +3563,20 @@ } } }, - "429" : { - "description" : "Too many requests.", + "200" : { + "description" : "Returns the paged result found for Asset", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } }, - "404" : { - "description" : "Not found.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -3583,20 +3585,18 @@ } } }, - "200" : { - "description" : "Returns the paged result found for Asset", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "400" : { - "description" : "Bad request.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -3605,8 +3605,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3644,8 +3644,8 @@ } ], "responses" : { - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3654,8 +3654,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3664,8 +3664,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3674,8 +3674,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -3684,30 +3684,30 @@ } } }, - "200" : { - "description" : "Returns the paged result found for Asset", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "404" : { - "description" : "Not found.", + "200" : { + "description" : "Returns the paged result found for Asset", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } }, - "400" : { - "description" : "Bad request.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -3716,8 +3716,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3745,8 +3745,8 @@ "description" : "The endpoint can return limited data based on the user role", "operationId" : "dashboard", "responses" : { - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3755,8 +3755,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3765,8 +3765,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3775,8 +3775,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -3785,8 +3785,8 @@ } } }, - "404" : { - "description" : "Not found.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -3805,8 +3805,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -3815,8 +3815,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3862,8 +3862,8 @@ } ], "responses" : { - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3872,8 +3872,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3882,8 +3882,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3892,8 +3892,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -3902,8 +3902,8 @@ } } }, - "404" : { - "description" : "Not found.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -4044,8 +4044,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -4054,8 +4054,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -4101,8 +4101,8 @@ } ], "responses" : { - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -4111,8 +4111,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -4121,8 +4121,18 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -4141,6 +4151,26 @@ } } }, + "404" : { + "description" : "Not found.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "400" : { + "description" : "Bad request.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, "200" : { "description" : "Returns the asset by childId", "content" : { @@ -4267,36 +4297,6 @@ } } } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } } }, "security" : [ @@ -4337,16 +4337,6 @@ } ], "responses" : { - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "415" : { "description" : "Unsupported media type", "content" : { @@ -4367,8 +4357,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -4389,8 +4379,8 @@ } } }, - "404" : { - "description" : "Not found.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -4399,8 +4389,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -4409,8 +4399,18 @@ } } }, - "403" : { - "description" : "Forbidden.", + "404" : { + "description" : "Not found.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -4456,8 +4456,8 @@ } ], "responses" : { - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -4466,8 +4466,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -4476,8 +4476,18 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -4506,6 +4516,16 @@ } } }, + "400" : { + "description" : "Bad request.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, "200" : { "description" : "Returns the paged result found for Asset", "content" : { @@ -4637,26 +4657,6 @@ } } } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } } }, "security" : [ @@ -4695,8 +4695,8 @@ } ], "responses" : { - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -4705,8 +4705,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -4715,8 +4715,18 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -4862,18 +4872,8 @@ } } }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -4882,8 +4882,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -4931,16 +4931,6 @@ } ], "responses" : { - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "415" : { "description" : "Unsupported media type", "content" : { @@ -4961,8 +4951,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -4983,8 +4973,8 @@ } } }, - "404" : { - "description" : "Not found.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -4993,8 +4983,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -5003,8 +4993,18 @@ } } }, - "403" : { - "description" : "Forbidden.", + "404" : { + "description" : "Not found.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -5032,16 +5032,6 @@ "description" : "The endpoint returns a map for assets consumed by the map.", "operationId" : "assetsCountryMap", "responses" : { - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "415" : { "description" : "Unsupported media type", "content" : { @@ -5062,8 +5052,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5086,8 +5076,8 @@ } } }, - "404" : { - "description" : "Not found.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -5096,8 +5086,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -5106,8 +5096,18 @@ } } }, - "403" : { - "description" : "Forbidden.", + "404" : { + "description" : "Not found.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -5146,16 +5146,6 @@ } ], "responses" : { - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "415" : { "description" : "Unsupported media type", "content" : { @@ -5176,8 +5166,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5201,8 +5191,8 @@ } } }, - "404" : { - "description" : "Not found.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -5211,8 +5201,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -5221,8 +5211,18 @@ } } }, - "403" : { - "description" : "Forbidden.", + "404" : { + "description" : "Not found.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -5260,8 +5260,8 @@ } ], "responses" : { - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -5270,8 +5270,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5280,8 +5280,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5290,18 +5290,19 @@ } } }, - "429" : { - "description" : "Too many requests.", + "200" : { + "description" : "Returns the paged result found for Asset", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "type" : "array" } } } }, - "404" : { - "description" : "Not found.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -5310,19 +5311,18 @@ } } }, - "200" : { - "description" : "Returns the paged result found for Asset", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "400" : { - "description" : "Bad request.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -5331,8 +5331,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -5370,8 +5370,8 @@ } ], "responses" : { - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -5380,8 +5380,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5390,8 +5390,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5400,18 +5400,19 @@ } } }, - "429" : { - "description" : "Too many requests.", + "200" : { + "description" : "Returns the paged result found for Asset", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "type" : "array" } } } }, - "404" : { - "description" : "Not found.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -5420,19 +5421,18 @@ } } }, - "200" : { - "description" : "Returns the paged result found for Asset", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "400" : { - "description" : "Bad request.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -5441,8 +5441,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -5470,8 +5470,8 @@ "description" : "Deletes all submodels from the system.", "operationId" : "deleteSubmodels", "responses" : { - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -5480,8 +5480,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5490,8 +5490,18 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -5532,16 +5542,6 @@ } } } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } } }, "security" : [ @@ -5572,8 +5572,8 @@ } ], "responses" : { - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -5582,8 +5582,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5592,8 +5592,11 @@ } } }, - "500" : { - "description" : "Internal server error.", + "204" : { + "description" : "Deleted." + }, + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5602,8 +5605,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -5612,8 +5615,8 @@ } } }, - "404" : { - "description" : "Not found.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -5622,11 +5625,8 @@ } } }, - "204" : { - "description" : "Deleted." - }, - "400" : { - "description" : "Bad request.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -5635,8 +5635,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { From 554ef90e99f63513666578ac7a652b6fdf450c09 Mon Sep 17 00:00:00 2001 From: Maximilian Wesener Date: Tue, 10 Oct 2023 13:36:57 +0200 Subject: [PATCH 25/39] chore: TRACEFOSS-2512 fixed old filter value issue. --- .../presentation/other-parts.component.ts | 37 +++++++------ .../parts/presentation/parts.component.ts | 10 ++-- .../multi-select-autocomplete.component.ts | 1 + .../parts-table/parts-table.component.ts | 54 ++++++++++--------- 4 files changed, 58 insertions(+), 44 deletions(-) diff --git a/frontend/src/app/modules/page/other-parts/presentation/other-parts.component.ts b/frontend/src/app/modules/page/other-parts/presentation/other-parts.component.ts index 5b2d202290..feed0e73d0 100644 --- a/frontend/src/app/modules/page/other-parts/presentation/other-parts.component.ts +++ b/frontend/src/app/modules/page/other-parts/presentation/other-parts.component.ts @@ -87,28 +87,35 @@ export class OtherPartsComponent implements OnDestroy, OnInit { private resetFilterAndShowToast() { - let filterSet = false; + let oneFilterSet = false; for (const supplierPartsComponent of this.supplierPartsComponents) { for (const partsTableComponent of supplierPartsComponent.partsTableComponents) { - if (partsTableComponent.multiSelectAutocompleteComponent.theSearchElement) { - filterSet = true; - partsTableComponent.filterFormGroup.reset(); + for (const multiSelectAutocompleteComponent of partsTableComponent.multiSelectAutocompleteComponents) { + multiSelectAutocompleteComponent.theSearchElement = null; + multiSelectAutocompleteComponent.clickClear(); + multiSelectAutocompleteComponent.formControl.reset(); + if (partsTableComponent.filterFormGroup.dirty && !oneFilterSet) { + this.toastService.info("parts.input.global-search.toastInfo"); + oneFilterSet = true; + } } } } - for (const customerPartsComponent of this.customerPartsComponents) { - for (const partsTableComponent of customerPartsComponent.partsTableComponents) { - if (partsTableComponent.multiSelectAutocompleteComponent.theSearchElement) { - filterSet = true; - partsTableComponent.filterFormGroup.reset(); - } + + for (const customerPartsComponent of this.customerPartsComponents) { + for (const partsTableComponent of customerPartsComponent.partsTableComponents) { + for (const multiSelectAutocompleteComponent of partsTableComponent.multiSelectAutocompleteComponents) { + multiSelectAutocompleteComponent.theSearchElement = null; + multiSelectAutocompleteComponent.clickClear(); + multiSelectAutocompleteComponent.formControl.reset(); + if (partsTableComponent.filterFormGroup.dirty) { + this.toastService.info("parts.input.global-search.toastInfo"); + } + } + } } - } - if (filterSet) { - this.toastService.info('parts.input.global-search.toastInfo'); - } - return filterSet; + } public onTabChange({ index }: MatTabChangeEvent): void { diff --git a/frontend/src/app/modules/page/parts/presentation/parts.component.ts b/frontend/src/app/modules/page/parts/presentation/parts.component.ts index a13ea34a73..2ea00393bb 100644 --- a/frontend/src/app/modules/page/parts/presentation/parts.component.ts +++ b/frontend/src/app/modules/page/parts/presentation/parts.component.ts @@ -123,9 +123,13 @@ export class PartsComponent implements OnInit, OnDestroy, AfterViewInit { private resetFilterAndShowToast() { for (const partTableComponent of this.partsTableComponents) { - if (partTableComponent.filterFormGroup.dirty) { - partTableComponent.filterFormGroup.reset(); - this.toastService.info("parts.input.global-search.toastInfo"); + for (const multiSelectAutocompleteComponent of partTableComponent.multiSelectAutocompleteComponents) { + multiSelectAutocompleteComponent.theSearchElement = null; + multiSelectAutocompleteComponent.clickClear(); + multiSelectAutocompleteComponent.formControl.reset(); + if (partTableComponent.filterFormGroup.dirty) { + this.toastService.info("parts.input.global-search.toastInfo"); + } } } } diff --git a/frontend/src/app/modules/shared/components/multi-select-autocomplete/multi-select-autocomplete.component.ts b/frontend/src/app/modules/shared/components/multi-select-autocomplete/multi-select-autocomplete.component.ts index 5e5c3062f2..1a46799a2c 100644 --- a/frontend/src/app/modules/shared/components/multi-select-autocomplete/multi-select-autocomplete.component.ts +++ b/frontend/src/app/modules/shared/components/multi-select-autocomplete/multi-select-autocomplete.component.ts @@ -138,6 +138,7 @@ export class MultiSelectAutocompleteComponent implements OnChanges { clickClear(): void { this.formControl.patchValue(""); + this.formControl.reset(); this.searchInput.value = ''; this.theSearchElement = ''; this.selectedValue = []; diff --git a/frontend/src/app/modules/shared/components/parts-table/parts-table.component.ts b/frontend/src/app/modules/shared/components/parts-table/parts-table.component.ts index 950c9037d4..5ecdbeb087 100644 --- a/frontend/src/app/modules/shared/components/parts-table/parts-table.component.ts +++ b/frontend/src/app/modules/shared/components/parts-table/parts-table.component.ts @@ -17,32 +17,36 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { SelectionModel } from '@angular/cdk/collections'; +import {SelectionModel} from '@angular/cdk/collections'; import { - Component, - ElementRef, - EventEmitter, - Input, - OnInit, - Output, - ViewChild, - ViewEncapsulation, + Component, + ElementRef, + EventEmitter, + Input, + OnInit, + Output, + QueryList, + ViewChild, + ViewChildren, + ViewEncapsulation, } from '@angular/core'; -import { FormControl, FormGroup } from '@angular/forms'; -import { MatPaginator, PageEvent } from '@angular/material/paginator'; -import { MatSort, Sort } from '@angular/material/sort'; -import { MatTableDataSource } from '@angular/material/table'; -import { Pagination } from '@core/model/pagination.model'; -import { SemanticDataModel } from '@page/parts/model/parts.model'; -import { MultiSelectAutocompleteComponent } from '@shared/components/multi-select-autocomplete/multi-select-autocomplete.component'; +import {FormControl, FormGroup} from '@angular/forms'; +import {MatPaginator, PageEvent} from '@angular/material/paginator'; +import {MatSort, Sort} from '@angular/material/sort'; +import {MatTableDataSource} from '@angular/material/table'; +import {Pagination} from '@core/model/pagination.model'; +import {SemanticDataModel} from '@page/parts/model/parts.model'; import { - CreateHeaderFromColumns, - PartTableType, - TableConfig, - TableEventConfig, - TableHeaderSort, + MultiSelectAutocompleteComponent +} from '@shared/components/multi-select-autocomplete/multi-select-autocomplete.component'; +import { + CreateHeaderFromColumns, + PartTableType, + TableConfig, + TableEventConfig, + TableHeaderSort, } from '@shared/components/table/table.model'; -import { addSelectedValues, removeSelectedValues } from '@shared/helper/table-helper'; +import {addSelectedValues, removeSelectedValues} from '@shared/helper/table-helper'; @Component({ @@ -55,9 +59,7 @@ export class PartsTableComponent implements OnInit { @ViewChild(MatSort) sort: MatSort; @ViewChild(MatPaginator) paginator: MatPaginator; @ViewChild('tableElement', {read: ElementRef}) tableElementRef: ElementRef; - - @ViewChild(MultiSelectAutocompleteComponent) multiSelectAutocompleteComponent: MultiSelectAutocompleteComponent; - + @ViewChildren(MultiSelectAutocompleteComponent) multiSelectAutocompleteComponents: QueryList; @Input() multiSelectActive = false; @Input() labelId: string; @@ -417,7 +419,7 @@ export class PartsTableComponent implements OnInit { value: SemanticDataModel.BATCH, }, { display: 'JustInSequence', - value: SemanticDataModel.JUSTINSEQUENCE, + value: SemanticDataModel.JUSTINSEQUENCE, }, { display: 'SerialPart', value: SemanticDataModel.SERIALPART, From 335274e41e15d8a05d08ef9ed3bb29524e37d75f Mon Sep 17 00:00:00 2001 From: ashanmugavel Date: Tue, 10 Oct 2023 14:21:19 +0200 Subject: [PATCH 26/39] chore: updated dependencies and plugins --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fbcbb7a94f..41dd97a4a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,12 +18,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Added country flags icons to manufacturing Country - new submodelserver related API endpoints for data provisioning /api/submodel/data/{id} - Added global search field to other parts +- Added possiblity to provide multiple semanticDataModels in filter ### Changed - updated IRS helm chart from 6.6.1 to 6.7.2 - Updated policy related logic to reflect IRS changes - Moved response handling from the backend folder to the model folder, addressing a TODO item. -- StartQualityAlertRequest class and replaced it with extant StartQualityNotification class +- replaced StartQualityAlertRequest with StartQualityNotification - updated mikefarah/yq from 4.35.1 to 4.35.2 - updated maven-site-plugin from 4.0.0-M5 to 4.0.0-M9 - updated testcontainer-postgresql from 1.17.6 to 1.19.0 From 68365df1a996e0aa2a1211a2f5c2d267231b1e6a Mon Sep 17 00:00:00 2001 From: Maximilian Wesener Date: Tue, 10 Oct 2023 14:25:28 +0200 Subject: [PATCH 27/39] chore: TRACEFOSS-2512 fixed old filter value issue. --- .../other-parts.component.spec.ts | 46 ----- .../presentation/other-parts.component.ts | 179 +++++++++--------- 2 files changed, 89 insertions(+), 136 deletions(-) diff --git a/frontend/src/app/modules/page/other-parts/presentation/other-parts.component.spec.ts b/frontend/src/app/modules/page/other-parts/presentation/other-parts.component.spec.ts index 6242b37b6d..a3f42ca025 100644 --- a/frontend/src/app/modules/page/other-parts/presentation/other-parts.component.spec.ts +++ b/frontend/src/app/modules/page/other-parts/presentation/other-parts.component.spec.ts @@ -196,52 +196,6 @@ describe('Other Parts', () => { expect(updateCustomerPartsSpy).toHaveBeenCalledWith(searchValue); }); - it('should reset form on search', async () => { - const { fixture } = await renderOtherParts(); - const { componentInstance } = fixture; - // Mock the necessary data and components - componentInstance.supplierPartsComponents = [ - { - updateSupplierParts: jasmine.createSpy('updateSupplierParts'), // - partsTableComponents: [ - { - multiSelectAutocompleteComponent: { - theSearchElement: 'test', // Mock theSearchElement to be truthy - }, - filterFormGroup: { - reset: jasmine.createSpy('reset'), // Spy on reset method - }, - }, - ], - }, - ] as any; - - componentInstance.customerPartsComponents = [ - { - updateCustomerParts: jasmine.createSpy('updateCustomerParts'), - partsTableComponents: [ - { - multiSelectAutocompleteComponent: { - theSearchElement: 'test', // Mock theSearchElement to be truthy - }, - filterFormGroup: { - reset: jasmine.createSpy('reset'), // Spy on reset method - }, - }, - ], - }, - ] as any; - - // Call the method - componentInstance.triggerPartSearch(); - - // Expectations - expect(componentInstance.supplierPartsComponents[0].partsTableComponents[0].filterFormGroup.reset).toHaveBeenCalled(); - expect(componentInstance.customerPartsComponents[0].partsTableComponents[0].filterFormGroup.reset).toHaveBeenCalled(); - - }); - - }); }); diff --git a/frontend/src/app/modules/page/other-parts/presentation/other-parts.component.ts b/frontend/src/app/modules/page/other-parts/presentation/other-parts.component.ts index feed0e73d0..9758746d7f 100644 --- a/frontend/src/app/modules/page/other-parts/presentation/other-parts.component.ts +++ b/frontend/src/app/modules/page/other-parts/presentation/other-parts.component.ts @@ -19,114 +19,113 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { Component, OnDestroy, OnInit, QueryList, ViewChildren } from '@angular/core'; -import { FormControl, FormGroup } from '@angular/forms'; -import { MatTabChangeEvent } from '@angular/material/tabs'; -import { OtherPartsFacade } from '@page/other-parts/core/other-parts.facade'; -import { CustomerPartsComponent } from '@page/other-parts/presentation/customer-parts/customer-parts.component'; -import { SupplierPartsComponent } from '@page/other-parts/presentation/supplier-parts/supplier-parts.component'; -import { MainAspectType } from '@page/parts/model/mainAspectType.enum'; -import { BomLifecycleSize } from '@shared/components/bom-lifecycle-activator/bom-lifecycle-activator.model'; -import { ToastService } from '@shared/components/toasts/toast.service'; -import { PartDetailsFacade } from '@shared/modules/part-details/core/partDetails.facade'; -import { BomLifecycleSettingsService, UserSettingView } from '@shared/service/bom-lifecycle-settings.service'; -import { StaticIdService } from '@shared/service/staticId.service'; +import {Component, OnDestroy, OnInit, QueryList, ViewChildren} from '@angular/core'; +import {FormControl, FormGroup} from '@angular/forms'; +import {MatTabChangeEvent} from '@angular/material/tabs'; +import {OtherPartsFacade} from '@page/other-parts/core/other-parts.facade'; +import {CustomerPartsComponent} from '@page/other-parts/presentation/customer-parts/customer-parts.component'; +import {SupplierPartsComponent} from '@page/other-parts/presentation/supplier-parts/supplier-parts.component'; +import {MainAspectType} from '@page/parts/model/mainAspectType.enum'; +import {BomLifecycleSize} from '@shared/components/bom-lifecycle-activator/bom-lifecycle-activator.model'; +import {ToastService} from '@shared/components/toasts/toast.service'; +import {PartDetailsFacade} from '@shared/modules/part-details/core/partDetails.facade'; +import {BomLifecycleSettingsService, UserSettingView} from '@shared/service/bom-lifecycle-settings.service'; +import {StaticIdService} from '@shared/service/staticId.service'; @Component({ - selector: 'app-other-parts', - templateUrl: './other-parts.component.html', - styleUrls: [ './other-parts.component.scss' ], + selector: 'app-other-parts', + templateUrl: './other-parts.component.html', + styleUrls: ['./other-parts.component.scss'], }) export class OtherPartsComponent implements OnDestroy, OnInit { - public selectedTab = 0; - public showStartInvestigationArray = [ true, false ]; + public selectedTab = 0; + public showStartInvestigationArray = [true, false]; - public readonly supplierTabLabelId = this.staticIdService.generateId('OtherParts.supplierTabLabel'); - public readonly customerTabLabelId = this.staticIdService.generateId('OtherParts.customerTabLabel'); + public readonly supplierTabLabelId = this.staticIdService.generateId('OtherParts.supplierTabLabel'); + public readonly customerTabLabelId = this.staticIdService.generateId('OtherParts.customerTabLabel'); - public searchFormGroup = new FormGroup({}); - public searchControl: FormControl; - @ViewChildren(SupplierPartsComponent) supplierPartsComponents: QueryList; - @ViewChildren(CustomerPartsComponent) customerPartsComponents: QueryList; + public searchFormGroup = new FormGroup({}); + public searchControl: FormControl; + @ViewChildren(SupplierPartsComponent) supplierPartsComponents: QueryList; + @ViewChildren(CustomerPartsComponent) customerPartsComponents: QueryList; - constructor( - private readonly otherPartsFacade: OtherPartsFacade, - private readonly partDetailsFacade: PartDetailsFacade, - private readonly staticIdService: StaticIdService, - public userSettings: BomLifecycleSettingsService, - public toastService: ToastService, - ) { - } + constructor( + private readonly otherPartsFacade: OtherPartsFacade, + private readonly partDetailsFacade: PartDetailsFacade, + private readonly staticIdService: StaticIdService, + public userSettings: BomLifecycleSettingsService, + public toastService: ToastService, + ) { + } - ngOnInit(): void { - this.searchFormGroup.addControl('partSearch', new FormControl([])); - this.searchControl = this.searchFormGroup.get('partSearch') as unknown as FormControl; - } + ngOnInit(): void { + this.searchFormGroup.addControl('partSearch', new FormControl([])); + this.searchControl = this.searchFormGroup.get('partSearch') as unknown as FormControl; + } - public bomLifecycleSize: BomLifecycleSize = this.userSettings.getSize(UserSettingView.OTHER_PARTS); + public bomLifecycleSize: BomLifecycleSize = this.userSettings.getSize(UserSettingView.OTHER_PARTS); - public ngOnDestroy(): void { - this.otherPartsFacade.unsubscribeParts(); - } + public ngOnDestroy(): void { + this.otherPartsFacade.unsubscribeParts(); + } - triggerPartSearch() { + triggerPartSearch() { - this.resetFilterAndShowToast(); + this.resetFilterAndShowToast(); - const searchValue = this.searchFormGroup.get('partSearch').value; + const searchValue = this.searchFormGroup.get('partSearch').value; - for (const supplierPartsComponent of this.supplierPartsComponents) { - supplierPartsComponent.updateSupplierParts(searchValue); - } - for (const customerPartsComponent of this.customerPartsComponents) { - customerPartsComponent.updateCustomerParts(searchValue); + for (const supplierPartsComponent of this.supplierPartsComponents) { + supplierPartsComponent.updateSupplierParts(searchValue); + } + for (const customerPartsComponent of this.customerPartsComponents) { + customerPartsComponent.updateCustomerParts(searchValue); + } } - } - - - private resetFilterAndShowToast() { - let oneFilterSet = false; - - for (const supplierPartsComponent of this.supplierPartsComponents) { - for (const partsTableComponent of supplierPartsComponent.partsTableComponents) { - for (const multiSelectAutocompleteComponent of partsTableComponent.multiSelectAutocompleteComponents) { - multiSelectAutocompleteComponent.theSearchElement = null; - multiSelectAutocompleteComponent.clickClear(); - multiSelectAutocompleteComponent.formControl.reset(); - if (partsTableComponent.filterFormGroup.dirty && !oneFilterSet) { - this.toastService.info("parts.input.global-search.toastInfo"); - oneFilterSet = true; - } + + + private resetFilterAndShowToast() { + let oneFilterSet = false; + + for (const supplierPartsComponent of this.supplierPartsComponents) { + for (const partsTableComponent of supplierPartsComponent.partsTableComponents) { + for (const multiSelectAutocompleteComponent of partsTableComponent.multiSelectAutocompleteComponents) { + multiSelectAutocompleteComponent.theSearchElement = null; + multiSelectAutocompleteComponent.clickClear(); + multiSelectAutocompleteComponent.formControl.reset(); + if (partsTableComponent.filterFormGroup.dirty && !oneFilterSet) { + this.toastService.info("parts.input.global-search.toastInfo"); + oneFilterSet = true; + } + } + } + } + + for (const customerPartsComponent of this.customerPartsComponents) { + for (const partsTableComponent of customerPartsComponent.partsTableComponents) { + for (const multiSelectAutocompleteComponent of partsTableComponent.multiSelectAutocompleteComponents) { + multiSelectAutocompleteComponent.theSearchElement = null; + multiSelectAutocompleteComponent.clickClear(); + multiSelectAutocompleteComponent.formControl.reset(); + if (partsTableComponent.filterFormGroup.dirty && !oneFilterSet) { + this.toastService.info("parts.input.global-search.toastInfo"); + } + } + } } - } } - for (const customerPartsComponent of this.customerPartsComponents) { - for (const partsTableComponent of customerPartsComponent.partsTableComponents) { - for (const multiSelectAutocompleteComponent of partsTableComponent.multiSelectAutocompleteComponents) { - multiSelectAutocompleteComponent.theSearchElement = null; - multiSelectAutocompleteComponent.clickClear(); - multiSelectAutocompleteComponent.formControl.reset(); - if (partsTableComponent.filterFormGroup.dirty) { - this.toastService.info("parts.input.global-search.toastInfo"); - } - } - } - } - - } - - public onTabChange({ index }: MatTabChangeEvent): void { - this.selectedTab = index; - this.partDetailsFacade.selectedPart = null; - } - - public handleTableActivationEvent(bomLifecycleSize: BomLifecycleSize) { - this.bomLifecycleSize = bomLifecycleSize; - } - - protected readonly MainAspectType = MainAspectType; - protected readonly UserSettingView = UserSettingView; + public onTabChange({index}: MatTabChangeEvent): void { + this.selectedTab = index; + this.partDetailsFacade.selectedPart = null; + } + + public handleTableActivationEvent(bomLifecycleSize: BomLifecycleSize) { + this.bomLifecycleSize = bomLifecycleSize; + } + + protected readonly MainAspectType = MainAspectType; + protected readonly UserSettingView = UserSettingView; } From a0360d65831d07170613ada83fcb9375f614e1f4 Mon Sep 17 00:00:00 2001 From: ds-lcapellino Date: Tue, 10 Oct 2023 15:19:50 +0200 Subject: [PATCH 28/39] feature: TRACEFOSS-1439 update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d6597b95ec..1809d48996 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - new submodelserver related API endpoints for data provisioning /api/submodel/data/{id} - Added global search field to other parts - Added possiblity to provide multiple semanticDataModels in filter +- Added test dependencies to dash ip check ### Changed - updated IRS helm chart from 6.6.1 to 6.7.2 From e61f873d8474256ceeea5753c2692505dab4e12c Mon Sep 17 00:00:00 2001 From: Maximilian Wesener Date: Tue, 10 Oct 2023 16:53:06 +0200 Subject: [PATCH 29/39] feature: TRACEFOSS-2512 fix test coverage --- .../other-parts.component.spec.ts | 30 ++++++++++++++ .../presentation/other-parts.component.ts | 39 ++++++++----------- 2 files changed, 47 insertions(+), 22 deletions(-) diff --git a/frontend/src/app/modules/page/other-parts/presentation/other-parts.component.spec.ts b/frontend/src/app/modules/page/other-parts/presentation/other-parts.component.spec.ts index a3f42ca025..614bb3b3f0 100644 --- a/frontend/src/app/modules/page/other-parts/presentation/other-parts.component.spec.ts +++ b/frontend/src/app/modules/page/other-parts/presentation/other-parts.component.spec.ts @@ -196,6 +196,36 @@ describe('Other Parts', () => { expect(updateCustomerPartsSpy).toHaveBeenCalledWith(searchValue); }); + it('should trigger part search and reset filter', async () => { + const { fixture } = await renderOtherParts(); + const { componentInstance } = fixture; + const searchValue = 'testSearchValue'; + + + const updateSupplierPartsSpy = spyOn( + SupplierPartsComponent.prototype, + 'updateSupplierParts', + ); + + const updateCustomerPartsSpy = spyOn( + CustomerPartsComponent.prototype, + 'updateCustomerParts', + ); + + componentInstance.searchControl.setValue(searchValue); + + // Spy on the private method without calling it directly + const resetFilterAndShowToastSpy = spyOn(componentInstance, 'resetFilterAndShowToast'); + + // Act + componentInstance.triggerPartSearch(); + + // Assert + expect(updateSupplierPartsSpy).toHaveBeenCalledWith('testSearchValue'); + expect(updateCustomerPartsSpy).toHaveBeenCalledWith('testSearchValue'); + expect(resetFilterAndShowToastSpy).toHaveBeenCalledOnceWith(); + + }); }); }); diff --git a/frontend/src/app/modules/page/other-parts/presentation/other-parts.component.ts b/frontend/src/app/modules/page/other-parts/presentation/other-parts.component.ts index 9758746d7f..bc4622dc31 100644 --- a/frontend/src/app/modules/page/other-parts/presentation/other-parts.component.ts +++ b/frontend/src/app/modules/page/other-parts/presentation/other-parts.component.ts @@ -89,34 +89,29 @@ export class OtherPartsComponent implements OnDestroy, OnInit { private resetFilterAndShowToast() { let oneFilterSet = false; - for (const supplierPartsComponent of this.supplierPartsComponents) { - for (const partsTableComponent of supplierPartsComponent.partsTableComponents) { - for (const multiSelectAutocompleteComponent of partsTableComponent.multiSelectAutocompleteComponents) { - multiSelectAutocompleteComponent.theSearchElement = null; - multiSelectAutocompleteComponent.clickClear(); - multiSelectAutocompleteComponent.formControl.reset(); - if (partsTableComponent.filterFormGroup.dirty && !oneFilterSet) { - this.toastService.info("parts.input.global-search.toastInfo"); - oneFilterSet = true; + const resetComponents = ( + components: QueryList | QueryList + ) => { + for (const component of components) { + for (const partsTableComponent of component.partsTableComponents) { + for (const multiSelectAutocompleteComponent of partsTableComponent.multiSelectAutocompleteComponents) { + multiSelectAutocompleteComponent.theSearchElement = null; + multiSelectAutocompleteComponent.clickClear(); + multiSelectAutocompleteComponent.formControl.reset(); + if (partsTableComponent.filterFormGroup.dirty && !oneFilterSet) { + this.toastService.info("parts.input.global-search.toastInfo"); + oneFilterSet = true; + } } } } - } + }; - for (const customerPartsComponent of this.customerPartsComponents) { - for (const partsTableComponent of customerPartsComponent.partsTableComponents) { - for (const multiSelectAutocompleteComponent of partsTableComponent.multiSelectAutocompleteComponents) { - multiSelectAutocompleteComponent.theSearchElement = null; - multiSelectAutocompleteComponent.clickClear(); - multiSelectAutocompleteComponent.formControl.reset(); - if (partsTableComponent.filterFormGroup.dirty && !oneFilterSet) { - this.toastService.info("parts.input.global-search.toastInfo"); - } - } - } - } + resetComponents(this.supplierPartsComponents); + resetComponents(this.customerPartsComponents); } + public onTabChange({index}: MatTabChangeEvent): void { this.selectedTab = index; this.partDetailsFacade.selectedPart = null; From 8cbf174e7aa75cad2753618f9ce4964bf2be1d09 Mon Sep 17 00:00:00 2001 From: Maximilian Wesener Date: Tue, 10 Oct 2023 17:01:50 +0200 Subject: [PATCH 30/39] feature: TRACEFOSS-2512 fix styling --- .../multi-select-autocomplete.component.ts | 4 ++-- .../parts-table/parts-table.component.scss | 18 --------------- .../parts-table/parts-table.component.ts | 3 +-- .../shared/components/unscoped-styles.scss | 22 +++++++++++++++++++ 4 files changed, 25 insertions(+), 22 deletions(-) diff --git a/frontend/src/app/modules/shared/components/multi-select-autocomplete/multi-select-autocomplete.component.ts b/frontend/src/app/modules/shared/components/multi-select-autocomplete/multi-select-autocomplete.component.ts index 1a46799a2c..614bc937e1 100644 --- a/frontend/src/app/modules/shared/components/multi-select-autocomplete/multi-select-autocomplete.component.ts +++ b/frontend/src/app/modules/shared/components/multi-select-autocomplete/multi-select-autocomplete.component.ts @@ -68,7 +68,7 @@ export class MultiSelectAutocompleteComponent implements OnChanges { selectAllChecked = false; displayString = ''; - shouldHideTextSearchOptionField():boolean{ + shouldHideTextSearchOptionField(): boolean { return !this.textSearch || this.textSearch && (this.theSearchElement === null || this.theSearchElement === ''); } @@ -145,7 +145,7 @@ export class MultiSelectAutocompleteComponent implements OnChanges { } - resetFilter(): void{ + resetFilter(): void { this.searchInput.value = ''; } diff --git a/frontend/src/app/modules/shared/components/parts-table/parts-table.component.scss b/frontend/src/app/modules/shared/components/parts-table/parts-table.component.scss index 79e1c1c339..58dad51103 100644 --- a/frontend/src/app/modules/shared/components/parts-table/parts-table.component.scss +++ b/frontend/src/app/modules/shared/components/parts-table/parts-table.component.scss @@ -21,25 +21,7 @@ table { @apply font-light; } -/* Remove grey background of filter selection */ -.mdc-text-field--filled:not(.mdc-text-field--disabled) { - background-color: unset !important; -} - -/* Empty block below multi select */ -.mat-mdc-form-field-subscript-wrapper { - display: none; -} -/* Remove border*/ -.mdc-line-ripple::before { - border-bottom-width: 0 !important; -} - -.mdc-line-ripple::after { - border-bottom-width: 0 !important; - -} .table--select-all { display: inline-flex; diff --git a/frontend/src/app/modules/shared/components/parts-table/parts-table.component.ts b/frontend/src/app/modules/shared/components/parts-table/parts-table.component.ts index 5ecdbeb087..e673875568 100644 --- a/frontend/src/app/modules/shared/components/parts-table/parts-table.component.ts +++ b/frontend/src/app/modules/shared/components/parts-table/parts-table.component.ts @@ -52,8 +52,7 @@ import {addSelectedValues, removeSelectedValues} from '@shared/helper/table-help @Component({ selector: 'app-parts-table', templateUrl: './parts-table.component.html', - styleUrls: ['parts-table.component.scss'], - encapsulation: ViewEncapsulation.None, + styleUrls: ['parts-table.component.scss'] }) export class PartsTableComponent implements OnInit { @ViewChild(MatSort) sort: MatSort; diff --git a/frontend/src/app/modules/shared/components/unscoped-styles.scss b/frontend/src/app/modules/shared/components/unscoped-styles.scss index 6e286c422c..603aeeab33 100644 --- a/frontend/src/app/modules/shared/components/unscoped-styles.scss +++ b/frontend/src/app/modules/shared/components/unscoped-styles.scss @@ -25,3 +25,25 @@ ::before { border-style: unset; } + +app-multiselect{ + /* Remove border*/ + .mdc-line-ripple::before { + border-bottom-width: 0 !important; + } + + .mdc-line-ripple::after { + border-bottom-width: 0 !important; + + } + + /* Remove grey background of filter selection */ + .mdc-text-field--filled:not(.mdc-text-field--disabled) { + background-color: unset !important; + } + + /* Empty block below multi select */ + .mat-mdc-form-field-subscript-wrapper { + display: none; + } +} From 5be4bd2069650faafc5c09a660947a3238c231be Mon Sep 17 00:00:00 2001 From: Maximilian Wesener Date: Wed, 11 Oct 2023 08:01:32 +0200 Subject: [PATCH 31/39] feature: TRACEFOSS-2512 refactored to avoid duplicates --- .../presentation/other-parts.component.ts | 16 ++--- .../page/parts/core/parts.helper.spec.ts | 72 +++++++++++++++++++ .../modules/page/parts/core/parts.helper.ts | 16 +++++ .../parts/presentation/parts.component.ts | 13 ++-- 4 files changed, 97 insertions(+), 20 deletions(-) create mode 100644 frontend/src/app/modules/page/parts/core/parts.helper.spec.ts diff --git a/frontend/src/app/modules/page/other-parts/presentation/other-parts.component.ts b/frontend/src/app/modules/page/other-parts/presentation/other-parts.component.ts index bc4622dc31..e3595ae297 100644 --- a/frontend/src/app/modules/page/other-parts/presentation/other-parts.component.ts +++ b/frontend/src/app/modules/page/other-parts/presentation/other-parts.component.ts @@ -31,6 +31,7 @@ import {ToastService} from '@shared/components/toasts/toast.service'; import {PartDetailsFacade} from '@shared/modules/part-details/core/partDetails.facade'; import {BomLifecycleSettingsService, UserSettingView} from '@shared/service/bom-lifecycle-settings.service'; import {StaticIdService} from '@shared/service/staticId.service'; +import {resetMultiSelectionAutoCompleteComponent} from "@page/parts/core/parts.helper"; @Component({ selector: 'app-other-parts', @@ -93,17 +94,10 @@ export class OtherPartsComponent implements OnDestroy, OnInit { components: QueryList | QueryList ) => { for (const component of components) { - for (const partsTableComponent of component.partsTableComponents) { - for (const multiSelectAutocompleteComponent of partsTableComponent.multiSelectAutocompleteComponents) { - multiSelectAutocompleteComponent.theSearchElement = null; - multiSelectAutocompleteComponent.clickClear(); - multiSelectAutocompleteComponent.formControl.reset(); - if (partsTableComponent.filterFormGroup.dirty && !oneFilterSet) { - this.toastService.info("parts.input.global-search.toastInfo"); - oneFilterSet = true; - } - } - } + let filterIsSet = resetMultiSelectionAutoCompleteComponent(component.partsTableComponents, oneFilterSet); + if (filterIsSet){ + this.toastService.info("parts.input.global-search.toastInfo"); + } } }; diff --git a/frontend/src/app/modules/page/parts/core/parts.helper.spec.ts b/frontend/src/app/modules/page/parts/core/parts.helper.spec.ts new file mode 100644 index 0000000000..abbea6efec --- /dev/null +++ b/frontend/src/app/modules/page/parts/core/parts.helper.spec.ts @@ -0,0 +1,72 @@ +/******************************************************************************** + * Copyright (c) 2023 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ + +import {PartsTableComponent} from '@shared/components/parts-table/parts-table.component'; +import {resetMultiSelectionAutoCompleteComponent} from "@page/parts/core/parts.helper"; +import {QueryList} from "@angular/core"; + +describe('resetMultiSelectionAutoCompleteComponent', () => { + it('should reset multiSelectAutocompleteComponents and set oneFilterSet to true if filterFormGroup is dirty', () => { + // Arrange + + const mockQueryList = (items: T[]): QueryList => { + const queryList = new QueryList(); + queryList.reset(items); + return queryList; + }; + + const multiSelectAutoCompleteComponents = [ + { + theSearchElement: 'test', + clickClear: jasmine.createSpy('clickClear'), + formControl: {reset: jasmine.createSpy('reset')}, + + }] + const queryListMultiSelect = mockQueryList(multiSelectAutoCompleteComponents); + + const partsTableComponents: PartsTableComponent[] = [ + { + // @ts-ignore + multiSelectAutocompleteComponents: queryListMultiSelect, + // @ts-ignore + filterFormGroup: { + dirty: true, + }, + }, + ]; + + const partsTableComponentsQueryList = mockQueryList(partsTableComponents); + + let oneFilterSet = false; + + // Act + oneFilterSet = resetMultiSelectionAutoCompleteComponent(partsTableComponentsQueryList, oneFilterSet); + + // Assert + expect(oneFilterSet).toBe(true); + + partsTableComponents.forEach((partsTableComponent) => { + partsTableComponent.multiSelectAutocompleteComponents.forEach((multiSelectAutocompleteComponent) => { + expect(multiSelectAutocompleteComponent.theSearchElement).toBeNull(); + expect(multiSelectAutocompleteComponent.clickClear).toHaveBeenCalled(); + expect(multiSelectAutocompleteComponent.formControl.reset).toHaveBeenCalled(); + }); + }); + }); +}); diff --git a/frontend/src/app/modules/page/parts/core/parts.helper.ts b/frontend/src/app/modules/page/parts/core/parts.helper.ts index 5683e8f247..b91ac2996c 100644 --- a/frontend/src/app/modules/page/parts/core/parts.helper.ts +++ b/frontend/src/app/modules/page/parts/core/parts.helper.ts @@ -17,3 +17,19 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ +import {QueryList} from "@angular/core"; +import {PartsTableComponent} from "@shared/components/parts-table/parts-table.component"; + +export function resetMultiSelectionAutoCompleteComponent(partsTableComponents: QueryList, oneFilterSet: boolean): boolean { + for (const partsTableComponent of partsTableComponents) { + for (const multiSelectAutocompleteComponent of partsTableComponent.multiSelectAutocompleteComponents) { + multiSelectAutocompleteComponent.theSearchElement = null; + multiSelectAutocompleteComponent.clickClear(); + multiSelectAutocompleteComponent.formControl.reset(); + if (partsTableComponent.filterFormGroup.dirty && !oneFilterSet) { + oneFilterSet = true; + } + } + } + return oneFilterSet; +} diff --git a/frontend/src/app/modules/page/parts/presentation/parts.component.ts b/frontend/src/app/modules/page/parts/presentation/parts.component.ts index 2ea00393bb..6dac6fc3bb 100644 --- a/frontend/src/app/modules/page/parts/presentation/parts.component.ts +++ b/frontend/src/app/modules/page/parts/presentation/parts.component.ts @@ -35,6 +35,7 @@ import {toAssetFilter, toGlobalSearchAssetFilter} from "@shared/helper/filter-he import {FormControl, FormGroup} from "@angular/forms"; import {ToastService} from "@shared/components/toasts/toast.service"; import {PartsTableComponent} from "@shared/components/parts-table/parts-table.component"; +import {resetMultiSelectionAutoCompleteComponent} from "@page/parts/core/parts.helper"; @Component({ @@ -122,15 +123,9 @@ export class PartsComponent implements OnInit, OnDestroy, AfterViewInit { private resetFilterAndShowToast() { - for (const partTableComponent of this.partsTableComponents) { - for (const multiSelectAutocompleteComponent of partTableComponent.multiSelectAutocompleteComponents) { - multiSelectAutocompleteComponent.theSearchElement = null; - multiSelectAutocompleteComponent.clickClear(); - multiSelectAutocompleteComponent.formControl.reset(); - if (partTableComponent.filterFormGroup.dirty) { - this.toastService.info("parts.input.global-search.toastInfo"); - } - } + let filterIsSet = resetMultiSelectionAutoCompleteComponent(this.partsTableComponents, false); + if (filterIsSet) { + this.toastService.info("parts.input.global-search.toastInfo"); } } From f3342a1427d79edb88e58581c9226fd476dfc733 Mon Sep 17 00:00:00 2001 From: Maximilian Wesener Date: Wed, 11 Oct 2023 08:13:47 +0200 Subject: [PATCH 32/39] feature: TRACEFOSS-2512 fixed styling of filter menu --- .../components/parts-table/parts-table.component.scss | 3 --- .../components/parts-table/parts-table.component.ts | 1 - .../app/modules/shared/components/unscoped-styles.scss | 8 +++++++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/frontend/src/app/modules/shared/components/parts-table/parts-table.component.scss b/frontend/src/app/modules/shared/components/parts-table/parts-table.component.scss index 58dad51103..787d67e95c 100644 --- a/frontend/src/app/modules/shared/components/parts-table/parts-table.component.scss +++ b/frontend/src/app/modules/shared/components/parts-table/parts-table.component.scss @@ -63,9 +63,6 @@ table { outline: 1px solid currentColor; } -.cdk-overlay-pane { - width: unset !important; -} .table--no-data { display: flex; diff --git a/frontend/src/app/modules/shared/components/parts-table/parts-table.component.ts b/frontend/src/app/modules/shared/components/parts-table/parts-table.component.ts index e673875568..0a28991785 100644 --- a/frontend/src/app/modules/shared/components/parts-table/parts-table.component.ts +++ b/frontend/src/app/modules/shared/components/parts-table/parts-table.component.ts @@ -28,7 +28,6 @@ import { QueryList, ViewChild, ViewChildren, - ViewEncapsulation, } from '@angular/core'; import {FormControl, FormGroup} from '@angular/forms'; import {MatPaginator, PageEvent} from '@angular/material/paginator'; diff --git a/frontend/src/app/modules/shared/components/unscoped-styles.scss b/frontend/src/app/modules/shared/components/unscoped-styles.scss index 603aeeab33..40d2905731 100644 --- a/frontend/src/app/modules/shared/components/unscoped-styles.scss +++ b/frontend/src/app/modules/shared/components/unscoped-styles.scss @@ -26,7 +26,13 @@ border-style: unset; } -app-multiselect{ +/* Sets the opened local filter to be full width*/ +.cdk-overlay-pane { + width: unset !important; +} + +app-multiselect { + /* Remove border*/ .mdc-line-ripple::before { border-bottom-width: 0 !important; From 0e39ea90690ea082a7605df160306b24c76c6a9d Mon Sep 17 00:00:00 2001 From: ds-mwesener Date: Wed, 11 Oct 2023 06:29:26 +0000 Subject: [PATCH 33/39] Update Dependencies Backend Action --- DEPENDENCIES_FRONTEND | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPENDENCIES_FRONTEND b/DEPENDENCIES_FRONTEND index 0a768061f8..6bcdae5c2f 100644 --- a/DEPENDENCIES_FRONTEND +++ b/DEPENDENCIES_FRONTEND @@ -16,7 +16,7 @@ npm/npmjs/-/ajv/6.12.6, MIT, approved, #979 npm/npmjs/-/ajv/8.11.0, MIT, approved, #4969 npm/npmjs/-/ajv/8.12.0, MIT AND OFL-1.1 AND (EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0), approved, #6025 npm/npmjs/-/angular-i18next/15.0.5, MIT, approved, clearlydefined -npm/npmjs/-/angular-split/15.0.0, , restricted, clearlydefined +npm/npmjs/-/angular-split/15.0.0, Apache-2.0, approved, clearlydefined npm/npmjs/-/ansi-colors/4.1.3, MIT, approved, clearlydefined npm/npmjs/-/ansi-escapes/4.3.2, MIT, approved, clearlydefined npm/npmjs/-/ansi-html-community/0.0.8, Apache-2.0, approved, clearlydefined From 25e2b4915cdc578e4833680155918c0784d9b0de Mon Sep 17 00:00:00 2001 From: ds-lcapellino Date: Wed, 11 Oct 2023 06:59:36 +0000 Subject: [PATCH 34/39] Update Dependencies Backend Action --- DEPENDENCIES_FRONTEND | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPENDENCIES_FRONTEND b/DEPENDENCIES_FRONTEND index 6bcdae5c2f..4ca953dfc0 100644 --- a/DEPENDENCIES_FRONTEND +++ b/DEPENDENCIES_FRONTEND @@ -1517,7 +1517,7 @@ npm/npmjs/@types/send/0.17.1, MIT, approved, #10832 npm/npmjs/@types/serve-index/1.9.1, MIT, approved, #10976 npm/npmjs/@types/serve-static/1.15.1, MIT, approved, #9188 npm/npmjs/@types/set-cookie-parser/2.4.2, MIT, approved, clearlydefined -npm/npmjs/@types/sinonjs__fake-timers/8.1.1, MIT, approved, clearlydefined +npm/npmjs/@types/sinonjs__fake-timers/8.1.1, MIT, approved, #11000 npm/npmjs/@types/sizzle/2.3.3, MIT, approved, clearlydefined npm/npmjs/@types/sockjs/0.3.33, MIT, approved, #10984 npm/npmjs/@types/testing-library__jasmine-dom/1.3.0, MIT, approved, clearlydefined From a96fc988089813d2d221912e50a2d30f82f5d00c Mon Sep 17 00:00:00 2001 From: ds-mwesener Date: Wed, 11 Oct 2023 10:56:46 +0000 Subject: [PATCH 35/39] Update Dependencies Backend Action --- DEPENDENCIES_BACKEND | 180 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 180 insertions(+) diff --git a/DEPENDENCIES_BACKEND b/DEPENDENCIES_BACKEND index 0f9cf5bc85..45aa15e459 100644 --- a/DEPENDENCIES_BACKEND +++ b/DEPENDENCIES_BACKEND @@ -14,24 +14,54 @@ maven/mavencentral/com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/2.15 maven/mavencentral/com.fasterxml.jackson.datatype/jackson-datatype-jakarta-jsonp/2.15.2, Apache-2.0, approved, #9179 maven/mavencentral/com.fasterxml.jackson.datatype/jackson-datatype-jdk8/2.15.2, Apache-2.0, approved, #8808 maven/mavencentral/com.fasterxml.jackson.datatype/jackson-datatype-jsr310/2.15.2, Apache-2.0, approved, #7930 +maven/mavencentral/com.fasterxml.jackson.module/jackson-module-jakarta-xmlbind-annotations/2.14.1, Apache-2.0, approved, #5308 +maven/mavencentral/com.fasterxml.jackson.module/jackson-module-jakarta-xmlbind-annotations/2.15.2, Apache-2.0, approved, #9241 maven/mavencentral/com.fasterxml.jackson.module/jackson-module-parameter-names/2.15.2, Apache-2.0, approved, #8803 maven/mavencentral/com.fasterxml/classmate/1.5.1, Apache-2.0, approved, clearlydefined +maven/mavencentral/com.github.docker-java/docker-java-api/3.3.0, Apache-2.0, approved, #10346 +maven/mavencentral/com.github.docker-java/docker-java-transport-zerodep/3.3.0, Apache-2.0 AND (Apache-2.0 AND BSD-3-Clause), approved, #7946 +maven/mavencentral/com.github.docker-java/docker-java-transport/3.3.0, Apache-2.0, approved, #7942 maven/mavencentral/com.github.scribejava/scribejava-core/8.3.3, MIT, approved, #4703 maven/mavencentral/com.github.scribejava/scribejava-java8/8.3.3, MIT, approved, #4706 maven/mavencentral/com.github.stephenc.jcip/jcip-annotations/1.0-1, Apache-2.0, approved, CQ21949 maven/mavencentral/com.google.code.findbugs/jsr305/3.0.2, Apache-2.0, approved, #20 +maven/mavencentral/com.jayway.jsonpath/json-path/2.8.0, Apache-2.0, approved, clearlydefined maven/mavencentral/com.nimbusds/content-type/2.2, Apache-2.0, approved, clearlydefined maven/mavencentral/com.nimbusds/lang-tag/1.7, Apache-2.0, approved, clearlydefined maven/mavencentral/com.nimbusds/nimbus-jose-jwt/9.31, Apache-2.0, approved, clearlydefined maven/mavencentral/com.nimbusds/oauth2-oidc-sdk/9.43.3, Apache-2.0, approved, clearlydefined +maven/mavencentral/com.squareup.okhttp3/okhttp-dnsoverhttps/4.10.0, Apache-2.0, approved, clearlydefined +maven/mavencentral/com.squareup.okhttp3/okhttp-dnsoverhttps/4.11.0, Apache-2.0, approved, clearlydefined maven/mavencentral/com.squareup.okhttp3/okhttp/4.10.0, Apache-2.0 AND MPL-2.0, approved, #3057 maven/mavencentral/com.squareup.okio/okio-jvm/3.0.0, Apache-2.0, approved, clearlydefined +maven/mavencentral/com.sun.istack/istack-commons-runtime/4.1.1, BSD-3-Clause, approved, #2590 +maven/mavencentral/com.sun.istack/istack-commons-runtime/4.1.2, BSD-3-Clause, approved, #2590 +maven/mavencentral/com.tngtech.archunit/archunit/1.1.0, , restricted, clearlydefined +maven/mavencentral/com.vaadin.external.google/android-json/0.0.20131108.vaadin1, Apache-2.0, approved, CQ21310 +maven/mavencentral/com.xebialabs.restito/restito/1.1.0, MIT, approved, clearlydefined maven/mavencentral/com.zaxxer/HikariCP/5.0.1, Apache-2.0, approved, clearlydefined +maven/mavencentral/commons-codec/commons-codec/1.11, Apache-2.0 AND BSD-3-Clause, approved, CQ15971 +maven/mavencentral/commons-codec/commons-codec/1.15, Apache-2.0 AND BSD-3-Clause AND LicenseRef-Public-Domain, approved, CQ22641 maven/mavencentral/commons-fileupload/commons-fileupload/1.5, Apache-2.0, approved, #7109 maven/mavencentral/commons-io/commons-io/2.13.0, Apache-2.0, approved, #8717 maven/mavencentral/commons-logging/commons-logging/1.2, Apache-2.0, approved, CQ10162 maven/mavencentral/dev.failsafe/failsafe-okhttp/3.3.2, Apache-2.0, approved, #9178 maven/mavencentral/dev.failsafe/failsafe/3.3.2, Apache-2.0, approved, #9268 +maven/mavencentral/io.cucumber/ci-environment/9.2.0, MIT, approved, clearlydefined +maven/mavencentral/io.cucumber/cucumber-core/7.12.1, MIT, restricted, clearlydefined +maven/mavencentral/io.cucumber/cucumber-expressions/16.1.2, MIT, approved, clearlydefined +maven/mavencentral/io.cucumber/cucumber-gherkin-messages/7.12.1, , restricted, clearlydefined +maven/mavencentral/io.cucumber/cucumber-gherkin/7.12.1, MIT, approved, clearlydefined +maven/mavencentral/io.cucumber/cucumber-java/7.12.1, MIT, approved, clearlydefined +maven/mavencentral/io.cucumber/cucumber-junit-platform-engine/7.12.1, , restricted, clearlydefined +maven/mavencentral/io.cucumber/cucumber-plugin/7.12.1, MIT, approved, clearlydefined +maven/mavencentral/io.cucumber/datatable/7.12.1, MIT, restricted, clearlydefined +maven/mavencentral/io.cucumber/docstring/7.12.1, MIT, approved, clearlydefined +maven/mavencentral/io.cucumber/gherkin/26.2.0, MIT, approved, clearlydefined +maven/mavencentral/io.cucumber/html-formatter/20.3.1, MIT, approved, clearlydefined +maven/mavencentral/io.cucumber/junit-xml-formatter/0.2.0, , restricted, clearlydefined +maven/mavencentral/io.cucumber/messages/22.0.0, MIT, approved, clearlydefined +maven/mavencentral/io.cucumber/tag-expressions/5.0.1, MIT, approved, clearlydefined maven/mavencentral/io.github.classgraph/classgraph/4.8.149, MIT, approved, CQ22530 maven/mavencentral/io.github.openfeign.form/feign-form-spring/3.8.0, Apache-2.0, approved, clearlydefined maven/mavencentral/io.github.openfeign.form/feign-form/3.8.0, Apache-2.0, approved, clearlydefined @@ -45,6 +75,8 @@ maven/mavencentral/io.github.resilience4j/resilience4j-bulkhead/2.0.2, Apache-2. maven/mavencentral/io.github.resilience4j/resilience4j-bulkhead/2.1.0, Apache-2.0, approved, #10172 maven/mavencentral/io.github.resilience4j/resilience4j-circuitbreaker/2.0.2, Apache-2.0, approved, clearlydefined maven/mavencentral/io.github.resilience4j/resilience4j-circuitbreaker/2.1.0, Apache-2.0, approved, #10170 +maven/mavencentral/io.github.resilience4j/resilience4j-circularbuffer/2.0.2, Apache-2.0, approved, clearlydefined +maven/mavencentral/io.github.resilience4j/resilience4j-circularbuffer/2.1.0, Apache-2.0, approved, clearlydefined maven/mavencentral/io.github.resilience4j/resilience4j-consumer/2.0.2, Apache-2.0, approved, clearlydefined maven/mavencentral/io.github.resilience4j/resilience4j-consumer/2.1.0, Apache-2.0, approved, #10165 maven/mavencentral/io.github.resilience4j/resilience4j-core/2.0.2, Apache-2.0, approved, clearlydefined @@ -52,6 +84,8 @@ maven/mavencentral/io.github.resilience4j/resilience4j-core/2.1.0, Apache-2.0, a maven/mavencentral/io.github.resilience4j/resilience4j-feign/2.1.0, Apache-2.0, approved, clearlydefined maven/mavencentral/io.github.resilience4j/resilience4j-framework-common/2.0.2, Apache-2.0, approved, clearlydefined maven/mavencentral/io.github.resilience4j/resilience4j-framework-common/2.1.0, Apache-2.0, approved, clearlydefined +maven/mavencentral/io.github.resilience4j/resilience4j-micrometer/2.0.2, Apache-2.0, approved, clearlydefined +maven/mavencentral/io.github.resilience4j/resilience4j-micrometer/2.1.0, Apache-2.0, approved, #10916 maven/mavencentral/io.github.resilience4j/resilience4j-ratelimiter/2.0.2, Apache-2.0, approved, clearlydefined maven/mavencentral/io.github.resilience4j/resilience4j-ratelimiter/2.1.0, Apache-2.0, approved, #10168 maven/mavencentral/io.github.resilience4j/resilience4j-retry/2.1.0, Apache-2.0, approved, clearlydefined @@ -63,6 +97,18 @@ maven/mavencentral/io.github.resilience4j/resilience4j-timelimiter/2.1.0, Apache maven/mavencentral/io.micrometer/micrometer-commons/1.11.3, Apache-2.0 AND (Apache-2.0 AND MIT), approved, #9243 maven/mavencentral/io.micrometer/micrometer-core/1.11.3, Apache-2.0 AND (Apache-2.0 AND MIT), approved, #9238 maven/mavencentral/io.micrometer/micrometer-observation/1.11.3, Apache-2.0, approved, #9242 +maven/mavencentral/io.opentelemetry/opentelemetry-api/1.25.0, Apache-2.0, approved, clearlydefined +maven/mavencentral/io.opentelemetry/opentelemetry-api/1.27.0, Apache-2.0, approved, clearlydefined +maven/mavencentral/io.opentelemetry/opentelemetry-context/1.25.0, Apache-2.0, approved, clearlydefined +maven/mavencentral/io.opentelemetry/opentelemetry-context/1.27.0, Apache-2.0, approved, clearlydefined +maven/mavencentral/io.rest-assured/json-path/5.3.1, Apache-2.0, approved, #9261 +maven/mavencentral/io.rest-assured/json-path/5.3.2, Apache-2.0, approved, #9261 +maven/mavencentral/io.rest-assured/rest-assured-common/5.3.1, Apache-2.0, approved, #9264 +maven/mavencentral/io.rest-assured/rest-assured-common/5.3.2, Apache-2.0, approved, #9264 +maven/mavencentral/io.rest-assured/rest-assured/5.3.2, Apache-2.0, approved, #9262 +maven/mavencentral/io.rest-assured/xml-path/5.3.1, Apache-2.0, approved, #9267 +maven/mavencentral/io.rest-assured/xml-path/5.3.2, Apache-2.0, approved, #9267 +maven/mavencentral/io.smallrye/jandex/3.0.5, Apache-2.0, approved, clearlydefined maven/mavencentral/io.swagger.core.v3/swagger-annotations-jakarta/2.2.8, Apache-2.0, approved, #5947 maven/mavencentral/io.swagger.core.v3/swagger-core-jakarta/2.2.8, Apache-2.0, approved, #5929 maven/mavencentral/io.swagger.core.v3/swagger-models-jakarta/2.2.8, Apache-2.0, approved, #5919 @@ -71,6 +117,7 @@ maven/mavencentral/io.swagger/swagger-annotations/1.6.11, Apache-2.0, approved, maven/mavencentral/jakarta.activation/jakarta.activation-api/2.1.0, EPL-2.0 OR BSD-3-Clause OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jaf maven/mavencentral/jakarta.activation/jakarta.activation-api/2.1.2, EPL-2.0 OR BSD-3-Clause OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jaf maven/mavencentral/jakarta.annotation/jakarta.annotation-api/2.1.1, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.ca +maven/mavencentral/jakarta.inject/jakarta.inject-api/2.0.1, Apache-2.0, approved, clearlydefined maven/mavencentral/jakarta.json/jakarta.json-api/2.1.1, EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0, approved, #7907 maven/mavencentral/jakarta.json/jakarta.json-api/2.1.2, EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0, approved, #7907 maven/mavencentral/jakarta.persistence/jakarta.persistence-api/3.1.0, EPL-2.0 OR BSD-3-Clause AND (EPL-2.0 OR BSD-3-Clause AND BSD-3-Clause), approved, #7696 @@ -78,26 +125,60 @@ maven/mavencentral/jakarta.transaction/jakarta.transaction-api/2.0.1, EPL-2.0 OR maven/mavencentral/jakarta.validation/jakarta.validation-api/3.0.2, Apache-2.0, approved, ee4j.validation maven/mavencentral/jakarta.ws.rs/jakarta.ws.rs-api/3.1.0, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.rest maven/mavencentral/jakarta.xml.bind/jakarta.xml.bind-api/4.0.0, BSD-3-Clause, approved, ee4j.jaxb +maven/mavencentral/junit/junit/4.13.2, EPL-2.0, approved, CQ23636 +maven/mavencentral/net.bytebuddy/byte-buddy-agent/1.14.6, Apache-2.0, approved, #7164 +maven/mavencentral/net.bytebuddy/byte-buddy/1.12.21, Apache-2.0 AND BSD-3-Clause, approved, #1811 +maven/mavencentral/net.bytebuddy/byte-buddy/1.14.6, Apache-2.0 AND BSD-3-Clause, approved, #7163 +maven/mavencentral/net.java.dev.jna/jna/5.12.1, Apache-2.0 OR LGPL-2.1-or-later, approved, #3217 +maven/mavencentral/net.javacrumbs.json-unit/json-unit-assertj/2.38.0, Apache-2.0, approved, clearlydefined +maven/mavencentral/net.javacrumbs.json-unit/json-unit-core/2.38.0, Apache-2.0, approved, clearlydefined +maven/mavencentral/net.javacrumbs.json-unit/json-unit-json-path/2.38.0, , restricted, clearlydefined maven/mavencentral/net.javacrumbs.shedlock/shedlock-core/5.7.0, Apache-2.0, approved, #10582 maven/mavencentral/net.javacrumbs.shedlock/shedlock-provider-jdbc-template/5.7.0, Apache-2.0, approved, #10584 maven/mavencentral/net.javacrumbs.shedlock/shedlock-spring/5.7.0, Apache-2.0, approved, #10583 +maven/mavencentral/net.minidev/accessors-smart/2.4.11, Apache-2.0, approved, #7515 maven/mavencentral/net.minidev/accessors-smart/2.4.9, Apache-2.0, approved, #7515 maven/mavencentral/net.minidev/json-smart/2.4.10, Apache-2.0, approved, #3288 +maven/mavencentral/net.minidev/json-smart/2.4.11, Apache-2.0, approved, #3288 maven/mavencentral/org.antlr/antlr4-runtime/4.10.1, BSD-3-Clause AND LicenseRef-Public-domain AND MIT AND LicenseRef-Unicode-TOU, approved, #7065 maven/mavencentral/org.apache.commons/commons-collections4/4.4, Apache-2.0, approved, clearlydefined +maven/mavencentral/org.apache.commons/commons-compress/1.23.0, Apache-2.0 AND BSD-3-Clause, approved, #7506 maven/mavencentral/org.apache.commons/commons-lang3/3.11, Apache-2.0, approved, CQ22642 maven/mavencentral/org.apache.commons/commons-lang3/3.12.0, Apache-2.0, approved, clearlydefined maven/mavencentral/org.apache.commons/commons-text/1.10.0, Apache-2.0, approved, clearlydefined +maven/mavencentral/org.apache.groovy/groovy-json/4.0.11, Apache-2.0, approved, #7411 +maven/mavencentral/org.apache.groovy/groovy-json/4.0.14, Apache-2.0, approved, #7411 +maven/mavencentral/org.apache.groovy/groovy-xml/4.0.11, Apache-2.0, approved, #10179 +maven/mavencentral/org.apache.groovy/groovy-xml/4.0.14, Apache-2.0, approved, #10179 +maven/mavencentral/org.apache.groovy/groovy/4.0.11, Apache-2.0 AND BSD-3-Clause AND MIT, approved, #1742 +maven/mavencentral/org.apache.groovy/groovy/4.0.14, Apache-2.0 AND BSD-3-Clause AND MIT, approved, #1742 +maven/mavencentral/org.apache.httpcomponents/httpclient/4.5.13, Apache-2.0 AND LicenseRef-Public-Domain, approved, CQ23527 +maven/mavencentral/org.apache.httpcomponents/httpcore/4.4.13, Apache-2.0, approved, CQ23528 +maven/mavencentral/org.apache.httpcomponents/httpcore/4.4.16, Apache-2.0, approved, CQ23528 +maven/mavencentral/org.apache.httpcomponents/httpmime/4.5.13, Apache-2.0, approved, CQ11718 maven/mavencentral/org.apache.logging.log4j/log4j-api/2.20.0, Apache-2.0, approved, clearlydefined maven/mavencentral/org.apache.logging.log4j/log4j-to-slf4j/2.20.0, Apache-2.0, approved, #8799 +maven/mavencentral/org.apache.mina/mina-core/2.1.6, Apache-2.0, approved, #3289 maven/mavencentral/org.apache.tomcat.embed/tomcat-embed-core/10.1.12, Apache-2.0 AND (EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0) AND (CDDL-1.0 OR GPL-2.0-only WITH Classpath-exception-2.0) AND W3C AND CC0-1.0, approved, #5949 maven/mavencentral/org.apache.tomcat.embed/tomcat-embed-el/10.1.12, Apache-2.0, approved, #6997 maven/mavencentral/org.apache.tomcat.embed/tomcat-embed-websocket/10.1.12, Apache-2.0, approved, #7920 +maven/mavencentral/org.apiguardian/apiguardian-api/1.1.2, Apache-2.0, approved, clearlydefined maven/mavencentral/org.aspectj/aspectjweaver/1.9.20, EPL-1.0, approved, tools.aspectj +maven/mavencentral/org.assertj/assertj-core/3.24.2, Apache-2.0, approved, #6161 maven/mavencentral/org.attoparser/attoparser/2.0.7.RELEASE, Apache-2.0, approved, CQ18900 +maven/mavencentral/org.awaitility/awaitility-proxy/3.0.0, NOASSERTION, restricted, clearlydefined +maven/mavencentral/org.awaitility/awaitility/3.0.0, NOASSERTION, restricted, clearlydefined +maven/mavencentral/org.bitbucket.b_c/jose4j/0.9.3, Apache-2.0, approved, #4707 maven/mavencentral/org.bouncycastle/bcpkix-jdk15on/1.69, MIT, approved, clearlydefined +maven/mavencentral/org.bouncycastle/bcpkix-jdk18on/1.75, MIT, approved, #9166 maven/mavencentral/org.bouncycastle/bcprov-jdk15on/1.69, MIT, approved, clearlydefined +maven/mavencentral/org.bouncycastle/bcprov-jdk18on/1.75, MIT AND CC0-1.0, approved, #9167 maven/mavencentral/org.bouncycastle/bcutil-jdk15on/1.69, MIT, approved, clearlydefined +maven/mavencentral/org.bouncycastle/bcutil-jdk18on/1.75, MIT, approved, #9170 +maven/mavencentral/org.ccil.cowan.tagsoup/tagsoup/1.2.1, Apache-2.0, approved, clearlydefined +maven/mavencentral/org.checkerframework/checker-qual/3.31.0, MIT, approved, clearlydefined +maven/mavencentral/org.eclipse.angus/angus-activation/2.0.0, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.angus +maven/mavencentral/org.eclipse.angus/angus-activation/2.0.1, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.angus maven/mavencentral/org.eclipse.edc/aggregate-service-spi/0.1.3, Apache-2.0, approved, technology.edc maven/mavencentral/org.eclipse.edc/asset-spi/0.1.3, Apache-2.0, approved, technology.edc maven/mavencentral/org.eclipse.edc/catalog-spi/0.1.3, Apache-2.0, approved, technology.edc @@ -126,10 +207,13 @@ maven/mavencentral/org.eclipse.edc/dsp/0.1.3, Apache-2.0, approved, technology.e maven/mavencentral/org.eclipse.edc/http-spi/0.1.3, Apache-2.0, approved, technology.edc maven/mavencentral/org.eclipse.edc/http/0.1.3, Apache-2.0, approved, technology.edc maven/mavencentral/org.eclipse.edc/jersey-core/0.1.3, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/jersey-providers/0.1.3, Apache-2.0, approved, technology.edc maven/mavencentral/org.eclipse.edc/jetty-core/0.1.3, Apache-2.0, approved, technology.edc maven/mavencentral/org.eclipse.edc/json-ld-spi/0.1.3, Apache-2.0, approved, technology.edc maven/mavencentral/org.eclipse.edc/json-ld/0.1.3, Apache-2.0, approved, technology.edc maven/mavencentral/org.eclipse.edc/policy-engine-spi/0.1.3, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/policy-engine/0.1.3, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/policy-evaluator/0.1.3, Apache-2.0, approved, technology.edc maven/mavencentral/org.eclipse.edc/policy-model/0.1.3, Apache-2.0, approved, technology.edc maven/mavencentral/org.eclipse.edc/policy-spi/0.1.3, Apache-2.0, approved, technology.edc maven/mavencentral/org.eclipse.edc/runtime-metamodel/0.1.3, Apache-2.0, approved, technology.edc @@ -138,15 +222,77 @@ maven/mavencentral/org.eclipse.edc/transaction-spi/0.1.3, Apache-2.0, approved, maven/mavencentral/org.eclipse.edc/transfer-data-plane-spi/0.1.3, Apache-2.0, approved, technology.edc maven/mavencentral/org.eclipse.edc/transfer-spi/0.1.3, Apache-2.0, approved, technology.edc maven/mavencentral/org.eclipse.edc/transform-spi/0.1.3, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/util/0.1.3, Apache-2.0, approved, technology.edc maven/mavencentral/org.eclipse.edc/validator-spi/0.1.3, Apache-2.0, approved, technology.edc maven/mavencentral/org.eclipse.edc/web-spi/0.1.3, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.jetty.toolchain/jetty-jakarta-servlet-api/5.0.2, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty.toolchain/jetty-jakarta-websocket-api/2.0.0, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty.websocket/websocket-core-client/11.0.15, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty.websocket/websocket-core-common/11.0.15, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty.websocket/websocket-core-server/11.0.15, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty.websocket/websocket-jakarta-client/11.0.15, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty.websocket/websocket-jakarta-common/11.0.15, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty.websocket/websocket-jakarta-server/11.0.15, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty.websocket/websocket-servlet/11.0.15, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-alpn-client/11.0.15, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-annotations/11.0.15, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-client/11.0.15, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-http/11.0.15, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-io/11.0.15, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-jndi/11.0.15, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-plus/11.0.15, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-security/11.0.15, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-server/11.0.15, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-servlet/11.0.15, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-util/11.0.15, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-webapp/11.0.15, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-xml/11.0.15, EPL-2.0 OR Apache-2.0, approved, rt.jetty maven/mavencentral/org.eclipse.tractusx.irs/irs-registry-client/1.2.1-20231005.130041-12, Apache-2.0, approved, automotive.tractusx maven/mavencentral/org.eclipse.tractusx.traceability/tx-backend/0.0.1-SNAPSHOT, Apache-2.0, approved, automotive.tractusx maven/mavencentral/org.eclipse.tractusx.traceability/tx-models/0.0.1-SNAPSHOT, Apache-2.0, approved, automotive.tractusx maven/mavencentral/org.flywaydb/flyway-core/9.16.3, Apache-2.0, approved, #7935 +maven/mavencentral/org.glassfish.grizzly/grizzly-framework/2.3.25, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.grizzly +maven/mavencentral/org.glassfish.grizzly/grizzly-http-server/2.3.25, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.grizzly +maven/mavencentral/org.glassfish.grizzly/grizzly-http/2.3.25, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.grizzly +maven/mavencentral/org.glassfish.hk2.external/aopalliance-repackaged/3.0.4, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.glassfish +maven/mavencentral/org.glassfish.hk2/hk2-api/3.0.4, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.glassfish +maven/mavencentral/org.glassfish.hk2/hk2-locator/3.0.4, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.glassfish +maven/mavencentral/org.glassfish.hk2/hk2-utils/3.0.4, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.glassfish +maven/mavencentral/org.glassfish.hk2/osgi-resource-locator/1.0.3, CDDL-1.0, approved, CQ10889 +maven/mavencentral/org.glassfish.jaxb/jaxb-core/4.0.2, BSD-3-Clause, approved, ee4j.jaxb +maven/mavencentral/org.glassfish.jaxb/jaxb-core/4.0.3, BSD-3-Clause, approved, ee4j.jaxb +maven/mavencentral/org.glassfish.jaxb/jaxb-runtime/4.0.2, BSD-3-Clause, approved, ee4j.jaxb +maven/mavencentral/org.glassfish.jaxb/jaxb-runtime/4.0.3, BSD-3-Clause, approved, ee4j.jaxb +maven/mavencentral/org.glassfish.jaxb/txw2/4.0.2, BSD-3-Clause, approved, ee4j.jaxb +maven/mavencentral/org.glassfish.jaxb/txw2/4.0.3, BSD-3-Clause, approved, ee4j.jaxb +maven/mavencentral/org.glassfish.jersey.containers/jersey-container-servlet-core/3.1.2, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jersey +maven/mavencentral/org.glassfish.jersey.containers/jersey-container-servlet-core/3.1.3, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jersey +maven/mavencentral/org.glassfish.jersey.containers/jersey-container-servlet/3.1.2, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jersey +maven/mavencentral/org.glassfish.jersey.containers/jersey-container-servlet/3.1.3, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jersey +maven/mavencentral/org.glassfish.jersey.core/jersey-client/3.1.2, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jersey +maven/mavencentral/org.glassfish.jersey.core/jersey-client/3.1.3, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jersey +maven/mavencentral/org.glassfish.jersey.core/jersey-common/3.1.2, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jersey +maven/mavencentral/org.glassfish.jersey.core/jersey-common/3.1.3, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jersey +maven/mavencentral/org.glassfish.jersey.core/jersey-server/3.1.2, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jersey +maven/mavencentral/org.glassfish.jersey.core/jersey-server/3.1.3, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jersey +maven/mavencentral/org.glassfish.jersey.ext/jersey-entity-filtering/3.1.2, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jersey +maven/mavencentral/org.glassfish.jersey.ext/jersey-entity-filtering/3.1.3, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jersey +maven/mavencentral/org.glassfish.jersey.inject/jersey-hk2/3.1.2, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jersey +maven/mavencentral/org.glassfish.jersey.inject/jersey-hk2/3.1.3, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jersey +maven/mavencentral/org.glassfish.jersey.media/jersey-media-json-jackson/3.1.2, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jersey +maven/mavencentral/org.glassfish.jersey.media/jersey-media-json-jackson/3.1.3, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jersey +maven/mavencentral/org.glassfish.jersey.media/jersey-media-multipart/3.1.2, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jersey +maven/mavencentral/org.glassfish.jersey.media/jersey-media-multipart/3.1.3, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jersey maven/mavencentral/org.glassfish/jakarta.json/2.0.1, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jsonp +maven/mavencentral/org.hamcrest/hamcrest-core/2.2, BSD-3-Clause, approved, clearlydefined +maven/mavencentral/org.hamcrest/hamcrest-library/2.2, BSD-3-Clause, approved, CQ22925 +maven/mavencentral/org.hamcrest/hamcrest/2.2, BSD-3-Clause, approved, clearlydefined +maven/mavencentral/org.hdrhistogram/HdrHistogram/2.1.12, BSD-2-Clause OR LicenseRef-Public-Domain, approved, CQ13192 +maven/mavencentral/org.hibernate.common/hibernate-commons-annotations/6.0.6.Final, LGPL-2.1-only, approved, #6962 maven/mavencentral/org.hibernate.orm/hibernate-core/6.2.7.Final, LGPL-2.1-only AND Apache-2.0 AND MIT AND CC-PDDC AND (EPL-2.0 OR BSD-3-Clause), approved, #9121 maven/mavencentral/org.hibernate.validator/hibernate-validator/8.0.1.Final, Apache-2.0, approved, clearlydefined +maven/mavencentral/org.javassist/javassist/3.29.0-GA, Apache-2.0 AND LGPL-2.1-or-later AND MPL-1.1, approved, #6023 +maven/mavencentral/org.javassist/javassist/3.29.2-GA, Apache-2.0 AND LGPL-2.1-or-later AND MPL-1.1, approved, #6023 maven/mavencentral/org.jboss.logging/jboss-logging/3.5.0.Final, Apache-2.0, approved, #9471 maven/mavencentral/org.jboss.logging/jboss-logging/3.5.3.Final, Apache-2.0, approved, #9471 maven/mavencentral/org.jetbrains.kotlin/kotlin-stdlib-common/1.5.31, Apache-2.0, approved, clearlydefined @@ -158,10 +304,33 @@ maven/mavencentral/org.jetbrains.kotlin/kotlin-stdlib-jdk8/1.8.22, Apache-2.0, a maven/mavencentral/org.jetbrains.kotlin/kotlin-stdlib/1.6.20, Apache-2.0, approved, clearlydefined maven/mavencentral/org.jetbrains.kotlin/kotlin-stdlib/1.8.22, Apache-2.0, approved, #8865 maven/mavencentral/org.jetbrains/annotations/24.0.1, Apache-2.0, approved, #7417 +maven/mavencentral/org.junit.jupiter/junit-jupiter-api/5.9.3, EPL-2.0, approved, #3133 +maven/mavencentral/org.junit.jupiter/junit-jupiter-engine/5.9.3, EPL-2.0, approved, #3125 +maven/mavencentral/org.junit.jupiter/junit-jupiter-params/5.9.3, EPL-2.0, approved, #3134 +maven/mavencentral/org.junit.jupiter/junit-jupiter/5.9.3, EPL-2.0, approved, #6972 +maven/mavencentral/org.junit.platform/junit-platform-commons/1.9.3, EPL-2.0, approved, #3130 +maven/mavencentral/org.junit.platform/junit-platform-engine/1.9.3, EPL-2.0, approved, #3128 +maven/mavencentral/org.junit.platform/junit-platform-launcher/1.9.3, EPL-2.0, approved, #3132 +maven/mavencentral/org.junit.platform/junit-platform-suite-api/1.9.3, EPL-2.0, approved, #3136 +maven/mavencentral/org.junit.platform/junit-platform-suite-commons/1.9.3, EPL-2.0, approved, #3131 +maven/mavencentral/org.junit.platform/junit-platform-suite-engine/1.9.3, EPL-2.0, approved, #3135 +maven/mavencentral/org.junit.platform/junit-platform-suite/1.9.3, EPL-2.0, approved, #10175 +maven/mavencentral/org.jvnet.mimepull/mimepull/1.9.15, CDDL-1.1 OR GPL-2.0-only WITH Classpath-exception-2.0, approved, CQ21484 +maven/mavencentral/org.latencyutils/LatencyUtils/2.0.3, BSD-2-Clause, approved, CQ17408 +maven/mavencentral/org.mockito/mockito-core/4.8.1, MIT, approved, clearlydefined +maven/mavencentral/org.mockito/mockito-inline/4.8.1, MIT, approved, #4341 +maven/mavencentral/org.mockito/mockito-junit-jupiter/4.8.1, MIT, approved, clearlydefined +maven/mavencentral/org.objenesis/objenesis/2.5.1, Apache-2.0, approved, clearlydefined +maven/mavencentral/org.objenesis/objenesis/3.2, Apache-2.0, approved, clearlydefined maven/mavencentral/org.openapitools/jackson-databind-nullable/0.2.6, Apache-2.0, approved, #3294 +maven/mavencentral/org.opentest4j/opentest4j/1.2.0, Apache-2.0, approved, clearlydefined +maven/mavencentral/org.ow2.asm/asm-commons/9.5, BSD-3-Clause, approved, #7553 +maven/mavencentral/org.ow2.asm/asm-tree/9.5, BSD-3-Clause, approved, #7555 maven/mavencentral/org.ow2.asm/asm/9.3, BSD-3-Clause, approved, clearlydefined maven/mavencentral/org.postgresql/postgresql/42.6.0, BSD-2-Clause AND Apache-2.0, approved, #9159 maven/mavencentral/org.projectlombok/lombok/1.18.28, MIT AND LicenseRef-Public-Domain, approved, CQ23907 +maven/mavencentral/org.rnorth.duct-tape/duct-tape/1.0.8, MIT, approved, clearlydefined +maven/mavencentral/org.skyscreamer/jsonassert/1.5.1, Apache-2.0, approved, clearlydefined maven/mavencentral/org.slf4j/jul-to-slf4j/2.0.7, MIT, approved, #7698 maven/mavencentral/org.slf4j/slf4j-api/1.7.30, MIT, approved, CQ13368 maven/mavencentral/org.slf4j/slf4j-api/2.0.7, MIT, approved, #5915 @@ -180,11 +349,14 @@ maven/mavencentral/org.springframework.boot/spring-boot-starter-logging/3.1.3, A maven/mavencentral/org.springframework.boot/spring-boot-starter-oauth2-client/3.1.3, Apache-2.0, approved, #8806 maven/mavencentral/org.springframework.boot/spring-boot-starter-oauth2-resource-server/3.1.3, Apache-2.0, approved, #8804 maven/mavencentral/org.springframework.boot/spring-boot-starter-security/3.1.3, Apache-2.0, approved, #9337 +maven/mavencentral/org.springframework.boot/spring-boot-starter-test/3.1.3, Apache-2.0, approved, #9353 maven/mavencentral/org.springframework.boot/spring-boot-starter-thymeleaf/3.1.3, Apache-2.0, approved, #10092 maven/mavencentral/org.springframework.boot/spring-boot-starter-tomcat/3.1.3, Apache-2.0, approved, #9351 maven/mavencentral/org.springframework.boot/spring-boot-starter-validation/3.1.3, Apache-2.0, approved, #9335 maven/mavencentral/org.springframework.boot/spring-boot-starter-web/3.1.3, Apache-2.0, approved, #9347 maven/mavencentral/org.springframework.boot/spring-boot-starter/3.1.3, Apache-2.0, approved, #9349 +maven/mavencentral/org.springframework.boot/spring-boot-test-autoconfigure/3.1.3, Apache-2.0, approved, #9339 +maven/mavencentral/org.springframework.boot/spring-boot-test/3.1.3, Apache-2.0, approved, #9346 maven/mavencentral/org.springframework.boot/spring-boot/3.1.3, Apache-2.0, approved, #9352 maven/mavencentral/org.springframework.cloud/spring-cloud-commons/4.0.3, Apache-2.0, approved, #7292 maven/mavencentral/org.springframework.cloud/spring-cloud-context/4.0.3, Apache-2.0, approved, #7306 @@ -201,6 +373,7 @@ maven/mavencentral/org.springframework.security/spring-security-oauth2-core/6.1. maven/mavencentral/org.springframework.security/spring-security-oauth2-jose/6.1.3, Apache-2.0, approved, #9345 maven/mavencentral/org.springframework.security/spring-security-oauth2-resource-server/6.1.3, Apache-2.0, approved, #8798 maven/mavencentral/org.springframework.security/spring-security-rsa/1.0.11.RELEASE, Apache-2.0, approved, CQ20647 +maven/mavencentral/org.springframework.security/spring-security-test/6.1.3, Apache-2.0, approved, #10674 maven/mavencentral/org.springframework.security/spring-security-web/6.1.3, Apache-2.0, approved, #9800 maven/mavencentral/org.springframework/spring-aop/6.0.11, Apache-2.0, approved, #5940 maven/mavencentral/org.springframework/spring-aspects/6.0.11, Apache-2.0, approved, #5930 @@ -213,12 +386,19 @@ maven/mavencentral/org.springframework/spring-jcl/6.0.11, Apache-2.0, approved, maven/mavencentral/org.springframework/spring-jcl/6.0.12, Apache-2.0, approved, #3283 maven/mavencentral/org.springframework/spring-jdbc/6.0.11, Apache-2.0, approved, #5924 maven/mavencentral/org.springframework/spring-orm/6.0.11, Apache-2.0, approved, #5925 +maven/mavencentral/org.springframework/spring-test/6.0.11, Apache-2.0, approved, #7003 maven/mavencentral/org.springframework/spring-tx/6.0.11, Apache-2.0, approved, #5926 maven/mavencentral/org.springframework/spring-web/6.0.11, Apache-2.0, approved, #5942 maven/mavencentral/org.springframework/spring-webmvc/6.0.11, Apache-2.0, approved, #5944 +maven/mavencentral/org.testcontainers/database-commons/1.18.3, MIT, approved, clearlydefined +maven/mavencentral/org.testcontainers/jdbc/1.18.3, MIT, approved, clearlydefined +maven/mavencentral/org.testcontainers/junit-jupiter/1.19.0, MIT, approved, #10344 +maven/mavencentral/org.testcontainers/postgresql/1.19.0, MIT, approved, #10350 +maven/mavencentral/org.testcontainers/testcontainers/1.18.3, MIT, approved, #7938 maven/mavencentral/org.thymeleaf/thymeleaf-spring6/3.1.2.RELEASE, Apache-2.0, approved, #10581 maven/mavencentral/org.thymeleaf/thymeleaf/3.1.2.RELEASE, Apache-2.0, approved, CQ23960 maven/mavencentral/org.unbescape/unbescape/1.1.6.RELEASE, Apache-2.0, approved, CQ18904 maven/mavencentral/org.webjars/swagger-ui/4.18.1, Apache-2.0, approved, #7850 maven/mavencentral/org.webjars/webjars-locator-core/0.52, MIT, approved, clearlydefined +maven/mavencentral/org.xmlunit/xmlunit-core/2.9.1, Apache-2.0, approved, #6272 maven/mavencentral/org.yaml/snakeyaml/2.2, Apache-2.0 AND (Apache-2.0 OR BSD-3-Clause OR EPL-1.0 OR GPL-2.0-or-later OR LGPL-2.1-or-later), approved, #10232 From ab6fc10572ba1ffc518cf16ccc5304d9df8d7462 Mon Sep 17 00:00:00 2001 From: ds-mwesener Date: Wed, 11 Oct 2023 11:43:48 +0000 Subject: [PATCH 36/39] Update Dependencies Backend Action --- DEPENDENCIES_BACKEND | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/DEPENDENCIES_BACKEND b/DEPENDENCIES_BACKEND index 45aa15e459..a475cbed37 100644 --- a/DEPENDENCIES_BACKEND +++ b/DEPENDENCIES_BACKEND @@ -36,7 +36,7 @@ maven/mavencentral/com.squareup.okhttp3/okhttp/4.10.0, Apache-2.0 AND MPL-2.0, a maven/mavencentral/com.squareup.okio/okio-jvm/3.0.0, Apache-2.0, approved, clearlydefined maven/mavencentral/com.sun.istack/istack-commons-runtime/4.1.1, BSD-3-Clause, approved, #2590 maven/mavencentral/com.sun.istack/istack-commons-runtime/4.1.2, BSD-3-Clause, approved, #2590 -maven/mavencentral/com.tngtech.archunit/archunit/1.1.0, , restricted, clearlydefined +maven/mavencentral/com.tngtech.archunit/archunit/1.1.0, Apache-2.0, approved, #11048 maven/mavencentral/com.vaadin.external.google/android-json/0.0.20131108.vaadin1, Apache-2.0, approved, CQ21310 maven/mavencentral/com.xebialabs.restito/restito/1.1.0, MIT, approved, clearlydefined maven/mavencentral/com.zaxxer/HikariCP/5.0.1, Apache-2.0, approved, clearlydefined @@ -48,18 +48,18 @@ maven/mavencentral/commons-logging/commons-logging/1.2, Apache-2.0, approved, CQ maven/mavencentral/dev.failsafe/failsafe-okhttp/3.3.2, Apache-2.0, approved, #9178 maven/mavencentral/dev.failsafe/failsafe/3.3.2, Apache-2.0, approved, #9268 maven/mavencentral/io.cucumber/ci-environment/9.2.0, MIT, approved, clearlydefined -maven/mavencentral/io.cucumber/cucumber-core/7.12.1, MIT, restricted, clearlydefined +maven/mavencentral/io.cucumber/cucumber-core/7.12.1, MIT AND (Apache-2.0 AND MIT), approved, #11050 maven/mavencentral/io.cucumber/cucumber-expressions/16.1.2, MIT, approved, clearlydefined -maven/mavencentral/io.cucumber/cucumber-gherkin-messages/7.12.1, , restricted, clearlydefined +maven/mavencentral/io.cucumber/cucumber-gherkin-messages/7.12.1, None, restricted, #11045 maven/mavencentral/io.cucumber/cucumber-gherkin/7.12.1, MIT, approved, clearlydefined maven/mavencentral/io.cucumber/cucumber-java/7.12.1, MIT, approved, clearlydefined -maven/mavencentral/io.cucumber/cucumber-junit-platform-engine/7.12.1, , restricted, clearlydefined +maven/mavencentral/io.cucumber/cucumber-junit-platform-engine/7.12.1, None, restricted, #11046 maven/mavencentral/io.cucumber/cucumber-plugin/7.12.1, MIT, approved, clearlydefined -maven/mavencentral/io.cucumber/datatable/7.12.1, MIT, restricted, clearlydefined +maven/mavencentral/io.cucumber/datatable/7.12.1, None, restricted, #11047 maven/mavencentral/io.cucumber/docstring/7.12.1, MIT, approved, clearlydefined maven/mavencentral/io.cucumber/gherkin/26.2.0, MIT, approved, clearlydefined maven/mavencentral/io.cucumber/html-formatter/20.3.1, MIT, approved, clearlydefined -maven/mavencentral/io.cucumber/junit-xml-formatter/0.2.0, , restricted, clearlydefined +maven/mavencentral/io.cucumber/junit-xml-formatter/0.2.0, None, restricted, #11043 maven/mavencentral/io.cucumber/messages/22.0.0, MIT, approved, clearlydefined maven/mavencentral/io.cucumber/tag-expressions/5.0.1, MIT, approved, clearlydefined maven/mavencentral/io.github.classgraph/classgraph/4.8.149, MIT, approved, CQ22530 @@ -132,7 +132,7 @@ maven/mavencentral/net.bytebuddy/byte-buddy/1.14.6, Apache-2.0 AND BSD-3-Clause, maven/mavencentral/net.java.dev.jna/jna/5.12.1, Apache-2.0 OR LGPL-2.1-or-later, approved, #3217 maven/mavencentral/net.javacrumbs.json-unit/json-unit-assertj/2.38.0, Apache-2.0, approved, clearlydefined maven/mavencentral/net.javacrumbs.json-unit/json-unit-core/2.38.0, Apache-2.0, approved, clearlydefined -maven/mavencentral/net.javacrumbs.json-unit/json-unit-json-path/2.38.0, , restricted, clearlydefined +maven/mavencentral/net.javacrumbs.json-unit/json-unit-json-path/2.38.0, Apache-2.0, approved, #11049 maven/mavencentral/net.javacrumbs.shedlock/shedlock-core/5.7.0, Apache-2.0, approved, #10582 maven/mavencentral/net.javacrumbs.shedlock/shedlock-provider-jdbc-template/5.7.0, Apache-2.0, approved, #10584 maven/mavencentral/net.javacrumbs.shedlock/shedlock-spring/5.7.0, Apache-2.0, approved, #10583 @@ -166,8 +166,8 @@ maven/mavencentral/org.apiguardian/apiguardian-api/1.1.2, Apache-2.0, approved, maven/mavencentral/org.aspectj/aspectjweaver/1.9.20, EPL-1.0, approved, tools.aspectj maven/mavencentral/org.assertj/assertj-core/3.24.2, Apache-2.0, approved, #6161 maven/mavencentral/org.attoparser/attoparser/2.0.7.RELEASE, Apache-2.0, approved, CQ18900 -maven/mavencentral/org.awaitility/awaitility-proxy/3.0.0, NOASSERTION, restricted, clearlydefined -maven/mavencentral/org.awaitility/awaitility/3.0.0, NOASSERTION, restricted, clearlydefined +maven/mavencentral/org.awaitility/awaitility-proxy/3.0.0, Apache-2.0, approved, #11044 +maven/mavencentral/org.awaitility/awaitility/3.0.0, Apache-2.0, approved, #11042 maven/mavencentral/org.bitbucket.b_c/jose4j/0.9.3, Apache-2.0, approved, #4707 maven/mavencentral/org.bouncycastle/bcpkix-jdk15on/1.69, MIT, approved, clearlydefined maven/mavencentral/org.bouncycastle/bcpkix-jdk18on/1.75, MIT, approved, #9166 From c9b25a0a7b8afb6e7b2e45146c4ccfdbdd2c1aa7 Mon Sep 17 00:00:00 2001 From: Maximilian Wesener Date: Wed, 11 Oct 2023 13:52:11 +0200 Subject: [PATCH 37/39] chore: TRACEFOSS-XXX removed feature flag for investigation / alerts since its activated everywhere --- .../common/config/ApplicationProfiles.java | 1 + .../traceability/common/config/FeatureFlags.java | 6 ------ .../application/alert/rest/AlertController.java | 2 +- .../investigation/rest/InvestigationsController.java | 12 ++---------- 4 files changed, 4 insertions(+), 17 deletions(-) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ApplicationProfiles.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ApplicationProfiles.java index d24c149241..e445525575 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ApplicationProfiles.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ApplicationProfiles.java @@ -29,6 +29,7 @@ public class ApplicationProfiles { public static final String NOT_TESTS = "!" + TESTS; public static final String NOT_INTEGRATION_TESTS = "!" + INTEGRATION_SPRING_BOOT; public static final String DEV = "dev"; + public static final String STABLE = "stable"; private ApplicationProfiles() { } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/FeatureFlags.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/FeatureFlags.java index 0f67414393..d11d281a34 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/FeatureFlags.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/FeatureFlags.java @@ -21,12 +21,6 @@ package org.eclipse.tractusx.traceability.common.config; public class FeatureFlags { - - public static final String NOTIFICATIONS_ENABLED_PROFILES = ApplicationProfiles.LOCAL + " | " + - ApplicationProfiles.INTEGRATION_SPRING_BOOT + " | " + - ApplicationProfiles.TESTS + " | " + - ApplicationProfiles.DEV; - private FeatureFlags() { } } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertController.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertController.java index 4d4a60ca8d..996bfbe8b2 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertController.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertController.java @@ -60,7 +60,7 @@ import static org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception.StartQualityNotificationDomain.from; import static org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationStatus.from; -@Profile(FeatureFlags.NOTIFICATIONS_ENABLED_PROFILES) + @RestController @RequestMapping(value = "/alerts", consumes = "application/json", produces = "application/json") @PreAuthorize("hasAnyRole('ROLE_ADMIN', 'ROLE_SUPERVISOR', 'ROLE_USER')") diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/investigation/rest/InvestigationsController.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/investigation/rest/InvestigationsController.java index 511f3e3fdf..4cd92faa72 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/investigation/rest/InvestigationsController.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/investigation/rest/InvestigationsController.java @@ -32,24 +32,16 @@ import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.validation.Valid; import lombok.extern.slf4j.Slf4j; -import org.eclipse.tractusx.traceability.common.config.FeatureFlags; import org.eclipse.tractusx.traceability.common.model.PageResult; import org.eclipse.tractusx.traceability.common.request.OwnPageable; import org.eclipse.tractusx.traceability.common.response.ErrorResponse; import org.eclipse.tractusx.traceability.qualitynotification.application.base.service.QualityNotificationService; import org.eclipse.tractusx.traceability.qualitynotification.application.investigation.mapper.InvestigationResponseMapper; import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.context.annotation.Profile; import org.springframework.http.HttpStatus; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.ResponseStatus; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import qualitynotification.base.request.CloseQualityNotificationRequest; import qualitynotification.base.request.QualityNotificationStatusRequest; import qualitynotification.base.request.StartQualityNotificationRequest; @@ -61,7 +53,7 @@ import static org.eclipse.tractusx.traceability.qualitynotification.application.validation.UpdateQualityNotificationValidator.validate; import static org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception.StartQualityNotificationDomain.from; import static org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationStatus.from; -@Profile(FeatureFlags.NOTIFICATIONS_ENABLED_PROFILES) + @RestController @RequestMapping(value = "/investigations", consumes = "application/json", produces = "application/json") @PreAuthorize("hasAnyRole('ROLE_ADMIN', 'ROLE_SUPERVISOR', 'ROLE_USER')") From 20ee1ca26d282b19ff4ba65df1eac4c0e62d8832 Mon Sep 17 00:00:00 2001 From: Maximilian Wesener Date: Wed, 11 Oct 2023 13:52:44 +0200 Subject: [PATCH 38/39] chore: TRACEFOSS-XXX removed feature flag for investigation / alerts since its activated everywhere --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 973b95ac85..f03b292c2a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,11 +31,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - updated maven-site-plugin from 4.0.0-M5 to 4.0.0-M9 - updated testcontainer-postgresql from 1.17.6 to 1.19.0 - updated docker/build-push-action from 4 to 5 - - Updated user manual to reflect current state of the part views ### Removed - Owner filter and replaced it with the new filter query param +- Removed profile based feature flag for investigations / alerts ## [7.1.0 - 29.09.2023] ### Added From 026e8fa3e8edd67524a312524724352cd2a952d9 Mon Sep 17 00:00:00 2001 From: Maximilian Wesener Date: Wed, 11 Oct 2023 13:55:17 +0200 Subject: [PATCH 39/39] chore: TRACEFOSS-XXX removed feature flag for investigation / alerts since its activated everywhere --- .../application/alert/rest/AlertController.java | 10 +--------- .../infrastructure/edc/EdcController.java | 3 --- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertController.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertController.java index 996bfbe8b2..b3d89060cd 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertController.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/application/alert/rest/AlertController.java @@ -30,24 +30,16 @@ import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.validation.Valid; import lombok.extern.slf4j.Slf4j; -import org.eclipse.tractusx.traceability.common.config.FeatureFlags; import org.eclipse.tractusx.traceability.common.model.PageResult; import org.eclipse.tractusx.traceability.common.request.OwnPageable; import org.eclipse.tractusx.traceability.common.response.ErrorResponse; import org.eclipse.tractusx.traceability.qualitynotification.application.alert.mapper.AlertResponseMapper; import org.eclipse.tractusx.traceability.qualitynotification.application.base.service.QualityNotificationService; import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.context.annotation.Profile; import org.springframework.http.HttpStatus; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.ResponseStatus; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import qualitynotification.alert.response.AlertResponse; import qualitynotification.base.request.CloseQualityNotificationRequest; import qualitynotification.base.request.QualityNotificationStatusRequest; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/edc/EdcController.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/edc/EdcController.java index 24900d7773..b40a1cbb5e 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/edc/EdcController.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/edc/EdcController.java @@ -30,14 +30,12 @@ import jakarta.validation.Valid; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.eclipse.tractusx.traceability.common.config.FeatureFlags; import org.eclipse.tractusx.traceability.common.response.ErrorResponse; import org.eclipse.tractusx.traceability.qualitynotification.domain.alert.service.AlertsReceiverService; import org.eclipse.tractusx.traceability.qualitynotification.domain.investigation.model.exception.InvestigationIllegalUpdate; import org.eclipse.tractusx.traceability.qualitynotification.domain.investigation.service.InvestigationsReceiverService; import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.EDCNotification; import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.edc.model.NotificationType; -import org.springframework.context.annotation.Profile; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -46,7 +44,6 @@ import static org.eclipse.tractusx.traceability.common.model.SecurityUtils.sanitize; @Slf4j -@Profile(FeatureFlags.NOTIFICATIONS_ENABLED_PROFILES) @Hidden @RestController @Validated