Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/943 update asset endpoints using post #1172

Merged
merged 19 commits into from
Jul 10, 2024

Conversation

ds-mwesener
Copy link
Contributor

@ds-mwesener ds-mwesener commented Jul 5, 2024

Description

Pre-review checks

Please ensure to do as many of the following checks as possible, before asking for committer review:

resolves #943

ds-pweick and others added 2 commits July 5, 2024 11:34
feature(api):[#943] reworked autocomplete api for asBuilt & asPlanned…
Copy link
Contributor

github-actions bot commented Jul 5, 2024

✅ No Dependency Check findings were found

Copy link
Contributor

github-actions bot commented Jul 5, 2024

Integration Test Results

350 tests   349 ✅  1m 43s ⏱️
 41 suites    1 💤
 41 files      0 ❌

Results for commit c266b5c.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Jul 5, 2024

Unit Test Results

210 tests   210 ✅  19s ⏱️
 57 suites    0 💤
 57 files      0 ❌

Results for commit c266b5c.

♻️ This comment has been updated with latest results.

CHANGELOG.md Outdated
@@ -45,6 +45,8 @@ _**For better traceability add the corresponding GitHub issue number in each cha
- #xxx fixed notification description on receiver side
- #875 owasp dependency check tool is now used from github action image instead of maven plugin
- XXX fixed display of semantic data model in parts as planned table
- #943 renamed distinctFilterValues API to searchable-values for the asBuilt, asPlanned and notification routes
and changed these endpoints to POST with body instead of GET with parameters
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
and changed these endpoints to POST with body instead of GET with parameters
#943 Changed these endpoints to POST with body instead of GET with parameters

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in new PR

/********************************************************************************
* Copyright (c) 2022, 2023 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
* Copyright (c) 2022, 2023 ZF Friedrichshafen AG
* Copyright (c) 2022, 2023 Contributors to the Eclipse Foundation
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only this line and only 2024

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in new PR

/********************************************************************************
* Copyright (c) 2022, 2023 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
* Copyright (c) 2022, 2023 ZF Friedrichshafen AG
* Copyright (c) 2022, 2023 Contributors to the Eclipse Foundation
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only this line and only 2024

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in new PR

import jakarta.validation.constraints.Size;
import org.eclipse.tractusx.traceability.notification.domain.base.model.NotificationSide;

public record SearchableNotificationsRequest(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try to move the request object to tx-models

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in new PR


return this.apiService
.getBy<any>(`${ requestUrl }/distinctFilterValues`, params);
let body = {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed

.set('size', 200)
.set('inAssetIds', inAssetIds ? inAssetIds.join(',') : '');

let body = {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed

}
return assetBaseService.getDistinctFilterValues(fieldMapper.mapRequestFieldName(fieldName), startWith, size, owner, inAssetIdsList);
int size = searchableAssetsRequest.size() == null ? 200 : searchableAssetsRequest.size();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add default value in the request object.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed

Copy link
Contributor

@ds-mmaul ds-mmaul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

sonarcloud bot commented Jul 10, 2024

Quality Gate Failed Quality Gate failed for 'eclipse-tractusx_traceability-foss-frontend'

Failed conditions
31.2% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

Copy link

sonarcloud bot commented Jul 10, 2024

@ds-mwesener ds-mwesener merged commit 5505756 into main Jul 10, 2024
23 of 24 checks passed
@ds-mwesener ds-mwesener deleted the feature/943-update-asset-endpoints-using-post branch July 10, 2024 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Backend] [Frontend] Rework autocomplete API
3 participants