Search Options

Results per page
Sort
Preferred Languages
Advance

Results 611 - 620 of 1,587 for kjson (0.03 sec)

  1. tests/test_tutorial/test_request_files/test_tutorial001_02_py310.py

        assert response.status_code == 200, response.text
        assert response.json() == {"filename": "test.txt"}
    
    
    @needs_py310
    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": {
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 8.5K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial005.py

    
    def test_get():
        response = client.get("/items/")
        assert response.status_code == 200, response.text
    
    
    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": {
                "/items/": {
                    "get": {
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 1K bytes
    - Viewed (0)
  3. docs/em/docs/advanced/behind-a-proxy.md

    ๐Ÿ†™ ๐Ÿ“ฅ, ๐ŸŒ ๐Ÿ”œ ๐Ÿ‘ท ๐Ÿ›Ž.
    
    โœ‹๏ธ โคด๏ธ, ๐Ÿ•โ” ๐Ÿ‘† ๐Ÿ“‚ ๐Ÿ› ๏ธ ๐Ÿฉบ ๐ŸŽš (๐Ÿ•ธ), โšซ๏ธ ๐Ÿ”œ โŒ› ๐Ÿคš ๐Ÿ—„ ๐Ÿ”— `/openapi.json`, โ†ฉ๏ธ `/api/v1/openapi.json`.
    
    , ๐Ÿ•ธ (๐Ÿ‘ˆ ๐Ÿƒ ๐Ÿ–ฅ) ๐Ÿ”œ ๐Ÿ”„ ๐Ÿ† `/openapi.json` & ๐Ÿšซ๐Ÿ”œ ๐Ÿ’ช ๐Ÿคš ๐Ÿ—„ ๐Ÿ”—.
    
    โ†ฉ๏ธ ๐Ÿ‘ฅ โœ”๏ธ ๐Ÿ—ณ โฎ๏ธ โžก ๐Ÿ”ก `/api/v1` ๐Ÿ‘† ๐Ÿ“ฑ, ๐Ÿ•ธ ๐Ÿ’ช โ˜• ๐Ÿ—„ ๐Ÿ”— `/api/v1/openapi.json`.
    
    ```mermaid
    graph LR
    
    browser("Browser")
    proxy["Proxy on http://0.0.0.0:9999/api/v1/app"]
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 10.1K bytes
    - Viewed (0)
  4. tests/test_forms_single_model.py

                "age": "70",
                "tags": ["plumbus", "citadel"],
                "with": "something",
            },
        )
        assert response.status_code == 200, response.text
        assert response.json() == {
            "username": "Rick",
            "lastname": "Sanchez",
            "age": 70,
            "tags": ["plumbus", "citadel"],
            "with": "something",
        }
    
    
    def test_defaults():
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Sep 13 09:51:00 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  5. tests/test_default_response_class.py

    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"] == orjson_type
    
    
    def test_app_override():
        with client:
            response = client.get("/override")
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Mar 01 20:49:20 UTC 2020
    - 5.2K bytes
    - Viewed (0)
  6. tests/test_request_body_parameters_media_type.py

    ):
        pass  # pragma: no cover
    
    
    client = TestClient(app)
    
    
    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": {
                "/products": {
                    "post": {
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 6.4K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_request_form_models/test_tutorial001_an.py

        assert response.status_code == 200
        assert response.json() == {"username": "Foo", "password": "secret"}
    
    
    def test_post_body_form_no_password(client: TestClient):
        response = client.post("/login/", data={"username": "Foo"})
        assert response.status_code == 422
        assert response.json() == IsDict(
            {
                "detail": [
                    {
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Sep 05 15:16:50 UTC 2024
    - 7.4K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_openapi_callbacks/test_tutorial001.py

        response = client.post(
            "/invoices/", json={"id": "fooinvoice", "customer": "John", "total": 5.3}
        )
        assert response.status_code == 200, response.text
        assert response.json() == {"msg": "Invoice received"}
    
    
    def test_dummy_callback():
        # Just for coverage
        invoice_notification({})
    
    
    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 Jul 07 17:12:13 UTC 2023
    - 9K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_custom_response/test_tutorial006.py

        assert response.headers["location"] == "https://typer.tiangolo.com"
    
    
    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": {
                "/typer": {
                    "get": {
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 1K bytes
    - Viewed (0)
  10. tests/test_typing_python39.py

            @app.post("/", response_model=test_type)
            def post_endpoint(input: test_type):
                return input
    
            res = TestClient(app).post("/", json=expect)
            assert res.status_code == 200, res.json()
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 709 bytes
    - Viewed (0)
Back to top