how to use my own local schema?
See original GitHub issueI’ve read the docs a few times and having trouble getting going with schema validation. I want to have a custom schema to validate against for something I’m building.
Following associating a schema
I have this in my .vscode
directory
{
"yaml.schemas": {
"../cdn/schemas/storyline.json": [
"../cdn/story*/story.yaml"
]
}
}
so those rel-paths should point to the files to apply the schema to
So given a very basic schema:
“…/cdn/schemas/storyline.json”
{
"$schema": "http://json-schema.org/draft-07/schema",
"title": "storyline",
"definitions": {
"story": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "name of the story"
},
"cname": {
"type": "string",
"description": "canonical computer readable name"
}
}
}
}
}
It should validate against a file like this
…/cdn/story-test/story.yaml
story:
name: aa
cname: 123
But I can’t tell if anything is working. When I type I don’t get any suggestions…
And there are no commands for yaml added to the command palette.
I’ve restarted VSCode
and the extension is running.
What am I doing wrong ¯_(ツ)_/¯
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Ultimate How-to Guide for Local Business Schema Markup
We recommend our own tools, the Schema App Editor and Schema App Highlighter, but there are many different options out there.
Read more >Local SEO Schema: A Complete Guide To Local Markup ...
Optimize your local business' website by applying properly formatted and relevant structured data. Get started easily with this guide.
Read more >Getting Started with Schema for Local Businesses
This can be done by clicking on the page you want to add schema too, hitting the gear icon, then clicking advanced. From...
Read more >What Is Schema Markup? Beginner's Guide to Structured Data
Schema markup is a structured data vocabulary that allows Google to serve better results. We'll discuss different kinds of schema and how to...
Read more >Build schemas & taxonomies from scratch in Sanity.io
Build schemas & taxonomies from scratch in Sanity.io ; // schema.js // First, we must import the schema creator · // Then import...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
cool! I got it working now, thanks for your help! This might serve as a useful example for anyone else getting started…
Also, in the next version you’ll be able to add a comment at the top of the file that looks like: