-
Notifications
You must be signed in to change notification settings - Fork 104
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
fix(rest): Add license information linking for project releases. #2871
base: main
Are you sure you want to change the base?
fix(rest): Add license information linking for project releases. #2871
Conversation
Set<String> mainLicenses = release.getMainLicenseIds() != null ? release.getMainLicenseIds() : new HashSet<>(); | ||
Set<String> otherLicenses = release.getOtherLicenseIds() != null ? release.getOtherLicenseIds() | ||
: new HashSet<>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In accordance with #2827, the main licenses and other licenses of the release should be overwritten.
Thus the mainLicenses
and otherLicenses
should always be created as fresh HashSet
.
jsonResult.put(SW360Constants.STATUS, SW360Constants.FAILURE); | ||
} | ||
|
||
componentClient.updateRelease(release, sw360User); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This call can result in creation of Moderation Request. Please add comment field for the same in the controller as done in #2405
mediaType = "application/hal+json", | ||
schema = @Schema(type = "object", implementation = JSONObject.class), | ||
examples = @ExampleObject( | ||
value = "{\n \"one\": [\"Release1\", \"Release2\"],\n \"mul\": [\"Release3\"]\n}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The actual response seems more like following.
value = "{\n \"one\": [\"Release1\", \"Release2\"],\n \"mul\": [\"Release3\"]\n}" | |
value = "{\n \"releasesWithSingleCLI\": [\"Release1\", \"Release2\"],\n \"releasesWithMultipleCLI\": [\"Release3\"],\n \"STATUS\": \"FAILURE\"\n}" |
Any updates @nikkuma7 ? |
de1b3a4
to
42d0655
Compare
comment addressed. |
Signed-off-by: Nikesh kumar <[email protected]>
42d0655
to
fc1d47d
Compare
Issue: #2844
Suggest Reviewer
How To Test?
resource/api/projects/{id}/addLinkedRelesesLicenses
please check project should have licenses attached.
Checklist
Must: