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

String does not match the pattern of "^3\.1\.\d+(-.+)?$".yaml-schema: openapi.json #1069

Open
1 of 4 tasks
k98kurz opened this issue Nov 17, 2024 · 0 comments
Open
1 of 4 tasks

Comments

@k98kurz
Copy link

k98kurz commented Nov 17, 2024

Describe the bug

Files that start with openapi: '3.0.0' have a validation error. The file turns red as a result in all the UI, and the very first character of the file is underlined in red.

Expected Behavior

3.0.0 is a valid schema version number and should not cause an error.

In the settings, it has https://www.schemastore.org/api/json/catalog.json as the Yaml > Schema Store: Url value. Going there reveals that 3.0.0 is a supported schema, so this error is nonsense and makes the extension unusable if you want to write 3.0.0 openapi specs.

Current Behavior

Files that start with openapi: '3.0.0' have the following validation error:

String does not match the pattern of "^3\.1\.\d+(-.+)?$".yaml-schema: openapi.json

Clicking the link labeled "Source" results in this url: https://spec.openapis.org/oas/3.1/schema/2022-10-07

This is a false positive because, as I explained above, 3.0.0 is a valid OpenAPI spec version, and it is explicitly marked as such in the schema store.

Steps to Reproduce

  1. Create an openapi.yml file
  2. Type "openapi: '3.0.0'" followed by a new line
  3. Observe the error.

Environment

  • Windows
  • Mac
  • Linux
  • other (please specify)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant