Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for configurations (0.24 sec)

  1. fastapi/openapi/docs.py

    from typing_extensions import Annotated, Doc
    
    swagger_ui_default_parameters: Annotated[
        Dict[str, Any],
        Doc(
            """
            Default configurations for Swagger UI.
    
            You can use it as a template to add any other configurations needed.
            """
        ),
    ] = {
        "dom_id": "#swagger-ui",
        "layout": "BaseLayout",
        "deepLinking": True,
        "showExtensions": True,
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 10.1K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial001.py

    from fastapi.testclient import TestClient
    
    from docs_src.path_operation_advanced_configuration.tutorial001 import app
    
    client = TestClient(app)
    
    
    def test_get():
        response = client.get("/items/")
        assert response.status_code == 200, response.text
        assert response.json() == [{"item_id": "Foo"}]
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 1K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial005.py

    from fastapi.testclient import TestClient
    
    from docs_src.path_operation_advanced_configuration.tutorial005 import app
    
    client = TestClient(app)
    
    
    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",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 1K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial006.py

    from fastapi.testclient import TestClient
    
    from docs_src.path_operation_advanced_configuration.tutorial006 import app
    
    client = TestClient(app)
    
    
    def test_post():
        response = client.post("/items/", content=b"this is actually not validated")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "size": 30,
            "content": {
                "name": "Maaaagic",
                "price": 42,
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 1.9K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial007_pv1.py

    import pytest
    from fastapi.testclient import TestClient
    
    from ...utils import needs_pydanticv1
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.path_operation_advanced_configuration.tutorial007_pv1 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_pydanticv1
    def test_post(client: TestClient):
        yaml_data = """
            name: Deadpoolio
            tags:
            - x-force
            - x-men
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 3.2K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial007.py

    import pytest
    from fastapi.testclient import TestClient
    
    from ...utils import needs_pydanticv2
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.path_operation_advanced_configuration.tutorial007 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_pydanticv2
    def test_post(client: TestClient):
        yaml_data = """
            name: Deadpoolio
            tags:
            - x-force
            - x-men
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 3.3K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_path_operation_configurations/test_tutorial005_py310.py

    import pytest
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py310, needs_pydanticv1, needs_pydanticv2
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.path_operation_configuration.tutorial005_py310 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py310
    def test_query_params_str_validations(client: TestClient):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Sep 28 04:14:40 GMT 2023
    - 8.9K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_path_operation_configurations/test_tutorial005_py39.py

    import pytest
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py39, needs_pydanticv1, needs_pydanticv2
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.path_operation_configuration.tutorial005_py39 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py39
    def test_query_params_str_validations(client: TestClient):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Sep 28 04:14:40 GMT 2023
    - 8.9K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial003.py

    from fastapi.testclient import TestClient
    
    from docs_src.path_operation_advanced_configuration.tutorial003 import app
    
    client = TestClient(app)
    
    
    def test_get():
        response = client.get("/items/")
        assert response.status_code == 200, response.text
        assert response.json() == [{"item_id": "Foo"}]
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 575 bytes
    - Viewed (0)
  10. tests/test_tutorial/test_path_operation_configurations/test_tutorial006.py

    import pytest
    from fastapi.testclient import TestClient
    
    from docs_src.path_operation_configuration.tutorial006 import app
    
    client = TestClient(app)
    
    
    @pytest.mark.parametrize(
        "path,expected_status,expected_response",
        [
            ("/items/", 200, [{"name": "Foo", "price": 42}]),
            ("/users/", 200, [{"username": "johndoe"}]),
            ("/elements/", 200, [{"item_id": "Foo"}]),
        ],
    )
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.3K bytes
    - Viewed (0)
Back to top