stoplightio / vscode-spectral

VS Code extension bringing the awesome Spectral JSON/YAML linter with OpenAPI/AsyncAPI support
https://marketplace.visualstudio.com/items?itemName=stoplight.spectral
Apache License 2.0
72 stars 23 forks source link

Validation of openapi spec version incorrect #215

Open geoff-maddock opened 1 year ago

geoff-maddock commented 1 year ago

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:

Additional context Add any other context about the problem here.