Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 391 - 400 of 675 for jsconf (0.04 seconds)

  1. tests/test_default_response_class_router.py

    )
    
    
    client = TestClient(app)
    
    json_type = "application/json"
    text_type = "text/plain; charset=utf-8"
    html_type = "text/html; charset=utf-8"
    override_type = "application/x-override"
    
    
    def test_app():
        with client:
            response = client.get("/")
        assert response.json() == {"msg": "Hello World"}
        assert response.headers["content-type"] == json_type
    
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Mar 01 20:49:20 GMT 2020
    - 5K bytes
    - Click Count (0)
  2. tests/test_response_dependency.py

        def endpoint(response: Annotated[Response, Depends(modify_response)]):
            return {"status": "ok"}
    
        client = TestClient(app)
        resp = client.get("/")
    
        assert resp.status_code == 200
        assert resp.json() == {"status": "ok"}
        assert resp.headers.get("X-Custom") == "modified"
    
    
    def test_response_with_depends_default():
        """Response type hint should work with Response = Depends(...)."""
        app = FastAPI()
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 05 18:23:16 GMT 2026
    - 5.2K bytes
    - Click Count (0)
  3. compat/maven-model-builder/src/test/java/org/apache/maven/model/building/DefaultModelBuilderFactoryTest.java

            assertEquals("activated", result.getEffectiveModel().getProperties().get("profile.file"));
            Xpp3Dom conf = (Xpp3Dom)
                    result.getEffectiveModel().getBuild().getPlugins().get(0).getConfiguration();
            assertNotNull(conf);
            assertEquals("1.5", conf.getChild("source").getValue());
            assertEquals("  1.5  ", conf.getChild("target").getValue());
        }
    
        @Test
        void testPomChanges() throws Exception {
    Created: Sun Apr 05 03:35:12 GMT 2026
    - Last Modified: Fri Jan 10 07:09:12 GMT 2025
    - 3.7K bytes
    - Click Count (0)
  4. docs/es/docs/advanced/openapi-callbacks.md

    ```
    
    con un JSON body de:
    
    ```JSON
    {
        "id": "2expen51ve",
        "customer": "Mr. Richie Rich",
        "total": "9999"
    }
    ```
    
    luego *tu API* procesará la factura y, en algún momento después, enviará un request de callback al `callback_url` (la *API externa*):
    
    ```
    https://www.external.org/events/invoices/2expen51ve
    ```
    
    con un JSON body que contiene algo como:
    
    ```JSON
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:15:55 GMT 2026
    - 8K bytes
    - Click Count (0)
  5. docs/uk/docs/features.md

    * Автоматична документація моделей даних за допомогою [**JSON Schema**](https://json-schema.org/) (оскільки OpenAPI базується саме на JSON Schema).
    * Розроблено на основі цих стандартів після ретельного аналізу, а не як додатковий рівень поверх основної архітектури.
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:27:41 GMT 2026
    - 15.1K bytes
    - Click Count (0)
  6. docs/zh/docs/tutorial/body.md

    与声明查询参数一样,包含默认值的模型属性是可选的,否则就是必选的。把默认值设为 `None` 可使其变为可选。
    
    例如,上述模型声明如下 JSON "object"(即 Python `dict`):
    
    ```JSON
    {
        "name": "Foo",
        "description": "An optional description",
        "price": 45.2,
        "tax": 3.5
    }
    ```
    
    ...由于 `description` 和 `tax` 是可选的(默认值为 `None`),下面的 JSON "object" 也有效:
    
    ```JSON
    {
        "name": "Foo",
        "price": 45.2
    }
    ```
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:06:37 GMT 2026
    - 5.9K bytes
    - Click Count (0)
  7. docs_src/dependency_testing/tutorial001_py310.py

        response = client.get("/items/")
        assert response.status_code == 200
        assert response.json() == {
            "message": "Hello Items!",
            "params": {"q": None, "skip": 5, "limit": 10},
        }
    
    
    def test_override_in_items_with_q():
        response = client.get("/items/?q=foo")
        assert response.status_code == 200
        assert response.json() == {
            "message": "Hello Items!",
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 1.4K bytes
    - Click Count (0)
  8. docs/ja/docs/tutorial/first-steps.md

    #### データ「スキーマ」 { #data-schema }
    
    「スキーマ」という用語は、JSONコンテンツなどの一部のデータの形状を指す場合もあります。
    
    そのような場合、スキーマはJSON属性とそれらが持つデータ型などを意味します。
    
    #### OpenAPIおよびJSONスキーマ { #openapi-and-json-schema }
    
    OpenAPIはAPIのためのAPIスキーマを定義します。そして、そのスキーマは**JSONデータスキーマ**の標準規格である**JSON Schema**を利用するAPIによって送受されるデータの定義(または「スキーマ」)を含んでいます。
    
    #### `openapi.json`を確認 { #check-the-openapi-json }
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:07:17 GMT 2026
    - 15.9K bytes
    - Click Count (0)
  9. docs/zh-hant/docs/how-to/separate-openapi-schemas.md

    在互動式文件中試用並檢視回應時,儘管程式碼沒有為其中一個 `description` 欄位加入任何內容,JSON 回應仍包含預設值(`null`):
    
    <div class="screenshot">
    <img src="/img/tutorial/separate-openapi-schemas/image02.png">
    </div>
    
    這代表該欄位一定會有值,只是有時候值可能是 `None`(在 JSON 中為 `null`)。
    
    因此,使用你 API 的用戶端不必檢查值是否存在,可以假設該欄位一定存在;只是有些情況下它的值會是預設的 `None`。
    
    在 OpenAPI 中,描述這種情況的方式是將該欄位標記為必填,因為它一定存在。
    
    因此,同一個模型的 JSON Schema 會依用於輸入或輸出而不同:
    
    - 用於輸入時,`description` 不是必填
    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)
  10. docs/zh-hant/docs/tutorial/server-sent-events.md

    從 `fastapi.sse` 匯入 `ServerSentEvent`:
    
    {* ../../docs_src/server_sent_events/tutorial002_py310.py hl[4,26] *}
    
    `data` 欄位一律會以 JSON 編碼。你可以傳入任何可序列化為 JSON 的值,包括 Pydantic 模型。
    
    ## 原始資料 { #raw-data }
    
    如果你需要在**不**進行 JSON 編碼的情況下傳送資料,請使用 `raw_data` 取代 `data`。
    
    這對於傳送已格式化的文字、日誌行或特殊的 <dfn title="用於表示特殊條件或狀態的值">"哨兵"</dfn> 值(例如 `[DONE]`)很有用。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:33:04 GMT 2026
    - 4.6K bytes
    - Click Count (0)
Back to Top