@@ -104,7 +104,13 @@ def _add_routers(self, path: str):
104104 500 : {"model" : ExceptionResponseSchema },
105105 }
106106 if hasattr (self .class_list , "get" ):
107- self ._routers .get (path , tags = self ._tags , response_model = self ._resp_schema_list , responses = error_responses ,)(
107+ self ._routers .get (
108+ path ,
109+ tags = self ._tags ,
110+ response_model = self ._resp_schema_list ,
111+ responses = error_responses ,
112+ summary = f"Get list of `{ self ._type } ` objects" ,
113+ )(
108114 get_list_jsonapi (schema = self ._schema , type_ = self ._type , schema_resp = self ._resp_schema_list )(
109115 self .class_list .get
110116 )
@@ -116,6 +122,8 @@ def _add_routers(self, path: str):
116122 tags = self ._tags ,
117123 response_model = self ._resp_schema_detail ,
118124 responses = error_responses ,
125+ summary = f"Create object `{ self ._type } `"
126+
119127 )(
120128 post_list_jsonapi (
121129 schema = self ._schema ,
@@ -131,6 +139,7 @@ def _add_routers(self, path: str):
131139 tags = self ._tags ,
132140 response_model = self ._resp_schema_detail ,
133141 responses = error_responses ,
142+ summary = f"Get object `{ self ._type } ` by id"
134143 )(
135144 get_detail_jsonapi (schema = self ._schema , type_ = self ._type , schema_resp = self ._resp_schema_detail )(
136145 self .class_detail .get
@@ -143,6 +152,7 @@ def _add_routers(self, path: str):
143152 tags = self ._tags ,
144153 response_model = self ._resp_schema_detail ,
145154 responses = error_responses ,
155+ summary = f"Update object `{ self ._type } ` by id"
146156 )(
147157 patch_detail_jsonapi (
148158 schema = self ._schema ,
@@ -156,4 +166,5 @@ def _add_routers(self, path: str):
156166 self ._routers .delete (
157167 path + "/{obj_id}" ,
158168 tags = self ._tags ,
169+ summary = f"Delete object of type `{ self ._type } `"
159170 )(delete_detail_jsonapi (schema = self ._schema )(self .class_detail .delete ))
0 commit comments