@@ -27,21 +27,22 @@ def _parse_document(data, base_url=None):
27
27
name = _get_string (parameter , 'name' )
28
28
location = _get_string (parameter , 'in' )
29
29
required = _get_bool (parameter , 'required' , default = (location == 'path' ))
30
+ description = _get_string (parameter , 'description' )
30
31
if location == 'body' :
31
32
schema = _get_dict (parameter , 'schema' , dereference_using = data )
32
33
expanded = _expand_schema (schema )
33
34
if expanded is not None :
34
35
expanded_fields = [
35
- Field (name = field_name , location = 'form' , required = is_required )
36
+ Field (name = field_name , location = 'form' , required = is_required , description = description )
36
37
for field_name , is_required in expanded
37
38
if not any ([field .name == name for field in fields ])
38
39
]
39
40
fields += expanded_fields
40
41
else :
41
- field = Field (name = name , location = 'body' , required = True )
42
+ field = Field (name = name , location = 'body' , required = True , description = description )
42
43
fields .append (field )
43
44
else :
44
- field = Field (name = name , location = location , required = required )
45
+ field = Field (name = name , location = location , required = required , description = description )
45
46
fields .append (field )
46
47
link = Link (url = url , action = action , fields = fields )
47
48
0 commit comments