You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using the JSON Schema emitter, as opposed to the OpenAPI emitter.
In the JSON Schema emitter, unions by default output as anyOf, which I believe to be sensible, and it is also consistent with the behaviour of the OpenAPI emitter.
However, unlike the OpenAPI emitter, there appears to be no parallel to the @oneOf decorator to force the use of oneOf over anyOf.
I would quite like this capability for some use cases in my schemas. Side point, but any workaround that I could do in the short term would be awesome too!
Clear and concise description of the problem
I am using the JSON Schema emitter, as opposed to the OpenAPI emitter.
In the JSON Schema emitter, unions by default output as
anyOf
, which I believe to be sensible, and it is also consistent with the behaviour of the OpenAPI emitter.However, unlike the OpenAPI emitter, there appears to be no parallel to the
@oneOf
decorator to force the use ofoneOf
overanyOf
.I would quite like this capability for some use cases in my schemas. Side point, but any workaround that I could do in the short term would be awesome too!
Checklist
The text was updated successfully, but these errors were encountered: