swagger_to_dart 1.1.0 copy "swagger_to_dart: ^1.1.0" to clipboard
swagger_to_dart: ^1.1.0 copied to clipboard

Convert Swagger to Dart using freezed and retrofit support only 3.1.0 openApi

example/lib/main.dart

import 'package:dio/dio.dart';
import 'package:example/src/gen/clients/api_client.dart';

/// After doing the generation command, you can use the generated client like this
/// Check the README.md File
Future<void> main(List<String> args) async {
  final dio = Dio();

  dio.options.baseUrl = 'http://127.0.0.1:8000';

  final apiClient = ApiClient(dio);

  final response = await apiClient.ping.pingPing();

  print(response.data); // pong
}
7
likes
0
points
650
downloads

Publisher

verified publishermatheer.com

Weekly Downloads

Convert Swagger to Dart using freezed and retrofit support only 3.1.0 openApi

Repository (GitHub)
View/report issues

Topics

#swagger #openapi #generator #freezed #retrofit

Funding

Consider supporting this project:

github.com

License

unknown (license)

Dependencies

collection, freezed_annotation, json_annotation, logger, path, pubspec_parse, yaml

More

Packages that depend on swagger_to_dart