https://kotlinlang.org logo
#http4k
Title
# http4k
s

Stefan

07/08/2021, 12:56 PM
hi, how do I customize Jackson for openapi generation? serializing "description": null seems illegal in many cases
oh, I wasn't aware an object isn't a type itself in kotlin
OpenAPI3(..., json = ConfigurableJackson(
is valid
d

dave

07/08/2021, 1:00 PM
I think it's only illegal in the swagger editor - not the spec or the Swagger UI.
s

Stefan

07/08/2021, 1:01 PM
npx @redocly/openapi-cli lint ~/tmp/swagger.yaml
also complains
but let me see first, if that wasn't just because of other mistakes
d

dave

07/08/2021, 1:02 PM
we've heard it before - so it's definitely "a thing". you can create your own instance of ConfigurableJackson to turn off the serialisation of nulls
s

Stefan

07/08/2021, 1:03 PM
I'll do. Thank you
d

dave

07/08/2021, 1:04 PM
FYI - as a part of our build, we already put generated APIs through the official OpenApi validator to generate a spec in v2 and v3 fotrmats
s

Stefan

07/08/2021, 1:07 PM
nice- I hope I can check it out
how can I add a description to the path parameters?
ahh
by not calling meta but as constructor arg
2 Views