Skip to content

Commit 4d0b632

Browse files
committed
extend tests
1 parent 1df2ac1 commit 4d0b632

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/test/scala/io/swagger/scala/converter/ScalaModelTest.scala

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,19 @@ class ScalaModelTest extends FlatSpec with Matchers {
5151
prop shouldBe a [ArraySchema]
5252
prop.asInstanceOf[ArraySchema].getItems.getType should be ("object")
5353
}
54+
55+
it should "read a model with vector of booleans" in {
56+
val schemas = ModelConverters.getInstance().readAll(classOf[ModelWithBooleanVector]).asScala
57+
val model = schemas("ModelWithBooleanVector")
58+
val prop = model.getProperties().get("bools")
59+
prop shouldBe a [ArraySchema]
60+
prop.asInstanceOf[ArraySchema].getItems.getType should be ("object")
61+
}
5462
}
5563

5664
case class ModelWithVector (name: String, friends: Vector[String])
5765

5866
case class ModelWithIntVector (ints: Vector[Int])
67+
case class ModelWithBooleanVector (bools: Vector[Boolean])
5968

6069
case class SimpleUser (id: Long, name: String, @(Parameter @field)(description = "the birthdate") date: java.util.Date)

0 commit comments

Comments
 (0)