Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for density (0.18 sec)

  1. tests/test_enforce_once_required_parameter.py

        actual_schema = response.json()
        assert actual_schema == expected_schema
    
    
    def test_get_invalid():
        response = client.get("/foo")
        assert response.status_code == status.HTTP_422_UNPROCESSABLE_ENTITY
    
    
    def test_get_valid():
        response = client.get("/foo", params={"client_id": "bar"})
        assert response.status_code == 200
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 3.4K bytes
    - Viewed (0)
  2. docs/en/docs/deployment/https.md

    In this case, it would use the certificate for `someapp.example.com`.
    
    <img src="/img/deployment/https/https03.svg">
    
    The client already **trusts** the entity that generated that TLS certificate (in this case Let's Encrypt, but we'll see about that later), so it can **verify** that the certificate is valid.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jan 11 16:31:18 GMT 2024
    - 12K bytes
    - Viewed (0)
  3. docs/en/docs/tutorial/security/oauth2-jwt.md

    JWT might be used for other things apart from identifying a user and allowing them to perform operations directly on your API.
    
    For example, you could identify a "car" or a "blog post".
    
    Then you could add permissions about that entity, like "drive" (for the car) or "edit" (for the blog).
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 13K bytes
    - Viewed (0)
  4. docs/en/docs/release-notes.md

    * 📝 Simplify example for docs for Additional Responses, remove unnecessary `else`. PR [#4693](https://github.com/tiangolo/fastapi/pull/4693) by [@adriangb](https://github.com/adriangb).
    * 📝 Update docs, compare enums with identity instead of equality. PR [#4905](https://github.com/tiangolo/fastapi/pull/4905) by [@MicaelJarniac](https://github.com/MicaelJarniac).
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun Apr 28 00:28:00 GMT 2024
    - 385.5K bytes
    - Viewed (1)
  5. fastapi/exception_handlers.py

    from fastapi.websockets import WebSocket
    from starlette.exceptions import HTTPException
    from starlette.requests import Request
    from starlette.responses import JSONResponse, Response
    from starlette.status import HTTP_422_UNPROCESSABLE_ENTITY, WS_1008_POLICY_VIOLATION
    
    
    async def http_exception_handler(request: Request, exc: HTTPException) -> Response:
        headers = getattr(exc, "headers", None)
        if not is_body_allowed_for_status_code(exc.status_code):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun Jun 11 19:08:14 GMT 2023
    - 1.3K bytes
    - Viewed (0)
  6. fastapi/openapi/utils.py

        generate_operation_id_for_path,
        is_body_allowed_for_status_code,
    )
    from starlette.responses import JSONResponse
    from starlette.routing import BaseRoute
    from starlette.status import HTTP_422_UNPROCESSABLE_ENTITY
    from typing_extensions import Literal
    
    validation_error_definition = {
        "title": "ValidationError",
        "type": "object",
        "properties": {
            "loc": {
                "title": "Location",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 21.8K bytes
    - Viewed (0)
  7. docs_src/handling_errors/tutorial005.py

    app = FastAPI()
    
    
    @app.exception_handler(RequestValidationError)
    async def validation_exception_handler(request: Request, exc: RequestValidationError):
        return JSONResponse(
            status_code=status.HTTP_422_UNPROCESSABLE_ENTITY,
            content=jsonable_encoder({"detail": exc.errors(), "body": exc.body}),
        )
    
    
    class Item(BaseModel):
        title: str
        size: int
    
    
    @app.post("/items/")
    async def create_item(item: Item):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 667 bytes
    - Viewed (0)
  8. docs/en/docs/tutorial/extra-models.md

        ```
    
    ## Recap
    
    Use multiple Pydantic models and inherit freely for each case.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 7.7K bytes
    - Viewed (1)
Back to top