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
)
Subject | Author | Latest Post |
---|---|---|