Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 161 for jeon (0.18 sec)

  1. tests/test_tutorial/test_body/test_tutorial001_py310.py

            headers={"content-type": "application/json"},
            content="{some broken json}",
        )
        assert response.status_code == 422, response.text
        assert response.json() == IsDict(
            {
                "detail": [
                    {
                        "type": "json_invalid",
                        "loc": ["body", 1],
                        "msg": "JSON decode error",
                        "input": {},
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 15K bytes
    - Viewed (2)
  2. tests/test_tutorial/test_body/test_tutorial001.py

            headers={"content-type": "application/json"},
            content="{some broken json}",
        )
        assert response.status_code == 422, response.text
        assert response.json() == IsDict(
            {
                "detail": [
                    {
                        "type": "json_invalid",
                        "loc": ["body", 1],
                        "msg": "JSON decode error",
                        "input": {},
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 14.7K bytes
    - Viewed (7)
  3. tests/test_query.py

        assert response.json() == "foo bar"
    
    
    def test_query_param_query_50():
        response = client.get("/query/param?query=50")
        assert response.status_code == 200
        assert response.json() == "foo bar 50"
    
    
    def test_query_param_required():
        response = client.get("/query/param-required")
        assert response.status_code == 422
        assert response.json() == IsDict(
            {
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 21:56:59 GMT 2024
    - 11.4K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_bigger_applications/test_main_an.py

        assert response.status_code == 400, response.text
        assert response.json() == {"detail": "X-Token header invalid"}
    
    
    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": {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 24.6K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_bigger_applications/test_main_an_py39.py

        assert response.status_code == 400, response.text
        assert response.json() == {"detail": "X-Token header invalid"}
    
    
    @needs_py39
    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"},
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 24.9K bytes
    - Viewed (0)
  6. tests/test_response_by_alias.py

        assert response.json() == {"name": "Foo"}
    
    
    def test_read_model():
        response = client.get("/model")
        assert response.status_code == 200, response.text
        assert response.json() == {"name": "Foo"}
    
    
    def test_read_list():
        response = client.get("/list")
        assert response.status_code == 200, response.text
        assert response.json() == [
            {"name": "Foo"},
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 11.1K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_security/test_tutorial005_an.py

        response = client.post("/token", data=data)
        content = response.json()
        access_token = content.get("access_token")
        return access_token
    
    
    def test_login():
        response = client.post("/token", data={"username": "johndoe", "password": "secret"})
        assert response.status_code == 200, response.text
        content = response.json()
        assert "access_token" in content
        assert content["token_type"] == "bearer"
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 15.4K bytes
    - Viewed (0)
  8. fastapi/params.py

                        "strict": strict,
                        "json_schema_extra": current_json_schema_extra,
                    }
                )
                kwargs["pattern"] = pattern or regex
            else:
                kwargs["regex"] = pattern or regex
                kwargs.update(**current_json_schema_extra)
            use_kwargs = {k: v for k, v in kwargs.items() if v is not _Unset}
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 27.5K bytes
    - Viewed (1)
  9. tests/test_tutorial/test_body_updates/test_tutorial001_py39.py

        assert response.json() == {
            "name": "Baz",
            "description": None,
            "price": 50.2,
            "tax": 10.5,
            "tags": [],
        }
    
    
    @needs_py39
    def test_put(client: TestClient):
        response = client.put(
            "/items/bar", json={"name": "Barz", "price": 3, "description": None}
        )
        assert response.json() == {
            "name": "Barz",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Sep 28 04:14:40 GMT 2023
    - 11.8K bytes
    - Viewed (0)
  10. docs/ru/docs/tutorial/first-steps.md

    Тогда, подразумеваются атрибуты JSON, их типы данных и т.п.
    
    #### OpenAPI и JSON Schema
    
    OpenAPI описывает схему API. Эта схема содержит определения (или "схемы") данных, отправляемых и получаемых API. Для описания структуры данных в JSON используется стандарт **JSON Schema**.
    
    #### Рассмотрим `openapi.json`
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 13.1K bytes
    - Viewed (0)
Back to top