From bbb74709691bc7e8b0a498b5e00390272ed5fa7f Mon Sep 17 00:00:00 2001 From: ds-mmaul Date: Mon, 5 Feb 2024 14:44:26 +0000 Subject: [PATCH 01/34] Update Dependencies Backend Action --- DEPENDENCIES_FRONTEND | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPENDENCIES_FRONTEND b/DEPENDENCIES_FRONTEND index 3957d86058..0d3328d437 100644 --- a/DEPENDENCIES_FRONTEND +++ b/DEPENDENCIES_FRONTEND @@ -460,7 +460,7 @@ npm/npmjs/-/has-flag/4.0.0, MIT, approved, clearlydefined npm/npmjs/-/has-property-descriptors/1.0.1, MIT, approved, #11098 npm/npmjs/-/has-proto/1.0.1, MIT, approved, #6175 npm/npmjs/-/has-symbols/1.0.3, MIT, approved, clearlydefined -npm/npmjs/-/has-tostringtag/1.0.0, MIT, approved, clearlydefined +npm/npmjs/-/has-tostringtag/1.0.0, MIT, approved, #13161 npm/npmjs/-/has-unicode/2.0.1, ISC, approved, clearlydefined npm/npmjs/-/has/1.0.3, MIT, approved, #10930 npm/npmjs/-/hasown/2.0.0, MIT, approved, #11097 From bdd59c09782c5acef4ade3022df854adee0f71aa Mon Sep 17 00:00:00 2001 From: ds-lcapellino Date: Tue, 13 Feb 2024 10:33:13 +0100 Subject: [PATCH 02/34] feature: 416 add job information when importing assets --- .../application/importpoc/ImportService.java | 10 ++- .../importpoc/rest/ImportController.java | 82 +++++++++++++++++- .../assets/domain/base/model/AssetBase.java | 11 ++- .../assets/domain/base/model/ImportNote.java | 1 + .../assets/domain/base/model/ImportState.java | 2 +- .../domain/importpoc/model/ImportJob.java | 42 +++++++++ .../importpoc/model/ImportJobStatus.java | 25 ++++++ .../repository/ImportJobRepository.java | 29 +++++++ .../importpoc/service/ImportServiceImpl.java | 35 +++++++- .../importpoc/service/PublishServiceImpl.java | 2 + .../asbuilt/model/AssetAsBuiltEntity.java | 6 ++ .../asplanned/model/AssetAsPlannedEntity.java | 6 ++ .../importJob/model/ImportJobEntity.java | 86 +++++++++++++++++++ .../repository/ImportJobRepositoryImpl.java | 51 +++++++++++ .../repository/JpaImportJobRepository.java | 29 +++++++ .../db/migration/V12__add_import_report.sql | 18 ++++ .../V6__create_submodelPayload_table.sql | 4 +- .../service/ImportServiceImplTest.java | 7 +- .../importdata/ImportControllerIT.java | 16 +++- .../java/assets/importpoc/ImportResponse.java | 9 +- 20 files changed, 449 insertions(+), 22 deletions(-) create mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/model/ImportJob.java create mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/model/ImportJobStatus.java create mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/repository/ImportJobRepository.java create mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/importJob/model/ImportJobEntity.java create mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/importJob/repository/ImportJobRepositoryImpl.java create mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/importJob/repository/JpaImportJobRepository.java create mode 100644 tx-backend/src/main/resources/db/migration/V12__add_import_report.sql diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/ImportService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/ImportService.java index 08924372c2..2de6908b4e 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/ImportService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/ImportService.java @@ -21,11 +21,17 @@ import org.eclipse.tractusx.traceability.assets.domain.base.model.AssetBase; +import org.eclipse.tractusx.traceability.assets.domain.importpoc.model.ImportJob; import org.springframework.web.multipart.MultipartFile; - import java.util.Map; public interface ImportService { - Map importAssets(MultipartFile file); + Map importAssets(MultipartFile file, ImportJob importJob); + + ImportJob createJob(); + + void completeJob(ImportJob importJob); + + void cancelJob(ImportJob importJob); } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/rest/ImportController.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/rest/ImportController.java index 879449b82b..efe62ec583 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/rest/ImportController.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/rest/ImportController.java @@ -39,6 +39,7 @@ import org.eclipse.tractusx.traceability.assets.application.importpoc.validation.JsonFileValidator; import org.eclipse.tractusx.traceability.assets.domain.base.model.AssetBase; import org.eclipse.tractusx.traceability.assets.domain.importpoc.exception.ImportException; +import org.eclipse.tractusx.traceability.assets.domain.importpoc.model.ImportJob; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -46,6 +47,7 @@ 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.RequestParam; import org.springframework.web.bind.annotation.RequestPart; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; @@ -128,6 +130,8 @@ public class ImportController { @PostMapping(value = "/import", consumes = MediaType.MULTIPART_FORM_DATA_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity importJson(@RequestPart("file") MultipartFile file) { log.info("Received request to import assets."); + ImportJob importJob = importService.createJob(); + List jsonSchemaErrors = jsonFileValidator.isValid(file); ValidationResponse validationResponse = new ValidationResponse(jsonSchemaErrors); @@ -135,20 +139,22 @@ public ResponseEntity importJson(@RequestPart("file") MultipartF log.warn("Asset import request cannot be processed. Errors: {}", validationResponse); return ResponseEntity .badRequest() - .body(new ImportResponse(validationResponse)); + .body(new ImportResponse(importJob.getId().toString(), validationResponse)); } + Map resultMap = null; try { - resultMap = importService.importAssets(file); + resultMap = importService.importAssets(file, importJob); } catch (ImportException e) { log.info("Could not import data", e); + importService.cancelJob(importJob); List validationErrors = new ArrayList<>(); validationErrors.add(e.getMessage()); ValidationResponse importErrorResponse = new ValidationResponse(validationErrors); return ResponseEntity .badRequest() - .body(new ImportResponse(importErrorResponse)); + .body(new ImportResponse(importJob.getId().toString(), importErrorResponse)); } List importStateMessages = resultMap.entrySet().stream() @@ -158,10 +164,78 @@ public ResponseEntity importJson(@RequestPart("file") MultipartF ).toList(); log.info("Successfully imported {} assets.", importStateMessages.size()); - ImportResponse importResponse = new ImportResponse(importStateMessages); + importService.completeJob(importJob); + ImportResponse importResponse = new ImportResponse(importJob.getId().toString(), importStateMessages); return ResponseEntity.ok(importResponse); } + + @Operation(operationId = "importReport", + summary = "report of the imported assets", + tags = {"ImportReport"}, + description = "This endpoint returns information about the imported assets to Trace-X.", + security = @SecurityRequirement(name = "oAuth2", scopes = "profile email")) + @ApiResponses(value = { + @ApiResponse( + responseCode = "200", + description = "OK.", + content = @Content( + mediaType = "application/json", + schema = @Schema())), + @ApiResponse( + responseCode = "204", + description = "No Content.", + content = @Content()), + @ApiResponse( + responseCode = "400", + description = "Bad request.", + content = @Content( + mediaType = "application/json", + schema = @Schema(implementation = ErrorResponse.class))), + @ApiResponse( + responseCode = "401", + description = "Authorization failed.", + content = @Content( + mediaType = "application/json", + schema = @Schema(implementation = ErrorResponse.class))), + @ApiResponse( + responseCode = "403", + description = "Forbidden.", + content = @Content( + mediaType = "application/json", + schema = @Schema(implementation = ErrorResponse.class))), + @ApiResponse( + responseCode = "404", + description = "Not found.", + content = @Content( + mediaType = "application/json", + schema = @Schema(implementation = ErrorResponse.class))), + @ApiResponse( + responseCode = "415", + description = "Unsupported media type", + content = @Content( + mediaType = "application/json", + schema = @Schema(implementation = ErrorResponse.class))), + @ApiResponse( + responseCode = "429", + description = "Too many requests.", + content = @Content( + mediaType = "application/json", + schema = @Schema(implementation = ErrorResponse.class))), + @ApiResponse( + responseCode = "500", + description = "Internal server error.", + content = @Content( + mediaType = "application/json", + schema = @Schema(implementation = ErrorResponse.class)))}) + + @PostMapping(value = "/report/{id}", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) + public ResponseEntity getImportReport(@RequestParam("id") String reportId) { + + return ResponseEntity.status(HttpStatus.CREATED).build(); + + } + @Operation(operationId = "publishAssets", summary = "asset publish", tags = {"AssetsPublish"}, diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/model/AssetBase.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/model/AssetBase.java index 5f35621a34..c14c4bd42e 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/model/AssetBase.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/model/AssetBase.java @@ -28,6 +28,7 @@ import lombok.extern.slf4j.Slf4j; import org.eclipse.tractusx.irs.component.enums.BomLifecycle; import org.eclipse.tractusx.traceability.assets.domain.base.model.aspect.DetailAspectModel; +import org.eclipse.tractusx.traceability.assets.domain.importpoc.model.ImportJob; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotification; import java.util.List; @@ -65,15 +66,21 @@ public class AssetBase { private ImportState importState; private String importNote; private String policyId; + private List importJobs; public BomLifecycle getBomLifecycle() { - if(semanticDataModel.equals(SERIALPART) || semanticDataModel.equals(BATCH) || semanticDataModel.equals(JUSTINSEQUENCE)){ + if (semanticDataModel.equals(SERIALPART) || semanticDataModel.equals(BATCH) || semanticDataModel.equals(JUSTINSEQUENCE)) { return BomLifecycle.AS_BUILT; } else { return BomLifecycle.AS_PLANNED; } } - public boolean isOwnAsset(final String bpn){ + + public boolean isOwnAsset(final String bpn) { return bpn.equals(manufacturerId); } + + public List getImportJobs() { + return importJobs == null ? List.of() : importJobs; + } } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/model/ImportNote.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/model/ImportNote.java index b2a0dc5597..969e71ab18 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/model/ImportNote.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/model/ImportNote.java @@ -23,5 +23,6 @@ public class ImportNote { public static final String TRANSIENT_UPDATED = "Asset updated successfully in transient state."; public static final String PERSISTENT_NO_UPDATE = "Asset in sync with digital twin registry. Twin will not be updated."; public static final String PERSISTED = "Asset created/updated successfully in persistant state."; + public static final String IN_SYNCHRONIZATION = "Twin in sync with digital twin registry. Twin will not be updated."; } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/model/ImportState.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/model/ImportState.java index fb0e1b9e6d..82e83a9fd7 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/model/ImportState.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/model/ImportState.java @@ -20,5 +20,5 @@ public enum ImportState { - TRANSIENT, PERSISTENT, ERROR, IN_SYNCHRONIZATION, UNSET; + TRANSIENT, PERSISTENT, ERROR, IN_SYNCHRONIZATION, UNSET } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/model/ImportJob.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/model/ImportJob.java new file mode 100644 index 0000000000..44b036d75b --- /dev/null +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/model/ImportJob.java @@ -0,0 +1,42 @@ +/******************************************************************************** + * Copyright (c) 2024 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.assets.domain.importpoc.model; + + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.extern.slf4j.Slf4j; + +import java.time.Instant; +import java.util.UUID; + +@Slf4j +@AllArgsConstructor +@Data +@Builder +public class ImportJob { + + private UUID id; + private Instant startedOn; + private Instant completedOn; + private ImportJobStatus status; + + +} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/model/ImportJobStatus.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/model/ImportJobStatus.java new file mode 100644 index 0000000000..b72523d1e1 --- /dev/null +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/model/ImportJobStatus.java @@ -0,0 +1,25 @@ +/******************************************************************************** + * Copyright (c) 2024 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.assets.domain.importpoc.model; + +public enum ImportJobStatus { + + INITIALIZING, RUNNING, CANCELLED, COMPLETED + +} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/repository/ImportJobRepository.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/repository/ImportJobRepository.java new file mode 100644 index 0000000000..463a5e796a --- /dev/null +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/repository/ImportJobRepository.java @@ -0,0 +1,29 @@ +/******************************************************************************** + * Copyright (c) 2024 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.assets.domain.importpoc.repository; + +import org.eclipse.tractusx.traceability.assets.domain.importpoc.model.ImportJob; +import org.eclipse.tractusx.traceability.assets.infrastructure.importJob.model.ImportJobEntity; + +public interface ImportJobRepository { + + ImportJob createJob(); + + void save(ImportJobEntity importJobEntity); +} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/ImportServiceImpl.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/ImportServiceImpl.java index 137b66baed..77dc1fb98f 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/ImportServiceImpl.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/ImportServiceImpl.java @@ -27,11 +27,17 @@ import org.eclipse.tractusx.traceability.assets.domain.asplanned.repository.AssetAsPlannedRepository; import org.eclipse.tractusx.traceability.assets.domain.base.model.AssetBase; import org.eclipse.tractusx.traceability.assets.domain.importpoc.exception.ImportException; +import org.eclipse.tractusx.traceability.assets.domain.importpoc.model.ImportJob; +import org.eclipse.tractusx.traceability.assets.domain.importpoc.model.ImportJobStatus; import org.eclipse.tractusx.traceability.assets.domain.importpoc.model.ImportRequest; +import org.eclipse.tractusx.traceability.assets.domain.importpoc.repository.ImportJobRepository; import org.eclipse.tractusx.traceability.assets.domain.importpoc.repository.SubmodelPayloadRepository; +import org.eclipse.tractusx.traceability.assets.infrastructure.importJob.model.ImportJobEntity; import org.eclipse.tractusx.traceability.common.properties.TraceabilityProperties; import org.springframework.stereotype.Service; import org.springframework.web.multipart.MultipartFile; + +import java.time.Instant; import java.util.Collection; import java.util.LinkedHashMap; import java.util.List; @@ -50,20 +56,24 @@ public class ImportServiceImpl implements ImportService { private final TraceabilityProperties traceabilityProperties; private final MappingStrategyFactory strategyFactory; private final SubmodelPayloadRepository submodelPayloadRepository; + private final ImportJobRepository importJobRepository; @Override - public Map importAssets(MultipartFile file) { + public Map importAssets(MultipartFile file, ImportJob importJob) { try { ImportRequest importRequest = objectMapper.readValue(file.getBytes(), ImportRequest.class); - Map> assetToUploadByBomLifecycle = importRequest.assets() .stream() .map(assetImportItem -> strategyFactory.mapToAssetBase(assetImportItem, traceabilityProperties)) .filter(Optional::isPresent) .map(Optional::get) + .map(asset -> { + asset.setImportJobs(List.of(importJob)); + return asset; + }) .collect(Collectors.groupingBy(AssetBase::getBomLifecycle)); assetToUploadByBomLifecycle.values().stream().flatMap(Collection::stream) @@ -88,7 +98,28 @@ public Map importAssets(MultipartFile file) { } } + @Override + public ImportJob createJob() { + return importJobRepository.createJob(); + } + @Override + public void completeJob(ImportJob importJob) { + ImportJobEntity importJobEntity = ImportJobEntity.from(importJob); + importJobEntity.setCompletedOn(Instant.now()); + importJobEntity.setImportJobStatus(ImportJobStatus.COMPLETED); + importJobRepository.save(importJobEntity); + log.info("Successfully completed import job {}", importJob.getId()); + } + + @Override + public void cancelJob(ImportJob importJob) { + ImportJobEntity importJobEntity = ImportJobEntity.from(importJob); + importJobEntity.setCompletedOn(Instant.now()); + importJobEntity.setImportJobStatus(ImportJobStatus.CANCELLED); + importJobRepository.save(importJobEntity); + log.info("Cancelling import job {}", importJob.getId()); + } private void saveRawDataForPersistedAssets(List persistedAssets, ImportRequest importRequest) { diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/PublishServiceImpl.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/PublishServiceImpl.java index ceb5fa55b1..e9e02f1405 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/PublishServiceImpl.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/PublishServiceImpl.java @@ -25,6 +25,7 @@ import org.eclipse.tractusx.traceability.assets.domain.asplanned.repository.AssetAsPlannedRepository; import org.eclipse.tractusx.traceability.assets.domain.base.AssetRepository; import org.eclipse.tractusx.traceability.assets.domain.base.model.AssetBase; +import org.eclipse.tractusx.traceability.assets.domain.base.model.ImportNote; import org.eclipse.tractusx.traceability.assets.domain.base.model.ImportState; import org.eclipse.tractusx.traceability.assets.domain.importpoc.exception.PublishAssetException; import org.springframework.stereotype.Service; @@ -64,6 +65,7 @@ private void updateAssetWithStatusAndPolicy(String policyId, List assetI .filter(this::validTransientState) .map(asset -> { asset.setImportState(ImportState.IN_SYNCHRONIZATION); + asset.setImportNote(ImportNote.IN_SYNCHRONIZATION); asset.setPolicyId(policyId); return asset; }).toList(); diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asbuilt/model/AssetAsBuiltEntity.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asbuilt/model/AssetAsBuiltEntity.java index f17e068ba9..e102a18021 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asbuilt/model/AssetAsBuiltEntity.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asbuilt/model/AssetAsBuiltEntity.java @@ -42,6 +42,7 @@ import org.eclipse.tractusx.traceability.assets.domain.base.model.aspect.DetailAspectModel; import org.eclipse.tractusx.traceability.assets.infrastructure.base.model.AssetBaseEntity; import org.eclipse.tractusx.traceability.assets.infrastructure.base.model.SemanticDataModelEntity; +import org.eclipse.tractusx.traceability.assets.infrastructure.importJob.model.ImportJobEntity; import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.alert.model.AlertEntity; import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.investigation.model.InvestigationEntity; import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.model.NotificationSideBaseEntity; @@ -91,6 +92,9 @@ public class AssetAsBuiltEntity extends AssetBaseEntity { @OneToMany(mappedBy = "assetAsBuilt", fetch = FetchType.EAGER) private List submodels; + @OneToMany(mappedBy = "assetAsBuilt", fetch = FetchType.EAGER) + private List importJobs; + public static AssetAsBuiltEntity from(AssetBase asset) { ManufacturingInfo manufacturingInfo = ManufacturingInfo.from(asset.getDetailAspectModels()); TractionBatteryCode tractionBatteryCodeObj = TractionBatteryCode.from(asset.getDetailAspectModels()); @@ -124,6 +128,7 @@ public static AssetAsBuiltEntity from(AssetBase asset) { .importState(asset.getImportState()) .importNote(asset.getImportNote()) .policyId(asset.getPolicyId()) + .importJobs(asset.getImportJobs().stream().map(ImportJobEntity::from).toList()) .build(); } @@ -155,6 +160,7 @@ public AssetBase toDomain() { .importState(this.getImportState()) .importNote(this.getImportNote()) .policyId(this.getPolicyId()) + .importJobs(this.getImportJobs().stream().map(ImportJobEntity::toDomain).toList()) .build(); } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asplanned/model/AssetAsPlannedEntity.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asplanned/model/AssetAsPlannedEntity.java index 22680babee..5a0d7959c0 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asplanned/model/AssetAsPlannedEntity.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asplanned/model/AssetAsPlannedEntity.java @@ -38,6 +38,7 @@ import org.eclipse.tractusx.traceability.assets.domain.base.model.aspect.DetailAspectModel; import org.eclipse.tractusx.traceability.assets.infrastructure.base.model.AssetBaseEntity; import org.eclipse.tractusx.traceability.assets.infrastructure.base.model.SemanticDataModelEntity; +import org.eclipse.tractusx.traceability.assets.infrastructure.importJob.model.ImportJobEntity; import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.alert.model.AlertEntity; import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.investigation.model.InvestigationEntity; import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.model.NotificationSideBaseEntity; @@ -78,6 +79,9 @@ public class AssetAsPlannedEntity extends AssetBaseEntity { @OneToMany(mappedBy = "assetAsPlanned", fetch = FetchType.EAGER) private List submodels; + @OneToMany(mappedBy = "assetAsPlanned", fetch = FetchType.EAGER) + private List importJobs; + @Builder @NoArgsConstructor @AllArgsConstructor @@ -117,6 +121,7 @@ public static AssetAsPlannedEntity from(AssetBase asset) { .importState(asset.getImportState()) .importNote(asset.getImportNote()) .policyId(asset.getPolicyId()) + .importJobs(asset.getImportJobs().stream().map(ImportJobEntity::from).toList()) .build(); } @@ -145,6 +150,7 @@ public static AssetBase toDomain(AssetAsPlannedEntity entity) { .importState(entity.getImportState()) .importNote(entity.getImportNote()) .policyId(entity.getPolicyId()) + .importJobs(entity.getImportJobs().stream().map(ImportJobEntity::toDomain).toList()) .build(); } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/importJob/model/ImportJobEntity.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/importJob/model/ImportJobEntity.java new file mode 100644 index 0000000000..9e96950c16 --- /dev/null +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/importJob/model/ImportJobEntity.java @@ -0,0 +1,86 @@ +/******************************************************************************** + * Copyright (c) 2024 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.assets.infrastructure.importJob.model; + +import jakarta.persistence.CascadeType; +import jakarta.persistence.Entity; +import jakarta.persistence.EnumType; +import jakarta.persistence.Enumerated; +import jakarta.persistence.FetchType; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.Table; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.SuperBuilder; +import org.eclipse.tractusx.traceability.assets.domain.importpoc.model.ImportJob; +import org.eclipse.tractusx.traceability.assets.domain.importpoc.model.ImportJobStatus; +import org.eclipse.tractusx.traceability.assets.infrastructure.asbuilt.model.AssetAsBuiltEntity; +import org.eclipse.tractusx.traceability.assets.infrastructure.asplanned.model.AssetAsPlannedEntity; + +import java.time.Instant; +import java.util.UUID; + +@Getter +@Setter +@NoArgsConstructor +@Entity +@SuperBuilder +@Table(name = "import_job") +public class ImportJobEntity { + @ManyToOne(fetch = FetchType.EAGER, cascade = CascadeType.ALL) + @JoinColumn(name = "asset_as_built_id") + @ToString.Exclude + public AssetAsBuiltEntity assetAsBuilt; + @Id + @GeneratedValue(strategy = GenerationType.UUID) + private String id; + private Instant startedOn; + private Instant completedOn; + @Enumerated(EnumType.STRING) + private ImportJobStatus importJobStatus; + @ManyToOne(fetch = FetchType.EAGER, cascade = CascadeType.ALL) + @JoinColumn(name = "asset_as_planned_id") + @ToString.Exclude + private AssetAsPlannedEntity assetAsPlanned; + + public static ImportJobEntity from(ImportJob importJob) { + return ImportJobEntity.builder() + .id(importJob.getId().toString()) + .startedOn(importJob.getStartedOn()) + .completedOn(importJob.getCompletedOn()) + .importJobStatus(importJob.getStatus()) + .build(); + + } + + public ImportJob toDomain() { + return ImportJob.builder() + .id(UUID.fromString(id)) + .startedOn(startedOn) + .completedOn(completedOn) + .status(importJobStatus) + .build(); + } +} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/importJob/repository/ImportJobRepositoryImpl.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/importJob/repository/ImportJobRepositoryImpl.java new file mode 100644 index 0000000000..dd9fad5367 --- /dev/null +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/importJob/repository/ImportJobRepositoryImpl.java @@ -0,0 +1,51 @@ +/******************************************************************************** + * Copyright (c) 2024 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.assets.infrastructure.importJob.repository; + +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.eclipse.tractusx.traceability.assets.domain.importpoc.model.ImportJob; +import org.eclipse.tractusx.traceability.assets.domain.importpoc.model.ImportJobStatus; +import org.eclipse.tractusx.traceability.assets.domain.importpoc.repository.ImportJobRepository; +import org.eclipse.tractusx.traceability.assets.infrastructure.importJob.model.ImportJobEntity; +import org.springframework.stereotype.Component; + +import java.time.Instant; + +@RequiredArgsConstructor +@Component +@Slf4j +public class ImportJobRepositoryImpl implements ImportJobRepository { + + private final JpaImportJobRepository importJobRepository; + + @Override + public ImportJob createJob() { + log.info("Creating importJob..."); + ImportJobEntity importJob = ImportJobEntity.builder().startedOn(Instant.now()).importJobStatus(ImportJobStatus.RUNNING).build(); + importJobRepository.save(importJob); + log.info("Successfully created importJob {}", importJob.getId()); + return importJob.toDomain(); + } + + @Override + public void save(ImportJobEntity importJobEntity) { + importJobRepository.save(importJobEntity); + } +} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/importJob/repository/JpaImportJobRepository.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/importJob/repository/JpaImportJobRepository.java new file mode 100644 index 0000000000..d542883d53 --- /dev/null +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/importJob/repository/JpaImportJobRepository.java @@ -0,0 +1,29 @@ +/******************************************************************************** + * Copyright (c) 2024 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.assets.infrastructure.importJob.repository; + +import org.eclipse.tractusx.traceability.assets.infrastructure.importJob.model.ImportJobEntity; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.JpaSpecificationExecutor; +import org.springframework.stereotype.Repository; + +@Repository +public interface JpaImportJobRepository extends JpaRepository, JpaSpecificationExecutor { + +} diff --git a/tx-backend/src/main/resources/db/migration/V12__add_import_report.sql b/tx-backend/src/main/resources/db/migration/V12__add_import_report.sql new file mode 100644 index 0000000000..761d4ac726 --- /dev/null +++ b/tx-backend/src/main/resources/db/migration/V12__add_import_report.sql @@ -0,0 +1,18 @@ +-- public.import_job definition + +-- Drop table + +-- Drop TABLE public.import_job + +CREATE TABLE public.import_job +( + id varchar(255) NOT NULL, + started_on timestamp NULL, + completed_on timestamp NULL, + import_job_status varchar(255) NOT NULL, + asset_as_built_id VARCHAR(255) NULL, + asset_as_planned_id VARCHAR(255) NULL, + CONSTRAINT import_job_pkey PRIMARY KEY (id), + CONSTRAINT fk_asset_as_built_import_job FOREIGN KEY (asset_as_built_id) REFERENCES public.assets_as_built (id), + CONSTRAINT fk_asset_as_planned_import_job FOREIGN KEY (asset_as_planned_id) REFERENCES public.assets_as_planned (id) +); diff --git a/tx-backend/src/main/resources/db/migration/V6__create_submodelPayload_table.sql b/tx-backend/src/main/resources/db/migration/V6__create_submodelPayload_table.sql index a2113bebca..493c63fc9f 100644 --- a/tx-backend/src/main/resources/db/migration/V6__create_submodelPayload_table.sql +++ b/tx-backend/src/main/resources/db/migration/V6__create_submodelPayload_table.sql @@ -6,8 +6,8 @@ CREATE TABLE public.submodel_payload ( - id varchar(255) NOT NULL, - json varchar NULL, + id varchar(255) NOT NULL, + json varchar NULL, CONSTRAINT submodel_payload_pkey PRIMARY KEY (id) ); diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/ImportServiceImplTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/ImportServiceImplTest.java index f06fc46ba2..b74e95efee 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/ImportServiceImplTest.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/ImportServiceImplTest.java @@ -22,6 +22,7 @@ import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; import org.eclipse.tractusx.traceability.assets.domain.asbuilt.repository.AssetAsBuiltRepository; import org.eclipse.tractusx.traceability.assets.domain.asplanned.repository.AssetAsPlannedRepository; +import org.eclipse.tractusx.traceability.assets.domain.importpoc.repository.ImportJobRepository; import org.eclipse.tractusx.traceability.assets.domain.importpoc.repository.SubmodelPayloadRepository; import org.eclipse.tractusx.traceability.common.model.BPN; import org.eclipse.tractusx.traceability.common.properties.TraceabilityProperties; @@ -56,13 +57,15 @@ class ImportServiceImplTest { @Mock private TraceabilityProperties traceabilityProperties; + @Mock + private ImportJobRepository importJobRepository; @BeforeEach public void testSetup() { ObjectMapper objectMapper = new ObjectMapper(); objectMapper.registerModule(new JavaTimeModule()); - importService = new ImportServiceImpl(objectMapper, assetAsPlannedRepository, assetAsBuiltRepository, traceabilityProperties, new MappingStrategyFactory(), submodelPayloadRepository); + importService = new ImportServiceImpl(objectMapper, assetAsPlannedRepository, assetAsBuiltRepository, traceabilityProperties, new MappingStrategyFactory(), submodelPayloadRepository, importJobRepository); } @@ -79,7 +82,7 @@ void testImportRequestSuccessful() throws IOException { ); when(traceabilityProperties.getBpn()).thenReturn(BPN.of("BPNL00000003CML1")); - importService.importAssets(multipartFile); + importService.importAssets(multipartFile, null); verify(assetAsBuiltRepository, times(1)).saveAllIfNotInIRSSyncAndUpdateImportStateAndNote(anyList()); verify(assetAsPlannedRepository, times(1)).saveAllIfNotInIRSSyncAndUpdateImportStateAndNote(anyList()); } diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java index cc7f63dd01..45cec36694 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java @@ -75,6 +75,7 @@ void givenValidFile_whenImportData_thenValidationShouldPass() throws JoseExcepti .extract().as(ImportResponse.class); assertThat(result.validationResult().validationErrors()).isEmpty(); + assertThat(result.jobId()).isNotEmpty(); assertThat(result.importStateMessage()).containsExactlyInAnyOrder( new ImportStateMessage("urn:uuid:0733946c-59c6-41ae-9570-cb43a6e4eb01", true), new ImportStateMessage("urn:uuid:0733946c-59c6-41ae-9570-cb43a6e4c79e", true), @@ -117,6 +118,7 @@ void givenValidFileWithAsBuiltOnly_whenImportData_thenValidationShouldPass() thr .extract().as(ImportResponse.class); assertThat(result.validationResult().validationErrors()).isEmpty(); + assertThat(result.jobId()).isNotEmpty(); assertThat(result.importStateMessage()).containsExactlyInAnyOrder( new ImportStateMessage("urn:uuid:6b2296cc-26c0-4f38-8a22-092338c36111", true) ); @@ -142,6 +144,7 @@ void givenValidFileWithAsPlannedOnly_whenImportData_thenValidationShouldPass() t .extract().as(ImportResponse.class); assertThat(result.validationResult().validationErrors()).isEmpty(); + assertThat(result.jobId()).isNotEmpty(); assertThat(result.importStateMessage()).containsExactlyInAnyOrder( new ImportStateMessage("urn:uuid:0733946c-59c6-41ae-9570-cb43a6e4eb01", true) ); @@ -179,6 +182,7 @@ void givenValidFile_whenImportDataButAssetExistInPersistentImportState_thenValid .extract().as(ImportResponse.class); assertThat(result.validationResult().validationErrors()).isEmpty(); + assertThat(result.jobId()).isNotEmpty(); assertThat(result.importStateMessage()).containsExactlyInAnyOrder( new ImportStateMessage("urn:uuid:0733946c-59c6-41ae-9570-cb43a6e4eb01", true), new ImportStateMessage("urn:uuid:0733946c-59c6-41ae-9570-cb43a6e4c79e", true), @@ -232,6 +236,7 @@ void givenValidFile_whenImportDataButAssetExistInTransientImportState_thenValida .extract().as(ImportResponse.class); assertThat(result.validationResult().validationErrors()).isEmpty(); + assertThat(result.jobId()).isNotEmpty(); assertThat(result.importStateMessage()).containsExactlyInAnyOrder( new ImportStateMessage("urn:uuid:0733946c-59c6-41ae-9570-cb43a6e4eb01", true), new ImportStateMessage("urn:uuid:0733946c-59c6-41ae-9570-cb43a6e4c79e", true), @@ -275,6 +280,7 @@ void givenInvalidFile_whenImportData_thenValidationShouldNotPass() throws JoseEx // then assertThat(result.importStateMessage()).isEmpty(); + assertThat(result.jobId()).isNotEmpty(); assertThat(result.validationResult().validationErrors()) .containsExactlyInAnyOrder( "Missing property aspectType", @@ -300,6 +306,7 @@ void givenInvalidFile_whenImportDataWithBadStructure_thenValidationShouldNotPass .extract().as(ImportResponse.class); assertThat(result.importStateMessage()).isEmpty(); + assertThat(result.jobId()).isNotEmpty(); assertThat(result.validationResult().validationErrors()) .containsExactlyInAnyOrder( "Could not find assets" @@ -323,7 +330,8 @@ void givenValidFile_whenImportDataWithWrongBPN_thenValidationShouldNotPass() thr .body("validationResult.validationErrors", Matchers.contains( List.of( "At least one asset does not match the application bpn BPNL00000003AXS3" - ).toArray())); + ).toArray())) + .body("jobId", Matchers.notNullValue()); } @Test @@ -343,7 +351,8 @@ void givenInvalidFileExtension_whenImportData_thenValidationShouldPass() throws .body("validationResult.validationErrors", Matchers.contains( List.of( "Supported file is *.json" - ).toArray())); + ).toArray())) + .body("jobId", Matchers.notNullValue()); } @Test @@ -363,7 +372,8 @@ void givenInvalidAspect_whenImportData_thenValidationShouldNotPass() throws Jose .body("validationResult.validationErrors", Matchers.contains( List.of( "'urn:bamm:io.catenax.serial_part:1.1.1#NOT_SUPPORTED_NAME' is not supported" - ).toArray())); + ).toArray())) + .body("jobId", Matchers.notNullValue()); } @Test diff --git a/tx-models/src/main/java/assets/importpoc/ImportResponse.java b/tx-models/src/main/java/assets/importpoc/ImportResponse.java index 2abc4acfd3..5bda73d202 100644 --- a/tx-models/src/main/java/assets/importpoc/ImportResponse.java +++ b/tx-models/src/main/java/assets/importpoc/ImportResponse.java @@ -21,15 +21,16 @@ import java.util.List; public record ImportResponse( + String jobId, List importStateMessage, ValidationResponse validationResult) { - public ImportResponse(List importStateMessages) { - this(importStateMessages, ValidationResponse.emptyValidationResult()); + public ImportResponse(String jobId, List importStateMessages) { + this(jobId, importStateMessages, ValidationResponse.emptyValidationResult()); } - public ImportResponse(ValidationResponse importStateMessages) { - this(List.of(), importStateMessages); + public ImportResponse(String jobId, ValidationResponse importStateMessages) { + this(jobId, List.of(), importStateMessages); } } From 109b9e1761a619e3a63d40a35759c49a846e4848 Mon Sep 17 00:00:00 2001 From: ds-lcapellino Date: Tue, 13 Feb 2024 15:41:07 +0100 Subject: [PATCH 03/34] feature: 416 add job information when importing assets --- .../assets/domain/base/model/AssetBase.java | 5 ---- .../importpoc/exception/ImportException.java | 4 +++ .../domain/importpoc/model/ImportJob.java | 10 +++++++ .../importpoc/service/ImportServiceImpl.java | 10 +++---- .../asbuilt/model/AssetAsBuiltEntity.java | 5 ---- .../asplanned/model/AssetAsPlannedEntity.java | 6 ----- .../importJob/model/ImportJobEntity.java | 26 ++++++++++--------- .../db/migration/V12__add_import_report.sql | 18 ++++++++++++- .../common/support/DatabaseSupport.java | 5 +++- 9 files changed, 54 insertions(+), 35 deletions(-) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/model/AssetBase.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/model/AssetBase.java index c14c4bd42e..a1a45c813d 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/model/AssetBase.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/model/AssetBase.java @@ -28,7 +28,6 @@ import lombok.extern.slf4j.Slf4j; import org.eclipse.tractusx.irs.component.enums.BomLifecycle; import org.eclipse.tractusx.traceability.assets.domain.base.model.aspect.DetailAspectModel; -import org.eclipse.tractusx.traceability.assets.domain.importpoc.model.ImportJob; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotification; import java.util.List; @@ -66,7 +65,6 @@ public class AssetBase { private ImportState importState; private String importNote; private String policyId; - private List importJobs; public BomLifecycle getBomLifecycle() { if (semanticDataModel.equals(SERIALPART) || semanticDataModel.equals(BATCH) || semanticDataModel.equals(JUSTINSEQUENCE)) { @@ -80,7 +78,4 @@ public boolean isOwnAsset(final String bpn) { return bpn.equals(manufacturerId); } - public List getImportJobs() { - return importJobs == null ? List.of() : importJobs; - } } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/exception/ImportException.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/exception/ImportException.java index 74914b972e..9f043dabfe 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/exception/ImportException.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/exception/ImportException.java @@ -22,4 +22,8 @@ public class ImportException extends RuntimeException{ public ImportException(String message) { super(message); } + + public ImportException(String message, Exception e) { + super(message, e); + } } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/model/ImportJob.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/model/ImportJob.java index 44b036d75b..cdf9af14fc 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/model/ImportJob.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/model/ImportJob.java @@ -23,8 +23,10 @@ import lombok.Builder; import lombok.Data; import lombok.extern.slf4j.Slf4j; +import org.eclipse.tractusx.traceability.assets.domain.base.model.AssetBase; import java.time.Instant; +import java.util.List; import java.util.UUID; @Slf4j @@ -37,6 +39,14 @@ public class ImportJob { private Instant startedOn; private Instant completedOn; private ImportJobStatus status; + private List assetAsBuilt; + private List assetAsPlanned; + public List getAssetAsBuilt() { + return assetAsBuilt == null ? List.of() : assetAsBuilt; + } + public List getAssetAsPlanned() { + return assetAsPlanned == null ? List.of() : assetAsPlanned; + } } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/ImportServiceImpl.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/ImportServiceImpl.java index 77dc1fb98f..0b1281b105 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/ImportServiceImpl.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/ImportServiceImpl.java @@ -70,10 +70,6 @@ public Map importAssets(MultipartFile file, ImportJob import .map(assetImportItem -> strategyFactory.mapToAssetBase(assetImportItem, traceabilityProperties)) .filter(Optional::isPresent) .map(Optional::get) - .map(asset -> { - asset.setImportJobs(List.of(importJob)); - return asset; - }) .collect(Collectors.groupingBy(AssetBase::getBomLifecycle)); assetToUploadByBomLifecycle.values().stream().flatMap(Collection::stream) @@ -87,6 +83,10 @@ public Map importAssets(MultipartFile file, ImportJob import List persistedAsBuilt = assetAsBuiltRepository.saveAllIfNotInIRSSyncAndUpdateImportStateAndNote(assetToUploadByBomLifecycle.get(BomLifecycle.AS_BUILT)); List persistedAsPlanned = assetAsPlannedRepository.saveAllIfNotInIRSSyncAndUpdateImportStateAndNote(assetToUploadByBomLifecycle.get(BomLifecycle.AS_PLANNED)); + importJob.setAssetAsBuilt(persistedAsBuilt); + importJob.setAssetAsPlanned(persistedAsPlanned); + importJobRepository.save(ImportJobEntity.from(importJob)); + List expectedAssetsToBePersisted = assetToUploadByBomLifecycle.values().stream().flatMap(Collection::stream).toList(); List persistedAssets = Stream.concat(persistedAsBuilt.stream(), persistedAsPlanned.stream()).toList(); @@ -94,7 +94,7 @@ public Map importAssets(MultipartFile file, ImportJob import return compareForUploadResult(expectedAssetsToBePersisted, persistedAssets); } catch (Exception e) { - throw new ImportException(e.getMessage()); + throw new ImportException(e.getMessage(), e); } } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asbuilt/model/AssetAsBuiltEntity.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asbuilt/model/AssetAsBuiltEntity.java index e102a18021..e90b5a03b0 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asbuilt/model/AssetAsBuiltEntity.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asbuilt/model/AssetAsBuiltEntity.java @@ -42,7 +42,6 @@ import org.eclipse.tractusx.traceability.assets.domain.base.model.aspect.DetailAspectModel; import org.eclipse.tractusx.traceability.assets.infrastructure.base.model.AssetBaseEntity; import org.eclipse.tractusx.traceability.assets.infrastructure.base.model.SemanticDataModelEntity; -import org.eclipse.tractusx.traceability.assets.infrastructure.importJob.model.ImportJobEntity; import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.alert.model.AlertEntity; import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.investigation.model.InvestigationEntity; import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.model.NotificationSideBaseEntity; @@ -92,8 +91,6 @@ public class AssetAsBuiltEntity extends AssetBaseEntity { @OneToMany(mappedBy = "assetAsBuilt", fetch = FetchType.EAGER) private List submodels; - @OneToMany(mappedBy = "assetAsBuilt", fetch = FetchType.EAGER) - private List importJobs; public static AssetAsBuiltEntity from(AssetBase asset) { ManufacturingInfo manufacturingInfo = ManufacturingInfo.from(asset.getDetailAspectModels()); @@ -128,7 +125,6 @@ public static AssetAsBuiltEntity from(AssetBase asset) { .importState(asset.getImportState()) .importNote(asset.getImportNote()) .policyId(asset.getPolicyId()) - .importJobs(asset.getImportJobs().stream().map(ImportJobEntity::from).toList()) .build(); } @@ -160,7 +156,6 @@ public AssetBase toDomain() { .importState(this.getImportState()) .importNote(this.getImportNote()) .policyId(this.getPolicyId()) - .importJobs(this.getImportJobs().stream().map(ImportJobEntity::toDomain).toList()) .build(); } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asplanned/model/AssetAsPlannedEntity.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asplanned/model/AssetAsPlannedEntity.java index 5a0d7959c0..22680babee 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asplanned/model/AssetAsPlannedEntity.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asplanned/model/AssetAsPlannedEntity.java @@ -38,7 +38,6 @@ import org.eclipse.tractusx.traceability.assets.domain.base.model.aspect.DetailAspectModel; import org.eclipse.tractusx.traceability.assets.infrastructure.base.model.AssetBaseEntity; import org.eclipse.tractusx.traceability.assets.infrastructure.base.model.SemanticDataModelEntity; -import org.eclipse.tractusx.traceability.assets.infrastructure.importJob.model.ImportJobEntity; import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.alert.model.AlertEntity; import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.investigation.model.InvestigationEntity; import org.eclipse.tractusx.traceability.qualitynotification.infrastructure.model.NotificationSideBaseEntity; @@ -79,9 +78,6 @@ public class AssetAsPlannedEntity extends AssetBaseEntity { @OneToMany(mappedBy = "assetAsPlanned", fetch = FetchType.EAGER) private List submodels; - @OneToMany(mappedBy = "assetAsPlanned", fetch = FetchType.EAGER) - private List importJobs; - @Builder @NoArgsConstructor @AllArgsConstructor @@ -121,7 +117,6 @@ public static AssetAsPlannedEntity from(AssetBase asset) { .importState(asset.getImportState()) .importNote(asset.getImportNote()) .policyId(asset.getPolicyId()) - .importJobs(asset.getImportJobs().stream().map(ImportJobEntity::from).toList()) .build(); } @@ -150,7 +145,6 @@ public static AssetBase toDomain(AssetAsPlannedEntity entity) { .importState(entity.getImportState()) .importNote(entity.getImportNote()) .policyId(entity.getPolicyId()) - .importJobs(entity.getImportJobs().stream().map(ImportJobEntity::toDomain).toList()) .build(); } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/importJob/model/ImportJobEntity.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/importJob/model/ImportJobEntity.java index 9e96950c16..4bf9bd5710 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/importJob/model/ImportJobEntity.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/importJob/model/ImportJobEntity.java @@ -18,7 +18,6 @@ ********************************************************************************/ package org.eclipse.tractusx.traceability.assets.infrastructure.importJob.model; -import jakarta.persistence.CascadeType; import jakarta.persistence.Entity; import jakarta.persistence.EnumType; import jakarta.persistence.Enumerated; @@ -27,12 +26,12 @@ import jakarta.persistence.GenerationType; import jakarta.persistence.Id; import jakarta.persistence.JoinColumn; -import jakarta.persistence.ManyToOne; +import jakarta.persistence.JoinTable; +import jakarta.persistence.OneToMany; import jakarta.persistence.Table; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; -import lombok.ToString; import lombok.experimental.SuperBuilder; import org.eclipse.tractusx.traceability.assets.domain.importpoc.model.ImportJob; import org.eclipse.tractusx.traceability.assets.domain.importpoc.model.ImportJobStatus; @@ -40,6 +39,7 @@ import org.eclipse.tractusx.traceability.assets.infrastructure.asplanned.model.AssetAsPlannedEntity; import java.time.Instant; +import java.util.List; import java.util.UUID; @Getter @@ -47,12 +47,8 @@ @NoArgsConstructor @Entity @SuperBuilder -@Table(name = "import_job") +@Table(name = "import_job", schema = "public") public class ImportJobEntity { - @ManyToOne(fetch = FetchType.EAGER, cascade = CascadeType.ALL) - @JoinColumn(name = "asset_as_built_id") - @ToString.Exclude - public AssetAsBuiltEntity assetAsBuilt; @Id @GeneratedValue(strategy = GenerationType.UUID) private String id; @@ -60,10 +56,14 @@ public class ImportJobEntity { private Instant completedOn; @Enumerated(EnumType.STRING) private ImportJobStatus importJobStatus; - @ManyToOne(fetch = FetchType.EAGER, cascade = CascadeType.ALL) - @JoinColumn(name = "asset_as_planned_id") - @ToString.Exclude - private AssetAsPlannedEntity assetAsPlanned; + + @OneToMany(fetch = FetchType.EAGER) + @JoinTable(name = "import_job_assets_as_built", joinColumns = @JoinColumn(name = "import_job_id"), inverseJoinColumns = @JoinColumn(name = "asset_as_built_id")) + public List assetsAsBuilt; + + @OneToMany(fetch = FetchType.EAGER) + @JoinTable(name = "import_job_assets_as_planned", joinColumns = @JoinColumn(name = "import_job_id"), inverseJoinColumns = @JoinColumn(name = "asset_as_planned_id")) + private List assetsAsPlanned; public static ImportJobEntity from(ImportJob importJob) { return ImportJobEntity.builder() @@ -71,6 +71,8 @@ public static ImportJobEntity from(ImportJob importJob) { .startedOn(importJob.getStartedOn()) .completedOn(importJob.getCompletedOn()) .importJobStatus(importJob.getStatus()) + .assetsAsBuilt(importJob.getAssetAsBuilt().stream().map(AssetAsBuiltEntity::from).toList()) + .assetsAsPlanned(importJob.getAssetAsPlanned().stream().map(AssetAsPlannedEntity::from).toList()) .build(); } diff --git a/tx-backend/src/main/resources/db/migration/V12__add_import_report.sql b/tx-backend/src/main/resources/db/migration/V12__add_import_report.sql index 761d4ac726..c0ba6ca7dc 100644 --- a/tx-backend/src/main/resources/db/migration/V12__add_import_report.sql +++ b/tx-backend/src/main/resources/db/migration/V12__add_import_report.sql @@ -13,6 +13,22 @@ CREATE TABLE public.import_job asset_as_built_id VARCHAR(255) NULL, asset_as_planned_id VARCHAR(255) NULL, CONSTRAINT import_job_pkey PRIMARY KEY (id), - CONSTRAINT fk_asset_as_built_import_job FOREIGN KEY (asset_as_built_id) REFERENCES public.assets_as_built (id), CONSTRAINT fk_asset_as_planned_import_job FOREIGN KEY (asset_as_planned_id) REFERENCES public.assets_as_planned (id) ); + + +CREATE TABLE public.import_job_assets_as_built +( + import_job_id VARCHAR(255) NOT NULL, + asset_as_built_id VARCHAR(255) NOT NULL, + CONSTRAINT fk_import_job FOREIGN KEY (import_job_id) REFERENCES public.import_job (id), + CONSTRAINT fk_assets_as_built FOREIGN KEY (asset_as_built_id) REFERENCES public.assets_as_built (id) +); + +CREATE TABLE public.import_job_assets_as_planned +( + import_job_id VARCHAR(255) NOT NULL, + asset_as_planned_id VARCHAR(255) NOT NULL, + CONSTRAINT fk_import_job FOREIGN KEY (import_job_id) REFERENCES public.import_job (id), + CONSTRAINT fk_assets_as_planned FOREIGN KEY (asset_as_planned_id) REFERENCES public.assets_as_planned (id) +); diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/common/support/DatabaseSupport.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/common/support/DatabaseSupport.java index 26cd437eac..d270e1db03 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/common/support/DatabaseSupport.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/common/support/DatabaseSupport.java @@ -29,6 +29,8 @@ public class DatabaseSupport { private static final List TABLES = List.of(new String[]{ "submodel_payload", + "import_job_assets_as_built", + "import_job_assets_as_planned", "assets_as_built_childs", "assets_as_built_parents", "assets_as_built_notifications", @@ -47,7 +49,8 @@ public class DatabaseSupport { "bpn_storage", "investigation_notification", "investigation", - "traction_battery_code_subcomponent" + "traction_battery_code_subcomponent", + "import_job" }); From beeb9c098c93e6f10dd39e3403114ef5c4af41b1 Mon Sep 17 00:00:00 2001 From: Martin Maul Date: Tue, 13 Feb 2024 17:05:05 +0100 Subject: [PATCH 04/34] feature(tombstone): 533 added tombstone error details to parts table and details --- CHANGELOG.md | 2 +- .../partsAsBuilt/partsAsBuilt.model.ts | 24 +++++++++++++++++-- .../partsAsPlanned/partsAsPlanned.model.ts | 12 +++++++++- .../modules/page/parts/model/parts.model.ts | 4 +++- .../shared/assembler/parts.assembler.spec.ts | 1 + .../shared/assembler/parts.assembler.ts | 13 ++++++---- .../card-list/card-list.component.html | 9 ++++++- .../parts-table/parts-table.component.html | 11 +++++++++ frontend/src/assets/locales/de/common.json | 1 + .../src/assets/locales/de/partDetail.json | 1 + frontend/src/assets/locales/en/common.json | 1 + .../src/assets/locales/en/partDetail.json | 1 + 12 files changed, 70 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a9a46ea784..3e1d626b19 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [UNRELEASED - DD.MM.YYYY] ### Added - +- added tombstone icon to parts table and error description in parts detail view ### Changed ### Removed diff --git a/frontend/src/app/mocks/services/parts-mock/partsAsBuilt/partsAsBuilt.model.ts b/frontend/src/app/mocks/services/parts-mock/partsAsBuilt/partsAsBuilt.model.ts index f0173c3c83..073a91e323 100644 --- a/frontend/src/app/mocks/services/parts-mock/partsAsBuilt/partsAsBuilt.model.ts +++ b/frontend/src/app/mocks/services/parts-mock/partsAsBuilt/partsAsBuilt.model.ts @@ -182,7 +182,17 @@ export const mockBmwAssets = [ 'sentQualityInvestigationIdsInStatusActive': [], 'receivedQualityInvestigationIdsInStatusActive': [], 'importState': 'PERSISTENT', - 'importNote': 'This is a test import note.' + 'importNote': 'This is a test import note.', + 'tombstone': `\t\t{ +\t\t\t"catenaXId": "urn:uuid:68c9b1bf-b2c1-456a-883c-2aac5f5cb5f4", +\t\t\t"endpointURL": null, +\t\t\t"processingError": { +\t\t\t\t"processStep": "BpdmRequest", +\t\t\t\t"errorDetail": "Cannot find ManufacturerId for CatenaXId: urn:uuid:68c9b1bf-b2c1-456a-883c-2aac5f5cb5f4", +\t\t\t\t"lastAttempt": "2022-11-08T08:37:18.724609316Z", +\t\t\t\t"retryCounter": 0 +\t\t\t} +\t\t}` }, { 'id': 'urn:uuid:1be6ec59-40fb-4993-9836-acb0e284fa01', @@ -216,7 +226,17 @@ export const mockBmwAssets = [ 'sentQualityInvestigationIdsInStatusActive': [], 'receivedQualityInvestigationIdsInStatusActive': [], 'importState': 'PERSISTENT', - 'importNote': 'This is a test import note.' + 'importNote': 'This is a test import note.', + 'tombstone': `\t\t{ +\t\t\t"catenaXId": "urn:uuid:68c9b1bf-b2c1-456a-883c-2aac5f5cb5f4", +\t\t\t"endpointURL": null, +\t\t\t"processingError": { +\t\t\t\t"processStep": "BpdmRequest", +\t\t\t\t"errorDetail": "Cannot find ManufacturerId for CatenaXId: urn:uuid:68c9b1bf-b2c1-456a-883c-2aac5f5cb5f4", +\t\t\t\t"lastAttempt": "2022-11-08T08:37:18.724609316Z", +\t\t\t\t"retryCounter": 0 +\t\t\t} +\t\t}` }, { 'id': 'urn:uuid:d8030bbf-a874-49fb-b2e1-7610f0ccad12', diff --git a/frontend/src/app/mocks/services/parts-mock/partsAsPlanned/partsAsPlanned.model.ts b/frontend/src/app/mocks/services/parts-mock/partsAsPlanned/partsAsPlanned.model.ts index 91b2e78521..54ae54e139 100644 --- a/frontend/src/app/mocks/services/parts-mock/partsAsPlanned/partsAsPlanned.model.ts +++ b/frontend/src/app/mocks/services/parts-mock/partsAsPlanned/partsAsPlanned.model.ts @@ -100,7 +100,17 @@ export const mockBmwAsPlannedAssets = [ }, ], 'importState': 'PERSISTENT', - 'importNote': 'This is a test import note.' + 'importNote': 'This is a test import note.', + 'tombstone': `\t\t{ +\t\t\t"catenaXId": "urn:uuid:68c9b1bf-b2c1-456a-883c-2aac5f5cb5f4", +\t\t\t"endpointURL": null, +\t\t\t"processingError": { +\t\t\t\t"processStep": "BpdmRequest", +\t\t\t\t"errorDetail": "Cannot find ManufacturerId for CatenaXId: urn:uuid:68c9b1bf-b2c1-456a-883c-2aac5f5cb5f4", +\t\t\t\t"lastAttempt": "2022-11-08T08:37:18.724609316Z", +\t\t\t\t"retryCounter": 0 +\t\t\t} +\t\t}` }, { 'id': 'urn:uuid:4a5e9ff6-2d5c-4510-a90e-d55af3ba502f', diff --git a/frontend/src/app/modules/page/parts/model/parts.model.ts b/frontend/src/app/modules/page/parts/model/parts.model.ts index 1ec460d586..0247cda5cc 100644 --- a/frontend/src/app/modules/page/parts/model/parts.model.ts +++ b/frontend/src/app/modules/page/parts/model/parts.model.ts @@ -74,6 +74,7 @@ export interface Part { importNote?: string; importState?: ImportState; + tombStoneErrorDetail?: string; } export interface PartResponse { @@ -98,7 +99,8 @@ export interface PartResponse { sentQualityInvestigationIdsInStatusActive: string[], receivedQualityInvestigationIdsInStatusActive: string[] importNote?: string, - importState?: ImportState + importState?: ImportState, + tombstone?: string, } export type PartsResponse = PaginationResponse; diff --git a/frontend/src/app/modules/shared/assembler/parts.assembler.spec.ts b/frontend/src/app/modules/shared/assembler/parts.assembler.spec.ts index dc385c2251..fc3660a558 100644 --- a/frontend/src/app/modules/shared/assembler/parts.assembler.spec.ts +++ b/frontend/src/app/modules/shared/assembler/parts.assembler.spec.ts @@ -130,6 +130,7 @@ describe('PartsAssembler', () => { nameAtCustomer: nameAtCustomer, manufacturingDate: manufacturingDate, manufacturingCountry: manufacturingCountry, + tombStoneErrorDetail: null, }); diff --git a/frontend/src/app/modules/shared/assembler/parts.assembler.ts b/frontend/src/app/modules/shared/assembler/parts.assembler.ts index 563debaa67..db8cbeebb3 100644 --- a/frontend/src/app/modules/shared/assembler/parts.assembler.ts +++ b/frontend/src/app/modules/shared/assembler/parts.assembler.ts @@ -121,8 +121,8 @@ export class PartsAssembler { receivedActiveInvestigations: partResponse.receivedQualityInvestigationIdsInStatusActive, importNote: partResponse.importNote, - importState: partResponse.importState - + importState: partResponse.importState, + tombStoneErrorDetail: partResponse.tombstone ? JSON.parse(partResponse.tombstone)?.processingError?.errorDetail : null, }; } @@ -234,8 +234,13 @@ export class PartsAssembler { return; } - const { importNote, importState } = viewData.data; - return { data: {importNote, importState} as Part}; + const { importNote, importState, tombStoneErrorDetail } = viewData.data; + + if(!viewData.data.tombStoneErrorDetail) { + return {data: {importNote, importState} as Part}; + } else { + return { data: {importNote, importState, tombStoneErrorDetail} as Part}; + } }) } diff --git a/frontend/src/app/modules/shared/components/card-list/card-list.component.html b/frontend/src/app/modules/shared/components/card-list/card-list.component.html index c45529f56a..5ee20ef421 100644 --- a/frontend/src/app/modules/shared/components/card-list/card-list.component.html +++ b/frontend/src/app/modules/shared/components/card-list/card-list.component.html @@ -24,7 +24,7 @@ {{ title }} -
+

