File tree Expand file tree Collapse file tree 2 files changed +11
-10
lines changed
main/scala/com/github/swagger/scala/converter
test/scala/com/github/swagger/scala/converter Expand file tree Collapse file tree 2 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -57,16 +57,8 @@ class SwaggerScalaModelConverter extends ModelResolver(SwaggerScalaModelConverte
5757 case Some (property) => {
5858 if (isIterable(cls)) {
5959 // untidy solution for https://github.com/swagger-akka-http/swagger-scala-module/issues/48
60- val required = property.getRequired
61- if (required != null ) {
62- required.remove(" traversableAgain" )
63- required.remove(" empty" )
64- }
65- val props = property.getProperties
66- if (props != null ) {
67- props.remove(" traversableAgain" )
68- props.remove(" empty" )
69- }
60+ property.setRequired(null )
61+ property.setProperties(null )
7062 }
7163 setRequired(`type`)
7264 property
Original file line number Diff line number Diff line change @@ -366,6 +366,15 @@ class ModelPropertyParserTest extends AnyFlatSpec with Matchers with OptionValue
366366 nullSafeList(model.value.getRequired) shouldEqual Seq (" listOfStrings" )
367367 }
368368
369+ it should " process scala Iterable[T] classes" in {
370+ val converter = ModelConverters .getInstance()
371+ val schemas = converter.readAll(classOf [Seq [String ]]).asScala.toMap
372+ val model = findModel(schemas, " Seq" )
373+ model should be(defined)
374+ model.value.getProperties should be(null )
375+ model.value.getRequired should be(null )
376+ }
377+
369378 it should " process Array-Model with forced required Scala Option Seq" in {
370379 val converter = ModelConverters .getInstance()
371380 val schemas = converter.readAll(classOf [ModelWOptionStringSeq ]).asScala.toMap
You can’t perform that action at this time.
0 commit comments