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

Make trimming paths with slash optional #217

Open
szymonmil opened this issue Jan 19, 2024 · 0 comments
Open

Make trimming paths with slash optional #217

szymonmil opened this issue Jan 19, 2024 · 0 comments

Comments

@szymonmil
Copy link

Hi,
When I have some path, eg. /example.html with redirection when there is trailing slash (so /example.html/ will be redirected to /example.html), validation throwing error that i wasn't specified 301 Redirect as possible response. But in my opinion, /example.html/ and /example.html are different paths, and shouldn't be treat the same way.

I'm using ver 0.18
Code providing that utility is here: \League\OpenAPIValidation\PSR7\PathFinder::104

I suggest, to make that behavior optional, for example by passing some config named "trim trailing slashes from path"
What do you think?

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

No branches or pull requests

1 participant