fastapi 设置docs不显示某个接口的说明
fastapi 设置docs不显示某个接口的说明
只需要设置include_in_schema = False
from typing import List
from starlette.responses import RedirectResponse
from fastapi import Depends, FastAPI, HTTPException ,Body
import uvicorn
app = FastAPI(title="Project Health",version="1.0")
@app.get("/",include_in_schema = False)
async def help():
response=RedirectResponse("http://1127.0.0.1:10240/docs")
return response
# return "please visit for more detail"