← スキル一覧に戻る

openapi-gen
by mindhiveoy
Python OpenAPI client generator
⭐ 5🍴 0📅 2026年1月22日
SKILL.md
name: openapi-gen description: Generate and validate Python clients from OpenAPI specs. Use for generation, validation, or troubleshooting. allowed-tools: Bash, Read, Glob, Grep
OpenAPI Client Generation
Workflow
- Activate:
source .venv/bin/activate - Generate:
pyopenapi-gen <spec> --project-root <path> --output-package <pkg> --force --verbose - Validate:
- Check warnings in output
- Test:
python -c "from <pkg> import *" - Type check:
mypy <path>/<pkg> --ignore-missing-imports
Options
| Option | Purpose |
|---|---|
--force | Overwrite existing files |
--no-postprocess | Skip Black/mypy (faster iteration) |
--core-package | Shared core for multi-client setups |
--verbose | Show detailed progress |
Common Issues
| Symptom | Fix |
|---|---|
| Import error | Check --project-root and --output-package alignment |
| Missing module | Check --verbose for cycle warnings |
| Type error | Review OpenAPI spec |
| Empty dataclass | Ensure schema has type field |
Multi-Client Setup
For shared core module:
# First client with core
pyopenapi-gen api1.yaml --project-root . --output-package clients.api1 --core-package clients.core
# Additional clients sharing core
pyopenapi-gen api2.yaml --project-root . --output-package clients.api2 --core-package clients.core
スコア
総合スコア
60/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です