From 8c3464eed0960931cbca1b0e2a8074abd7676c30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A5=D1=83=D1=81=D0=BD=D0=B8=D0=B4=D0=B4=D0=B8=D0=BD?= Date: Sat, 29 Jul 2023 19:36:57 +0500 Subject: [PATCH] fix #246 --- piccolo_api/crud/endpoints.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/piccolo_api/crud/endpoints.py b/piccolo_api/crud/endpoints.py index 847e6e5..b904848 100644 --- a/piccolo_api/crud/endpoints.py +++ b/piccolo_api/crud/endpoints.py @@ -315,7 +315,7 @@ def _pydantic_model_output( include_readable=include_readable, include_columns=include_columns, model_name=f"{self.table.__name__}Output", - nested=nested, + nested=nested, **self.schema_extra, ) @property @@ -337,6 +337,7 @@ def pydantic_model_optional(self) -> t.Type[pydantic.BaseModel]: include_default_columns=True, all_optional=True, model_name=f"{self.table.__name__}Optional", + **self.schema_extra, ) def pydantic_model_plural( @@ -355,6 +356,7 @@ def pydantic_model_plural( include_columns=include_columns, model_name=f"{self.table.__name__}Item", nested=nested, + **self.schema_extra, ) return pydantic.create_model( str(self.table.__name__) + "Plural",