Skip to content

Commit 61c670e

Browse files
committed
fix time conversion (remove it) - in db, time is always passed as UTC
1 parent a4dd4d4 commit 61c670e

107 files changed

Lines changed: 24171 additions & 13 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# API Contract Review Skill
2+
3+
> Audit REST APIs for HTTP semantics, versioning, and consistency
4+
5+
## What It Does
6+
7+
Reviews REST API design for:
8+
- HTTP verb correctness (GET vs POST vs PUT vs PATCH)
9+
- API versioning strategy
10+
- Request/response structure (DTOs vs entities)
11+
- Status code usage (no 200 with error body)
12+
- Backward compatibility concerns
13+
14+
## When to Use
15+
16+
- "Review this API" / "Check REST endpoints"
17+
- Before releasing API changes
18+
- Reviewing controller PRs
19+
- Checking if API follows REST best practices
20+
21+
## Key Concepts
22+
23+
### Audit vs Template
24+
25+
| java-spring-boot-patterns | api-contract-review |
26+
|---------------------|---------------------|
27+
| How to write controllers | Review existing APIs |
28+
| Templates and examples | Checklist and anti-patterns |
29+
| Creating new code | Auditing existing code |
30+
31+
### Common Issues Caught
32+
33+
| Issue | Example |
34+
|-------|---------|
35+
| Wrong verb | POST for search instead of GET |
36+
| No versioning | `/users` instead of `/v1/users` |
37+
| Entity leak | JPA entity returned directly |
38+
| 200 with error | `{"status": "error"}` with HTTP 200 |
39+
| Breaking change | Required field added to request |
40+
41+
## Example Usage
42+
43+
```
44+
You: Review the API in UserController
45+
46+
Claude: [Checks HTTP verb usage]
47+
[Validates versioning]
48+
[Looks for entity leaks]
49+
[Reviews error handling]
50+
[Identifies breaking changes]
51+
```
52+
53+
## What It Checks
54+
55+
1. **HTTP Semantics** - Correct verb for operation
56+
2. **URL Design** - Versioning, naming conventions
57+
3. **Request Handling** - Validation, DTOs
58+
4. **Response Design** - DTOs, pagination, consistency
59+
5. **Error Handling** - Status codes, error format
60+
6. **Compatibility** - Breaking vs non-breaking changes
61+
62+
## Related Skills
63+
64+
- `java-spring-boot-patterns` - Templates for writing controllers (this skill audits them)
65+
- `java-security-audit` - Security aspects of APIs
66+
- `java-code-review` - General code review (this skill is API-specific)
67+
68+
## References
69+
70+
- [REST API Design Best Practices](https://restfulapi.net/)
71+
- [HTTP Status Codes](https://httpstatuses.com/)
72+
- [API Versioning](https://www.baeldung.com/rest-versioning)

0 commit comments

Comments
 (0)