api-contract-review

Solid

Review REST API contracts for HTTP semantics, versioning, backward compatibility, and response consistency. Use when user asks "review API", "check endpoints", "REST review", or before releasing API changes.

API & Backend 489 stars 88 forks Updated 3 months ago MIT

Install

View on GitHub

Quality Score: 86/100

Stars 20%
90
Recency 20%
50
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# API Contract Review Skill Audit REST API design for correctness, consistency, and compatibility. ## When to Use - User asks "review this API" / "check REST endpoints" - Before releasing API changes - Reviewing PR with controller changes - Checking backward compatibility --- ## Quick Reference: Common Issues | Issue | Symptom | Impact | |-------|---------|--------| | Wrong HTTP verb | POST for idempotent operation | Confusion, caching issues | | Missing versioning | `/users` instead of `/v1/users` | Breaking changes affect all clients | | Entity leak | JPA entity in response | Exposes internals, N+1 risk | | 200 with error | `{"status": 200, "error": "..."}` | Breaks error handling | | Inconsistent naming | `/getUsers` vs `/users` | Hard to learn API | --- ## HTTP Verb Semantics ### Verb Selection Guide | Verb | Use For | Idempotent | Safe | Request Body | |------|---------|------------|------|--------------| | GET | Retrieve resource | Yes | Yes | No | | POST | Create new resource | No | No | Yes | | PUT | Replace entire resource | Yes | No | Yes | | PATCH | Partial update | No* | No | Yes | | DELETE | Remove resource | Yes | No | Optional | *PATCH can be idempotent depending on implementation ### Common Mistakes ```java // ❌ POST for retrieval @PostMapping("/users/search") public List<User> searchUsers(@RequestBody SearchCriteria criteria) { } // ✅ GET with query params (or POST only if criteria is very complex) @GetMapping("/users") public List<User> searchUs...

Details

Author
decebals
Repository
decebals/claude-code-java
Created
3 months ago
Last Updated
3 months ago
Language
Shell
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category