Open wvffle opened 2 years ago
Fixed in a personal fork: https://github.com/wvffle/swagger-typescript-api-nextgen/commit/3fd87ea2f848fb4b7ddb82ee2c6ba61b61ce33e1
Not the best solution as it generates
type NullEnum = null
interface SomeModel {
field: NullEnum | null
}
in case of the schema that got generated by drf-spectacular, though that should work for now.
Thanks for providing a fork that fixes some stuff and updates dependencies, great work!
In a project I'm currently working on, we're using drf-spectacular to generate schema.yml.
In the schema, there's a
NullEnum
generated:And by default swagger-typescript-api-nextgen generates this as the
NullEnum
with the typescript error added:But when used with
--union-enums
, it throws an exception: