Scoring Methodology & Criteria
APIForge splits API specification scoring into 7 empirical categories derived from REST design guidelines and OpenAPI standards:
| Category | Max Weight | Evaluation Rules |
|---|---|---|
| Path Naming | 20 points | Penalizes camelCase in paths, underscores, and verb-like segments (/getUsers). |
| HTTP Verb Usage | 20 points | Penalizes GET requests containing request bodies and actions embedded in paths. |
| Path Structure & Depth | 15 points | Evaluates URL segment nesting depth (penalizes paths deeper than 3 segments). |
| Consistency | 15 points | Detects duplicate method/path pairs and mixed singular vs plural collection tokens. |
| Versioning Prefixes | 10 points | Checks for explicit major version segments (e.g., /v1, /v2) across URL paths. |
| Error Handling Coverage | 10 points | Verifies declarations of 4xx and 5xx failure status codes and reusable error schemas. |
| Operation Documentation | 10 points | Calculates percentage of operations with non-empty summaries and descriptions. |
