@@ -92,9 +92,9 @@ class ModelPropertyParserTest extends FlatSpec with Matchers {
9292 val model = schemas.get(" ModelWOptionBigInt" )
9393 model should be (' defined )
9494 model.get.getProperties should not be (null )
95- val optBigDecimal = model.get.getProperties().get(" optBigInt" )
96- optBigDecimal should not be (null )
97- optBigDecimal shouldBe a [IntegerSchema ]
95+ val optBigInt = model.get.getProperties().get(" optBigInt" )
96+ optBigInt should not be (null )
97+ optBigInt shouldBe a [IntegerSchema ]
9898 nullSafeList(model.get.getRequired) shouldBe empty
9999 }
100100
@@ -110,6 +110,19 @@ class ModelPropertyParserTest extends FlatSpec with Matchers {
110110 nullSafeList(model.get.getRequired) shouldBe empty
111111 }
112112
113+ it should " process Model with Scala Option Int with Schema Override" in {
114+ val converter = ModelConverters .getInstance()
115+ val schemas = converter.readAll(classOf [ModelWOptionIntSchemaOverride ]).asScala.toMap
116+ val model = schemas.get(" ModelWOptionIntSchemaOverride" )
117+ model should be (' defined )
118+ model.get.getProperties should not be (null )
119+ val optInt = model.get.getProperties().get(" optInt" )
120+ optInt should not be (null )
121+ optInt shouldBe a [IntegerSchema ]
122+ // there is a bug that the override causes the field to be marked as required
123+ // nullSafeList(model.get.getRequired) shouldBe empty
124+ }
125+
113126 it should " process Model with Scala Option Boolean" in {
114127 val converter = ModelConverters .getInstance()
115128 val schemas = converter.readAll(classOf [ModelWOptionBoolean ]).asScala.toMap
0 commit comments