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(api): set the clearing decision for a particular item #2460

Merged
merged 1 commit into from
Jun 30, 2023

Conversation

dushimsam
Copy link
Contributor

@dushimsam dushimsam commented Jun 7, 2023

Description

Added the API to set the clearing decision for a particular item.

Changes

  1. Introduced a new group of controllers called uploadTree for managing different actions on a particular items and with it's corresponding class UploadTreeController.
  2. Created the method in UploadTreeController for setting the clearing decision for a particular item.
  3. Updated the main file(index.php) by adding a new route PUT /uploadtree/{id}/clearing-decision.
  4. Updated the openapi.yaml file to write the new API's documentation.

How to test

Make a PUT request on the endpoint: /uploadtree/{id}/clearing-decision, with header variables decisionType & globalDecision

Screenshots

For a successful Request

clearing_decision_success

When the uploadtree id is not FOUND

clearing_decision_404_1

When the clearing decision type is NOT FOUND

clearing_decision_404_2

When globalDecision value is not a boolean

clearing_decision_404_3

Related Issue:

Fixes #2459

cc: @shaheemazmalmmd @GMishx

@dushimsam dushimsam force-pushed the make-clearing-decision branch 2 times, most recently from 3bf0fb2 to 290a5b6 Compare June 7, 2023 09:43
@dushimsam dushimsam force-pushed the make-clearing-decision branch 5 times, most recently from 7e750cd to 4a84f82 Compare June 13, 2023 08:52
@GMishx GMishx added the GSOC-23 Label to tag pull request which are part of the GSOC 2023 label Jun 22, 2023
Copy link
Member

@GMishx GMishx left a comment

Choose a reason for hiding this comment

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

Minor suggestions.

src/www/ui/api/Controllers/UploadTreeController.php Outdated Show resolved Hide resolved
src/www/ui/api/Controllers/UploadTreeController.php Outdated Show resolved Hide resolved
src/www/ui/api/documentation/openapi.yaml Outdated Show resolved Hide resolved
src/www/ui/api/documentation/openapi.yaml Show resolved Hide resolved
@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.

@github-actions github-actions bot removed the has merge conflicts PR to be rebased label Jun 29, 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.

Copy link
Member

@GMishx GMishx left a comment

Choose a reason for hiding this comment

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

A minor change needed.

src/www/ui/api/documentation/openapi.yaml Outdated Show resolved Hide resolved
Signed-off-by: dushimsam <dushsam@gmail.com>
@github-actions github-actions bot removed the has merge conflicts PR to be rebased label Jun 29, 2023
Copy link
Member

@GMishx GMishx left a comment

Choose a reason for hiding this comment

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

Changes looks good.

Copy link
Member

@GMishx GMishx left a comment

Choose a reason for hiding this comment

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

Tested, working as expected.

@GMishx GMishx added ready and removed needs test labels Jun 30, 2023
@GMishx GMishx merged commit 9a20010 into fossology:master Jun 30, 2023
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GSOC-23 Label to tag pull request which are part of the GSOC 2023 ready
Projects
None yet
Development

Successfully merging this pull request may close these issues.

License File View - Details
2 participants