Async 면 202 가진 action endpoint POST /items/{id}/publish 추가.
Async job 패턴 추가: POST /items/jobs 가 202 + Location, GET /items/jobs/{job_id} 가 status 보고.
CORS middleware, correlation-id middleware, custom error envelope 추가.
WWW-Authenticate 가진 401 가지고 FastAPI HTTPBearer dependency 통해 Bearer auth 추가.
slowapi rate limit (IP 당 10/분) 추가. Deprecated /v1/items route 에 Sunset header 추가.
끝나면 Python 200-300 줄로 교과서-깔끔한 REST service ship. 이 퀘스트 모든 트랙 운동.
품질 bar
Endpoint 동작; 이제 polish 체크:
curl -v 로 각 endpoint 치기; status code 가 spec 매칭하는지 검증.
Idempotency-Key 가진 같은 POST 두 번 보내; item 하나만 생성되는지 검증.
Stale ETag vs current 가진 conditional GET 발신; 200 vs 304 검증.
Stale If-Match 가진 PUT; 412 검증.
Malformed body 보내; error envelope 에 code, message, request_id 있는지 검증.
/docs 방문; Swagger UI 가 type 가진 모든 endpoint 보여주는지 검증.
Rate limit 치기; Retry-After header 있는지 검증.
Deprecated route 치기; Sunset header 검증.
모든 "검증" 이 "yes, protocol 이 내가 생각하는 거 함" 의 순간. 그게 빌드하는 muscle memory.
Capstone 이 project 아냐; 반사 builder. 한 service 에 Location, ETag, If-Match, 412, correlation ID, error envelope, OpenAPI, Sunset header 연결 한 번 하면 다 명백 됨. 다음에 REST API 만들 때 tutorial 안 잡음 — byte 의도적 shape.
대담한 사람 위한 확장
기본 spec 너머 optional 야망:
Opaque token 대신 JWT 추가. PyJWT 로 검증; algorithm 핀; claim (sub, exp) 포함.
SSE endpoint 추가 일어나면 create stream.
WebSocket endpoint 추가 양방향 collaborative 편집.
In-memory 대신 Idempotency-Key 위한 dedupe store 로 Redis 추가.
OpenTelemetry traceparent 전파 추가 분산 tracing.
OpenAPI spec 에서 TypeScript SDK 생성; 작은 React frontend 에서 사용.
각 확장이 트랙 더 깊이 운동. 어느 것도 capstone 에 필수 아님; 다 잘 밟힌 영토.
Cheat sheet 로 cwkPippa
어느 부분 만들다 막히면 cwkPippa source 가 worked 예. FastAPI middleware 순서 막힘? backend/main.py 봐. Streaming response 막힘? backend/adapters/claude.py 봐. Healing / idempotency 막힘? backend/store/conversations.py 봐. Specific 질문 있을 때 동작 코드 읽기가 tutorial 읽기 이김. cwkPippa 가 너 거 베끼라고.
FastAPI 에 capstone /items service 빌드. Curl -v 로 모든 endpoint 치기; 각 status code, 각 header (ETag, Location, Cache-Control, Vary, Retry-After, Sunset, X-Request-ID, WWW-Authenticate) 검증. 보너스: 각 endpoint 운동하고 response shape 에 assert 하는 작은 test suite 써 — 미래 변경 위한 regression net 됨. 트리플 보너스: OpenAPI spec 에서 TypeScript SDK 생성하고 그거 end-to-end 쓰는 작은 client script 써.
Hint
코드 블록 의 FastAPI scaffold 로 시작; 점진 확장 (한 번에 모든 거 쓰려 마). 다음 추가 전 curl 로 각 조각 검증. Test suite 이 spec 이 그냥 문서 아닌 — 언제든 재실행 가능한 assertion 이었다 가르쳐. TypeScript SDK 데모가 loop 닫음: OpenAPI spec 하나 → typed client → 동작 앱.
Progress
Progress is local-only — sign in to sync across devices.