From 497327ce682eb59074469f18db5aa26ff79a1bb9 Mon Sep 17 00:00:00 2001 From: Eyal Salomon Date: Sun, 3 Oct 2021 18:14:15 +0300 Subject: [PATCH] [Requirements] Change `fastapi` to `~=0.67.0` to fix docs generation bug (#1377) --- requirements.txt | 5 ++++- tests/api/api/test_docs.py | 11 +++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 tests/api/api/test_docs.py diff --git a/requirements.txt b/requirements.txt index 24ac67da296..2faf86a9859 100644 --- a/requirements.txt +++ b/requirements.txt @@ -55,7 +55,10 @@ kubernetes~=11.0 # TODO: move to API requirements (shouldn't really be here, the sql run db using the API sqldb is preventing us from # separating the SDK and API code) (referring to humanfriendly and fastapi) humanfriendly~=8.2 -fastapi~=0.68.0 +# fastapi fail to present docs. happen due to fastapi changes in 0.68.0 +# the breaking PR is: https://github.com/tiangolo/fastapi/commit/97fa743ecb5a716fa0223a7463cb83f3f0df494c +# the bug report on: https://github.com/tiangolo/fastapi/issues/3782 +fastapi~= 0.67.0 fsspec~=0.9.0 v3iofs~=0.1.7 # 3.4 and above failed builidng in some images - see https://github.com/pyca/cryptography/issues/5771 diff --git a/tests/api/api/test_docs.py b/tests/api/api/test_docs.py new file mode 100644 index 00000000000..f83821cac71 --- /dev/null +++ b/tests/api/api/test_docs.py @@ -0,0 +1,11 @@ +import http + +import fastapi.testclient +import sqlalchemy.orm + + +def test_docs( + db: sqlalchemy.orm.Session, client: fastapi.testclient.TestClient +) -> None: + response = client.get("/api/openapi.json") + assert response.status_code == http.HTTPStatus.OK.value