Skip to content

Commit

Permalink
add example value hint to doc #788
Browse files Browse the repository at this point in the history
  • Loading branch information
tfranzel committed Aug 24, 2022
1 parent ee2372a commit eb0f6ab
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drf_spectacular/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,11 @@ class OpenApiExample(OpenApiSchemaBase):
Helper class to document a API parameter / request body / response body
with a concrete example value.
It is recommended to provide a singular example value, since pagination
and list responses are handled by drf-spectacular.
The example will be attached to the operation object where appropriate,
i. e. where the given ``media_type``, ``status_code`` and modifiers match.
i.e. where the given ``media_type``, ``status_code`` and modifiers match.
Example that do not match any scenario are ignored.
"""
def __init__(
Expand Down

0 comments on commit eb0f6ab

Please sign in to comment.