REST naming and HTTP methods
RFC 9110 URI and method rules checked by ADP-001 to ADP-007.
Automated naming and method rules
Enforced directly on OpenAPI paths, request bodies, and status codes.
| Rule | Principle | Bad pattern | Good pattern | Standard |
|---|---|---|---|---|
ADP-001 | Plural resource nouns, no CRUD verbs | GET /v1/getUsers | GET /v1/users | RFC 9110 §9 |
ADP-002 | Lowercase kebab-case path segments | /v1/paymentMethods | /v1/payment-methods | RFC 3986 / AIP-122 |
ADP-003 | No trailing slashes | /v1/orders/ | /v1/orders | HTTP Cache Keys |
ADP-005 | GET/HEAD must never have requestBody | GET /v1/orders + JSON body | GET /v1/orders?status=paid | RFC 9110 §9.3.1 |
ADP-006 | DELETE returns 204/202, no required body | DELETE + required body | DELETE /v1/orders/{id} (204) | RFC 9110 §9.3.5 |
ADP-007 | POST creation returns 201 + Location | POST /v1/orders (200) | 201 Created + Location | RFC 9110 §15.3.2 |
ADP-020 | PATCH for partial updates + ETag/If-Match | Unconditional PUT | PATCH (application/merge-patch+json) | RFC 7396 / RFC 9110 |
Validate endpoints in CI
Run python3 api_validator.py --spec openapi.json or test a spec in the Interactive OpenAPI Validator.