Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 1 of 1 for get_invalid_none (0.05 seconds)

The search processing time has exceeded the limit. The displayed results may be partial.

  1. tests/test_validate_response.py

    def get_invalid():
        return {"name": "invalid", "price": "foo"}
    
    
    @app.get("/items/invalidnone", response_model=Item)
    def get_invalid_none():
        return None
    
    
    @app.get("/items/validnone", response_model=Union[Item, None])
    def get_valid_none(send_none: bool = False):
        if send_none:
            return None
        else:
            return {"name": "invalid", "price": 3.2}
    
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 21:25:59 GMT 2025
    - 2K bytes
    - Click Count (0)
Back to Top