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:
kingbri 2024-09-18 21:08:45 -04:00
parent ac4b3100d0
commit 2fd02cf4fc

View file

@ -3,12 +3,13 @@ from loguru import logger
from common.tabby_config import config, generate_config_file
from endpoints.server import export_openapi
from endpoints.utils import do_export_openapi
def branch_to_actions() -> bool:
"""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()
with open(config.actions.openapi_export_path, "w") as f: