-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #545 from maykinmedia/issue/fix-oas-check
👷 [maykinmedia/open-api-framework#115] Always run OAS check
- Loading branch information
Showing
7 changed files
with
40 additions
and
21 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
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
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
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
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
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
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,9 +1,25 @@ | ||
from django.apps import AppConfig | ||
|
||
from drf_spectacular.extensions import OpenApiFilterExtension | ||
|
||
|
||
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" | ||
] | ||
|
||
|
||
class UtilsConfig(AppConfig): | ||
name = "objects.utils" | ||
|
||
def ready(self): | ||
from . import checks # noqa | ||
from . import oas_extensions # noqa | ||
|
||
unregister_camelize_filter_extension() |