mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
feat(scripts): add script to generate openapi schema
This commit is contained in:
parent
b1d72d411e
commit
474852ef7e
17
scripts/generate_openapi_schema.py
Normal file
17
scripts/generate_openapi_schema.py
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
import json
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
# Change working directory to the repo root
|
||||||
|
os.chdir(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||||
|
|
||||||
|
from invokeai.app.api_app import custom_openapi
|
||||||
|
|
||||||
|
schema = custom_openapi()
|
||||||
|
json.dump(schema, sys.stdout, indent=2)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
Loading…
x
Reference in New Issue
Block a user