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
I'm using FastAPI 100, that creates OpenAPI version 3.1 as an output.
I want an object with arrays with elements of a type or null, such as:
data: dict[str, list[float|None] | list[int|None]]
Before, the None was ignored when generating the OpenAPI file, but now, the generated file looks like:
"additionalProperties": "anyOf": [ { "items": { "anyOf": [{ "type": "number" }, { "type": "null" }] }, "type": "array" }, { "items": { "anyOf": [{ "type": "integer" }, { "type": "null" }] }, "type": "array" }]}
Then, openapi-typescript-gen creates wrong types like this:
data: Record<string,>
instead of:
data: Record<string, (Array<number|null> | Array<string|null>)>;
Looking at the code, I can't see the place where openapi-typescript-gen processes the type null.
The text was updated successfully, but these errors were encountered:
ferdikoomen
No branches or pull requests
I'm using FastAPI 100, that creates OpenAPI version 3.1 as an output.
I want an object with arrays with elements of a type or null, such as:
data: dict[str, list[float|None] | list[int|None]]
Before, the None was ignored when generating the OpenAPI file, but now, the generated file looks like:
Then, openapi-typescript-gen creates wrong types like this:
instead of:
Looking at the code, I can't see the place where openapi-typescript-gen processes the type null.
The text was updated successfully, but these errors were encountered: