-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Closed
Description
hi.
Would like to be able present a type of Either[Dog,Cat] (or in clojure (either Dog, Cat, Moose) in the Spec. Quite common construct in the FP land. Would be like a enum, but with values of any type.
Currently such a thing could be presented as a complex type with optional fields for all the value => at least the swagger-ui would be able to generate sample models (with all possible alternatives in place) for it. Not perfect, but ~works. Requires also special coercion in the server side to map back into Either.
http://www.scala-lang.org/api/2.11.0/index.html#scala.util.Either
bajtos, ethlo, kondaurovDev, drygiel, adamduracz and 5 more
Metadata
Metadata
Assignees
Labels
No labels