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

Feat: Cursor implementation done for GET request in ShellAPI and LookUp API #153

Merged

Conversation

agg3fe
Copy link
Contributor

@agg3fe agg3fe commented Jul 6, 2023

Description

Cursor implementation done for pagination search for GET requests in ShellAPI and LookUp API.
The spring jdbc has been changed to spring JPA.

@@ -118,21 +116,28 @@ public ResponseEntity<SubmodelDescriptor> getSubmodelDescriptorByIdThroughSuperp

@Override
public ResponseEntity<AssetAdministrationShellDescriptor> postAssetAdministrationShellDescriptor( AssetAdministrationShellDescriptor assetAdministrationShellDescriptor ) {
Shell saved = shellService.save(shellMapper.fromApiDto(assetAdministrationShellDescriptor));
Shell shell = shellMapper.fromApiDto(assetAdministrationShellDescriptor);
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be better to handle this settings in the service layer or much better in the mapper

@tunacicek
Copy link
Contributor

@agg3fe Do we have tests for cursor pag. ?

@agg3fe
Copy link
Contributor Author

agg3fe commented Jul 11, 2023

Yes. Test cases are already there in AssetAdministrationShellApiTest class.

List<SubmodelDescriptor> descriptorResults = submodelMapper.toApiDto( submodels );
GetSubmodelDescriptorsResult result = new GetSubmodelDescriptorsResult();
result.setResult( descriptorResults );
Shell savedShell = shellService.findShellByExternalId(aasIdentifier,externalSubjectId);
Copy link
Contributor

Choose a reason for hiding this comment

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

please use getExternalSubjectIdOrEmpty(externalSubjectId)

Also updated CHANGELOG.md file.
@sonarcloud
Copy link

sonarcloud bot commented Jul 14, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 17 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Contributor

@tunacicek tunacicek left a comment

Choose a reason for hiding this comment

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

LGTM

@tunacicek tunacicek merged commit 5de8e13 into eclipse-tractusx:main Jul 14, 2023
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.

2 participants