mservicetech / openapi-schema-validation

Apache License 2.0
15 stars 9 forks source link

When there are multiple validation issues only the first one is returned #41

Open lukaszkegss opened 4 months ago

lukaszkegss commented 4 months ago

Current behaviour When there are multiple validation issues in body only the first one is returned

Expected All validation issues should be returned

Proposed fix:

 if(processingReport != null && !processingReport.isEmpty()) {
            var message = processingReport.stream().map(ValidationMessage::getMessage).collect(Collectors.joining(","));
            status = new Status(VALIDATOR_SCHEMA, message);
        }

https://github.com/mservicetech/openapi-schema-validation/blob/7b77cf791695ae6d0205adc0f23d71da8c7b9b47/src/main/java/com/mservicetech/openapi/validation/SchemaValidator.java#L126