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

path params isn't working for params with "." in the name #2546

Open
fantapop opened this issue Oct 13, 2023 · 0 comments
Open

path params isn't working for params with "." in the name #2546

fantapop opened this issue Oct 13, 2023 · 0 comments
Labels
OpenAPI Issues related to the OpenAPI ruleset t/bug Something isn't working triaged

Comments

@fantapop
Copy link

Describe the bug
I'm getting an error from the path-params checker saying that a parameter is unused in the path however its clearly being used. I believe this is because the parameter name includes a ".". According to #1969, there should be no restrictions on characters in the path parameters.

To Reproduce

  1. Given this OpenAPI Document: petstore.json and a recommended ruleset.json

  2. Run this CLI command: spectral lint petstore.json --ruleset ruleset.json

  3. See error

  24:11    error  path-params            Parameter "pet.id" must be used in path "/pets/{pet.id}".      paths./pets/{pet.id}.get.parameters[0]

Expected behavior
I expect there to be no path-params error

@mnaumanali94 mnaumanali94 added t/bug Something isn't working OpenAPI Issues related to the OpenAPI ruleset labels Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OpenAPI Issues related to the OpenAPI ruleset t/bug Something isn't working triaged
Projects
None yet
Development

No branches or pull requests

2 participants