Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 14 for schema_extra (0.1 seconds)

  1. tests/test_schema_extra_examples.py

        app = FastAPI()
    
        class Item(BaseModel):
            data: str
    
            model_config = ConfigDict(
                json_schema_extra={"example": {"data": "Data in schema_extra"}}
            )
    
        @app.post("/schema_extra/")
        def schema_extra(item: Item):
            return item
    
        with pytest.warns(FastAPIDeprecationWarning):
    
            @app.post("/example/")
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Feb 17 09:59:14 GMT 2026
    - 34.7K bytes
    - Click Count (0)
  2. docs/en/docs/tutorial/schema-extra-example.md

    ///
    
    ### Pydantic and FastAPI `examples` { #pydantic-and-fastapi-examples }
    
    When you add `examples` inside a Pydantic model, using `schema_extra` or `Field(examples=["something"])` that example is added to the **JSON Schema** for that Pydantic model.
    
    And that **JSON Schema** of the Pydantic model is included in the **OpenAPI** of your API, and then it's used in the docs UI.
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 8.7K bytes
    - Click Count (0)
  3. docs/zh-hant/docs/tutorial/schema-extra-example.md

    因此,FastAPI 0.99.0 之前的版本仍使用 3.1.0 以下的 OpenAPI 版本。
    
    ///
    
    ### Pydantic 與 FastAPI 的 `examples` { #pydantic-and-fastapi-examples }
    
    當你在 Pydantic 模型中加入 `examples`,不論是用 `schema_extra` 或 `Field(examples=["something"])`,該範例都會被加入該 Pydantic 模型的 **JSON Schema**。
    
    而該 Pydantic 模型的 **JSON Schema** 會被包含到你的 API 的 **OpenAPI** 中,接著用於文件 UI。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 8.4K bytes
    - Click Count (0)
  4. docs/ja/docs/tutorial/schema-extra-example.md

    そのため、FastAPI 0.99.0より前のバージョンは、OpenAPI 3.1.0より低いバージョンのOpenAPIをまだ使用していました。
    
    ///
    
    ### PydanticとFastAPIの`examples` { #pydantic-and-fastapi-examples }
    
    Pydanticモデル内で、`schema_extra`または`Field(examples=["something"])`を使って`examples`を追加すると、その例はそのPydanticモデルの**JSON Schema**に追加されます。
    
    そしてそのPydanticモデルの**JSON Schema**はAPIの**OpenAPI**に含まれ、ドキュメントUIで使用されます。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:07:17 GMT 2026
    - 10.5K bytes
    - Click Count (0)
  5. docs/zh/docs/tutorial/schema-extra-example.md

    因此,FastAPI 0.99.0 之前的版本仍然使用低于 3.1.0 的 OpenAPI 版本。
    
    ///
    
    ### Pydantic 与 FastAPI 的 `examples` { #pydantic-and-fastapi-examples }
    
    当你在 Pydantic 模型中添加 `examples`,通过 `schema_extra` 或 `Field(examples=["something"])`,这些示例会被添加到该 Pydantic 模型的 JSON Schema 中。
    
    这个 Pydantic 模型的 JSON Schema 会被包含到你的 API 的 OpenAPI 中,然后在文档 UI 中使用。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:06:37 GMT 2026
    - 8.5K bytes
    - Click Count (0)
  6. docs/ru/docs/tutorial/schema-extra-example.md

    ///
    
    ### `examples` в Pydantic и FastAPI { #pydantic-and-fastapi-examples }
    
    Когда вы добавляете `examples` внутри модели Pydantic, используя `schema_extra` или `Field(examples=["something"])`, этот пример добавляется в **JSON Schema** для этой модели Pydantic.
    
    И эта **JSON Schema** модели Pydantic включается в **OpenAPI** вашего API, а затем используется в UI документации.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 17:56:20 GMT 2026
    - 13.8K bytes
    - Click Count (0)
  7. docs/fr/docs/tutorial/schema-extra-example.md

    ///
    
    ### `examples` avec Pydantic et FastAPI { #pydantic-and-fastapi-examples }
    
    Lorsque vous ajoutez `examples` dans un modèle Pydantic, en utilisant `schema_extra` ou `Field(examples=["something"])`, cet exemple est ajouté au **JSON Schema** de ce modèle Pydantic.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:37:13 GMT 2026
    - 10.2K bytes
    - Click Count (0)
  8. docs/es/docs/tutorial/schema-extra-example.md

    ///
    
    ### `examples` de Pydantic y FastAPI { #pydantic-and-fastapi-examples }
    
    Cuando añades `examples` dentro de un modelo de Pydantic, usando `schema_extra` o `Field(examples=["something"])`, ese ejemplo se añade al **JSON Schema** para ese modelo de Pydantic.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:15:55 GMT 2026
    - 9.5K bytes
    - Click Count (0)
  9. docs/pt/docs/tutorial/schema-extra-example.md

    ///
    
    ### `examples` no Pydantic e no FastAPI { #pydantic-and-fastapi-examples }
    
    Quando você adiciona `examples` dentro de um modelo Pydantic, usando `schema_extra` ou `Field(examples=["something"])`, esse exemplo é adicionado ao **JSON Schema** para esse modelo Pydantic.
    
    E esse **JSON Schema** do modelo Pydantic é incluído no **OpenAPI** da sua API e, então, é usado na UI da documentação.
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:20:43 GMT 2026
    - 9.5K bytes
    - Click Count (0)
  10. docs/de/docs/tutorial/schema-extra-example.md

    ///
    
    ### Pydantic- und FastAPI-`examples` { #pydantic-and-fastapi-examples }
    
    Wenn Sie `examples` innerhalb eines Pydantic-Modells hinzufügen, indem Sie `schema_extra` oder `Field(examples=["something"])` verwenden, wird dieses Beispiel dem **JSON-Schema** für dieses Pydantic-Modell hinzugefügt.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 17:58:09 GMT 2026
    - 10.4K bytes
    - Click Count (0)
Back to Top