Search Options

Results per page
Sort
Preferred Languages
Advance

Results 331 - 340 of 1,542 for kjson (0.02 sec)

  1. tests/test_tutorial/test_request_files/test_tutorial001.py

        assert response.status_code == 200, response.text
        assert response.json() == {"filename": "test.txt"}
    
    
    def test_openapi_schema():
        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": {
                "/files/": {
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 7.7K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_request_files/test_tutorial001_an.py

        assert response.status_code == 200, response.text
        assert response.json() == {"filename": "test.txt"}
    
    
    def test_openapi_schema():
        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": {
                "/files/": {
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  3. tests/test_modules_same_name_body/test_main.py

        response = client.post("/b/compute/", json=data)
        assert response.status_code == 200, response.text
        data = response.json()
    
    
    def test_post_b_invalid():
        data = {"a": "bar", "b": "foo"}
        response = client.post("/b/compute/", json=data)
        assert response.status_code == 422, response.text
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 5.6K bytes
    - Viewed (0)
  4. internal/event/target/kafka.go

    		Enable        bool               `json:"enable"`
    		RootCAs       *x509.CertPool     `json:"-"`
    		SkipVerify    bool               `json:"skipVerify"`
    		ClientAuth    tls.ClientAuthType `json:"clientAuth"`
    		ClientTLSCert string             `json:"clientTLSCert"`
    		ClientTLSKey  string             `json:"clientTLSKey"`
    	} `json:"tls"`
    	SASL struct {
    		Enable    bool   `json:"enable"`
    		User      string `json:"username"`
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Sep 06 23:06:30 UTC 2024
    - 13.6K bytes
    - Viewed (0)
  5. internal/logger/target/http/http.go

    type Config struct {
    	Enabled     bool              `json:"enabled"`
    	Name        string            `json:"name"`
    	UserAgent   string            `json:"userAgent"`
    	Endpoint    *xnet.URL         `json:"endpoint"`
    	AuthToken   string            `json:"authToken"`
    	ClientCert  string            `json:"clientCert"`
    	ClientKey   string            `json:"clientKey"`
    	BatchSize   int               `json:"batchSize"`
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Sep 11 22:20:42 UTC 2024
    - 15.6K bytes
    - Viewed (0)
  6. docs/zh/docs/advanced/additional-responses.md

            - 媒体类型的密钥,例如 `application/json` ,它包含另一个`JSON`对象作为值,该对象包含:
                - 一个键` schema` ,它的值是来自模型的`JSON Schema`,正确的位置在这里。
                    - **FastAPI**在这里添加了对OpenAPI中另一个地方的全局JSON模式的引用,而不是直接包含它。这样,其他应用程序和客户端可以直接使用这些JSON模式,提供更好的代码生成工具等。
    
    ///
    
    **在OpenAPI中为该路径操作生成的响应将是:**
    
    ```json hl_lines="3-12"
    {
        "responses": {
            "404": {
                "description": "Additional Response",
                "content": {
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 8.2K bytes
    - Viewed (0)
  7. internal/s3select/jstream/decoder.go

    }
    
    // KV contains a key and value pair parsed from a decoded object
    type KV struct {
    	Key   string      `json:"key"`
    	Value interface{} `json:"value"`
    }
    
    // KVS - represents key values in an JSON object
    type KVS []KV
    
    // MarshalJSON - implements converting a KVS datastructure into a JSON
    // object with multiple keys and values.
    func (kvs KVS) MarshalJSON() ([]byte, error) {
    	b := new(bytes.Buffer)
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Sep 23 19:35:41 UTC 2024
    - 13.5K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_request_form_models/test_tutorial002_an.py

        assert response.status_code == 200
        assert response.json() == {"username": "Foo", "password": "secret"}
    
    
    @needs_pydanticv2
    def test_post_body_extra_form(client: TestClient):
        response = client.post(
            "/login/", data={"username": "Foo", "password": "secret", "extra": "extra"}
        )
        assert response.status_code == 422
        assert response.json() == {
            "detail": [
                {
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Sep 06 17:31:18 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_request_form_models/test_tutorial002_pv1.py

        assert response.status_code == 200
        assert response.json() == {"username": "Foo", "password": "secret"}
    
    
    @needs_pydanticv1
    def test_post_body_extra_form(client: TestClient):
        response = client.post(
            "/login/", data={"username": "Foo", "password": "secret", "extra": "extra"}
        )
        assert response.status_code == 422
        assert response.json() == {
            "detail": [
                {
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Sep 06 17:31:18 UTC 2024
    - 6K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_security/test_tutorial003_an_py39.py

        assert response.json() == {"access_token": "johndoe", "token_type": "bearer"}
    
    
    @needs_py39
    def test_login_incorrect_password(client: TestClient):
        response = client.post(
            "/token", data={"username": "johndoe", "password": "incorrect"}
        )
        assert response.status_code == 400, response.text
        assert response.json() == {"detail": "Incorrect username or password"}
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 8.4K bytes
    - Viewed (0)
Back to top