openapi-generator

Generate OpenAPI specifications from code or legacy APIs with schema inference and documentation

509 stars

Best use case

openapi-generator is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Generate OpenAPI specifications from code or legacy APIs with schema inference and documentation

Teams using openapi-generator should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/openapi-generator/SKILL.md --create-dirs "https://raw.githubusercontent.com/a5c-ai/babysitter/main/library/specializations/code-migration-modernization/skills/openapi-generator/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/openapi-generator/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How openapi-generator Compares

Feature / Agentopenapi-generatorStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Generate OpenAPI specifications from code or legacy APIs with schema inference and documentation

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# OpenAPI Generator Skill

Generates OpenAPI specifications from code annotations, legacy APIs, or runtime analysis, with schema inference and documentation generation.

## Purpose

Enable API documentation for:
- Spec generation from code
- Schema inference
- Example generation
- Validation rule extraction
- Documentation generation

## Capabilities

### 1. Spec Generation from Code Annotations
- Parse JSDoc/Swagger annotations
- Extract from decorators
- Process code comments
- Support multiple languages

### 2. Schema Inference
- Infer from TypeScript types
- Extract from runtime samples
- Build from database models
- Derive from existing payloads

### 3. Example Generation
- Generate realistic examples
- Create edge case samples
- Produce validation examples
- Build test fixtures

### 4. Validation Rule Extraction
- Extract validation constraints
- Document required fields
- Map format rules
- Export enum values

### 5. Versioning Support
- Track API versions
- Generate diff between versions
- Document breaking changes
- Support multiple versions

### 6. Documentation Generation
- Generate Swagger UI
- Create ReDoc pages
- Export to Postman
- Build developer portals

## Tool Integrations

| Tool | Language | Integration Method |
|------|----------|-------------------|
| Swagger Codegen | Multi | CLI |
| OpenAPI Generator | Multi | CLI |
| springdoc | Java/Spring | Library |
| NSwag | .NET | CLI |
| tsoa | TypeScript | CLI |
| FastAPI | Python | Auto |

## Output Schema

```json
{
  "generationId": "string",
  "timestamp": "ISO8601",
  "specification": {
    "openapi": "string",
    "info": {},
    "paths": {},
    "components": {}
  },
  "artifacts": {
    "specFile": "string",
    "docsUrl": "string",
    "postmanCollection": "string"
  },
  "coverage": {
    "endpoints": "number",
    "documented": "number",
    "schemasGenerated": "number"
  }
}
```

## Integration with Migration Processes

- **api-modernization**: Spec generation
- **documentation-migration**: API docs

## Related Skills

- `api-inventory-scanner`: Endpoint discovery
- `api-compatibility-analyzer`: Version comparison

## Related Agents

- `api-modernization-architect`: API design
- `documentation-migration-agent`: Doc generation

Related Skills

openapi

509
from a5c-ai/babysitter

OpenAPI/Swagger specification, code generation, documentation, and validation.

color-palette-generator

509
from a5c-ai/babysitter

Generate accessible color palettes with WCAG compliance

openapi-swagger

509
from a5c-ai/babysitter

Expert skill for OpenAPI/Swagger specification analysis, validation, and documentation generation. Parse and validate specs, detect breaking changes, generate code samples, and lint for best practices.

tracing-schema-generator

509
from a5c-ai/babysitter

Generate distributed tracing schemas for OpenTelemetry with Jaeger/Zipkin integration

openapi-validator

509
from a5c-ai/babysitter

Validate OpenAPI specifications for correctness, security, and best practices

metrics-schema-generator

509
from a5c-ai/babysitter

Generate metrics schemas for Prometheus, OpenTelemetry, and Grafana dashboards

log-schema-generator

509
from a5c-ai/babysitter

Generate structured logging schemas with correlation ID patterns and ELK/Splunk integration

load-test-generator

509
from a5c-ai/babysitter

Generate load test scripts for k6, Locust, and Gatling from OpenAPI specs

graphql-schema-generator

509
from a5c-ai/babysitter

Generate GraphQL schemas from data models with resolver stubs and federation support

docs-site-generator

509
from a5c-ai/babysitter

Generate documentation sites using Docusaurus, MkDocs, or VuePress

dependency-graph-generator

509
from a5c-ai/babysitter

Generate module dependency graphs with circular dependency detection and coupling metrics

dashboard-generator

509
from a5c-ai/babysitter

Generate monitoring dashboards for Grafana and DataDog with alert integration