Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 181 - 190 of 374 for models3 (0.11 seconds)

  1. docs/zh-hant/docs/how-to/separate-openapi-schemas.md

    ### 文件中的輸入模型 { #input-model-in-docs }
    
    你可以在文件中確認,`description` 欄位沒有紅色星號,表示不是必填:
    
    <div class="screenshot">
    <img src="/img/tutorial/separate-openapi-schemas/image01.png">
    </div>
    
    ### 輸出用模型 { #model-for-output }
    
    但如果你把同一個模型用作輸出,如下所示:
    
    {* ../../docs_src/separate_openapi_schemas/tutorial001_py310.py hl[19] *}
    
    ...由於 `description` 有預設值,就算你沒有為該欄位回傳任何內容,它仍會有那個預設值。
    
    ### 輸出回應資料的模型 { #model-for-output-response-data }
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Feb 14 08:15:26 GMT 2026
    - 4.1K bytes
    - Click Count (0)
  2. docs/zh/docs/how-to/separate-openapi-schemas.md

    事实上,在某些情况下,对于同一个 Pydantic 模型,OpenAPI 中会根据是否带有**默认值**,为输入和输出分别生成**两个 JSON Schema**。
    
    我们来看看它如何工作,以及在需要时如何修改。
    
    ## 用于输入和输出的 Pydantic 模型 { #pydantic-models-for-input-and-output }
    
    假设你有一个带有默认值的 Pydantic 模型,例如:
    
    {* ../../docs_src/separate_openapi_schemas/tutorial001_py310.py ln[1:7] hl[7] *}
    
    ### 输入用的模型 { #model-for-input }
    
    如果你像下面这样把该模型用作输入:
    
    {* ../../docs_src/separate_openapi_schemas/tutorial001_py310.py ln[1:15] hl[14] *}
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Feb 13 13:37:57 GMT 2026
    - 4.3K bytes
    - Click Count (0)
  3. docs_src/events/tutorial003_py310.py

        return x * 42
    
    
    ml_models = {}
    
    
    @asynccontextmanager
    async def lifespan(app: FastAPI):
        # Load the ML model
        ml_models["answer_to_everything"] = fake_answer_to_everything_ml_model
        yield
        # Clean up the ML models and release the resources
        ml_models.clear()
    
    
    app = FastAPI(lifespan=lifespan)
    
    
    @app.get("/predict")
    async def predict(x: float):
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 569 bytes
    - Click Count (0)
  4. docs/uk/docs/how-to/separate-openapi-schemas.md

    Розгляньмо, як це працює, і як це змінити за потреби.
    
    ## Моделі Pydantic для введення та виведення { #pydantic-models-for-input-and-output }
    
    Припустімо, у вас є модель Pydantic зі значеннями за замовчуванням, наприклад:
    
    {* ../../docs_src/separate_openapi_schemas/tutorial001_py310.py ln[1:7] hl[7] *}
    
    ### Модель для введення { #model-for-input }
    
    Якщо ви використовуєте цю модель як введення, як тут:
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Feb 14 08:43:14 GMT 2026
    - 6.7K bytes
    - Click Count (0)
  5. tests/test_openapi_schema_type.py

    import pytest
    from fastapi.openapi.models import Schema, SchemaType
    
    
    @pytest.mark.parametrize(
        "type_value",
        [
            "array",
            ["string", "null"],
            None,
        ],
    )
    def test_allowed_schema_type(
        type_value: SchemaType | list[SchemaType] | None,
    ) -> None:
        """Test that Schema accepts SchemaType, List[SchemaType] and None for type field."""
        schema = Schema(type=type_value)
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Feb 17 09:59:14 GMT 2026
    - 685 bytes
    - Click Count (0)
  6. build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/DockerBase.java

     * in compliance with, at your election, the Elastic License 2.0 or the Server
     * Side Public License, v 1.
     */
    
    package org.elasticsearch.gradle.internal;
    
    /**
     * This class models the different Docker base images that are used to build Docker distributions of Elasticsearch.
     */
    public enum DockerBase {
        CENTOS("centos:8", ""),
    
        // "latest" here is intentional, since the image name specifies "8"
    Created: Wed Apr 08 16:19:15 GMT 2026
    - Last Modified: Fri Aug 20 19:11:05 GMT 2021
    - 1.4K bytes
    - Click Count (0)
  7. docs/fr/docs/advanced/generate-clients.md

    Ces informations sont disponibles dans le **schéma OpenAPI** de l’application, puis affichées dans la documentation de l’API.
    
    Ces mêmes informations issues des modèles, incluses dans OpenAPI, peuvent être utilisées pour **générer le code client**.
    
    ### Hey API { #hey-api }
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:37:13 GMT 2026
    - 11K bytes
    - Click Count (0)
  8. api/maven-api-core/src/main/java/org/apache/maven/api/services/SuperPomProvider.java

    import org.apache.maven.api.annotations.Nonnull;
    import org.apache.maven.api.model.Model;
    
    /**
     * Provides the super POM that all models implicitly inherit from.
     *
     * @since 4.0.0
     */
    @Experimental
    public interface SuperPomProvider extends Service {
    
        /**
         * Gets the super POM for the specified model version.
         *
         * @param version The model version to retrieve the super POM for (e.g. "4.0.0"), must not be {@code null}.
    Created: Sun Apr 05 03:35:12 GMT 2026
    - Last Modified: Wed Feb 28 23:54:53 GMT 2024
    - 1.5K bytes
    - Click Count (0)
  9. docs/en/docs/advanced/settings.md

    Import `BaseSettings` from Pydantic and create a sub-class, very much like with a Pydantic model.
    
    The same way as with Pydantic models, you declare class attributes with type annotations, and possibly default values.
    
    You can use all the same validation features and tools you use for Pydantic models, like different data types and additional validations with `Field()`.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 10.9K bytes
    - Click Count (0)
  10. compat/maven-model-builder/src/site/apt/super-pom.apt.vm

    ~~ under the License.
    
     -----
     Super POM
     -----
     Hervé Boutemy
     -----
     2011-09-12
     -----
    
    Super POM
    
     All models implicitly inherit from a super-POM:
    
    Created: Sun Apr 05 03:35:12 GMT 2026
    - Last Modified: Fri Oct 25 12:31:46 GMT 2024
    - 1K bytes
    - Click Count (0)
Back to Top