Relative paths in `tomlValidation` url
The string that is being passed in url in tomlValidation needs to be a URI . Hence, using it with a relative path e.g. "url": "./schema.json" similar to how json and yaml validations can be passed will not work. Using a URL, as shown in the docs however will.
Do you have a reference for JSON and/or YAML validation settings with relative paths? If so, we could copy their behaviour, otherwise I'm not sure what the relative paths should be based on.
I am relatively certain that the relative paths are with respect to the extension install root i.e. where package.json resides see the Search for usecases https://github.com/search?q=filename%3Apackage.json+yamlValidation+in%3Afile&type=Code.
I think this is the piece of code you are looking for https://github.com/redhat-developer/vscode-yaml/blob/7f4be301df8ff9d74016b113df296be420fbfab9/src/extension.ts#L229-L264
FYI we are already making use of tomlValidation see https://github.com/fortran-lang/vscode-fortran-support/blob/1f2fe6d8465a80109501ee22eabbcf4347eb7d7d/package.json#L121-L126 and it works great cheers!
Ah I see, makes perfect sense, thanks! It should be trivial to implement based on the referenced YAML extension code.
FYI we are already making use of tomlValidation see https://github.com/fortran-lang/vscode-fortran-support/blob/1f2fe6d8465a80109501ee22eabbcf4347eb7d7d/package.json#L121-L126 and it works great cheers!
I'm glad, thanks!
This enhancement would be very useful for us too (using extension.extensionUri when schema path is relative to ./)
@tamasfe Do you take PR ? I guess this is quite simple and I'm willing to submit a PR :-)
Any progress on this?