Skip to content
This repository was archived by the owner on Mar 18, 2019. It is now read-only.

Commit 1943da4

Browse files
authored
Merge pull request #18 from core-api/include-type
Include 'type'
2 parents ee10517 + ce56917 commit 1943da4

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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy