djabraham / vscode-yaml-validation

VSCode Language Extension vscode-yaml-validation
https://marketplace.visualstudio.com/items?itemName=djabraham.vscode-yaml-validation
MIT License
18 stars 6 forks source link

vscode-yaml-validation

Superceeded: Thanks for visiting, but there are much newer and better YAML Language Server Plugins available now. I created this when there was nothing else available. But I was never really able to adequately commit to this effort, so I happily defer to the more robust versions now.

Note: This is not the best starting point, if you're interested in creating VS Code Extensions. They released an updated template for this type of application, right after it was released. Start with the latest examples and documentation provided by the makers of VS Code, and you might save yourself a great deal of effort later on.

Description

This is a work in progress/early release version, of a VSCode extension for YAML validation against a JSON schema.

screen-shot-01.png

screen-shot-02.png

This extension uses json.schemas definitions that it finds in the standard VSCode settings file.

.vscode/settings.json

"json.schemas": [
  {
    "fileMatch": [ "**/default.json" ],
    "url": "./src/specs/schema/sources/JsonSchema.d4.json"
  },
  {
    "fileMatch": [ "/.babelrc" ],
    "url": "http://json.schemastore.org/babelrc
  },
  {
    "fileMatch": [ "**/swagger.yaml", "**/swagger.json" ],
    "url": "http://json.schemastore.org/swagger-2.0"
  }
]

Contributions

Contents of the /server/src/yaml folder are from the following repos, with modifications:

They are included here, because I intend to take major liberties and make further strides towards conversion to TypeScript, if this effort proves viable.

Contents of the /server/src/json and /client folder are from the following repos, with modifications:

PetStore schemas were from the following repo:

Useful Info

License

MIT