Relative path in inline schema
See original GitHub issueSummary
I have tried to use the inline syntax to specify a schema file for my yaml. The schema file is in the same directory as the yaml.
I have tried to use:
# yaml-language-server: $schema=./schema.yaml
and
# yaml-language-server: $schema=/path/from/.git/folder/schema.yaml
but it does not seem to work.
Is this supposed to be possible?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:10 (4 by maintainers)
Top Results From Across the Web
using inline schema reference (# yaml-language-server ...
In this example, the schema file lives in the root of the open folder in vscode. Expected Behavior. relative files should work. Current...
Read more >Relative file path being applied from project directory instead ...
My program reads in a document from a location that is not the project root directory. The doc contains a relative path. When...
Read more >how to import xsd schema using relative path - CodeRanch
I am working on validating xml using xsd schema. The xml has multiple namespaces so I have to import one xsd schema file...
Read more >Source Schema (Grid Property) - Microsoft Learn
Most often, the relative path is ".\", indicating that the source schema file resides in the project folder, along with the map file...
Read more >Using $ref - Swagger
URL Reference – $ref: 'http://path/to/your/resource' Uses the whole document located on the different server. The specific element of the document stored on the ......
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 Free
Top 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
Off the top of my head its probably because you can’t get the workspace root from the yamlSchemaService. I have a PR open that does a big refactoring and should make it possible
Currently, it just supports a url to the schema:
# yaml-language-server: $schema=<urlToTheSchema>
but I can take a look into supporting local files as well. It shouldn’t be too difficult