-
Notifications
You must be signed in to change notification settings - Fork 51
Open
Labels
enhancementNew feature or requestNew feature or requestneeds-investigationRequires study to find an appropriate resolutionRequires study to find an appropriate resolution
Description
Is there any interest in adding support for checking yaml files with multiple documents in them? That is:
catalog-info.yaml:
---
apiVersion: backstage.io/v1alpha1
kind: System
metadata:
name: example-system
spec:
owner: my-team
---
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: example-service
spec:
owner: my-team
system: example-system
❯ check-jsonschema --schemafile "https://json.schemastore.org/catalog-info.json" -v catalog-info.yaml
Several files failed to parse.
FailedFileLoadError: Failed to parse catalog-info.yaml
in "/Users/nikolark/.pyenv/versions/3.10.8/lib/python3.10/site-packages/check_jsonschema/instance_loader.py", line 31
>>> data: t.Any = self._parsers.parse_file(path, self._default_filetype)
caused by
ComposerError: expected a single document in the stream
in "<byte string>", line 2, column 1:
apiVersion: backstage.io/v1alpha1
^ (line: 2)
but found another document
in "<byte string>", line 8, column 1:
---
^ (line: 8)
in "/Users/nikolark/.pyenv/versions/3.10.8/lib/python3.10/site-packages/check_jsonschema/parsers/__init__.py", line 89
>>> return loadfunc(fp)
kawa-marcin, s-weigand, wcleong, vorburger, varac and 4 more
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestneeds-investigationRequires study to find an appropriate resolutionRequires study to find an appropriate resolution