Skip to content

Filter on parameter lenght if multiple endpoints match a request#389

Merged
ahx merged 2 commits intoahx:handle-path-dynamic-segment-without-slashfrom
moneybird:matchOnLengthParams
Aug 19, 2025
Merged

Filter on parameter lenght if multiple endpoints match a request#389
ahx merged 2 commits intoahx:handle-path-dynamic-segment-without-slashfrom
moneybird:matchOnLengthParams

Conversation

@jandouwebeekman
Copy link
Copy Markdown
Contributor

@jandouwebeekman jandouwebeekman commented Aug 19, 2025

Like the title says, this PR selects all the endpoints that match a request and returns the one that has has the minimum amount of characters allocated to the parameters.

Example:
if you have these endpoints

/foo{format}
/foobar{format}

then /foobar.json will match the second endpoint with .json as format
instead of matchin the first and having bar.json as format

discussed in #386 (comment)
related to #388

@jandouwebeekman jandouwebeekman marked this pull request as ready for review August 19, 2025 10:00
@jandouwebeekman jandouwebeekman requested a review from ahx as a code owner August 19, 2025 10:00
@ahx ahx changed the base branch from main to handle-path-dynamic-segment-without-slash August 19, 2025 15:51
@ahx ahx merged commit 6c1badb into ahx:handle-path-dynamic-segment-without-slash Aug 19, 2025
2 of 17 checks passed
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.

2 participants