Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 1 of 1 for achieves (0.06 seconds)

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

    #### Forbid Extra Query (Cookie, Header) Parameters
    
    Use Pydantic models to restrict extra values for `Query` parameters (also applies to `Header` and `Cookie` parameters).
    
    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()
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Apr 03 12:07:04 GMT 2026
    - 631K bytes
    - Click Count (0)
Back to Top