From 144d00a44b6f4b8f371ad33405300a7908514b04 Mon Sep 17 00:00:00 2001 From: Jurica Zeleznjak Date: Thu, 27 Jul 2017 15:33:40 +0200 Subject: [PATCH] Use provided Field schema (if it exists) Allows for nice overrides when using it with django-rest-swagger --- openapi_codec/encode.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openapi_codec/encode.py b/openapi_codec/encode.py index 13b3ef4..8a2054d 100644 --- a/openapi_codec/encode.py +++ b/openapi_codec/encode.py @@ -171,7 +171,7 @@ def _get_parameters(link, encoding): # https://github.com/OAI/OpenAPI-Specification/issues/50#issuecomment-112063782 schema = {'type': 'string', 'format': 'binary'} else: - schema = {} + schema = getattr(field, 'schema', {}) parameter = { 'name': field.name, 'required': field.required, 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