37 lines
1,010 B
Python
37 lines
1,010 B
Python
# pylint: disable=too-few-public-methods
|
|
import os
|
|
from pathlib import Path
|
|
|
|
from .. import __version__
|
|
|
|
class ServerSettings:
|
|
HOSTNAME = os.environ.get("SUPPORT_FORMATTER_HOST", "localhost")
|
|
PORT = int(os.environ.get("SUPPORT_FORMATTER_PORT", 5000))
|
|
|
|
class APISettings:
|
|
API_TITLE = "Support Organizer"
|
|
API_VERSION = __version__
|
|
OPENAPI_VERSION = "3.1.0"
|
|
|
|
# openapi.json settings
|
|
OPENAPI_URL_PREFIX = "/"
|
|
OPENAPI_JSON_PATH = "openapi.json"
|
|
|
|
# swagger settings
|
|
OPENAPI_SWAGGER_UI_PATH = "/swagger"
|
|
OPENAPI_SWAGGER_UI_URL = "https://cdn.jsdelivr.net/npm/swagger-ui-dist@5.10.0/"
|
|
SWAGGER_UI_DOC_EXPANSION = "list"
|
|
|
|
# Info settings
|
|
API_SPEC_OPTIONS = {
|
|
'info': {
|
|
'description': 'Support Organizer for FGO'
|
|
}
|
|
}
|
|
|
|
PAGES_DIRECTORY = Path(__file__).parents[1] / "pages"
|
|
|
|
ALLOWED_EXTENSIONS = { 'csv', 'txt' }
|
|
FILE_SAVE_DIRECTORY = Path(__file__).parents[1] / ".temp"
|
|
|
|
UI_URL = "https://support-formatter.firq.dev/"
|