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(SETUP-V2): Support Multiple Versions (V1 & V2) #2576

Merged
merged 1 commit into from
Aug 28, 2023

Conversation

dushimsam
Copy link
Contributor

@dushimsam dushimsam commented Aug 22, 2023

Description

This pull request (PR) focuses on enhancing the functionality of the API configuration to accommodate the routes of Version 2.

Changes

1. Dynamic Base URL Support:

The iindex.php file has been revised to facilitate the dynamic base URL, capable of accommodating both V1 and V2 versions of the API.

2. OpenAPI Specification Update:

The openapi.yml file has been updated to incorporate the server URL specific to Version 2 of the API.

How to test

1. Add this block of code in the getInfo method from InfoController:

image

2. Call the Version 1 API

image

3. Call the Version 2 API

image

4. Other Cases

image

Related Issue:

Fixes #2575

cc: @shaheemazmalmmd @GMishx

@dushimsam dushimsam force-pushed the set-up-v2 branch 3 times, most recently from df5458e to d63e69e Compare August 23, 2023 13:04
@GMishx GMishx added needs code review needs test GSOC-23 Label to tag pull request which are part of the GSOC 2023 labels Aug 24, 2023
src/www/ui/api/index.php Outdated Show resolved Hide resolved
src/www/ui/api/Models/ApiVersion.php Outdated Show resolved Hide resolved
src/www/ui/api/index.php Outdated Show resolved Hide resolved
Signed-off-by: dushimsam <dushsam@gmail.com>
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. Needs test.

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 Aug 28, 2023
@GMishx GMishx merged commit 4b6d3a4 into fossology:master Aug 28, 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.

Enable Version 2 REST APIs for FOSSology
2 participants