diff --git a/src/openforms/api/drf_spectacular/plumbing.py b/src/openforms/api/drf_spectacular/plumbing.py index 0b6fa2fc6f..9394876f5f 100644 --- a/src/openforms/api/drf_spectacular/plumbing.py +++ b/src/openforms/api/drf_spectacular/plumbing.py @@ -4,6 +4,7 @@ ResolvedComponent, build_basic_type, build_parameter_type, + get_lib_doc_excludes as _get_lib_doc_excludes, ) from drf_spectacular.utils import OpenApiParameter, inline_serializer from rest_framework.fields import Field @@ -72,3 +73,13 @@ def extend_inline_serializer( return inline_serializer( name or serializer.__name__, serializer().get_fields() | fields, **kwargs ) + + +def get_lib_doc_excludes(): + from openforms.contrib.zgw.api.serializers import CatalogueSerializer + + base = _get_lib_doc_excludes() + extra = [ + CatalogueSerializer, + ] + return [*base, *extra] diff --git a/src/openforms/conf/base.py b/src/openforms/conf/base.py index 291dd1d2a5..e6411494aa 100644 --- a/src/openforms/conf/base.py +++ b/src/openforms/conf/base.py @@ -985,6 +985,7 @@ "AvailableLanguagesEnum": "django.conf.settings.LANGUAGES", "StatementCheckboxEnum": "openforms.forms.constants.StatementCheckboxChoices", }, + "GET_LIB_DOC_EXCLUDES": "openforms.api.drf_spectacular.plumbing.get_lib_doc_excludes", } #