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

Error for path ending with slash #155

Closed
scop opened this issue Oct 20, 2022 · 2 comments
Closed

Error for path ending with slash #155

scop opened this issue Oct 20, 2022 · 2 comments
Assignees

Comments

@scop
Copy link
Contributor

scop commented Oct 20, 2022

Paths ending with slashes result in the error Path must not end with a slash: matches the expression '.+\/$'

The explanation at https://quobix.com/vacuum/rules/operations/path-keys-no-trailing-slash/ just says it's important not to do that, but provides no rationale. Spectral docs at https://meta.stoplight.io/docs/spectral/4dec24461f3af-open-api-rules#path-keys-no-trailing-slash do provide some reasoning, which makes sense to me.

However, I believe no OpenAPI specification actually forbids this. Therefore I was wondering if this should be downgraded to a warning, and perhaps the quobix.com/vacuum docs updated to elaborate a bit on the reasoning?

@daveshanley
Copy link
Owner

This is a great call out. It's not technically an error, but it does mess up a bunch of tooling. I agree this needs a better explanation on the docs (https://github.com/daveshanley/quobix.com/blob/master/content/vacuum/rules/operations/path-keys-no-trailing-slash.md) and a downgrade to a warning makes sense.

@daveshanley
Copy link
Owner

Docs have been updated, and the rule now throws a warning instead of an error

https://quobix.com/vacuum/rules/operations/path-keys-no-trailing-slash/

Thank you for helping make vacuum a better tool.

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

2 participants