File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed
com/github/swagger/pekko/converter Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -108,7 +108,21 @@ class ModelPropertyParserTest extends AnyFlatSpec with Matchers {
108108 model.get.getProperties should not be (null )
109109 val optInt = model.get.getProperties().get(" optInt" )
110110 optInt should not be (null )
111- optInt shouldBe a [Schema [_]]
111+ optInt shouldBe an [IntegerSchema ]
112+ optInt.asInstanceOf [IntegerSchema ].getFormat shouldEqual " int32"
113+ nullSafeList(model.get.getRequired) shouldBe empty
114+ }
115+
116+ it should " process Model with Scala Option Long" in {
117+ val converter = ModelConverters .getInstance()
118+ val schemas = converter.readAll(classOf [ModelWOptionLong ]).asScala.toMap
119+ val model = schemas.get(" ModelWOptionLong" )
120+ model shouldBe defined
121+ model.get.getProperties should not be (null )
122+ val optLong = model.get.getProperties().get(" optLong" )
123+ optLong should not be (null )
124+ optLong shouldBe a [IntegerSchema ]
125+ optLong.asInstanceOf [IntegerSchema ].getFormat shouldEqual " int64"
112126 nullSafeList(model.get.getRequired) shouldBe empty
113127 }
114128
Original file line number Diff line number Diff line change 1+ package models
2+
3+ case class ModelWOptionLong (optLong : Option [Long ])
You can’t perform that action at this time.
0 commit comments