openapi-generation

Generate a typed Dart OpenAPI client from an API specification.

1|Updated Apr 24, 2026
One-click install
npx skills add https://github.com/dimitriRemoiville/cc-mobile --skill openapi-generation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: openapi-generation
Source: https://github.com/dimitriRemoiville/cc-mobile/tree/main/plugins/cc-mobile-flutter/skills/openapi-generation
Command: npx skills add https://github.com/dimitriRemoiville/cc-mobile --skill openapi-generation

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automatically generate a strongly-typed Dart OpenAPI client and DTOs from an API specification, reducing drift and manual wiring across Flutter projects.

Core Features & Use Cases

  • OpenAPI-driven codegen: produce a generated ApiClient, DTOs, and repository wrappers that stay in sync with the spec.
  • Deterministic regeneration: CI-friendly workflow that regenerates on spec changes and enforces diffs.
  • Use Case: When the API evolves, run the generator to update the client and ensure compile-time safety.

Quick Start

Generate the client by running the configured OpenAPI generator against api/openapi.yaml.

Frequently Asked Questions about openapi-generation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate a typed Dart client from an OpenAPI specification?

To generate a typed Dart client from an OpenAPI specification, run the configured OpenAPI generator against your api/openapi.yaml file. This produces strongly-typed DTOs and API wrappers for your Dart or Flutter projects.

What is OpenAPI codegen used for in Flutter projects?

OpenAPI codegen in Flutter projects is used to automatically produce strongly-typed DTOs and an ApiClient. It reduces manual wiring and drift by keeping generated API wrappers in sync with the specification.

Can I automate OpenAPI client regeneration in a CI workflow?

Yes, you can automate OpenAPI client regeneration using a CI-friendly workflow. The generator runs on spec changes and enforces diffs, ensuring deterministic regeneration and compile-time safety across your Dart projects.

Does OpenAPI codegen require a specific directory structure for Dart clients?

OpenAPI codegen requires a dedicated output directory and a generator config file. This setup ensures the generated ApiClient and DTOs are reproducibly placed within your Dart or Flutter project structure.

Why does my generated Dart API client drift from the backend specification?

Your generated Dart API client drifts when the OpenAPI specification changes without re-running the generator. Enforcing a deterministic regeneration workflow on spec updates ensures the client and DTOs stay in sync.