Coder Social home page Coder Social logo

Comments (12)

felixfbecker avatar felixfbecker commented on August 17, 2024 1

I just contributed a .travis.yml schema to JSON schema store: SchemaStore/schemastore#368 🎉

I think that's the first YAML-only schema so far, so their maintainers definitely seem to be open to use it for YAML

from yaml-language-server.

JPinkney avatar JPinkney commented on August 17, 2024 1

Great news! This should be in our next release!

from yaml-language-server.

JPinkney avatar JPinkney commented on August 17, 2024

It doesn't do any automatic querying to http://schemastore.org/json/ nor does it support $schema afaik but if there is a use case there we might be able to add it. Currently when you don't insert a schema via yaml.schemas the only features are document outlining and regular yaml validation

from yaml-language-server.

felixfbecker avatar felixfbecker commented on August 17, 2024

I think it would be awesome to use that. Many applications like ESLint support both JSON and YAML for their config file and that would allow to use the JSON schema that is available in schemastore automatically for .eslintrc.yml files just like VS Code does for .eslintrc.json files.

from yaml-language-server.

JPinkney avatar JPinkney commented on August 17, 2024

I think we already have the basis for that in https://github.com/redhat-developer/vscode-yaml/blob/9fdaa7f62f336def2d425f33ff6599db09c80f28/src/extension.ts#L66 If i'm understanding correctly but we haven't set up any files with it yet. If thats what you're looking for I can definitely add that to the to-do list

from yaml-language-server.

felixfbecker avatar felixfbecker commented on August 17, 2024

Not sure what you mean with "haven't set up any files with it yet".

JSON schema store has an API that returns URLs of schemas and glob patterns they should apply to: http://schemastore.org/api/json/catalog.json

from yaml-language-server.

JPinkney avatar JPinkney commented on August 17, 2024

This is what I was thinking of when I said I haven't set any files up yet: https://code.visualstudio.com/docs/extensionAPI/extension-points#_contributesjsonvalidation. We have a similar property called yamlValidation (https://github.com/redhat-developer/vscode-yaml/blob/master/package.json#L35) that behaves the same way and allows us to setup schemas for specific files

from yaml-language-server.

felixfbecker avatar felixfbecker commented on August 17, 2024

it would be best if this extension just queried the schema store API to find a schema to use

from yaml-language-server.

JPinkney avatar JPinkney commented on August 17, 2024

I just have a quick question about the travis schema and appveyor schema, I was wondering if you wrote those yourself or if they were generated? We found one small thing with appveyor and then it looks like a few fields are missing in the travis one noted here redhat-developer/vscode-yaml#47

from yaml-language-server.

felixfbecker avatar felixfbecker commented on August 17, 2024

Yeah, I just wrote it myself from digging through the documentation. It's definitely not perfect, I noticed things that can be improved myself. docker is missing in services, array for os not possible, not all deploy providers there, no schema for secure, ... I think it's like 90% there. Anyone can do a PR to get the last 10% :)

from yaml-language-server.

JPinkney avatar JPinkney commented on August 17, 2024

I'm definitely going to see if theres anything that I can personally add to it to make it better!

from yaml-language-server.

JPinkney avatar JPinkney commented on August 17, 2024

Added in 0.0.7!

from yaml-language-server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.