feat: Import + Translate recipe images with OpenAI (#3974)

Co-authored-by: Johan Lindell <johan@lindell.me>
Co-authored-by: boc-the-git <3479092+boc-the-git@users.noreply.github.com>
This commit is contained in:
authored and GitHub committed 2024-08-18 08:07:01 +10:00
1 parent 3d921cb677
commit 8a15f400e1
23 files changed
+924 -241

No files matched your search

+9 -2
View File
@@ -17,9 +17,16 @@ class PathObject(BaseModel):
http_verbs: list[HTTPRequest]
def get_path_objects(app: FastAPI):
paths = []
def force_include_in_schema(app: FastAPI):
# clear schema cache
app.openapi_schema = None
for route in app.routes:
route.include_in_schema = True
def get_path_objects(app: FastAPI):
force_include_in_schema(app)
paths = []
for key, value in app.openapi().items():
if key == "paths":
for key, value2 in value.items():