Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,18 @@ class ModelPropertyParserTest extends AnyFlatSpec with Matchers with OptionValue
nullSafeList(mapSchema.getRequired()) shouldBe empty
}

it should "process EchoList" in {
val converter = ModelConverters.getInstance()
val schemas = converter.readAll(classOf[EchoList]).asScala.toMap
val model = findModel(schemas, "EchoList")
model should be (defined)
model.value.getProperties should not be (null)
val val1Field = model.value.getProperties.get("val1")
val1Field shouldBe a [IntegerSchema]
val val2Field = model.value.getProperties.get("val2")
val2Field shouldBe a [IntegerSchema]
}

private def findModel(schemas: Map[String, Schema[_]], name: String): Option[Schema[_]] = {
schemas.get(name) match {
case Some(m) => Some(m)
Expand Down
3 changes: 3 additions & 0 deletions src/test/scala/models/EchoList.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package models

case class EchoList(val1: Int, val2: Int)