8000 Include 'type' · Pix4D/python-openapi-codec@ce56917 · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit ce56917

Browse files
committed
Include 'type'
1 parent ee10517 commit ce56917

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

openapi_codec/encode.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,14 +115,15 @@ def _get_parameters(link, encoding):
115115
'required': field.required,
116116
'in': 'formData',
117117
'description': field.description,
118-
'type': 'string'
118+
'type': field.type or 'string'
119119
}
120120
parameters.append(parameter)
121121
else:
122122
# Expand coreapi fields with location='form' into a single swagger
123123
# parameter, with a schema containing multiple properties.
124124
schema_property = {
125-
'description': field.description
125+
'description': field.description,
126+
'type': field.type or 'string'
126127
}
127128
properties[field.name] = schema_property
128129
if field.required:
@@ -147,7 +148,7 @@ def _get_parameters(link, encoding):
147148
'required': field.required,
148149
'in': location,
149150
'description': field.description,
150-
'type': 'string'
151+
'type': field.type or 'string'
151152
}
152153
parameters.append(parameter)
153154

0 commit comments

Comments
 (0)
0