stoplightio / vscode-spectral

VS Code extension bringing the awesome Spectral JSON/YAML linter with OpenAPI/AsyncAPI support

Home Page:https://marketplace.visualstudio.com/items?itemName=stoplight.spectral

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Validation of openapi spec version incorrect

geoff-maddock opened this issue · comments

Describe the bug

Spectral is throwing an error saying the openapi spec value of 3.0.0 is invalid. The help text right above the message shows: "Validation schema for OpenAPI Specification 3.0.X", but if I hover over the error, it shows conflicting helper text, saying:
String does not match the pattern of "^3\.1\.\d+(-,+)?$

To Reproduce

  1. Given this OpenAPI document '...'

Open spectral with a documnent where the first line is:
openapi: 3.0.0

  1. See error

Expected behavior
This value should be valid, and the messages in the spectral linting should not conflect with each other

Screenshots

spectral-error

Environment:

  • Extension version: v1.1.2
  • VS Code version: 1.79.2
  • Operating System: Windows10

Additional context
Add any other context about the problem here.