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