Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 41 for uniqBy (0.17 sec)

  1. tests/test_tutorial/test_path_operation_configurations/test_tutorial005_py39.py

                        "operationId": "create_item_items__post",
                        "requestBody": {
                            "content": {
                                "application/json": {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Sep 28 04:14:40 GMT 2023
    - 8.9K bytes
    - Viewed (0)
  2. fastapi/routing.py

            if isinstance(generate_unique_id_function, DefaultPlaceholder):
                current_generate_unique_id: Callable[
                    ["APIRoute"], str
                ] = generate_unique_id_function.value
            else:
                current_generate_unique_id = generate_unique_id_function
            self.unique_id = self.operation_id or current_generate_unique_id(self)
            # normalize enums e.g. http.HTTPStatus
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 170.1K bytes
    - Viewed (0)
  3. docs_src/generate_clients/tutorial003_py39.py

    from fastapi import FastAPI
    from fastapi.routing import APIRoute
    from pydantic import BaseModel
    
    
    def custom_generate_unique_id(route: APIRoute):
        return f"{route.tags[0]}-{route.name}"
    
    
    app = FastAPI(generate_unique_id_function=custom_generate_unique_id)
    
    
    class Item(BaseModel):
        name: str
        price: float
    
    
    class ResponseMessage(BaseModel):
        message: str
    
    
    class User(BaseModel):
        username: str
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 04 22:02:18 GMT 2022
    - 914 bytes
    - Viewed (0)
  4. docs/de/docs/tutorial/extra-data-types.md

    ## Andere Datentypen
    
    Hier sind einige der zusätzlichen Datentypen, die Sie verwenden können:
    
    * `UUID`:
        * Ein standardmäßiger „universell eindeutiger Bezeichner“ („Universally Unique Identifier“), der in vielen Datenbanken und Systemen als ID üblich ist.
        * Wird in Requests und Responses als `str` dargestellt.
    * `datetime.datetime`:
        * Ein Python-`datetime.datetime`.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 18:08:55 GMT 2024
    - 4.4K bytes
    - Viewed (0)
  5. docs_src/sql_databases/sql_app_py310/models.py

    from sqlalchemy.orm import relationship
    
    from .database import Base
    
    
    class User(Base):
        __tablename__ = "users"
    
        id = Column(Integer, primary_key=True)
        email = Column(String, unique=True, index=True)
        hashed_password = Column(String)
        is_active = Column(Boolean, default=True)
    
        items = relationship("Item", back_populates="owner")
    
    
    class Item(Base):
        __tablename__ = "items"
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Jan 09 14:35:33 GMT 2024
    - 710 bytes
    - Viewed (0)
  6. tests/test_tutorial/test_path_operation_configurations/test_tutorial005.py

                        "operationId": "create_item_items__post",
                        "requestBody": {
                            "content": {
                                "application/json": {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Sep 28 04:14:40 GMT 2023
    - 8.7K bytes
    - Viewed (0)
  7. docs/zh/docs/advanced/generate-clients.md

    ### 自定义生成唯一ID函数
    
    FastAPI为每个*路径操作*使用一个**唯一ID**,它用于**操作ID**,也用于任何所需自定义模型的名称,用于请求或响应。
    
    你可以自定义该函数。它接受一个 `APIRoute` 对象作为输入,并输出一个字符串。
    
    例如,以下是一个示例,它使用第一个标签(你可能只有一个标签)和*路径操作*名称(函数名)。
    
    然后,你可以将这个自定义函数作为 `generate_unique_id_function` 参数传递给 **FastAPI**:
    
    === "Python 3.9+"
    
        ```Python hl_lines="6-7  10"
        {!> ../../../docs_src/generate_clients/tutorial003_py39.py!}
        ```
    
    === "Python 3.8+"
    
    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)
  8. docs/en/docs/advanced/path-operation-advanced-configuration.md

        If you are not an "expert" in OpenAPI, you probably don't need this.
    
    You can set the OpenAPI `operationId` to be used in your *path operation* with the parameter `operation_id`.
    
    You would have to make sure that it is unique for each operation.
    
    ```Python hl_lines="6"
    {!../../../docs_src/path_operation_advanced_configuration/tutorial001.py!}
    ```
    
    ### Using the *path operation function* name as the operationId
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  9. fastapi/openapi/utils.py

        operation["summary"] = generate_operation_summary(route=route, method=method)
        if route.description:
            operation["description"] = route.description
        operation_id = route.operation_id or route.unique_id
        if operation_id in operation_ids:
            message = (
                f"Duplicate Operation ID {operation_id} for function "
                + f"{route.endpoint.__name__}"
            )
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 21.8K bytes
    - Viewed (0)
  10. fastapi/dependencies/utils.py

            check_file_field(first_param)
            return first_param
        # If one field requires to embed, all have to be embedded
        # in case a sub-dependency is evaluated with a single unique body field
        # That is combined (embedded) with other body fields
        for param in flat_dependant.body_params:
            setattr(param.field_info, "embed", True)  # noqa: B010
        model_name = "Body_" + name
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:52:56 GMT 2024
    - 29.5K bytes
    - Viewed (0)
Back to top