validator icon indicating copy to clipboard operation
validator copied to clipboard

Custom Level ignored in Result via Java Api

Open JannickWeisshaupt opened this issue 1 year ago • 1 comments

Custom Levels for asserts in the scenario file, e.g.

<customLevel level="warning">BR-CL-23</customLevel>

are ignored in the de.kosit.validationtool.api.Result object, when accessed e.g. as

    for (SchematronOutput output : result.getSchematronResult())
    {
      for (FailedAssert failedAssert : output.getFailedAsserts())
      {
        String flag = failedAssert.getFlag();
        validationErrors.addAll(failedAssert.getText().getContent().stream()
            .filter(x -> x instanceof String)
            .map(x -> (String) x)
            .map(x -> x + " (Level: " + flag + ")")
            .collect(toList()));
      }
    }

BR-CL-23 would be listed as fatal here.

JannickWeisshaupt avatar Feb 05 '24 10:02 JannickWeisshaupt

@JannickWeisshaupt I ran into a problem that might be related, see #129.

fbuettner-hb avatar Feb 21 '24 14:02 fbuettner-hb