📝 Fix docs for Pydantic's fields using le (lte is invalid, use le ) (#207)

Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
This commit is contained in:
Jerry Wu
2023-10-24 00:28:51 +08:00
committed by GitHub
parent beb7a24275
commit d192142eb9
14 changed files with 24 additions and 30 deletions

View File

@ -58,7 +58,7 @@ def create_hero(hero: HeroCreate):
@app.get("/heroes/", response_model=List[HeroRead])
def read_heroes(offset: int = 0, limit: int = Query(default=100, lte=100)):
def read_heroes(offset: int = 0, limit: int = Query(default=100, le=100)):
with Session(engine) as session:
heroes = session.exec(select(Hero).offset(offset).limit(limit)).all()
return heroes