From 3b7db8df3581745067cdc5a34bf78b4e1bf3d974 Mon Sep 17 00:00:00 2001 From: Felix Yan Date: Sat, 14 Nov 2020 08:56:10 +0800 Subject: [PATCH] Fix for apispec 4 Fixes https://github.com/flasgger/flasgger/issues/436 --- flasgger/marshmallow_apispec.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flasgger/marshmallow_apispec.py b/flasgger/marshmallow_apispec.py index cd37d7e7..b956ffea 100644 --- a/flasgger/marshmallow_apispec.py +++ b/flasgger/marshmallow_apispec.py @@ -25,7 +25,7 @@ Schema = None fields = None schema2jsonschema = lambda schema: {} # noqa - schema2parameters = lambda schema: [] # noqa + schema2parameters = lambda schema, location: [] # noqa BaseAPISpec = object @@ -125,7 +125,7 @@ def convert_schemas(d, definitions=None): "$ref": "#/definitions/{0}".format(v.__name__) } if k == 'parameters': - new[k] = schema2parameters(v) + new[k] = schema2parameters(v, location="body") new[k][0]['schema'] = ref else: new[k] = ref