Flutter Gems is a curated list of 7250+ useful Dart & Flutter packages that are categorized based on functionality.
Top Flutter OpenAPI and Swagger packages
Last updated: May 18, 2026
OpenAPI (formerly Swagger) is a standardized specification for designing, documenting, and consuming RESTful web APIs. Utilizing OpenAPI in Flutter drastically speeds up development by auto-generating API client code.
Best Practices for OpenAPI
- Code Generation: Do not write API data models and HTTP calls by hand. Use OpenAPI generator packages to automatically generate type-safe Dart classes (
fromJson/toJson) directly from your backend'sswagger.yamloropenapi.jsonfile. - Single Source of Truth: Rely on the backend team to maintain the OpenAPI spec. When the API changes, simply regenerate the Dart client to catch breaking changes at compile time rather than runtime.
- Mocking: Use the OpenAPI specification to generate mock servers during development, allowing the frontend Flutter team to build features before the backend is fully completed.
The complete list of OpenAPI, Swagger, and API Client generation packages for Flutter is provided below.
swagger_dart_code_generator
👍 327 ⬇️ 68.2K
Dart 3 compatibleMaintenance Status: Good
Have you been turned into a problem with writing code for Http requests? This package can help. It has all of the Http and model codegen functionality you have been looking for.
swagger_parser
👍 119 ⬇️ 20.1K
Dart 3 compatibleMaintenance Status: Good
Package that generates REST clients and data classes from OpenApi definition file
openapi_generator
👍 122 ⬇️ 12.2K
Dart 3 compatibleMaintenance Status: Average
Generator for openapi client sdk inspired by the npm implementation of openapi-generator-cli.
shelf_swagger_ui
👍 85 ⬇️ 1.8K
Dart 3 compatibleMaintenance Status: Average
Present clean and professional documentation with Swagger + shelf.
openapi_generator_annotations
👍 21 ⬇️ 30.1K
Dart 3 compatibleMaintenance Status: Average
Annotation package for openapi_generator https://pub.dev/packages/openapi_generator.
openapi_generator_cli
👍 20 ⬇️ 18.3K
Dart 3 compatibleMaintenance Status: Average
A dart wrapper around openapi-generator inspired by the node implementation.
nenuphar_cli
👍 29 ⬇️ 44
Dart 3 compatibleMaintenance Status: Poor
An openapi generation CLI for Dart Frog created by Very Good CLI.
openapi_freezed_dio_builder
👍 28 ⬇️ 29
Dart 3 compatibleMaintenance Status: Average
Generate models and API classes based on an OpenAPI document using Freezed and Dio.
annotated_shelf
👍 23 ⬇️ 99
Dart 3 compatibleMaintenance Status: Poor
powerful Dart library for generating REST APIs using annotations. With a simple and intuitive interface, you can easily build APIs that are fast, efficient, and easy to use.
space_gen
👍 3 ⬇️ 9.1K
Dart 3 compatibleMaintenance Status: Good
An OpenAPI generator, focused on generating high quality code.
api_bloc
👍 10 ⬇️ 125
Dart 3 compatibleMaintenance Status: Average
Flutter widgets that simplify the BLoC pattern implementation for REST APIs within an MVC architecture, significantly reducing boilerplate code.
flutter_easy_swagger_generator
👍 2 ⬇️ 63
Dart 3 compatibleMaintenance Status: Good
A Flutter package for generating Dart models and API clients from Swagger/OpenAPI specifications.
