-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#18] unregister CamelizeFilterExtension
- Loading branch information
Showing
1 changed file
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,22 @@ | ||
from django.apps import AppConfig | ||
|
||
from drf_spectacular.extensions import OpenApiFilterExtension | ||
|
||
|
||
class ProducttypenConfig(AppConfig): | ||
default_auto_field = "django.db.models.BigAutoField" | ||
name = "open_producten.producttypen" | ||
|
||
def ready(self): | ||
unregister_camelize_filter_extension() | ||
|
||
|
||
def unregister_camelize_filter_extension(): | ||
""" | ||
CamelizeFilterExtension from vng_api_common is loaded automatically and cannot be removed using SPECTACULAR_SETTINGS. | ||
""" | ||
OpenApiFilterExtension._registry = [ | ||
ext | ||
for ext in OpenApiFilterExtension._registry | ||
if ext.__name__ != "CamelizeFilterExtension" | ||
] |