-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfast.py
59 lines (48 loc) · 1.65 KB
/
fast.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import uuid
from fastapi import FastAPI
import modules.api
from modules.payloads import messages
from airium import Airium
from fastapi.openapi.utils import get_openapi
app = FastAPI()
from modules.routers import players
app.include_router(players.router)
from modules.routers import rounds
app.include_router(rounds.router)
from modules.routers import customers
app.include_router(customers.router)
from modules.routers import users
app.include_router(users.router)
from modules.routers import notifications
app.include_router(notifications.router)
from modules.routers import searches
app.include_router(searches.router)
from modules.routers import report
app.include_router(report.router)
from modules.routers import background_check
app.include_router(background_check.router)
from modules.routers import client
app.include_router(client.router)
@app.get("/", tags=['Meta'], response_model=messages.Message)
async def welcome():
"""Welcome to the game."""
message = messages.Message(message="Welcome to the Game")
return message
def custom_openapi():
"""Setup the description, title, and other data for the openAPI File"""
if app.openapi_schema:
return app.openapi_schema
description = ""
description = modules.api.description()
openapi_schema = get_openapi(
title="Temporal Background Check Game",
version="0.0.1",
description=description,
routes=app.routes,
)
openapi_schema["info"]["x-logo"] = {
"url": "https://temporal.io/images/logos/logo-temporal-with-copy.svg"
}
app.openapi_schema = openapi_schema
return app.openapi_schema
app.openapi = custom_openapi