Yurii Karabas
d0573f5713
✨ Add support for function return type annotations to declare the `response_model` ( #1436 )
...
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2023-01-07 17:45:48 +04:00
Eugenio Panadero
46974c510e
⬆ Bump Starlette to version `0.22.0` to fix bad encoding for query parameters in `TestClient` ( #5659 )
...
closes https://github.com/tiangolo/fastapi/issues/5646
2022-11-27 15:46:06 +01:00
Sebastián Ramírez
fa74093440
✨ Use Ruff for linting ( #5630 )
2022-11-13 19:19:04 +01:00
Sebastián Ramírez
f92f87d379
📝 Update references to Requests for tests to HTTPX, and add HTTPX to extras ( #5628 )
2022-11-13 16:20:05 +01:00
Paweł Rubin
fdbd48be5f
⬆ Upgrade Starlette to `0.21.0`, including the new [`TestClient` based on HTTPX]( https://github.com/encode/starlette/releases/tag/0.21.0 ) ( #5471 )
...
Co-authored-by: Paweł Rubin <pawel.rubin@ocado.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2022-11-13 15:26:09 +01:00
Irfanuddin Shafi Ahmed
5cd99a9517
🎨 Format OpenAPI JSON in `test_starlette_exception.py` ( #5379 )
2022-11-03 21:06:00 +01:00
Adrian Garcia Badaracco
ac9f56ea5e
🐛 Close FormData (uploaded files) after the request is done ( #5465 )
...
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2022-11-03 13:06:52 +01:00
Jarro van Ginkel
0ae8db447a
🐛 Fix support for strings in OpenAPI status codes: `default`, `1XX`, `2XX`, `3XX`, `4XX`, `5XX` ( #5187 )
...
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2022-10-14 22:44:22 +02:00
Marcelo Trylesinski
adcf03f2bc
⬆ Upgrade version required of Starlette from `0.19.1` to `0.20.4` ( #4820 )
...
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2022-09-15 14:32:05 +02:00
Irfanuddin Shafi Ahmed
4d270463af
🐛 Fix `RuntimeError` raised when `HTTPException` has a status code with no content ( #5365 )
...
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2022-09-11 16:13:36 +00:00
Thomas Meckel
0b4fe10c8f
🐛 Fix empty reponse body when default `status_code` is empty but the a `Response` parameter with `response.status_code` is set ( #5360 )
...
Co-authored-by: Thomas Meckel <tmeckel@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2022-09-08 15:02:59 +00:00
DCsunset
3ec498af63
✨ Add support in `jsonable_encoder` for include and exclude with dataclasses ( #4923 )
...
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2022-09-08 16:29:23 +02:00
Charlie DiGiovanna
56f887de15
🐛 Make sure a parameter defined as required is kept required in OpenAPI even if defined as optional in another dependency ( #4319 )
...
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2022-09-03 17:12:41 +00:00
abc.zxy
7250c194da
✨ Update `ORJSONResponse` to support non `str` keys and serializing Numpy arrays ( #3892 )
...
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-09-02 10:17:31 +00:00
Sebastián Ramírez
356a57daa8
📝 Add docs for creating a custom Response class ( #5331 )
2022-09-01 09:32:30 +00:00
David Brochart
d8b6aa630c
🐛 Fix support for path parameters in WebSockets ( #3879 )
...
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2022-09-01 10:50:47 +02:00
supraaxdd
5e34cb1868
✏ Fix typos in `tests/test_schema_extra_examples.py` ( #5126 )
2022-08-26 16:36:41 +02:00
Seungho Kim
d86b54e79b
🔥 Delete duplicated tests in `tests/test_tutorial/test_sql_databases/test_sql_databases.py` ( #5040 )
2022-08-26 16:08:45 +02:00
Luis R
22bed0008c
🐛 Fix `jsonable_encoder` for dataclasses with pydantic-compatible fields ( #3607 )
...
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-08-26 15:56:47 +02:00
Ori Levari
880c8b37cf
🐛 Fix support for extending `openapi_extras` with parameter lists ( #4267 )
...
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2022-08-26 09:26:20 +00:00
juntatalor
ca2fae0588
✨ Add support for `FrozenSet` in parameters (e.g. query) ( #2938 )
...
Co-authored-by: saborisov <borisov_s@tass.ru>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2022-08-25 23:52:53 +02:00
Andy Challis
eb3ab337ab
✨ Allow custom middlewares to raise `HTTPException`s and propagate them ( #2036 )
...
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-08-25 23:44:40 +02:00
Andrey Semakin
f6808e76dc
♻ Strip empty whitespace from description extracted from docstrings ( #2821 )
...
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2022-08-23 13:47:19 +00:00
laggardkernel
b993b4af28
🐛 Fix cached dependencies when using a dependency in `Security()` and other places (e.g. `Depends()`) with different OAuth2 scopes ( #2945 )
...
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2022-08-23 13:30:24 +00:00
Taneli Hukkinen
634cf22584
🐛 Fix `response_model` not invalidating `None` ( #2725 )
...
Co-authored-by: Taneli Hukkinen <hukkinj1@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2022-08-22 19:17:45 +00:00
Xavi Moreno
eb2e183361
🐛 Fix `jsonable_encoder` using `include` and `exclude` parameters for non-Pydantic objects ( #2606 )
...
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2022-08-18 22:48:21 +02:00
Luca Repetti
e88089ec21
🐛 Fix edge case with repeated aliases names not shown in OpenAPI ( #2351 )
...
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2022-08-18 20:31:19 +00:00
Sebastián Ramírez
c43120258f
🐛 Fix removing body from status codes that do not support it ( #5145 )
2022-07-14 13:19:42 +02:00
Sebastián Ramírez
acab64b3c3
✅ Add tests for required nonable parameters and body fields ( #4907 )
2022-05-14 19:08:31 +00:00
Sebastián Ramírez
9262fa8362
✨ Add support for not needing `...` as default value in required Query(), Path(), Header(), etc. ( #4906 )
...
* ✨ Do not require default value in Query(), Path(), Header(), etc
* 📝 Update source examples for docs with default and required values
* ✅ Update tests with new default values and not required Ellipsis
* 📝 Update docs for Query params and update info about default value, required, Ellipsis
2022-05-13 18:38:22 -05:00
Marcelo Trylesinski
86fa3cb24f
⬆ Upgrade Starlette from 0.18.0 to 0.19.0 ( #4488 )
...
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2022-05-09 13:06:42 -05:00
Sebastián Ramírez
ddd9da3db4
✅ Fix new/recent tests with new fixed `ValidationError` JSON Schema ( #4806 )
2022-04-17 20:55:36 +00:00
dconathan
c449ae5c74
🐛 Fix JSON Schema for `ValidationError` at field `loc` ( #3810 )
...
Co-authored-by: Devin Conathan <dconatha@amfam.com>
2022-04-17 19:41:46 +02:00
Marcelo Trylesinski
d81c908132
🐛 Fix support for prefix on APIRouter WebSockets ( #2640 )
...
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2022-04-17 19:21:53 +02:00
Sebastián Ramírez
e1d0e3874b
➖ Temporarily remove typer-cli from dependencies and upgrade Black ( #4754 )
2022-04-01 23:01:51 +00:00
Sebastián Ramírez
8a0d4c79c1
✨ Add support for custom `generate_unique_id_function` and docs for generating clients ( #4650 )
2022-03-04 23:02:18 +01:00
Sebastián Ramírez
f5d7df3c6c
✨ Include route in scope to allow middleware and other tools to extract its information ( #4603 )
2022-02-21 16:51:26 +01:00
Sebastián Ramírez
9d56a3cb59
✨ Update internal `AsyncExitStack` to fix context for dependencies with `yield` ( #4575 )
2022-02-17 13:40:12 +01:00
Victor Benichoux
a698908ed6
🐛 Fix bug preventing to use OpenAPI when using tuples ( #3874 )
...
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2022-01-23 23:13:55 +01:00
Sebastián Ramírez
1bf55200a9
✨ Add support for declaring `UploadFile` parameters without explicit `File()` ( #4469 )
2022-01-23 19:14:13 +00:00
Sebastián Ramírez
569afb4378
✨ Add support for tags with Enums ( #4468 )
2022-01-23 18:43:04 +01:00
Sebastián Ramírez
d4608a00cf
🐛 Prefer custom encoder over defaults if specified in `jsonable_encoder` ( #4467 )
...
Co-authored-by: Vivek Sunder <sviveksunder@gmail.com>
2022-01-23 17:32:04 +01:00
Mark
ca5d57ea79
✨ Allow hiding from OpenAPI (and Swagger UI) `Query`, `Cookie`, `Header`, and `Path` parameters ( #3144 )
...
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2022-01-23 16:54:59 +01:00
John Riebold
a85aa125d2
✨ Enable configuring Swagger UI parameters ( #2568 )
...
Co-authored-by: Artem Ivanov <artem@worklife.io>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2022-01-16 20:26:24 +01:00
Sebastián Ramírez
d08a062ee2
✨ Add docs and tests for Python 3.9 and Python 3.10 ( #3712 )
...
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
2022-01-07 15:11:31 +01:00
Eric Jolibois
b0cd4d7e7e
🐛 Fix JSON Schema for dataclasses, supporting the fixes in Pydantic 1.9 ( #4272 )
...
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2021-12-12 12:28:35 +01:00
Thomas Grainger
11d0a08acd
✨ Add support for Trio via AnyIO ( #3372 )
...
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2021-10-06 17:32:11 +02:00
Sebastián Ramírez
20d4834546
✨ Add support for `read_with_orm_mode`, to support SQLModel relationship attributes ( #3757 )
2021-08-24 10:21:05 +00:00
Marcelo Trylesinski
ab33ba27af
⬆ Add support for Python 3.9 ( #2298 )
...
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2021-08-02 16:02:34 +02:00
Edouard Lavery-Plante
836bb97a2d
✨ Add support for extensions and updates to the OpenAPI schema in path operations ( #1922 )
...
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2021-07-29 22:01:13 +02:00