视觉画布设计
canvas-design
基于设计原则创作静态视觉作品,用于海报与品牌图形。
openapi-spec-generation【文档与办公】This skill should be used when creating API documentation, generating SDKs, or ensuring API contract compliance. It generates and maintains OpenAPI 3.1 specifications.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Iron Law: Never generate an OpenAPI spec without running it through a validator; always produce machine-parseable YAML/JSON, not prose descriptions.
Generate, validate, and maintain OpenAPI 3.1 specifications for RESTful APIs. Supports design-first, code-first, and hybrid approaches across Java/Spring, Python/FastAPI, and TypeScript stacks.
Design-First:
reference/openapi-skeleton-template.md into openapi.yamlspectral lint openapi.yamlredocly preview-docs openapi.yamlCode-First:
| Stack | Command |
|---|---|
| FastAPI | python -c "import json; from main import app; print(json.dumps(app.openapi(), indent=2))" > openapi.json |
| Spring Boot | curl http://localhost:8080/v3/api-docs > openapi.json |
| tsoa | npx tsoa spec |
| Approach | When to Use | Reference |
|---|---|---|
| Design-First | New APIs, contracts, external consumers | reference/openapi-skeleton-template.md |
| Code-First | Existing APIs, rapid iteration | reference/code-first-patterns.md |
| Hybrid | Evolving APIs, keep spec in sync | Both references above |
Design-first -- Read reference/openapi-skeleton-template.md for the starter template. Copy the minimal skeleton, then customize paths, schemas, and security for the domain.
Code-first -- Read reference/code-first-patterns.md for annotated examples in:
Read reference/complete-api-example.md for a full User Management API spec demonstrating all features: CRUD paths, pagination, filtering, error responses, rate limiting headers, security schemes, and reusable components.
Read reference/validation-and-linting.md for:
.spectral.yaml)Read reference/developer-guide-patterns.md for:
Read reference/sdk-and-cicd.md for:
| File | Content | Size |
|---|---|---|
reference/openapi-skeleton-template.md | Minimal starter skeleton, structure overview, customization checklist | ~5KB |
reference/code-first-patterns.md | Java/Spring, Python/FastAPI, TypeScript/tsoa annotated examples | ~10KB |
reference/validation-and-linting.md | Spectral rules, Redocly config, validation commands, common mistakes and best practices | ~5KB |
reference/sdk-and-cicd.md | SDK generation commands, GitHub Actions workflows | ~5KB |
reference/complete-api-example.md | Full User Management API with all OpenAPI features | ~10KB |
reference/developer-guide-patterns.md | 9-section doc structure, auth flow template, multi-language code examples (Java WebFlux / Python FastAPI / TypeScript NestJS), error handling reference, 4 common pitfalls | ~8KB |
Schema validation failures: Run the spec through an OpenAPI validator before committing. Fix all $ref resolution errors first.
Breaking changes detected: When modifying existing endpoints, check for removed fields, changed types, or new required parameters. Document breaking changes in the spec description.