openapi-to-typescript

Installation
Summary

Convert OpenAPI 3.0 specifications to TypeScript interfaces and type guards.

  • Accepts OpenAPI files in JSON or YAML format and validates against OpenAPI 3.0.x specification
  • Generates TypeScript interfaces from components/schemas, request/response types from paths, and runtime type guards for validation
  • Handles complex types including objects, arrays, enums, unions (oneOf), and inheritance (allOf) with proper required/optional field mapping
  • Includes automatic JSDoc comments from OpenAPI descriptions and a standard ApiError interface for all generated files
SKILL.md

OpenAPI to TypeScript

Converts OpenAPI 3.0 specifications to TypeScript interfaces and type guards.

Input: OpenAPI file (JSON or YAML) Output: TypeScript file with interfaces and type guards

When to Use

  • "generate types from openapi"
  • "convert openapi to typescript"
  • "create API interfaces"
  • "generate types from spec"

Workflow

  1. Request the OpenAPI file path (if not provided)
  2. Read and validate the file (must be OpenAPI 3.0.x)
  3. Extract schemas from components/schemas
Related skills

More from softaworks/agent-toolkit

Installs
3.6K
GitHub Stars
1.8K
First Seen
Jan 20, 2026