{{ 'partDetail.' + item.key | i18n }}

@@ -40,6 +40,13 @@
+ +
+
+ {{item.value}} +
+
+

{{ item.value | autoFormat }}

diff --git a/frontend/src/app/modules/shared/components/parts-table/parts-table.component.html b/frontend/src/app/modules/shared/components/parts-table/parts-table.component.html index 807057769b..73ead38b33 100644 --- a/frontend/src/app/modules/shared/components/parts-table/parts-table.component.html +++ b/frontend/src/app/modules/shared/components/parts-table/parts-table.component.html @@ -153,6 +153,7 @@

{{ 'table.noResultFound' | i18n }}

+
{{ 'table.noResultFound' | i18n }} color="primary" > + + nearby_error + +
diff --git a/frontend/src/assets/locales/de/common.json b/frontend/src/assets/locales/de/common.json index d7d404dc42..b616b26164 100644 --- a/frontend/src/assets/locales/de/common.json +++ b/frontend/src/assets/locales/de/common.json @@ -65,6 +65,7 @@ "publish": "Veröffentlichen" }, "table": { + "tombStone": "Grabstein", "noResultFound": "KEINE ERGEBNISSE GEFUNDEN.", "tryAgain": "Bitte versuchen Sie es später noch einmal.", "selectPageSize": "Seite für segmentierte Elemente auswählen", diff --git a/frontend/src/assets/locales/de/partDetail.json b/frontend/src/assets/locales/de/partDetail.json index 255d878da4..1e182a05fa 100644 --- a/frontend/src/assets/locales/de/partDetail.json +++ b/frontend/src/assets/locales/de/partDetail.json @@ -1,5 +1,6 @@ { "partDetail": { + "tombStoneErrorDetail": "Grabstein Fehlerbeschreibung", "relations": "Beziehungen", "overview": "Übersicht", "manufacturerData": "Herstellerdaten", diff --git a/frontend/src/assets/locales/en/common.json b/frontend/src/assets/locales/en/common.json index a97306e724..f0de35c61f 100644 --- a/frontend/src/assets/locales/en/common.json +++ b/frontend/src/assets/locales/en/common.json @@ -65,6 +65,7 @@ "publish": "Publish" }, "table": { + "tombStone": "Tombstone", "noResultFound": "NO RESULTS FOUND.", "tryAgain": "Please try again later.", "selectPageSize": "Select page of periodic elements", diff --git a/frontend/src/assets/locales/en/partDetail.json b/frontend/src/assets/locales/en/partDetail.json index c46b3c8e43..c1a322f4af 100644 --- a/frontend/src/assets/locales/en/partDetail.json +++ b/frontend/src/assets/locales/en/partDetail.json @@ -1,5 +1,6 @@ { "partDetail": { + "tombStoneErrorDetail": "Tombstone Error details", "relations": "Relations", "overview": "Overview", "manufacturerData": "Manufacturer data", From 0423e954523519e7f75a3765f7ffcd19a3bc04f1 Mon Sep 17 00:00:00 2001 From: Martin Maul Date: Tue, 13 Feb 2024 17:19:31 +0100 Subject: [PATCH 05/34] feature(tombstone): 533 added tombstone error details to parts table and details --- .../modules/shared/assembler/parts.assembler.spec.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/frontend/src/app/modules/shared/assembler/parts.assembler.spec.ts b/frontend/src/app/modules/shared/assembler/parts.assembler.spec.ts index fc3660a558..e8c9df1d34 100644 --- a/frontend/src/app/modules/shared/assembler/parts.assembler.spec.ts +++ b/frontend/src/app/modules/shared/assembler/parts.assembler.spec.ts @@ -294,6 +294,7 @@ describe('PartsAssembler', () => { describe('mapForAssetStateView', () => { const importState = 'importState'; const importNote = 'importNote'; + const tombStoneErrorDetail = 'Error'; it('should clean up data for asset state view', done => { const data = { importState, importNote, test: '' } as unknown as Part; of({ data }) @@ -312,6 +313,15 @@ describe('PartsAssembler', () => { done(); }); }); + it('should clean up data for asset state view with tombStoneErrorDetail', done => { + const data = { importState, importNote, tombStoneErrorDetail } as unknown as Part; + of({ data }) + .pipe(PartsAssembler.mapPartForAssetStateDetailsView()) + .subscribe(result => { + expect(result).toEqual({ data: { importState, importNote, tombStoneErrorDetail } as unknown as Part }); + done(); + }); + }); }); From c0b85a4a47fae9f29441a8dcea60aa3e8e1039d9 Mon Sep 17 00:00:00 2001 From: ds-jleyh Date: Wed, 14 Feb 2024 09:41:41 +0100 Subject: [PATCH 06/34] chore(): [TRACEFOSS-XXX] added aspect model SingleLevelUsageAsBuilt, SingleLevelBomAsBuilt, SingleLevelBomAsPlanned and revision --- COMPATIBILITY_MATRIX.md | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/COMPATIBILITY_MATRIX.md b/COMPATIBILITY_MATRIX.md index d24e6dd0a9..a17019e77f 100644 --- a/COMPATIBILITY_MATRIX.md +++ b/COMPATIBILITY_MATRIX.md @@ -11,19 +11,22 @@ #### Helm Version 1.3.21 -| Dependency | Name of Service | Version | Helm | Comments | -|-------------------|------------------------------|---------------|-------|-----------------------------------------------------------------------------------| -| EDC | edc-postgresql | 12.1.6 | 2.0.0 | Enterprise Data Connector for PostgreSQL | -| IRS | irs-helm | 4.0.1 | 6.9.1 | Helm charts for Item Relationship Service | -| EDC | tractusx-connector | 0.5.3 | 2.0.0 | Connector for Data Transfer and Registration | -| Discovery Service | discovery service | 1.16.0 | 0.1.0 | Service for discovering and registering artifacts | -| Portal | portal | 1.7.0 | 1.7.0 | Web portal for interacting with Trace-X | -| SD-Factory | SD-Factory | 2.1.7 | 2.1.8 | Service Discovery Factory for managing dependencies | -| Wallet | wallet | 0.3.0 | 0.3.0 | Secure storage for sensitive information | -| SDE | Simple Data Exchanger (SDE) | 2.3.3 | 0.1.3 | Standalone service for companies to provide data in the Eclipse Tractus-X network | -| Aspect Model | SerialPart | [1.0.0,1.1.0] | - | | -| Aspect Model | Batch | [1.0.0,2.0.0] | - | | -| Aspect Model | PartAsPlanned | [1.0.0,1.0.1] | - | | -| Aspect Model | PartSiteInformationAsPlanned | [1.0.0] | - | | -| Aspect Model | JustInSequencePart | [1.0.0] | - | | -| Aspect Model | TractionBatteryCode | [1.0.0] | - | | +| Dependency | Name of Service | Version | Helm | Comments | +|-------------------|------------------------------|---------------------------------|-------|-----------------------------------------------------------------------------------| +| EDC | edc-postgresql | 12.1.6 | 2.0.0 | Enterprise Data Connector for PostgreSQL | +| IRS | irs-helm | 4.0.1 | 6.9.1 | Helm charts for Item Relationship Service | +| EDC | tractusx-connector | 0.5.3 | 2.0.0 | Connector for Data Transfer and Registration | +| Discovery Service | discovery service | 1.16.0 | 0.1.0 | Service for discovering and registering artifacts | +| Portal | portal | 1.7.0 | 1.7.0 | Web portal for interacting with Trace-X | +| SD-Factory | SD-Factory | 2.1.7 | 2.1.8 | Service Discovery Factory for managing dependencies | +| Wallet | wallet | 0.3.0 | 0.3.0 | Secure storage for sensitive information | +| SDE | Simple Data Exchanger (SDE) | 2.3.3 | 0.1.3 | Standalone service for companies to provide data in the Eclipse Tractus-X network | +| Aspect Model | SerialPart | [1.0.0,1.1.0,2.0.0,3.0.0) | - | | +| Aspect Model | Batch | [1.0.1,1.0.2,2.0.0,2.0.1,3.0.0) | - | | +| Aspect Model | PartAsPlanned | [1.0.0,1.0.1,2.0.0) | - | | +| Aspect Model | PartSiteInformationAsPlanned | [1.0.0] | - | | +| Aspect Model | JustInSequencePart | [1.0.0,2.0.0,3.0.0) | - | | +| Aspect Model | TractionBatteryCode | [1.0.0] | - | | +| Aspect Model | SingleLevelUsageAsBuilt | [1.0.1] | - | | +| Aspect Model | SingleLevelBomAsBuilt | [1.0.0, 2.0.0) | - | | +| Aspect Model | SingleLevelBomAsPlanned | [1.0.1, 1.1.0) | - | | From 9494b0ad4b0fb722a55c9394965fe40e2b9fb91c Mon Sep 17 00:00:00 2001 From: ds-mmaul Date: Wed, 14 Feb 2024 09:05:03 +0000 Subject: [PATCH 07/34] Update Dependencies Backend Action --- DEPENDENCIES_FRONTEND | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPENDENCIES_FRONTEND b/DEPENDENCIES_FRONTEND index 0d3328d437..82a111570d 100644 --- a/DEPENDENCIES_FRONTEND +++ b/DEPENDENCIES_FRONTEND @@ -662,7 +662,7 @@ npm/npmjs/-/lru-cache/7.18.3, MIT AND ISC, approved, #7614 npm/npmjs/-/lru-cache/9.1.1, ISC AND MIT, approved, #8054 npm/npmjs/-/luxon/3.2.1, MIT, approved, clearlydefined npm/npmjs/-/lz-string/1.5.0, MIT AND WTFPL, approved, #8398 -npm/npmjs/-/magic-string/0.30.1, MIT, approved, clearlydefined +npm/npmjs/-/magic-string/0.30.1, MIT, approved, #13189 npm/npmjs/-/make-dir/2.1.0, MIT, approved, clearlydefined npm/npmjs/-/make-dir/3.1.0, MIT, approved, clearlydefined npm/npmjs/-/make-error/1.3.6, ISC, approved, clearlydefined From 8b7576ec1341eb316583dc58087b9fe8fbb5caec Mon Sep 17 00:00:00 2001 From: ds-lcapellino Date: Wed, 14 Feb 2024 13:08:11 +0100 Subject: [PATCH 08/34] feature: 416 add get endpoint to retrieve import job report --- .../application/importpoc/ImportService.java | 2 + .../mapper/ImportJobResponseMapper.java | 45 +++++++++++++++++++ .../importpoc/rest/ImportController.java | 15 ++++--- .../repository/ImportJobRepository.java | 2 + .../importpoc/service/ImportServiceImpl.java | 5 +++ .../importJob/model/ImportJobEntity.java | 14 +++--- .../repository/ImportJobRepositoryImpl.java | 15 ++++++- .../importdata/ImportControllerIT.java | 38 +++++++++++++++- .../importpoc/ImportJobStatusResponse.java | 23 ++++++++++ .../importpoc/ImportReportResponse.java | 38 ++++++++++++++++ 10 files changed, 184 insertions(+), 13 deletions(-) create mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/mapper/ImportJobResponseMapper.java create mode 100644 tx-models/src/main/java/assets/importpoc/ImportJobStatusResponse.java create mode 100644 tx-models/src/main/java/assets/importpoc/ImportReportResponse.java diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/ImportService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/ImportService.java index 2de6908b4e..519c9ac29f 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/ImportService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/ImportService.java @@ -34,4 +34,6 @@ public interface ImportService { void completeJob(ImportJob importJob); void cancelJob(ImportJob importJob); + + ImportJob getImportJob(String importJobId); } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/mapper/ImportJobResponseMapper.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/mapper/ImportJobResponseMapper.java new file mode 100644 index 0000000000..e1400c6b94 --- /dev/null +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/mapper/ImportJobResponseMapper.java @@ -0,0 +1,45 @@ +/******************************************************************************** + * Copyright (c) 2024 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.assets.application.importpoc.mapper; + +import assets.importpoc.ImportJobStatusResponse; +import assets.importpoc.ImportReportResponse; +import assets.response.base.response.ImportStateResponse; +import org.eclipse.tractusx.traceability.assets.domain.importpoc.model.ImportJob; + +import java.util.List; +import java.util.stream.Stream; + +public class ImportJobResponseMapper { + public static ImportReportResponse from(ImportJob importJob) { + + ImportReportResponse.ImportJobResponse importJobResponse = new ImportReportResponse.ImportJobResponse(importJob.getId().toString(), importJob.getStartedOn(), importJob.getCompletedOn(), ImportJobStatusResponse.valueOf(importJob.getStatus().toString())); + List importedAssets = + Stream.concat(importJob.getAssetAsBuilt().stream(), importJob.getAssetAsPlanned().stream()) + .map( + asset -> new ImportReportResponse.ImportedAssetResponse( + asset.getId(), + ImportStateResponse.valueOf(asset.getImportState().toString()), + importJob.getStartedOn(), + asset.getImportNote() + ) + ).toList(); + return new ImportReportResponse(importJobResponse, importedAssets); + } +} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/rest/ImportController.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/rest/ImportController.java index efe62ec583..0f2e74828a 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/rest/ImportController.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/rest/ImportController.java @@ -21,6 +21,7 @@ import assets.importpoc.ErrorResponse; +import assets.importpoc.ImportReportResponse; import assets.importpoc.ImportResponse; import assets.importpoc.ImportStateMessage; import assets.importpoc.ValidationResponse; @@ -36,6 +37,7 @@ import lombok.extern.slf4j.Slf4j; import org.eclipse.tractusx.traceability.assets.application.importpoc.ImportService; import org.eclipse.tractusx.traceability.assets.application.importpoc.PublishService; +import org.eclipse.tractusx.traceability.assets.application.importpoc.mapper.ImportJobResponseMapper; import org.eclipse.tractusx.traceability.assets.application.importpoc.validation.JsonFileValidator; import org.eclipse.tractusx.traceability.assets.domain.base.model.AssetBase; import org.eclipse.tractusx.traceability.assets.domain.importpoc.exception.ImportException; @@ -44,10 +46,11 @@ import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.security.access.prepost.PreAuthorize; +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.RequestParam; import org.springframework.web.bind.annotation.RequestPart; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; @@ -229,11 +232,11 @@ public ResponseEntity importJson(@RequestPart("file") MultipartF mediaType = "application/json", schema = @Schema(implementation = ErrorResponse.class)))}) - @PostMapping(value = "/report/{id}", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) - public ResponseEntity getImportReport(@RequestParam("id") String reportId) { - - return ResponseEntity.status(HttpStatus.CREATED).build(); - + @GetMapping(value = "/report/{importJobId}", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) + public ResponseEntity getImportReport(@PathVariable("importJobId") String importJobId) { + ImportJob importJob = importService.getImportJob(importJobId); + ImportReportResponse importReportResponse = ImportJobResponseMapper.from(importJob); + return ResponseEntity.status(HttpStatus.OK).body(importReportResponse); } @Operation(operationId = "publishAssets", diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/repository/ImportJobRepository.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/repository/ImportJobRepository.java index 463a5e796a..7450e1125a 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/repository/ImportJobRepository.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/repository/ImportJobRepository.java @@ -26,4 +26,6 @@ public interface ImportJobRepository { ImportJob createJob(); void save(ImportJobEntity importJobEntity); + + ImportJob getImportJob(String importJobId); } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/ImportServiceImpl.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/ImportServiceImpl.java index 0b1281b105..fa17b553c2 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/ImportServiceImpl.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/ImportServiceImpl.java @@ -121,6 +121,11 @@ public void cancelJob(ImportJob importJob) { log.info("Cancelling import job {}", importJob.getId()); } + @Override + public ImportJob getImportJob(String importJobId) { + return importJobRepository.getImportJob(importJobId); + } + private void saveRawDataForPersistedAssets(List persistedAssets, ImportRequest importRequest) { List persistedAssetsIds = persistedAssets.stream().map(AssetBase::getId).toList(); diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/importJob/model/ImportJobEntity.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/importJob/model/ImportJobEntity.java index 4bf9bd5710..219bc8b98d 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/importJob/model/ImportJobEntity.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/importJob/model/ImportJobEntity.java @@ -39,8 +39,10 @@ import org.eclipse.tractusx.traceability.assets.infrastructure.asplanned.model.AssetAsPlannedEntity; import java.time.Instant; +import java.util.ArrayList; import java.util.List; import java.util.UUID; +import java.util.stream.Collectors; @Getter @Setter @@ -57,11 +59,11 @@ public class ImportJobEntity { @Enumerated(EnumType.STRING) private ImportJobStatus importJobStatus; - @OneToMany(fetch = FetchType.EAGER) + @OneToMany(fetch = FetchType.LAZY) @JoinTable(name = "import_job_assets_as_built", joinColumns = @JoinColumn(name = "import_job_id"), inverseJoinColumns = @JoinColumn(name = "asset_as_built_id")) - public List assetsAsBuilt; + private List assetsAsBuilt; - @OneToMany(fetch = FetchType.EAGER) + @OneToMany(fetch = FetchType.LAZY) @JoinTable(name = "import_job_assets_as_planned", joinColumns = @JoinColumn(name = "import_job_id"), inverseJoinColumns = @JoinColumn(name = "asset_as_planned_id")) private List assetsAsPlanned; @@ -71,8 +73,8 @@ public static ImportJobEntity from(ImportJob importJob) { .startedOn(importJob.getStartedOn()) .completedOn(importJob.getCompletedOn()) .importJobStatus(importJob.getStatus()) - .assetsAsBuilt(importJob.getAssetAsBuilt().stream().map(AssetAsBuiltEntity::from).toList()) - .assetsAsPlanned(importJob.getAssetAsPlanned().stream().map(AssetAsPlannedEntity::from).toList()) + .assetsAsBuilt(importJob.getAssetAsBuilt().stream().map(AssetAsBuiltEntity::from).collect(Collectors.toCollection(ArrayList::new))) + .assetsAsPlanned(importJob.getAssetAsPlanned().stream().map(AssetAsPlannedEntity::from).collect(Collectors.toCollection(ArrayList::new))) .build(); } @@ -83,6 +85,8 @@ public ImportJob toDomain() { .startedOn(startedOn) .completedOn(completedOn) .status(importJobStatus) + .assetAsBuilt(assetsAsBuilt.stream().map(AssetAsBuiltEntity::toDomain).toList()) + .assetAsPlanned(assetsAsPlanned.stream().map(AssetAsPlannedEntity::toDomain).toList()) .build(); } } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/importJob/repository/ImportJobRepositoryImpl.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/importJob/repository/ImportJobRepositoryImpl.java index dd9fad5367..e0b6c98e7c 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/importJob/repository/ImportJobRepositoryImpl.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/importJob/repository/ImportJobRepositoryImpl.java @@ -27,6 +27,7 @@ import org.springframework.stereotype.Component; import java.time.Instant; +import java.util.ArrayList; @RequiredArgsConstructor @Component @@ -38,7 +39,13 @@ public class ImportJobRepositoryImpl implements ImportJobRepository { @Override public ImportJob createJob() { log.info("Creating importJob..."); - ImportJobEntity importJob = ImportJobEntity.builder().startedOn(Instant.now()).importJobStatus(ImportJobStatus.RUNNING).build(); + ImportJobEntity importJob = ImportJobEntity + .builder() + .startedOn(Instant.now()) + .importJobStatus(ImportJobStatus.RUNNING) + .assetsAsBuilt(new ArrayList<>()) + .assetsAsPlanned(new ArrayList<>()) + .build(); importJobRepository.save(importJob); log.info("Successfully created importJob {}", importJob.getId()); return importJob.toDomain(); @@ -48,4 +55,10 @@ public ImportJob createJob() { public void save(ImportJobEntity importJobEntity) { importJobRepository.save(importJobEntity); } + + @Override + public ImportJob getImportJob(String importJobId) { + ImportJobEntity importJobEntity = importJobRepository.getReferenceById(importJobId); + return importJobEntity.toDomain(); + } } diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java index 45cec36694..83000da422 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java @@ -19,6 +19,7 @@ package org.eclipse.tractusx.traceability.integration.importdata; +import assets.importpoc.ImportReportResponse; import assets.importpoc.ImportResponse; import assets.importpoc.ImportStateMessage; import assets.importpoc.request.RegisterAssetRequest; @@ -310,7 +311,7 @@ void givenInvalidFile_whenImportDataWithBadStructure_thenValidationShouldNotPass assertThat(result.validationResult().validationErrors()) .containsExactlyInAnyOrder( "Could not find assets" - ); + ); } @Test @@ -443,4 +444,39 @@ void givenInvalidAssetID_whenPublishData_thenStatusCode404() throws JoseExceptio assertNull(asset.getPolicyId()); assertEquals(asset.getImportState(), ImportState.TRANSIENT); } + + @Test + void givenValidFile_whenImportData_thenReportShouldBeReturned() throws JoseException { + + // given + String path = getClass().getResource("/testdata/importfiles/validImportFile.json").getFile(); + File file = new File(path); + ImportResponse result = given() + .header(oAuth2Support.jwtAuthorization(JwtRole.ADMIN)) + .when() + .multiPart(file) + .post("/api/assets/import") + .then() + .statusCode(200) + .extract().as(ImportResponse.class); + + // when + ImportReportResponse importReportResponse = given() + .header(oAuth2Support.jwtAuthorization(JwtRole.ADMIN)) + .contentType(ContentType.JSON) + .when() + .pathParam("importJobId", result.jobId()) + .get("/api/assets/report/{importJobId}") + .then() + .log().all() + .statusCode(200) + .extract().as(ImportReportResponse.class); + + // then + assertEquals(result.jobId(), importReportResponse.importJobResponse().importId()); + assertEquals(18, importReportResponse.importedAssetResponse().size()); + + } + + } diff --git a/tx-models/src/main/java/assets/importpoc/ImportJobStatusResponse.java b/tx-models/src/main/java/assets/importpoc/ImportJobStatusResponse.java new file mode 100644 index 0000000000..358844e479 --- /dev/null +++ b/tx-models/src/main/java/assets/importpoc/ImportJobStatusResponse.java @@ -0,0 +1,23 @@ +/******************************************************************************** + * Copyright (c) 2024 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 assets.importpoc; + +public enum ImportJobStatusResponse { + INITIALIZING, RUNNING, CANCELLED, COMPLETED +} diff --git a/tx-models/src/main/java/assets/importpoc/ImportReportResponse.java b/tx-models/src/main/java/assets/importpoc/ImportReportResponse.java new file mode 100644 index 0000000000..8a16cdf3a8 --- /dev/null +++ b/tx-models/src/main/java/assets/importpoc/ImportReportResponse.java @@ -0,0 +1,38 @@ +/******************************************************************************** + * Copyright (c) 2024 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 assets.importpoc; + +import assets.response.base.response.ImportStateResponse; + +import java.time.Instant; +import java.util.List; + +public record ImportReportResponse(ImportJobResponse importJobResponse, + List importedAssetResponse) { + + public record ImportJobResponse(String importId, Instant startedOn, Instant completedOn, + ImportJobStatusResponse importJobStatusResponse) { + + } + + public record ImportedAssetResponse(String catenaxId, ImportStateResponse importStateResponse, Instant importedOn, + String importMessage) { + + } +} From 462b49c2467ddec0a558e80d7de3bc1dffcae959 Mon Sep 17 00:00:00 2001 From: ds-lcapellino Date: Wed, 14 Feb 2024 14:11:36 +0100 Subject: [PATCH 09/34] feature: 416 add integration test, update arc42 and swagger --- CHANGELOG.md | 2 + .../arc42/building-block-view/level-1.adoc | 3 + .../openapi/traceability-foss-backend.json | 1919 +++++++++-------- .../mapper/ImportJobResponseMapper.java | 4 +- .../importpoc/rest/ImportController.java | 4 +- .../importdata/ImportControllerIT.java | 1 - .../importpoc/ImportJobStatusResponse.java | 3 + .../importpoc/ImportReportResponse.java | 34 +- .../base/response/ImportStateResponse.java | 3 + 9 files changed, 1091 insertions(+), 882 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a9a46ea784..6c56c9ced0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ### Added +- Endpoint (assets/import/report/{importJobId}) for retrieving import report + ### Changed ### Removed diff --git a/docs/src/docs/arc42/building-block-view/level-1.adoc b/docs/src/docs/arc42/building-block-view/level-1.adoc index c81d6cfa97..4cba2f908a 100644 --- a/docs/src/docs/arc42/building-block-view/level-1.adoc +++ b/docs/src/docs/arc42/building-block-view/level-1.adoc @@ -27,6 +27,9 @@ include::../../../uml-diagrams/arc42/building-block-view/building-block-view.pum |*RegistryController* |The *RegistryController* provides a REST Interface for retrieving the data from parts registry. +|*ImportController* +|The *ImportController* provides a REST Interface for importing assets and publishing them in the Catena-X network. + |*AssetRepository* |The *AssetRepository* is a component responsible for storing and getting assets from database. diff --git a/tx-backend/openapi/traceability-foss-backend.json b/tx-backend/openapi/traceability-foss-backend.json index ece3299649..2b434372ba 100644 --- a/tx-backend/openapi/traceability-foss-backend.json +++ b/tx-backend/openapi/traceability-foss-backend.json @@ -37,8 +37,18 @@ "description" : "The endpoint returns a result of BPN EDC URL mappings.", "operationId" : "getBpnEdcs", "responses" : { - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -89,8 +99,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -108,16 +118,6 @@ } } } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } } }, "security" : [ @@ -151,20 +151,18 @@ "required" : true }, "responses" : { - "200" : { - "description" : "Returns the paged result found for BpnEdcMapping", + "429" : { + "description" : "Too many requests.", "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" : { @@ -203,18 +201,20 @@ } } }, - "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" } } } }, - "401" : { - "description" : "Authorization failed.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -223,8 +223,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -265,20 +265,18 @@ "required" : true }, "responses" : { - "200" : { - "description" : "Returns the paged result found for BpnEdcMapping", + "429" : { + "description" : "Too many requests.", "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" : { @@ -317,18 +315,20 @@ } } }, - "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" } } } }, - "401" : { - "description" : "Authorization failed.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -337,8 +337,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -376,8 +376,18 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -406,12 +416,6 @@ } } }, - "200" : { - "description" : "Returns the paged result found", - "content" : { - "application/json" : {} - } - }, "404" : { "description" : "Not found.", "content" : { @@ -422,18 +426,14 @@ } } }, - "400" : { - "description" : "Bad request.", + "200" : { + "description" : "Returns the paged result found", "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } + "application/json" : {} } }, - "401" : { - "description" : "Authorization failed.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -442,8 +442,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -489,8 +489,18 @@ "required" : true }, "responses" : { - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -499,6 +509,12 @@ } } }, + "204" : { + "description" : "No Content.", + "content" : { + "application/json" : {} + } + }, "415" : { "description" : "Unsupported media type", "content" : { @@ -529,8 +545,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -545,12 +561,6 @@ "application/json" : {} } }, - "204" : { - "description" : "No Content.", - "content" : { - "application/json" : {} - } - }, "401" : { "description" : "Authorization failed.", "content" : { @@ -560,16 +570,6 @@ } } } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } } }, "security" : [ @@ -600,8 +600,8 @@ "required" : true }, "responses" : { - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -610,8 +610,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -620,8 +620,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -630,8 +630,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -640,8 +640,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -660,8 +660,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -670,8 +670,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -720,8 +720,18 @@ "required" : true }, "responses" : { - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -750,12 +760,12 @@ } } }, - "200" : { - "description" : "Ok." - }, "204" : { "description" : "No content." }, + "200" : { + "description" : "Ok." + }, "404" : { "description" : "Not found.", "content" : { @@ -766,8 +776,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -785,16 +795,6 @@ } } } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } } }, "security" : [ @@ -836,8 +836,18 @@ "required" : true }, "responses" : { - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -866,12 +876,12 @@ } } }, - "200" : { - "description" : "Ok." - }, "204" : { "description" : "No content." }, + "200" : { + "description" : "Ok." + }, "404" : { "description" : "Not found.", "content" : { @@ -882,8 +892,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -901,16 +911,6 @@ } } } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } } }, "security" : [ @@ -942,8 +942,18 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -988,8 +998,8 @@ "204" : { "description" : "No content." }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1007,16 +1017,6 @@ } } } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } } }, "security" : [ @@ -1048,8 +1048,18 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1094,8 +1104,8 @@ "204" : { "description" : "No content." }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1113,16 +1123,6 @@ } } } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } } }, "security" : [ @@ -1153,8 +1153,18 @@ "required" : true }, "responses" : { - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1205,8 +1215,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1224,16 +1234,6 @@ } } } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } } }, "security" : [ @@ -1264,8 +1264,8 @@ "required" : true }, "responses" : { - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1274,8 +1274,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1284,8 +1284,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1294,8 +1294,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1304,8 +1304,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1324,8 +1324,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1334,8 +1334,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1374,8 +1374,18 @@ "required" : true }, "responses" : { - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1384,6 +1394,9 @@ } } }, + "204" : { + "description" : "No Content." + }, "415" : { "description" : "Unsupported media type", "content" : { @@ -1404,9 +1417,6 @@ } } }, - "204" : { - "description" : "No Content." - }, "404" : { "description" : "Not found.", "content" : { @@ -1417,8 +1427,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1442,16 +1452,6 @@ } } } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } } }, "security" : [ @@ -1490,8 +1490,18 @@ } }, "responses" : { - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1500,6 +1510,9 @@ } } }, + "204" : { + "description" : "No Content." + }, "415" : { "description" : "Unsupported media type", "content" : { @@ -1520,9 +1533,6 @@ } } }, - "204" : { - "description" : "No Content." - }, "404" : { "description" : "Not found.", "content" : { @@ -1533,8 +1543,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1558,16 +1568,6 @@ } } } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } } }, "security" : [ @@ -1598,8 +1598,8 @@ "required" : true }, "responses" : { - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1608,8 +1608,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1618,8 +1618,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1628,8 +1628,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1638,8 +1638,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1651,8 +1651,8 @@ "201" : { "description" : "Created." }, - "401" : { - "description" : "Authorization failed.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1661,8 +1661,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1700,8 +1700,8 @@ "required" : true }, "responses" : { - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1710,8 +1710,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1720,8 +1720,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1730,14 +1730,12 @@ } } }, - "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" } } } @@ -1752,18 +1750,20 @@ } } }, - "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" } } } }, - "401" : { - "description" : "Authorization failed.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1772,8 +1772,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1811,8 +1811,8 @@ "required" : true }, "responses" : { - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1821,8 +1821,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1831,8 +1831,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1841,8 +1841,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1851,8 +1851,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1864,8 +1864,8 @@ "201" : { "description" : "Created." }, - "401" : { - "description" : "Authorization failed.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1874,8 +1874,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1913,8 +1913,18 @@ "required" : true }, "responses" : { - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1965,8 +1975,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1984,16 +1994,6 @@ } } } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } } }, "security" : [ @@ -2024,8 +2024,8 @@ "required" : true }, "responses" : { - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -2034,8 +2034,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2044,8 +2044,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2054,8 +2054,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2064,8 +2064,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -2084,8 +2084,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2094,8 +2094,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2144,8 +2144,18 @@ "required" : true }, "responses" : { - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2187,8 +2197,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2206,16 +2216,6 @@ } } } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } } }, "security" : [ @@ -2257,8 +2257,18 @@ "required" : true }, "responses" : { - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2287,12 +2297,12 @@ } } }, - "200" : { - "description" : "Ok." - }, "204" : { "description" : "No content." }, + "200" : { + "description" : "Ok." + }, "404" : { "description" : "Not found.", "content" : { @@ -2303,8 +2313,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2322,16 +2332,6 @@ } } } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } } }, "security" : [ @@ -2363,8 +2363,18 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2409,8 +2419,8 @@ "204" : { "description" : "No content." }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2428,16 +2438,6 @@ } } } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } } }, "security" : [ @@ -2469,8 +2469,18 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2515,8 +2525,8 @@ "204" : { "description" : "No content." }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2534,16 +2544,6 @@ } } } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } } }, "security" : [ @@ -2574,8 +2574,8 @@ "required" : true }, "responses" : { - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -2584,18 +2584,19 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "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" : { @@ -2604,19 +2605,18 @@ } } }, - "200" : { - "description" : "Returns the paged result found for Asset", + "415" : { + "description" : "Unsupported media type", "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" : { @@ -2625,8 +2625,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -2635,8 +2635,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2645,8 +2645,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2684,8 +2684,18 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2714,19 +2724,39 @@ } } }, - "200" : { - "description" : "Returns the assets found", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Assets", - "items" : { - "type" : "object", - "properties" : { - "id" : { - "maxLength" : 255, + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Returns the assets found", + "content" : { + "application/json" : { + "schema" : { + "maxItems" : 2147483647, + "type" : "array", + "description" : "Assets", + "items" : { + "type" : "object", + "properties" : { + "id" : { + "maxLength" : 255, "minLength" : 0, "type" : "string" }, @@ -2868,26 +2898,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" - } - } - } - }, "401" : { "description" : "Authorization failed.", "content" : { @@ -2897,16 +2907,6 @@ } } } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } } }, "security" : [ @@ -2945,28 +2945,8 @@ "required" : true }, "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.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -3129,8 +3109,8 @@ } } }, - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3139,8 +3119,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3149,8 +3129,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3159,8 +3139,28 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", + "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" : { @@ -3198,66 +3198,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" - } - } - } - }, - "404" : { - "description" : "Not found.", - "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" - } - } - } - }, "429" : { "description" : "Too many requests.", "content" : { @@ -3421,6 +3361,66 @@ } } } + }, + "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" + } + } + } + }, + "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" + } + } + } + }, + "403" : { + "description" : "Forbidden.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "401" : { + "description" : "Authorization failed.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } } }, "security" : [ @@ -3459,8 +3459,18 @@ "required" : true }, "responses" : { - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3653,8 +3663,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3672,16 +3682,6 @@ } } } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } } }, "security" : [ @@ -3702,8 +3702,8 @@ "description" : "The endpoint Triggers reload of shell descriptors.", "operationId" : "reload", "responses" : { - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -3712,8 +3712,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3722,8 +3722,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3732,11 +3732,8 @@ } } }, - "202" : { - "description" : "Created registry reload job." - }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3745,8 +3742,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -3755,8 +3752,11 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "202" : { + "description" : "Created registry reload job." + }, + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3765,8 +3765,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -3794,8 +3794,8 @@ "description" : "The endpoint returns all policies .", "operationId" : "policy", "responses" : { - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -3804,8 +3804,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3814,8 +3814,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3824,8 +3824,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3834,8 +3834,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -3854,8 +3854,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3864,8 +3864,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -3904,8 +3904,18 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3960,8 +3970,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3979,16 +3989,6 @@ } } } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } } }, "security" : [ @@ -4049,18 +4049,20 @@ } ], "responses" : { - "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", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -4069,8 +4071,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -4079,20 +4081,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" } } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -4101,8 +4101,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -4111,8 +4111,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -4121,8 +4121,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -4150,8 +4150,18 @@ "description" : "The endpoint can return limited data based on the user role", "operationId" : "dashboard", "responses" : { - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -4180,6 +4190,26 @@ } } }, + "404" : { + "description" : "Not found.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, "200" : { "description" : "Returns dashboard data", "content" : { @@ -4190,8 +4220,188 @@ } } }, - "404" : { - "description" : "Not found.", + "401" : { + "description" : "Authorization failed.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security" : [ + { + "oAuth2" : [ + "profile email" + ] + } + ] + } + }, + "/assets/report/{importJobId}" : { + "get" : { + "tags" : [ + "ImportReport", + "AssetsImport" + ], + "summary" : "report of the imported assets", + "description" : "This endpoint returns information about the imported assets to Trace-X.", + "operationId" : "importReport", + "parameters" : [ + { + "name" : "importJobId", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + } + ], + "responses" : { + "429" : { + "description" : "Too many requests.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "400" : { + "description" : "Bad request.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "204" : { + "description" : "No Content." + }, + "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" + } + } + } + }, + "404" : { + "description" : "Not found.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "OK.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ImportReportResponse" + } + } + } + }, + "401" : { + "description" : "Authorization failed.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security" : [ + { + "oAuth2" : [ + "profile email" + ] + } + ] + } + }, + "/assets/as-planned" : { + "get" : { + "tags" : [ + "AssetsAsPlanned" + ], + "summary" : "Get assets by pagination", + "description" : "The endpoint returns a paged result of assets.", + "operationId" : "AssetsAsPlanned", + "parameters" : [ + { + "name" : "pageable", + "in" : "query", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/OwnPageable" + } + }, + { + "name" : "filter", + "in" : "query", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/SearchCriteriaRequestParam" + } + } + ], + "responses" : { + "429" : { + "description" : "Too many requests.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "400" : { + "description" : "Bad request.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -4200,8 +4410,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -4210,8 +4420,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -4220,8 +4430,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -4229,44 +4439,7 @@ } } } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/assets/as-planned" : { - "get" : { - "tags" : [ - "AssetsAsPlanned" - ], - "summary" : "Get assets by pagination", - "description" : "The endpoint returns a paged result of assets.", - "operationId" : "AssetsAsPlanned", - "parameters" : [ - { - "name" : "pageable", - "in" : "query", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/OwnPageable" - } }, - { - "name" : "filter", - "in" : "query", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/SearchCriteriaRequestParam" - } - } - ], - "responses" : { "200" : { "description" : "Returns the paged result found for Asset", "content" : { @@ -4426,56 +4599,6 @@ } } }, - "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" - } - } - } - }, - "404" : { - "description" : "Not found.", - "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" : { @@ -4485,16 +4608,6 @@ } } } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } } }, "security" : [ @@ -4557,18 +4670,20 @@ } ], "responses" : { - "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", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -4577,8 +4692,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -4587,20 +4702,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" } } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -4609,8 +4722,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -4619,8 +4732,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -4629,8 +4742,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -4668,8 +4781,8 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -4678,8 +4791,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -4688,8 +4801,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -4698,8 +4811,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -4708,8 +4821,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -4872,8 +4985,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -4882,8 +4995,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -4929,8 +5042,8 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -4939,8 +5052,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -4949,8 +5062,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -4959,8 +5072,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -4969,8 +5082,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -5138,8 +5251,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5148,8 +5261,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -5219,18 +5332,20 @@ } ], "responses" : { - "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", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -5239,8 +5354,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -5249,20 +5364,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" } } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5271,8 +5384,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -5281,8 +5394,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5291,8 +5404,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -5320,18 +5433,20 @@ "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" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -5340,8 +5455,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -5350,20 +5465,18 @@ } } }, - "200" : { - "description" : "Returns the assets found", + "415" : { + "description" : "Unsupported media type", "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" : { @@ -5372,8 +5485,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -5382,8 +5495,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5392,8 +5505,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -5431,8 +5544,18 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -5461,6 +5584,16 @@ } } }, + "404" : { + "description" : "Not found.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, "200" : { "description" : "Returns the asset by childId", "content" : { @@ -5615,18 +5748,8 @@ } } }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5644,16 +5767,6 @@ } } } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } } }, "security" : [ @@ -5685,8 +5798,18 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -5740,8 +5863,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5759,16 +5882,6 @@ } } } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } } }, "security" : [ @@ -5829,18 +5942,20 @@ } ], "responses" : { - "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", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -5849,8 +5964,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -5859,20 +5974,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" } } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5881,8 +5994,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -5891,8 +6004,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5901,8 +6014,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -5930,8 +6043,18 @@ "description" : "Deletes all submodels from the system.", "operationId" : "deleteSubmodels", "responses" : { - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -5973,21 +6096,11 @@ } } }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "204" : { "description" : "No Content." }, - "401" : { - "description" : "Authorization failed.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5996,8 +6109,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -6035,8 +6148,8 @@ } ], "responses" : { - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -6045,8 +6158,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -6055,8 +6168,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -6065,11 +6178,8 @@ } } }, - "200" : { - "description" : "Okay" - }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -6078,8 +6188,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -6091,8 +6201,8 @@ "204" : { "description" : "Deleted." }, - "401" : { - "description" : "Authorization failed.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -6101,8 +6211,11 @@ } } }, - "429" : { - "description" : "Too many requests.", + "200" : { + "description" : "Okay" + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -6807,6 +6920,76 @@ } } }, + "ImportJobResponse" : { + "type" : "object", + "properties" : { + "importId" : { + "type" : "string", + "example" : "456a952e-05eb-40dc-a6f2-9c2cb9c1387f" + }, + "startedOn" : { + "maxLength" : 50, + "type" : "string", + "example" : "2099-02-21T21:27:10.734950Z" + }, + "completedOn" : { + "maxLength" : 50, + "type" : "string", + "example" : "2099-02-21T21:27:10.734950Z" + }, + "importJobStatusResponse" : { + "type" : "string", + "enum" : [ + "INITIALIZING", + "RUNNING", + "CANCELLED", + "COMPLETED" + ] + } + } + }, + "ImportReportResponse" : { + "type" : "object", + "properties" : { + "importJobResponse" : { + "$ref" : "#/components/schemas/ImportJobResponse" + }, + "importedAssetResponse" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ImportedAssetResponse" + } + } + } + }, + "ImportedAssetResponse" : { + "type" : "object", + "properties" : { + "catenaxId" : { + "type" : "string", + "example" : "urn:uuid:7eeeac86-7b69-444d-81e6-655d0f1513bd}" + }, + "importStateResponse" : { + "type" : "string", + "enum" : [ + "TRANSIENT", + "PERSISTENT", + "ERROR", + "IN_SYNCHRONIZATION", + "UNSET" + ] + }, + "importedOn" : { + "maxLength" : 50, + "type" : "string", + "example" : "2099-02-21T21:27:10.734950Z" + }, + "importMessage" : { + "type" : "string", + "example" : "Asset created successfully in transient state." + } + } + }, "AlertResponse" : { "type" : "object", "properties" : { diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/mapper/ImportJobResponseMapper.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/mapper/ImportJobResponseMapper.java index e1400c6b94..4591abece8 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/mapper/ImportJobResponseMapper.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/mapper/ImportJobResponseMapper.java @@ -29,14 +29,14 @@ public class ImportJobResponseMapper { public static ImportReportResponse from(ImportJob importJob) { - ImportReportResponse.ImportJobResponse importJobResponse = new ImportReportResponse.ImportJobResponse(importJob.getId().toString(), importJob.getStartedOn(), importJob.getCompletedOn(), ImportJobStatusResponse.valueOf(importJob.getStatus().toString())); + ImportReportResponse.ImportJobResponse importJobResponse = new ImportReportResponse.ImportJobResponse(importJob.getId().toString(), importJob.getStartedOn().toString(), importJob.getCompletedOn().toString(), ImportJobStatusResponse.valueOf(importJob.getStatus().toString())); List importedAssets = Stream.concat(importJob.getAssetAsBuilt().stream(), importJob.getAssetAsPlanned().stream()) .map( asset -> new ImportReportResponse.ImportedAssetResponse( asset.getId(), ImportStateResponse.valueOf(asset.getImportState().toString()), - importJob.getStartedOn(), + importJob.getStartedOn().toString(), asset.getImportNote() ) ).toList(); diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/rest/ImportController.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/rest/ImportController.java index 0f2e74828a..203446ee81 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/rest/ImportController.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/rest/ImportController.java @@ -184,7 +184,7 @@ public ResponseEntity importJson(@RequestPart("file") MultipartF description = "OK.", content = @Content( mediaType = "application/json", - schema = @Schema())), + schema = @Schema(implementation = ImportReportResponse.class))), @ApiResponse( responseCode = "204", description = "No Content.", @@ -232,7 +232,7 @@ public ResponseEntity importJson(@RequestPart("file") MultipartF mediaType = "application/json", schema = @Schema(implementation = ErrorResponse.class)))}) - @GetMapping(value = "/report/{importJobId}", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) + @GetMapping(value = "/import/report/{importJobId}", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity getImportReport(@PathVariable("importJobId") String importJobId) { ImportJob importJob = importService.getImportJob(importJobId); ImportReportResponse importReportResponse = ImportJobResponseMapper.from(importJob); diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java index 83000da422..41442f42dd 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java @@ -478,5 +478,4 @@ void givenValidFile_whenImportData_thenReportShouldBeReturned() throws JoseExcep } - } diff --git a/tx-models/src/main/java/assets/importpoc/ImportJobStatusResponse.java b/tx-models/src/main/java/assets/importpoc/ImportJobStatusResponse.java index 358844e479..d062784040 100644 --- a/tx-models/src/main/java/assets/importpoc/ImportJobStatusResponse.java +++ b/tx-models/src/main/java/assets/importpoc/ImportJobStatusResponse.java @@ -18,6 +18,9 @@ ********************************************************************************/ package assets.importpoc; +import io.swagger.annotations.ApiModel; + +@ApiModel public enum ImportJobStatusResponse { INITIALIZING, RUNNING, CANCELLED, COMPLETED } diff --git a/tx-models/src/main/java/assets/importpoc/ImportReportResponse.java b/tx-models/src/main/java/assets/importpoc/ImportReportResponse.java index 8a16cdf3a8..c17a0d39da 100644 --- a/tx-models/src/main/java/assets/importpoc/ImportReportResponse.java +++ b/tx-models/src/main/java/assets/importpoc/ImportReportResponse.java @@ -19,20 +19,36 @@ package assets.importpoc; import assets.response.base.response.ImportStateResponse; +import io.swagger.v3.oas.annotations.media.Schema; -import java.time.Instant; import java.util.List; -public record ImportReportResponse(ImportJobResponse importJobResponse, - List importedAssetResponse) { - - public record ImportJobResponse(String importId, Instant startedOn, Instant completedOn, - ImportJobStatusResponse importJobStatusResponse) { +@Schema +public record ImportReportResponse( + ImportJobResponse importJobResponse, + List importedAssetResponse) { + @Schema + public record ImportJobResponse( + @Schema(example = "456a952e-05eb-40dc-a6f2-9c2cb9c1387f") + String importId, + @Schema(example = "2099-02-21T21:27:10.734950Z", maxLength = 50) + String startedOn, + @Schema(example = "2099-02-21T21:27:10.734950Z", maxLength = 50) + String completedOn, + @Schema + ImportJobStatusResponse importJobStatusResponse) { } - public record ImportedAssetResponse(String catenaxId, ImportStateResponse importStateResponse, Instant importedOn, - String importMessage) { - + @Schema + public record ImportedAssetResponse( + @Schema(example = "urn:uuid:7eeeac86-7b69-444d-81e6-655d0f1513bd}") + String catenaxId, + @Schema + ImportStateResponse importStateResponse, + @Schema(example = "2099-02-21T21:27:10.734950Z", maxLength = 50) + String importedOn, + @Schema(example = "Asset created successfully in transient state.") + String importMessage) { } } diff --git a/tx-models/src/main/java/assets/response/base/response/ImportStateResponse.java b/tx-models/src/main/java/assets/response/base/response/ImportStateResponse.java index fa8492d559..a84b2580c4 100644 --- a/tx-models/src/main/java/assets/response/base/response/ImportStateResponse.java +++ b/tx-models/src/main/java/assets/response/base/response/ImportStateResponse.java @@ -18,6 +18,9 @@ ********************************************************************************/ package assets.response.base.response; +import io.swagger.annotations.ApiModel; + +@ApiModel public enum ImportStateResponse { TRANSIENT, PERSISTENT, ERROR, IN_SYNCHRONIZATION, UNSET; From c7bfdcff3c9a51d7e7088c18c71d364c58effac1 Mon Sep 17 00:00:00 2001 From: ds-lcapellino Date: Wed, 14 Feb 2024 15:45:10 +0100 Subject: [PATCH 10/34] feature: 416 add not found integration test scenario, refactor --- .../mapper/ImportJobResponseMapper.java | 8 +++++- .../exception/ImportJobNotFoundException.java | 26 +++++++++++++++++++ .../repository/ImportJobRepositoryImpl.java | 10 +++++-- .../common/config/ErrorHandlingConfig.java | 9 +++++++ .../common/config/OpenApiConfig.java | 2 +- .../importdata/ImportControllerIT.java | 15 ++++++++++- 6 files changed, 65 insertions(+), 5 deletions(-) create mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/exception/ImportJobNotFoundException.java diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/mapper/ImportJobResponseMapper.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/mapper/ImportJobResponseMapper.java index 4591abece8..ce5619da6b 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/mapper/ImportJobResponseMapper.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/mapper/ImportJobResponseMapper.java @@ -29,7 +29,13 @@ public class ImportJobResponseMapper { public static ImportReportResponse from(ImportJob importJob) { - ImportReportResponse.ImportJobResponse importJobResponse = new ImportReportResponse.ImportJobResponse(importJob.getId().toString(), importJob.getStartedOn().toString(), importJob.getCompletedOn().toString(), ImportJobStatusResponse.valueOf(importJob.getStatus().toString())); + ImportReportResponse.ImportJobResponse importJobResponse = + new ImportReportResponse.ImportJobResponse( + importJob.getId().toString(), + importJob.getStartedOn().toString(), + importJob.getCompletedOn().toString(), + ImportJobStatusResponse.valueOf(importJob.getStatus().toString())); + List importedAssets = Stream.concat(importJob.getAssetAsBuilt().stream(), importJob.getAssetAsPlanned().stream()) .map( diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/exception/ImportJobNotFoundException.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/exception/ImportJobNotFoundException.java new file mode 100644 index 0000000000..0544bbd0d8 --- /dev/null +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/exception/ImportJobNotFoundException.java @@ -0,0 +1,26 @@ +/******************************************************************************** + * Copyright (c) 2024 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.assets.domain.importpoc.exception; + +public class ImportJobNotFoundException extends RuntimeException { + + public ImportJobNotFoundException(String message, Exception e) { + super(message, e); + } +} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/importJob/repository/ImportJobRepositoryImpl.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/importJob/repository/ImportJobRepositoryImpl.java index e0b6c98e7c..dbac85ae58 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/importJob/repository/ImportJobRepositoryImpl.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/importJob/repository/ImportJobRepositoryImpl.java @@ -18,8 +18,10 @@ ********************************************************************************/ package org.eclipse.tractusx.traceability.assets.infrastructure.importJob.repository; +import jakarta.persistence.EntityNotFoundException; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; +import org.eclipse.tractusx.traceability.assets.domain.importpoc.exception.ImportJobNotFoundException; import org.eclipse.tractusx.traceability.assets.domain.importpoc.model.ImportJob; import org.eclipse.tractusx.traceability.assets.domain.importpoc.model.ImportJobStatus; import org.eclipse.tractusx.traceability.assets.domain.importpoc.repository.ImportJobRepository; @@ -58,7 +60,11 @@ public void save(ImportJobEntity importJobEntity) { @Override public ImportJob getImportJob(String importJobId) { - ImportJobEntity importJobEntity = importJobRepository.getReferenceById(importJobId); - return importJobEntity.toDomain(); + try { + ImportJobEntity importJobEntity = importJobRepository.getReferenceById(importJobId); + return importJobEntity.toDomain(); + } catch (EntityNotFoundException entityNotFoundException) { + throw new ImportJobNotFoundException("Could not find import job with id " + importJobId, entityNotFoundException); + } } } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ErrorHandlingConfig.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ErrorHandlingConfig.java index 6bdb4c1350..bf392ff00d 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ErrorHandlingConfig.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ErrorHandlingConfig.java @@ -32,6 +32,7 @@ import org.eclipse.tractusx.traceability.assets.application.importpoc.validation.exception.JsonFileProcessingException; import org.eclipse.tractusx.traceability.assets.domain.asbuilt.exception.AssetNotFoundException; import org.eclipse.tractusx.traceability.assets.domain.importpoc.exception.ImportException; +import org.eclipse.tractusx.traceability.assets.domain.importpoc.exception.ImportJobNotFoundException; import org.eclipse.tractusx.traceability.assets.domain.importpoc.exception.PublishAssetException; import org.eclipse.tractusx.traceability.bpn.domain.model.BpnNotFoundException; import org.eclipse.tractusx.traceability.common.domain.ParseLocalDateException; @@ -294,4 +295,12 @@ public ResponseEntity handleMethodArgumentTypeMismatchException(f return ResponseEntity.status(HttpStatus.BAD_REQUEST) .body(new ErrorResponse(exception.getMessage())); } + + @ExceptionHandler(ImportJobNotFoundException.class) + public ResponseEntity handleImportJobNotFoundException(final ImportJobNotFoundException exception) { + log.error("ImportJobNotFoundException exception", exception); + + return ResponseEntity.status(HttpStatus.NOT_FOUND) + .body(new ErrorResponse(exception.getMessage())); + } } 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 1fb3a1aee1..483aca2db8 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 @@ -45,7 +45,7 @@ public OpenAPI baseOpenAPI() { .flows(new OAuthFlows().clientCredentials( new OAuthFlow().scopes( new Scopes().addString( - "profile email", ""))))); + "profile email", "")).tokenUrl("localhost")))); return new OpenAPI() .components(components) .addSecurityItem(new SecurityRequirement().addList("oAuth2", "profile email")) diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java index 41442f42dd..4bf70adae7 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java @@ -466,7 +466,7 @@ void givenValidFile_whenImportData_thenReportShouldBeReturned() throws JoseExcep .contentType(ContentType.JSON) .when() .pathParam("importJobId", result.jobId()) - .get("/api/assets/report/{importJobId}") + .get("/api/assets/import/report/{importJobId}") .then() .log().all() .statusCode(200) @@ -478,4 +478,17 @@ void givenValidFile_whenImportData_thenReportShouldBeReturned() throws JoseExcep } + @Test + void givenUnknownImportJobId_thenStatusCode404() throws JoseException { + // given/when/then + given().header(oAuth2Support.jwtAuthorization(JwtRole.ADMIN)) + .contentType(ContentType.JSON) + .when() + .pathParam("importJobId", "I do not exist") + .get("/api/assets/import/report/{importJobId}") + .then() + .log().all() + .statusCode(404); + } + } From d259e36dce3a54fce6ccb5723f39efdbcc23963c Mon Sep 17 00:00:00 2001 From: ds-lcapellino Date: Wed, 14 Feb 2024 16:37:07 +0100 Subject: [PATCH 11/34] feature: 416 fix untit tests --- .../domain/importpoc/service/ImportServiceImplTest.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/ImportServiceImplTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/ImportServiceImplTest.java index b74e95efee..e236d34a32 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/ImportServiceImplTest.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/ImportServiceImplTest.java @@ -22,6 +22,8 @@ import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; import org.eclipse.tractusx.traceability.assets.domain.asbuilt.repository.AssetAsBuiltRepository; import org.eclipse.tractusx.traceability.assets.domain.asplanned.repository.AssetAsPlannedRepository; +import org.eclipse.tractusx.traceability.assets.domain.importpoc.model.ImportJob; +import org.eclipse.tractusx.traceability.assets.domain.importpoc.model.ImportJobStatus; import org.eclipse.tractusx.traceability.assets.domain.importpoc.repository.ImportJobRepository; import org.eclipse.tractusx.traceability.assets.domain.importpoc.repository.SubmodelPayloadRepository; import org.eclipse.tractusx.traceability.common.model.BPN; @@ -36,6 +38,9 @@ import java.io.IOException; import java.io.InputStream; +import java.time.Instant; +import java.util.List; +import java.util.UUID; import static org.mockito.ArgumentMatchers.anyList; import static org.mockito.Mockito.times; @@ -82,7 +87,7 @@ void testImportRequestSuccessful() throws IOException { ); when(traceabilityProperties.getBpn()).thenReturn(BPN.of("BPNL00000003CML1")); - importService.importAssets(multipartFile, null); + importService.importAssets(multipartFile, new ImportJob(UUID.randomUUID(), Instant.now(), null, ImportJobStatus.RUNNING, List.of(), List.of())); verify(assetAsBuiltRepository, times(1)).saveAllIfNotInIRSSyncAndUpdateImportStateAndNote(anyList()); verify(assetAsPlannedRepository, times(1)).saveAllIfNotInIRSSyncAndUpdateImportStateAndNote(anyList()); } From ab78ca30cbf8ef6205d7207eb6bec83259dfd89f Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Thu, 15 Feb 2024 10:01:16 +0100 Subject: [PATCH 12/34] chore(tx-backend): #414 security bumps and cves --- .github/workflows/codeql.yml | 2 +- .github/workflows/dependencies.yaml | 6 +++--- .github/workflows/docker-image-main_backend.yml | 2 +- .github/workflows/docker-image-main_frontend.yml | 2 +- .github/workflows/docker-image-tag-release.yaml | 6 +++--- .github/workflows/e2e-tests-xray_frontend.yml | 2 +- .github/workflows/eclipse-dash.yml | 2 +- .github/workflows/publish-documentation.yaml | 2 +- .github/workflows/pull-request_backend.yml | 2 +- .github/workflows/release.yaml | 2 +- .github/workflows/sonar-scan-backend.yml | 2 +- .github/workflows/spotbugs.yml | 2 +- .github/workflows/trivy.yml | 6 +++--- .github/workflows/xray-cucumber.yaml | 2 +- pom.xml | 9 +++++---- tx-backend/pom.xml | 2 +- .../assets/infrastructure/base/irs/IrsClient.java | 11 +++++++++-- .../infrastructure/base/irs/IrsService.java | 15 ++++++--------- .../domain/base/service/HttpCallService.java | 5 ++--- 19 files changed, 43 insertions(+), 39 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index bb9aa0d1bb..1667069806 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -92,7 +92,7 @@ jobs: queries: +security-and-quality,security-extended - name: Cache maven packages - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.m2 key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} diff --git a/.github/workflows/dependencies.yaml b/.github/workflows/dependencies.yaml index 8c6a1323d5..3002a3ddf7 100644 --- a/.github/workflows/dependencies.yaml +++ b/.github/workflows/dependencies.yaml @@ -46,13 +46,13 @@ jobs: run: mvn org.eclipse.dash:license-tool-plugin:license-check -Ddash.summary=DEPENDENCIES_BACKEND - name: Run install - uses: borales/actions-yarn@v4 + uses: borales/actions-yarn@v5 with: cmd: install dir: 'frontend' - name: Generate FE Dependencies file - uses: borales/actions-yarn@v4 + uses: borales/actions-yarn@v5 with: cmd: run dependencies:generate dir: 'frontend' @@ -76,7 +76,7 @@ jobs: if: ${{ env.were_files_changed }} == 'true' - name: Create pull request - uses: peter-evans/create-pull-request@v5 + uses: peter-evans/create-pull-request@v6 with: add-paths: | DEPENDENCIES_BACKEND diff --git a/.github/workflows/docker-image-main_backend.yml b/.github/workflows/docker-image-main_backend.yml index 06a68c699f..9728b83c4c 100644 --- a/.github/workflows/docker-image-main_backend.yml +++ b/.github/workflows/docker-image-main_backend.yml @@ -90,7 +90,7 @@ jobs: env: DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} if: env.DOCKER_HUB_USER != '' - uses: peter-evans/dockerhub-description@v3 + uses: peter-evans/dockerhub-description@v4 with: username: ${{ secrets.DOCKER_HUB_USER }} password: ${{ secrets.DOCKER_HUB_TOKEN }} diff --git a/.github/workflows/docker-image-main_frontend.yml b/.github/workflows/docker-image-main_frontend.yml index 4e6a240b0d..ab934c8aa6 100644 --- a/.github/workflows/docker-image-main_frontend.yml +++ b/.github/workflows/docker-image-main_frontend.yml @@ -84,7 +84,7 @@ jobs: tags: ${{ env.DOCKER_HUB_REGISTRY_NAMESPACE }}/${{ env.FRONTEND_IMAGE_DOCKER_HUB }}:${{ github.sha }} - name: Update Docker Hub description - uses: peter-evans/dockerhub-description@v3 + uses: peter-evans/dockerhub-description@v4 env: DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} if: env.DOCKER_HUB_USER != '' diff --git a/.github/workflows/docker-image-tag-release.yaml b/.github/workflows/docker-image-tag-release.yaml index 3d4ee12648..763cdb91e2 100644 --- a/.github/workflows/docker-image-tag-release.yaml +++ b/.github/workflows/docker-image-tag-release.yaml @@ -90,7 +90,7 @@ jobs: env: DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} if: env.DOCKER_HUB_USER != '' - uses: peter-evans/dockerhub-description@v3 + uses: peter-evans/dockerhub-description@v4 with: username: ${{ secrets.DOCKER_HUB_USER }} password: ${{ secrets.DOCKER_HUB_TOKEN }} @@ -115,7 +115,7 @@ jobs: cache: 'maven' - name: Cache maven packages - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.m2 key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} @@ -164,7 +164,7 @@ jobs: env: DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} if: env.DOCKER_HUB_USER != '' - uses: peter-evans/dockerhub-description@v3 + uses: peter-evans/dockerhub-description@v4 with: username: ${{ secrets.DOCKER_HUB_USER }} password: ${{ secrets.DOCKER_HUB_TOKEN }} diff --git a/.github/workflows/e2e-tests-xray_frontend.yml b/.github/workflows/e2e-tests-xray_frontend.yml index 15f69ec5ca..19b2e4f0d3 100644 --- a/.github/workflows/e2e-tests-xray_frontend.yml +++ b/.github/workflows/e2e-tests-xray_frontend.yml @@ -52,7 +52,7 @@ jobs: node-version: 18.x - name: Run yarn install - uses: Borales/actions-yarn@v4.2.0 + uses: Borales/actions-yarn@v5 with: cmd: install # will run `yarn install` command diff --git a/.github/workflows/eclipse-dash.yml b/.github/workflows/eclipse-dash.yml index 405160f6ce..7e7975ee3b 100644 --- a/.github/workflows/eclipse-dash.yml +++ b/.github/workflows/eclipse-dash.yml @@ -67,7 +67,7 @@ jobs: distribution: 'temurin' - name: Cache maven packages - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.m2 key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} diff --git a/.github/workflows/publish-documentation.yaml b/.github/workflows/publish-documentation.yaml index 53e72b4b84..ca4fae9b7c 100644 --- a/.github/workflows/publish-documentation.yaml +++ b/.github/workflows/publish-documentation.yaml @@ -51,7 +51,7 @@ jobs: node-version: 16 - name: Cache maven packages - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.m2 key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} diff --git a/.github/workflows/pull-request_backend.yml b/.github/workflows/pull-request_backend.yml index 6fbb4ad5a3..0e538b9cc5 100644 --- a/.github/workflows/pull-request_backend.yml +++ b/.github/workflows/pull-request_backend.yml @@ -79,7 +79,7 @@ jobs: check_name: "Unit Test Results" - name: Cache SonarCloud packages - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.sonar/cache key: ${{ runner.os }}-sonar diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 1b0cef9597..2125733ca7 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -62,7 +62,7 @@ jobs: json -I -f frontend/package.json -e "this.version='${{ github.ref_name }}'" - name: Prepare Helm release - uses: peter-evans/create-pull-request@v5 + uses: peter-evans/create-pull-request@v6 with: commit-message: "chore(release): Prepare release for Helm version ${{ env.HELM_VERSION }}" branch: chore/prepare-helm-release-${{ env.HELM_VERSION }} diff --git a/.github/workflows/sonar-scan-backend.yml b/.github/workflows/sonar-scan-backend.yml index 7db2f3fb4a..7bc1a5e2c6 100644 --- a/.github/workflows/sonar-scan-backend.yml +++ b/.github/workflows/sonar-scan-backend.yml @@ -45,7 +45,7 @@ jobs: cache: 'maven' - name: Cache SonarCloud packages - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.sonar/cache key: ${{ runner.os }}-sonar diff --git a/.github/workflows/spotbugs.yml b/.github/workflows/spotbugs.yml index 08af93805d..87aed7bcde 100644 --- a/.github/workflows/spotbugs.yml +++ b/.github/workflows/spotbugs.yml @@ -53,7 +53,7 @@ jobs: distribution: 'temurin' - name: Cache maven packages - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.m2 key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} diff --git a/.github/workflows/trivy.yml b/.github/workflows/trivy.yml index 536c1b1534..aa01a2d20c 100644 --- a/.github/workflows/trivy.yml +++ b/.github/workflows/trivy.yml @@ -72,7 +72,7 @@ jobs: run: docker build -t localhost:5000/traceability-foss:fe_${{ github.sha }} -f ./frontend/Dockerfile . - name: Run Trivy vulnerability scanner - uses: aquasecurity/trivy-action@0.16.1 + uses: aquasecurity/trivy-action@0.17.0 with: trivyignores: "./.github/workflows/.trivyignore" image-ref: 'localhost:5000/traceability-foss:fe_${{ github.sha }}' @@ -132,7 +132,7 @@ jobs: ref: ${{needs.prepare-env.outputs.check_sha}} - name: Run Trivy vulnerability scanner in repo mode - uses: aquasecurity/trivy-action@0.16.1 + uses: aquasecurity/trivy-action@0.17.0 with: trivyignores: "./.github/workflows/.trivyignore" scan-type: "config" @@ -178,7 +178,7 @@ jobs: tags: localhost:5000/traceability-foss:trivy - name: Run Trivy vulnerability scanner - uses: aquasecurity/trivy-action@0.16.1 + uses: aquasecurity/trivy-action@0.17.0 with: image-ref: localhost:5000/traceability-foss:trivy trivyignores: "./.github/workflows/.trivyignore" diff --git a/.github/workflows/xray-cucumber.yaml b/.github/workflows/xray-cucumber.yaml index 4f6076ffe4..ac8fe253ff 100644 --- a/.github/workflows/xray-cucumber.yaml +++ b/.github/workflows/xray-cucumber.yaml @@ -36,7 +36,7 @@ jobs: distribution: 'temurin' - name: Cache maven packages - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.m2 key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} diff --git a/pom.xml b/pom.xml index 7dda5d4ee1..37ea281756 100644 --- a/pom.xml +++ b/pom.xml @@ -60,7 +60,7 @@ SPDX-License-Identifier: Apache-2.0 4.8.3.0 3.1.3 3.4.5 - 3.9.1.2184 + 3.10.0.2594 3.2.5 3.2.5 4.0.0-M11 @@ -72,6 +72,7 @@ SPDX-License-Identifier: Apache-2.0 2.5.8 4.4.0 12.3 + 10.1.18 3.1.0 9.4.3.0 2.0.2 @@ -87,8 +88,8 @@ SPDX-License-Identifier: Apache-2.0 2.15.0 0.9.3 1.1.0 - 1.19.1 - 5.3.2 + 1.19.4 + 5.4.0 2.0.4 3.24.2 @@ -99,7 +100,7 @@ SPDX-License-Identifier: Apache-2.0 7.12.1 2.2 2.15.2 - 5.9.3 + 5.10.2 3.0.0 1.5.1-SNAPSHOT 5.4.0 diff --git a/tx-backend/pom.xml b/tx-backend/pom.xml index e1f461005a..86672de4f2 100644 --- a/tx-backend/pom.xml +++ b/tx-backend/pom.xml @@ -207,7 +207,7 @@ SPDX-License-Identifier: Apache-2.0 org.apache.tomcat.embed tomcat-embed-websocket - 10.1.16 + ${tomcat-embed-websocket.version} org.springframework.cloud diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/IrsClient.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/IrsClient.java index 14b1f17476..135067782c 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/IrsClient.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/IrsClient.java @@ -49,6 +49,8 @@ public class IrsClient { private static final String POLICY_PATH = "/irs/policies"; + private static final String JOB_PATH = "/irs/jobs"; + public IrsClient(RestTemplate irsAdminTemplate, RestTemplate irsRegularTemplate, TraceabilityProperties traceabilityProperties, ObjectMapper objectMapper) { @@ -74,13 +76,18 @@ public void registerPolicy() { } public void registerJob(RegisterJobRequest registerJobRequest) { - irsRegularTemplate.exchange("/irs/jobs", HttpMethod.POST, new HttpEntity<>(registerJobRequest), Void.class); + irsRegularTemplate.exchange(JOB_PATH, HttpMethod.POST, new HttpEntity<>(registerJobRequest), Void.class); } @Nullable public JobDetailResponse getJobDetailResponse(String jobId) { - return irsRegularTemplate.exchange("/irs/jobs/" + jobId, HttpMethod.GET, null, new ParameterizedTypeReference() { + final String jobUrl = buildGetJobDetailUrl(jobId); + return irsRegularTemplate.exchange(jobUrl, HttpMethod.GET, null, new ParameterizedTypeReference() { }).getBody(); } + + private String buildGetJobDetailUrl(String jobId) { + return JOB_PATH + "/" + jobId; + } } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/IrsService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/IrsService.java index ed0d0f381a..86bb09a48e 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/IrsService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/IrsService.java @@ -88,15 +88,11 @@ public void handleJobFinishedCallback(String jobId, String state) { if (!Objects.equals(state, JobDetailResponse.JOB_STATUS_COMPLETED)) { return; } - JobDetailResponse jobResponse = this.irsClient.getJobDetailResponse(jobId); + final JobDetailResponse jobResponse = this.irsClient.getJobDetailResponse(jobId); long runtime = (jobResponse.jobStatus().lastModifiedOn().getTime() - jobResponse.jobStatus().startedOn().getTime()) / 1000; log.info("IRS call for globalAssetId: {} finished with status: {}, runtime {} s.", jobResponse.jobStatus().globalAssetId(), jobResponse.jobStatus().state(), runtime); - try { - log.info("Received HTTP Response: {}", objectMapper.writeValueAsString(jobResponse)); - } catch (Exception e) { - log.warn("Unable to log IRS Response", e); - } + if (jobResponse.isCompleted()) { try { // TODO exception will be often thrown probably because two transactions try to commit same primary key - check if we need to update it here @@ -135,8 +131,9 @@ void saveOrUpdateAssets(AssetCallbackRepository repository, AssetBase asset) { @Override public void createIrsPolicyIfMissing() { log.info("Check if irs policy exists"); - List irsPolicies = this.irsClient.getPolicies(); - log.info("Irs has following policies: {}", irsPolicies); + final List irsPolicies = this.irsClient.getPolicies(); + final List irsPoliciesIds = irsPolicies.stream().map(PolicyResponse::policyId).toList(); + log.info("Irs has following policies: {}", irsPoliciesIds); log.info("Required constraints from application yaml are : {}", traceabilityProperties.getRightOperand()); @@ -170,7 +167,7 @@ private void createMissingPolicies() { private void checkAndUpdatePolicy(PolicyResponse requiredPolicy) { if (isPolicyExpired(requiredPolicy)) { - log.info("IRS Policy {} has outdated validity updating new ttl {}", traceabilityProperties.getRightOperand(), requiredPolicy); + log.info("IRS Policy {} has outdated validity updating new ttl", traceabilityProperties.getRightOperand()); this.irsClient.deletePolicy(); this.irsClient.registerPolicy(); } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/service/HttpCallService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/service/HttpCallService.java index 0b051fb44c..cac522abd1 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/service/HttpCallService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/service/HttpCallService.java @@ -31,7 +31,6 @@ import static java.lang.String.format; -// TODO - either refactor this class to use feignClient with a common httpClient or remove it once IRS-Lib is done @Slf4j @Component public class HttpCallService { @@ -43,12 +42,12 @@ public HttpCallService(RestTemplate edcNotificationTemplate) { } - public void sendRequest(EdcNotificationRequest request) { + public void sendRequest(final EdcNotificationRequest request) { HttpEntity entity = new HttpEntity<>(request.getBody(), request.getHeaders()); try { var response = edcNotificationTemplate.exchange(request.getUrl(), HttpMethod.POST, entity, new ParameterizedTypeReference<>() { }); - log.info("Control plane responded with response: {}", response); + log.debug("Control plane responded with response: {}", response); log.info("Control plane responded with status: {}", response.getStatusCode()); if (!response.getStatusCode().is2xxSuccessful()) { throw new BadRequestException(format("Control plane responded with: %s", response.getStatusCode())); From 5dd0608c5dc5c9fed4da1ca6b199e1aa15ce58af Mon Sep 17 00:00:00 2001 From: ds-lcapellino Date: Thu, 15 Feb 2024 11:11:58 +0100 Subject: [PATCH 13/34] feature: 416 add scenario documentation --- .../arc42/runtime-view/data-provisioning.adoc | 4 ++ .../return-import-report.adoc | 16 ++++++++ .../import-report-receive.puml | 39 +++++++++++++++++++ 3 files changed, 59 insertions(+) create mode 100644 docs/src/docs/arc42/runtime-view/data-provisioning/return-import-report.adoc create mode 100644 docs/src/uml-diagrams/arc42/runtime-view/data-provisioning/import-report-receive.puml diff --git a/docs/src/docs/arc42/runtime-view/data-provisioning.adoc b/docs/src/docs/arc42/runtime-view/data-provisioning.adoc index ebf2c0d76e..7c331d2046 100644 --- a/docs/src/docs/arc42/runtime-view/data-provisioning.adoc +++ b/docs/src/docs/arc42/runtime-view/data-provisioning.adoc @@ -32,3 +32,7 @@ The backend is able to persist the data in the DTR / EDC and allows to use IRS f include::../../../uml-diagrams/arc42/runtime-view/data-provisioning/trace-x-data-import-interface-modul3-sequence.puml[] .... + +TODO: Add all scenarios for data-provisioning + +include::data-provisioning/return-import-report.adoc[leveloffset=+1] diff --git a/docs/src/docs/arc42/runtime-view/data-provisioning/return-import-report.adoc b/docs/src/docs/arc42/runtime-view/data-provisioning/return-import-report.adoc new file mode 100644 index 0000000000..4605230520 --- /dev/null +++ b/docs/src/docs/arc42/runtime-view/data-provisioning/return-import-report.adoc @@ -0,0 +1,16 @@ += Scenario 1: Receive import report + +This section describes what happens when the user wants to get a report of the imported assets associated to a jobId. +In this example, the user requests an import report. + +[plantuml,target=import-report-receive,format=svg] +.... +include::../../../../uml-diagrams/arc42/runtime-view/data-provisioning/import-report-receive.puml[] +.... + +==== Overview + +When a user requests an import report, TraceX-FOSS checks if the user has an adequate role ('ROLE_ADMIN', 'ROLE_SUPERVISOR'). +If yes, then the endpoint returns an import report to the given import job id. + +If the import job id is not known to Trace-X, an HTTP 404 error is returned. diff --git a/docs/src/uml-diagrams/arc42/runtime-view/data-provisioning/import-report-receive.puml b/docs/src/uml-diagrams/arc42/runtime-view/data-provisioning/import-report-receive.puml new file mode 100644 index 0000000000..16ef51edae --- /dev/null +++ b/docs/src/uml-diagrams/arc42/runtime-view/data-provisioning/import-report-receive.puml @@ -0,0 +1,39 @@ +@startuml +skinparam monochrome true +skinparam shadowing false +autonumber "[000]" + +actor TraceXApiConsumer +activate TraceXApiConsumer + +box "Trace-X FOSS" #LightGrey +participant TraceXAPI +activate TraceXAPI +participant ImportController +activate ImportController +participant ImportService +activate ImportService +participant ImportJobRepository +activate ImportJobRepository +participant JpaImportJobRepository +activate JpaImportJobRepository +database TracexDatabase + +TraceXApiConsumer -> TraceXAPI : GET /assets/import/report/{importJobId} +TraceXAPI -> ImportController : getImportReport +ImportController -> ImportService : getImportJob(importJobId) +ImportService -> ImportJobRepository: getImportJob(importJobId) +ImportJobRepository -> JpaImportJobRepository: getReferenceById(importJobId) +JpaImportJobRepository -> TracexDatabase : find import job with associated assets + +JpaImportJobRepository <-- TracexDatabase +ImportJobRepository <-- JpaImportJobRepository +ImportService <-- ImportJobRepository +ImportController <-- ImportService +TraceXAPI <-- ImportController +TraceXApiConsumer <-- TraceXAPI : map ImportJob to ImportReportResponse + + + + +@enduml From b0f0459b2ffdc9f39bc05288f895aaf8c69c5917 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Thu, 15 Feb 2024 11:15:07 +0100 Subject: [PATCH 14/34] chore(tx-backend): #414 test sonar issue --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 37ea281756..4e297c13cb 100644 --- a/pom.xml +++ b/pom.xml @@ -60,7 +60,7 @@ SPDX-License-Identifier: Apache-2.0 4.8.3.0 3.1.3 3.4.5 - 3.10.0.2594 + 3.9.1.2184 3.2.5 3.2.5 4.0.0-M11 From bf1384b325985f0cbeacdf49d97929b152358b3c Mon Sep 17 00:00:00 2001 From: ds-lcapellino Date: Thu, 15 Feb 2024 11:20:00 +0100 Subject: [PATCH 15/34] feature: 416 add scenario documentation --- .../data-provisioning/return-import-report.adoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/src/docs/arc42/runtime-view/data-provisioning/return-import-report.adoc b/docs/src/docs/arc42/runtime-view/data-provisioning/return-import-report.adoc index 4605230520..2f1ede3fd1 100644 --- a/docs/src/docs/arc42/runtime-view/data-provisioning/return-import-report.adoc +++ b/docs/src/docs/arc42/runtime-view/data-provisioning/return-import-report.adoc @@ -1,6 +1,6 @@ = Scenario 1: Receive import report -This section describes what happens when the user wants to get a report of the imported assets associated to a jobId. +This section describes what happens when the user wants to get a report of the imported assets associated to a importJobId. In this example, the user requests an import report. [plantuml,target=import-report-receive,format=svg] @@ -11,6 +11,6 @@ include::../../../../uml-diagrams/arc42/runtime-view/data-provisioning/import-re ==== Overview When a user requests an import report, TraceX-FOSS checks if the user has an adequate role ('ROLE_ADMIN', 'ROLE_SUPERVISOR'). -If yes, then the endpoint returns an import report to the given import job id. +If yes, then the endpoint returns an import report to the given importJobId. -If the import job id is not known to Trace-X, an HTTP 404 error is returned. +If the importJobId is not known to Trace-X, an HTTP 404 error is returned. From c280cbfb8db69937bfa311a10695290f2b6e4dd0 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Thu, 15 Feb 2024 11:20:45 +0100 Subject: [PATCH 16/34] chore(tx-backend): #414 test sonar issue --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 4e297c13cb..d731696ba6 100644 --- a/pom.xml +++ b/pom.xml @@ -60,7 +60,7 @@ SPDX-License-Identifier: Apache-2.0 4.8.3.0 3.1.3 3.4.5 - 3.9.1.2184 + 3.10.0.2594 3.2.5 3.2.5 4.0.0-M11 @@ -100,7 +100,7 @@ SPDX-License-Identifier: Apache-2.0 7.12.1 2.2 2.15.2 - 5.10.2 + 5.9.3 3.0.0 1.5.1-SNAPSHOT 5.4.0 From fefbfeafaebf9d8b449e9861c586dd8fe893e574 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Thu, 15 Feb 2024 11:25:47 +0100 Subject: [PATCH 17/34] chore(tx-backend): #414 test sonar issue --- .../qualitynotification/domain/base/service/HttpCallService.java | 1 - 1 file changed, 1 deletion(-) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/service/HttpCallService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/service/HttpCallService.java index cac522abd1..536411016d 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/service/HttpCallService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/service/HttpCallService.java @@ -47,7 +47,6 @@ public void sendRequest(final EdcNotificationRequest request) { try { var response = edcNotificationTemplate.exchange(request.getUrl(), HttpMethod.POST, entity, new ParameterizedTypeReference<>() { }); - log.debug("Control plane responded with response: {}", response); log.info("Control plane responded with status: {}", response.getStatusCode()); if (!response.getStatusCode().is2xxSuccessful()) { throw new BadRequestException(format("Control plane responded with: %s", response.getStatusCode())); From b9300687b7fe08fc0cfbcb208a5346d88743aa1a Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Thu, 15 Feb 2024 11:29:59 +0100 Subject: [PATCH 18/34] chore(tx-backend): #414 test upload-artifact issue --- .github/workflows/eclipse-dash.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/eclipse-dash.yml b/.github/workflows/eclipse-dash.yml index 7e7975ee3b..f00947aa1c 100644 --- a/.github/workflows/eclipse-dash.yml +++ b/.github/workflows/eclipse-dash.yml @@ -79,6 +79,6 @@ jobs: - name: upload results if: always() - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v3 with: path: DEPENDENCIES_BACKEND From 320fce09cd1f1c287dba177448be66d7bccd3c37 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Thu, 15 Feb 2024 11:33:23 +0100 Subject: [PATCH 19/34] chore(tx-backend): #414 test upload-artifact issue --- .github/workflows/eclipse-dash.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/eclipse-dash.yml b/.github/workflows/eclipse-dash.yml index f00947aa1c..7e7975ee3b 100644 --- a/.github/workflows/eclipse-dash.yml +++ b/.github/workflows/eclipse-dash.yml @@ -79,6 +79,6 @@ jobs: - name: upload results if: always() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: path: DEPENDENCIES_BACKEND From 1ca372c68ee44f6839ca58a3c9d1ecc41768f1d8 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Thu, 15 Feb 2024 11:35:18 +0100 Subject: [PATCH 20/34] chore(tx-backend): #414 test upload-artifact issue --- .github/workflows/eclipse-dash.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/eclipse-dash.yml b/.github/workflows/eclipse-dash.yml index 7e7975ee3b..9cac16af8a 100644 --- a/.github/workflows/eclipse-dash.yml +++ b/.github/workflows/eclipse-dash.yml @@ -82,3 +82,4 @@ jobs: uses: actions/upload-artifact@v4 with: path: DEPENDENCIES_BACKEND + overwrite: true From f2370285f9b2ae5ca17eb98906be2e26b2f23b3e Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Thu, 15 Feb 2024 11:39:23 +0100 Subject: [PATCH 21/34] chore(tx-backend): #414 test upload-artifact issue --- .../assets/infrastructure/base/irs/IrsClient.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/IrsClient.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/IrsClient.java index 135067782c..917dc88a10 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/IrsClient.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/IrsClient.java @@ -49,8 +49,6 @@ public class IrsClient { private static final String POLICY_PATH = "/irs/policies"; - private static final String JOB_PATH = "/irs/jobs"; - public IrsClient(RestTemplate irsAdminTemplate, RestTemplate irsRegularTemplate, TraceabilityProperties traceabilityProperties, ObjectMapper objectMapper) { @@ -76,7 +74,7 @@ public void registerPolicy() { } public void registerJob(RegisterJobRequest registerJobRequest) { - irsRegularTemplate.exchange(JOB_PATH, HttpMethod.POST, new HttpEntity<>(registerJobRequest), Void.class); + irsRegularTemplate.exchange("/irs/jobs", HttpMethod.POST, new HttpEntity<>(registerJobRequest), Void.class); } @@ -88,6 +86,6 @@ public JobDetailResponse getJobDetailResponse(String jobId) { } private String buildGetJobDetailUrl(String jobId) { - return JOB_PATH + "/" + jobId; + return "/irs/jobs/" + jobId; } } From 04168f8c3c3d91f1b5a7c89e291add88e372cc60 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Thu, 15 Feb 2024 12:24:20 +0100 Subject: [PATCH 22/34] chore(tx-backend): #414 fix injection issue on callback jobId --- .../base/irs/IrsCallbackController.java | 91 ++++++++++--------- .../infrastructure/base/irs/IrsClient.java | 12 +-- .../infrastructure/base/irs/IrsService.java | 1 + .../base/IrsCallbackControllerIT.java | 26 ++++++ 4 files changed, 75 insertions(+), 55 deletions(-) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/IrsCallbackController.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/IrsCallbackController.java index 328abe5f70..3bd3ec8e28 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/IrsCallbackController.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/IrsCallbackController.java @@ -20,10 +20,8 @@ package org.eclipse.tractusx.traceability.assets.infrastructure.base.irs; import assets.importpoc.ErrorResponse; -import assets.response.asbuilt.AssetAsBuiltResponse; import io.swagger.v3.oas.annotations.Hidden; import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.media.ArraySchema; import io.swagger.v3.oas.annotations.media.Content; import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.responses.ApiResponse; @@ -50,51 +48,54 @@ public class IrsCallbackController { description = "The endpoint retrieves the information about a job which has been completed recently.", security = @SecurityRequirement(name = "oAuth2", scopes = "profile email")) @ApiResponses(value = {@ApiResponse(responseCode = "200", description = "Retrieves job id in completed state."), - @ApiResponse( - responseCode = "400", - description = "Bad request.", - content = @Content( - mediaType = "application/json", - schema = @Schema(implementation = ErrorResponse.class))), - @ApiResponse( - responseCode = "401", - description = "Authorization failed.", - content = @Content( - mediaType = "application/json", - schema = @Schema(implementation = ErrorResponse.class))), + @ApiResponse( + responseCode = "400", + description = "Bad request.", + content = @Content( + mediaType = "application/json", + schema = @Schema(implementation = ErrorResponse.class))), + @ApiResponse( + responseCode = "401", + description = "Authorization failed.", + content = @Content( + mediaType = "application/json", + schema = @Schema(implementation = ErrorResponse.class))), - @ApiResponse( - responseCode = "403", - description = "Forbidden.", - content = @Content( - mediaType = "application/json", - schema = @Schema(implementation = ErrorResponse.class))), - @ApiResponse( - responseCode = "404", - description = "Not found.", - content = @Content( - mediaType = "application/json", - schema = @Schema(implementation = ErrorResponse.class))), - @ApiResponse( - responseCode = "415", - description = "Unsupported media type", - content = @Content( - mediaType = "application/json", - schema = @Schema(implementation = ErrorResponse.class))), - @ApiResponse( - responseCode = "429", - description = "Too many requests.", - content = @Content( - mediaType = "application/json", - schema = @Schema(implementation = ErrorResponse.class))), - @ApiResponse( - responseCode = "500", - description = "Internal server error.", - content = @Content( - mediaType = "application/json", - schema = @Schema(implementation = ErrorResponse.class)))}) + @ApiResponse( + responseCode = "403", + description = "Forbidden.", + content = @Content( + mediaType = "application/json", + schema = @Schema(implementation = ErrorResponse.class))), + @ApiResponse( + responseCode = "404", + description = "Not found.", + content = @Content( + mediaType = "application/json", + schema = @Schema(implementation = ErrorResponse.class))), + @ApiResponse( + responseCode = "415", + description = "Unsupported media type", + content = @Content( + mediaType = "application/json", + schema = @Schema(implementation = ErrorResponse.class))), + @ApiResponse( + responseCode = "429", + description = "Too many requests.", + content = @Content( + mediaType = "application/json", + schema = @Schema(implementation = ErrorResponse.class))), + @ApiResponse( + responseCode = "500", + description = "Internal server error.", + content = @Content( + mediaType = "application/json", + schema = @Schema(implementation = ErrorResponse.class)))}) @GetMapping("/irs/job/callback") void handleIrsJobCallback(@RequestParam("id") String jobId, @RequestParam("state") String jobState) { - irsRepository.handleJobFinishedCallback(jobId, jobState); + // Security measurment for injection + if (jobId.matches("^[a-zA-Z0-9_-]*$")) { + irsRepository.handleJobFinishedCallback(jobId, jobState); + } } } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/IrsClient.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/IrsClient.java index 917dc88a10..ad5cf0d1f2 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/IrsClient.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/IrsClient.java @@ -18,7 +18,6 @@ ********************************************************************************/ package org.eclipse.tractusx.traceability.assets.infrastructure.base.irs; -import com.fasterxml.jackson.databind.ObjectMapper; import lombok.extern.slf4j.Slf4j; import org.eclipse.tractusx.irs.edc.client.policy.OperatorType; import org.eclipse.tractusx.traceability.assets.infrastructure.base.irs.model.request.RegisterJobRequest; @@ -39,10 +38,8 @@ @Component public class IrsClient { - private final RestTemplate irsAdminTemplate; - private final ObjectMapper objectMapper; private final RestTemplate irsRegularTemplate; private final TraceabilityProperties traceabilityProperties; @@ -51,11 +48,10 @@ public class IrsClient { public IrsClient(RestTemplate irsAdminTemplate, RestTemplate irsRegularTemplate, - TraceabilityProperties traceabilityProperties, ObjectMapper objectMapper) { + TraceabilityProperties traceabilityProperties) { this.irsAdminTemplate = irsAdminTemplate; this.irsRegularTemplate = irsRegularTemplate; this.traceabilityProperties = traceabilityProperties; - this.objectMapper = objectMapper; } public List getPolicies() { @@ -80,12 +76,8 @@ public void registerJob(RegisterJobRequest registerJobRequest) { @Nullable public JobDetailResponse getJobDetailResponse(String jobId) { - final String jobUrl = buildGetJobDetailUrl(jobId); - return irsRegularTemplate.exchange(jobUrl, HttpMethod.GET, null, new ParameterizedTypeReference() { + return irsRegularTemplate.exchange("/irs/jobs/" + jobId, HttpMethod.GET, null, new ParameterizedTypeReference() { }).getBody(); } - private String buildGetJobDetailUrl(String jobId) { - return "/irs/jobs/" + jobId; - } } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/IrsService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/IrsService.java index 86bb09a48e..9142a17690 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/IrsService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/IrsService.java @@ -90,6 +90,7 @@ public void handleJobFinishedCallback(String jobId, String state) { } final JobDetailResponse jobResponse = this.irsClient.getJobDetailResponse(jobId); + long runtime = (jobResponse.jobStatus().lastModifiedOn().getTime() - jobResponse.jobStatus().startedOn().getTime()) / 1000; log.info("IRS call for globalAssetId: {} finished with status: {}, runtime {} s.", jobResponse.jobStatus().globalAssetId(), jobResponse.jobStatus().state(), runtime); diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/infrastructure/base/IrsCallbackControllerIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/infrastructure/base/IrsCallbackControllerIT.java index 19a79cdc40..62936b7913 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/infrastructure/base/IrsCallbackControllerIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/infrastructure/base/IrsCallbackControllerIT.java @@ -98,6 +98,32 @@ void givenNoAssets_whenCallbackReceivedForAsPlanned_thenSaveThem() { assetsSupport.assertAssetAsPlannedSize(2); } + @Test + void givenInvalidJobId_whenCallbackReceivedForAsPlanned_thenNothingSynchronized() { + // given + oAuth2ApiSupport.oauth2ApiReturnsTechnicalUserToken(); + irsApiSupport.irsJobDetailsAsPlanned(); + String invalidJobId = "irs/admin/test/ID"; + String jobState = "COMPLETED"; + + // when + given() + .contentType(ContentType.JSON) + .log().all() + .when() + .param("id", invalidJobId) + .param("state", jobState) + .get("/api/irs/job/callback") + .then() + .log().all() + .statusCode(200); + + // then + assertThat(bpnSupportRepository.findAll()).isEmpty(); + assetsSupport.assertAssetAsBuiltSize(0); + assetsSupport.assertAssetAsPlannedSize(0); + } + @Test void givenAssetExist_whenCallbackReceived_thenUpdateIt() { // given From 0915a508331d0b3bf19b1527355c5c98c15507e9 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Thu, 15 Feb 2024 13:09:58 +0100 Subject: [PATCH 23/34] chore(tx-backend): #414 add changelog --- CHANGELOG.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e1d626b19..c044bc95a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,18 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ### Added - added tombstone icon to parts table and error description in parts detail view + ### Changed +- actions/chache bumped from v3 to v4 +- borales/actions-yarn bumped from v4 to v5 +- peter-evans/create-pull-request bumped from v5 to v6 +- peter-evans/dockerhub-description bumped from v3 to v4 +- aquasecurity/trivy-action bumped from 0.16.1 to 0.17.0 +- sonar-maven-plugin bumped from 3.9.1.2184 to 3.10.0.2594 +- rest-assured bumped from 5.3.2 to 5.4.0 +- testcontainer-postgresql bumped from 1.19.1 to 1.19.4 +- tomcat-embed-websocket bumped from 10.1.16 to 10.1.18 +- IrsCallbackController is now validating jobId to prevent log injections from unwanted usage ### Removed From f8912de3a541440ad9ae541b5be1a23b70611bf5 Mon Sep 17 00:00:00 2001 From: ds-lcapellino Date: Thu, 15 Feb 2024 15:06:47 +0100 Subject: [PATCH 24/34] feature: 416 cancel job in case of errors --- .../assets/application/importpoc/rest/ImportController.java | 1 + 1 file changed, 1 insertion(+) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/rest/ImportController.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/rest/ImportController.java index 203446ee81..0a1064cf5e 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/rest/ImportController.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/rest/ImportController.java @@ -140,6 +140,7 @@ public ResponseEntity importJson(@RequestPart("file") MultipartF if (!jsonSchemaErrors.isEmpty()) { log.warn("Asset import request cannot be processed. Errors: {}", validationResponse); + importService.cancelJob(importJob); return ResponseEntity .badRequest() .body(new ImportResponse(importJob.getId().toString(), validationResponse)); From 7845dc7e5c5b34e3fe08777fcda29e4598a596b1 Mon Sep 17 00:00:00 2001 From: Martin Maul Date: Thu, 15 Feb 2024 16:04:28 +0100 Subject: [PATCH 25/34] chore(security): XXX fix medium security findings from veracode --- frontend/src/app/modules/shared/service/parts.service.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/modules/shared/service/parts.service.ts b/frontend/src/app/modules/shared/service/parts.service.ts index 25d9d0493e..e6618a32df 100644 --- a/frontend/src/app/modules/shared/service/parts.service.ts +++ b/frontend/src/app/modules/shared/service/parts.service.ts @@ -93,11 +93,16 @@ export class PartsService { } public getPart(id: string): Observable { + if(!id || typeof id !== 'string') { + throw new Error('invalid ID'); + } + + const encodedId = encodeURIComponent(id); - let resultsAsBuilt = this.apiService.get(`${ this.url }/assets/as-built/${ id }`) + let resultsAsBuilt = this.apiService.get(`${ this.url }/assets/as-built/${ encodedId }`) .pipe(map(part => PartsAssembler.assemblePart(part, MainAspectType.AS_BUILT))); - let resultsAsPlanned = this.apiService.get(`${ this.url }/assets/as-planned/${ id }`) + let resultsAsPlanned = this.apiService.get(`${ this.url }/assets/as-planned/${ encodedId }`) .pipe(map(part => PartsAssembler.assemblePart(part, MainAspectType.AS_PLANNED))); return resultsAsBuilt || resultsAsPlanned; From 5b2063fd9b1cf732400ade68528c76ecceacf39a Mon Sep 17 00:00:00 2001 From: ds-mmaul <117836305+ds-mmaul@users.noreply.github.com> Date: Thu, 15 Feb 2024 15:22:05 +0000 Subject: [PATCH 26/34] Update Dependencies Backend Action --- DEPENDENCIES_BACKEND | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/DEPENDENCIES_BACKEND b/DEPENDENCIES_BACKEND index 3a727148ed..a0341d19fb 100644 --- a/DEPENDENCIES_BACKEND +++ b/DEPENDENCIES_BACKEND @@ -22,6 +22,8 @@ maven/mavencentral/com.fasterxml/classmate/1.5.1, Apache-2.0, approved, clearlyd 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.java-json-tools.jackson-coreutils/jackson-coreutils-equivalence/2.0, , restricted, clearlydefined +maven/mavencentral/com.github.java-json-tools.jackson-coreutils/jackson-coreutils/2.0, , restricted, clearlydefined maven/mavencentral/com.github.java-json-tools/btf/1.3, Apache-2.0 OR LGPL-3.0-or-later, approved, #2721 maven/mavencentral/com.github.java-json-tools/jackson-coreutils-equivalence/1.0, LGPL-3.0 OR Apache-2.0, approved, clearlydefined maven/mavencentral/com.github.java-json-tools/jackson-coreutils/2.0, Apache-2.0 OR LGPL-3.0-or-later, approved, #2719 @@ -111,10 +113,13 @@ maven/mavencentral/io.opentelemetry/opentelemetry-api/1.29.0, Apache-2.0, approv maven/mavencentral/io.opentelemetry/opentelemetry-context/1.25.0, Apache-2.0, approved, clearlydefined maven/mavencentral/io.opentelemetry/opentelemetry-context/1.29.0, Apache-2.0, approved, #10090 maven/mavencentral/io.rest-assured/json-path/5.3.2, Apache-2.0, approved, #9261 +maven/mavencentral/io.rest-assured/json-path/5.4.0, Apache-2.0, approved, #12042 maven/mavencentral/io.rest-assured/json-schema-validator/5.4.0, Apache-2.0, approved, clearlydefined 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/rest-assured-common/5.4.0, Apache-2.0, approved, #12039 +maven/mavencentral/io.rest-assured/rest-assured/5.4.0, Apache-2.0, approved, #12040 maven/mavencentral/io.rest-assured/xml-path/5.3.2, Apache-2.0, approved, #9267 +maven/mavencentral/io.rest-assured/xml-path/5.4.0, Apache-2.0, approved, #12038 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-annotations/2.2.16, Apache-2.0, approved, #11362 @@ -156,11 +161,11 @@ maven/mavencentral/org.apache.commons/commons-compress/1.23.0, Apache-2.0 AND BS 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.16, Apache-2.0, approved, #7411 maven/mavencentral/org.apache.groovy/groovy-json/4.0.17, 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.16, Apache-2.0, approved, #10179 maven/mavencentral/org.apache.groovy/groovy-xml/4.0.17, 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.16, Apache-2.0 AND BSD-3-Clause AND MIT, approved, #1742 maven/mavencentral/org.apache.groovy/groovy/4.0.17, 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 @@ -169,12 +174,9 @@ maven/mavencentral/org.apache.httpcomponents/httpmime/4.5.13, Apache-2.0, approv 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.16, 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-core/10.1.18, 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.18, Apache-2.0, approved, #6997 -maven/mavencentral/org.apache.tomcat.embed/tomcat-embed-websocket/10.1.16, Apache-2.0, approved, #7920 maven/mavencentral/org.apache.tomcat.embed/tomcat-embed-websocket/10.1.18, Apache-2.0, approved, #7920 -maven/mavencentral/org.apache.tomcat/tomcat-annotations-api/10.1.16, Apache-2.0, approved, #8196 maven/mavencentral/org.apache.tomcat/tomcat-annotations-api/10.1.18, Apache-2.0, approved, #8196 maven/mavencentral/org.apiguardian/apiguardian-api/1.1.2, Apache-2.0, approved, clearlydefined maven/mavencentral/org.aspectj/aspectjweaver/1.9.21, Apache-2.0 AND BSD-3-Clause AND EPL-1.0 AND BSD-3-Clause AND Apache-1.1, approved, #7695 @@ -434,8 +436,8 @@ maven/mavencentral/org.springframework/spring-web/6.0.16, Apache-2.0, approved, maven/mavencentral/org.springframework/spring-webmvc/6.0.16, 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.1, MIT, approved, #10344 -maven/mavencentral/org.testcontainers/postgresql/1.19.1, MIT, approved, #10350 +maven/mavencentral/org.testcontainers/junit-jupiter/1.19.4, MIT, approved, #10344 +maven/mavencentral/org.testcontainers/postgresql/1.19.4, 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 From 0a4bbc56a3397b0f5441299d0f0b1b860a210d6b Mon Sep 17 00:00:00 2001 From: Maximilian Wesener Date: Mon, 19 Feb 2024 07:42:29 +0100 Subject: [PATCH 27/34] chore(security): 516 removed investigation / alert from asPlanned entities --- .../openapi/traceability-foss-backend.json | 1911 +++++++++-------- .../asplanned/model/AssetAsPlannedEntity.java | 18 +- .../service/NotificationPublisherService.java | 6 +- .../model/InvestigationEntity.java | 10 - .../InvestigationNotificationEntity.java | 9 - .../AssetAsPlannedControllerByIdIT.java | 52 - .../common/support/InvestigationsSupport.java | 1 - 7 files changed, 964 insertions(+), 1043 deletions(-) diff --git a/tx-backend/openapi/traceability-foss-backend.json b/tx-backend/openapi/traceability-foss-backend.json index 2b434372ba..fecc0bbd84 100644 --- a/tx-backend/openapi/traceability-foss-backend.json +++ b/tx-backend/openapi/traceability-foss-backend.json @@ -37,8 +37,8 @@ "description" : "The endpoint returns a result of BPN EDC URL mappings.", "operationId" : "getBpnEdcs", "responses" : { - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -47,8 +47,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -57,18 +57,20 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "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.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -77,8 +79,8 @@ } } }, - "404" : { - "description" : "Not found.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -87,20 +89,18 @@ } } }, - "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" } } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -109,8 +109,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -151,8 +151,8 @@ "required" : true }, "responses" : { - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -161,8 +161,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -171,8 +171,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -181,8 +181,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -191,8 +191,8 @@ } } }, - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -213,8 +213,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -223,8 +223,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -265,8 +265,8 @@ "required" : true }, "responses" : { - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -275,8 +275,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -285,8 +285,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -295,8 +295,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -305,8 +305,8 @@ } } }, - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -327,8 +327,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -337,8 +337,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -376,8 +376,8 @@ } ], "responses" : { - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -386,8 +386,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -396,8 +396,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -406,8 +406,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -416,8 +416,8 @@ } } }, - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -426,14 +426,8 @@ } } }, - "200" : { - "description" : "Returns the paged result found", - "content" : { - "application/json" : {} - } - }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -442,8 +436,14 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "200" : { + "description" : "Returns the paged result found", + "content" : { + "application/json" : {} + } + }, + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -489,8 +489,8 @@ "required" : true }, "responses" : { - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -499,8 +499,18 @@ } } }, - "400" : { - "description" : "Bad request.", + "415" : { + "description" : "Unsupported media type", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -515,8 +525,8 @@ "application/json" : {} } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -525,18 +535,14 @@ } } }, - "500" : { - "description" : "Internal server error.", + "200" : { + "description" : "Ok.", "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } + "application/json" : {} } }, - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -545,8 +551,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -555,14 +561,8 @@ } } }, - "200" : { - "description" : "Ok.", - "content" : { - "application/json" : {} - } - }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -600,8 +600,8 @@ "required" : true }, "responses" : { - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -610,8 +610,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -620,8 +620,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -630,8 +630,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -640,8 +640,8 @@ } } }, - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -650,28 +650,28 @@ } } }, - "201" : { - "description" : "Created.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/QualityNotificationIdResponse" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "403" : { - "description" : "Forbidden.", + "201" : { + "description" : "Created.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "$ref" : "#/components/schemas/QualityNotificationIdResponse" } } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -720,8 +720,11 @@ "required" : true }, "responses" : { - "429" : { - "description" : "Too many requests.", + "204" : { + "description" : "No content." + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -730,8 +733,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -740,8 +743,11 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "200" : { + "description" : "Ok." + }, + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -750,8 +756,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -760,14 +766,8 @@ } } }, - "204" : { - "description" : "No content." - }, - "200" : { - "description" : "Ok." - }, - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -776,8 +776,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -786,8 +786,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -836,8 +836,11 @@ "required" : true }, "responses" : { - "429" : { - "description" : "Too many requests.", + "204" : { + "description" : "No content." + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -846,8 +849,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -856,8 +859,11 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "200" : { + "description" : "Ok." + }, + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -866,8 +872,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -876,14 +882,8 @@ } } }, - "204" : { - "description" : "No content." - }, - "200" : { - "description" : "Ok." - }, - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -892,8 +892,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -902,8 +902,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -942,8 +942,8 @@ } ], "responses" : { - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -952,8 +952,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -962,8 +962,11 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "200" : { + "description" : "Ok." + }, + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -972,8 +975,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -982,11 +985,11 @@ } } }, - "200" : { - "description" : "Ok." + "204" : { + "description" : "No content." }, - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -995,11 +998,8 @@ } } }, - "204" : { - "description" : "No content." - }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1008,8 +1008,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1048,8 +1048,8 @@ } ], "responses" : { - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1058,8 +1058,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1068,8 +1068,11 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "200" : { + "description" : "Ok." + }, + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1078,8 +1081,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1088,11 +1091,11 @@ } } }, - "200" : { - "description" : "Ok." + "204" : { + "description" : "No content." }, - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1101,11 +1104,8 @@ } } }, - "204" : { - "description" : "No content." - }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1114,8 +1114,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1153,18 +1153,20 @@ "required" : true }, "responses" : { - "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" } } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1183,8 +1185,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1193,8 +1195,8 @@ } } }, - "404" : { - "description" : "Not found.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1203,20 +1205,18 @@ } } }, - "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" } } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1225,8 +1225,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1264,8 +1264,8 @@ "required" : true }, "responses" : { - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1274,8 +1274,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1284,8 +1284,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1294,8 +1294,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1304,8 +1304,8 @@ } } }, - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1314,28 +1314,28 @@ } } }, - "201" : { - "description" : "Created.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/CreateNotificationContractResponse" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "403" : { - "description" : "Forbidden.", + "201" : { + "description" : "Created.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "$ref" : "#/components/schemas/CreateNotificationContractResponse" } } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1374,8 +1374,8 @@ "required" : true }, "responses" : { - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1384,8 +1384,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1394,11 +1394,8 @@ } } }, - "204" : { - "description" : "No Content." - }, - "415" : { - "description" : "Unsupported media type", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1407,8 +1404,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1417,8 +1414,14 @@ } } }, - "404" : { - "description" : "Not found.", + "200" : { + "description" : "OK.", + "content" : { + "application/json" : {} + } + }, + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1427,8 +1430,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1437,14 +1440,8 @@ } } }, - "200" : { - "description" : "OK.", - "content" : { - "application/json" : {} - } - }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1452,6 +1449,9 @@ } } } + }, + "204" : { + "description" : "No Content." } }, "security" : [ @@ -1490,8 +1490,8 @@ } }, "responses" : { - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1500,8 +1500,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1510,11 +1510,8 @@ } } }, - "204" : { - "description" : "No Content." - }, - "415" : { - "description" : "Unsupported media type", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1523,8 +1520,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1533,8 +1530,14 @@ } } }, - "404" : { - "description" : "Not found.", + "200" : { + "description" : "OK.", + "content" : { + "application/json" : {} + } + }, + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1543,8 +1546,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1553,14 +1556,8 @@ } } }, - "200" : { - "description" : "OK.", - "content" : { - "application/json" : {} - } - }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1568,6 +1565,9 @@ } } } + }, + "204" : { + "description" : "No Content." } }, "security" : [ @@ -1598,8 +1598,8 @@ "required" : true }, "responses" : { - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1608,8 +1608,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1618,8 +1618,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1628,8 +1628,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1638,8 +1638,8 @@ } } }, - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1648,11 +1648,8 @@ } } }, - "201" : { - "description" : "Created." - }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1661,8 +1658,11 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "201" : { + "description" : "Created." + }, + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1700,18 +1700,20 @@ "required" : true }, "responses" : { - "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" } } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1730,8 +1732,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1740,8 +1742,8 @@ } } }, - "404" : { - "description" : "Not found.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1750,20 +1752,18 @@ } } }, - "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" } } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1772,8 +1772,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1811,8 +1811,8 @@ "required" : true }, "responses" : { - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1821,8 +1821,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1831,8 +1831,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1841,8 +1841,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1851,8 +1851,8 @@ } } }, - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1861,11 +1861,8 @@ } } }, - "201" : { - "description" : "Created." - }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1874,8 +1871,11 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "201" : { + "description" : "Created." + }, + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1913,8 +1913,8 @@ "required" : true }, "responses" : { - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1923,8 +1923,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1933,8 +1933,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1943,18 +1943,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.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1963,20 +1965,18 @@ } } }, - "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" } } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1985,8 +1985,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -2024,8 +2024,8 @@ "required" : true }, "responses" : { - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2034,8 +2034,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2044,8 +2044,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2054,8 +2054,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -2064,8 +2064,8 @@ } } }, - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2074,28 +2074,28 @@ } } }, - "201" : { - "description" : "Created.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/QualityNotificationIdResponse" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "403" : { - "description" : "Forbidden.", + "201" : { + "description" : "Created.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "$ref" : "#/components/schemas/QualityNotificationIdResponse" } } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -2144,8 +2144,11 @@ "required" : true }, "responses" : { - "429" : { - "description" : "Too many requests.", + "204" : { + "description" : "No content." + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2154,8 +2157,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2164,8 +2167,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2174,8 +2177,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -2184,11 +2187,8 @@ } } }, - "204" : { - "description" : "No content." - }, - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2197,8 +2197,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2207,8 +2207,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -2257,8 +2257,11 @@ "required" : true }, "responses" : { - "429" : { - "description" : "Too many requests.", + "204" : { + "description" : "No content." + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2267,8 +2270,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2277,8 +2280,11 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "200" : { + "description" : "Ok." + }, + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2287,8 +2293,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -2297,14 +2303,8 @@ } } }, - "204" : { - "description" : "No content." - }, - "200" : { - "description" : "Ok." - }, - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2313,8 +2313,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2323,8 +2323,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -2363,8 +2363,8 @@ } ], "responses" : { - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2373,8 +2373,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2383,8 +2383,11 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "200" : { + "description" : "Ok." + }, + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2393,8 +2396,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -2403,11 +2406,11 @@ } } }, - "200" : { - "description" : "Ok." + "204" : { + "description" : "No content." }, - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2416,11 +2419,8 @@ } } }, - "204" : { - "description" : "No content." - }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2429,8 +2429,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -2469,8 +2469,8 @@ } ], "responses" : { - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2479,8 +2479,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2489,8 +2489,11 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "200" : { + "description" : "Ok." + }, + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2499,8 +2502,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -2509,11 +2512,11 @@ } } }, - "200" : { - "description" : "Ok." + "204" : { + "description" : "No content." }, - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2522,11 +2525,8 @@ } } }, - "204" : { - "description" : "No content." - }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2535,8 +2535,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -2574,8 +2574,8 @@ "required" : true }, "responses" : { - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2584,29 +2584,29 @@ } } }, - "200" : { - "description" : "Returns the paged result found for Asset", + "415" : { + "description" : "Unsupported media type", "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" } } } }, - "415" : { - "description" : "Unsupported media type", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2615,8 +2615,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -2625,8 +2625,8 @@ } } }, - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2635,8 +2635,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2645,8 +2645,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -2684,8 +2684,8 @@ } ], "responses" : { - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2694,8 +2694,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2704,8 +2704,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2714,8 +2714,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -2724,8 +2724,8 @@ } } }, - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2734,8 +2734,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2898,8 +2898,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -2945,6 +2945,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" + } + } + } + }, + "403" : { + "description" : "Forbidden.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, "429" : { "description" : "Too many requests.", "content" : { @@ -2955,6 +2985,26 @@ } } }, + "400" : { + "description" : "Bad request.", + "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" : { @@ -3109,36 +3159,6 @@ } } }, - "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" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "404" : { "description" : "Not found.", "content" : { @@ -3148,26 +3168,6 @@ } } } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } } }, "security" : [ @@ -3198,8 +3198,18 @@ } ], "responses" : { - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3362,18 +3372,8 @@ } } }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3382,8 +3382,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -3392,8 +3392,8 @@ } } }, - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3402,8 +3402,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3412,8 +3412,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -3459,8 +3459,8 @@ "required" : true }, "responses" : { - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -3469,8 +3469,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3479,8 +3479,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3489,8 +3489,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -3499,8 +3499,18 @@ } } }, - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3663,18 +3673,8 @@ } } }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -3702,8 +3702,8 @@ "description" : "The endpoint Triggers reload of shell descriptors.", "operationId" : "reload", "responses" : { - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -3712,8 +3712,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3722,8 +3722,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3732,8 +3732,11 @@ } } }, - "500" : { - "description" : "Internal server error.", + "202" : { + "description" : "Created registry reload job." + }, + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -3742,8 +3745,8 @@ } } }, - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3752,11 +3755,8 @@ } } }, - "202" : { - "description" : "Created registry reload job." - }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3765,8 +3765,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -3794,18 +3794,18 @@ "description" : "The endpoint returns all policies .", "operationId" : "policy", "responses" : { - "429" : { - "description" : "Too many requests.", + "200" : { + "description" : "Returns the policies", "content" : { - "application/json" : { + "*/*" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "$ref" : "#/components/schemas/PolicyResponse" } } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -3824,8 +3824,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3834,8 +3834,8 @@ } } }, - "404" : { - "description" : "Not found.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -3844,18 +3844,18 @@ } } }, - "200" : { - "description" : "Returns the policies", + "400" : { + "description" : "Bad request.", "content" : { - "*/*" : { + "application/json" : { "schema" : { - "$ref" : "#/components/schemas/PolicyResponse" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3864,8 +3864,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -3904,8 +3904,8 @@ } ], "responses" : { - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -3914,8 +3914,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3924,18 +3924,24 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "200" : { + "description" : "OK.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : -2147483648, + "type" : "array", + "description" : "Investigations", + "items" : { + "$ref" : "#/components/schemas/InvestigationResponse" + } } } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3944,24 +3950,18 @@ } } }, - "200" : { - "description" : "OK.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : -2147483648, - "type" : "array", - "description" : "Investigations", - "items" : { - "$ref" : "#/components/schemas/InvestigationResponse" - } + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3970,8 +3970,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3980,8 +3980,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -4049,20 +4049,18 @@ } ], "responses" : { - "200" : { - "description" : "Returns a distinct filter values for given fieldName.", + "401" : { + "description" : "Authorization failed.", "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" : { @@ -4071,8 +4069,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -4081,18 +4079,20 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "200" : { + "description" : "Returns a distinct filter values for given fieldName.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -4101,8 +4101,8 @@ } } }, - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -4111,8 +4111,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -4121,8 +4121,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -4150,8 +4150,8 @@ "description" : "The endpoint can return limited data based on the user role", "operationId" : "dashboard", "responses" : { - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -4160,8 +4160,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -4170,8 +4170,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -4180,18 +4180,18 @@ } } }, - "500" : { - "description" : "Internal server error.", + "200" : { + "description" : "Returns dashboard data", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "$ref" : "#/components/schemas/DashboardResponse" } } } }, - "404" : { - "description" : "Not found.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -4200,8 +4200,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -4210,18 +4210,18 @@ } } }, - "200" : { - "description" : "Returns dashboard data", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/DashboardResponse" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -4240,7 +4240,7 @@ ] } }, - "/assets/report/{importJobId}" : { + "/assets/import/report/{importJobId}" : { "get" : { "tags" : [ "ImportReport", @@ -4260,8 +4260,8 @@ } ], "responses" : { - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -4270,8 +4270,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -4280,11 +4280,8 @@ } } }, - "204" : { - "description" : "No Content." - }, - "415" : { - "description" : "Unsupported media type", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -4293,18 +4290,18 @@ } } }, - "500" : { - "description" : "Internal server error.", + "200" : { + "description" : "OK.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "$ref" : "#/components/schemas/ImportReportResponse" } } } }, - "404" : { - "description" : "Not found.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -4313,8 +4310,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -4323,18 +4320,18 @@ } } }, - "200" : { - "description" : "OK.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ImportReportResponse" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -4342,6 +4339,9 @@ } } } + }, + "204" : { + "description" : "No Content." } }, "security" : [ @@ -4374,44 +4374,14 @@ "name" : "filter", "in" : "query", "required" : true, - "schema" : { - "$ref" : "#/components/schemas/SearchCriteriaRequestParam" - } - } - ], - "responses" : { - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "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" - } - } + "schema" : { + "$ref" : "#/components/schemas/SearchCriteriaRequestParam" } - }, - "500" : { - "description" : "Internal server error.", + } + ], + "responses" : { + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -4420,8 +4390,8 @@ } } }, - "404" : { - "description" : "Not found.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -4599,8 +4569,38 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "400" : { + "description" : "Bad request.", + "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" : { @@ -4670,20 +4670,18 @@ } ], "responses" : { - "200" : { - "description" : "Returns a distinct filter values for given fieldName.", + "401" : { + "description" : "Authorization failed.", "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" : { @@ -4692,8 +4690,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -4702,18 +4700,20 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "200" : { + "description" : "Returns a distinct filter values for given fieldName.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -4722,8 +4722,8 @@ } } }, - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -4732,8 +4732,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -4742,8 +4742,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -4781,8 +4781,8 @@ } ], "responses" : { - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -4791,8 +4791,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -4801,8 +4801,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -4811,8 +4811,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -4821,8 +4821,8 @@ } } }, - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -4985,8 +4985,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -4995,8 +4995,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -5042,56 +5042,6 @@ } ], "responses" : { - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "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" - } - } - } - }, - "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" - } - } - } - }, "200" : { "description" : "Returns the paged result found for Asset", "content" : { @@ -5251,6 +5201,26 @@ } } }, + "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" + } + } + } + }, "403" : { "description" : "Forbidden.", "content" : { @@ -5261,8 +5231,38 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "400" : { + "description" : "Bad request.", + "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" : { @@ -5332,20 +5332,18 @@ } ], "responses" : { - "200" : { - "description" : "Returns a distinct filter values for given fieldName.", + "401" : { + "description" : "Authorization failed.", "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" : { @@ -5354,8 +5352,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5364,18 +5362,20 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "200" : { + "description" : "Returns a distinct filter values for given fieldName.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -5384,8 +5384,8 @@ } } }, - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -5394,8 +5394,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5404,8 +5404,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -5433,20 +5433,18 @@ "description" : "The endpoint returns a map for assets consumed by the map.", "operationId" : "assetsCountryMap", "responses" : { - "200" : { - "description" : "Returns the assets found", + "401" : { + "description" : "Authorization failed.", "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" : { @@ -5455,8 +5453,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5465,8 +5463,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -5475,8 +5473,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -5485,8 +5483,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5495,8 +5493,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -5505,12 +5503,14 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "200" : { + "description" : "Returns the assets found", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } @@ -5544,8 +5544,8 @@ } ], "responses" : { - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -5554,8 +5554,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -5564,8 +5564,28 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "403" : { + "description" : "Forbidden.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "429" : { + "description" : "Too many requests.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -5747,26 +5767,6 @@ } } } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } } }, "security" : [ @@ -5798,8 +5798,8 @@ } ], "responses" : { - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -5808,8 +5808,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -5818,18 +5818,23 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "200" : { + "description" : "OK.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "type" : "array", + "description" : "Alerts", + "items" : { + "$ref" : "#/components/schemas/AlertResponse" + } } } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5838,23 +5843,18 @@ } } }, - "200" : { - "description" : "OK.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Alerts", - "items" : { - "$ref" : "#/components/schemas/AlertResponse" - } + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -5863,8 +5863,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5873,8 +5873,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -5942,20 +5942,18 @@ } ], "responses" : { - "200" : { - "description" : "Returns a distinct filter values for given fieldName.", + "401" : { + "description" : "Authorization failed.", "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" : { @@ -5964,8 +5962,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5974,18 +5972,20 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "200" : { + "description" : "Returns a distinct filter values for given fieldName.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -5994,8 +5994,8 @@ } } }, - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -6004,8 +6004,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -6014,8 +6014,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -6043,8 +6043,8 @@ "description" : "Deletes all submodels from the system.", "operationId" : "deleteSubmodels", "responses" : { - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -6053,8 +6053,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -6063,8 +6063,11 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "200" : { + "description" : "Ok." + }, + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -6073,8 +6076,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -6083,11 +6086,8 @@ } } }, - "200" : { - "description" : "Ok." - }, - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -6099,8 +6099,8 @@ "204" : { "description" : "No Content." }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -6109,8 +6109,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -6148,8 +6148,11 @@ } ], "responses" : { - "429" : { - "description" : "Too many requests.", + "200" : { + "description" : "Okay" + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -6158,8 +6161,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -6168,8 +6171,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -6178,8 +6181,11 @@ } } }, - "500" : { - "description" : "Internal server error.", + "204" : { + "description" : "Deleted." + }, + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -6188,8 +6194,8 @@ } } }, - "404" : { - "description" : "Not found.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -6198,11 +6204,8 @@ } } }, - "204" : { - "description" : "Deleted." - }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -6211,11 +6214,8 @@ } } }, - "200" : { - "description" : "Okay" - }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -7094,6 +7094,7 @@ "type" : "oauth2", "flows" : { "clientCredentials" : { + "tokenUrl" : "localhost", "scopes" : { "profile email" : "" } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asplanned/model/AssetAsPlannedEntity.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asplanned/model/AssetAsPlannedEntity.java index 22680babee..2cc33fdd01 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asplanned/model/AssetAsPlannedEntity.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asplanned/model/AssetAsPlannedEntity.java @@ -69,15 +69,6 @@ public class AssetAsPlannedEntity extends AssetBaseEntity { @CollectionTable(name = "assets_as_planned_childs", joinColumns = {@JoinColumn(name = "asset_as_planned_id")}) private List childDescriptors; - @ManyToMany(mappedBy = "assetsAsPlanned") - private List investigations = new ArrayList<>(); - - @ManyToMany(mappedBy = "assetsAsPlanned") - private List alerts = new ArrayList<>(); - - @OneToMany(mappedBy = "assetAsPlanned", fetch = FetchType.EAGER) - private List submodels; - @Builder @NoArgsConstructor @AllArgsConstructor @@ -88,6 +79,11 @@ public static class ChildDescription { private String idShort; } + @OneToMany(mappedBy = "assetAsPlanned", fetch = FetchType.EAGER) + private List submodels; + + + public static AssetAsPlannedEntity from(AssetBase asset) { List detailAspectModels = asset.getDetailAspectModels(); AsPlannedInfo asPlannedInfo = AsPlannedInfo.from(detailAspectModels); @@ -138,10 +134,6 @@ public static AssetBase toDomain(AssetAsPlannedEntity entity) { .toList()) .qualityType(entity.getQualityType()) .detailAspectModels(DetailAspectModel.from(entity)) - .sentQualityAlerts(emptyIfNull(entity.alerts).stream().filter(alert -> NotificationSideBaseEntity.SENDER.equals(alert.getSide())).map(AlertEntity::toDomain).toList()) - .receivedQualityAlerts(emptyIfNull(entity.alerts).stream().filter(alert -> NotificationSideBaseEntity.RECEIVER.equals(alert.getSide())).map(AlertEntity::toDomain).toList()) - .sentQualityInvestigations(emptyIfNull(entity.investigations).stream().filter(alert -> NotificationSideBaseEntity.SENDER.equals(alert.getSide())).map(InvestigationEntity::toDomain).toList()) - .receivedQualityInvestigations(emptyIfNull(entity.investigations).stream().filter(alert -> NotificationSideBaseEntity.RECEIVER.equals(alert.getSide())).map(InvestigationEntity::toDomain).toList()) .importState(entity.getImportState()) .importNote(entity.getImportNote()) .policyId(entity.getPolicyId()) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/service/NotificationPublisherService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/service/NotificationPublisherService.java index 60a32f0424..d1f6532c38 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/service/NotificationPublisherService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/service/NotificationPublisherService.java @@ -91,7 +91,7 @@ public QualityNotification startInvestigation(List assetIds, String desc assetsAsBuiltBPNMap .entrySet() .stream() - .map(it -> createInvestigation(applicationBPN, receiverBpn, description, targetDate, severity, it)) + .map(it -> createQualityNotificationMessage(applicationBPN, receiverBpn, description, targetDate, severity, it)) .forEach(notification::addNotification); return notification; } else { @@ -100,7 +100,7 @@ public QualityNotification startInvestigation(List assetIds, String desc assetsAsPlannedBPNMap .entrySet() .stream() - .map(it -> createInvestigation(applicationBPN, receiverBpn, description, targetDate, severity, it)) + .map(it -> createQualityNotificationMessage(applicationBPN, receiverBpn, description, targetDate, severity, it)) .forEach(notification::addNotification); return notification; } @@ -136,7 +136,7 @@ public QualityNotification startAlert(List assetIds, String description, return notification; } - private QualityNotificationMessage createInvestigation(BPN applicationBpn, String receiverBpn, String description, Instant targetDate, QualityNotificationSeverity severity, Map.Entry> asset) { + private QualityNotificationMessage createQualityNotificationMessage(BPN applicationBpn, String receiverBpn, String description, Instant targetDate, QualityNotificationSeverity severity, Map.Entry> asset) { final String notificationId = UUID.randomUUID().toString(); final String messageId = UUID.randomUUID().toString(); return QualityNotificationMessage.builder() diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/investigation/model/InvestigationEntity.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/investigation/model/InvestigationEntity.java index 1232aad6e2..9efbb3dbf2 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/investigation/model/InvestigationEntity.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/investigation/model/InvestigationEntity.java @@ -33,7 +33,6 @@ import lombok.Setter; import lombok.experimental.SuperBuilder; import org.eclipse.tractusx.traceability.assets.infrastructure.asbuilt.model.AssetAsBuiltEntity; -import org.eclipse.tractusx.traceability.assets.infrastructure.asplanned.model.AssetAsPlannedEntity; import org.eclipse.tractusx.traceability.common.model.BPN; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotification; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationId; @@ -64,13 +63,6 @@ public class InvestigationEntity extends NotificationBaseEntity { ) private List assets; - @ManyToMany(cascade = CascadeType.ALL) - @JoinTable( - name = "assets_as_planned_investigations", - joinColumns = @JoinColumn(name = "investigation_id"), - inverseJoinColumns = @JoinColumn(name = "asset_id") - ) - private List assetsAsPlanned; @OneToMany(mappedBy = "investigation") private List notifications; @@ -104,8 +96,6 @@ public static QualityNotification toDomain(InvestigationEntity investigationEnti public static InvestigationEntity from(QualityNotification qualityNotification, List assetEntities) { return InvestigationEntity.builder() .assets(assetEntities) - // TODO clarify how to handle assetsAsPlanned - .assetsAsPlanned(null) .bpn(qualityNotification.getBpn()) .description(qualityNotification.getDescription()) .status(NotificationStatusBaseEntity.fromStringValue(qualityNotification.getNotificationStatus().name())) 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 69bee1f0cd..e56b9f5502 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 @@ -63,15 +63,6 @@ public class InvestigationNotificationEntity extends QualityNotificationMessageB ) private List assets; - @ManyToMany(cascade = CascadeType.ALL) - @JoinTable( - name = "assets_as_planned_notifications", - joinColumns = @JoinColumn(name = "notification_id"), - inverseJoinColumns = @JoinColumn(name = "asset_id") - ) - private List assetsAsPlanned; - - public static QualityNotificationMessage toDomain(InvestigationNotificationEntity investigationNotificationEntity) { return QualityNotificationMessage.builder() .id(investigationNotificationEntity.getId()) diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/AssetAsPlannedControllerByIdIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/AssetAsPlannedControllerByIdIT.java index 6f6e477531..59df8df19a 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/AssetAsPlannedControllerByIdIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/AssetAsPlannedControllerByIdIT.java @@ -74,58 +74,6 @@ private static Stream requests() { ); } - @Test - void givenAlertsForAsset_whenCallAssetById_thenReturnProperCount() throws JoseException { - // Given - assetsSupport.defaultAssetsAsPlannedStored(); - AssetAsPlannedEntity asset = jpaAssetAsPlannedRepository.findById("urn:uuid:0733946c-59c6-41ae-9570-cb43a6e4da01").orElseThrow(); - alertsSupport.storeAlertWithStatusAndAssets(CREATED, null, List.of(asset)); - alertsSupport.storeAlertWithStatusAndAssets(SENT, null, List.of(asset)); - alertsSupport.storeAlertWithStatusAndAssets(RECEIVED, null, List.of(asset)); - alertsSupport.storeAlertWithStatusAndAssets(ACKNOWLEDGED, null, List.of(asset)); - alertsSupport.storeAlertWithStatusAndAssets(ACCEPTED, null, List.of(asset)); - alertsSupport.storeAlertWithStatusAndAssets(DECLINED, null, List.of(asset)); - alertsSupport.storeAlertWithStatusAndAssets(CANCELED, null, List.of(asset)); - alertsSupport.storeAlertWithStatusAndAssets(CLOSED, null, List.of(asset)); - - // When - given() - .header(oAuth2Support.jwtAuthorization(ADMIN)) - .contentType(ContentType.JSON) - .when() - .get("/api/assets/as-planned/urn:uuid:0733946c-59c6-41ae-9570-cb43a6e4da01") - .then() - .log().all() - .statusCode(200) - .assertThat() - .body("receivedQualityAlertIdsInStatusActive", hasSize(6)); - } - - @Test - void givenInvestigationsForAsset_whenCallAssetById_thenReturnProperCount() throws JoseException { - // Given - assetsSupport.defaultAssetsAsPlannedStored(); - AssetAsPlannedEntity asset = jpaAssetAsPlannedRepository.findById("urn:uuid:0733946c-59c6-41ae-9570-cb43a6e4da01").orElseThrow(); - investigationsSupport.storeInvestigationWithStatusAndAssets(CREATED, null, List.of(asset)); - investigationsSupport.storeInvestigationWithStatusAndAssets(SENT, null, List.of(asset)); - investigationsSupport.storeInvestigationWithStatusAndAssets(RECEIVED, null, List.of(asset)); - investigationsSupport.storeInvestigationWithStatusAndAssets(ACKNOWLEDGED, null, List.of(asset)); - investigationsSupport.storeInvestigationWithStatusAndAssets(ACCEPTED, null, List.of(asset)); - investigationsSupport.storeInvestigationWithStatusAndAssets(DECLINED, null, List.of(asset)); - investigationsSupport.storeInvestigationWithStatusAndAssets(CANCELED, null, List.of(asset)); - investigationsSupport.storeInvestigationWithStatusAndAssets(CLOSED, null, List.of(asset)); - - // When - given() - .header(oAuth2Support.jwtAuthorization(ADMIN)) - .contentType(ContentType.JSON) - .when() - .get("/api/assets/as-planned/urn:uuid:0733946c-59c6-41ae-9570-cb43a6e4da01") - .then() - .statusCode(200) - .assertThat() - .body("receivedQualityInvestigationIdsInStatusActive", hasSize(6)); - } @Test void shouldReturnAssetsForAuthenticatedUserWithRole() throws JoseException { diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/common/support/InvestigationsSupport.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/common/support/InvestigationsSupport.java index 55c18e7a36..2e96c5225f 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/common/support/InvestigationsSupport.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/common/support/InvestigationsSupport.java @@ -70,7 +70,6 @@ public Long storeInvestigationWithStatusAndAssets(NotificationStatusBaseEntity s Long alertId = storedInvestigation(entity); InvestigationEntity savedInvestigation = jpaInvestigationRepository.findById(alertId).get(); savedInvestigation.setAssets(assetsAsBuilt); - savedInvestigation.setAssetsAsPlanned(assetsAsPlanned); jpaInvestigationRepository.save(savedInvestigation); return alertId; } From 31b653cbdf958334c7a4e5b18cd6b7287c4f4219 Mon Sep 17 00:00:00 2001 From: Maximilian Wesener Date: Mon, 19 Feb 2024 07:47:30 +0100 Subject: [PATCH 28/34] chore(security): 516 removed investigation / alert from asPlanned entities --- .../infrastructure/alert/model/AlertEntity.java | 7 ------- .../alert/model/AlertNotificationEntity.java | 9 --------- .../integration/common/support/AlertsSupport.java | 1 - 3 files changed, 17 deletions(-) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/alert/model/AlertEntity.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/alert/model/AlertEntity.java index 913e92932d..e427e2eeda 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/alert/model/AlertEntity.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/alert/model/AlertEntity.java @@ -62,13 +62,6 @@ public class AlertEntity extends NotificationBaseEntity { ) public List assets; - @ManyToMany(cascade = CascadeType.ALL) - @JoinTable( - name = "assets_as_planned_alerts", - joinColumns = @JoinColumn(name = "alert_id"), - inverseJoinColumns = @JoinColumn(name = "asset_id") - ) - private List assetsAsPlanned; @OneToMany(mappedBy = "alert") private List notifications; 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 222c7d3bb1..8e86c6ea5e 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 @@ -63,14 +63,6 @@ public class AlertNotificationEntity extends QualityNotificationMessageBaseEntit ) private List assets; - @ManyToMany(cascade = CascadeType.ALL) - @JoinTable( - name = "asset_as_planned_alert_notifications", - joinColumns = @JoinColumn(name = "alert_notification_id"), - inverseJoinColumns = @JoinColumn(name = "asset_id") - ) - private List assetsAsPlanned; - public static QualityNotificationMessage toDomain(AlertNotificationEntity alertNotificationEntity) { return QualityNotificationMessage.builder() .id(alertNotificationEntity.getId()) @@ -111,7 +103,6 @@ public static AlertNotificationEntity from(AlertEntity alertEntity, .sendTo(qualityNotificationMessage.getSendTo()) .sendToName(qualityNotificationMessage.getSendToName()) .assets(notificationAssets) - .assetsAsPlanned(assetAsPlannedEntitiesByAlert) .notificationReferenceId(qualityNotificationMessage.getNotificationReferenceId()) .targetDate(qualityNotificationMessage.getTargetDate()) .severity(qualityNotificationMessage.getSeverity()) diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/common/support/AlertsSupport.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/common/support/AlertsSupport.java index 10a2f2b20a..291eb4a7b9 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/common/support/AlertsSupport.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/common/support/AlertsSupport.java @@ -74,7 +74,6 @@ public Long storeAlertWithStatusAndAssets(NotificationStatusBaseEntity status, L Long alertId = storedAlert(entity); AlertEntity savedAlert = jpaAlertRepository.findById(alertId).get(); savedAlert.setAssets(assetsAsBuilt); - savedAlert.setAssetsAsPlanned(assetsAsPlanned); jpaAlertRepository.save(savedAlert); return alertId; } From a66112057467a2abb2e1c8170c318b9cd3565a55 Mon Sep 17 00:00:00 2001 From: Maximilian Wesener Date: Mon, 19 Feb 2024 09:29:34 +0100 Subject: [PATCH 29/34] chore(security): 516 removed investigation / alert from asPlanned entities --- .../openapi/traceability-foss-backend.json | 1944 ++++++++--------- .../common/config/ErrorHandlingConfig.java | 8 + .../service/NotificationPublisherService.java | 25 +- .../NotificationNotSupportedException.java | 27 + 4 files changed, 1012 insertions(+), 992 deletions(-) create mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/investigation/model/exception/NotificationNotSupportedException.java diff --git a/tx-backend/openapi/traceability-foss-backend.json b/tx-backend/openapi/traceability-foss-backend.json index fecc0bbd84..b3d8106752 100644 --- a/tx-backend/openapi/traceability-foss-backend.json +++ b/tx-backend/openapi/traceability-foss-backend.json @@ -37,8 +37,8 @@ "description" : "The endpoint returns a result of BPN EDC URL mappings.", "operationId" : "getBpnEdcs", "responses" : { - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -47,8 +47,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -57,20 +57,18 @@ } } }, - "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" } } } }, - "403" : { - "description" : "Forbidden.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -79,18 +77,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" } } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -99,8 +99,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -109,8 +109,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -151,8 +151,8 @@ "required" : true }, "responses" : { - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -161,8 +161,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -171,8 +171,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -181,8 +181,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -191,30 +191,30 @@ } } }, - "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" } } } }, - "200" : { - "description" : "Returns the paged result found for BpnEdcMapping", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -223,8 +223,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -265,8 +265,8 @@ "required" : true }, "responses" : { - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -275,8 +275,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -285,8 +285,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -295,8 +295,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -305,30 +305,30 @@ } } }, - "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" } } } }, - "200" : { - "description" : "Returns the paged result found for BpnEdcMapping", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -337,8 +337,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -376,8 +376,8 @@ } ], "responses" : { - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -386,8 +386,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -396,8 +396,14 @@ } } }, - "403" : { - "description" : "Forbidden.", + "200" : { + "description" : "Returns the paged result found", + "content" : { + "application/json" : {} + } + }, + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -406,8 +412,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -416,8 +422,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -426,8 +432,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -436,14 +442,8 @@ } } }, - "200" : { - "description" : "Returns the paged result found", - "content" : { - "application/json" : {} - } - }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -489,8 +489,8 @@ "required" : true }, "responses" : { - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -499,8 +499,14 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "200" : { + "description" : "Ok.", + "content" : { + "application/json" : {} + } + }, + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -509,8 +515,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -519,14 +525,8 @@ } } }, - "204" : { - "description" : "No Content.", - "content" : { - "application/json" : {} - } - }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -535,14 +535,14 @@ } } }, - "200" : { - "description" : "Ok.", + "204" : { + "description" : "No Content.", "content" : { "application/json" : {} } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -551,8 +551,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -561,8 +561,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -600,8 +600,8 @@ "required" : true }, "responses" : { - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -610,8 +610,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -620,8 +620,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -630,8 +630,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -640,8 +640,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -650,8 +650,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -660,22 +660,22 @@ } } }, - "201" : { - "description" : "Created.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/QualityNotificationIdResponse" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "404" : { - "description" : "Not found.", + "201" : { + "description" : "Created.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "$ref" : "#/components/schemas/QualityNotificationIdResponse" } } } @@ -720,11 +720,8 @@ "required" : true }, "responses" : { - "204" : { - "description" : "No content." - }, - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -733,8 +730,11 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "204" : { + "description" : "No content." + }, + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -743,11 +743,8 @@ } } }, - "200" : { - "description" : "Ok." - }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -756,8 +753,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -766,8 +763,11 @@ } } }, - "400" : { - "description" : "Bad request.", + "200" : { + "description" : "Ok." + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -776,8 +776,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -786,8 +786,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -836,11 +836,8 @@ "required" : true }, "responses" : { - "204" : { - "description" : "No content." - }, - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -849,8 +846,11 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "204" : { + "description" : "No content." + }, + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -859,11 +859,8 @@ } } }, - "200" : { - "description" : "Ok." - }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -872,8 +869,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -882,8 +879,11 @@ } } }, - "400" : { - "description" : "Bad request.", + "200" : { + "description" : "Ok." + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -892,8 +892,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -902,8 +902,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -942,8 +942,8 @@ } ], "responses" : { - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -952,8 +952,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -962,11 +962,8 @@ } } }, - "200" : { - "description" : "Ok." - }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -975,8 +972,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -985,11 +982,14 @@ } } }, + "200" : { + "description" : "Ok." + }, "204" : { "description" : "No content." }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -998,8 +998,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1008,8 +1008,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1048,8 +1048,8 @@ } ], "responses" : { - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1058,8 +1058,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1068,11 +1068,8 @@ } } }, - "200" : { - "description" : "Ok." - }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1081,8 +1078,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1091,11 +1088,14 @@ } } }, + "200" : { + "description" : "Ok." + }, "204" : { "description" : "No content." }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1104,8 +1104,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1114,8 +1114,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1153,20 +1153,18 @@ "required" : true }, "responses" : { - "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" : { @@ -1175,8 +1173,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1185,8 +1183,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1195,18 +1193,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" } } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1215,8 +1215,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1225,8 +1225,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1264,8 +1264,8 @@ "required" : true }, "responses" : { - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1274,8 +1274,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1284,8 +1284,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1294,8 +1294,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1304,8 +1304,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1314,8 +1314,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1324,22 +1324,22 @@ } } }, - "201" : { - "description" : "Created.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/CreateNotificationContractResponse" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "404" : { - "description" : "Not found.", + "201" : { + "description" : "Created.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "$ref" : "#/components/schemas/CreateNotificationContractResponse" } } } @@ -1374,8 +1374,11 @@ "required" : true }, "responses" : { - "401" : { - "description" : "Authorization failed.", + "204" : { + "description" : "No Content." + }, + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1384,8 +1387,14 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "200" : { + "description" : "OK.", + "content" : { + "application/json" : {} + } + }, + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1394,8 +1403,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1404,8 +1413,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1414,14 +1423,8 @@ } } }, - "200" : { - "description" : "OK.", - "content" : { - "application/json" : {} - } - }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1430,8 +1433,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1440,8 +1443,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1449,9 +1452,6 @@ } } } - }, - "204" : { - "description" : "No Content." } }, "security" : [ @@ -1490,8 +1490,11 @@ } }, "responses" : { - "401" : { - "description" : "Authorization failed.", + "204" : { + "description" : "No Content." + }, + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1500,8 +1503,14 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "200" : { + "description" : "OK.", + "content" : { + "application/json" : {} + } + }, + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1510,8 +1519,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1520,8 +1529,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1530,14 +1539,8 @@ } } }, - "200" : { - "description" : "OK.", - "content" : { - "application/json" : {} - } - }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1546,8 +1549,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1556,8 +1559,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1565,9 +1568,6 @@ } } } - }, - "204" : { - "description" : "No Content." } }, "security" : [ @@ -1598,8 +1598,8 @@ "required" : true }, "responses" : { - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1608,8 +1608,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1618,8 +1618,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1628,8 +1628,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1638,8 +1638,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1648,8 +1648,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1658,11 +1658,8 @@ } } }, - "201" : { - "description" : "Created." - }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1670,6 +1667,9 @@ } } } + }, + "201" : { + "description" : "Created." } }, "security" : [ @@ -1700,30 +1700,30 @@ "required" : true }, "responses" : { - "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.", + "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", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1732,8 +1732,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1742,8 +1742,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1752,8 +1752,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1762,8 +1762,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1772,8 +1772,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1811,8 +1811,8 @@ "required" : true }, "responses" : { - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1821,8 +1821,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1831,8 +1831,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1841,8 +1841,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1851,8 +1851,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1861,8 +1861,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1871,11 +1871,8 @@ } } }, - "201" : { - "description" : "Created." - }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1883,6 +1880,9 @@ } } } + }, + "201" : { + "description" : "Created." } }, "security" : [ @@ -1913,8 +1913,8 @@ "required" : true }, "responses" : { - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1923,8 +1923,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1933,8 +1933,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1943,30 +1943,30 @@ } } }, - "200" : { - "description" : "Returns the paged result found for Asset", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "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" } } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1975,8 +1975,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1985,8 +1985,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2024,8 +2024,8 @@ "required" : true }, "responses" : { - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -2034,8 +2034,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -2044,8 +2044,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2054,8 +2054,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2064,8 +2064,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2074,8 +2074,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2084,22 +2084,22 @@ } } }, - "201" : { - "description" : "Created.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/QualityNotificationIdResponse" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "404" : { - "description" : "Not found.", + "201" : { + "description" : "Created.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "$ref" : "#/components/schemas/QualityNotificationIdResponse" } } } @@ -2144,11 +2144,8 @@ "required" : true }, "responses" : { - "204" : { - "description" : "No content." - }, - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -2157,8 +2154,11 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "204" : { + "description" : "No content." + }, + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -2167,8 +2167,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2177,8 +2177,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2187,8 +2187,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2197,8 +2197,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2207,8 +2207,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2257,11 +2257,8 @@ "required" : true }, "responses" : { - "204" : { - "description" : "No content." - }, - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -2270,8 +2267,11 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "204" : { + "description" : "No content." + }, + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -2280,11 +2280,8 @@ } } }, - "200" : { - "description" : "Ok." - }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2293,8 +2290,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2303,8 +2300,11 @@ } } }, - "400" : { - "description" : "Bad request.", + "200" : { + "description" : "Ok." + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2313,8 +2313,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2323,8 +2323,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2363,8 +2363,8 @@ } ], "responses" : { - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -2373,8 +2373,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -2383,11 +2383,8 @@ } } }, - "200" : { - "description" : "Ok." - }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2396,8 +2393,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2406,11 +2403,14 @@ } } }, + "200" : { + "description" : "Ok." + }, "204" : { "description" : "No content." }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2419,8 +2419,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2429,8 +2429,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2469,8 +2469,8 @@ } ], "responses" : { - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -2479,8 +2479,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -2489,11 +2489,8 @@ } } }, - "200" : { - "description" : "Ok." - }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2502,8 +2499,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2512,11 +2509,14 @@ } } }, + "200" : { + "description" : "Ok." + }, "204" : { "description" : "No content." }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2525,8 +2525,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2535,8 +2535,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2574,8 +2574,8 @@ "required" : true }, "responses" : { - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -2584,8 +2584,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -2594,19 +2594,18 @@ } } }, - "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" } } } }, - "403" : { - "description" : "Forbidden.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2615,18 +2614,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" } } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2635,8 +2635,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2645,8 +2645,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2684,28 +2684,8 @@ } ], "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" - } - } - } - }, - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -2714,8 +2694,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -2734,8 +2714,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2898,8 +2878,28 @@ } } }, - "404" : { - "description" : "Not found.", + "401" : { + "description" : "Authorization failed.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2945,28 +2945,8 @@ "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" - } - } - } - }, - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -2975,8 +2955,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -2995,8 +2975,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3159,8 +3139,8 @@ } } }, - "404" : { - "description" : "Not found.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -3168,18 +3148,38 @@ } } } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/assets/as-built/{assetId}" : { + }, + "403" : { + "description" : "Forbidden.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "500" : { + "description" : "Internal server error.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security" : [ + { + "oAuth2" : [ + "profile email" + ] + } + ] + } + }, + "/assets/as-built/{assetId}" : { "get" : { "tags" : [ "AssetsAsBuilt" @@ -3198,26 +3198,6 @@ } ], "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" - } - } - } - }, "200" : { "description" : "Returns the assets found", "content" : { @@ -3372,8 +3352,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -3382,8 +3362,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -3402,8 +3382,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3412,8 +3392,28 @@ } } }, - "404" : { - "description" : "Not found.", + "401" : { + "description" : "Authorization failed.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3459,28 +3459,8 @@ "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" - } - } - } - }, - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -3489,8 +3469,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -3509,8 +3489,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3673,8 +3653,28 @@ } } }, - "404" : { - "description" : "Not found.", + "401" : { + "description" : "Authorization failed.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3702,8 +3702,8 @@ "description" : "The endpoint Triggers reload of shell descriptors.", "operationId" : "reload", "responses" : { - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -3712,8 +3712,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -3722,8 +3722,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3732,11 +3732,8 @@ } } }, - "202" : { - "description" : "Created registry reload job." - }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3745,8 +3742,11 @@ } } }, - "400" : { - "description" : "Bad request.", + "202" : { + "description" : "Created registry reload job." + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -3755,8 +3755,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3765,8 +3765,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3794,18 +3794,18 @@ "description" : "The endpoint returns all policies .", "operationId" : "policy", "responses" : { - "200" : { - "description" : "Returns the policies", + "429" : { + "description" : "Too many requests.", "content" : { - "*/*" : { + "application/json" : { "schema" : { - "$ref" : "#/components/schemas/PolicyResponse" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "401" : { - "description" : "Authorization failed.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -3814,8 +3814,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3824,18 +3824,18 @@ } } }, - "403" : { - "description" : "Forbidden.", + "200" : { + "description" : "Returns the policies", "content" : { - "application/json" : { + "*/*" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "$ref" : "#/components/schemas/PolicyResponse" } } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3844,8 +3844,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -3854,8 +3854,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3864,8 +3864,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3904,8 +3904,8 @@ } ], "responses" : { - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -3914,8 +3914,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -3924,24 +3924,18 @@ } } }, - "200" : { - "description" : "OK.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : -2147483648, - "type" : "array", - "description" : "Investigations", - "items" : { - "$ref" : "#/components/schemas/InvestigationResponse" - } + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "403" : { - "description" : "Forbidden.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3950,18 +3944,24 @@ } } }, - "429" : { - "description" : "Too many requests.", + "200" : { + "description" : "OK.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : -2147483648, + "type" : "array", + "description" : "Investigations", + "items" : { + "$ref" : "#/components/schemas/InvestigationResponse" + } } } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -3970,8 +3970,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3980,8 +3980,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -4049,8 +4049,8 @@ } ], "responses" : { - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -4059,8 +4059,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -4069,8 +4069,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -4079,20 +4079,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" } } } }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -4101,8 +4099,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -4121,12 +4119,14 @@ } } }, - "404" : { - "description" : "Not found.", + "200" : { + "description" : "Returns a distinct filter values for given fieldName.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } @@ -4150,8 +4150,8 @@ "description" : "The endpoint can return limited data based on the user role", "operationId" : "dashboard", "responses" : { - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -4160,8 +4160,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -4170,8 +4170,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -4180,28 +4180,28 @@ } } }, - "200" : { - "description" : "Returns dashboard data", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/DashboardResponse" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "429" : { - "description" : "Too many requests.", + "200" : { + "description" : "Returns dashboard data", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "$ref" : "#/components/schemas/DashboardResponse" } } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -4210,8 +4210,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -4220,8 +4220,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -4260,8 +4260,11 @@ } ], "responses" : { - "401" : { - "description" : "Authorization failed.", + "204" : { + "description" : "No Content." + }, + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -4270,8 +4273,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -4280,8 +4283,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -4290,18 +4293,18 @@ } } }, - "200" : { - "description" : "OK.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ImportReportResponse" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -4310,8 +4313,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -4330,18 +4333,15 @@ } } }, - "404" : { - "description" : "Not found.", + "200" : { + "description" : "OK.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "$ref" : "#/components/schemas/ImportReportResponse" } } } - }, - "204" : { - "description" : "No Content." } }, "security" : [ @@ -4377,39 +4377,9 @@ "schema" : { "$ref" : "#/components/schemas/SearchCriteriaRequestParam" } - } - ], - "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" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, + } + ], + "responses" : { "200" : { "description" : "Returns the paged result found for Asset", "content" : { @@ -4579,6 +4549,16 @@ } } }, + "404" : { + "description" : "Not found.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, "400" : { "description" : "Bad request.", "content" : { @@ -4589,8 +4569,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -4599,8 +4579,28 @@ } } }, - "404" : { - "description" : "Not found.", + "401" : { + "description" : "Authorization failed.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -4670,8 +4670,8 @@ } ], "responses" : { - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -4680,8 +4680,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -4690,8 +4690,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -4700,20 +4700,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" } } } }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -4722,8 +4720,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -4742,12 +4740,14 @@ } } }, - "404" : { - "description" : "Not found.", + "200" : { + "description" : "Returns a distinct filter values for given fieldName.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } @@ -4781,18 +4781,8 @@ } ], "responses" : { - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -4801,8 +4791,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -4811,8 +4801,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -4821,8 +4811,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -4985,8 +4975,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -4995,8 +4985,18 @@ } } }, - "404" : { - "description" : "Not found.", + "403" : { + "description" : "Forbidden.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5042,6 +5042,46 @@ } ], "responses" : { + "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" + } + } + } + }, + "415" : { + "description" : "Unsupported media type", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, "200" : { "description" : "Returns the paged result found for Asset", "content" : { @@ -5211,16 +5251,6 @@ } } }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "403" : { "description" : "Forbidden.", "content" : { @@ -5231,26 +5261,6 @@ } } }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "500" : { "description" : "Internal server error.", "content" : { @@ -5260,16 +5270,6 @@ } } } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } } }, "security" : [ @@ -5332,8 +5332,8 @@ } ], "responses" : { - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -5342,8 +5342,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -5352,8 +5352,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -5362,20 +5362,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" } } } }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -5384,8 +5382,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5404,12 +5402,14 @@ } } }, - "404" : { - "description" : "Not found.", + "200" : { + "description" : "Returns a distinct filter values for given fieldName.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } @@ -5433,8 +5433,8 @@ "description" : "The endpoint returns a map for assets consumed by the map.", "operationId" : "assetsCountryMap", "responses" : { - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -5443,8 +5443,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -5453,8 +5453,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -5463,8 +5463,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -5473,18 +5473,20 @@ } } }, - "400" : { - "description" : "Bad request.", + "200" : { + "description" : "Returns the assets found", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } }, - "500" : { - "description" : "Internal server error.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -5493,8 +5495,8 @@ } } }, - "404" : { - "description" : "Not found.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5503,14 +5505,12 @@ } } }, - "200" : { - "description" : "Returns the assets found", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } @@ -5544,36 +5544,6 @@ } ], "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" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "429" : { "description" : "Too many requests.", "content" : { @@ -5584,8 +5554,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -5594,8 +5564,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -5604,8 +5574,8 @@ } } }, - "404" : { - "description" : "Not found.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -5767,6 +5737,36 @@ } } } + }, + "401" : { + "description" : "Authorization failed.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "500" : { + "description" : "Internal server error.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } } }, "security" : [ @@ -5798,8 +5798,8 @@ } ], "responses" : { - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -5808,8 +5808,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -5818,23 +5818,18 @@ } } }, - "200" : { - "description" : "OK.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Alerts", - "items" : { - "$ref" : "#/components/schemas/AlertResponse" - } + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "403" : { - "description" : "Forbidden.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -5843,18 +5838,23 @@ } } }, - "429" : { - "description" : "Too many requests.", + "200" : { + "description" : "OK.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "type" : "array", + "description" : "Alerts", + "items" : { + "$ref" : "#/components/schemas/AlertResponse" + } } } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -5863,8 +5863,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5873,8 +5873,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5942,8 +5942,8 @@ } ], "responses" : { - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -5952,8 +5952,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -5962,8 +5962,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -5972,20 +5972,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" } } } }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -5994,8 +5992,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -6014,12 +6012,14 @@ } } }, - "404" : { - "description" : "Not found.", + "200" : { + "description" : "Returns a distinct filter values for given fieldName.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } @@ -6043,8 +6043,8 @@ "description" : "Deletes all submodels from the system.", "operationId" : "deleteSubmodels", "responses" : { - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -6053,8 +6053,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -6063,11 +6063,8 @@ } } }, - "200" : { - "description" : "Ok." - }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -6076,8 +6073,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -6086,8 +6083,14 @@ } } }, - "400" : { - "description" : "Bad request.", + "200" : { + "description" : "Ok." + }, + "204" : { + "description" : "No Content." + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -6096,11 +6099,8 @@ } } }, - "204" : { - "description" : "No Content." - }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -6109,8 +6109,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -6148,11 +6148,8 @@ } ], "responses" : { - "200" : { - "description" : "Okay" - }, - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -6161,8 +6158,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -6171,8 +6168,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -6181,11 +6178,8 @@ } } }, - "204" : { - "description" : "Deleted." - }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -6194,8 +6188,14 @@ } } }, - "400" : { - "description" : "Bad request.", + "204" : { + "description" : "Deleted." + }, + "200" : { + "description" : "Okay" + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -6204,8 +6204,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -6214,8 +6214,8 @@ } } }, - "404" : { - "description" : "Not found.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ErrorHandlingConfig.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ErrorHandlingConfig.java index bf392ff00d..eea36aff70 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ErrorHandlingConfig.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ErrorHandlingConfig.java @@ -45,6 +45,7 @@ import org.eclipse.tractusx.traceability.qualitynotification.domain.alert.model.exception.AlertNotFoundException; import org.eclipse.tractusx.traceability.qualitynotification.domain.investigation.model.exception.InvestigationIllegalUpdate; import org.eclipse.tractusx.traceability.qualitynotification.domain.investigation.model.exception.InvestigationNotFoundException; +import org.eclipse.tractusx.traceability.qualitynotification.domain.investigation.model.exception.NotificationNotSupportedException; import org.eclipse.tractusx.traceability.qualitynotification.domain.investigation.model.exception.InvestigationReceiverBpnMismatchException; import org.eclipse.tractusx.traceability.qualitynotification.domain.investigation.model.exception.InvestigationStatusTransitionNotAllowed; import org.eclipse.tractusx.traceability.qualitynotification.domain.investigation.model.exception.NotificationStatusTransitionNotAllowed; @@ -133,6 +134,13 @@ ResponseEntity handleInvestigationNotFoundException(Investigation .body(new ErrorResponse(exception.getMessage())); } + @ExceptionHandler(NotificationNotSupportedException.class) + ResponseEntity handleInvestigationNotSupportedException(NotificationNotSupportedException exception) { + log.warn("handleInvestigationNotSupportedException", exception); + return ResponseEntity.status(HttpStatus.BAD_REQUEST) + .body(new ErrorResponse(exception.getMessage())); + } + @ExceptionHandler(AlertNotFoundException.class) ResponseEntity handleAlertNotFoundException(AlertNotFoundException exception) { log.warn("handleAlertNotFoundException", exception); diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/service/NotificationPublisherService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/service/NotificationPublisherService.java index d1f6532c38..6a27f5f742 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/service/NotificationPublisherService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/base/service/NotificationPublisherService.java @@ -24,9 +24,6 @@ import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.eclipse.tractusx.traceability.assets.domain.asbuilt.repository.AssetAsBuiltRepository; -import org.eclipse.tractusx.traceability.assets.domain.asbuilt.service.AssetAsBuiltServiceImpl; -import org.eclipse.tractusx.traceability.assets.domain.asplanned.repository.AssetAsPlannedRepository; -import org.eclipse.tractusx.traceability.assets.domain.asplanned.service.AssetAsPlannedServiceImpl; import org.eclipse.tractusx.traceability.assets.domain.base.model.AssetBase; import org.eclipse.tractusx.traceability.bpn.domain.service.BpnRepository; import org.eclipse.tractusx.traceability.common.model.BPN; @@ -39,6 +36,7 @@ import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationSide; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationStatus; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.exception.QualityNotificationIllegalUpdate; +import org.eclipse.tractusx.traceability.qualitynotification.domain.investigation.model.exception.NotificationNotSupportedException; import org.springframework.stereotype.Service; import java.time.Clock; @@ -64,9 +62,6 @@ public class NotificationPublisherService { private final TraceabilityProperties traceabilityProperties; private final EdcNotificationService edcNotificationService; private final AssetAsBuiltRepository assetAsBuiltRepository; - private final AssetAsPlannedRepository assetAsPlannedRepository; - private final AssetAsBuiltServiceImpl assetAsBuiltService; - private final AssetAsPlannedServiceImpl assetAsPlannedService; private final BpnRepository bpnRepository; private final Clock clock; @@ -87,7 +82,6 @@ public QualityNotification startInvestigation(List assetIds, String desc QualityNotification notification = QualityNotification.startNotification(clock.instant(), applicationBPN, description); if (isAsBuilt) { Map> assetsAsBuiltBPNMap = assetAsBuiltRepository.getAssetsById(assetIds).stream().collect(groupingBy(AssetBase::getManufacturerId)); - assetsAsBuiltBPNMap .entrySet() .stream() @@ -95,17 +89,8 @@ public QualityNotification startInvestigation(List assetIds, String desc .forEach(notification::addNotification); return notification; } else { - Map> assetsAsPlannedBPNMap = assetAsPlannedRepository.getAssetsById(assetIds).stream().collect(groupingBy(AssetBase::getManufacturerId)); - - assetsAsPlannedBPNMap - .entrySet() - .stream() - .map(it -> createQualityNotificationMessage(applicationBPN, receiverBpn, description, targetDate, severity, it)) - .forEach(notification::addNotification); - return notification; + throw new NotificationNotSupportedException(); } - - } @@ -122,11 +107,11 @@ public QualityNotification startInvestigation(List assetIds, String desc public QualityNotification startAlert(List assetIds, String description, Instant targetDate, QualityNotificationSeverity severity, String receiverBpn, boolean isAsBuilt) { BPN applicationBPN = traceabilityProperties.getBpn(); QualityNotification notification = QualityNotification.startNotification(clock.instant(), applicationBPN, description); - List assets = new ArrayList<>(); + List assets; if (isAsBuilt) { - assets.addAll(assetAsBuiltRepository.getAssetsById(assetIds)); + assets = new ArrayList<>(assetAsBuiltRepository.getAssetsById(assetIds)); } else { - assets.addAll(assetAsPlannedRepository.getAssetsById(assetIds)); + throw new NotificationNotSupportedException(); } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/investigation/model/exception/NotificationNotSupportedException.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/investigation/model/exception/NotificationNotSupportedException.java new file mode 100644 index 0000000000..7ecf55bb8a --- /dev/null +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/investigation/model/exception/NotificationNotSupportedException.java @@ -0,0 +1,27 @@ +/******************************************************************************** + * Copyright (c) 2024 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.investigation.model.exception; + +public class NotificationNotSupportedException extends RuntimeException { + + public NotificationNotSupportedException() { + super("Notification not supported for parts as planned"); + } +} From de28d29f36b0e823dc1c5a1b6397b0307902027c Mon Sep 17 00:00:00 2001 From: Maximilian Wesener Date: Mon, 19 Feb 2024 10:02:47 +0100 Subject: [PATCH 30/34] chore(security): 516 cleared database tables for notifications on as planned. --- CHANGELOG.md | 1 + .../openapi/traceability-foss-backend.json | 1404 ++++++++--------- ...e_investigation_alert_asset-as-planned.sql | 4 + .../common/support/DatabaseSupport.java | 4 - .../alert/PublisherAlertsControllerIT.java | 54 - 5 files changed, 707 insertions(+), 760 deletions(-) create mode 100644 tx-backend/src/main/resources/db/migration/V13__remove_investigation_alert_asset-as-planned.sql diff --git a/CHANGELOG.md b/CHANGELOG.md index 1da92f2b69..0ade097a27 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - IrsCallbackController is now validating jobId to prevent log injections from unwanted usage ### Removed +- Investigations/Alerts for assets_as_planned parts ## [10.3.0 - 05.02.2024] diff --git a/tx-backend/openapi/traceability-foss-backend.json b/tx-backend/openapi/traceability-foss-backend.json index b3d8106752..5ef389d579 100644 --- a/tx-backend/openapi/traceability-foss-backend.json +++ b/tx-backend/openapi/traceability-foss-backend.json @@ -37,18 +37,20 @@ "description" : "The endpoint returns a result of BPN EDC URL mappings.", "operationId" : "getBpnEdcs", "responses" : { - "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.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -57,8 +59,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -67,8 +69,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -77,14 +79,12 @@ } } }, - "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" } } } @@ -109,8 +109,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -151,18 +151,20 @@ "required" : true }, "responses" : { - "429" : { - "description" : "Too many requests.", + "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.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -171,8 +173,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -181,8 +183,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -191,14 +193,12 @@ } } }, - "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" } } } @@ -223,8 +223,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -265,18 +265,20 @@ "required" : true }, "responses" : { - "429" : { - "description" : "Too many requests.", + "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.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -285,8 +287,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -295,8 +297,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -305,14 +307,12 @@ } } }, - "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" } } } @@ -337,8 +337,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -376,8 +376,14 @@ } ], "responses" : { - "429" : { - "description" : "Too many requests.", + "200" : { + "description" : "Returns the paged result found", + "content" : { + "application/json" : {} + } + }, + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -396,14 +402,8 @@ } } }, - "200" : { - "description" : "Returns the paged result found", - "content" : { - "application/json" : {} - } - }, - "400" : { - "description" : "Bad request.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -412,8 +412,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -442,8 +442,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -489,8 +489,8 @@ "required" : true }, "responses" : { - "429" : { - "description" : "Too many requests.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -515,8 +515,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -525,8 +525,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -561,8 +561,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -600,8 +600,8 @@ "required" : true }, "responses" : { - "429" : { - "description" : "Too many requests.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -620,8 +620,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -630,8 +630,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -660,8 +660,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -720,8 +720,8 @@ "required" : true }, "responses" : { - "429" : { - "description" : "Too many requests.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -730,8 +730,8 @@ } } }, - "204" : { - "description" : "No content." + "200" : { + "description" : "Ok." }, "404" : { "description" : "Not found.", @@ -743,8 +743,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -753,8 +753,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -763,8 +763,8 @@ } } }, - "200" : { - "description" : "Ok." + "204" : { + "description" : "No content." }, "401" : { "description" : "Authorization failed.", @@ -786,8 +786,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -836,8 +836,8 @@ "required" : true }, "responses" : { - "429" : { - "description" : "Too many requests.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -846,8 +846,8 @@ } } }, - "204" : { - "description" : "No content." + "200" : { + "description" : "Ok." }, "404" : { "description" : "Not found.", @@ -859,8 +859,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -869,8 +869,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -879,8 +879,8 @@ } } }, - "200" : { - "description" : "Ok." + "204" : { + "description" : "No content." }, "401" : { "description" : "Authorization failed.", @@ -902,8 +902,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -942,8 +942,8 @@ } ], "responses" : { - "429" : { - "description" : "Too many requests.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -952,6 +952,9 @@ } } }, + "200" : { + "description" : "Ok." + }, "404" : { "description" : "Not found.", "content" : { @@ -962,8 +965,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -972,8 +975,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -982,9 +985,6 @@ } } }, - "200" : { - "description" : "Ok." - }, "204" : { "description" : "No content." }, @@ -1008,8 +1008,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1048,8 +1048,8 @@ } ], "responses" : { - "429" : { - "description" : "Too many requests.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1058,6 +1058,9 @@ } } }, + "200" : { + "description" : "Ok." + }, "404" : { "description" : "Not found.", "content" : { @@ -1068,8 +1071,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1078,8 +1081,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1088,9 +1091,6 @@ } } }, - "200" : { - "description" : "Ok." - }, "204" : { "description" : "No content." }, @@ -1114,8 +1114,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1153,18 +1153,20 @@ "required" : true }, "responses" : { - "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.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1173,8 +1175,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1183,8 +1185,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1193,14 +1195,12 @@ } } }, - "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" } } } @@ -1225,8 +1225,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1264,8 +1264,8 @@ "required" : true }, "responses" : { - "429" : { - "description" : "Too many requests.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1284,8 +1284,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1294,8 +1294,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1324,8 +1324,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1374,11 +1374,8 @@ "required" : true }, "responses" : { - "204" : { - "description" : "No Content." - }, - "429" : { - "description" : "Too many requests.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1403,8 +1400,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1413,8 +1410,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1423,6 +1420,9 @@ } } }, + "204" : { + "description" : "No Content." + }, "401" : { "description" : "Authorization failed.", "content" : { @@ -1443,8 +1443,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1490,11 +1490,8 @@ } }, "responses" : { - "204" : { - "description" : "No Content." - }, - "429" : { - "description" : "Too many requests.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1519,8 +1516,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1529,8 +1526,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1539,6 +1536,9 @@ } } }, + "204" : { + "description" : "No Content." + }, "401" : { "description" : "Authorization failed.", "content" : { @@ -1559,8 +1559,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1598,8 +1598,8 @@ "required" : true }, "responses" : { - "429" : { - "description" : "Too many requests.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1618,8 +1618,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1628,8 +1628,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1658,8 +1658,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1700,24 +1700,24 @@ "required" : true }, "responses" : { - "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" } } } }, - "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" } } } @@ -1732,8 +1732,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1742,8 +1742,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1772,8 +1772,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1811,8 +1811,8 @@ "required" : true }, "responses" : { - "429" : { - "description" : "Too many requests.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1831,8 +1831,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1841,8 +1841,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1871,8 +1871,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1913,8 +1913,8 @@ "required" : true }, "responses" : { - "429" : { - "description" : "Too many requests.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1923,18 +1923,20 @@ } } }, - "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" : { @@ -1943,8 +1945,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1953,14 +1955,12 @@ } } }, - "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" } } } @@ -1985,8 +1985,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2024,8 +2024,8 @@ "required" : true }, "responses" : { - "429" : { - "description" : "Too many requests.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2044,8 +2044,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -2054,8 +2054,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2084,8 +2084,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2144,8 +2144,8 @@ "required" : true }, "responses" : { - "429" : { - "description" : "Too many requests.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2154,9 +2154,6 @@ } } }, - "204" : { - "description" : "No content." - }, "404" : { "description" : "Not found.", "content" : { @@ -2167,8 +2164,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -2177,8 +2174,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2187,6 +2184,9 @@ } } }, + "204" : { + "description" : "No content." + }, "401" : { "description" : "Authorization failed.", "content" : { @@ -2207,8 +2207,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2257,8 +2257,8 @@ "required" : true }, "responses" : { - "429" : { - "description" : "Too many requests.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2267,8 +2267,8 @@ } } }, - "204" : { - "description" : "No content." + "200" : { + "description" : "Ok." }, "404" : { "description" : "Not found.", @@ -2280,8 +2280,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -2290,8 +2290,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2300,8 +2300,8 @@ } } }, - "200" : { - "description" : "Ok." + "204" : { + "description" : "No content." }, "401" : { "description" : "Authorization failed.", @@ -2323,8 +2323,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2363,8 +2363,8 @@ } ], "responses" : { - "429" : { - "description" : "Too many requests.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2373,6 +2373,9 @@ } } }, + "200" : { + "description" : "Ok." + }, "404" : { "description" : "Not found.", "content" : { @@ -2383,8 +2386,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -2393,8 +2396,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2403,9 +2406,6 @@ } } }, - "200" : { - "description" : "Ok." - }, "204" : { "description" : "No content." }, @@ -2429,8 +2429,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2469,8 +2469,8 @@ } ], "responses" : { - "429" : { - "description" : "Too many requests.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2479,6 +2479,9 @@ } } }, + "200" : { + "description" : "Ok." + }, "404" : { "description" : "Not found.", "content" : { @@ -2489,8 +2492,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -2499,8 +2502,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2509,9 +2512,6 @@ } } }, - "200" : { - "description" : "Ok." - }, "204" : { "description" : "No content." }, @@ -2535,8 +2535,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2574,18 +2574,19 @@ "required" : true }, "responses" : { - "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.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2594,8 +2595,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -2604,8 +2605,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -2614,13 +2615,12 @@ } } }, - "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" } } } @@ -2645,8 +2645,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2684,46 +2684,6 @@ } ], "responses" : { - "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" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "200" : { "description" : "Returns the assets found", "content" : { @@ -2878,6 +2838,46 @@ } } }, + "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" + } + } + } + }, + "429" : { + "description" : "Too many requests.", + "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" : { @@ -2898,8 +2898,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2945,8 +2945,8 @@ "required" : true }, "responses" : { - "429" : { - "description" : "Too many requests.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2965,8 +2965,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -2975,8 +2975,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3159,8 +3159,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3352,8 +3352,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3372,8 +3372,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -3382,8 +3382,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3412,8 +3412,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3459,8 +3459,8 @@ "required" : true }, "responses" : { - "429" : { - "description" : "Too many requests.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3479,26 +3479,6 @@ } } }, - "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" - } - } - } - }, "200" : { "description" : "Returns the updated asset", "content" : { @@ -3653,6 +3633,26 @@ } } }, + "429" : { + "description" : "Too many requests.", + "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" : { @@ -3673,8 +3673,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3702,8 +3702,8 @@ "description" : "The endpoint Triggers reload of shell descriptors.", "operationId" : "reload", "responses" : { - "429" : { - "description" : "Too many requests.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3722,8 +3722,11 @@ } } }, - "400" : { - "description" : "Bad request.", + "202" : { + "description" : "Created registry reload job." + }, + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -3732,8 +3735,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3742,9 +3745,6 @@ } } }, - "202" : { - "description" : "Created registry reload job." - }, "401" : { "description" : "Authorization failed.", "content" : { @@ -3765,8 +3765,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3794,8 +3794,18 @@ "description" : "The endpoint returns all policies .", "operationId" : "policy", "responses" : { - "429" : { - "description" : "Too many requests.", + "200" : { + "description" : "Returns the policies", + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/PolicyResponse" + } + } + } + }, + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3814,8 +3824,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -3824,18 +3834,8 @@ } } }, - "200" : { - "description" : "Returns the policies", - "content" : { - "*/*" : { - "schema" : { - "$ref" : "#/components/schemas/PolicyResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3864,8 +3864,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3904,8 +3904,8 @@ } ], "responses" : { - "429" : { - "description" : "Too many requests.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3914,18 +3914,24 @@ } } }, - "404" : { - "description" : "Not found.", + "200" : { + "description" : "OK.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : -2147483648, + "type" : "array", + "description" : "Investigations", + "items" : { + "$ref" : "#/components/schemas/InvestigationResponse" + } } } } }, - "400" : { - "description" : "Bad request.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -3934,8 +3940,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -3944,18 +3950,12 @@ } } }, - "200" : { - "description" : "OK.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : -2147483648, - "type" : "array", - "description" : "Investigations", - "items" : { - "$ref" : "#/components/schemas/InvestigationResponse" - } + "$ref" : "#/components/schemas/ErrorResponse" } } } @@ -3980,8 +3980,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -4049,18 +4049,20 @@ } ], "responses" : { - "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" : { @@ -4069,8 +4071,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -4079,8 +4081,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -4089,8 +4091,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -4099,8 +4101,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -4109,8 +4111,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -4119,14 +4121,12 @@ } } }, - "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" } } } @@ -4150,8 +4150,8 @@ "description" : "The endpoint can return limited data based on the user role", "operationId" : "dashboard", "responses" : { - "429" : { - "description" : "Too many requests.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -4170,8 +4170,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -4180,8 +4180,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -4190,18 +4190,18 @@ } } }, - "200" : { - "description" : "Returns dashboard data", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/DashboardResponse" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "401" : { - "description" : "Authorization failed.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -4210,8 +4210,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -4220,12 +4220,12 @@ } } }, - "500" : { - "description" : "Internal server error.", + "200" : { + "description" : "Returns dashboard data", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "$ref" : "#/components/schemas/DashboardResponse" } } } @@ -4260,11 +4260,8 @@ } ], "responses" : { - "204" : { - "description" : "No Content." - }, - "429" : { - "description" : "Too many requests.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -4283,18 +4280,18 @@ } } }, - "400" : { - "description" : "Bad request.", + "200" : { + "description" : "OK.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "$ref" : "#/components/schemas/ImportReportResponse" } } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -4303,8 +4300,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -4313,8 +4310,11 @@ } } }, - "403" : { - "description" : "Forbidden.", + "204" : { + "description" : "No Content." + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -4323,8 +4323,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -4333,12 +4333,12 @@ } } }, - "200" : { - "description" : "OK.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ImportReportResponse" + "$ref" : "#/components/schemas/ErrorResponse" } } } @@ -4380,6 +4380,26 @@ } ], "responses" : { + "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" + } + } + } + }, "200" : { "description" : "Returns the paged result found for Asset", "content" : { @@ -4549,16 +4569,6 @@ } } }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "400" : { "description" : "Bad request.", "content" : { @@ -4569,16 +4579,6 @@ } } }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "401" : { "description" : "Authorization failed.", "content" : { @@ -4599,8 +4599,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -4670,18 +4670,20 @@ } ], "responses" : { - "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" : { @@ -4690,8 +4692,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -4700,8 +4702,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -4710,8 +4712,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -4720,8 +4722,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -4730,8 +4732,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -4740,14 +4742,12 @@ } } }, - "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" } } } @@ -4781,8 +4781,8 @@ } ], "responses" : { - "429" : { - "description" : "Too many requests.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -4801,6 +4801,16 @@ } } }, + "429" : { + "description" : "Too many requests.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, "400" : { "description" : "Bad request.", "content" : { @@ -4811,6 +4821,26 @@ } } }, + "401" : { + "description" : "Authorization failed.", + "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" : { @@ -4974,36 +5004,6 @@ } } } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } } }, "security" : [ @@ -5042,46 +5042,6 @@ } ], "responses" : { - "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" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "200" : { "description" : "Returns the paged result found for Asset", "content" : { @@ -5241,6 +5201,46 @@ } } }, + "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" + } + } + } + }, + "429" : { + "description" : "Too many requests.", + "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" : { @@ -5261,8 +5261,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -5332,18 +5332,20 @@ } ], "responses" : { - "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" : { @@ -5352,8 +5354,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -5362,8 +5364,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -5372,8 +5374,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -5382,8 +5384,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -5392,8 +5394,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5402,14 +5404,12 @@ } } }, - "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" } } } @@ -5433,8 +5433,8 @@ "description" : "The endpoint returns a map for assets consumed by the map.", "operationId" : "assetsCountryMap", "responses" : { - "429" : { - "description" : "Too many requests.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5443,18 +5443,20 @@ } } }, - "404" : { - "description" : "Not found.", + "200" : { + "description" : "Returns the assets found", "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" : { @@ -5463,8 +5465,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -5473,14 +5475,12 @@ } } }, - "200" : { - "description" : "Returns the assets found", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } @@ -5505,8 +5505,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -5544,8 +5544,8 @@ } ], "responses" : { - "429" : { - "description" : "Too many requests.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5564,18 +5564,8 @@ } } }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -5738,6 +5728,16 @@ } } }, + "400" : { + "description" : "Bad request.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, "401" : { "description" : "Authorization failed.", "content" : { @@ -5758,8 +5758,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -5798,8 +5798,8 @@ } ], "responses" : { - "429" : { - "description" : "Too many requests.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5808,18 +5808,23 @@ } } }, - "404" : { - "description" : "Not found.", + "200" : { + "description" : "OK.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "type" : "array", + "description" : "Alerts", + "items" : { + "$ref" : "#/components/schemas/AlertResponse" + } } } } }, - "400" : { - "description" : "Bad request.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -5828,8 +5833,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -5838,17 +5843,12 @@ } } }, - "200" : { - "description" : "OK.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Alerts", - "items" : { - "$ref" : "#/components/schemas/AlertResponse" - } + "$ref" : "#/components/schemas/ErrorResponse" } } } @@ -5873,8 +5873,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -5942,18 +5942,20 @@ } ], "responses" : { - "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" : { @@ -5962,8 +5964,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -5972,8 +5974,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -5982,8 +5984,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -5992,8 +5994,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -6002,8 +6004,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -6012,14 +6014,12 @@ } } }, - "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" } } } @@ -6043,8 +6043,8 @@ "description" : "Deletes all submodels from the system.", "operationId" : "deleteSubmodels", "responses" : { - "429" : { - "description" : "Too many requests.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -6053,6 +6053,9 @@ } } }, + "200" : { + "description" : "Ok." + }, "404" : { "description" : "Not found.", "content" : { @@ -6063,8 +6066,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -6073,8 +6076,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -6083,9 +6086,6 @@ } } }, - "200" : { - "description" : "Ok." - }, "204" : { "description" : "No Content." }, @@ -6109,8 +6109,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -6148,8 +6148,11 @@ } ], "responses" : { - "429" : { - "description" : "Too many requests.", + "204" : { + "description" : "Deleted." + }, + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -6158,6 +6161,9 @@ } } }, + "200" : { + "description" : "Okay" + }, "404" : { "description" : "Not found.", "content" : { @@ -6168,8 +6174,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -6178,8 +6184,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -6188,12 +6194,6 @@ } } }, - "204" : { - "description" : "Deleted." - }, - "200" : { - "description" : "Okay" - }, "401" : { "description" : "Authorization failed.", "content" : { @@ -6214,8 +6214,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { diff --git a/tx-backend/src/main/resources/db/migration/V13__remove_investigation_alert_asset-as-planned.sql b/tx-backend/src/main/resources/db/migration/V13__remove_investigation_alert_asset-as-planned.sql new file mode 100644 index 0000000000..2268254277 --- /dev/null +++ b/tx-backend/src/main/resources/db/migration/V13__remove_investigation_alert_asset-as-planned.sql @@ -0,0 +1,4 @@ +DROP TABLE public.asset_as_planned_alert_notifications; +DROP TABLE public.assets_as_planned_alerts; +DROP TABLE public.assets_as_planned_investigations; +DROP TABLE public.assets_as_planned_notifications; diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/common/support/DatabaseSupport.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/common/support/DatabaseSupport.java index d270e1db03..8b96e0dc05 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/common/support/DatabaseSupport.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/common/support/DatabaseSupport.java @@ -36,12 +36,8 @@ public class DatabaseSupport { "assets_as_built_notifications", "assets_as_built_investigations", "asset_as_built_alert_notifications", - "asset_as_planned_alert_notifications", "assets_as_built_alerts", "assets_as_planned_childs", - "assets_as_planned_notifications", - "assets_as_planned_investigations", - "assets_as_planned_alerts", "alert_notification", "alert", "assets_as_built", 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 ccfe27894d..bd12f4d4de 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 @@ -172,60 +172,6 @@ void shouldStartAlert() throws JsonProcessingException, JoseException { .body("content", Matchers.hasSize(1)); } - @Test - void shouldStartAlertForAsPlanned() throws JsonProcessingException, JoseException { - // given - List partIds = List.of( - "urn:uuid:0733946c-59c6-41ae-9570-cb43a6e4da01" // BPN: BPNL00000003CML1 - ); - String description = "at least 15 characters long investigation description"; - QualityNotificationSeverityRequest severity = QualityNotificationSeverityRequest.MINOR; - String receiverBpn = "BPN"; - - assetsSupport.defaultAssetsAsPlannedStored(); - - val request = StartQualityNotificationRequest.builder() - .partIds(partIds) - .description(description) - .severity(severity) - .receiverBpn(receiverBpn) - .isAsBuilt(false) - .build(); - - // when - given() - .contentType(ContentType.JSON) - .body(objectMapper.writeValueAsString(request)) - .header(oAuth2Support.jwtAuthorization(SUPERVISOR)) - .when() - .post("/api/alerts") - .then() - .statusCode(201) - .body("id", Matchers.isA(Number.class)); - - partIds.forEach( - partId -> { - AssetBase asset = assetAsPlannedRepository.getAssetById(partId); - assertThat(asset).isNotNull(); - } - ); - - alertNotificationsSupport.assertAlertNotificationsSize(1); - - // when/then - given() - .header(oAuth2Support.jwtAuthorization(SUPERVISOR)) - .body(new PageableFilterRequest(new OwnPageable(0, 10, Collections.emptyList()), null)) - .contentType(ContentType.JSON) - .when() - .post("/api/alerts/filter") - .then() - .statusCode(200) - .body("page", Matchers.is(0)) - .body("pageSize", Matchers.is(10)) - .body("content", Matchers.hasSize(1)); - } - @Test void givenMissingSeverity_whenStartAlert_thenBadRequest() throws JsonProcessingException, JoseException { // given From 2c592d59723bf1171e05a9fe55d0eacf96922fd6 Mon Sep 17 00:00:00 2001 From: Maximilian Wesener Date: Mon, 19 Feb 2024 10:17:43 +0100 Subject: [PATCH 31/34] chore(security): 516 cleared database tables for notifications on as planned. --- .../alert/model/AlertNotificationEntity.java | 4 ++-- .../alert/repository/AlertsRepositoryImpl.java | 5 ++--- .../service/NotificationPublisherServiceTest.java | 11 +++++++++++ 3 files changed, 15 insertions(+), 5 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 8e86c6ea5e..c670ed282e 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,6 +27,7 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; import lombok.AllArgsConstructor; +import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @@ -91,8 +92,7 @@ public static QualityNotificationMessage toDomain(AlertNotificationEntity alertN public static AlertNotificationEntity from(AlertEntity alertEntity, QualityNotificationMessage qualityNotificationMessage, - List notificationAssets, - List assetAsPlannedEntitiesByAlert) { + List notificationAssets) { return AlertNotificationEntity .builder() .id(qualityNotificationMessage.getId()) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/alert/repository/AlertsRepositoryImpl.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/alert/repository/AlertsRepositoryImpl.java index 2ab2ccc8f2..31f0eb0e33 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/alert/repository/AlertsRepositoryImpl.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/alert/repository/AlertsRepositoryImpl.java @@ -209,12 +209,11 @@ private void handleNotificationUpdate(AlertNotificationEntity notificationEntity private AlertNotificationEntity toNotificationEntity(AlertEntity alertEntity, QualityNotificationMessage notification, List alertAssets, List assetAsPlannedEntitiesByAlert) { List filteredAsBuiltAssets = filterNotificationAssets(notification, alertAssets); - List filteredAsPlannedAssets = filterNotificationAssets(notification, assetAsPlannedEntitiesByAlert); - if (filteredAsBuiltAssets.isEmpty() && filteredAsPlannedAssets.isEmpty()) { + if (filteredAsBuiltAssets.isEmpty()) { throw new IllegalStateException(" with id %s has no notification assets".formatted(alertEntity.getId())); } - return AlertNotificationEntity.from(alertEntity, notification, filteredAsBuiltAssets, filteredAsPlannedAssets); + return AlertNotificationEntity.from(alertEntity, notification, filteredAsBuiltAssets); } private List filterNotificationAssets(QualityNotificationMessage notification, List assets) { diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/domain/service/NotificationPublisherServiceTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/domain/service/NotificationPublisherServiceTest.java index f503b3160d..1a93677bbf 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/domain/service/NotificationPublisherServiceTest.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/qualitynotification/domain/service/NotificationPublisherServiceTest.java @@ -35,6 +35,7 @@ import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.exception.QualityNotificationIllegalUpdate; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.service.EdcNotificationService; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.service.NotificationPublisherService; +import org.eclipse.tractusx.traceability.qualitynotification.domain.investigation.model.exception.NotificationNotSupportedException; import org.eclipse.tractusx.traceability.testdata.AssetTestDataFactory; import org.eclipse.tractusx.traceability.testdata.InvestigationTestDataFactory; import org.junit.jupiter.api.DisplayName; @@ -104,6 +105,16 @@ void testStartInvestigationSuccessful() { verify(assetRepository).getAssetsById(Arrays.asList("asset-1", "asset-2")); } + @Test + void testThrowNotificationNotSupportedException() { + // Given + String description = "Test investigation"; + String receiverBpn = "someReceiverBpn"; + + // Then + assertThrows(NotificationNotSupportedException.class, () -> notificationPublisherService.startInvestigation(Arrays.asList("asset-1", "asset-2"), description, Instant.parse("2022-03-01T12:00:00Z"), QualityNotificationSeverity.MINOR, receiverBpn, false)); + } + @Test void testStartAlertSuccessful() { // Given From 429c898e76d9534aadb43b3f3e482ddf59fc7645 Mon Sep 17 00:00:00 2001 From: Maximilian Wesener Date: Mon, 19 Feb 2024 10:20:03 +0100 Subject: [PATCH 32/34] chore(security): 516 removed unused import. --- .../infrastructure/alert/model/AlertNotificationEntity.java | 2 -- 1 file changed, 2 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 c670ed282e..577b67977c 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,13 +27,11 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; import lombok.AllArgsConstructor; -import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; import lombok.experimental.SuperBuilder; import org.eclipse.tractusx.traceability.assets.infrastructure.asbuilt.model.AssetAsBuiltEntity; -import org.eclipse.tractusx.traceability.assets.infrastructure.asplanned.model.AssetAsPlannedEntity; 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.QualityNotificationStatus; From af8af6c2d2cd96eaa28a6296f04d0960215dfbda Mon Sep 17 00:00:00 2001 From: Maximilian Wesener Date: Mon, 19 Feb 2024 10:20:09 +0100 Subject: [PATCH 33/34] chore(security): 516 removed unused import. --- .../openapi/traceability-foss-backend.json | 1804 ++++++++--------- 1 file changed, 902 insertions(+), 902 deletions(-) diff --git a/tx-backend/openapi/traceability-foss-backend.json b/tx-backend/openapi/traceability-foss-backend.json index 5ef389d579..6ac1cd97a9 100644 --- a/tx-backend/openapi/traceability-foss-backend.json +++ b/tx-backend/openapi/traceability-foss-backend.json @@ -37,20 +37,18 @@ "description" : "The endpoint returns a result of BPN EDC URL mappings.", "operationId" : "getBpnEdcs", "responses" : { - "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" } } } }, - "500" : { - "description" : "Internal server error.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -59,8 +57,8 @@ } } }, - "404" : { - "description" : "Not found.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -69,18 +67,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" } } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -89,8 +89,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -99,8 +99,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -109,8 +109,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -151,20 +151,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" } } } }, - "500" : { - "description" : "Internal server error.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -173,8 +171,8 @@ } } }, - "404" : { - "description" : "Not found.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -183,8 +181,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -193,8 +191,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -213,18 +211,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" : { @@ -265,20 +265,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" } } } }, - "500" : { - "description" : "Internal server error.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -287,8 +285,8 @@ } } }, - "404" : { - "description" : "Not found.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -297,8 +295,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -307,8 +305,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -327,18 +325,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" : { @@ -376,14 +376,8 @@ } ], "responses" : { - "200" : { - "description" : "Returns the paged result found", - "content" : { - "application/json" : {} - } - }, - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -412,8 +406,14 @@ } } }, - "400" : { - "description" : "Bad request.", + "200" : { + "description" : "Returns the paged result found", + "content" : { + "application/json" : {} + } + }, + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -422,8 +422,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -432,8 +432,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -442,8 +442,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -489,8 +489,8 @@ "required" : true }, "responses" : { - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -499,12 +499,6 @@ } } }, - "200" : { - "description" : "Ok.", - "content" : { - "application/json" : {} - } - }, "404" : { "description" : "Not found.", "content" : { @@ -525,8 +519,14 @@ } } }, - "400" : { - "description" : "Bad request.", + "200" : { + "description" : "Ok.", + "content" : { + "application/json" : {} + } + }, + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -535,14 +535,8 @@ } } }, - "204" : { - "description" : "No Content.", - "content" : { - "application/json" : {} - } - }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -551,8 +545,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -561,8 +555,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -570,6 +564,12 @@ } } } + }, + "204" : { + "description" : "No Content.", + "content" : { + "application/json" : {} + } } }, "security" : [ @@ -600,8 +600,8 @@ "required" : true }, "responses" : { - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -630,8 +630,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -640,8 +640,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -650,8 +650,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -660,22 +660,22 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "201" : { + "description" : "Created.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "$ref" : "#/components/schemas/QualityNotificationIdResponse" } } } }, - "201" : { - "description" : "Created.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/QualityNotificationIdResponse" + "$ref" : "#/components/schemas/ErrorResponse" } } } @@ -720,8 +720,8 @@ "required" : true }, "responses" : { - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -730,9 +730,6 @@ } } }, - "200" : { - "description" : "Ok." - }, "404" : { "description" : "Not found.", "content" : { @@ -753,8 +750,11 @@ } } }, - "400" : { - "description" : "Bad request.", + "200" : { + "description" : "Ok." + }, + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -763,11 +763,8 @@ } } }, - "204" : { - "description" : "No content." - }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -776,8 +773,11 @@ } } }, - "403" : { - "description" : "Forbidden.", + "204" : { + "description" : "No content." + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -786,8 +786,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -836,8 +836,8 @@ "required" : true }, "responses" : { - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -846,9 +846,6 @@ } } }, - "200" : { - "description" : "Ok." - }, "404" : { "description" : "Not found.", "content" : { @@ -869,8 +866,11 @@ } } }, - "400" : { - "description" : "Bad request.", + "200" : { + "description" : "Ok." + }, + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -879,11 +879,8 @@ } } }, - "204" : { - "description" : "No content." - }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -892,8 +889,11 @@ } } }, - "403" : { - "description" : "Forbidden.", + "204" : { + "description" : "No content." + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -902,8 +902,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -942,8 +942,8 @@ } ], "responses" : { - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -952,9 +952,6 @@ } } }, - "200" : { - "description" : "Ok." - }, "404" : { "description" : "Not found.", "content" : { @@ -975,8 +972,11 @@ } } }, - "400" : { - "description" : "Bad request.", + "200" : { + "description" : "Ok." + }, + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -985,11 +985,8 @@ } } }, - "204" : { - "description" : "No content." - }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -998,8 +995,11 @@ } } }, - "403" : { - "description" : "Forbidden.", + "204" : { + "description" : "No content." + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1008,8 +1008,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1048,8 +1048,8 @@ } ], "responses" : { - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1058,9 +1058,6 @@ } } }, - "200" : { - "description" : "Ok." - }, "404" : { "description" : "Not found.", "content" : { @@ -1081,8 +1078,11 @@ } } }, - "400" : { - "description" : "Bad request.", + "200" : { + "description" : "Ok." + }, + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1091,11 +1091,8 @@ } } }, - "204" : { - "description" : "No content." - }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1104,8 +1101,11 @@ } } }, - "403" : { - "description" : "Forbidden.", + "204" : { + "description" : "No content." + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1114,8 +1114,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1153,20 +1153,18 @@ "required" : true }, "responses" : { - "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" } } } }, - "500" : { - "description" : "Internal server error.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1175,8 +1173,8 @@ } } }, - "404" : { - "description" : "Not found.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1185,8 +1183,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1195,8 +1193,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1205,18 +1203,20 @@ } } }, - "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" } } } }, - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1225,8 +1225,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1264,8 +1264,8 @@ "required" : true }, "responses" : { - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1294,8 +1294,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1304,8 +1304,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1314,8 +1314,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1324,22 +1324,22 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "201" : { + "description" : "Created.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "$ref" : "#/components/schemas/CreateNotificationContractResponse" } } } }, - "201" : { - "description" : "Created.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/CreateNotificationContractResponse" + "$ref" : "#/components/schemas/ErrorResponse" } } } @@ -1374,8 +1374,8 @@ "required" : true }, "responses" : { - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1384,12 +1384,6 @@ } } }, - "200" : { - "description" : "OK.", - "content" : { - "application/json" : {} - } - }, "404" : { "description" : "Not found.", "content" : { @@ -1410,8 +1404,14 @@ } } }, - "400" : { - "description" : "Bad request.", + "200" : { + "description" : "OK.", + "content" : { + "application/json" : {} + } + }, + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1420,11 +1420,8 @@ } } }, - "204" : { - "description" : "No Content." - }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1433,8 +1430,11 @@ } } }, - "403" : { - "description" : "Forbidden.", + "204" : { + "description" : "No Content." + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1443,8 +1443,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1490,8 +1490,8 @@ } }, "responses" : { - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1500,12 +1500,6 @@ } } }, - "200" : { - "description" : "OK.", - "content" : { - "application/json" : {} - } - }, "404" : { "description" : "Not found.", "content" : { @@ -1526,8 +1520,14 @@ } } }, - "400" : { - "description" : "Bad request.", + "200" : { + "description" : "OK.", + "content" : { + "application/json" : {} + } + }, + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1536,11 +1536,8 @@ } } }, - "204" : { - "description" : "No Content." - }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1549,8 +1546,11 @@ } } }, - "403" : { - "description" : "Forbidden.", + "204" : { + "description" : "No Content." + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1559,8 +1559,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1598,8 +1598,8 @@ "required" : true }, "responses" : { - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1628,8 +1628,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1638,8 +1638,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1648,8 +1648,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1658,8 +1658,11 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "201" : { + "description" : "Created." + }, + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1667,9 +1670,6 @@ } } } - }, - "201" : { - "description" : "Created." } }, "security" : [ @@ -1700,20 +1700,18 @@ "required" : true }, "responses" : { - "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" } } } }, - "500" : { - "description" : "Internal server error.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1722,8 +1720,8 @@ } } }, - "404" : { - "description" : "Not found.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1732,8 +1730,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1742,8 +1740,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1762,18 +1760,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", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1811,8 +1811,8 @@ "required" : true }, "responses" : { - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1841,8 +1841,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1851,8 +1851,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1861,8 +1861,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1871,8 +1871,11 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "201" : { + "description" : "Created." + }, + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1880,9 +1883,6 @@ } } } - }, - "201" : { - "description" : "Created." } }, "security" : [ @@ -1913,8 +1913,8 @@ "required" : true }, "responses" : { - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1923,20 +1923,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.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1945,8 +1943,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1955,8 +1953,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1975,18 +1973,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", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2024,8 +2024,8 @@ "required" : true }, "responses" : { - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2054,8 +2054,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2064,8 +2064,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2074,8 +2074,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2084,22 +2084,22 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "201" : { + "description" : "Created.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "$ref" : "#/components/schemas/QualityNotificationIdResponse" } } } }, - "201" : { - "description" : "Created.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/QualityNotificationIdResponse" + "$ref" : "#/components/schemas/ErrorResponse" } } } @@ -2144,8 +2144,8 @@ "required" : true }, "responses" : { - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2174,8 +2174,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2184,11 +2184,8 @@ } } }, - "204" : { - "description" : "No content." - }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2197,8 +2194,11 @@ } } }, - "403" : { - "description" : "Forbidden.", + "204" : { + "description" : "No content." + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2207,8 +2207,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2257,8 +2257,8 @@ "required" : true }, "responses" : { - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2267,9 +2267,6 @@ } } }, - "200" : { - "description" : "Ok." - }, "404" : { "description" : "Not found.", "content" : { @@ -2290,8 +2287,11 @@ } } }, - "400" : { - "description" : "Bad request.", + "200" : { + "description" : "Ok." + }, + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2300,11 +2300,8 @@ } } }, - "204" : { - "description" : "No content." - }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2313,8 +2310,11 @@ } } }, - "403" : { - "description" : "Forbidden.", + "204" : { + "description" : "No content." + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2323,8 +2323,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2363,8 +2363,8 @@ } ], "responses" : { - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2373,9 +2373,6 @@ } } }, - "200" : { - "description" : "Ok." - }, "404" : { "description" : "Not found.", "content" : { @@ -2396,8 +2393,11 @@ } } }, - "400" : { - "description" : "Bad request.", + "200" : { + "description" : "Ok." + }, + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2406,11 +2406,8 @@ } } }, - "204" : { - "description" : "No content." - }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2419,8 +2416,11 @@ } } }, - "403" : { - "description" : "Forbidden.", + "204" : { + "description" : "No content." + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2429,8 +2429,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2469,8 +2469,8 @@ } ], "responses" : { - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2479,9 +2479,6 @@ } } }, - "200" : { - "description" : "Ok." - }, "404" : { "description" : "Not found.", "content" : { @@ -2502,8 +2499,11 @@ } } }, - "400" : { - "description" : "Bad request.", + "200" : { + "description" : "Ok." + }, + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2512,11 +2512,8 @@ } } }, - "204" : { - "description" : "No content." - }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2525,8 +2522,11 @@ } } }, - "403" : { - "description" : "Forbidden.", + "204" : { + "description" : "No content." + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2535,8 +2535,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2574,19 +2574,18 @@ "required" : true }, "responses" : { - "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" } } } }, - "500" : { - "description" : "Internal server error.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -2595,8 +2594,8 @@ } } }, - "404" : { - "description" : "Not found.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -2605,8 +2604,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2615,8 +2614,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2635,8 +2634,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2645,12 +2644,13 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "200" : { + "description" : "Returns the paged result found for Asset", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "type" : "array" } } } @@ -2684,6 +2684,66 @@ } ], "responses" : { + "400" : { + "description" : "Bad request.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "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" + } + } + } + }, + "401" : { + "description" : "Authorization failed.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, "200" : { "description" : "Returns the assets found", "content" : { @@ -2847,66 +2907,6 @@ } } } - }, - "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" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "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" : [ @@ -2945,8 +2945,8 @@ "required" : true }, "responses" : { - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2975,8 +2975,28 @@ } } }, - "400" : { - "description" : "Bad request.", + "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" : { @@ -3139,28 +3159,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", - "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" : { @@ -3352,8 +3352,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3382,8 +3382,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3392,8 +3392,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3402,8 +3402,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -3412,8 +3412,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3459,8 +3459,8 @@ "required" : true }, "responses" : { - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3479,6 +3479,26 @@ } } }, + "429" : { + "description" : "Too many requests.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, "200" : { "description" : "Returns the updated asset", "content" : { @@ -3633,8 +3653,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3643,8 +3663,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -3653,28 +3673,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", - "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" : { @@ -3702,8 +3702,8 @@ "description" : "The endpoint Triggers reload of shell descriptors.", "operationId" : "reload", "responses" : { - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3722,9 +3722,6 @@ } } }, - "202" : { - "description" : "Created registry reload job." - }, "429" : { "description" : "Too many requests.", "content" : { @@ -3735,8 +3732,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3745,8 +3742,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3755,8 +3752,11 @@ } } }, - "403" : { - "description" : "Forbidden.", + "202" : { + "description" : "Created registry reload job." + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -3765,8 +3765,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3794,18 +3794,8 @@ "description" : "The endpoint returns all policies .", "operationId" : "policy", "responses" : { - "200" : { - "description" : "Returns the policies", - "content" : { - "*/*" : { - "schema" : { - "$ref" : "#/components/schemas/PolicyResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3834,8 +3824,18 @@ } } }, - "400" : { - "description" : "Bad request.", + "200" : { + "description" : "Returns the policies", + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/PolicyResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3844,8 +3844,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3854,8 +3854,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -3864,8 +3864,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3904,8 +3904,8 @@ } ], "responses" : { - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3914,24 +3914,18 @@ } } }, - "200" : { - "description" : "OK.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : -2147483648, - "type" : "array", - "description" : "Investigations", - "items" : { - "$ref" : "#/components/schemas/InvestigationResponse" - } + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "404" : { - "description" : "Not found.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -3940,18 +3934,24 @@ } } }, - "429" : { - "description" : "Too many requests.", + "200" : { + "description" : "OK.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : -2147483648, + "type" : "array", + "description" : "Investigations", + "items" : { + "$ref" : "#/components/schemas/InvestigationResponse" + } } } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3960,8 +3960,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3970,8 +3970,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -3980,8 +3980,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -4061,8 +4061,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -4091,8 +4091,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -4101,8 +4101,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -4111,8 +4111,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -4121,8 +4121,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -4150,8 +4150,8 @@ "description" : "The endpoint can return limited data based on the user role", "operationId" : "dashboard", "responses" : { - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -4180,8 +4180,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -4190,8 +4190,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -4200,8 +4200,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -4210,22 +4210,22 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "200" : { + "description" : "Returns dashboard data", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "$ref" : "#/components/schemas/DashboardResponse" } } } }, - "200" : { - "description" : "Returns dashboard data", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/DashboardResponse" + "$ref" : "#/components/schemas/ErrorResponse" } } } @@ -4260,8 +4260,8 @@ } ], "responses" : { - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -4280,18 +4280,18 @@ } } }, - "200" : { - "description" : "OK.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ImportReportResponse" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "429" : { - "description" : "Too many requests.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -4300,8 +4300,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -4323,18 +4323,18 @@ } } }, - "403" : { - "description" : "Forbidden.", + "200" : { + "description" : "OK.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "$ref" : "#/components/schemas/ImportReportResponse" } } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -4380,8 +4380,8 @@ } ], "responses" : { - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -4400,6 +4400,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" + } + } + } + }, + "401" : { + "description" : "Authorization failed.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, "200" : { "description" : "Returns the paged result found for Asset", "content" : { @@ -4559,48 +4599,8 @@ } } }, - "429" : { - "description" : "Too many requests.", - "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" - } - } - } - }, - "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" : { @@ -4682,8 +4682,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -4712,8 +4712,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -4722,8 +4722,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -4732,8 +4732,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -4742,8 +4742,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -4781,8 +4781,8 @@ } ], "responses" : { - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -4811,26 +4811,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" - } - } - } - }, "403" : { "description" : "Forbidden.", "content" : { @@ -5004,6 +4984,26 @@ } } } + }, + "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" : [ @@ -5042,6 +5042,66 @@ } ], "responses" : { + "400" : { + "description" : "Bad request.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "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" + } + } + } + }, + "401" : { + "description" : "Authorization failed.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, "200" : { "description" : "Returns the paged result found for Asset", "content" : { @@ -5155,114 +5215,54 @@ }, "sentQualityAlertIdsInStatusActive" : { "type" : "array", - "items" : { - "type" : "integer", - "format" : "int64" - } - }, - "receivedQualityAlertIdsInStatusActive" : { - "type" : "array", - "items" : { - "type" : "integer", - "format" : "int64" - } - }, - "sentQualityInvestigationIdsInStatusActive" : { - "type" : "array", - "items" : { - "type" : "integer", - "format" : "int64" - } - }, - "receivedQualityInvestigationIdsInStatusActive" : { - "type" : "array", - "items" : { - "type" : "integer", - "format" : "int64" - } - }, - "importState" : { - "type" : "string", - "enum" : [ - "TRANSIENT", - "PERSISTENT", - "ERROR", - "IN_SYNCHRONIZATION", - "UNSET" - ] - }, - "importNote" : { - "type" : "string" - } - } - } - } - } - } - } - }, - "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" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "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" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "items" : { + "type" : "integer", + "format" : "int64" + } + }, + "receivedQualityAlertIdsInStatusActive" : { + "type" : "array", + "items" : { + "type" : "integer", + "format" : "int64" + } + }, + "sentQualityInvestigationIdsInStatusActive" : { + "type" : "array", + "items" : { + "type" : "integer", + "format" : "int64" + } + }, + "receivedQualityInvestigationIdsInStatusActive" : { + "type" : "array", + "items" : { + "type" : "integer", + "format" : "int64" + } + }, + "importState" : { + "type" : "string", + "enum" : [ + "TRANSIENT", + "PERSISTENT", + "ERROR", + "IN_SYNCHRONIZATION", + "UNSET" + ] + }, + "importNote" : { + "type" : "string" + } + } + } + } } } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5344,8 +5344,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -5374,8 +5374,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5384,8 +5384,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -5394,8 +5394,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -5404,8 +5404,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5433,8 +5433,8 @@ "description" : "The endpoint returns a map for assets consumed by the map.", "operationId" : "assetsCountryMap", "responses" : { - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -5443,20 +5443,18 @@ } } }, - "200" : { - "description" : "Returns the assets found", + "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" : { @@ -5465,8 +5463,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5475,8 +5473,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -5485,18 +5483,20 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "200" : { + "description" : "Returns the assets found", "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" : { @@ -5505,8 +5505,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5544,8 +5544,8 @@ } ], "responses" : { - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -5728,8 +5728,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5738,8 +5738,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -5748,8 +5748,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -5758,8 +5758,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5798,8 +5798,8 @@ } ], "responses" : { - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -5808,23 +5808,18 @@ } } }, - "200" : { - "description" : "OK.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Alerts", - "items" : { - "$ref" : "#/components/schemas/AlertResponse" - } + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "404" : { - "description" : "Not found.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -5833,18 +5828,23 @@ } } }, - "429" : { - "description" : "Too many requests.", + "200" : { + "description" : "OK.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "type" : "array", + "description" : "Alerts", + "items" : { + "$ref" : "#/components/schemas/AlertResponse" + } } } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5853,8 +5853,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -5863,8 +5863,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -5873,8 +5873,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5954,8 +5954,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -5984,8 +5984,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5994,8 +5994,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -6004,8 +6004,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -6014,8 +6014,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -6043,8 +6043,8 @@ "description" : "Deletes all submodels from the system.", "operationId" : "deleteSubmodels", "responses" : { - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -6053,9 +6053,6 @@ } } }, - "200" : { - "description" : "Ok." - }, "404" : { "description" : "Not found.", "content" : { @@ -6076,8 +6073,11 @@ } } }, - "400" : { - "description" : "Bad request.", + "200" : { + "description" : "Ok." + }, + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -6086,11 +6086,8 @@ } } }, - "204" : { - "description" : "No Content." - }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -6099,8 +6096,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -6109,8 +6106,11 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "204" : { + "description" : "No Content." + }, + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -6148,11 +6148,8 @@ } ], "responses" : { - "204" : { - "description" : "Deleted." - }, - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -6161,9 +6158,6 @@ } } }, - "200" : { - "description" : "Okay" - }, "404" : { "description" : "Not found.", "content" : { @@ -6184,8 +6178,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -6194,8 +6188,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -6204,8 +6198,11 @@ } } }, - "403" : { - "description" : "Forbidden.", + "200" : { + "description" : "Okay" + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -6214,8 +6211,11 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "204" : { + "description" : "Deleted." + }, + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { From e36446dd191c69ff53ea5b3ff9c4e08fbef5c94f Mon Sep 17 00:00:00 2001 From: Maximilian Wesener Date: Mon, 19 Feb 2024 10:37:52 +0100 Subject: [PATCH 34/34] chore(security): 516 removed unused import. --- .../openapi/traceability-foss-backend.json | 1836 ++++++++--------- .../repository/AlertsRepositoryImpl.java | 20 +- 2 files changed, 924 insertions(+), 932 deletions(-) diff --git a/tx-backend/openapi/traceability-foss-backend.json b/tx-backend/openapi/traceability-foss-backend.json index 6ac1cd97a9..388d545579 100644 --- a/tx-backend/openapi/traceability-foss-backend.json +++ b/tx-backend/openapi/traceability-foss-backend.json @@ -37,8 +37,8 @@ "description" : "The endpoint returns a result of BPN EDC URL mappings.", "operationId" : "getBpnEdcs", "responses" : { - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -47,18 +47,20 @@ } } }, - "404" : { - "description" : "Not found.", + "200" : { + "description" : "Returns the paged result found", "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" : { @@ -67,20 +69,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" } } } }, - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -89,8 +89,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -99,8 +99,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -109,8 +109,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -151,8 +151,8 @@ "required" : true }, "responses" : { - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -161,8 +161,8 @@ } } }, - "404" : { - "description" : "Not found.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -171,8 +171,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -181,8 +181,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -191,8 +191,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -201,30 +201,30 @@ } } }, - "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" } } } }, - "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" } } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -265,8 +265,8 @@ "required" : true }, "responses" : { - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -275,8 +275,8 @@ } } }, - "404" : { - "description" : "Not found.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -285,8 +285,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -295,8 +295,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -305,8 +305,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -315,30 +315,30 @@ } } }, - "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" } } } }, - "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" } } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -376,8 +376,8 @@ } ], "responses" : { - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -386,8 +386,8 @@ } } }, - "404" : { - "description" : "Not found.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -396,8 +396,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -406,14 +406,8 @@ } } }, - "200" : { - "description" : "Returns the paged result found", - "content" : { - "application/json" : {} - } - }, - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -422,8 +416,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -432,8 +426,14 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "200" : { + "description" : "Returns the paged result found", + "content" : { + "application/json" : {} + } + }, + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -442,8 +442,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -489,8 +489,8 @@ "required" : true }, "responses" : { - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -499,8 +499,14 @@ } } }, - "404" : { - "description" : "Not found.", + "204" : { + "description" : "No Content.", + "content" : { + "application/json" : {} + } + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -509,8 +515,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -519,14 +525,8 @@ } } }, - "200" : { - "description" : "Ok.", - "content" : { - "application/json" : {} - } - }, - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -535,8 +535,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -545,8 +545,14 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "200" : { + "description" : "Ok.", + "content" : { + "application/json" : {} + } + }, + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -555,8 +561,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -564,12 +570,6 @@ } } } - }, - "204" : { - "description" : "No Content.", - "content" : { - "application/json" : {} - } } }, "security" : [ @@ -600,8 +600,8 @@ "required" : true }, "responses" : { - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -610,8 +610,8 @@ } } }, - "404" : { - "description" : "Not found.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -620,8 +620,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -630,8 +630,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -640,8 +640,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -650,8 +650,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -670,8 +670,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -720,8 +720,8 @@ "required" : true }, "responses" : { - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -730,8 +730,11 @@ } } }, - "404" : { - "description" : "Not found.", + "204" : { + "description" : "No content." + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -740,8 +743,11 @@ } } }, - "429" : { - "description" : "Too many requests.", + "200" : { + "description" : "Ok." + }, + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -750,11 +756,8 @@ } } }, - "200" : { - "description" : "Ok." - }, - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -763,8 +766,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -773,11 +776,8 @@ } } }, - "204" : { - "description" : "No content." - }, - "401" : { - "description" : "Authorization failed.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -786,8 +786,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -836,8 +836,21 @@ "required" : true }, "responses" : { - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "204" : { + "description" : "No content." + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -846,6 +859,9 @@ } } }, + "200" : { + "description" : "Ok." + }, "404" : { "description" : "Not found.", "content" : { @@ -866,21 +882,8 @@ } } }, - "200" : { - "description" : "Ok." - }, - "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" : { @@ -889,11 +892,8 @@ } } }, - "204" : { - "description" : "No content." - }, - "401" : { - "description" : "Authorization failed.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -902,8 +902,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -942,8 +942,8 @@ } ], "responses" : { - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -952,8 +952,8 @@ } } }, - "404" : { - "description" : "Not found.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -962,8 +962,11 @@ } } }, - "429" : { - "description" : "Too many requests.", + "200" : { + "description" : "Ok." + }, + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -972,11 +975,8 @@ } } }, - "200" : { - "description" : "Ok." - }, - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -985,8 +985,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -998,8 +998,8 @@ "204" : { "description" : "No content." }, - "401" : { - "description" : "Authorization failed.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1008,8 +1008,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1048,8 +1048,8 @@ } ], "responses" : { - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1058,8 +1058,8 @@ } } }, - "404" : { - "description" : "Not found.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1068,8 +1068,11 @@ } } }, - "429" : { - "description" : "Too many requests.", + "200" : { + "description" : "Ok." + }, + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1078,11 +1081,8 @@ } } }, - "200" : { - "description" : "Ok." - }, - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1091,8 +1091,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1104,8 +1104,8 @@ "204" : { "description" : "No content." }, - "401" : { - "description" : "Authorization failed.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1114,8 +1114,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1153,8 +1153,8 @@ "required" : true }, "responses" : { - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1163,8 +1163,8 @@ } } }, - "404" : { - "description" : "Not found.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1173,8 +1173,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1183,8 +1183,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1193,8 +1193,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1215,8 +1215,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1225,8 +1225,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1264,8 +1264,8 @@ "required" : true }, "responses" : { - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1274,8 +1274,8 @@ } } }, - "404" : { - "description" : "Not found.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1284,8 +1284,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1294,8 +1294,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1304,8 +1304,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1314,8 +1314,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1334,8 +1334,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1374,8 +1374,11 @@ "required" : true }, "responses" : { - "400" : { - "description" : "Bad request.", + "204" : { + "description" : "No Content." + }, + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1384,8 +1387,8 @@ } } }, - "404" : { - "description" : "Not found.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1394,8 +1397,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1404,14 +1407,8 @@ } } }, - "200" : { - "description" : "OK.", - "content" : { - "application/json" : {} - } - }, - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1420,8 +1417,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1430,11 +1427,14 @@ } } }, - "204" : { - "description" : "No Content." + "200" : { + "description" : "OK.", + "content" : { + "application/json" : {} + } }, - "401" : { - "description" : "Authorization failed.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1443,8 +1443,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1490,8 +1490,11 @@ } }, "responses" : { - "400" : { - "description" : "Bad request.", + "204" : { + "description" : "No Content." + }, + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1500,8 +1503,8 @@ } } }, - "404" : { - "description" : "Not found.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1510,8 +1513,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1520,14 +1523,8 @@ } } }, - "200" : { - "description" : "OK.", - "content" : { - "application/json" : {} - } - }, - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1536,8 +1533,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1546,11 +1543,14 @@ } } }, - "204" : { - "description" : "No Content." + "200" : { + "description" : "OK.", + "content" : { + "application/json" : {} + } }, - "401" : { - "description" : "Authorization failed.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1559,8 +1559,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1598,8 +1598,8 @@ "required" : true }, "responses" : { - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1608,8 +1608,8 @@ } } }, - "404" : { - "description" : "Not found.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1618,8 +1618,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1628,8 +1628,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1638,8 +1638,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1648,8 +1648,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1661,8 +1661,8 @@ "201" : { "description" : "Created." }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1700,8 +1700,8 @@ "required" : true }, "responses" : { - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1710,8 +1710,8 @@ } } }, - "404" : { - "description" : "Not found.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1720,8 +1720,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1730,8 +1730,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1740,8 +1740,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1750,30 +1750,30 @@ } } }, - "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" } } } }, - "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" } } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1811,8 +1811,8 @@ "required" : true }, "responses" : { - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1821,8 +1821,8 @@ } } }, - "404" : { - "description" : "Not found.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1831,8 +1831,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1841,8 +1841,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1851,8 +1851,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1861,8 +1861,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -1874,8 +1874,8 @@ "201" : { "description" : "Created." }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1913,8 +1913,8 @@ "required" : true }, "responses" : { - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1923,8 +1923,8 @@ } } }, - "404" : { - "description" : "Not found.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1933,8 +1933,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1943,8 +1943,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1953,8 +1953,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1963,30 +1963,30 @@ } } }, - "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" } } } }, - "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" } } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2024,8 +2024,8 @@ "required" : true }, "responses" : { - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2034,8 +2034,8 @@ } } }, - "404" : { - "description" : "Not found.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2044,8 +2044,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -2054,8 +2054,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -2064,8 +2064,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2074,8 +2074,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2094,8 +2094,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2144,8 +2144,8 @@ "required" : true }, "responses" : { - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2154,8 +2154,11 @@ } } }, - "404" : { - "description" : "Not found.", + "204" : { + "description" : "No content." + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2164,8 +2167,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -2174,8 +2177,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -2184,8 +2187,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2194,11 +2197,8 @@ } } }, - "204" : { - "description" : "No content." - }, - "401" : { - "description" : "Authorization failed.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2207,8 +2207,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2257,8 +2257,8 @@ "required" : true }, "responses" : { - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2267,8 +2267,11 @@ } } }, - "404" : { - "description" : "Not found.", + "204" : { + "description" : "No content." + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2277,8 +2280,11 @@ } } }, - "429" : { - "description" : "Too many requests.", + "200" : { + "description" : "Ok." + }, + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -2287,11 +2293,8 @@ } } }, - "200" : { - "description" : "Ok." - }, - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -2300,8 +2303,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2310,11 +2313,8 @@ } } }, - "204" : { - "description" : "No content." - }, - "401" : { - "description" : "Authorization failed.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2323,8 +2323,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2363,8 +2363,8 @@ } ], "responses" : { - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2373,8 +2373,8 @@ } } }, - "404" : { - "description" : "Not found.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2383,8 +2383,11 @@ } } }, - "429" : { - "description" : "Too many requests.", + "200" : { + "description" : "Ok." + }, + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -2393,11 +2396,8 @@ } } }, - "200" : { - "description" : "Ok." - }, - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -2406,8 +2406,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2419,8 +2419,8 @@ "204" : { "description" : "No content." }, - "401" : { - "description" : "Authorization failed.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2429,8 +2429,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2469,8 +2469,8 @@ } ], "responses" : { - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2479,8 +2479,8 @@ } } }, - "404" : { - "description" : "Not found.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2489,8 +2489,11 @@ } } }, - "429" : { - "description" : "Too many requests.", + "200" : { + "description" : "Ok." + }, + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -2499,11 +2502,8 @@ } } }, - "200" : { - "description" : "Ok." - }, - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -2512,8 +2512,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2525,8 +2525,8 @@ "204" : { "description" : "No content." }, - "401" : { - "description" : "Authorization failed.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2535,8 +2535,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2574,8 +2574,8 @@ "required" : true }, "responses" : { - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2584,8 +2584,8 @@ } } }, - "404" : { - "description" : "Not found.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2594,8 +2594,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -2604,8 +2604,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -2614,8 +2614,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2624,8 +2624,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -2634,23 +2634,23 @@ } } }, - "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" } } } }, - "200" : { - "description" : "Returns the paged result found for Asset", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } @@ -2684,28 +2684,8 @@ } ], "responses" : { - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2714,8 +2694,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2724,8 +2704,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -2734,8 +2714,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -2907,6 +2887,26 @@ } } } + }, + "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" + } + } + } } }, "security" : [ @@ -2945,36 +2945,6 @@ "required" : true }, "responses" : { - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "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" : { @@ -2985,16 +2955,6 @@ } } }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "401" : { "description" : "Authorization failed.", "content" : { @@ -3159,6 +3119,26 @@ } } }, + "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" + } + } + } + }, "500" : { "description" : "Internal server error.", "content" : { @@ -3168,6 +3148,26 @@ } } } + }, + "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" + } + } + } } }, "security" : [ @@ -3198,6 +3198,16 @@ } ], "responses" : { + "403" : { + "description" : "Forbidden.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, "200" : { "description" : "Returns the assets found", "content" : { @@ -3352,8 +3362,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -3382,18 +3392,8 @@ } } }, - "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" : { @@ -3402,8 +3402,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3412,8 +3412,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3456,11 +3456,21 @@ } } }, - "required" : true - }, - "responses" : { - "400" : { - "description" : "Bad request.", + "required" : true + }, + "responses" : { + "403" : { + "description" : "Forbidden.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -3489,8 +3499,18 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3662,26 +3682,6 @@ } } } - }, - "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" : [ @@ -3702,8 +3702,8 @@ "description" : "The endpoint Triggers reload of shell descriptors.", "operationId" : "reload", "responses" : { - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3712,8 +3712,8 @@ } } }, - "404" : { - "description" : "Not found.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -3722,8 +3722,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -3732,8 +3732,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -3742,8 +3742,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3755,8 +3755,8 @@ "202" : { "description" : "Created registry reload job." }, - "401" : { - "description" : "Authorization failed.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3765,8 +3765,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3794,8 +3794,8 @@ "description" : "The endpoint returns all policies .", "operationId" : "policy", "responses" : { - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3804,8 +3804,8 @@ } } }, - "404" : { - "description" : "Not found.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -3814,28 +3814,28 @@ } } }, - "429" : { - "description" : "Too many requests.", + "200" : { + "description" : "Returns the policies", "content" : { - "application/json" : { + "*/*" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "$ref" : "#/components/schemas/PolicyResponse" } } } }, - "200" : { - "description" : "Returns the policies", + "404" : { + "description" : "Not found.", "content" : { - "*/*" : { + "application/json" : { "schema" : { - "$ref" : "#/components/schemas/PolicyResponse" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -3844,8 +3844,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3854,8 +3854,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -3864,8 +3864,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3904,18 +3904,8 @@ } ], "responses" : { - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3924,8 +3914,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -3950,8 +3940,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -3960,8 +3950,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -3970,8 +3960,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3980,8 +3970,18 @@ } } }, - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -4049,20 +4049,18 @@ } ], "responses" : { - "200" : { - "description" : "Returns a distinct filter values for given fieldName.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -4091,8 +4089,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -4101,8 +4099,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -4111,18 +4109,20 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "200" : { + "description" : "Returns a distinct filter values for given fieldName.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -4150,18 +4150,18 @@ "description" : "The endpoint can return limited data based on the user role", "operationId" : "dashboard", "responses" : { - "400" : { - "description" : "Bad request.", + "200" : { + "description" : "Returns dashboard data", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "$ref" : "#/components/schemas/DashboardResponse" } } } }, - "404" : { - "description" : "Not found.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -4170,8 +4170,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -4180,8 +4180,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -4190,8 +4190,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -4200,8 +4200,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -4210,18 +4210,18 @@ } } }, - "200" : { - "description" : "Returns dashboard data", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/DashboardResponse" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -4260,18 +4260,11 @@ } ], "responses" : { - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } + "204" : { + "description" : "No Content." }, - "404" : { - "description" : "Not found.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -4280,8 +4273,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -4290,8 +4283,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -4300,8 +4293,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -4310,11 +4303,8 @@ } } }, - "204" : { - "description" : "No Content." - }, - "401" : { - "description" : "Authorization failed.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -4333,8 +4323,18 @@ } } }, - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -4380,66 +4380,6 @@ } ], "responses" : { - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "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" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "200" : { "description" : "Returns the paged result found for Asset", "content" : { @@ -4599,6 +4539,46 @@ } } }, + "403" : { + "description" : "Forbidden.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "401" : { + "description" : "Authorization failed.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "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" + } + } + } + }, "500" : { "description" : "Internal server error.", "content" : { @@ -4608,6 +4588,26 @@ } } } + }, + "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" + } + } + } } }, "security" : [ @@ -4670,20 +4670,18 @@ } ], "responses" : { - "200" : { - "description" : "Returns a distinct filter values for given fieldName.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -4712,8 +4710,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -4722,8 +4720,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -4732,18 +4730,20 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "200" : { + "description" : "Returns a distinct filter values for given fieldName.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -4781,8 +4781,18 @@ } ], "responses" : { - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -4811,8 +4821,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -4821,8 +4831,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -4985,18 +4995,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -5042,18 +5042,8 @@ } ], "responses" : { - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5062,8 +5052,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -5072,8 +5062,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -5082,8 +5072,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -5092,8 +5082,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5261,8 +5251,18 @@ } } }, - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -5332,20 +5332,18 @@ } ], "responses" : { - "200" : { - "description" : "Returns a distinct filter values for given fieldName.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -5374,8 +5372,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5384,8 +5382,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -5394,18 +5392,20 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "200" : { + "description" : "Returns a distinct filter values for given fieldName.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -5433,8 +5433,8 @@ "description" : "The endpoint returns a map for assets consumed by the map.", "operationId" : "assetsCountryMap", "responses" : { - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5443,8 +5443,8 @@ } } }, - "404" : { - "description" : "Not found.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -5453,8 +5453,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -5463,8 +5463,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -5473,8 +5473,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5495,8 +5495,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -5505,8 +5505,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -5544,28 +5544,8 @@ } ], "responses" : { - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5728,8 +5708,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -5738,8 +5718,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -5748,8 +5728,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -5767,6 +5747,26 @@ } } } + }, + "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" + } + } + } } }, "security" : [ @@ -5798,18 +5798,8 @@ } ], "responses" : { - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5818,8 +5808,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -5843,8 +5833,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -5853,8 +5843,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -5863,8 +5853,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5873,8 +5863,18 @@ } } }, - "500" : { - "description" : "Internal server error.", + "400" : { + "description" : "Bad request.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -5942,20 +5942,18 @@ } ], "responses" : { - "200" : { - "description" : "Returns a distinct filter values for given fieldName.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "400" : { - "description" : "Bad request.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -5984,8 +5982,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5994,8 +5992,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -6004,18 +6002,20 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "200" : { + "description" : "Returns a distinct filter values for given fieldName.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -6043,8 +6043,8 @@ "description" : "Deletes all submodels from the system.", "operationId" : "deleteSubmodels", "responses" : { - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -6053,8 +6053,8 @@ } } }, - "404" : { - "description" : "Not found.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -6063,8 +6063,11 @@ } } }, - "429" : { - "description" : "Too many requests.", + "200" : { + "description" : "Ok." + }, + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -6073,11 +6076,8 @@ } } }, - "200" : { - "description" : "Ok." - }, - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -6086,8 +6086,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -6096,8 +6096,11 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "204" : { + "description" : "No Content." + }, + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -6106,11 +6109,8 @@ } } }, - "204" : { - "description" : "No Content." - }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -6148,8 +6148,8 @@ } ], "responses" : { - "400" : { - "description" : "Bad request.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -6158,8 +6158,8 @@ } } }, - "404" : { - "description" : "Not found.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -6168,8 +6168,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -6178,8 +6178,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -6188,8 +6188,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -6198,11 +6198,14 @@ } } }, + "204" : { + "description" : "Deleted." + }, "200" : { "description" : "Okay" }, - "401" : { - "description" : "Authorization failed.", + "400" : { + "description" : "Bad request.", "content" : { "application/json" : { "schema" : { @@ -6211,11 +6214,8 @@ } } }, - "204" : { - "description" : "Deleted." - }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/alert/repository/AlertsRepositoryImpl.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/alert/repository/AlertsRepositoryImpl.java index 31f0eb0e33..6ee78cf2d5 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/alert/repository/AlertsRepositoryImpl.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/infrastructure/alert/repository/AlertsRepositoryImpl.java @@ -68,8 +68,6 @@ public class AlertsRepositoryImpl implements AlertRepository { private final JpaAssetAsBuiltRepository assetAsBuiltRepository; - private final JpaAssetAsPlannedRepository assetAsPlannedRepository; - private final JpaAlertNotificationRepository notificationRepository; private final Clock clock; @@ -107,16 +105,15 @@ public QualityNotificationId updateQualityNotificationEntity(QualityNotification public QualityNotificationId saveQualityNotificationEntity(QualityNotification alert) { List assetAsBuiltEntities = getAssetAsBuiltEntitiesByAlert(alert); - List assetAsPlannedEntities = getAssetAsPlannedEntitiesByAlert(alert); - if (assetAsBuiltEntities.isEmpty() && assetAsPlannedEntities.isEmpty()) { + if (assetAsBuiltEntities.isEmpty()) { throw new IllegalArgumentException("No assets found for %s asset ids".formatted(String.join(", ", alert.getAssetIds()))); } AlertEntity alertEntity = AlertEntity.from(alert, assetAsBuiltEntities); jpaAlertRepository.save(alertEntity); alert.getNotifications() - .forEach(notification -> handleNotificationCreate(alertEntity, notification, assetAsBuiltEntities, assetAsPlannedEntities)); + .forEach(notification -> handleNotificationCreate(alertEntity, notification, assetAsBuiltEntities)); return new QualityNotificationId(alertEntity.getId()); } @@ -171,8 +168,7 @@ private void handleNotificationUpdate(AlertEntity alertEntity, QualityNotificati } else { log.info("handleNotificationUpdate::new notification with id {} for alert with id {}", notification.getId(), alert.getNotificationId()); List assetAsBuiltEntitiesByAlert = getAssetAsBuiltEntitiesByAlert(alert); - List assetAsPlannedEntitiesByAlert = getAssetAsPlannedEntitiesByAlert(alert); - handleNotificationCreate(alertEntity, notification, assetAsBuiltEntitiesByAlert, assetAsPlannedEntitiesByAlert); + handleNotificationCreate(alertEntity, notification, assetAsBuiltEntitiesByAlert); } } @@ -182,13 +178,9 @@ private List getAssetAsBuiltEntitiesByAlert(QualityNotificat return assetAsBuiltRepository.findByIdIn(alert.getAssetIds()); } - private List getAssetAsPlannedEntitiesByAlert(QualityNotification alert) { - return assetAsPlannedRepository.findByIdIn(alert.getAssetIds()); - } - private void handleNotificationCreate(AlertEntity alertEntity, QualityNotificationMessage notificationDomain, - List assetEntities, List assetAsPlannedEntitiesByAlert) { - AlertNotificationEntity notificationEntity = toNotificationEntity(alertEntity, notificationDomain, assetEntities, assetAsPlannedEntitiesByAlert); + List assetEntities) { + AlertNotificationEntity notificationEntity = toNotificationEntity(alertEntity, notificationDomain, assetEntities); AlertNotificationEntity savedEntity = notificationRepository.save(notificationEntity); log.info("Successfully persisted alert notification entity {}", savedEntity); } @@ -207,7 +199,7 @@ private void handleNotificationUpdate(AlertNotificationEntity notificationEntity } - private AlertNotificationEntity toNotificationEntity(AlertEntity alertEntity, QualityNotificationMessage notification, List alertAssets, List assetAsPlannedEntitiesByAlert) { + private AlertNotificationEntity toNotificationEntity(AlertEntity alertEntity, QualityNotificationMessage notification, List alertAssets) { List filteredAsBuiltAssets = filterNotificationAssets(notification, alertAssets); if (filteredAsBuiltAssets.isEmpty()) {