Search Options

Results per page
Sort
Preferred Languages
Advance

Results 891 - 900 of 1,707 for kjson (0.04 sec)

  1. tests/test_tutorial/test_dependencies/test_tutorial008b.py

        response = client.get("/items/foo")
        assert response.status_code == 404, response.text
        assert response.json() == {"detail": "Item not found"}
    
    
    def test_owner_error():
        response = client.get("/items/plumbus")
        assert response.status_code == 400, response.text
        assert response.json() == {"detail": "Owner error: Rick"}
    
    
    def test_get_item():
        response = client.get("/items/portal-gun")
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Dec 26 20:37:34 UTC 2023
    - 697 bytes
    - Viewed (0)
  2. tests/test_filter_pydantic_sub_model_pv2.py

                    "type": "value_error",
                }
            )
        ]
    
    
    @needs_pydanticv2
    def test_openapi_schema(client: TestClient):
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "openapi": "3.1.0",
            "info": {"title": "FastAPI", "version": "0.1.0"},
            "paths": {
                "/model/{name}": {
                    "get": {
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  3. internal/config/etcd/etcd.go

    			Value: "",
    		},
    		config.KV{
    			Key:   ClientCertKey,
    			Value: "",
    		},
    	}
    )
    
    // Config - server etcd config.
    type Config struct {
    	Enabled     bool   `json:"enabled"`
    	PathPrefix  string `json:"pathPrefix"`
    	CoreDNSPath string `json:"coreDNSPath"`
    	clientv3.Config
    }
    
    // New - initialize new etcd client.
    func New(cfg Config) (*clientv3.Client, error) {
    	if !cfg.Enabled {
    		return nil, nil
    	}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Jun 28 23:17:22 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  4. docs/site-replication/run-multi-site-minio-idp.sh

    set -x
    
    enabled_minio2=$(./mc stat --json minio2/newbucket-olock | jq -r .ObjectLock.enabled)
    if [ $? -ne 0 ]; then
    	echo "expected bucket to be mirrored with object-lock but not present, exiting..."
    	exit_1
    fi
    
    if [ "${enabled_minio2}" != "Enabled" ]; then
    	echo "expected bucket to be mirrored with object-lock enabled, exiting..."
    	exit_1
    fi
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Sep 24 08:03:58 UTC 2024
    - 12.1K bytes
    - Viewed (0)
  5. 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
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Mar 01 20:49:20 UTC 2020
    - 5K bytes
    - Viewed (0)
  6. internal/config/compress/compress.go

    	"github.com/minio/pkg/v3/env"
    )
    
    // Config represents the compression settings.
    type Config struct {
    	Enabled        bool     `json:"enabled"`
    	AllowEncrypted bool     `json:"allow_encryption"`
    	Extensions     []string `json:"extensions"`
    	MimeTypes      []string `json:"mime-types"`
    }
    
    // Compression environment variables
    const (
    	Extensions     = "extensions"
    	AllowEncrypted = "allow_encryption"
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 5K bytes
    - Viewed (0)
  7. docs/zh/docs/tutorial/body-multiple-params.md

    {!> ../../docs_src/body_multiple_params/tutorial001.py!}
    ```
    
    ////
    
    /// note
    
    请注意,在这种情况下,将从请求体获取的 `item` 是可选的。因为它的默认值为 `None`。
    
    ///
    
    ## 多个请求体参数
    
    在上面的示例中,*路径操作*将期望一个具有 `Item` 的属性的 JSON 请求体,就像:
    
    ```JSON
    {
        "name": "Foo",
        "description": "The pretender",
        "price": 42.0,
        "tax": 3.2
    }
    ```
    
    但是你也可以声明多个请求体参数,例如 `item` 和 `user`:
    
    //// tab | Python 3.10+
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  8. docs/ja/docs/tutorial/body-multiple-params.md

    {!../../docs_src/body_multiple_params/tutorial001.py!}
    ```
    
    /// note | "備考"
    
    この場合、ボディから取得する`item`はオプションであることに注意してください。デフォルト値は`None`です。
    
    ///
    
    ## 複数のボディパラメータ
    
    上述の例では、*path operations*は`item`の属性を持つ以下のようなJSONボディを期待していました:
    
    ```JSON
    {
        "name": "Foo",
        "description": "The pretender",
        "price": 42.0,
        "tax": 3.2
    }
    ```
    
    しかし、`item`と`user`のように複数のボディパラメータを宣言することもできます:
    
    ```Python hl_lines="22"
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  9. docs/en/docs/how-to/general.md

    ## Convert any Data to JSON-compatible
    
    To convert any data to JSON-compatible, read the docs for [Tutorial - JSON Compatible Encoder](../tutorial/encoder.md){.internal-link target=_blank}.
    
    ## OpenAPI Metadata - Docs
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Aug 19 19:54:04 UTC 2023
    - 2.3K bytes
    - Viewed (0)
  10. tests/test_additional_responses_bad.py

                            "content": {"application/json": {"schema": {}}},
                        },
                    },
                    "summary": "A",
                    "operationId": "a_a_get",
                }
            }
        },
    }
    
    client = TestClient(app)
    
    
    def test_openapi_schema():
        with pytest.raises(ValueError):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 1.1K bytes
    - Viewed (0)
Back to top