is there a reason an example is not showing in Ope...
# http4k
v
is there a reason an example is not showing in OpenAPI for such definition (the content type is missing as well):
Copy code
returning(Status.OK, Body.string(ContentType.TEXT_PLAIN).toLens() to "example string")
d
From memory, we only handle JSON content types in the OpenApi contract stuff., because we can't build a model out of anything else
v
Ah, okay, domage
r
Yes, looks like that. I suppose it’s this filter in
OpenApi3.kt
that does that:
Copy code
private fun List<HttpMessageMeta<Response>>.collectSchemas() = groupBy { CONTENT_TYPE(it.message) }
        .filterKeys { it == APPLICATION_JSON }
🥲 1