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
Is your feature request related to a problem? Please describe.
I attempted to generate a client from one of my OpenAPI specs, and allOfand oneOf keywords are not yet supported
Describe the solution you'd like oneOf should create a union type of the objects. allOf should create a type with all of the objects subfields.
With the latest version, the default value for enum fields is not used. my_field: Union[Unset, None] = UNSET rather than my_field: Union[My_Enum, None] = My_Enum.DEFAULT
Also I see some strange Enum creation like the following:
M_Y_E_N_U_M_T_Y_P_1 = "model_a" instead of MYENUMTYP1 = "model_a"
Activity
dbanty commentedon Aug 19, 2020
Will add support for oneOf in 0.5.4, allOf is definitely trickier and will happen in a future version.
dtkav commentedon Sep 23, 2020
FYI, we've implemented allOf support in our fork here:
benchling@2670d11
benchling@9f5b95a (bugfix)
I will try to open a PR if I can find some free time 😅 , otherwise feel free to pull in whatever you find useful!
[-]Support allOf, oneOf[/-][+]Support allOf, ~oneOf~[/+][-]Support allOf, ~oneOf~[/-][+]Support allOf in response schemas[/+]Add allOf support for model definitions (#98)
Add allOf support for model definitions (#98)
heiqs commentedon Mar 12, 2021
With the latest version, the default value for enum fields is not used.
my_field: Union[Unset, None] = UNSETrather thanmy_field: Union[My_Enum, None] = My_Enum.DEFAULTAlso I see some strange Enum creation like the following:
M_Y_E_N_U_M_T_Y_P_1 = "model_a"instead ofMYENUMTYP1 = "model_a"feat: Add allOf support for model definitions (#98) (#321)
dbanty commentedon Mar 23, 2021
This should be solved in 0.9.0 (releasing soon)