Skip to content

Commit 1ed482c

Browse files
committed
Update ModelPropertyParserTest.scala
1 parent 0553501 commit 1ed482c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/test/scala/com/github/swagger/scala/converter/ModelPropertyParserTest.scala

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,17 @@ class ModelPropertyParserTest extends AnyFlatSpec with BeforeAndAfterEach with M
8989
itemSchema.asInstanceOf[IntegerSchema].getRequired shouldBe null
9090
}
9191

92+
it should "process Seq[Option[Long]] as string" in new PropertiesScope[SeqOptionLong] {
93+
val values = model.value.getProperties().get("values")
94+
values should not be (null)
95+
values shouldBe an[ArraySchema]
96+
values.getRequired shouldBe null
97+
val itemSchema = values.asInstanceOf[ArraySchema].getItems
98+
itemSchema shouldBe an[IntegerSchema]
99+
itemSchema.asInstanceOf[IntegerSchema].getFormat shouldBe "int64"
100+
itemSchema.asInstanceOf[IntegerSchema].getRequired shouldBe null
101+
}
102+
92103
it should "process Option[Seq[Option[Long]]] as string" in new PropertiesScope[OptionSeqOptionLong] {
93104
val values = model.value.getProperties().get("values")
94105
values should not be (null)

0 commit comments

Comments
 (0)