4
4
from ellar .common import Body , post
5
5
from ellar .common .serializer import serialize_object
6
6
from ellar .core import Request
7
- from ellar .openapi import OpenAPIDocumentBuilder
7
+ from ellar .openapi import OpenAPIDocumentBuilder , openapi_info
8
8
from ellar .testing import Test
9
9
10
10
from .sample import Item , OtherItem , Product
@@ -25,7 +25,15 @@ def embed_qty(qty: Body[int, Body.P(12, embed=True)]):
25
25
26
26
27
27
@post ("/items/alias" )
28
- def alias_qty (qty : Body [int , Body .P (embed = True , alias = "aliasQty" )]):
28
+ @openapi_info (tags = ["Product" ], description = "Modify Product Qty" , deprecated = True )
29
+ def alias_qty (
30
+ qty : Body [
31
+ int ,
32
+ Body .P (
33
+ embed = True , alias = "aliasQty" , description = "Product Qty" , deprecated = True
34
+ ),
35
+ ],
36
+ ):
29
37
return {"qty" : qty }
30
38
31
39
@@ -78,6 +86,8 @@ def alias_qty(qty: Body[int, Body.P(embed=True, alias="aliasQty")]):
78
86
},
79
87
"/items/alias" : {
80
88
"post" : {
89
+ "tags" : ["Product" ],
90
+ "description" : "Modify Product Qty" ,
81
91
"operationId" : "alias_qty_items_alias_post" ,
82
92
"requestBody" : {
83
93
"content" : {
@@ -109,6 +119,7 @@ def alias_qty(qty: Body[int, Body.P(embed=True, alias="aliasQty")]):
109
119
},
110
120
},
111
121
},
122
+ "deprecated" : True ,
112
123
}
113
124
},
114
125
"/items/embed" : {
@@ -196,7 +207,13 @@ def alias_qty(qty: Body[int, Body.P(embed=True, alias="aliasQty")]):
196
207
"title" : "ValidationError" ,
197
208
},
198
209
"body_alias_qty_items_alias_post" : {
199
- "properties" : {"aliasQty" : {"type" : "integer" , "title" : "Aliasqty" }},
210
+ "properties" : {
211
+ "aliasQty" : {
212
+ "type" : "integer" ,
213
+ "title" : "Aliasqty" ,
214
+ "description" : "Product Qty" ,
215
+ }
216
+ },
200
217
"type" : "object" ,
201
218
"required" : ["aliasQty" ],
202
219
"title" : "body_alias_qty_items_alias_post" ,
0 commit comments