8000 GitHub - soham4abc/GSOC23: Final report For Google Summer of Code 2023 @ Fossology
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

soham4abc/GSOC23

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Google Summer of Code 2023

A full report on Google Summer of Code 2023 @ FOSSology

Project: "REST API improvements"

image

Google Summer of Code 2023 Report: "REST API Improvements" πŸ‘¨β€πŸ’»

A brief introduction about myself

I am Soham Banerjee, a Computer Science and engineering student at RCCIIT Kolkata. I have been a Full-Stack developer and have been working for many organisations since the past 3 years. Have been an open source software enthusiast since I was introduced to it in the 1st year of my college and, I am grateful to be a part of FOSSology under the Google Summer of Code program for 2023.

In this article I am going to outline the details of my contributions as a reference of project completion during the entire duration of Google Summer of Code 2023.

🌏 CONTRIBUTIONS

During this period I have mainly worked on two modules for the Fossology Project.

  • Enhancing existing endpoints: In this category we redefined old endpoints and enhanced them with more features.

  • Developing REST APIs: We introduced many more features using API endpoints so that they can used in the UI or can be used as a service.

Let's have a deeper look into the processes and flows that were implemented in this Google Summer of Code!

Endpoint for OpenAPI docs

This particular endpoint provides the user with the openAPI documentation for the existing APIs as a response.

  • Endpoint /openapi

Response format of the API:
openapi

πŸ‘¨β€πŸ’» PR link - feat(api): openapi.yaml exposed through API

File Copyright Info

This API endpoint would provide the user with the copyright information associated with a particular Item.

  • Endpoint /uploads/{UploadId}/item/{ItemId}/copyrights

Response format of the API:
copyright-info

πŸ‘¨β€πŸ’» PR link - feat(api): copyright info for file

Delete File Copyright

This particular endpoint can be used to delete a particular endpoint for an Item. The endpoint takes in the hash of the copyright that needs to be deleted.

  • Endpoint DELETE /uploads/{UploadId}/item/{ItemId}/copyright/<Hash>

Response format of the API:
delete-copyright

πŸ‘¨β€πŸ’» PR link - feat(api): Delete Copyright for a File

Update Copyright for a File

This particular endpoint can be used to update the already existing copyrights for a file. The API uses the hash of the copyright to update the endpoint.

  • Endpoint PUT /uploads/{UploadId}/item/{ItemId}/copyright/<Hash>

The API response:
update-copyright

Restore Copyright for a file

This particular endpoint can be used to restore a deleted copyright.

  • Endpoint - PATCH /uploads/{UploadId}/item/{ItemId}/copyright/<Hash>

Current response of the API:
restore_copyright

πŸ‘¨β€πŸ’» PR link - feat(api): restore deleted copyrights

Fetching details of the inactive copyrights

Developed an API endpoint to return the details of the inactive copyrights from the server

  • Endpoint - uploads/{UploadId}/item/{ItemId}/copyrights/inactive

Response of the API:
inactive_copyrights

API endpoint for file info

This particular endpoint provides us with the info of a particular file from the Fossology server.

  • Endpoint /uploads/{UploadId}/item/{ItemId}/info

The API response:
info_response

πŸ‘¨β€πŸ’» PR link - feat(api): File info API

Endpoint for total number of copyrights in a file

This particular endpoint provides the total number of copyrights in a file.

  • Endpoint /uploads/{UploadId}/item/{ItemId}/totalcopyrights

The API response:
total_number_copyrights

Endpoint to get conf info for an upload

Developed an endpoint that provides us with the conf info for a specific upload.

  • Endpoint /uploads/{UploadId}/item/{UploadId}/conf

The API response:
conf

πŸ‘¨β€πŸ’» PR link - feat(api): conf info for upload

Endpoint for fetching customise page data

Created an endpoint that sends the customise page data from the fossology server

  • Endpoint /customise

API response:
customise_reponse

πŸ‘¨β€πŸ’» PR link - feat(api): Get Customise page data

Endpoint to get the banner message

This particular endpoint provides us with the banner message that is displayed in the old UI.

  • Endpoint - /customise/banner

API response:

banner_reponse

πŸ‘¨β€πŸ’» PR link - feat(api): Get banner message

Endpoint to get the list of obligations

Developed an endpoint to get the list of all obligations from the server. This particular endpoint can be used to get the data for the dropdown.

  • Endpoint /obligations/list

obligations_list

πŸ‘¨β€πŸ’» PR link - feat(api): api to get the list of obligations

Endpoint to get details of a particular obligation

Developed an endpoint that provides us with the details of a particular obligation. The API takes in the id of the obligation as a parameter.

  • Endpoint /obligations/{id}

API response:

obligations_details

Endpoint to get details of a all obligations

Developed an endpoint that provides user with all the obligations details from the backend server.

  • Endpoint /obligations/

API response:

all_obligations_details

πŸ‘¨β€πŸ’» PR link - feat(api): Get details of all obligations

Endpoint to Delete an Obligation

This particular endpoint can be used to delete an obligation from tghe server.

  • Endpoint DELETE /obligations/{ObligationID}

API response:

delete_obligation

πŸ‘¨β€πŸ’» PR link - feat(api): Get details of all obligations

Documentation:πŸ“„

During the GSoC period, I got the time to create and organize documentation for the FOSSology REST-API. The documentation contains all the user and developer information of the project and is organized in a way to be easily accessible by all.

The weekly documentation of updates can be found at FOSSology/gsoc

πŸ‘¨πŸ»β€πŸ« DELIVERABLES

Tasks Planned Completed Remarks
Adding all the high priority APIs Yes βœ”οΈ All the APIs with High priority have been developed and delivered during the official coding period of the Google Summer of Code 2023
Enhanching existing APIs for additional functionality Yes βœ”οΈ APIs with limited functionality have been enhanced with the requirements and demands of the clients and users
Identifying and fixing some potential the existing bugs Yes βœ”οΈ A lot of pre-existing bugs were sptted in the backend server. Some of them were fixed and for the rest of them issues have been made in the Fossology repository
Creating rest of the API endpoints for the medium and low priority functionalities Yes βœ”οΈ A lot of new endpoints with completely new features were added and discussed with the mentors in order to enhance the functionality of the Fossology Server
Writing Test Cases for the existing and New API endpoints Yes (WAS OPTIONAL) ❌ Got the overview, still test cases needs to be implemented, especially for the newer endpoints.

Future enhancements:πŸš€

  • Adding test cases for the existing REST-API endpoints so that reliablity of the back-end server can be ensured.
  • Working on the new UI in order to continue the migration procedure of the fossology software.
  • More testing and enhancement of the APIs upon discussion with the mentors.

Major Takeaways: πŸ“š

  • Developing REST API endpoints gave me an in depth overview of the entire process and flow of the Fossology software.
  • Proper planning tecniques and discussion with the mentors and peers hepled in the smooth execution of the entire project.
  • An excellent learning experience from the mentors while solving real life problems.

Links of work done: 🎯

Pull Requests πŸ”—

Let's get connected!

About

Final report For Google Summer of Code 2023 @ Fossology

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0