mirror of
https://github.com/fastapi/fastapi.git
synced 2026-04-29 03:04:49 -04:00
📝 Fix code consistency in examples for Tutorial - User Guide - Path Parameters (#2158)
This commit is contained in:
@@ -12,7 +12,7 @@ class ModelName(str, Enum):
|
||||
app = FastAPI()
|
||||
|
||||
|
||||
@app.get("/model/{model_name}")
|
||||
@app.get("/models/{model_name}")
|
||||
async def get_model(model_name: ModelName):
|
||||
if model_name == ModelName.alexnet:
|
||||
return {"model_name": model_name, "message": "Deep Learning FTW!"}
|
||||
|
||||
Reference in New Issue
Block a user