swagger_parser 0.5.0 swagger_parser: ^0.5.0 copied to clipboard
Generate REST clients and data classes from swagger json file
-
Put your json file from swagger and add the path to it in pubspec.yaml #
-
Set the output directory in pubspec.yaml #
-
Run command below to generate rest clients and data classes: #
flutter pub run swagger_parser:generate
-
Run code generation with
build_runner
forjson_seializable
(freezed
) andretrofit
with command: #
flutter pub run build_runner build
-
Clients and models are generated! #