We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OpenAPI type null is converted to Python type Any, most likely here:
null
Any
elif schema.type is None or schema.type == "null": converted_type = pre_type + "Any" + post_type
In Fast API (probably among other sources), Foo | None is expressed as:
Foo | None
"anyOf": [ { "$ref": "#/components/schemas/Foo" }, { "type": "null" } ]
because of this issue, we end up with a generated type that uses Union[Foo | Any] instead of Union[Foo | None]
Union[Foo | Any]
Union[Foo | None]
If this is intentional, I'd love to understand why so I can create a fix that doesn't break some implicit, non-obvious behavior.
The text was updated successfully, but these errors were encountered:
For my usage, the fix in #53 works.
Sorry, something went wrong.
Fixed in #53
No branches or pull requests
OpenAPI type
null
is converted to Python typeAny
, most likely here:In Fast API (probably among other sources),
Foo | None
is expressed as:because of this issue, we end up with a generated type that uses
Union[Foo | Any]
instead ofUnion[Foo | None]
If this is intentional, I'd love to understand why so I can create a fix that doesn't break some implicit, non-obvious behavior.
The text was updated successfully, but these errors were encountered: