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

Rule path-keys-no-trailing-slash: throws lint error when path is a single slash #419

Open
lvl99 opened this issue Jun 8, 2020 · 2 comments

Comments

@lvl99
Copy link

lvl99 commented Jun 8, 2020

When I have a path that is a single slash (/) I get this rule throwing an error.

Detailed description

paths:
  /:
    post:
      ...

I'm unsure if maybe I'm using it wrong -- I should be able to have a path at /, right?

Context

I think if it is a viable design to have an API path at / that this rule should allow for it, but still function on paths that are beyond the initial first slash.

Possible implementation

I saw in the rules that path-keys-no-trailing-slash is notEndsWith: /, but maybe it should be something like notMatch: .+\/$ ?

@jftanner
Copy link

This appears to be a regression of #134.

@philsturgeon
Copy link
Contributor

I'd switch over to https://github.com/stoplightio/spectral/ as nobody is maintaining this.

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

3 participants