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: removed unnecessary grouping by prefix #92

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

Adil9994
Copy link
Contributor

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes #90 (issue)

Type of change

Bug fix (non-breaking change which fixes an issue)

@Adil9994 Adil9994 self-assigned this Jun 30, 2023
@sonarcloud
Copy link

sonarcloud bot commented Jul 5, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell C 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@Adil9994 Adil9994 requested a review from DenTray July 5, 2023 13:43
Dockerfile Show resolved Hide resolved
src/Services/SwaggerService.php Show resolved Hide resolved
@@ -0,0 +1,117 @@
{
"swagger": "2.0",
Copy link
Collaborator

Choose a reason for hiding this comment

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

please correct formatting

src/Services/SwaggerService.php Show resolved Hide resolved
Comment on lines +569 to +571
$tag = (!empty($globalPrefix) && "/{$explodedUri[1]}" === $globalPrefix)
? Arr::get($explodedUri, 2)
: Arr::get($explodedUri, 1);
Copy link
Collaborator

Choose a reason for hiding this comment

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

please to implement something like this

Suggested change
$tag = (!empty($globalPrefix) && "/{$explodedUri[1]}" === $globalPrefix)
? Arr::get($explodedUri, 2)
: Arr::get($explodedUri, 1);
$tag = array_shift($explodedUri);
if ($globalPrefix === $tag)) {
$tag = array_shift($explodedUri);
}


$service->addData($request, $response);
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

please implement test case for global prefix equals /global and we call api /global

@DenTray DenTray assigned Goodmain and unassigned Adil9994 Oct 23, 2023
@DenTray DenTray added this to the 2.3 milestone Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove grouping paths by global prefix
3 participants