You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.validate(refinedValidatorTranslation.tapirValidator) // in reality if this validator has to fail, it will fail before in mapDecode while trying to construct refined type
implicitly[ClassTag[P]].runtimeClass.toString) //for the moment there is no way to get a human description of a predicate/validator without having a concrete value to run it
nonEmptyStringCodec.decode("") should matchPattern{caseDecodeResult.InvalidValue(List(ValidationError(validator, "", _))) if validator == expectedValidator=>}
16
20
}
17
21
18
22
it should "correctly delegate to raw parser and refine it" in {
19
23
nonEmptyStringCodec.decode("vive le fromage") shouldBe DecodeResult.Value(refineMV[NonEmpty]("vive le fromage"))
20
24
}
25
+
26
+
it should "return DecodResult.Invalid if subtype can't be refined with derived tapir validator if non tapir validator available" in {
identifierCodec.decode("-bad") should matchPattern{caseDecodeResult.InvalidValue(List(ValidationError(validator, "-bad", _))) if validator == expectedValidator=>}
0 commit comments