Open sgg-jhodgson opened 5 days ago
It could, it just that I just ripped off the parts needed for the support. Though that support would need separate set of types per OpenAPI version which is not optimal. Also the code generation side would need some conditional logic based on selected version. Yet the could not be supported simultaneously but only via a feature flag.
Reason it does not support. is that the maintenance overhead gets quite big. The biggest eye sore for the between the OpenAPI 3.0.3 and 3.1. is the absence / presence of nullable
field.
yeah fair enough - this is more a fault of the generator than utoipa tbh, was just hoping there might be a workaround.
Feel free to close if there's no real demand for this, hopefully generators will catch up!
Actually @juhaku one more point on this.
oneOf
is often better supported than allOf
, and after a bit of reading, in nullable situations it seems like using oneOf
might be more appropriate.
What was the motivation behind using allOf
?
Is it possible to support 3.0.3 in utoipa 5.0?
Unfortunately the the cpp generators I'm using don't seem to have great support for 3.1.0, none of them support
allOf
and this appears to be the method for defining nullable types in 3.1.0.Thanks for the awesome library!