redhat-developer / yaml-language-server

Language Server for YAML Files
MIT License
1.07k stars 262 forks source link

OpenAPI 3.0.0 specification is treated as invalid #752

Open cpkio opened 2 years ago

cpkio commented 2 years ago

Describe the bug

Schema: https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/schemas/v3.0/schema.yaml is treated as invalid.

OpenAPI issue #2969.

Expected Behavior

Should be considered valid.

Current Behavior

Result: Schema 'schema.yaml' is not valid: /definitions/Schema/properties/multipleOf/exclusiveMinimum : must be number

Steps to Reproduce

  1. Set # yaml-language-server: $schema=https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/schemas/v3.0/schema.yaml in Neovim modeline in OpenAPI specification file.
  2. Set openapi: 3.0.0 in this OpenAPI specification file.

Schema 3.1.0 works fine.

Environment

okybr commented 1 year ago

you can use this patch in order to use draft-04 which is needed for openapi-3.0-schema: https://github.com/okybr/yaml-language-server/commit/455d452f66c700a3101f87b3970f882c3967e986

also check out this readme: https://github.com/okybr/yaml-language-server#readme