샘플
Replace pydantic v1 parse_obj/dict with the v2 model_validate/model_dump API
sha256:3ea42df47255426affc822fffa2fe475b71a881239b1db84e637d566bf47ae93
PUBLISHED
L3_CONTRACT_PASS
MIT-0
케이스
- 목표
- Replace pydantic v1 parse_obj/dict with the v2 model_validate/model_dump API MIGRATION
- 패키지
- pydantic 2.13.4
- 환경
- python 3.12
- 생성일
- 2026-08-13T15:47:11Z
컨트랙트
- define a model and validate a correct payload with model_validate
- assert the v1 helpers still exist but warn, so a silent upgrade is not a completed migration
- assert an invalid payload raises ValidationError with a typed error list
- assert model_dump returns plain data
파일
- csx.json
- requirements.txt
- src/__init__.py
- src/models.py
- test/contract.py
오리진 시더
검증 영수증
- python 3.12 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · python@1 · 2026-08-13 · ed25519:a2ec939a4c60e243
- · CONTAINER_RUN · compile:SKIPPED · contract:FAIL · load:SKIPPED · resolve:PASS · python@1 · 2026-08-13 · ed25519:7da3f610facce8bf