8000 Include 'type' by tomchristie · Pull Request #18 · core-api/python-openapi-codec · GitHub
[go: up one dir, main page]

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

Include 'type' #18

Merged
merged 1 commit into from
Oct 13, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions openapi_codec/encode.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,15 @@ def _get_parameters(link, encoding):
'required': field.required,
'in': 'formData',
'description': field.description,
'type': 'string'
'type': field.type or 'string'
}
parameters.append(parameter)
else:
# Expand coreapi fields with location='form' into a single swagger
# parameter, with a schema containing multiple properties.
schema_property = {
'description': field.description
'description': field.description,
'type': field.type or 'string'
}
properties[field.name] = schema_property
if field.required:
Expand All @@ -147,7 +148,7 @@ def _get_parameters(link, encoding):
'required': field.required,
'in': location,
'description': field.description,
'type': 'string'
'type': field.type or 'string'
}
parameters.append(parameter)

Expand Down
0