Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for model_config (0.11 sec)

  1. docs/en/docs/release-notes.md

    To achieve it, use Pydantic's `model_config = {"extra": "forbid"}`:
    
    ```python
    from typing import Annotated, Literal
    
    from fastapi import FastAPI, Query
    from pydantic import BaseModel, Field
    
    app = FastAPI()
    
    
    class FilterParams(BaseModel):
        model_config = {"extra": "forbid"}
    
        limit: int = Field(100, gt=0, le=100)
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Nov 01 11:25:57 UTC 2024
    - 460.3K bytes
    - Viewed (0)
Back to top