Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 101 for generate (0.51 sec)

  1. docs/en/docs/advanced/generate-clients.md

        ```Python
        {!> ../../../docs_src/generate_clients/tutorial004.py!}
        ```
    
    === "Node.js"
    
        ```Javascript
        {!> ../../../docs_src/generate_clients/tutorial004.js!}
        ```
    
    With that, the operation IDs would be renamed from things like `items-get_items` to just `get_items`, that way the client generator can generate simpler method names.
    
    ### Generate a TypeScript Client with the Preprocessed OpenAPI
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  2. docs/de/docs/advanced/generate-clients.md

    Anschließend können Sie diese benutzerdefinierte Funktion als Parameter `generate_unique_id_function` an **FastAPI** übergeben:
    
    === "Python 3.9+"
    
        ```Python hl_lines="6-7  10"
        {!> ../../../docs_src/generate_clients/tutorial003_py39.py!}
        ```
    
    === "Python 3.8+"
    
        ```Python hl_lines="8-9  12"
        {!> ../../../docs_src/generate_clients/tutorial003.py!}
        ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Apr 03 03:42:11 GMT 2024
    - 12K bytes
    - Viewed (0)
  3. docs/em/docs/advanced/generate-clients.md

    frontend-app@1.0.0 generate-client /home/user/code/frontend-app
    > openapi-ts --input http://localhost:8000/openapi.json --output ./src/client --client axios
    ```
    
    </div>
    
    👈 📋 🔜 🏗 📟 `./src/client` &amp; 🔜 ⚙️ `axios` (🕸 🇺🇸🔍 🗃) 🔘.
    
    ### 🔄 👅 👩‍💻 📟
    
    🔜 👆 💪 🗄 &amp; ⚙️ 👩‍💻 📟, ⚫️ 💪 👀 💖 👉, 👀 👈 👆 🤚 ✍ 👩‍🔬:
    
    <img src="/img/tutorial/generate-clients/image02.png">
    
    👆 🔜 🤚 ✍ 🚀 📨:
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Apr 03 03:42:11 GMT 2024
    - 8.4K bytes
    - Viewed (0)
  4. docs/zh/docs/advanced/generate-clients.md

    frontend-app@1.0.0 generate-client /home/user/code/frontend-app
    > openapi-ts --input http://localhost:8000/openapi.json --output ./src/client --client axios
    ```
    
    </div>
    
    此命令将在 `./src/client` 中生成代码,并将在其内部使用 `axios`(前端HTTP库)。
    
    ### 尝试客户端代码
    
    现在您可以导入并使用客户端代码,它可能看起来像这样,请注意,您可以为这些方法使用自动补全:
    
    <img src="/img/tutorial/generate-clients/image02.png">
    
    您还将自动补全要发送的数据:
    
    <img src="/img/tutorial/generate-clients/image03.png">
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Apr 03 03:42:11 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  5. tests/test_generate_unique_id_function.py

    
    def test_app_path_operation_overrides_generate_unique_id():
        app = FastAPI(generate_unique_id_function=custom_generate_unique_id)
        router = APIRouter(generate_unique_id_function=custom_generate_unique_id2)
    
        @app.post(
            "/",
            response_model=List[Item],
            responses={404: {"model": List[Message]}},
            generate_unique_id_function=custom_generate_unique_id3,
        )
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Jan 13 15:10:26 GMT 2024
    - 66.7K bytes
    - Viewed (0)
  6. fastapi/utils.py

        new_field.populate_validators()  # type: ignore[attr-defined]
        return new_field
    
    
    def generate_operation_id_for_path(
        *, name: str, path: str, method: str
    ) -> str:  # pragma: nocover
        warnings.warn(
            "fastapi.utils.generate_operation_id_for_path() was deprecated, "
            "it is not used internally, and will be removed soon",
            DeprecationWarning,
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  7. docs/en/docs/alternatives.md

    And it generates OpenAPI schemas.
    
    That's how it works in Flask, Starlette, Responder, etc.
    
    But then, we have again the problem of having a micro-syntax, inside of a Python string (a big YAML).
    
    The editor can't help much with that. And if we modify parameters or Marshmallow schemas and forget to also modify that YAML docstring, the generated schema would be obsolete.
    
    !!! info
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 23.2K bytes
    - Viewed (0)
  8. fastapi/param_functions.py

                It will affect the generated OpenAPI (e.g. visible at `/docs`).
                """
            ),
        ] = None,
        include_in_schema: Annotated[
            bool,
            Doc(
                """
                To include (or not) this parameter field in the generated OpenAPI.
                You probably don't need it, but it's available.
    
                This affects the generated OpenAPI (e.g. visible at `/docs`).
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 62.5K bytes
    - Viewed (0)
  9. docs_src/dependencies/tutorial009.py

    
    async def dependency_a():
        dep_a = generate_dep_a()
        try:
            yield dep_a
        finally:
            dep_a.close()
    
    
    async def dependency_b(dep_a=Depends(dependency_a)):
        dep_b = generate_dep_b()
        try:
            yield dep_b
        finally:
            dep_b.close(dep_a)
    
    
    async def dependency_c(dep_b=Depends(dependency_b)):
        dep_c = generate_dep_c()
        try:
            yield dep_c
        finally:
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 455 bytes
    - Viewed (0)
  10. docs/en/docs/tutorial/middleware.md

    You can add code to be run with the `request`,  before any *path operation* receives it.
    
    And also after the `response` is generated, before returning it.
    
    For example, you could add a custom header `X-Process-Time` containing the time in seconds that it took to process the request and generate a response:
    
    ```Python hl_lines="10  12-13"
    {!../../../docs_src/middleware/tutorial001.py!}
    ```
    
    ## Other middlewares
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 16:31:18 GMT 2024
    - 2.9K bytes
    - Viewed (0)
Back to top