implementing-openapi-in-dart

Installation
SKILL.md

Implementing OpenAPI 3.0 in Dart

Given an OpenAPI 3.0 spec, implement a type-safe Dart API layer with:

  • Freezed (or Equatable) for models
  • Dio for HTTP with interceptors and error handling
  • json_serializable for JSON serialisation

Process

  1. Read the OpenAPI spec — parse components/schemas for models, paths for endpoints.
  2. Map schemas → Dart models (Freezed or Equatable — see Model Strategy).
  3. Map paths → Dio service methods.
  4. Add a repository layer that wraps the service.
  5. Wire error handling via DioException → domain ApiError.

Dependencies

Installs
16
GitHub Stars
7
First Seen
May 18, 2026