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
a possible solution is to treat primitive objects with validation as classes during the protocol generation phase
case class Validated(v1: Option[Pattern] = None)
case class Pattern(value: String Refined _root_.eu.timepit.refined.string.MatchesRegex[Pattern.`".*[0-9]+.*"`.T]) extends AnyVal
object Pattern {
val `".*[0-9]+.*"` = _root_.shapeless.Witness(".*[0-9]+.*")
// decode and encode as a primitive
}
The text was updated successfully, but these errors were encountered:
Tracing through ProtocolGenerator's fromSwagger, it looks like it should be possible to conditionally enable this by just make extractProperties(model) return value: String Refined ... to bypass this rejection
The other half is whether $ref's will also need special casing, I would hope that it just works.
When referencing primitive types with added validation properties the information on validation gets lost
generates
a possible solution is to treat primitive objects with validation as classes during the protocol generation phase
The text was updated successfully, but these errors were encountered: