This commit is contained in:
16
server-python/generate_schema.py
Normal file
16
server-python/generate_schema.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import json
|
||||
|
||||
from app import app
|
||||
from fastapi.openapi.utils import get_openapi
|
||||
|
||||
with open("openapi.json", "w") as f:
|
||||
json.dump(
|
||||
get_openapi(
|
||||
title=app.title,
|
||||
version=app.version,
|
||||
openapi_version=app.openapi_version,
|
||||
description=app.description,
|
||||
routes=app.routes,
|
||||
),
|
||||
f,
|
||||
)
|
||||
Reference in New Issue
Block a user