Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 739 for model (0.08 sec)

  1. model.go

    package gorm
    
    import "time"
    
    // Model a basic GoLang struct which includes the following fields: ID, CreatedAt, UpdatedAt, DeletedAt
    // It may be embedded into your model or you may build your own model without it
    //
    //	type User struct {
    //	  gorm.Model
    //	}
    type Model struct {
    	ID        uint `gorm:"primarykey"`
    	CreatedAt time.Time
    	UpdatedAt time.Time
    	DeletedAt DeletedAt `gorm:"index"`
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Sat Feb 18 01:06:43 UTC 2023
    - 396 bytes
    - Viewed (0)
  2. docs/zh/docs/tutorial/response-model.md

    ## 在文档中查看
    
    当你查看自动化文档时,你可以检查输入模型和输出模型是否都具有自己的 JSON Schema:
    
    <img src="https://fastapi.tiangolo.com/img/tutorial/response-model/image01.png">
    
    并且两种模型都将在交互式 API 文档中使用:
    
    <img src="https://fastapi.tiangolo.com/img/tutorial/response-model/image02.png">
    
    ## 响应模型编码参数
    
    你的响应模型可以具有默认值,例如:
    
    ```Python hl_lines="11  13-14"
    {!../../docs_src/response_model/tutorial004.py!}
    ```
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  3. docs/ko/docs/tutorial/response-model.md

    따라서 **FastAPI**는 출력 모델에서 선언하지 않은 모든 데이터를 (Pydantic을 사용하여) 필터링합니다.
    
    ## 문서에서 보기
    
    자동 생성 문서를 보면 입력 모델과 출력 모델이 각자의 JSON 스키마를 가지고 있음을 확인할 수 있습니다:
    
    <img src="/img/tutorial/response-model/image01.png">
    
    그리고 두 모델 모두 대화형 API 문서에 사용됩니다:
    
    <img src="/img/tutorial/response-model/image02.png">
    
    ## 응답 모델 인코딩 매개변수
    
    응답 모델은 아래와 같이 기본값을 가질 수 있습니다:
    
    ```Python hl_lines="11  13-14"
    {!../../docs_src/response_model/tutorial004.py!}
    ```
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  4. docs/ja/docs/tutorial/response-model.md

    ## ドキュメントを見る
    
    自動ドキュメントを見ると、入力モデルと出力モデルがそれぞれ独自のJSON Schemaを持っていることが確認できます。
    
    <img src="https://fastapi.tiangolo.com/img/tutorial/response-model/image01.png">
    
    そして、両方のモデルは、対話型のAPIドキュメントに使用されます:
    
    <img src="https://fastapi.tiangolo.com/img/tutorial/response-model/image02.png">
    
    ## レスポンスモデルのエンコーディングパラメータ
    
    レスポンスモデルにはデフォルト値を設定することができます:
    
    ```Python hl_lines="11 13 14"
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 9.2K bytes
    - Viewed (0)
  5. architecture/build-state-model.md

    # Build state model
    
    The Gradle daemon tracks state for various elements. These are arranged in a hierarchy:
    
    ```mermaid
      graph TD
    
      process["build process"]
      
      session["build session"]
      process --> session
      
      build_tree["build tree"]
      session --> build_tree
      
      build1["root build"]
      build_tree --> build1
      
      project1["root project"]
      build1 --> project1
      
      project2["project"]
      build1 --> project2
    Registered: Wed Nov 06 11:36:14 UTC 2024
    - Last Modified: Wed May 22 13:39:49 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  6. compat/maven-model-builder/src/main/resources/META-INF/services/org.apache.maven.model.root.RootLocator

    org.apache.maven.model.root.DefaultRootLocator...
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 47 bytes
    - Viewed (0)
  7. tests/test_response_model_include_exclude.py

        return Model2(
            ref=Model1(foo="simple_include model foo", bar="simple_include model bar"),
            baz="simple_include model2 baz",
        )
    
    
    @app.get(
        "/simple_include_dict",
        response_model=Model2,
        response_model_include={"baz": ..., "ref": {"foo"}},
    )
    def simple_include_dict():
        return {
            "ref": {
                "foo": "simple_include_dict model foo",
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Mon Jul 19 19:14:58 UTC 2021
    - 4K bytes
    - Viewed (0)
  8. tests/test_duplicate_models_openapi.py

    from fastapi import FastAPI
    from fastapi.testclient import TestClient
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Model(BaseModel):
        pass
    
    
    class Model2(BaseModel):
        a: Model
    
    
    class Model3(BaseModel):
        c: Model
        d: Model2
    
    
    @app.get("/", response_model=Model3)
    def f():
        return {"c": {}, "d": {"a": {}}}
    
    
    client = TestClient(app)
    
    
    def test_get_api_route():
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  9. docs/en/docs/tutorial/query-param-models.md

    # Query Parameter Models
    
    If you have a group of **query parameters** that are related, you can create a **Pydantic model** to declare them.
    
    This would allow you to **re-use the model** in **multiple places** and also to declare validations and metadata for all the parameters at once. 😎
    
    /// note
    
    This is supported since FastAPI version `0.115.0`. 🤓
    
    ///
    
    ## Query Parameters with a Pydantic Model
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  10. tests/test_filter_pydantic_sub_model/test_filter_pydantic_sub_model_pv1.py

        return client
    
    
    @needs_pydanticv1
    def test_filter_sub_model(client: TestClient):
        response = client.get("/model/modelA")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "name": "modelA",
            "description": "model-a-desc",
            "model_b": {"username": "test-user"},
        }
    
    
    @needs_pydanticv1
    def test_validator_is_cloned(client: TestClient):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 4.5K bytes
    - Viewed (0)
Back to top