You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While using swager_parse library to generate retrofit from swagger
there's some case where enum can be use in queryParameter
and some case where enum can be used for response but will need a fromJson method on enum
you will check in this pull request that we tried to find a way to deal with it
but when json is a String and generator try to cast as Map<String, dynamic>, it can be broken
we made a solution for toJson on enum, but i think it can be handle inside retrofit generator
I'm currently running into this as well. The workaround is to create an extension on the enum for the toJson(), but this ideally should be handled by retrofit directly.
While using swager_parse library to generate retrofit from swagger
there's some case where enum can be use in queryParameter
and some case where enum can be used for response but will need a fromJson method on enum
you will check in this pull request that we tried to find a way to deal with it
but when json is a String and generator try to cast as Map<String, dynamic>, it can be broken
we made a solution for toJson on enum, but i think it can be handle inside retrofit generator
Carapacik/swagger_parser#18
The text was updated successfully, but these errors were encountered: