mirror of
https://github.com/theroyallab/tabbyAPI.git
synced 2026-04-23 07:49:04 +00:00
Startup actions: Add openapi var check
This is required to exit once the openapi spec is created. Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
@@ -3,12 +3,13 @@ from loguru import logger
|
|||||||
|
|
||||||
from common.tabby_config import config, generate_config_file
|
from common.tabby_config import config, generate_config_file
|
||||||
from endpoints.server import export_openapi
|
from endpoints.server import export_openapi
|
||||||
|
from endpoints.utils import do_export_openapi
|
||||||
|
|
||||||
|
|
||||||
def branch_to_actions() -> bool:
|
def branch_to_actions() -> bool:
|
||||||
"""Checks if a optional action needs to be run."""
|
"""Checks if a optional action needs to be run."""
|
||||||
|
|
||||||
if config.actions.export_openapi:
|
if config.actions.export_openapi or do_export_openapi:
|
||||||
openapi_json = export_openapi()
|
openapi_json = export_openapi()
|
||||||
|
|
||||||
with open(config.actions.openapi_export_path, "w") as f:
|
with open(config.actions.openapi_export_path, "w") as f:
|
||||||
|
|||||||
Reference in New Issue
Block a user