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(rest): endpoint to merge vendor. #2870

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rudra-superrr
Copy link
Contributor

@rudra-superrr rudra-superrr commented Jan 16, 2025

Closes: #2869

Description: this new endpoint will merge the source vendor to the target vendor.

@rudra-superrr rudra-superrr linked an issue Jan 16, 2025 that may be closed by this pull request
@rudra-superrr rudra-superrr added needs code review needs general test This is general testing, meaning that there is no org specific issue to check for New-UI Level for the API and UI level changes for the new-ui labels Jan 16, 2025
@rudra-superrr rudra-superrr force-pushed the feat/mergeVendor branch 3 times, most recently from 540da4b to 685d793 Compare January 28, 2025 06:49
@rudra-superrr
Copy link
Contributor Author

Made the changes.

requestStatus = sw360VendorClient.mergeVendors(vendorTargetId, vendorSourceId, vendorSelection, user);

if (requestStatus == RequestStatus.IN_USE) {
throw new HttpMessageNotReadableException("Vendor already in use as source or target vendor has an open MR");
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
throw new HttpMessageNotReadableException("Vendor already in use as source or target vendor has an open MR");
throw new HttpMessageNotReadableException("Vendor used as source or target has an open MR");

summary = "Merge two vendors.",
description = "Merge source vendor into target vendor.",
tags = {"Vendor"}
)
Copy link
Member

Choose a reason for hiding this comment

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

Please document the possible response codes generated by this endpoint (which are 4 possible ways).

You can refer to other endpoints documenting the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs code review needs general test This is general testing, meaning that there is no org specific issue to check for New-UI Level for the API and UI level changes for the new-ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New endpoint to merge vendor.
2 participants