Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,4 @@ Contributors (chronological)
- Robin `@allrob23 <https://github.com/allrob23>`_
- Xingang Zhang `@0x0400 <https://github.com/0x0400>`_
- Lewis Haley `@LewisHaley <https://github.com/LewisHaley>`_
- Felix Claessen `@Flix6x <https://github.com/Flix6x>`_
6 changes: 4 additions & 2 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Other changes:

- Officially support Python 3.14 (:pr:`998`).
- Drop support for Python 3.8 (:pr:`994`).
- Support ``examples`` property from field metadata (:pr:`999`).
Thanks :user:`Flix6x` for the PR.

6.8.4 (2025-09-22)
******************
Expand All @@ -22,10 +24,10 @@ Bug fixes:

Bug fixes:

- ``MarshmallowPlugin``: set ``additionnalProperties`` to ``False`` if
- ``MarshmallowPlugin``: set ``additionalProperties`` to ``False`` if
``unknown`` is not set (:pr:`988`).
Thanks :user:`mwgamble` for reporting.
- ``MarshmallowPlugin``: set ``additionnalProperties`` according to ``unknown``
- ``MarshmallowPlugin``: set ``additionalProperties`` according to ``unknown``
value passed at schema instantiation, not only as ``Meta`` attribute
(:pr:`988`).

Expand Down
1 change: 1 addition & 0 deletions src/apispec/ext/marshmallow/field_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
"xml",
"externalDocs",
"example",
"examples",
"nullable",
"deprecated",
}
Expand Down
8 changes: 8 additions & 0 deletions tests/test_ext_marshmallow_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -685,3 +685,11 @@ class _DesertSentinel:
field.metadata[_DesertSentinel()] = "to be ignored"
result = spec_fixture.openapi.field2property(field)
assert result == {"description": "A description", "type": "boolean"}


def test_field2property_examples(spec_fixture):
field = fields.Raw(metadata={"examples": ["foo", "bar"]})
res = spec_fixture.openapi.field2property(field)
assert res == {
"examples": ["foo", "bar"],
}