You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The provided schema.yaml is fine for gossfile which don't make use of templates. But when I use templates, my editor (neovim with Goss-file-schema loaded) starts to scream at me becasue it cannot validate the yaml anymore (althogh the gossfile renders fine and tests succeed).
I's like to have a way to validate the gossfile that works in the editor but also with tools i.e. check-jsonschema.
$ check-jsonschema -v --schemafile https://raw.githubusercontent.com/goss-org/goss/master/docs/schema.yaml goss.yaml
Several files failed to parse.
FailedFileLoadError: Failed to parse goss.yaml
in "/usr/lib/python3.12/site-packages/check_jsonschema/instance_loader.py", line 48
>>> data: t.Any = self._parsers.parse_data_with_path(
caused by
ParserError: while parsing a block mapping
in "<byte string>", line 3, column 1:
addr:
^ (line: 3)
expected <block end>, but found '<block mapping start>'
in "<byte string>", line 14, column 5:
https://{{.}}:
^ (line: 14)
in "/usr/lib/python3.12/site-packages/check_jsonschema/parsers/__init__.py", line 92
>>> return loadfunc(data)
Describe the solution you'd like
I don't know how this can be achieved. Maybe I'm just doing it wrong and other editors can deal with this just fine.
Describe alternatives you've considered
None.
The text was updated successfully, but these errors were encountered:
For templates, unfortunately the goss documents with templates are not valid json/yaml, so the plain json can't do much yet.
#795 should fix this, which is merged, but as I understand it it only handles gossfile validation after beeing rendered, which is no the use case I'm looking for.
Describe the feature:
The provided
schema.yaml
is fine for gossfile which don't make use of templates. But when I use templates, my editor (neovim with Goss-file-schema loaded) starts to scream at me becasue it cannot validate the yaml anymore (althogh the gossfile renders fine and tests succeed).I's like to have a way to validate the gossfile that works in the editor but also with tools i.e. check-jsonschema.
Describe the solution you'd like
I don't know how this can be achieved. Maybe I'm just doing it wrong and other editors can deal with this just fine.
Describe alternatives you've considered
None.
The text was updated successfully, but these errors were encountered: