diff --git a/CHANGELOG.md b/CHANGELOG.md index e9ba504fa3..9009907c8a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,10 +9,15 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ### Added - Cypress Login to E2E Environment to enable cypress e2e tests. - Fixed bug in argo workflow which allows to successfully run on INT-A/INT-B + ### Changed - Fixed table-settings reset bug +- Changed datepicker in FE to date range picker - Fixed name of veracode backend job - Bump jetty-http from 11.0.15 to 11.0.17 +- Assets response have now list of notification ids rather than count of existing notifications +- Frontend adapt to backend api changes for activeAlerts and activeInvestigations + ### Removed ## [9.0.0-rc1 - 03.11.2023] diff --git a/DEPENDENCIES_BACKEND b/DEPENDENCIES_BACKEND index 4bc37d6e1a..7d30a3b37c 100644 --- a/DEPENDENCIES_BACKEND +++ b/DEPENDENCIES_BACKEND @@ -244,7 +244,6 @@ maven/mavencentral/org.eclipse.jetty/jetty-annotations/11.0.15, EPL-2.0 OR Apach maven/mavencentral/org.eclipse.jetty/jetty-annotations/11.0.17, EPL-2.0 OR Apache-2.0, approved, rt.jetty maven/mavencentral/org.eclipse.jetty/jetty-client/11.0.15, EPL-2.0 OR Apache-2.0, approved, rt.jetty maven/mavencentral/org.eclipse.jetty/jetty-client/11.0.17, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty/jetty-http/11.0.15, EPL-2.0 OR Apache-2.0, approved, rt.jetty maven/mavencentral/org.eclipse.jetty/jetty-http/11.0.17, EPL-2.0 OR Apache-2.0, approved, rt.jetty maven/mavencentral/org.eclipse.jetty/jetty-io/11.0.15, EPL-2.0 OR Apache-2.0, approved, rt.jetty maven/mavencentral/org.eclipse.jetty/jetty-io/11.0.17, EPL-2.0 OR Apache-2.0, approved, rt.jetty @@ -353,7 +352,7 @@ maven/mavencentral/org.projectlombok/lombok/1.18.28, MIT AND LicenseRef-Public-D maven/mavencentral/org.rnorth.duct-tape/duct-tape/1.0.8, MIT, approved, clearlydefined maven/mavencentral/org.skyscreamer/jsonassert/1.5.1, Apache-2.0, approved, clearlydefined maven/mavencentral/org.slf4j/jul-to-slf4j/2.0.7, MIT, approved, #7698 -maven/mavencentral/org.slf4j/slf4j-api/1.7.30, MIT, approved, CQ13368 +maven/mavencentral/org.slf4j/slf4j-api/2.0.5, MIT, approved, #5915 maven/mavencentral/org.slf4j/slf4j-api/2.0.7, MIT, approved, #5915 maven/mavencentral/org.springdoc/springdoc-openapi-starter-common/2.0.4, Apache-2.0, approved, #5920 maven/mavencentral/org.springdoc/springdoc-openapi-starter-webmvc-api/2.0.4, Apache-2.0, approved, #5950 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 bdf17103bc..7c7a7af6a5 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 @@ -64,8 +64,8 @@ export const mockBmwAssets = [ } } ], - qualityAlertsInStatusActive: 0, - qualityInvestigationsInStatusActive: 0, + qualityAlertIdsInStatusActive: [], + qualityInvestigationIdsInStatusActive: [], }, { "id": "urn:uuid:0733946c-59c6-41ae-9570-cb43a6e43842", @@ -96,8 +96,8 @@ export const mockBmwAssets = [ } } ], - qualityAlertsInStatusActive: 0, - qualityInvestigationsInStatusActive: 0, + qualityAlertIdsInStatusActive:[], + qualityInvestigationIdsInStatusActive: [], }, { "id": "urn:uuid:4a5e9ff6-2d5c-4510-a90e-d55af3ba502f", @@ -136,8 +136,8 @@ export const mockBmwAssets = [ } } ], - qualityAlertsInStatusActive: 0, - qualityInvestigationsInStatusActive: 0, + qualityAlertIdsInStatusActive:[], + qualityInvestigationIdsInStatusActive: [], }, { "id": "urn:uuid:1be6ec59-40fb-4993-9836-acb0e284fa03", @@ -173,8 +173,8 @@ export const mockBmwAssets = [ } } ], - qualityAlertsInStatusActive: 0, - qualityInvestigationsInStatusActive: 0, + qualityAlertIdsInStatusActive: [], + qualityInvestigationIdsInStatusActive: [], }, { "id": "urn:uuid:1be6ec59-40fb-4993-9836-acb0e284fa01", @@ -205,8 +205,8 @@ export const mockBmwAssets = [ } } ], - qualityAlertsInStatusActive: 0, - qualityInvestigationsInStatusActive: 0, + qualityAlertIdsInStatusActive: [], + qualityInvestigationIdsInStatusActive: [], }, { "id": "urn:uuid:d8030bbf-a874-49fb-b2e1-7610f0ccad12", @@ -242,8 +242,8 @@ export const mockBmwAssets = [ } } ], - qualityAlertsInStatusActive: 0, - qualityInvestigationsInStatusActive: 0, + qualityAlertIdsInStatusActive: [], + qualityInvestigationIdsInStatusActive: [], }, { "id": "urn:uuid:5205f736-8fc2-4585-b869-6bf36842369a", @@ -274,8 +274,8 @@ export const mockBmwAssets = [ } } ], - qualityAlertsInStatusActive: 0, - qualityInvestigationsInStatusActive: 0, + qualityAlertIdsInStatusActive: [], + qualityInvestigationIdsInStatusActive: [], }, { "id": "urn:uuid:1be6ec59-40fb-4993-9836-acb0e284fa02", @@ -311,8 +311,8 @@ export const mockBmwAssets = [ } } ], - qualityAlertsInStatusActive: 0, - qualityInvestigationsInStatusActive: 0, + qualityAlertIdsInStatusActive: [], + qualityInvestigationIdsInStatusActive:[], }, { "id": "urn:uuid:1be6ec59-40fb-4993-9836-acb0e284fb01", @@ -343,8 +343,8 @@ export const mockBmwAssets = [ } } ], - qualityAlertsInStatusActive: 0, - qualityInvestigationsInStatusActive: 0, + qualityAlertIdsInStatusActive: [], + qualityInvestigationIdsInStatusActive: [], }, { "id": "urn:uuid:6b2296cc-26c0-4f38-8a22-092338c36e22", @@ -380,8 +380,8 @@ export const mockBmwAssets = [ } } ], - qualityAlertsInStatusActive: 0, - qualityInvestigationsInStatusActive: 0, + qualityAlertIdsInStatusActive: [], + qualityInvestigationIdsInStatusActive: [], }, { "id": "urn:uuid:c47b9f8b-48d0-4ef4-8f0b-e965a225cb8d", @@ -412,8 +412,8 @@ export const mockBmwAssets = [ } } ], - qualityAlertsInStatusActive: 0, - qualityInvestigationsInStatusActive: 0, + qualityAlertIdsInStatusActive: [], + qualityInvestigationIdsInStatusActive: [], }, { "id": "urn:uuid:f11ddc62-3bd5-468f-b7b0-110fe13ed0cd", @@ -444,8 +444,8 @@ export const mockBmwAssets = [ } } ], - qualityAlertsInStatusActive: 0, - qualityInvestigationsInStatusActive: 0, + qualityAlertIdsInStatusActive: [], + qualityInvestigationIdsInStatusActive: [], }, { "id": "urn:uuid:1be6ec59-40fb-4993-9836-acb0e284fb02", @@ -476,8 +476,8 @@ export const mockBmwAssets = [ } } ], - qualityAlertsInStatusActive: 0, - qualityInvestigationsInStatusActive: 0, + qualityAlertIdsInStatusActive: [], + qualityInvestigationIdsInStatusActive:[], }, { "id": "urn:uuid:7eeeac86-7b69-444d-81e6-655d0f1513bd", @@ -508,8 +508,8 @@ export const mockBmwAssets = [ } } ], - qualityAlertsInStatusActive: 0, - qualityInvestigationsInStatusActive: 0, + qualityAlertIdsInStatusActive:[], + qualityInvestigationIdsInStatusActive: [], }, ] as PartResponse[]; @@ -541,8 +541,8 @@ const MockEmptyPart: PartResponse = { qualityType: QualityType.Ok, van: null, semanticDataModel: SemanticDataModel.SERIALPART, - qualityAlertsInStatusActive: 0, - qualityInvestigationsInStatusActive: 0, + qualityAlertIdsInStatusActive: [], + qualityInvestigationIdsInStatusActive: [], }; 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 05a88d1f4d..cd32d4ca27 100644 --- a/frontend/src/app/modules/page/parts/model/parts.model.ts +++ b/frontend/src/app/modules/page/parts/model/parts.model.ts @@ -26,75 +26,75 @@ import { MainAspectType } from '@page/parts/model/mainAspectType.enum'; import { Owner } from '@page/parts/model/owner.enum'; export interface Part { - id: string; - idShort: string; - name: string; - manufacturer: string; - manufacturerPartId: string; - nameAtManufacturer: string; - businessPartner: string - semanticModel?: SemanticModel; - semanticModelId: string; - qualityType: QualityType; - children: string[]; - parents?: string[]; - error?: boolean; - activeInvestigation?: boolean; - activeAlert: boolean; - van: string; - semanticDataModel: SemanticDataModel; - classification: string; - - mainAspectType: MainAspectType; - - // aspectmodel props are temporarely hardcoded here because Tables and Views only accept root level prop array - // as built - partId?: string; - customerPartId?: string; - nameAtCustomer?: string; - manufacturingDate?: string; - manufacturingCountry?: string; - - productType?: string; - tractionBatteryCode?: string; - subcomponents: TractionBatteryCode[]; - - // as planned - validityPeriodFrom?: string; - validityPeriodTo?: string; - //partSiteInformationAsPlanned - catenaXSiteId: string; - psFunction: string; - functionValidFrom?: string; - functionValidUntil?: string; + id: string; + idShort: string; + name: string; + manufacturer: string; + manufacturerPartId: string; + nameAtManufacturer: string; + businessPartner: string; + semanticModel?: SemanticModel; + semanticModelId: string; + qualityType: QualityType; + children: string[]; + parents?: string[]; + error?: boolean; + activeInvestigation?: boolean; + activeAlert: boolean; + van: string; + semanticDataModel: SemanticDataModel; + classification: string; + + mainAspectType: MainAspectType; + + // aspectmodel props are temporarely hardcoded here because Tables and Views only accept root level prop array + // as built + partId?: string; + customerPartId?: string; + nameAtCustomer?: string; + manufacturingDate?: string; + manufacturingCountry?: string; + + productType?: string; + tractionBatteryCode?: string; + subcomponents: TractionBatteryCode[]; + + // as planned + validityPeriodFrom?: string; + validityPeriodTo?: string; + //partSiteInformationAsPlanned + catenaXSiteId: string; + psFunction: string; + functionValidFrom?: string; + functionValidUntil?: string; // count of notifications - activeAlerts: number; - activeInvestigations: number; + activeAlerts: string []; + activeInvestigations: string []; } export interface PartResponse { - id: string; - idShort: string; - semanticModelId: string; - manufacturerPartId: string; - businessPartner: string; - manufacturerName: string; - nameAtManufacturer: string; - owner: Owner; - childRelations: Relation[]; - parentRelations: Relation[]; - activeAlert: boolean; - underInvestigation: boolean; - qualityType: QualityType; - van: string; - semanticDataModel: SemanticDataModel; - classification: string; + id: string; + idShort: string; + semanticModelId: string; + manufacturerPartId: string; + businessPartner: string; + manufacturerName: string; + nameAtManufacturer: string; + owner: Owner; + childRelations: Relation[]; + parentRelations: Relation[]; + activeAlert: boolean; + underInvestigation: boolean; + qualityType: QualityType; + van: string; + semanticDataModel: SemanticDataModel; + classification: string; detailAspectModels: DetailAspectModel[]; // TODO: Delete ? flag when AsPlanned Parts do not return the props anymore - qualityAlertsInStatusActive?: number; - qualityInvestigationsInStatusActive?: number; + qualityAlertIdsInStatusActive?: string[]; + qualityInvestigationIdsInStatusActive?: string[]; } @@ -102,75 +102,77 @@ export type PartsResponse = PaginationResponse; // TODO: needs to be aligned with Severity in the future in terms of coding standards and use export enum QualityType { - Ok = 'Ok', - Minor = 'Minor', - Major = 'Major', - Critical = 'Critical', - LifeThreatening = 'LifeThreatening', + Ok = 'Ok', + Minor = 'Minor', + Major = 'Major', + Critical = 'Critical', + LifeThreatening = 'LifeThreatening', } export enum SemanticDataModel { - BATCH = 'BATCH', - SERIALPART = 'SERIALPART', - PARTASPLANNED = 'PARTASPLANNED', - JUSTINSEQUENCE = 'JUSTINSEQUENCE', - TRACTIONBATTERYCODE = 'TRACTIONBATTERYCODE', - UNKNOWN = 'UNKNOWN' + BATCH = 'BATCH', + SERIALPART = 'SERIALPART', + PARTASPLANNED = 'PARTASPLANNED', + JUSTINSEQUENCE = 'JUSTINSEQUENCE', + TRACTIONBATTERYCODE = 'TRACTIONBATTERYCODE', + UNKNOWN = 'UNKNOWN' } export enum SemanticDataModelInCamelCase { - BATCH = "Batch", - SERIALPART = 'SerialPart', - PARTASPLANNED = 'PartAsPlanned', - JUSTINSEQUENCE = 'JustInSequence', - TRACTIONBATTERYCODE = 'TractionBatteryCode', - UNKNOWN = 'Unknown' + BATCH = 'Batch', + SERIALPART = 'SerialPart', + PARTASPLANNED = 'PartAsPlanned', + JUSTINSEQUENCE = 'JustInSequence', + TRACTIONBATTERYCODE = 'TractionBatteryCode', + UNKNOWN = 'Unknown' } export interface Relation { - id: string; - idShort: string; + id: string; + idShort: string; } export interface AssetAsBuiltFilter { - id?: string, - idShort?: string, - name?: string, - manufacturer?: string, - partId?: string, - manufacturerPartId?: string, - customerPartId?: string, - classification?: string, - nameAtCustomer?: string, - semanticModelId?: string, - semanticDataModel?: string[], - manufacturingDate?: string, - manufacturingCountry?: string + id?: string, + idShort?: string, + name?: string, + manufacturer?: string, + partId?: string, + manufacturerPartId?: string, + customerPartId?: string, + classification?: string, + nameAtCustomer?: string, + semanticModelId?: string, + semanticDataModel?: string[], + manufacturingDate?: string, + manufacturingCountry?: string } export interface AssetAsPlannedFilter { - id?: string, - idShort?: string, - name?: string, - manufacturer?: string, - manufacturerPartId?: string, - classification?: string, - semanticDataModel?: string[], - semanticModelId?: string, - validityPeriodFrom?: string, - validityPeriodTo?: string, - psFunction?: string, - catenaXSiteId?: string, - functionValidFrom?: string, - functionValidUntil?: string, + id?: string, + idShort?: string, + name?: string, + manufacturer?: string, + manufacturerPartId?: string, + classification?: string, + semanticDataModel?: string[], + semanticModelId?: string, + validityPeriodFrom?: string, + validityPeriodTo?: string, + psFunction?: string, + catenaXSiteId?: string, + functionValidFrom?: string, + functionValidUntil?: string, } export enum FilterOperator { - EQUAL = 'EQUAL', - AT_LOCAL_DATE = 'AT_LOCAL_DATE', - STARTS_WITH = 'STARTS_WITH' + EQUAL = 'EQUAL', + AT_LOCAL_DATE = 'AT_LOCAL_DATE', + STARTS_WITH = 'STARTS_WITH', + BEFORE_LOCAL_DATE = 'BEFORE_LOCAL_DATE', + AFTER_LOCAL_DATE = 'AFTER_LOCAL_DATE' } export function getFilterOperatorValue(operator: FilterOperator) { - return operator as string; + return operator as string; } diff --git a/frontend/src/app/modules/shared/assembler/parts.assembler.ts b/frontend/src/app/modules/shared/assembler/parts.assembler.ts index 3f81fdce98..93c1a01281 100644 --- a/frontend/src/app/modules/shared/assembler/parts.assembler.ts +++ b/frontend/src/app/modules/shared/assembler/parts.assembler.ts @@ -117,8 +117,8 @@ export class PartsAssembler { functionValidUntil: functionValidUntil, // count of notifications - activeAlerts: partResponse.qualityAlertsInStatusActive, - activeInvestigations: partResponse.qualityInvestigationsInStatusActive, + activeAlerts: partResponse.qualityAlertIdsInStatusActive, + activeInvestigations: partResponse.qualityInvestigationIdsInStatusActive, } return mappedPart; @@ -269,8 +269,8 @@ export class PartsAssembler { ['psFunction', 'function'], ['functionValidFrom', 'functionValidFrom'], ['functionValidUntil', 'functionValidUntil'], - [ 'activeAlerts', 'qualityAlertsInStatusActive' ], - [ 'activeInvestigations', 'qualityInvestigationsInStatusActive' ], + [ 'activeAlerts', 'qualityAlertIdsInStatusActive' ], + [ 'activeInvestigations', 'qualityInvestigationIdsInStatusActive' ], ]); diff --git a/frontend/src/app/modules/shared/components/multi-select-autocomplete/multi-select-autocomplete.component.html b/frontend/src/app/modules/shared/components/multi-select-autocomplete/multi-select-autocomplete.component.html index efabdabe94..7675c8fff9 100644 --- a/frontend/src/app/modules/shared/components/multi-select-autocomplete/multi-select-autocomplete.component.html +++ b/frontend/src/app/modules/shared/components/multi-select-autocomplete/multi-select-autocomplete.component.html @@ -49,15 +49,17 @@ diff --git a/frontend/src/app/modules/shared/components/multi-select-autocomplete/multi-select-autocomplete.component.spec.ts b/frontend/src/app/modules/shared/components/multi-select-autocomplete/multi-select-autocomplete.component.spec.ts index 5bbd03e34c..410aaf8083 100644 --- a/frontend/src/app/modules/shared/components/multi-select-autocomplete/multi-select-autocomplete.component.spec.ts +++ b/frontend/src/app/modules/shared/components/multi-select-autocomplete/multi-select-autocomplete.component.spec.ts @@ -1,11 +1,9 @@ -import {renderComponent} from "@tests/test-render.utils"; -import {SharedModule} from "@shared/shared.module"; -import { - MultiSelectAutocompleteComponent -} from "@shared/components/multi-select-autocomplete/multi-select-autocomplete.component"; -import {SemanticDataModel} from "@page/parts/model/parts.model"; -import {MatDatepickerInputEvent} from "@angular/material/datepicker"; -import {DatePipe} from "@angular/common"; +import { DatePipe } from '@angular/common'; +import { MatDatepickerInputEvent } from '@angular/material/datepicker'; +import { SemanticDataModel } from '@page/parts/model/parts.model'; +import { MultiSelectAutocompleteComponent } from '@shared/components/multi-select-autocomplete/multi-select-autocomplete.component'; +import { SharedModule } from '@shared/shared.module'; +import { renderComponent } from '@tests/test-render.utils'; describe('MultiSelectAutocompleteComponent', () => { const renderMultiSelectAutoCompleteComponent = (multiple = true) => { @@ -53,6 +51,8 @@ describe('MultiSelectAutocompleteComponent', () => { componentInstance.searchInput = {value: 'initialValue'}; componentInstance.theSearchElement = 'initialValue'; componentInstance.selectedValue = ['initialValue']; + componentInstance.startDate = new Date('2022-02-04'); + componentInstance.endDate = new Date('2022-02-04'); componentInstance.clickClear(); @@ -199,11 +199,50 @@ describe('MultiSelectAutocompleteComponent', () => { }; // Call the function to test - componentInstance.dateSelectionEvent(event); + componentInstance.startDateSelected(event); // Expectations expect(componentInstance.formControl.value).toBe('2023-10-12'); // Replace with your actual form control variable expect(componentInstance.selectedValue).toBe('2023-10-12'); expect(componentInstance.theSearchElement).toBe('2023-10-12'); }); + + it('should emit date range correctly when changeEvent of Datepicker is triggered', async () => { + const {fixture} = await renderMultiSelectAutoCompleteComponent(false); + const {componentInstance} = fixture; + + const startDate = new Date('2023-10-12'); // Replace with your desired date + + // Create a mock event with the selected date + const startEvent: MatDatepickerInputEvent = { + value: startDate, + target: undefined, + targetElement: undefined + }; + + // Call the function to test the start date + componentInstance.startDateSelected(startEvent); + + // Expectations + expect(componentInstance.formControl.value).toBe('2023-10-12'); // Replace with your actual form control variable + expect(componentInstance.selectedValue).toBe('2023-10-12'); + expect(componentInstance.theSearchElement).toBe('2023-10-12'); + + const endDate = new Date('2023-10-20'); // Replace with your desired date + + // Create a mock event with the selected date + const endEvent: MatDatepickerInputEvent = { + value: endDate, + target: undefined, + targetElement: undefined + }; + + // Call the function to test the end date + componentInstance.endDateSelected(endEvent); + + // Expectations + expect(componentInstance.formControl.value).toBe('2023-10-12,2023-10-20'); // Replace with your actual form control variable + expect(componentInstance.selectedValue).toBe('2023-10-12,2023-10-20'); + expect(componentInstance.theSearchElement).toBe('2023-10-12,2023-10-20'); + }) }); diff --git a/frontend/src/app/modules/shared/components/multi-select-autocomplete/multi-select-autocomplete.component.ts b/frontend/src/app/modules/shared/components/multi-select-autocomplete/multi-select-autocomplete.component.ts index aa65533254..3dad7112d9 100644 --- a/frontend/src/app/modules/shared/components/multi-select-autocomplete/multi-select-autocomplete.component.ts +++ b/frontend/src/app/modules/shared/components/multi-select-autocomplete/multi-select-autocomplete.component.ts @@ -17,13 +17,13 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import {Component, EventEmitter, Inject, Input, LOCALE_ID, OnChanges, Output, ViewChild} from '@angular/core'; -import {FormControl} from '@angular/forms'; -import {MatDatepickerInputEvent} from "@angular/material/datepicker"; -import {DatePipe, registerLocaleData} from '@angular/common'; -import {DateAdapter, MAT_DATE_LOCALE} from '@angular/material/core'; +import { DatePipe, registerLocaleData } from '@angular/common'; import localeDe from '@angular/common/locales/de'; import localeDeExtra from '@angular/common/locales/extra/de'; +import { Component, EventEmitter, Inject, Input, LOCALE_ID, OnChanges, Output, ViewChild } from '@angular/core'; +import { FormControl } from '@angular/forms'; +import { DateAdapter, MAT_DATE_LOCALE } from '@angular/material/core'; +import { MatDatepickerInputEvent } from '@angular/material/datepicker'; @Component({ selector: 'app-multiselect', @@ -77,6 +77,9 @@ export class MultiSelectAutocompleteComponent implements OnChanges { selectAllChecked = false; displayString = ''; + startDate: Date; + endDate: Date; + constructor(public datePipe: DatePipe, public _adapter: DateAdapter, @Inject(MAT_DATE_LOCALE) public _locale: string, @Inject(LOCALE_ID) private locale: string) { registerLocaleData(localeDe, 'de', localeDeExtra); @@ -151,13 +154,22 @@ export class MultiSelectAutocompleteComponent implements OnChanges { this.selectedValue = this.theSearchElement as unknown as []; } - dateSelectionEvent(event: MatDatepickerInputEvent) { - let value = this.datePipe.transform(event.value, 'yyyy-MM-dd'); - this.formControl.patchValue(value); - this.selectedValue = value as unknown as []; - this.theSearchElement = value; + startDateSelected(event: MatDatepickerInputEvent) { + this.startDate = event.value; + this.theSearchElement = this.datePipe.transform(this.startDate, 'yyyy-MM-dd'); + this.formControl.patchValue(this.theSearchElement); + this.selectedValue = this.theSearchElement as unknown as []; + } + + endDateSelected(event: MatDatepickerInputEvent) { + this.endDate = event.value; + if(!this.endDate) { + return; } - + this.theSearchElement += ',' + this.datePipe.transform(this.endDate, 'yyyy-MM-dd'); + this.formControl.patchValue(this.theSearchElement); + this.selectedValue = this.theSearchElement as unknown as []; + } clickClear(): void { this.formControl.patchValue(""); this.formControl.reset(); @@ -166,6 +178,8 @@ export class MultiSelectAutocompleteComponent implements OnChanges { } this.theSearchElement = null; this.selectedValue = []; + this.startDate = null; + this.endDate = null; } 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 fe5b7f90ca..45732e5b55 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 @@ -194,10 +194,10 @@

