parent
eeb1bba9e7
commit
c5d4e6ca53
|
|
@ -58,6 +58,7 @@ class InlineSerializerInspector(SerializerInspector):
|
|||
)
|
||||
for key, value
|
||||
in fields.items()
|
||||
if not getattr(value, 'read_only', False)
|
||||
]
|
||||
|
||||
return self.add_manual_parameters(serializer, parameters)
|
||||
|
|
|
|||
|
|
@ -6,13 +6,13 @@ from rest_framework.request import is_form_media_type
|
|||
from rest_framework.schemas import AutoSchema
|
||||
from rest_framework.status import is_success
|
||||
|
||||
from .base import ViewInspector
|
||||
from .. import openapi
|
||||
from ..errors import SwaggerGenerationError
|
||||
from ..utils import (
|
||||
filter_none, force_real_str, force_serializer_instance, get_consumes, get_produces, guess_response_status,
|
||||
is_list_view, merge_params, no_body, param_list_to_odict
|
||||
)
|
||||
from .base import ViewInspector
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ class ArticleSerializer(serializers.ModelSerializer):
|
|||
|
||||
|
||||
class ImageUploadSerializer(serializers.Serializer):
|
||||
image_id = serializers.UUIDField(read_only=True)
|
||||
what_am_i_doing = serializers.RegexField(
|
||||
regex=r"^69$",
|
||||
help_text="test",
|
||||
|
|
|
|||
|
|
@ -913,6 +913,10 @@ definitions:
|
|||
- image_styles
|
||||
type: object
|
||||
properties:
|
||||
image_id:
|
||||
type: string
|
||||
format: uuid
|
||||
readOnly: true
|
||||
what_am_i_doing:
|
||||
description: test
|
||||
type: string
|
||||
|
|
|
|||
Loading…
Reference in New Issue