papsign / Ktor-OpenAPI-Generator

Ktor OpenAPI/Swagger 3 Generator
Apache License 2.0
241 stars 42 forks source link

Serializing collections of different element types is not yet supported #120

Closed emirhanemmez closed 2 years ago

emirhanemmez commented 2 years ago

Why am i getting this error after launching swagger-ui?

ERROR Application - Unhandled: GET - /openapi.json java.lang.IllegalStateException: Serializing collections of different element types is not yet supported. Selected serializers: [com.papsign.ktor.openapigen.model.schema.DataFormat, kotlin.Boolean, com.papsign.ktor.openapigen.model.schema.DataType]

Wicpar commented 2 years ago

can you get a more detailed stacktrace ?

emirhanemmez commented 2 years ago

It is not working with Gson. I changed to jackson for serialization then it works. You can close.

emirhanemmez commented 2 years ago

This error occurs when i use gson fyi.

Wicpar commented 2 years ago

Yes this library was made with Jackson in mind, glad it works now.