From da2cac1eb241da5ba80bd26100ec203a39abef21 Mon Sep 17 00:00:00 2001 From: Joeri Bekker Date: Wed, 24 Jan 2018 15:31:45 +0100 Subject: [PATCH] Fixes #116: Pick up custom schema's defined on the view. --- drf_openapi/entities.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drf_openapi/entities.py b/drf_openapi/entities.py index 70bba2d..d6ff4e9 100644 --- a/drf_openapi/entities.py +++ b/drf_openapi/entities.py @@ -161,6 +161,9 @@ def get_link(self, path, method, view, version=None): fields += view.schema.get_pagination_fields(path, method) fields += view.schema.get_filter_fields(path, method) + manual_fields = view.schema.get_manual_fields(path, method) + fields = view.schema.update_fields(fields, manual_fields) + if fields and any([field.location in ('form', 'body') for field in fields]): encoding = view.schema.get_encoding(path, method) else: