Open Schwankenson opened 3 years ago
Not sure if this is a swagger.json or a swagger-angular-generator issue, to I created another issue at the creators of the drf-yasg creators: https://github.com/axnsan12/drf-yasg/issues/671
This is most probably a drf-yasg
issue.
@Schwankenson see my reply here: https://github.com/axnsan12/drf-yasg/issues/671#issuecomment-730297991
ListField with DictField as child created invalid TypeScript code
I have this field in my django response serializer fields:
in swagger.json it is shown as
When I generate the api from it, I get this TypeScript code in
defs/MyModel.ts
which is marked as syntax error.
I changed the child to serializer.JSONField() as workaround, which generates
and works