Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for use_route_names_as_operation_ids (0.29 sec)

  1. docs_src/path_operation_advanced_configuration/tutorial002.py

    from fastapi import FastAPI
    from fastapi.routing import APIRoute
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items():
        return [{"item_id": "Foo"}]
    
    
    def use_route_names_as_operation_ids(app: FastAPI) -> None:
        """
        Simplify operation IDs so that generated API clients have simpler function
        names.
    
        Should be called only after all routes have been added.
        """
        for route in app.routes:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 572 bytes
    - Viewed (0)
Back to top