Replies: 1 comment 3 replies
-
hello @szrudi can you clarify your statement ? meaning in your API spec do you mention path like this /a/b can you provide the faulty spec according to good practices this should be /a/b
in fact i think it goes the otherway round , meaning that there should not be a trailing / |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey!
I have an OpenApi v3.1 yaml, and recently I made a mistake of removing a leading slash from one endpoint.
The issue I saw in swagger-ui:
We can say that this is a swagger-ui problem, but it got me thinking. Why did
vacuum
not catch this?There is a rule to check for extra trailing slashes:
https://quobix.com/vacuum/rules/operations/path-keys-no-trailing-slash/
And the specs do say there should be a leading slash:
https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#paths-object
So am I missing something? Should there be a rule for this?
PS. I've checked a lot of tools when deciding on the linter to integrate and
vacuum
turned out to be awesome, thanks for this great and fast tool!Beta Was this translation helpful? Give feedback.
All reactions