Closed kcchu closed 2 years ago
Thanks for the report!
Looking at your screenshot, it seems that the warning message you're seeing ("String does not match...") is not coming from the Redocly extension. Something else called yaml-schema
is causing this.
If the warning was reported by our extension, it would say "Redocly OpenAPI" instead of "yaml-schema", like in this screenshot:
Are you using some other OpenAPI-related extensions? Perhaps you can try to disable them temporarily, then reload VS Code and see if you're still getting the same warning.
You are right. The error was produced by the redhat.vscode-yaml plugin instead. Thanks
openapi: 2.0.0 is invalid too. it should be swagger: 2.0.0
OR
openapi: 3.0.0
openapi: 3.0.1
openapi: 3.0.2
openapi: 3.0.3
openapi: 3.1.0
An OpenAPI document compatible with OAS 3.. contains a required openapi field which designates the semantic version of the OAS that it uses. (OAS 2.0 documents contain a top-level version field named swagger and value "2.0".)
https://github.com/OAI/OpenAPI-Specification/tree/main/versions
What happened?
A specification file with OpenAPI version set to 2.x or 3.0.x is marked as invalid.
What should have happened instead?
OpenAPI 2., 3.0 and 3.1 should be supported as described in the extension description. The validation rules should reflect the version specified in the file automatically.
Screenshots
Additional context
Extension version: Release 0.1.0 (2021-11-18) VS Code version: Version: 1.63.0-insider