From ce5691709e8b1aba0f169841e1d69f1f08ab2293 Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Thu, 13 Oct 2016 14:39:56 +0100 Subject: [PATCH] Include 'type' --- openapi_codec/encode.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/openapi_codec/encode.py b/openapi_codec/encode.py index a95aaed..5a6fea8 100644 --- a/openapi_codec/encode.py +++ b/openapi_codec/encode.py @@ -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: @@ -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) 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