Open Bluscream opened 3 weeks ago
That's all is possible for sure, but I have no capacity to implement these improvements since
But if you have an idea how it can be implemented in a neat way you can prepare a PR
Isn't atleast the last one possible? It would save me a lot of time waiting for workflow runs :D
https://github.com/Bluscream/AMPTemplates/actions/workflows/validate.yml?query=is%3Afailure
P.S. If you have high standards i'm better off not even attempting at PRing anything :joy:
I already included allErrors: true
option to schemasafe options. It still returns the first error, maybe I'm wrong in a way I use the library, but that's the behaviour I see. If you can find out the reason this option is ignored (and extraFormats as well) I would accept the PR
P.S. The action has some tests that can be run locally and you can debug it
mhmm, is schemasafe using ajv in the background? Because i literally found the same bug in ajv (that it always throws on unknown format no matter which options are set)
The other thing i think is because it finds the "error" with the continuation is because it finds the error when checking the schema, not the json. so it throws before it even starts validating the json with the schema that it failed to load
no matter how much error catching i do, i can't do shit about it throwing before the schema is "compiled" https://github.com/ammarlakis/action-ajv/pull/3/files#diff-bfe9874d239014961b1ae4e89875a6155667db834a410aaaa2ebe3cf89820556L90
is schemasafe using ajv in the background?
no I believe
it finds the error when checking the schema, not the json
in this case it's expected at least, in my case schema compiles successfully, the data contains 2 errors (schema violations) and I still see only 1 error in validate.errors
EDIT: Since you seem to be responsive i might just add that as a request; It would be very neat if the error spit out by the action would include (maybe optionally idk):
.