openapi_generator_cli
7.0.0, released 6 months ago by devappliance.com
A Dart CLI wrapper around openapi-generator to generate API client code.
WASM-ready
What it does
Wraps the openapi-generator tool to automatically create API client libraries, server stubs, documentation, and configuration from an OpenAPI Specification.
AI-written summary of version 7.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to generate Dart or Flutter API client SDKs from an OpenAPI specification.
- You want to use a CLI tool to automate API client code generation.
Skip it when
- You prefer writing your network requests manually or using a runtime client like dio or http.
- You do not use an OpenAPI specification for your backend.
Strengths
- Automates the creation of complex API client libraries from OpenAPI specs.
- Provides a Dart CLI wrapper around the established openapi-generator tool.
Weaknesses
- Requires proper PATH configuration for global pub executables.
- Generated code can sometimes require dependency overrides for version conflicts.
Setup
- Kind
- Pure Dart
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 4
Install globally via dart pub global activate openapi_generator_cli and ensure the pub-cache/bin directory is in your PATH.
dart pub global activate openapi_generator_cli
openapi-generator generate -i http://127.0.0.1:8111/v3/api-docs -g dartAlternatives
Packages that do the same job and could replace openapi_generator_cli.
Works with
Packages commonly used together with openapi_generator_cli: ones it builds on, ones built on it, and its own family.
- argsopenapi_generator_cli depends on itLibrary for parsing raw command-line arguments into options and values using GNU and POSIX styles.
- cli_launcheropenapi_generator_cli depends on itUtility to launch a locally installed version of a CLI when a global version is invoked.
- openapi_generator_annotationsSame familyAnnotation package for configuring openapi_generator client SDKs.
- openapi_generatorBuilt on openapi_generator_cliGenerator for OpenAPI client SDKs in Dart and Flutter projects.