swagger_parser 1.35.0
swagger_parser: ^1.35.0 copied to clipboard
Package that generates REST clients and data classes from OpenApi definition file
-
Put your schema 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: #
dart run swagger_parser
copied to clipboard
-
For
freezedwithretrofituse build.yaml file with this content: #
global_options:
freezed:
runs_before:
- json_serializable
json_serializable:
runs_before:
- retrofit_generator
copied to clipboard
-
Run code generation with
build_runnerforjson_seializable(freezed) andretrofitwith command: #
dart run build_runner build
copied to clipboard
-
Clients and models are generated! #