Skip to content

Commit

Permalink
Merge pull request #291 from jorrete/serializer-field-description
Browse files Browse the repository at this point in the history
Serializer field description
  • Loading branch information
tfranzel authored Feb 4, 2021
2 parents 56d8526 + 208c303 commit d53133f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions drf_spectacular/openapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ def _process_override_parameters(self):
result[property_name, OpenApiParameter.QUERY] = build_parameter_type(
name=property_name,
schema=property_schema,
description=property_schema.pop('description', None),
location=OpenApiParameter.QUERY,
required=property_name in mapped.get('required', []),
)
Expand Down
4 changes: 2 additions & 2 deletions tests/test_extend_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,9 @@ paths:
name: contains
schema:
type: string
description: filter by containing string
maxLength: 10
minLength: 3
description: filter by containing string
- in: query
name: nested
schema:
Expand All @@ -241,7 +241,7 @@ paths:
type: integer
maximum: 5
minimum: 1
description: filter by rating stars
description: filter by rating stars
required: true
tags:
- doesitall
Expand Down

0 comments on commit d53133f

Please sign in to comment.