Skip to content

Commit 4d9b1b8

Browse files
committed
Update ModelPropertyParserTest.scala
1 parent ff3a38d commit 4d9b1b8

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,18 @@ class ModelPropertyParserTest extends AnyFlatSpec with BeforeAndAfterEach with M
8686
val itemSchema = values.asInstanceOf[ArraySchema].getItems
8787
itemSchema shouldBe an[IntegerSchema]
8888
itemSchema.asInstanceOf[IntegerSchema].getFormat shouldBe "int64"
89+
itemSchema.asInstanceOf[IntegerSchema].getRequired shouldBe null
90+
}
91+
92+
it should "process Option[Seq[Option[Long]]] as string" in new PropertiesScope[OptionSeqOptionLong] {
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
89101
}
90102

91103
it should "process Option[Model] as Model" in new PropertiesScope[ModelWOptionModel] {

0 commit comments

Comments
 (0)