openapi-generator

Generate OpenAPI 3.1.0 specifications from immutable data models.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/tis-abe-akira/cc-data-modeler --skill openapi-generator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: openapi-generator
Source: https://github.com/tis-abe-akira/cc-data-modeler/tree/main/.claude/skills/openapi-generator
Command: npx skills add https://github.com/tis-abe-akira/cc-data-modeler --skill openapi-generator

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pyyaml, jsonschema, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This skill automatically generates an OpenAPI 3.1.0 specification from immutable data models (model.json, entities_classified.json), ensuring a consistent API surface that aligns with CQRS and event-driven patterns.

Core Features & Use Cases

  • CQRS-based API generation driven by model definitions.
  • Event → Command and Resource → Query mappings with state-aggregation endpoints.
  • RFC 7807 compliant error responses and Idempotency-Key handling for commands.

Quick Start

Run the generator for your project: python openapi_generator.py <project-name>. Example: python .claude/skills/openapi-generator/scripts/openapi_generator.py project-record-system

Frequently Asked Questions about openapi-generator

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

FAQPage Schema
How do I generate an OpenAPI 3.1.0 specification from immutable data models?

You can generate an OpenAPI 3.1.0 specification from immutable data models by running the Python generator script. It automatically translates your model definitions, entities, and events into a complete API surface with schemas and endpoints.

How does event-to-command mapping work for CQRS API generation?

CQRS API generation maps events to commands and resources to queries based on your model definitions. This translates event-driven patterns into a structured OpenAPI specification, ensuring clear separation between command endpoints and state-aggregation query endpoints.

Can I automate idempotency and RFC 7807 error definitions in my OpenAPI spec?

Yes, automated OpenAPI generation includes Idempotency-Key handling for commands and RFC 7807 compliant error responses. The template-driven output automatically embeds these definitions into your API specification.

What do I need to start auto-generating OpenAPI specs from YAML data models?

You need a Python environment with the pyyaml and jsonschema dependencies installed. Provide your immutable data models in JSON format, then execute the generator script with your project name to produce the OpenAPI output.

What's the best way to align my API surface with CQRS and event-driven patterns?

The best way to align your API surface with CQRS and event-driven patterns is to auto-generate specifications directly from immutable models. This ensures consistent resource-to-query and event-to-command mappings without manually writing OpenAPI YAML.

When should I not use automated OpenAPI generation for API specs?

You should avoid automated OpenAPI generation if your data models are not immutable or lack structured entity and event classifications. The generator relies on strict model definitions to accurately produce CQRS-aligned endpoints and schema mappings.