Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for custom_openapi (0.16 sec)

  1. docs_src/extending_openapi/tutorial001.py

    from fastapi import FastAPI
    from fastapi.openapi.utils import get_openapi
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items():
        return [{"name": "Foo"}]
    
    
    def custom_openapi():
        if app.openapi_schema:
            return app.openapi_schema
        openapi_schema = get_openapi(
            title="Custom title",
            version="2.5.0",
            summary="This is a very custom OpenAPI schema",
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 737 bytes
    - Viewed (0)
  2. docs/de/docs/how-to/extending-openapi.md

    ```Python hl_lines="1  4  7-9"
    {!../../../docs_src/extending_openapi/tutorial001.py!}
    ```
    
    ### Das OpenAPI-Schema generieren
    
    Verwenden Sie dann dieselbe Hilfsfunktion, um das OpenAPI-Schema innerhalb einer `custom_openapi()`-Funktion zu generieren:
    
    ```Python hl_lines="2  15-21"
    {!../../../docs_src/extending_openapi/tutorial001.py!}
    ```
    
    ### Das OpenAPI-Schema รคndern
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Mar 14 16:44:05 UTC 2024
    - 3.7K bytes
    - Viewed (0)
  3. docs/em/docs/how-to/extending-openapi.md

    ### ๐Ÿ˜ **FastAPI**
    
    ๐Ÿฅ‡, โœ ๐ŸŒ ๐Ÿ‘† **FastAPI** ๐Ÿˆธ ๐Ÿ›Ž:
    
    ```Python hl_lines="1  4  7-9"
    {!../../../docs_src/extending_openapi/tutorial001.py!}
    ```
    
    ### ๐Ÿ— ๐Ÿ—„ ๐Ÿ”—
    
    โคด๏ธ, โš™๏ธ ๐ŸŽ ๐Ÿš™ ๐Ÿ”ข ๐Ÿ— ๐Ÿ—„ ๐Ÿ”—, ๐Ÿ”˜ `custom_openapi()` ๐Ÿ”ข:
    
    ```Python hl_lines="2  15-20"
    {!../../../docs_src/extending_openapi/tutorial001.py!}
    ```
    
    ### ๐Ÿ”€ ๐Ÿ—„ ๐Ÿ”—
    
    ๐Ÿ”œ ๐Ÿ‘† ๐Ÿ’ช ๐Ÿšฎ ๐Ÿ“„ โ†”, โŽ ๐Ÿ›ƒ `x-logo` `info` "๐ŸŽš" ๐Ÿ—„ ๐Ÿ”—:
    
    ```Python hl_lines="21-23"
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Aug 19 19:54:04 UTC 2023
    - 2.7K bytes
    - Viewed (0)
  4. docs/en/docs/how-to/extending-openapi.md

    ```Python hl_lines="1  4  7-9"
    {!../../../docs_src/extending_openapi/tutorial001.py!}
    ```
    
    ### Generate the OpenAPI schema
    
    Then, use the same utility function to generate the OpenAPI schema, inside a `custom_openapi()` function:
    
    ```Python hl_lines="2  15-21"
    {!../../../docs_src/extending_openapi/tutorial001.py!}
    ```
    
    ### Modify the OpenAPI schema
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Aug 19 19:54:04 UTC 2023
    - 3.2K bytes
    - Viewed (0)
Back to top