8000 feat(api): copyright info for file by soham4abc · Pull Request #2475 · fossology/fossology · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat(api): copyright info for file #2475

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

Merged
merged 1 commit into from
Jul 5, 2023

Conversation

soham4abc
Copy link
Contributor
@soham4abc soham4abc commented Jun 15, 2023

Description

Copyright info for file is exposed through /file/upload/{UploadId}/item/{ItemId}/copyrights endpoint

Screenshots

Screenshot from 2023-06-15 12-27-40

How to test

Send a GET request to /file/upload/{UploadId}/item/{ItemId}/copyrights endpoint to see the result.

Closes #2468

@soham4abc soham4abc force-pushed the copyrights/getDetails branch 15 times, most recently from 6d0c0b5 to d1781e3 Compare June 17, 2023 19:05
@soham4abc soham4abc force-pushed the copyrights/getDetails branch from d1781e3 to 64ad5c5 Compare June 23, 2023 04:52
@soham4abc soham4abc mentioned this pull request Jun 24, 2023
@github-actions github-actions bot added the has merge conflicts PR to be rebased label Jun 29, 2023
@github-actions
Copy link

This pull request has conflicts, please rebase with master to resolve those before we can evaluate the pull request.

@soham4abc soham4abc force-pushed the copyrights/getDetails branch 2 times, most recently from 994b41c to e3f264e Compare June 29, 2023 04:58
@github-actions github-actions bot removed the has merge conflicts PR to be rebased label Jun 29, 2023
@soham4abc soham4abc force-pushed the copyrights/getDetails branch from 666e25e to e3f264e Compare June 29, 2023 05:14
@github-actions github-actions bot added the has merge conflicts PR to be rebased label Jun 29, 2023
@github-actions
Copy link

This pull request has conflicts, please rebase with master to resolve those before we can evaluate the pull request.

@soham4abc soham4abc force-pushed the copyrights/getDetails branch from e3f264e to d3ee967 Compare June 29, 2023 05:18
@soham4abc soham4abc force-pushed the copyrights/getDetails branch 2 times, most recently from c298c95 to 1345411 Compare June 29, 2023 18:00
@soham4abc soham4abc requested a review from GMishx June 29, 2023 18:05
@github-actions github-actions bot added the has merge conflicts PR to be rebased label Jun 29, 2023
@github-actions
Copy link
8000

This pull request has conflicts, please rebase with master to resolve those before we can evaluate the pull request.

@soham4abc soham4abc force-pushed the copyrights/getDetails branch 2 times, most recently from e04f58b to dd5c1ce Compare June 30, 2023 06:42
@soham4abc
Copy link
Contributor Author

image

This endpoint now uses query parameter to segregate active and inactive copyrights
@GMishx Please do have a look at this when possible.

Thank you!

@soham4abc soham4abc force-pushed the copyrights/getDetails branch from dd5c1ce to b42626c Compare June 30, 2023 11:18
@soham4abc
Copy link
Contributor Author

image
The new response looks like this
image
Also it now has the X-Total-Pages header
CopyrightHistogramProcessPost::getCopyrights() takes in limit and offset as a parameter to provide us with pagination of response.

Please do have a look @GMishx

@soham4abc soham4abc force-pushed the copyrights/getDetails branch from b42626c to c2fb266 Compare July 3, 2023 05:11
@soham4abc
Copy link
Contributor Author

@GMishx should I be removing the Test case as of now?? As discussed earlier we were planning to issue separate PRs for test cases.

@soham4abc soham4abc force-pushed the copyrights/getDetails branch 2 times, most recently from 6c49b4c to 64479fc Compare July 3, 2023 07:48
@soham4abc
Copy link
Contributor Author
soham4abc commented Jul 3, 2023

image

page and limit headers are integrated in the endpoint

image

Along with the X-Total-Pages header

Please do have a look @GMishx and let me know if any changes are required or not.

Thank you!

@soham4abc soham4abc requested a review from GMishx July 3, 2023 09:59
$agentId = $this->CopyrightHist->getAgentId($uploadPk, 'copyright_ars');
$UploadTreeTableName = $this->uploadDao->getUploadtreeTableName($uploadPk);
$returnVal = null;
try {
Copy link
Member

Choose a reason for hiding this comment

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

Please work on it.

Else remove the block as it is unnecessary.

@soham4abc soham4abc force-pushed the copyrights/getDetails branch 2 times, most recently from bcbea22 to 345ea6b Compare July 4, 2023 07:26
@soham4abc
Copy link
Contributor Author

I have made the requested changes sir.
Please do have a look @GMishx

@soham4abc soham4abc requested a review from GMishx July 4, 2023 07:27
$this->clearingDao = $this->container->get('dao.clearing');
$this->licenseDao = $this->container->get('dao.license');
$this->uploadDao = $container->get('dao.upload');
$this->restHelper = $container->get('helper.restHelper');
Copy link
Member

Choose a reason for hiding this comment

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

No change was done on this line. Please do not resolve the issue if no work was done.

@GMishx
Copy link
Member
GMishx commented Jul 5, 2023

Please make the changes and rebase the branch to resolve merge conflicts.

@soham4abc
Copy link
Contributor Author

I made the changes rebased the branch and force pushed... yet it is not showing in GitHub. weird!

@soham4abc soham4abc force-pushed the copyrights/getDetails branch from 7f27264 to 20c351e Compare July 5, 2023 05:53
@GMishx GMishx merged commit 89656e5 into fossology:master Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Copyright File-view
2 participants
0