openapi-client

Community

Generate and standardize type-safe API clients.

AuthorCloudyWing
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill prevents manual drift between backend API contracts and frontend code by establishing a reproducible workflow to generate TypeScript types and client wrappers from OpenAPI specifications, reducing runtime type errors and inconsistent request handling.

Core Features & Use Cases

  • Code-first generation: Prefer generating frontend types and clients from OpenAPI/Swagger specs to ensure exact correspondence with backend DTOs and to enable CI-friendly artifacts.
  • Axios wrapper conventions: Centralize HTTP logic in a shared apiClient instance with interceptors for token injection and global error handling, keeping API modules pure and side-effect free.
  • Domain-organized modules: Organize one API module per domain with clear input and return types, unwrapped from transport-layer response shapes for easier consumption.
  • Error handling and validation: Normalize ProblemDetails-style errors, provide utilities to extract validation errors and user messages, and surface friendly messages to UI layers.
  • Cancellation and uploads: Support request cancellation patterns for rapid interactions and consistent multipart uploads with progress reporting.
  • Use Case: Keep generated type files under version control, run generation during CI so frontend builds never depend on a running backend, and consistently handle authentication expiry and validation errors across the app.

Quick Start

Generate TypeScript types from the backend OpenAPI spec and update the frontend API clients while using a centralized apiClient wrapper for requests and error handling.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: openapi-client
Download link: https://github.com/CloudyWing/ai-dotfiles/archive/main.zip#openapi-client

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.