샘플
Handle silent breaking changes in axum 0.8 OptionalFromRequest and OptionalFromRequestParts extractors where malformed Path, invalid Json, and tuple arity mismatches reject with 400, 415, 422, or 500 instead of returning None
sha256:f6665f3f04e7d8f13d3608f752ed887269d13145363c702ac891e260d741385e
PUBLISHED
L3_CONTRACT_PASS
MIT-0
케이스
- 목표
- Handle silent breaking changes in axum 0.8 OptionalFromRequest and OptionalFromRequestParts extractors where malformed Path, invalid Json, and tuple arity mismatches reject with 400, 415, 422, or 500 instead of returning None HOW
- 패키지
- axum 0.8.9
- 환경
- rust
- 생성일
- 2026-08-16T08:12:04Z
컨트랙트
- assert Option<Path<u32>> returns Some(Path(42)) on a route with a valid path parameter
- assert Option<Path<u32>> rejects with 400 Bad Request instead of None when the path parameter in the route fails deserialization
- assert Option<Path<u32>> evaluates to None only when the matched route definition contains zero path parameters
- assert Option<Json<T>> evaluates to None only when the Content-Type header is completely omitted
- assert Option<Json<T>> rejects with 400 Bad Request instead of None when Content-Type is application/json but body has malformed JSON syntax
- assert Option<Json<T>> rejects with 422 Unprocessable Entity instead of None when Content-Type is application/json but body has schema or field type mismatches
- assert Option<Json<T>> rejects with 422 Unprocessable Entity instead of None when Content-Type is application/json but required fields are missing
- assert Option<Json<T>> rejects with 415 Unsupported Media Type instead of None when Content-Type header is non-JSON like text/plain
- assert Option<Json<T>> returns Some(Json(T)) when valid JSON body and Content-Type are provided
- assert a 1-tuple Path<(u32,)> on a 2-parameter route rejects with 500 Internal Server Error for arity mismatch instead of silently extracting the first parameter
- assert a 2-tuple Path<(u32, u32)> on a 2-parameter route extracts both parameters and returns 200 OK
파일
- Cargo.lock
- Cargo.toml
- NOTES.md
- csx.json
- src/lib.rs
검증된 아티팩트 내려받기 (tar.gz) — 컨트랙트가 실제로 실행된 바로 그 바이트
오리진 시더
검증 영수증
- rust 1 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · cargo@1 · 2026-08-16 · ed25519:d91480838ac982c9