cardinalby / schema-validator-action

JSON Schema validator Action
MIT License
14 stars 2 forks source link

Error to read multiple document in one file #10

Open ariqpradipa opened 5 months ago

ariqpradipa commented 5 months ago

Hello, this is error message I got when validating the files, is there any option to read multiple document in on file? using YAML.parseAllDocuments()function

Error: Contents of 'service.datadog.yaml' aren't a valid yaml: yaml: YAMLParseError: Source contains multiple documents; please use YAML.parseAllDocuments() at line 24, column 1:

cardinalby commented 4 months ago

Hi! It's not supported at the moment, it would require adding additional yamlDocIndex input or modifying existing fileParser input to accept smth like yaml[2]

I don't have the capacity to support it now but PR is welcome. The action has the well-prepared test suite that can be run locally and you could test the new feature with a quick feedback loop.