nielsfalk / ktor-swagger

Apache License 2.0
133 stars 38 forks source link

Moshi support #44

Open Globegitter opened 4 years ago

Globegitter commented 4 years ago

We are making use of moshi and com.ryanharter.ktor:ktor-moshi, so we have

...
    val moshi = Moshi.Builder()
        .add(LocalDateTimeJsonAdapter())
        .add(OffsetDateTimeJsonAdapter())
        .add(KotlinJsonAdapterFactory())
        .add(HexIntegerJsonAdapter())
        .build()

  install(ContentNegotiation) {
        moshi(moshi)
    }
...

and when I start up the server I get an empty openapi.json file. But if I change it to e.g. gson everything seems to work as expected. Any idea why that could be?