Hi, I was wandering if the `OpenApi3ApiRenderer` s...
# http4k
r
Hi, I was wandering if the
OpenApi3ApiRenderer
should render or not null values giving that OpenAPI specification clearly states that
null
 is not supported as a type.
Ok you can disable null from Json but it's not the default, requires a custom config, but I think the OpenApi3Renderer should (at least by default) follow to the specifications of the format it claim to render. Don't you think ?
d
We just need to create a Jackson instance to put into it by default. Feel free to PR it. 🙂
r
Ok, wanting your opinion first. The problem is that It's supposed to work with other libs not just Jackson so I guess it should be done somewhere in the renderer. I'll try to poke around.
d
There's a set of defaults for use specifically with Jackson. Think it's JacksonExt.kt or similar
r
I was thinking that OpenApi3ApiRenderer is the place as it's that specific specification that requires that. Just like another one I just saw as invalid and cannot be fixed with just a Jackson config:
required
list in an object schema must not be empty. It's Ok to not have the key but if you have it it must have at least one element.