We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fb2bce2 commit cfcfa72Copy full SHA for cfcfa72
1 file changed
internal/handlers/validate.go
@@ -43,6 +43,8 @@ func (vh *PubliccodeymlValidatorHandler) Query(ctx *fiber.Ctx) error {
43
44
reader := bytes.NewReader(ctx.Body())
45
46
+ results := make(publiccodeParser.ValidationResults, 0)
47
+
48
// parsed, err = parser.Parse(repository.FileRawURL)
49
_, err := vh.parser.ParseStream(reader)
50
if err != nil {
@@ -52,12 +54,11 @@ func (vh *PubliccodeymlValidatorHandler) Query(ctx *fiber.Ctx) error {
52
54
for _, res := range validationResults {
53
55
if errors.As(res, &validationError) {
56
valid = false
-
- break
57
}
58
+ results = append(results, res)
59
60
61
62
- return ctx.JSON(fiber.Map{"valid": valid})
63
+ return ctx.JSON(fiber.Map{"valid": valid, "results": results})
64
0 commit comments