浏览代码

Changed order in the documentation

docpositionfix
Lorenzo Pollutri 1 个月前
父节点
当前提交
2f333fc76b
共有 1 个文件被更改,包括 13 次插入13 次删除
  1. +13
    -13
      app.py

+ 13
- 13
app.py 查看文件

@@ -199,19 +199,6 @@ async def root():
return get_swagger_ui_html(openapi_url="/openapi.json", title="docs")


@app.get("/openapi.json/", tags=["Documentation"])
async def get_open_api_endpoint():
#async def get_open_api_endpoint(current_user: User = Depends(get_current_active_user)):
return JSONResponse(get_openapi(title="MajorNet APIs", version="1.0", routes=app.routes))


@app.get("/docs/", tags=["Documentation"])
#async def get_documentation(current_user: User = Depends(get_current_active_user)):
async def get_documentation():
if DEBUG: print("SONO IN /DOCS")
return get_swagger_ui_html(openapi_url="/openapi.json", title="docs")


@app.get("/ble-ai/infer", tags=["BLE-AI"], dependencies=[Depends(get_current_user)])
async def get_ble_ai_infer(mac: Optional[List[str]] = Query(default=None)):
path = config_env.BLE_AI_INFER_CSV
@@ -252,6 +239,19 @@ async def get_ble_ai_infer(mac: Optional[List[str]] = Query(default=None)):
return {"items": items, "count": len(items)}


@app.get("/openapi.json/", tags=["Documentation"])
async def get_open_api_endpoint():
#async def get_open_api_endpoint(current_user: User = Depends(get_current_active_user)):
return JSONResponse(get_openapi(title="MajorNet APIs", version="1.0", routes=app.routes))


@app.get("/docs/", tags=["Documentation"])
#async def get_documentation(current_user: User = Depends(get_current_active_user)):
async def get_documentation():
if DEBUG: print("SONO IN /DOCS")
return get_swagger_ui_html(openapi_url="/openapi.json", title="docs")


@app.post("/majortel/call/", tags=["Majortel"])
async def route_call(active_user=Depends(manager),callerNumber=None, calledNumber=None):
try:


正在加载...
取消
保存