diff --git a/api/config/schema.py b/api/config/schema.py index caa1296d1..b1e5ab632 100644 --- a/api/config/schema.py +++ b/api/config/schema.py @@ -53,9 +53,6 @@ def custom_preprocessing_hook(endpoints): if path.startswith("/api/v1/users/users"): continue - if path.startswith("/api/v1/mutations"): - continue - if path.startswith(f"/api/{api_type}"): filtered.append((path, path_regex, method, callback)) diff --git a/api/funkwhale_api/common/filters.py b/api/funkwhale_api/common/filters.py index 6bfa12f04..600ca6a01 100644 --- a/api/funkwhale_api/common/filters.py +++ b/api/funkwhale_api/common/filters.py @@ -1,6 +1,8 @@ from django import forms from django.db.models import Q +from drf_spectacular.utils import extend_schema_field + from django_filters import widgets from django_filters import rest_framework as filters @@ -52,6 +54,7 @@ class CoerceChoiceField(forms.ChoiceField): raise forms.ValidationError("Invalid value {}".format(value)) +@extend_schema_field(bool) class NullBooleanFilter(filters.ChoiceFilter): field_class = CoerceChoiceField diff --git a/changes/changelog.d/mutations.enhancement b/changes/changelog.d/mutations.enhancement new file mode 100644 index 000000000..711281961 --- /dev/null +++ b/changes/changelog.d/mutations.enhancement @@ -0,0 +1 @@ +Make mutations endpoint appear in openapi specs