Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | ||||||
| 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| 9 | 10 | 11 | 12 | 13 | 14 | 15 |
| 16 | 17 | 18 | 19 | 20 | 21 | 22 |
| 23 | 24 | 25 | 26 | 27 | 28 | 29 |
| 30 |
Tags
- fetch
- Spring
- Test
- NextJS
- Java
- ubuntu
- svelte
- 오라클
- EUREKA
- post
- Shell
- d3js
- fastapi
- Vue
- springboot
- JUnit
- nodejs
- NextJS13
- style
- react
- vuex
- loguru
- sveltekit
- vitejs
- npm
- Logging
- InteliJ
- Vue3
- Python
- gradle
Archives
- Today
- Total
양군의 행복한 이야기
Fastapi.exceptions.ResponseValidationError: 본문

FastAPI와 sqlalchemy를 활용 하여 REST API로 요청에 대한 응답을 회신 중 Fastapi.exceptions.ResponseValidationError:
오류가 발생 하였다.
이유는 ORM에서 조회된 값을 response_model에 설정된 스키마로 변환중 오류가 발생된것이다.
해결 법은 스키마에 config를 설정해주면 된다.
class ResponseSchema(BaseModel):
id: int
username: str
email: str
class Config:
orm_mode = True