flap 0.0.4 copy "flap: ^0.0.4" to clipboard
flap: ^0.0.4 copied to clipboard

OpenAPI → Dart/Flutter client generator for 3.0, 3.1 and Swagger 2.0. Generates Freezed + json_serializable clients, no Java required.

example/example.dart

import 'package:flap/flap.dart';

/// Run the flap code generator programmatically.
///
/// Install the tool:
///   dart pub global activate flap
///
/// Then use it from the command line:
///   flap --out ./generated path/to/openapi.yaml
///
/// Or call [FlapRunner] directly from Dart code as shown below.
Future<void> main() async {
  final exitCode = await const FlapRunner().run([
    '--out',
    './generated',
    '--client=http',
    'api/openapi.yaml',
  ]);

  if (exitCode != 0) {
    throw Exception('flap exited with code $exitCode');
  }
}
2
likes
160
points
35
downloads
screenshot

Documentation

Documentation
API reference

Publisher

unverified uploader

Weekly Downloads

OpenAPI → Dart/Flutter client generator for 3.0, 3.1 and Swagger 2.0. Generates Freezed + json_serializable clients, no Java required.

Repository (GitHub)
View/report issues

Topics

#code-generation #openapi #flutter #dart #rest-api

License

MIT (license)

Dependencies

archive, crypto, http, path

More

Packages that depend on flap