mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
feat(nodes): add script to generate openapi.json
This commit is contained in:
parent
591d6bcdda
commit
d6104a3cea
15
invokeai/app/util/generate_openapi_json.py
Normal file
15
invokeai/app/util/generate_openapi_json.py
Normal file
@ -0,0 +1,15 @@
|
||||
# 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)
|
Loading…
Reference in New Issue
Block a user