diff --git a/docs/api.md b/docs/api.md index 170d368..3c3a61c 100644 --- a/docs/api.md +++ b/docs/api.md @@ -149,7 +149,7 @@ Shortcut for creating and mocking a `HTTPX` [Response](#response). > Response *text* content to mock, with automatic content-type header added. > * **html** - *(optional) str* > Response *HTML* content to mock, with automatic content-type header added. -> * **json** - *(optional) str | list | dict* +> * **json** - *(optional) Any* > Response *JSON* content to mock, with automatic content-type header added. > * **stream** - *(optional) Iterable[bytes]* > Response *stream* to mock. @@ -190,7 +190,7 @@ Shortcut for creating and mocking a `HTTPX` [Response](#response). > Text content, with automatic content-type header added. > * **html** - *(optional) str* > HTML content, with automatic content-type header added. -> * **json** - *(optional) str | list | dict* +> * **json** - *(optional) Any* > JSON content, with automatic content-type header added. > * **stream** - *(optional) Iterable[bytes]* > Content *stream*. diff --git a/respx/models.py b/respx/models.py index 9690324..7585171 100644 --- a/respx/models.py +++ b/respx/models.py @@ -277,7 +277,7 @@ def respond( content: Optional[Content] = None, text: Optional[str] = None, html: Optional[str] = None, - json: Optional[Union[str, List, Dict]] = None, + json: Any = None, stream: Optional[Union[httpx.SyncByteStream, httpx.AsyncByteStream]] = None, content_type: Optional[str] = None, http_version: Optional[str] = None,