feat: use redocs and scalar as api docs (#228)

Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>
This commit is contained in:
Michele Dolfi
2025-06-17 09:54:00 -05:00
committed by GitHub
parent 196c5ce42a
commit 873d05aefe
6 changed files with 36 additions and 7 deletions

View File

@@ -36,7 +36,7 @@ def FormDepends(cls: type[BaseModel]):
annotation = model_field.annotation
description = model_field.description
default = (
Form(..., description=description)
Form(..., description=description, examples=model_field.examples)
if model_field.is_required()
else Form(
model_field.default,