wework / speccy

Well Spectually 🤓 Enforce quality rules on your OpenAPI 3.0.x specifications.
http://speccy.io
MIT License
824 stars 78 forks source link

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

Open lvl99 opened 4 years ago

lvl99 commented 4 years ago

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 commented 4 years ago

This appears to be a regression of https://github.com/wework/speccy/issues/134.

philsturgeon commented 3 years ago

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