Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 57 of 57 for Glover (0.14 sec)

  1. tests/test_additional_responses_bad.py

    from fastapi import FastAPI
    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    
    @app.get("/a", responses={"hello": {"description": "Not a valid additional response"}})
    async def a():
        pass  # pragma: no cover
    
    
    openapi_schema = {
        "openapi": "3.1.0",
        "info": {"title": "FastAPI", "version": "0.1.0"},
        "paths": {
            "/a": {
                "get": {
                    "responses": {
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 1.1K bytes
    - Viewed (0)
  2. tests/test_custom_middleware_exception.py

            received = 0
    
            async def inner():
                nonlocal received
                message = await receive()
                if message["type"] != "http.request":
                    return message  # pragma: no cover
    
                body_len = len(message.get("body", b""))
                received += body_len
                if received > self.max_content_size:
                    raise HTTPException(
                        422,
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Aug 25 21:44:40 GMT 2022
    - 2.8K bytes
    - Viewed (0)
  3. docs/en/docs/tutorial/security/index.md

            * `clientCredentials`
            * `authorizationCode`
        * But there is one specific "flow" that can be perfectly used for handling authentication in the same application directly:
            * `password`: some next chapters will cover examples of this.
    * `openIdConnect`: has a way to define how to discover OAuth2 authentication data automatically.
        * This automatic discovery is what is defined in the OpenID Connect specification.
    
    
    !!! tip
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Jun 24 14:47:15 GMT 2023
    - 4.3K bytes
    - Viewed (0)
  4. docs/en/docs/tutorial/schema-extra-example.md

        Because of that, versions of FastAPI previous to 0.99.0 still used versions of OpenAPI lower than 3.1.0.
    
    ### Pydantic and FastAPI `examples`
    
    When you add `examples` inside a Pydantic model, using `schema_extra` or `Field(examples=["something"])` that example is added to the **JSON Schema** for that Pydantic model.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.8K bytes
    - Viewed (0)
  5. fastapi/_compat.py

        try:
            from pydantic_core.core_schema import (
                with_info_plain_validator_function as with_info_plain_validator_function,
            )
        except ImportError:  # pragma: no cover
            from pydantic_core.core_schema import (
                general_plain_validator_function as with_info_plain_validator_function,  # noqa: F401
            )
    
        Required = PydanticUndefined
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 22.6K bytes
    - Viewed (0)
  6. docs/en/docs/deployment/docker.md

    The **good news** is that with each different strategy there's a way to cover all of the deployment concepts. 🎉
    
    Let's review these **deployment concepts** in terms of containers:
    
    * HTTPS
    * Running on startup
    * Restarts
    * Replication (the number of processes running)
    * Memory
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 34K bytes
    - Viewed (0)
  7. tests/test_response_model_as_return_annotation.py

        app = FastAPI()
        with pytest.raises(FastAPIError) as e:
    
            @app.get("/")
            def read_root() -> Union[Response, None]:
                return Response(content="Foo")  # pragma: no cover
    
        assert "valid Pydantic field type" in e.value.args[0]
        assert "parameter response_model=None" in e.value.args[0]
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Aug 14 09:49:57 GMT 2023
    - 47.7K bytes
    - Viewed (0)
Back to top