Skip to content

Commit

Permalink
Stripped query params for req.url branch arm (#942)
Browse files Browse the repository at this point in the history
Co-authored-by: g-radam <859802+g-radam@users.noreply.github.com>
  • Loading branch information
g-radam and g-radam authored Aug 4, 2024
1 parent 093bd3c commit 26d06c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/middlewares/openapi.metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export function applyOpenApiMetadata(
req: OpenApiRequest,
useRequestUrl: boolean,
): OpenApiRequestMetadata {
const path = useRequestUrl ? req.url : req.originalUrl.split('?')[0];
const path = useRequestUrl ? req.url.split('?')[0] : req.originalUrl.split('?')[0];
const method = req.method;
const routeEntries = Object.entries(openApiContext.expressRouteMap);
for (const [expressRoute, methods] of routeEntries) {
Expand Down

0 comments on commit 26d06c4

Please sign in to comment.