rnrn1234
4 years agoVisitor
Scala enumerations
Is the standard way for scala enumerations to work with swagger is to manually specify allowableValues?
@ApiModelProperty(dataType = "string", allowableValues = "apple,orange")
See this example enumeration:
object Fruit extends Enumeration {
type Fruit = Value
val Static = Value("apple")
val Fabric = Value("orange")
}
case class Entree(meat: Meat,
@ApiModelProperty(dataType = "string", allowableValues = "apple,orange") fruit: Fruit.Fruit
)