metaengine_openapi_dart_dio 1.0.1
metaengine_openapi_dart_dio: ^1.0.1 copied to clipboard
Generate a Dart Dio client and models from an OpenAPI specification.
Generate an Orders client #
Create a Dart project and install Dio and the generator.
dart create -t console orders_client
cd orders_client
dart pub add dio
dart pub global activate metaengine_openapi_dart_dio
Save orders.yaml
next to your project's pubspec.yaml. Generate the client and check the generated code.
dart pub global run metaengine_openapi_dart_dio orders.yaml lib/generated
dart analyze lib/generated
The generated Dart files include a getOrder method and a typed Order model.