FastAPI - Dependency Injection
Identify the issue in the following FastAPI code snippet:
def fetch_value():
return 10
@app.get('/value/')
def get_value(val: int = Depends(fetch_value())):
return {"val": val}