{{ 'table.noResultFound' | i18n }}

- - {{ element[column] | date:'yyyy-MM-dd' }} - - + + + {{isDateElement(column) ? (element[column] | date:'yyyy-MM-dd') : element[column]?.length }} + { it('should append filter parameters for non-date filters', () => { @@ -42,12 +42,33 @@ describe('enrichFilterAndGetUpdatedParams', () => { const params = new HttpParams(); // @ts-ignore const result = enrichFilterAndGetUpdatedParams(filter, params); - expect(result.toString()).toContain('filter=functionValidUntil,AT_LOCAL_DATE,2023-10-13'); - expect(result.toString()).toContain('filter=functionValidFrom,AT_LOCAL_DATE,2023-10-14'); - expect(result.toString()).toContain('filter=validityPeriodFrom,AT_LOCAL_DATE,2023-10-15'); - expect(result.toString()).toContain('filter=validityPeriodTo,AT_LOCAL_DATE,2023-10-17'); + expect(result.toString()).toContain('filter=functionValidUntil,AFTER_LOCAL_DATE,2023-10-13'); + expect(result.toString()).toContain('filter=functionValidFrom,AFTER_LOCAL_DATE,2023-10-14'); + expect(result.toString()).toContain('filter=validityPeriodFrom,AFTER_LOCAL_DATE,2023-10-15'); + expect(result.toString()).toContain('filter=validityPeriodTo,AFTER_LOCAL_DATE,2023-10-17'); }); + it('should append filter parameters for date range filters', () => { + const filter = { + manufacturingDate: '2023-10-13,2023-10-20', + } + const params = new HttpParams(); + // @ts-ignore + const result = enrichFilterAndGetUpdatedParams(filter, params, "AND"); + expect(result.toString()).toContain('filter=manufacturingDate,AFTER_LOCAL_DATE,2023-10-13,AND'); + expect(result.toString()).toContain('filter=manufacturingDate,BEFORE_LOCAL_DATE,2023-10-20,AND'); + }) + + it('should append filter parameters for date range filters with same date', () => { + const filter = { + manufacturingDate: '2023-10-20,2023-10-20', + } + const params = new HttpParams(); + // @ts-ignore + const result = enrichFilterAndGetUpdatedParams(filter, params, "AND"); + expect(result.toString()).toContain('filter=manufacturingDate,AT_LOCAL_DATE,2023-10-20,AND'); + }) + it('should append filter parameters for semanticDataModelKey', () => { const filter = { semanticDataModel: ['value1', 'value2'], diff --git a/frontend/src/app/modules/shared/helper/filter-helper.ts b/frontend/src/app/modules/shared/helper/filter-helper.ts index e86d655c13..98fcfe6353 100644 --- a/frontend/src/app/modules/shared/helper/filter-helper.ts +++ b/frontend/src/app/modules/shared/helper/filter-helper.ts @@ -25,16 +25,30 @@ import { } from '@page/parts/model/parts.model'; export const FILTER_KEYS = ['manufacturingDate', 'functionValidFrom', 'functionValidUntil', 'validityPeriodFrom', 'validityPeriodTo']; - +// TODO: Refactor function as soon as multi value filter is supported export function enrichFilterAndGetUpdatedParams(filter: AssetAsBuiltFilter, params: HttpParams, filterOperator: string): HttpParams { const semanticDataModelKey = "semanticDataModel"; for (const key in filter) { let operator: string; - const filterValues = filter[key]; + const filterValues: string = filter[key]; if (key !== semanticDataModelKey) { if (filterValues.length !== 0) { if (isDateFilter(key)) { - operator = getFilterOperatorValue(FilterOperator.AT_LOCAL_DATE); + if(isDateRangeFilter(filterValues)) { + const [startDate, endDate] = filterValues.split(",") + if(isSameDate(startDate,endDate)) { + operator = getFilterOperatorValue(FilterOperator.AT_LOCAL_DATE); + params = params.append('filter', `${key},${operator},${startDate},${filterOperator}`); + continue; + } + let endDateOperator = getFilterOperatorValue(FilterOperator.BEFORE_LOCAL_DATE) + operator = getFilterOperatorValue((FilterOperator.AFTER_LOCAL_DATE)); + params = params.append('filter', `${key},${operator},${startDate},${filterOperator}`); + params = params.append('filter', `${key},${endDateOperator},${endDate},${filterOperator}`); + continue; + } else { + operator = getFilterOperatorValue(FilterOperator.AFTER_LOCAL_DATE); + } } else { operator = getFilterOperatorValue(FilterOperator.STARTS_WITH); } @@ -49,7 +63,6 @@ export function enrichFilterAndGetUpdatedParams(filter: AssetAsBuiltFilter, para } else { params = params.append('filter', `${key},${operator},${filterValues},${filterOperator}`); } - } } return params; @@ -59,6 +72,14 @@ export function isDateFilter(key: string): boolean { return FILTER_KEYS.includes(key); } +export function isDateRangeFilter(filterValues: string): boolean { + return filterValues.includes(","); +} + +export function isSameDate(startDate: string, endDate: string): boolean { + return startDate === endDate; +} + export function toAssetFilter(formValues: any, isAsBuilt: boolean): AssetAsPlannedFilter | AssetAsBuiltFilter { const transformedFilter: any = {}; diff --git a/frontend/src/assets/locales/de/common.json b/frontend/src/assets/locales/de/common.json index a4a5a29a40..246fe8df06 100644 --- a/frontend/src/assets/locales/de/common.json +++ b/frontend/src/assets/locales/de/common.json @@ -283,6 +283,8 @@ }, "datepicker": { "apply": "Filter", - "cancel": "Zurücksetzen" + "cancel": "Zurücksetzen", + "startDate": "Startdatum", + "endDate": "Enddatum" } } diff --git a/frontend/src/assets/locales/en/common.json b/frontend/src/assets/locales/en/common.json index 079361ecfe..69b7969789 100644 --- a/frontend/src/assets/locales/en/common.json +++ b/frontend/src/assets/locales/en/common.json @@ -286,6 +286,8 @@ }, "datepicker": { "apply": "Filter", - "cancel": "Reset" + "cancel": "Reset", + "startDate": "Start Date", + "endDate": "End Date" } } diff --git a/tx-backend/openapi/traceability-foss-backend.json b/tx-backend/openapi/traceability-foss-backend.json index 397e173b65..c6bed5927a 100644 --- a/tx-backend/openapi/traceability-foss-backend.json +++ b/tx-backend/openapi/traceability-foss-backend.json @@ -41,8 +41,8 @@ "description" : "The endpoint returns a result of BPN EDC URL mappings.", "operationId" : "getBpnEdcs", "responses" : { - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -51,18 +51,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" } } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -71,8 +73,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -81,8 +83,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -91,20 +93,18 @@ } } }, - "200" : { - "description" : "Returns the paged result found", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "404" : { - "description" : "Not found.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -155,18 +155,20 @@ "required" : true }, "responses" : { - "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" } } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -175,8 +177,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -185,20 +187,18 @@ } } }, - "200" : { - "description" : "Returns the paged result found for BpnEdcMapping", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -207,8 +207,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -217,8 +217,8 @@ } } }, - "404" : { - "description" : "Not found.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -269,18 +269,20 @@ "required" : true }, "responses" : { - "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" } } } }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -289,8 +291,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -299,20 +301,18 @@ } } }, - "200" : { - "description" : "Returns the paged result found for BpnEdcMapping", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -321,8 +321,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -331,8 +331,8 @@ } } }, - "404" : { - "description" : "Not found.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -380,8 +380,14 @@ } ], "responses" : { - "401" : { - "description" : "Authorization failed.", + "200" : { + "description" : "Returns the paged result found", + "content" : { + "application/json" : {} + } + }, + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -390,8 +396,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -400,14 +406,8 @@ } } }, - "200" : { - "description" : "Returns the paged result found", - "content" : { - "application/json" : {} - } - }, - "403" : { - "description" : "Forbidden.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -416,8 +416,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -426,8 +426,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -436,8 +436,8 @@ } } }, - "404" : { - "description" : "Not found.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -493,8 +493,8 @@ "required" : true }, "responses" : { - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -503,8 +503,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -513,8 +513,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -523,8 +523,11 @@ } } }, - "429" : { - "description" : "Too many requests.", + "204" : { + "description" : "No Content." + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -533,8 +536,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -543,8 +546,8 @@ } } }, - "404" : { - "description" : "Not found.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -553,9 +556,6 @@ } } }, - "204" : { - "description" : "No Content." - }, "400" : { "description" : "Bad request.", "content" : { @@ -603,8 +603,8 @@ } ], "responses" : { - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -613,8 +613,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -623,18 +623,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" } } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -643,8 +645,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -653,20 +655,18 @@ } } }, - "200" : { - "description" : "Returns the paged result found for Asset", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "404" : { - "description" : "Not found.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -712,8 +712,8 @@ "required" : true }, "responses" : { - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -722,8 +722,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -732,8 +732,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -742,8 +742,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -752,8 +752,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -762,8 +762,8 @@ } } }, - "404" : { - "description" : "Not found.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -832,8 +832,8 @@ "required" : true }, "responses" : { - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -842,8 +842,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -852,8 +852,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -862,8 +862,11 @@ } } }, - "429" : { - "description" : "Too many requests.", + "204" : { + "description" : "No content." + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -872,9 +875,9 @@ } } }, - "500" : { - "description" : "Internal server error.", - "content" : { + "403" : { + "description" : "Forbidden.", + "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ErrorResponse" @@ -882,8 +885,8 @@ } } }, - "404" : { - "description" : "Not found.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -892,9 +895,6 @@ } } }, - "204" : { - "description" : "No content." - }, "400" : { "description" : "Bad request.", "content" : { @@ -945,8 +945,8 @@ "required" : true }, "responses" : { - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -955,8 +955,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -965,8 +965,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -975,8 +975,11 @@ } } }, - "429" : { - "description" : "Too many requests.", + "204" : { + "description" : "No content." + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -985,8 +988,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -995,8 +998,8 @@ } } }, - "404" : { - "description" : "Not found.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1005,9 +1008,6 @@ } } }, - "204" : { - "description" : "No content." - }, "400" : { "description" : "Bad request.", "content" : { @@ -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", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1068,8 +1068,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1078,8 +1078,11 @@ } } }, - "429" : { - "description" : "Too many requests.", + "204" : { + "description" : "No content." + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1088,8 +1091,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1098,8 +1101,8 @@ } } }, - "404" : { - "description" : "Not found.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1108,9 +1111,6 @@ } } }, - "204" : { - "description" : "No content." - }, "400" : { "description" : "Bad request.", "content" : { @@ -1151,8 +1151,8 @@ } ], "responses" : { - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1161,8 +1161,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1171,8 +1171,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1181,8 +1181,11 @@ } } }, - "429" : { - "description" : "Too many requests.", + "204" : { + "description" : "No content." + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1191,8 +1194,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1201,8 +1204,8 @@ } } }, - "404" : { - "description" : "Not found.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1211,9 +1214,6 @@ } } }, - "204" : { - "description" : "No content." - }, "400" : { "description" : "Bad request.", "content" : { @@ -1253,8 +1253,8 @@ "required" : true }, "responses" : { - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1263,8 +1263,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1273,8 +1273,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1283,8 +1283,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1293,8 +1293,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1303,8 +1303,8 @@ } } }, - "404" : { - "description" : "Not found.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1362,8 +1362,8 @@ "required" : true }, "responses" : { - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1372,8 +1372,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1382,8 +1382,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1392,8 +1392,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1402,8 +1402,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1412,8 +1412,8 @@ } } }, - "404" : { - "description" : "Not found.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1476,8 +1476,8 @@ } } }, - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1486,8 +1486,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1496,8 +1496,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1506,8 +1506,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1516,8 +1516,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1526,8 +1526,8 @@ } } }, - "404" : { - "description" : "Not found.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1575,8 +1575,8 @@ "required" : true }, "responses" : { - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1585,8 +1585,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1595,8 +1595,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1605,8 +1605,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1615,8 +1615,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1625,8 +1625,8 @@ } } }, - "404" : { - "description" : "Not found.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1677,8 +1677,8 @@ "required" : true }, "responses" : { - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1687,30 +1687,30 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "200" : { + "description" : "Returns the paged result found for Asset", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "minItems" : 0, + "type" : "array" } } } }, - "200" : { - "description" : "Returns the paged result found for Asset", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "403" : { - "description" : "Forbidden.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1719,8 +1719,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1729,8 +1729,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1739,8 +1739,8 @@ } } }, - "404" : { - "description" : "Not found.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -1796,8 +1796,8 @@ } ], "responses" : { - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1806,8 +1806,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1816,18 +1816,19 @@ } } }, - "403" : { - "description" : "Forbidden.", + "200" : { + "description" : "Returns the paged result found for Asset", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "maxItems" : 2147483647, + "type" : "array" } } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1836,8 +1837,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1846,8 +1847,8 @@ } } }, - "404" : { - "description" : "Not found.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1856,13 +1857,12 @@ } } }, - "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" } } } @@ -1904,8 +1904,8 @@ "required" : true }, "responses" : { - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -1914,8 +1914,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -1924,8 +1924,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -1934,8 +1934,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -1944,8 +1944,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -1954,8 +1954,8 @@ } } }, - "404" : { - "description" : "Not found.", + "415" : { + "description" : "Unsupported media type", "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", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2044,8 +2044,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -2054,8 +2054,11 @@ } } }, - "429" : { - "description" : "Too many requests.", + "204" : { + "description" : "No content." + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2064,8 +2067,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2074,8 +2077,8 @@ } } }, - "404" : { - "description" : "Not found.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2084,9 +2087,6 @@ } } }, - "204" : { - "description" : "No content." - }, "400" : { "description" : "Bad request.", "content" : { @@ -2137,8 +2137,8 @@ "required" : true }, "responses" : { - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -2147,8 +2147,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2157,8 +2157,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -2167,8 +2167,11 @@ } } }, - "429" : { - "description" : "Too many requests.", + "204" : { + "description" : "No content." + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2177,8 +2180,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2187,8 +2190,8 @@ } } }, - "404" : { - "description" : "Not found.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2197,9 +2200,6 @@ } } }, - "204" : { - "description" : "No content." - }, "400" : { "description" : "Bad request.", "content" : { @@ -2240,8 +2240,8 @@ } ], "responses" : { - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -2250,8 +2250,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2260,8 +2260,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -2270,8 +2270,11 @@ } } }, - "429" : { - "description" : "Too many requests.", + "204" : { + "description" : "No content." + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2280,8 +2283,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2290,8 +2293,8 @@ } } }, - "404" : { - "description" : "Not found.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2300,9 +2303,6 @@ } } }, - "204" : { - "description" : "No content." - }, "400" : { "description" : "Bad request.", "content" : { @@ -2343,8 +2343,8 @@ } ], "responses" : { - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -2353,8 +2353,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2363,8 +2363,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -2373,8 +2373,11 @@ } } }, - "429" : { - "description" : "Too many requests.", + "204" : { + "description" : "No content." + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2383,8 +2386,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2393,8 +2396,8 @@ } } }, - "404" : { - "description" : "Not found.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2403,9 +2406,6 @@ } } }, - "204" : { - "description" : "No content." - }, "400" : { "description" : "Bad request.", "content" : { @@ -2445,8 +2445,8 @@ } ], "responses" : { - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -2455,8 +2455,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2465,8 +2465,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -2475,8 +2475,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2485,8 +2485,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2495,8 +2495,8 @@ } } }, - "404" : { - "description" : "Not found.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2618,13 +2618,19 @@ "$ref" : "#/components/schemas/DetailAspectModelResponse" } }, - "qualityAlertsInStatusActive" : { - "type" : "integer", - "format" : "int32" + "qualityAlertIdsInStatusActive" : { + "type" : "array", + "items" : { + "type" : "integer", + "format" : "int64" + } }, - "qualityInvestigationsInStatusActive" : { - "type" : "integer", - "format" : "int32" + "qualityInvestigationIdsInStatusActive" : { + "type" : "array", + "items" : { + "type" : "integer", + "format" : "int64" + } } } } @@ -2679,8 +2685,8 @@ "required" : true }, "responses" : { - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -2689,8 +2695,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -2699,8 +2705,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -2709,8 +2715,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -2719,8 +2725,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -2729,8 +2735,8 @@ } } }, - "404" : { - "description" : "Not found.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -2852,13 +2858,19 @@ "$ref" : "#/components/schemas/DetailAspectModelResponse" } }, - "qualityAlertsInStatusActive" : { - "type" : "integer", - "format" : "int32" + "qualityAlertIdsInStatusActive" : { + "type" : "array", + "items" : { + "type" : "integer", + "format" : "int64" + } }, - "qualityInvestigationsInStatusActive" : { - "type" : "integer", - "format" : "int32" + "qualityInvestigationIdsInStatusActive" : { + "type" : "array", + "items" : { + "type" : "integer", + "format" : "int64" + } } } } @@ -2905,68 +2917,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.", - "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" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "Returns the assets found", + "200" : { + "description" : "Returns the assets found", "content" : { "application/json" : { "schema" : { @@ -3078,13 +3030,19 @@ "$ref" : "#/components/schemas/DetailAspectModelResponse" } }, - "qualityAlertsInStatusActive" : { - "type" : "integer", - "format" : "int32" + "qualityAlertIdsInStatusActive" : { + "type" : "array", + "items" : { + "type" : "integer", + "format" : "int64" + } }, - "qualityInvestigationsInStatusActive" : { - "type" : "integer", - "format" : "int32" + "qualityInvestigationIdsInStatusActive" : { + "type" : "array", + "items" : { + "type" : "integer", + "format" : "int64" + } } } } @@ -3092,6 +3050,66 @@ } } }, + "429" : { + "description" : "Too many requests.", + "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" + } + } + } + }, + "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" + } + } + } + }, "400" : { "description" : "Bad request.", "content" : { @@ -3139,36 +3157,6 @@ "required" : true }, "responses" : { - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "429" : { "description" : "Too many requests.", "content" : { @@ -3312,13 +3300,19 @@ "$ref" : "#/components/schemas/DetailAspectModelResponse" } }, - "qualityAlertsInStatusActive" : { - "type" : "integer", - "format" : "int32" + "qualityAlertIdsInStatusActive" : { + "type" : "array", + "items" : { + "type" : "integer", + "format" : "int64" + } }, - "qualityInvestigationsInStatusActive" : { - "type" : "integer", - "format" : "int32" + "qualityInvestigationIdsInStatusActive" : { + "type" : "array", + "items" : { + "type" : "integer", + "format" : "int64" + } } } } @@ -3326,6 +3320,36 @@ } } }, + "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" + } + } + } + }, "400" : { "description" : "Bad request.", "content" : { @@ -3355,8 +3379,8 @@ "description" : "The endpoint returns all shell descriptors.", "operationId" : "findAll", "responses" : { - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -3365,8 +3389,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3375,8 +3399,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -3385,18 +3409,21 @@ } } }, - "429" : { - "description" : "Too many requests.", + "200" : { + "description" : "ShellDescriptors found.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ShellDescriptorResponse" + } } } } }, - "500" : { - "description" : "Internal server error.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -3405,21 +3432,18 @@ } } }, - "200" : { - "description" : "ShellDescriptors found.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ShellDescriptorResponse" - } + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "404" : { - "description" : "Not found.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3456,8 +3480,8 @@ "description" : "The endpoint deletes all shell descriptors.", "operationId" : "deleteAll", "responses" : { - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -3466,8 +3490,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3476,8 +3500,11 @@ } } }, - "403" : { - "description" : "Forbidden.", + "204" : { + "description" : "Deleted." + }, + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -3486,11 +3513,8 @@ } } }, - "204" : { - "description" : "Deleted." - }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -3499,8 +3523,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3509,8 +3533,8 @@ } } }, - "404" : { - "description" : "Not found.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3548,8 +3572,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" : { @@ -3558,8 +3582,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3568,8 +3592,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -3578,8 +3602,11 @@ } } }, - "429" : { - "description" : "Too many requests.", + "202" : { + "description" : "Created registry reload job." + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -3588,8 +3615,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3598,11 +3625,8 @@ } } }, - "202" : { - "description" : "Created registry reload job." - }, - "404" : { - "description" : "Not found.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3651,18 +3675,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" : { @@ -3671,8 +3685,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3697,8 +3711,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -3707,8 +3721,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -3717,8 +3731,18 @@ } } }, - "404" : { - "description" : "Not found.", + "403" : { + "description" : "Forbidden.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3756,18 +3780,18 @@ "description" : "The endpoint can return limited data based on the user role", "operationId" : "dashboard", "responses" : { - "200" : { - "description" : "Returns dashboard data", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/DashboardResponse" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "401" : { - "description" : "Authorization failed.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3776,8 +3800,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -3786,18 +3810,18 @@ } } }, - "403" : { - "description" : "Forbidden.", + "200" : { + "description" : "Returns dashboard data", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" + "$ref" : "#/components/schemas/DashboardResponse" } } } }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -3806,8 +3830,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -3816,8 +3840,8 @@ } } }, - "404" : { - "description" : "Not found.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -3873,8 +3897,8 @@ } ], "responses" : { - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -3883,8 +3907,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -3893,8 +3917,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -4020,13 +4044,19 @@ "$ref" : "#/components/schemas/DetailAspectModelResponse" } }, - "qualityAlertsInStatusActive" : { - "type" : "integer", - "format" : "int32" + "qualityAlertIdsInStatusActive" : { + "type" : "array", + "items" : { + "type" : "integer", + "format" : "int64" + } }, - "qualityInvestigationsInStatusActive" : { - "type" : "integer", - "format" : "int32" + "qualityInvestigationIdsInStatusActive" : { + "type" : "array", + "items" : { + "type" : "integer", + "format" : "int64" + } } } } @@ -4035,8 +4065,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -4045,8 +4075,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -4055,8 +4085,8 @@ } } }, - "404" : { - "description" : "Not found.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -4112,36 +4142,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" - } - } - } - }, "200" : { "description" : "Returns the asset by childId", "content" : { @@ -4255,13 +4255,19 @@ "$ref" : "#/components/schemas/DetailAspectModelResponse" } }, - "qualityAlertsInStatusActive" : { - "type" : "integer", - "format" : "int32" + "qualityAlertIdsInStatusActive" : { + "type" : "array", + "items" : { + "type" : "integer", + "format" : "int64" + } }, - "qualityInvestigationsInStatusActive" : { - "type" : "integer", - "format" : "int32" + "qualityInvestigationIdsInStatusActive" : { + "type" : "array", + "items" : { + "type" : "integer", + "format" : "int64" + } } } } @@ -4299,6 +4305,36 @@ } } }, + "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" + } + } + } + }, "400" : { "description" : "Bad request.", "content" : { @@ -4356,20 +4392,18 @@ } ], "responses" : { - "200" : { - "description" : "Returns a distinct filter values for given fieldName.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "401" : { - "description" : "Authorization failed.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -4378,8 +4412,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -4388,8 +4422,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -4398,8 +4432,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -4408,8 +4442,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -4418,12 +4452,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" } } } @@ -4475,18 +4511,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" : { @@ -4495,8 +4521,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -4505,8 +4531,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -4515,8 +4541,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -4525,8 +4551,8 @@ } } }, - "404" : { - "description" : "Not found.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -4535,8 +4561,8 @@ } } }, - "400" : { - "description" : "Bad request.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -4662,13 +4688,19 @@ "$ref" : "#/components/schemas/DetailAspectModelResponse" } }, - "qualityAlertsInStatusActive" : { - "type" : "integer", - "format" : "int32" + "qualityAlertIdsInStatusActive" : { + "type" : "array", + "items" : { + "type" : "integer", + "format" : "int64" + } }, - "qualityInvestigationsInStatusActive" : { - "type" : "integer", - "format" : "int32" + "qualityInvestigationIdsInStatusActive" : { + "type" : "array", + "items" : { + "type" : "integer", + "format" : "int64" + } } } } @@ -4676,6 +4708,16 @@ } } } + }, + "400" : { + "description" : "Bad request.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } } }, "security" : [ @@ -4698,72 +4740,22 @@ "parameters" : [ { "name" : "assetId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - }, - { - "name" : "childId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } - ], - "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" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" } }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } + { + "name" : "childId", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" } - }, + } + ], + "responses" : { "200" : { "description" : "Returns the asset by childId", "content" : { @@ -4877,13 +4869,19 @@ "$ref" : "#/components/schemas/DetailAspectModelResponse" } }, - "qualityAlertsInStatusActive" : { - "type" : "integer", - "format" : "int32" + "qualityAlertIdsInStatusActive" : { + "type" : "array", + "items" : { + "type" : "integer", + "format" : "int64" + } }, - "qualityInvestigationsInStatusActive" : { - "type" : "integer", - "format" : "int32" + "qualityInvestigationIdsInStatusActive" : { + "type" : "array", + "items" : { + "type" : "integer", + "format" : "int64" + } } } } @@ -4891,6 +4889,26 @@ } } }, + "429" : { + "description" : "Too many requests.", + "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" : { @@ -4901,6 +4919,36 @@ } } }, + "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" + } + } + } + }, "400" : { "description" : "Bad request.", "content" : { @@ -4958,20 +5006,18 @@ } ], "responses" : { - "200" : { - "description" : "Returns a distinct filter values for given fieldName.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array" + "$ref" : "#/components/schemas/ErrorResponse" } } } }, - "401" : { - "description" : "Authorization failed.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -4980,8 +5026,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -4990,8 +5036,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -5000,8 +5046,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5010,8 +5056,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -5020,12 +5066,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" } } } @@ -5059,18 +5107,8 @@ "description" : "The endpoint returns a map for assets consumed by the map.", "operationId" : "assetsCountryMap", "responses" : { - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -5079,8 +5117,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5103,8 +5141,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -5113,8 +5151,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -5123,8 +5161,18 @@ } } }, - "404" : { - "description" : "Not found.", + "403" : { + "description" : "Forbidden.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -5173,18 +5221,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" : { @@ -5193,8 +5231,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5218,8 +5256,8 @@ } } }, - "429" : { - "description" : "Too many requests.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -5228,8 +5266,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -5238,8 +5276,18 @@ } } }, - "404" : { - "description" : "Not found.", + "403" : { + "description" : "Forbidden.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -5277,8 +5325,8 @@ "description" : "Deletes all submodels from the system.", "operationId" : "deleteSubmodels", "responses" : { - "401" : { - "description" : "Authorization failed.", + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -5287,8 +5335,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5297,8 +5345,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -5307,8 +5355,11 @@ } } }, - "429" : { - "description" : "Too many requests.", + "204" : { + "description" : "No Content." + }, + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -5317,8 +5368,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5327,8 +5378,8 @@ } } }, - "404" : { - "description" : "Not found.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { @@ -5337,9 +5388,6 @@ } } }, - "204" : { - "description" : "No Content." - }, "400" : { "description" : "Bad request.", "content" : { @@ -5379,8 +5427,11 @@ } ], "responses" : { - "401" : { - "description" : "Authorization failed.", + "204" : { + "description" : "Deleted." + }, + "429" : { + "description" : "Too many requests.", "content" : { "application/json" : { "schema" : { @@ -5389,8 +5440,8 @@ } } }, - "415" : { - "description" : "Unsupported media type", + "500" : { + "description" : "Internal server error.", "content" : { "application/json" : { "schema" : { @@ -5399,8 +5450,8 @@ } } }, - "403" : { - "description" : "Forbidden.", + "404" : { + "description" : "Not found.", "content" : { "application/json" : { "schema" : { @@ -5409,11 +5460,8 @@ } } }, - "204" : { - "description" : "Deleted." - }, - "429" : { - "description" : "Too many requests.", + "401" : { + "description" : "Authorization failed.", "content" : { "application/json" : { "schema" : { @@ -5422,8 +5470,8 @@ } } }, - "500" : { - "description" : "Internal server error.", + "403" : { + "description" : "Forbidden.", "content" : { "application/json" : { "schema" : { @@ -5432,8 +5480,8 @@ } } }, - "404" : { - "description" : "Not found.", + "415" : { + "description" : "Unsupported media type", "content" : { "application/json" : { "schema" : { diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/asbuilt/mapper/AssetAsBuiltResponseMapper.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/asbuilt/mapper/AssetAsBuiltResponseMapper.java index c33491cc0b..10cfb0c4b8 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/asbuilt/mapper/AssetAsBuiltResponseMapper.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/asbuilt/mapper/AssetAsBuiltResponseMapper.java @@ -54,8 +54,8 @@ public static AssetAsBuiltResponse from(final AssetBase asset) { .van(asset.getVan()) .semanticDataModel(from(asset.getSemanticDataModel())) .detailAspectModels(fromList(asset.getDetailAspectModels())) - .qualityAlertsInStatusActive(countNotificationsInActiveState(asset.getQualityAlerts())) - .qualityInvestigationsInStatusActive(countNotificationsInActiveState(asset.getQualityInvestigations())) + .qualityAlertIdsInStatusActive(gettNotificationIdsInActiveState(asset.getQualityAlerts())) + .qualityInvestigationIdsInStatusActive(gettNotificationIdsInActiveState(asset.getQualityInvestigations())) .build(); } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/asplanned/mapper/AssetAsPlannedResponseMapper.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/asplanned/mapper/AssetAsPlannedResponseMapper.java index abb265f8a1..4c6f391b4e 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/asplanned/mapper/AssetAsPlannedResponseMapper.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/asplanned/mapper/AssetAsPlannedResponseMapper.java @@ -54,8 +54,8 @@ public static AssetAsPlannedResponse from(final AssetBase asset) { .van(asset.getVan()) .semanticDataModel(from(asset.getSemanticDataModel())) .detailAspectModels(fromList(asset.getDetailAspectModels())) - .qualityAlertsInStatusActive(countNotificationsInActiveState(asset.getQualityAlerts())) - .qualityInvestigationsInStatusActive(countNotificationsInActiveState(asset.getQualityInvestigations())) + .qualityAlertIdsInStatusActive(gettNotificationIdsInActiveState(asset.getQualityAlerts())) + .qualityInvestigationIdsInStatusActive(gettNotificationIdsInActiveState(asset.getQualityInvestigations())) .build(); } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/base/mapper/AssetBaseResponseMapper.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/base/mapper/AssetBaseResponseMapper.java index 8d47a8aedf..dcf9449805 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/base/mapper/AssetBaseResponseMapper.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/base/mapper/AssetBaseResponseMapper.java @@ -46,6 +46,7 @@ import org.eclipse.tractusx.traceability.assets.domain.base.model.aspect.DetailAspectModel; import org.eclipse.tractusx.traceability.assets.domain.base.model.aspect.DetailAspectType; import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotification; +import org.eclipse.tractusx.traceability.qualitynotification.domain.base.model.QualityNotificationId; import java.util.List; @@ -134,10 +135,12 @@ public static SemanticDataModelResponse from(final SemanticDataModel semanticDat return SemanticDataModelResponse.valueOf(semanticDataModel.name()); } - protected static Integer countNotificationsInActiveState(List notifications) { + protected static List gettNotificationIdsInActiveState(List notifications) { return emptyIfNull(notifications).stream() .filter(QualityNotification::isActiveState) - .toList().size(); + .map(QualityNotification::getNotificationId) + .map(QualityNotificationId::value) + .toList(); } private static List from(List subcomponents) { diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/AssetAsBuiltControllerByIdIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/AssetAsBuiltControllerByIdIT.java index 3393e765a8..d2788093ab 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/AssetAsBuiltControllerByIdIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/AssetAsBuiltControllerByIdIT.java @@ -49,7 +49,7 @@ import static org.eclipse.tractusx.traceability.qualitynotification.infrastructure.model.NotificationStatusBaseEntity.RECEIVED; import static org.eclipse.tractusx.traceability.qualitynotification.infrastructure.model.NotificationStatusBaseEntity.SENT; import static org.hamcrest.Matchers.equalTo; -import static org.hamcrest.Matchers.is; +import static org.hamcrest.Matchers.hasSize; import static org.junit.jupiter.params.provider.Arguments.arguments; class AssetAsBuiltControllerByIdIT extends IntegrationTestSpecification { @@ -101,7 +101,7 @@ void givenAlertsForAsset_whenCallAssetById_thenReturnProperCount() throws JoseEx .log().all() .statusCode(200) .assertThat() - .body("qualityAlertsInStatusActive", is(6)); + .body("qualityAlertIdsInStatusActive", hasSize(6)); } @Test @@ -127,7 +127,7 @@ void givenInvestigationsForAsset_whenCallAssetById_thenReturnProperCount() throw .then() .statusCode(200) .assertThat() - .body("qualityInvestigationsInStatusActive", is(6)); + .body("qualityInvestigationIdsInStatusActive", hasSize(6)); } @Test 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 498afe1ff6..9fb9bc8e15 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 @@ -48,6 +48,7 @@ import static org.eclipse.tractusx.traceability.qualitynotification.infrastructure.model.NotificationStatusBaseEntity.RECEIVED; import static org.eclipse.tractusx.traceability.qualitynotification.infrastructure.model.NotificationStatusBaseEntity.SENT; import static org.hamcrest.Matchers.equalTo; +import static org.hamcrest.Matchers.hasSize; import static org.hamcrest.Matchers.is; import static org.junit.jupiter.params.provider.Arguments.arguments; @@ -98,7 +99,7 @@ void givenAlertsForAsset_whenCallAssetById_thenReturnProperCount() throws JoseEx .log().all() .statusCode(200) .assertThat() - .body("qualityAlertsInStatusActive", is(6)); + .body("qualityAlertIdsInStatusActive", hasSize(6)); } @Test @@ -124,7 +125,7 @@ void givenInvestigationsForAsset_whenCallAssetById_thenReturnProperCount() throw .then() .statusCode(200) .assertThat() - .body("qualityInvestigationsInStatusActive", is(6)); + .body("qualityInvestigationIdsInStatusActive", hasSize(6)); } @Test diff --git a/tx-models/src/main/java/assets/response/base/AssetBaseResponse.java b/tx-models/src/main/java/assets/response/base/AssetBaseResponse.java index f46b33aab8..7e6b1d5dc4 100644 --- a/tx-models/src/main/java/assets/response/base/AssetBaseResponse.java +++ b/tx-models/src/main/java/assets/response/base/AssetBaseResponse.java @@ -75,8 +75,8 @@ public class AssetBaseResponse { @Size(max = 255) private String classification; private List detailAspectModels; - @ApiModelProperty(example = "1") - private Integer qualityAlertsInStatusActive; - @ApiModelProperty(example = "2") - private Integer qualityInvestigationsInStatusActive; + @ApiModelProperty(dataType = "List", example = "1") + private List qualityAlertIdsInStatusActive; + @ApiModelProperty(dataType = "List", example = "2") + private List qualityInvestigationIdsInStatusActive; }