Initial Version
This commit is contained in:
commit
3046b1ee7b
21 changed files with 491 additions and 0 deletions
support_formatter/config
1
support_formatter/config/__init__.py
Normal file
1
support_formatter/config/__init__.py
Normal file
|
@ -0,0 +1 @@
|
|||
from .settings import APISettings, ServerSettings
|
35
support_formatter/config/settings.py
Normal file
35
support_formatter/config/settings.py
Normal file
|
@ -0,0 +1,35 @@
|
|||
# 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"
|
Loading…
Add table
Add a link
Reference in a new issue