FLUTTER ECOSYSTEM

swagger_parser

Package that generates REST clients and data classes from OpenApi definition file

Latest version
1.45.0
30-day downloads
47.2K
Likes
124
Pub points
160

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

Overview

A Flutter/Dart package that automatically generates REST clients and data classes from OpenAPI specification files. It simplifies API integration by parsing OpenAPI (formerly Swagger) definitions into type-safe Dart code, reducing boilerplate and improving development speed. Ideal for teams using standardized API contracts, it supports multiple platforms including Android, iOS, macOS, Windows, and Linux. The generated code ensures consistency between API documentation and client implementation.

Use cases
  • Automating API client generation
  • Synchronizing client code with OpenAPI specs
  • Reducing manual JSON serialization
  • Enabling rapid prototyping with APIs
  • Maintaining consistent data models across platforms
Key features
  • Generates data classes from OpenAPI schemas
  • Creates REST client interfaces
  • Supports full OpenAPI specification
  • Produces type-safe Dart code
  • Integrates with CI/CD pipelines
Suitable for
  • Teams using OpenAPI specifications
  • Projects requiring automated API client generation
  • Developers seeking reduced boilerplate
  • Cross-platform mobile and desktop apps
  • API-first development workflows
Considerations
  • Requires valid OpenAPI 3.x specification
  • Manual adjustments may be needed for complex schemas
  • Generated code should be version-controlled
  • Not suitable for dynamic or non-standard APIs
  • Best used in conjunction with API documentation workflows
Supported platformsAndroidiOSmacOSWindowsLinux

Install package

flutter pub add swagger_parser

Categories

Dependencies

Dependency list 5 items

Source repository

Related projects

No data available yet.