openapi-spec-generation

Generate and maintain OpenAPI 3.1 specifications with validation and SDK generation.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/schalappe/skills --skill openapi-spec-generation-schalappe
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: openapi-spec-generation
Source: https://github.com/schalappe/skills/tree/main/openapi-spec-generation
Command: npx skills add https://github.com/schalappe/skills --skill openapi-spec-generation-schalappe

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It eliminates OpenAPI drift and guesswork by helping you design, validate, and regenerate OpenAPI 3.1 specifications as the contract for your API.

Core Features & Use Cases

  • Design-first spec writing: Create an accurate spec skeleton for a new API when no implementation exists yet.
  • Code-first and hybrid workflows: Generate specs from FastAPI/tsoa/NestJS annotations, detect drift, and correct the lagging side.
  • Validation and documentation readiness: Set up Spectral or Redocly linting rules and ensure specs are generator-friendly (operationId, security, error responses, consistent naming).
  • SDK generation support: Use openapi-generator-cli to generate clients (TypeScript/Python/etc.) from the validated spec.

Use when you need a swagger/openapi file, want contract-first API documentation, must validate schema quality in CI, or want reliable SDK/client generation from your contract.

Quick Start

Use the openapi-spec-generation skill to design an OpenAPI 3.1 contract for your service, validate it with Spectral or Redocly, and generate an SDK client from the resulting spec.

Frequently Asked Questions about openapi-spec-generation

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

FAQPage Schema
How do I generate an OpenAPI 3.1 spec from FastAPI or NestJS annotations?

You generate OpenAPI specs from FastAPI, NestJS, or tsoa annotations by detecting drift between the code and existing specs, then correcting whichever side lags behind the current API contract implementation.

How do I set up Spectral or Redocly linting for swagger API documentation?

Setting up Spectral or Redocly linting for swagger API documentation involves applying validation rules to ensure your specs are generator-friendly, checking for operationId, security modeling, error responses, and consistent naming conventions.

What's the best way to generate TypeScript or Python SDKs from an OpenAPI spec?

The best way to generate TypeScript or Python SDKs from an OpenAPI spec is using openapi-generator-cli on a validated contract, ensuring the spec follows generator-compatible conventions like correct components wiring and operationId.

Can I create a design-first OpenAPI 3.1 contract when no API implementation exists yet?

Yes, you can create a design-first OpenAPI 3.1 contract when no implementation exists by generating an accurate spec skeleton that serves as the single source of truth for your API design before writing any code.

Why does openapi-generator-cli fail on my swagger file?

openapi-generator-cli fails on swagger files when the OpenAPI 3.1 spec lacks generator-compatible conventions, specifically missing operationId, incorrect components wiring, or incomplete security and error response modeling required for reliable client generation.