Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for find (0.12 sec)

  1. docs/de/docs/advanced/additional-responses.md

    ## Zusätzliche Response mit `model`
    
    Sie können Ihren *Pfadoperation-Dekoratoren* einen Parameter `responses` übergeben.
    
    Der nimmt ein `dict` entgegen, die Schlüssel sind Statuscodes für jede Response, wie etwa `200`, und die Werte sind andere `dict`s mit den Informationen für jede Response.
    
    Jedes dieser Response-`dict`s kann einen Schlüssel `model` haben, welcher ein Pydantic-Modell enthält, genau wie `response_model`.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:19:26 GMT 2024
    - 9.6K bytes
    - Viewed (0)
  2. docs/en/docs/advanced/additional-responses.md

    ```Python hl_lines="18  22"
    {!../../../docs_src/additional_responses/tutorial001.py!}
    ```
    
    !!! note
        Keep in mind that you have to return the `JSONResponse` directly.
    
    !!! info
        The `model` key is not part of OpenAPI.
    
        **FastAPI** will take the Pydantic model from there, generate the `JSON Schema`, and put it in the correct place.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 16:31:18 GMT 2024
    - 8.8K bytes
    - Viewed (0)
Back to top