mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
16 lines
341 B
Python
16 lines
341 B
Python
|
# Generate the OpenAPI schema json
|
||
|
|
||
|
import json
|
||
|
from invokeai.app.api_app import app
|
||
|
from fastapi.openapi.utils import get_openapi
|
||
|
|
||
|
openapi_doc = get_openapi(
|
||
|
title=app.title,
|
||
|
version=app.version,
|
||
|
openapi_version=app.openapi_version,
|
||
|
routes=app.routes,
|
||
|
)
|
||
|
|
||
|
with open("./openapi.json", "w") as f:
|
||
|
json.dump(openapi_doc, f)
|