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

dave

07/21/2021, 5:46 PM
Yes - this is exactly correct. For multiple examples to be rendered you need to provide all of them. It's a bit of a limitation.
s

Stefan

07/22/2021, 8:20 AM
I'm currently trying to get rid of this
"oneOf": [ singleRef ]
- not only because of esthetic reasons, but mainly because oapi2 converters don't handle it (and it seems that http4k oapi3 generator is better than oapi2/swagger). Any ideas how to do that?
d

dave

07/22/2021, 8:21 AM
ah - the latest version actually removes the oneOf for OA2 because it isnt' supported
s

Stefan

07/22/2021, 8:23 AM
cool. Any plans to port it for oapi3? Imho removing oneof for a single element would look cleaner
d

dave

07/22/2021, 8:24 AM
no - there's no harm in keeping it for OA3 so will leave it.
s

Stefan

07/22/2021, 8:30 AM
yeah, I agree that it's conform to the spec. The benefits from still removing it would be increased portability and it would also look simpler and closer to what a manually crafted oapi file would look like
I made a PR to improve this
4 Views