Carapacik / swagger_parser

Dart package that takes an OpenApi definition file and generates REST clients based on retrofit and data classes for your project.
https://pub.dev/packages/swagger_parser
MIT License
90 stars 38 forks source link

Add an option for generating http response #116

Closed theoolee closed 10 months ago

theoolee commented 10 months ago

Implementation of #115 .

StarProxima commented 10 months ago

@theoolee Can you describe when error handling via try catch is not enough and we need HttpResponse?

theoolee commented 10 months ago
  1. We can't say we're ready for parsing all model definitions correctly so far, HttpResponse is a fallback way for users to get data.
  2. Response contains status code and more information, it may be necessary for some business logic.