-
Notifications
You must be signed in to change notification settings - Fork 77
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 #753 from pulp/patchback/backports/3.12/4d8e8db608…
…c80e3829b4c3ee90e84d7ef69c5236/pr-751 [PR #751/4d8e8db6 backport][3.12] Fix Any serializer type regression breaking Ruby bindings
- Loading branch information
Showing
4 changed files
with
25 additions
and
9 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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Fixed the JSONField specification so it doesn't break ruby bindings. | ||
See context [here](https://github.com/pulp/pulp_rpm/issues/3639). |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from drf_spectacular.utils import extend_schema_field | ||
from drf_spectacular.types import OpenApiTypes | ||
from rest_framework import serializers | ||
|
||
|
||
@extend_schema_field(OpenApiTypes.OBJECT) | ||
class JSONObjectField(serializers.JSONField): | ||
"""A drf JSONField override to force openapi schema to use 'object' type. | ||
Not strictly correct, but we relied on that for a long time. | ||
See: https://github.com/tfranzel/drf-spectacular/issues/1095 | ||
""" |
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