-
Notifications
You must be signed in to change notification settings - Fork 115
Description
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.
When we use the redocly linter, it's capturing the same type of problem with this rule:
https://redocly.com/docs/cli/rules/oas/spec-components-invalid-map-name
... which relates to the following message in https://spec.openapis.org/oas/v3.0.3#fixed-fields-5
"All the fixed fields declared above are objects that MUST use keys that match the regular expression: ^[a-zA-Z0-9.-_]+$."