Install
openclaw skills install openapi-validatorValidate and improve OpenAPI/Swagger specifications — check for completeness, consistency, security definitions, and API design best practices.
openclaw skills install openapi-validatorValidate and improve OpenAPI 3.x specifications for completeness, consistency, security definitions, and API design best practices. Checks endpoint coverage, schema quality, authentication setup, response consistency, and generates improvement recommendations.
"Validate my OpenAPI spec"
"Check my Swagger file for issues"
"Improve my API specification"
"Audit API design for REST best practices"
# Find OpenAPI/Swagger files
find . -name "openapi.*" -o -name "swagger.*" -o -name "api-spec.*" | head -10
# Check spec version
python3 -c "
import yaml, json, sys
for f in ['openapi.yaml', 'openapi.json', 'swagger.yaml', 'swagger.json']:
try:
with open(f) as fh:
d = yaml.safe_load(fh) if f.endswith('.yaml') else json.load(fh)
print(f'{f}: {d.get(\"openapi\", d.get(\"swagger\", \"unknown\"))}')
except: pass
"
Endpoint coverage:
Schema quality:
REST conventions:
/users/{id} not /getUser)/users not /user)Response consistency:
## OpenAPI Specification Audit
**File:** openapi.yaml | **Version:** 3.1.0 | **API:** v2.1.0
**Endpoints:** 23 | **Schemas:** 15
### Completeness Score: 72/100
| Category | Score | Issues |
|----------|-------|--------|
| Paths | 85% | 3 missing descriptions |
| Parameters | 70% | 8 undocumented params |
| Responses | 65% | 12 missing error codes |
| Schemas | 80% | 5 incomplete schemas |
| Security | 60% | 4 unprotected endpoints |
| Examples | 40% | 14 missing examples |
### 🔴 Critical (2)
1. **4 endpoints without security** — POST /webhooks, GET /health,
GET /api/internal/stats, DELETE /api/cache
→ Apply security scheme or explicitly mark as public
2. **Sensitive data in query param** — GET /api/users?api_key={key}
→ Move to Authorization header
### 🟡 Improvements (6)
3. No error response schema defined (each endpoint ad-hoc)
4. Inconsistent naming: `user_id` vs `userId` across endpoints
5. Missing pagination on GET /api/orders (returns unbounded list)
6. No rate limit documentation
7. 3 deprecated endpoints without sunset date
8. Missing Content-Type requirements on POST/PUT endpoints
### ✅ Good Practices
- Consistent use of semver in API version
- OAuth2 security scheme properly defined
- Request validation schemas thorough
- Proper use of components/schemas for reuse