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

[OpenAPI] URI reference syntax errors #3079

Open
lcawl opened this issue Oct 25, 2024 · 0 comments
Open

[OpenAPI] URI reference syntax errors #3079

lcawl opened this issue Oct 25, 2024 · 0 comments
Labels

Comments

@lcawl
Copy link
Contributor

lcawl commented Oct 25, 2024

When you run the make lint-docs command, which runs the Spectral linter against the OpenAPI output, it has a lot of this type of message:

 428:21       warning  oas3-schema                 "$ref" property must match format "uri-reference".                                  paths./_async_search.post.parameters[1].$ref

This linting rule is https://docs.stoplight.io/docs/spectral/4dec24461f3af-open-api-rules#oas3-schema but in particular it's checking the format of URI references like this:

{
  "$ref": "#/components/parameters/async_search.submit#keep_on_completion"
},  

I think it's the presence of the last hashtag that's causing the problem, since when I edited it like this the message disappeared:

  "$ref": "#/components/parameters/async_search.submit_keep_on_completion"

I think hashtags have a reserved meaning in https://www.rfc-editor.org/rfc/rfc3986 and we should fix this in the OpenAPI generator.

@lcawl lcawl added the OpenAPI label Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant