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

Schema versions #24

Open
Emptyfruit opened this issue Jan 22, 2024 · 1 comment
Open

Schema versions #24

Emptyfruit opened this issue Jan 22, 2024 · 1 comment
Labels
question Further information is requested

Comments

@Emptyfruit
Copy link

Emptyfruit commented Jan 22, 2024

I noticed that some objects in the store have versions. Is there a way to specify version for buffer/name/pattern in neovim? I.e. for openapi spec the store has:

{
      description = "A Open API documentation files",
      fileMatch = { "openapi.json", "openapi.yml", "openapi.yaml" },
      name = "openapi.json",
      url = "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/schemas/v3.1/schema.json",
      versions = {
        ["3.0"] = "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/schemas/v3.0/schema.json",
        ["3.1"] = "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/schemas/v3.1/schema.json"
      }
 }

It seems like for any openapi.yml/json it validates against 3.1. To force it to use 3.0 i had to totally override schema with replace in config. Is there a more proper way to do this?

@b0o
Copy link
Owner

b0o commented Jan 26, 2024

This is a good question. I tried researching the topic and wasn't able to find anything in either the JSON Schema spec or the VSCode JSON LSP docs/code about it. It's coming from the upstream SchemaStore catalog JSON file, you may want to open an issue in their repo.

@b0o b0o added the question Further information is requested label Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants