Open pgjones opened 2 years ago
You can have something like:
@dataclass
class Models:
__root__: list[Model]
That way the schema is shown fine, but you'll need to change the way the reply is handled. (PydanticModel.asdict
will be a dict including root, while PydanticModel.json
produces a nicer the list result)
How to indicate and type hint this?
@validate_response(list[Model]) ??