Upgrading fastapi 0.18 to 0.19
Breaking0.18.0 → 0.19.0Breaking1New1
BreakingUpgrade verdict
1 breaking change.
In plain terms
- Rename path operation decorator parameter content_type to response_class.
Must act 1 item needs code or config changes
What you must change
Breaking1
Rename path operation decorator parameter content_type to response_class.
content_typeresponse_classAPI changes
Generated by DepDelta from published Python source. Not mixed with prose notes.
- changed:
method FastAPI.add_api_route(path: str, endpoint: Callable, *, response_model: Type[BaseModel]=…, status_code: int=…, tags: List[str]=…, summary: str=…, description: str=…, response_description: str=…, responses: Dict[Union[int, str], Dict[str, Any]]=…, deprecated: bool=…, methods: List[str]=…, operation_id: str=…, include_in_schema: bool=…, content_type: Type[Response]=…, name: str=…) -> None → method FastAPI.add_api_route(path: str, endpoint: Callable, *, response_model: Type[BaseModel]=…, status_code: int=…, tags: List[str]=…, summary: str=…, description: str=…, response_description: str=…, responses: Dict[Union[int, str], Dict[str, Any]]=…, deprecated: bool=…, methods: List[str]=…, operation_id: str=…, include_in_schema: bool=…, response_class: Type[Response]=…, name: str=…) -> None - changed:
method FastAPI.api_route(path: str, *, response_model: Type[BaseModel]=…, status_code: int=…, tags: List[str]=…, summary: str=…, description: str=…, response_description: str=…, responses: Dict[Union[int, str], Dict[str, Any]]=…, deprecated: bool=…, methods: List[str]=…, operation_id: str=…, include_in_schema: bool=…, content_type: Type[Response]=…, name: str=…) -> Callable → method FastAPI.api_route(path: str, *, response_model: Type[BaseModel]=…, status_code: int=…, tags: List[str]=…, summary: str=…, description: str=…, response_description: str=…, responses: Dict[Union[int, str], Dict[str, Any]]=…, deprecated: bool=…, methods: List[str]=…, operation_id: str=…, include_in_schema: bool=…, response_class: Type[Response]=…, name: str=…) -> Callable - changed:
method FastAPI.delete(path: str, *, response_model: Type[BaseModel]=…, status_code: int=…, tags: List[str]=…, summary: str=…, description: str=…, response_description: str=…, responses: Dict[Union[int, str], Dict[str, Any]]=…, deprecated: bool=…, operation_id: str=…, include_in_schema: bool=…, content_type: Type[Response]=…, name: str=…) -> Callable → method FastAPI.delete(path: str, *, response_model: Type[BaseModel]=…, status_code: int=…, tags: List[str]=…, summary: str=…, description: str=…, response_description: str=…, responses: Dict[Union[int, str], Dict[str, Any]]=…, deprecated: bool=…, operation_id: str=…, include_in_schema: bool=…, response_class: Type[Response]=…, name: str=…) -> Callable - changed:
method FastAPI.get(path: str, *, response_model: Type[BaseModel]=…, status_code: int=…, tags: List[str]=…, summary: str=…, description: str=…, response_description: str=…, responses: Dict[Union[int, str], Dict[str, Any]]=…, deprecated: bool=…, operation_id: str=…, include_in_schema: bool=…, content_type: Type[Response]=…, name: str=…) -> Callable → method FastAPI.get(path: str, *, response_model: Type[BaseModel]=…, status_code: int=…, tags: List[str]=…, summary: str=…, description: str=…, response_description: str=…, responses: Dict[Union[int, str], Dict[str, Any]]=…, deprecated: bool=…, operation_id: str=…, include_in_schema: bool=…, response_class: Type[Response]=…, name: str=…) -> Callable - changed:
method FastAPI.head(path: str, *, response_model: Type[BaseModel]=…, status_code: int=…, tags: List[str]=…, summary: str=…, description: str=…, response_description: str=…, responses: Dict[Union[int, str], Dict[str, Any]]=…, deprecated: bool=…, operation_id: str=…, include_in_schema: bool=…, content_type: Type[Response]=…, name: str=…) -> Callable → method FastAPI.head(path: str, *, response_model: Type[BaseModel]=…, status_code: int=…, tags: List[str]=…, summary: str=…, description: str=…, response_description: str=…, responses: Dict[Union[int, str], Dict[str, Any]]=…, deprecated: bool=…, operation_id: str=…, include_in_schema: bool=…, response_class: Type[Response]=…, name: str=…) -> Callable - changed:
method FastAPI.options(path: str, *, response_model: Type[BaseModel]=…, status_code: int=…, tags: List[str]=…, summary: str=…, description: str=…, response_description: str=…, responses: Dict[Union[int, str], Dict[str, Any]]=…, deprecated: bool=…, operation_id: str=…, include_in_schema: bool=…, content_type: Type[Response]=…, name: str=…) -> Callable → method FastAPI.options(path: str, *, response_model: Type[BaseModel]=…, status_code: int=…, tags: List[str]=…, summary: str=…, description: str=…, response_description: str=…, responses: Dict[Union[int, str], Dict[str, Any]]=…, deprecated: bool=…, operation_id: str=…, include_in_schema: bool=…, response_class: Type[Response]=…, name: str=…) -> Callable - changed:
method FastAPI.patch(path: str, *, response_model: Type[BaseModel]=…, status_code: int=…, tags: List[str]=…, summary: str=…, description: str=…, response_description: str=…, responses: Dict[Union[int, str], Dict[str, Any]]=…, deprecated: bool=…, operation_id: str=…, include_in_schema: bool=…, content_type: Type[Response]=…, name: str=…) -> Callable → method FastAPI.patch(path: str, *, response_model: Type[BaseModel]=…, status_code: int=…, tags: List[str]=…, summary: str=…, description: str=…, response_description: str=…, responses: Dict[Union[int, str], Dict[str, Any]]=…, deprecated: bool=…, operation_id: str=…, include_in_schema: bool=…, response_class: Type[Response]=…, name: str=…) -> Callable - changed:
method FastAPI.post(path: str, *, response_model: Type[BaseModel]=…, status_code: int=…, tags: List[str]=…, summary: str=…, description: str=…, response_description: str=…, responses: Dict[Union[int, str], Dict[str, Any]]=…, deprecated: bool=…, operation_id: str=…, include_in_schema: bool=…, content_type: Type[Response]=…, name: str=…) -> Callable → method FastAPI.post(path: str, *, response_model: Type[BaseModel]=…, status_code: int=…, tags: List[str]=…, summary: str=…, description: str=…, response_description: str=…, responses: Dict[Union[int, str], Dict[str, Any]]=…, deprecated: bool=…, operation_id: str=…, include_in_schema: bool=…, response_class: Type[Response]=…, name: str=…) -> Callable - changed:
method FastAPI.put(path: str, *, response_model: Type[BaseModel]=…, status_code: int=…, tags: List[str]=…, summary: str=…, description: str=…, response_description: str=…, responses: Dict[Union[int, str], Dict[str, Any]]=…, deprecated: bool=…, operation_id: str=…, include_in_schema: bool=…, content_type: Type[Response]=…, name: str=…) -> Callable → method FastAPI.put(path: str, *, response_model: Type[BaseModel]=…, status_code: int=…, tags: List[str]=…, summary: str=…, description: str=…, response_description: str=…, responses: Dict[Union[int, str], Dict[str, Any]]=…, deprecated: bool=…, operation_id: str=…, include_in_schema: bool=…, response_class: Type[Response]=…, name: str=…) -> Callable - changed:
method FastAPI.trace(path: str, *, response_model: Type[BaseModel]=…, status_code: int=…, tags: List[str]=…, summary: str=…, description: str=…, response_description: str=…, responses: Dict[Union[int, str], Dict[str, Any]]=…, deprecated: bool=…, operation_id: str=…, include_in_schema: bool=…, content_type: Type[Response]=…, name: str=…) -> Callable → method FastAPI.trace(path: str, *, response_model: Type[BaseModel]=…, status_code: int=…, tags: List[str]=…, summary: str=…, description: str=…, response_description: str=…, responses: Dict[Union[int, str], Dict[str, Any]]=…, deprecated: bool=…, operation_id: str=…, include_in_schema: bool=…, response_class: Type[Response]=…, name: str=…) -> Callable
- changed:
constructor APIRoute(path: str, endpoint: Callable, *, response_model: Type[BaseModel]=…, status_code: int=…, tags: List[str]=…, summary: str=…, description: str=…, response_description: str=…, responses: Dict[Union[int, str], Dict[str, Any]]=…, deprecated: bool=…, name: str=…, methods: List[str]=…, operation_id: str=…, include_in_schema: bool=…, content_type: Type[Response]=…) -> None → constructor APIRoute(path: str, endpoint: Callable, *, response_model: Type[BaseModel]=…, status_code: int=…, tags: List[str]=…, summary: str=…, description: str=…, response_description: str=…, responses: Dict[Union[int, str], Dict[str, Any]]=…, deprecated: bool=…, name: str=…, methods: List[str]=…, operation_id: str=…, include_in_schema: bool=…, response_class: Type[Response]=…) -> None - changed:
function get_app(dependant: Dependant, body_field: Field=…, status_code: int=…, content_type: Type[Response]=…, response_field: Field=…) -> Callable → function get_app(dependant: Dependant, body_field: Field=…, status_code: int=…, response_class: Type[Response]=…, response_field: Field=…) -> Callable - changed:
method APIRouter.add_api_route(path: str, endpoint: Callable, *, response_model: Type[BaseModel]=…, status_code: int=…, tags: List[str]=…, summary: str=…, description: str=…, response_description: str=…, responses: Dict[Union[int, str], Dict[str, Any]]=…, deprecated: bool=…, methods: List[str]=…, operation_id: str=…, include_in_schema: bool=…, content_type: Type[Response]=…, name: str=…) -> None → method APIRouter.add_api_route(path: str, endpoint: Callable, *, response_model: Type[BaseModel]=…, status_code: int=…, tags: List[str]=…, summary: str=…, description: str=…, response_description: str=…, responses: Dict[Union[int, str], Dict[str, Any]]=…, deprecated: bool=…, methods: List[str]=…, operation_id: str=…, include_in_schema: bool=…, response_class: Type[Response]=…, name: str=…) -> None - changed:
method APIRouter.api_route(path: str, *, response_model: Type[BaseModel]=…, status_code: int=…, tags: List[str]=…, summary: str=…, description: str=…, response_description: str=…, responses: Dict[Union[int, str], Dict[str, Any]]=…, deprecated: bool=…, methods: List[str]=…, operation_id: str=…, include_in_schema: bool=…, content_type: Type[Response]=…, name: str=…) -> Callable → method APIRouter.api_route(path: str, *, response_model: Type[BaseModel]=…, status_code: int=…, tags: List[str]=…, summary: str=…, description: str=…, response_description: str=…, responses: Dict[Union[int, str], Dict[str, Any]]=…, deprecated: bool=…, methods: List[str]=…, operation_id: str=…, include_in_schema: bool=…, response_class: Type[Response]=…, name: str=…) -> Callable - changed:
method APIRouter.delete(path: str, *, response_model: Type[BaseModel]=…, status_code: int=…, tags: List[str]=…, summary: str=…, description: str=…, response_description: str=…, responses: Dict[Union[int, str], Dict[str, Any]]=…, deprecated: bool=…, operation_id: str=…, include_in_schema: bool=…, content_type: Type[Response]=…, name: str=…) -> Callable → method APIRouter.delete(path: str, *, response_model: Type[BaseModel]=…, status_code: int=…, tags: List[str]=…, summary: str=…, description: str=…, response_description: str=…, responses: Dict[Union[int, str], Dict[str, Any]]=…, deprecated: bool=…, operation_id: str=…, include_in_schema: bool=…, response_class: Type[Response]=…, name: str=…) -> Callable - changed:
method APIRouter.get(path: str, *, response_model: Type[BaseModel]=…, status_code: int=…, tags: List[str]=…, summary: str=…, description: str=…, response_description: str=…, responses: Dict[Union[int, str], Dict[str, Any]]=…, deprecated: bool=…, operation_id: str=…, include_in_schema: bool=…, content_type: Type[Response]=…, name: str=…) -> Callable → method APIRouter.get(path: str, *, response_model: Type[BaseModel]=…, status_code: int=…, tags: List[str]=…, summary: str=…, description: str=…, response_description: str=…, responses: Dict[Union[int, str], Dict[str, Any]]=…, deprecated: bool=…, operation_id: str=…, include_in_schema: bool=…, response_class: Type[Response]=…, name: str=…) -> Callable - changed:
method APIRouter.head(path: str, *, response_model: Type[BaseModel]=…, status_code: int=…, tags: List[str]=…, summary: str=…, description: str=…, response_description: str=…, responses: Dict[Union[int, str], Dict[str, Any]]=…, deprecated: bool=…, operation_id: str=…, include_in_schema: bool=…, content_type: Type[Response]=…, name: str=…) -> Callable → method APIRouter.head(path: str, *, response_model: Type[BaseModel]=…, status_code: int=…, tags: List[str]=…, summary: str=…, description: str=…, response_description: str=…, responses: Dict[Union[int, str], Dict[str, Any]]=…, deprecated: bool=…, operation_id: str=…, include_in_schema: bool=…, response_class: Type[Response]=…, name: str=…) -> Callable - changed:
method APIRouter.options(path: str, *, response_model: Type[BaseModel]=…, status_code: int=…, tags: List[str]=…, summary: str=…, description: str=…, response_description: str=…, responses: Dict[Union[int, str], Dict[str, Any]]=…, deprecated: bool=…, operation_id: str=…, include_in_schema: bool=…, content_type: Type[Response]=…, name: str=…) -> Callable → method APIRouter.options(path: str, *, response_model: Type[BaseModel]=…, status_code: int=…, tags: List[str]=…, summary: str=…, description: str=…, response_description: str=…, responses: Dict[Union[int, str], Dict[str, Any]]=…, deprecated: bool=…, operation_id: str=…, include_in_schema: bool=…, response_class: Type[Response]=…, name: str=…) -> Callable - changed:
method APIRouter.patch(path: str, *, response_model: Type[BaseModel]=…, status_code: int=…, tags: List[str]=…, summary: str=…, description: str=…, response_description: str=…, responses: Dict[Union[int, str], Dict[str, Any]]=…, deprecated: bool=…, operation_id: str=…, include_in_schema: bool=…, content_type: Type[Response]=…, name: str=…) -> Callable → method APIRouter.patch(path: str, *, response_model: Type[BaseModel]=…, status_code: int=…, tags: List[str]=…, summary: str=…, description: str=…, response_description: str=…, responses: Dict[Union[int, str], Dict[str, Any]]=…, deprecated: bool=…, operation_id: str=…, include_in_schema: bool=…, response_class: Type[Response]=…, name: str=…) -> Callable - changed:
method APIRouter.post(path: str, *, response_model: Type[BaseModel]=…, status_code: int=…, tags: List[str]=…, summary: str=…, description: str=…, response_description: str=…, responses: Dict[Union[int, str], Dict[str, Any]]=…, deprecated: bool=…, operation_id: str=…, include_in_schema: bool=…, content_type: Type[Response]=…, name: str=…) -> Callable → method APIRouter.post(path: str, *, response_model: Type[BaseModel]=…, status_code: int=…, tags: List[str]=…, summary: str=…, description: str=…, response_description: str=…, responses: Dict[Union[int, str], Dict[str, Any]]=…, deprecated: bool=…, operation_id: str=…, include_in_schema: bool=…, response_class: Type[Response]=…, name: str=…) -> Callable - changed:
method APIRouter.put(path: str, *, response_model: Type[BaseModel]=…, status_code: int=…, tags: List[str]=…, summary: str=…, description: str=…, response_description: str=…, responses: Dict[Union[int, str], Dict[str, Any]]=…, deprecated: bool=…, operation_id: str=…, include_in_schema: bool=…, content_type: Type[Response]=…, name: str=…) -> Callable → method APIRouter.put(path: str, *, response_model: Type[BaseModel]=…, status_code: int=…, tags: List[str]=…, summary: str=…, description: str=…, response_description: str=…, responses: Dict[Union[int, str], Dict[str, Any]]=…, deprecated: bool=…, operation_id: str=…, include_in_schema: bool=…, response_class: Type[Response]=…, name: str=…) -> Callable - changed:
method APIRouter.trace(path: str, *, response_model: Type[BaseModel]=…, status_code: int=…, tags: List[str]=…, summary: str=…, description: str=…, response_description: str=…, responses: Dict[Union[int, str], Dict[str, Any]]=…, deprecated: bool=…, operation_id: str=…, include_in_schema: bool=…, content_type: Type[Response]=…, name: str=…) -> Callable → method APIRouter.trace(path: str, *, response_model: Type[BaseModel]=…, status_code: int=…, tags: List[str]=…, summary: str=…, description: str=…, response_description: str=…, responses: Dict[Union[int, str], Dict[str, Any]]=…, deprecated: bool=…, operation_id: str=…, include_in_schema: bool=…, response_class: Type[Response]=…, name: str=…) -> Callable