Closed leedsalex closed 2 years ago
I'm afraid that swagger-scala-module is a set of hacks built on io.swagger.core.v3:swagger-core-jakarta.
ModelConverters.getInstance().readAll is not a method in this lib. It is a method in io.swagger.core.v3:swagger-core-jakarta.
It is io.swagger.core.v3:swagger-core-jakarta that decides to create a model for SeqString.
And I find the io.swagger team quite unresponsive when it comes to trying to get them to consider issues and PRs. So suggesting changes there is not something I'm interested in following up on.
One approach would be to create a method in this lib that wraps ModelConverters.getInstance().readAll and that can filter out excess models (or some angle like that).
If you want to try something yourself, I can review any changes. But because the extra model is just a minor annoyance as opposed to a major issue, I'm not super enthusiastic to spend much time on it myself.
Thanks for the quick response and pointing me in the right direction. I will see what type of solution I can come up with.
Thanks again for maintaining this library, it has been a huge help to my team!
This might be related to #63
Note: We use this package directly, not as part of swagger-akka-http. We only generate schemas for models, and don't use any annotations.
Given a case class that contains a single property which is a
Seq
, there are two schemas generated,Foo
andSeqString
, i'm unsure why theSeqString
schema is generated as it's not referenced in theFoo
schema. This appears to be a bug.