Agent skill
openapi-generator
Generate OpenAPI specifications from code or legacy APIs with schema inference and documentation
Install this agent skill to your Project
npx add-skill https://github.com/a5c-ai/babysitter/tree/main/library/specializations/code-migration-modernization/skills/openapi-generator
SKILL.md
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
{
"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 discoveryapi-compatibility-analyzer: Version comparison
Related Agents
api-modernization-architect: API designdocumentation-migration-agent: Doc generation
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
gsd-tools
Central utility skill for GSD operations. Provides config parsing, slug generation, timestamps, path operations, and orchestrates calls to other specialized skills. Acts as the unified entry point that the original gsd-tools.cjs provided via its lib/ modules (commands, config, core, init).
model-profile-resolution
Resolve model profile (quality/balanced/budget) at orchestration start and map agents to specific models. Enables cost/quality tradeoffs by selecting appropriate AI models for each agent role.
verification-suite
Plan structure validation, phase completeness checks, reference integrity verification, and artifact existence confirmation. Provides the structured verification layer ensuring GSD artifacts are well-formed and complete.
state-management
STATE.md reading, writing, and field-level updates. Provides cross-session state persistence via .planning/STATE.md with structured fields for current task, completed phases, blockers, decisions, and quick tasks.
git-integration
Git commit patterns, formats, and conventions for GSD methodology. Provides atomic commits per task, structured commit messages, planning file commits, branch management, and milestone tag operations.
frontmatter-parsing
YAML frontmatter parsing and manipulation for .planning/ documents. Provides read, write, update, query, and validation operations on frontmatter blocks in GSD markdown artifacts.
Didn't find tool you were looking for?