Describe the bug
When the default value is set in a referenced schema in OpenAPI 3.1 and it has type: ["string", "null"], the default value of dataclass becomes None while the non-referenced property properly sets the default value as described in the OpenAPI.
Describe the bug When the
default
value is set in a referenced schema in OpenAPI 3.1 and it hastype: ["string", "null"]
, the default value of dataclass becomesNone
while the non-referenced property properly sets the default value as described in the OpenAPI.To Reproduce
Example schema:
Used commandline:
And I got the following model.py:
Expected behavior
The expected dataclass is as follows:
Version: