40 lines
1.2 KiB
Python
40 lines
1.2 KiB
Python
from fastapi import Depends, FastAPI, Request
|
|
# from fastapi.openapi.docs import get_swagger_ui_html
|
|
# from fastapi.openapi.utils import get_openapi
|
|
|
|
from .routers_v3 import current, players, results, schedules, standings, teams, transactions, battingstats, \
|
|
pitchingstats, fieldingstats, draftpicks
|
|
|
|
app = FastAPI(
|
|
responses={404: {'description': 'Not found'}}
|
|
)
|
|
|
|
|
|
app.include_router(current.router)
|
|
app.include_router(players.router)
|
|
app.include_router(results.router)
|
|
app.include_router(schedules.router)
|
|
app.include_router(teams.router)
|
|
app.include_router(transactions.router)
|
|
app.include_router(standings.router)
|
|
app.include_router(battingstats.router)
|
|
app.include_router(pitchingstats.router)
|
|
app.include_router(fieldingstats.router)
|
|
app.include_router(draftpicks.router)
|
|
|
|
|
|
# @app.get("/docs", include_in_schema=False)
|
|
# async def get_docs(req: Request):
|
|
# print(req.scope)
|
|
# return get_swagger_ui_html(openapi_url=req.scope.get('root_path')+'/openapi.json', title='Swagger')
|
|
#
|
|
#
|
|
# @app.get("/openapi.json", include_in_schema=False)
|
|
# async def openapi():
|
|
# return get_openapi(title='SBa Dev API', version=f'0.1.1', routes=app.routes)
|
|
|
|
|
|
# @app.get("/api")
|
|
# async def root():
|
|
# return {"message": "Hello Bigger Applications!"}
|