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
Currently, the ModelConverterContext is instantiated statically from within the ModelConverters class. The context happens to contain some logic that seems to be hard (or impossible) to modify in any other way, other than by extending the ModelConverterContextImpl and overriding the resolve() method.
Problem
Namely, we would like to add clever handling of Optional<...> properties of objects, such that the OAS component that contains such property would specify nullable = true for it. However, because the ModelConverterContextImpl has the following line, we lose the information about Optional wrapper very early on, which makes it impossible for us to use the existing ModelConverter extension points to implement this:
If you don't see any immediate issues with this, I'd like to create a PR adding a ModelConverterContextFactory factory which will be settable on a ModelConverters singleton object, like the following:
Currently, the
ModelConverterContext
is instantiated statically from within theModelConverters
class. The context happens to contain some logic that seems to be hard (or impossible) to modify in any other way, other than by extending theModelConverterContextImpl
and overriding theresolve()
method.Problem
Namely, we would like to add clever handling of
Optional<...>
properties of objects, such that the OAS component that contains such property would specifynullable = true
for it. However, because theModelConverterContextImpl
has the following line, we lose the information about Optional wrapper very early on, which makes it impossible for us to use the existing ModelConverter extension points to implement this:Solution
If you don't see any immediate issues with this, I'd like to create a PR adding a
ModelConverterContextFactory
factory which will be settable on aModelConverters
singleton object, like the following:The text was updated successfully, but these errors were encountered: