Skip to content

fix: camelize tuples/fixed length array - #1432

Merged
tfranzel merged 3 commits into
tfranzel:masterfrom
CharString:master
Oct 25, 2025
Merged

fix: camelize tuples/fixed length array#1432
tfranzel merged 3 commits into
tfranzel:masterfrom
CharString:master

Conversation

@CharString

Copy link
Copy Markdown
Contributor

camelize_serializer_fields raised Attribute error if the schema specified a fixed length array

This is a bug that #1430 will probably run into.

camelize_serializer_fields raised Attribute error if the schema
specified a fixed length array
CharString added a commit to maykinmedia/open-beheer that referenced this pull request Jun 30, 2025
Closes #94

This works around a bug in the camelize_serializer_fields hook in
drf_spectacular.

tfranzel/drf-spectacular#1432
CharString added a commit to maykinmedia/open-beheer that referenced this pull request Jul 1, 2025
Closes #94

This works around a bug in the camelize_serializer_fields hook in
drf_spectacular.

tfranzel/drf-spectacular#1432
CharString added a commit to maykinmedia/open-beheer that referenced this pull request Jul 1, 2025
Closes #94

This works around a bug in the camelize_serializer_fields hook in
drf_spectacular.

tfranzel/drf-spectacular#1432
Xaohs pushed a commit to maykinmedia/open-beheer that referenced this pull request Jul 1, 2025
Closes #94

This works around a bug in the camelize_serializer_fields hook in
drf_spectacular.

tfranzel/drf-spectacular#1432
tfranzel added a commit that referenced this pull request Oct 25, 2025
@tfranzel
tfranzel merged commit 91c3c19 into tfranzel:master Oct 25, 2025
6 of 70 checks passed
TusharAthare added a commit to TusharAthare/Financial-Health that referenced this pull request Jun 27, 2026
[//]: # (dependabot-start)
⚠️  **Dependabot is rebasing this PR** ⚠️ 

Rebasing might not happen immediately, so don't worry if this takes some
time.

Note: if you make any changes to this PR yourself, they will take
precedence over the rebase.

---

[//]: # (dependabot-end)

Bumps [drf-spectacular](https://github.com/tfranzel/drf-spectacular)
from 0.28.0 to 0.29.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/tfranzel/drf-spectacular/releases">drf-spectacular's
releases</a>.</em></p>
<blockquote>
<h2>0.29.0</h2>
<p>Thank you for all the patience with the release!</p>
<h2>Important notes</h2>
<ul>
<li>Finally fixed the memory leak thanks to <a
href="https://github.com/artKucher"><code>@​artKucher</code></a>.</li>
<li>Another performance improvement is the usage of the C versions of
yaml, if available.</li>
<li>Apart from that, there are a lot of small improvements and
bugfixes.</li>
</ul>
<h2>PRs</h2>
<ul>
<li>Link to <code>SerializerMethod</code> docs by <a
href="https://github.com/johnthagen"><code>@​johnthagen</code></a> in <a
href="https://redirect.github.com/tfranzel/drf-spectacular/pull/1377">tfranzel/drf-spectacular#1377</a></li>
<li>Document Django 5.1 support in README by <a
href="https://github.com/johnthagen"><code>@​johnthagen</code></a> in <a
href="https://redirect.github.com/tfranzel/drf-spectacular/pull/1376">tfranzel/drf-spectacular#1376</a></li>
<li>Bump django from 4.2.11 to 4.2.18 in /requirements by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/tfranzel/drf-spectacular/pull/1366">tfranzel/drf-spectacular#1366</a></li>
<li>Document how to lazily annotate a recursive SerializerMethod by <a
href="https://github.com/johnthagen"><code>@​johnthagen</code></a> in <a
href="https://redirect.github.com/tfranzel/drf-spectacular/pull/1384">tfranzel/drf-spectacular#1384</a></li>
<li>Fix docs compile issue and update some old code by <a
href="https://github.com/mikemanger"><code>@​mikemanger</code></a> in <a
href="https://redirect.github.com/tfranzel/drf-spectacular/pull/1389">tfranzel/drf-spectacular#1389</a></li>
<li>Add allauth's DRF token auth <a
href="https://redirect.github.com/tfranzel/drf-spectacular/issues/1401">#1401</a>
by <a href="https://github.com/tfranzel"><code>@​tfranzel</code></a> in
<a
href="https://redirect.github.com/tfranzel/drf-spectacular/pull/1404">tfranzel/drf-spectacular#1404</a></li>
<li>Bump django from 4.2.18 to 4.2.20 in /requirements by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/tfranzel/drf-spectacular/pull/1403">tfranzel/drf-spectacular#1403</a></li>
<li>Allow setting callable for ENUM_NAME_OVERRIDES by <a
href="https://github.com/q0w"><code>@​q0w</code></a> in <a
href="https://redirect.github.com/tfranzel/drf-spectacular/pull/1406">tfranzel/drf-spectacular#1406</a></li>
<li>fix: correct port mapping for the container in README by <a
href="https://github.com/mbienkowsk"><code>@​mbienkowsk</code></a> in <a
href="https://redirect.github.com/tfranzel/drf-spectacular/pull/1408">tfranzel/drf-spectacular#1408</a></li>
<li>Fix python 3.11 slice index by <a
href="https://github.com/yegorLitvinov"><code>@​yegorLitvinov</code></a>
in <a
href="https://redirect.github.com/tfranzel/drf-spectacular/pull/1411">tfranzel/drf-spectacular#1411</a></li>
<li>Add Django REST framework 3.16 support by <a
href="https://github.com/pauloxnet"><code>@​pauloxnet</code></a> in <a
href="https://redirect.github.com/tfranzel/drf-spectacular/pull/1420">tfranzel/drf-spectacular#1420</a></li>
<li>fixes prefix estimation on windows by <a
href="https://github.com/originell"><code>@​originell</code></a> in <a
href="https://redirect.github.com/tfranzel/drf-spectacular/pull/1440">tfranzel/drf-spectacular#1440</a></li>
<li>Bump django from 4.2.20 to 4.2.24 in /requirements by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/tfranzel/drf-spectacular/pull/1451">tfranzel/drf-spectacular#1451</a></li>
<li>fix: sort list to produce same hash by <a
href="https://github.com/florianvazelle"><code>@​florianvazelle</code></a>
in <a
href="https://redirect.github.com/tfranzel/drf-spectacular/pull/1433">tfranzel/drf-spectacular#1433</a></li>
<li>Add typing.Generic to default lib_doc_excludes by <a
href="https://github.com/maxhowald"><code>@​maxhowald</code></a> in <a
href="https://redirect.github.com/tfranzel/drf-spectacular/pull/1429">tfranzel/drf-spectacular#1429</a></li>
<li>Fix DecimalField with decimal_places and max_digits equal. by <a
href="https://github.com/keter2002"><code>@​keter2002</code></a> in <a
href="https://redirect.github.com/tfranzel/drf-spectacular/pull/1457">tfranzel/drf-spectacular#1457</a></li>
<li>Fix default for array types by <a
href="https://github.com/TheSuperiorStanislav"><code>@​TheSuperiorStanislav</code></a>
in <a
href="https://redirect.github.com/tfranzel/drf-spectacular/pull/1437">tfranzel/drf-spectacular#1437</a></li>
<li>Bump django from 4.2.24 to 4.2.25 in /requirements by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/tfranzel/drf-spectacular/pull/1458">tfranzel/drf-spectacular#1458</a></li>
<li>Fix <code>OpenApiViewExtension</code> not providing view instance
under <code>self.target</code> by <a
href="https://github.com/astro-stan"><code>@​astro-stan</code></a> in <a
href="https://redirect.github.com/tfranzel/drf-spectacular/pull/1405">tfranzel/drf-spectacular#1405</a></li>
<li>Enhance bug report template with instructions for better clarity. by
<a
href="https://github.com/Antoliny0919"><code>@​Antoliny0919</code></a>
in <a
href="https://redirect.github.com/tfranzel/drf-spectacular/pull/1357">tfranzel/drf-spectacular#1357</a></li>
<li>Add option to overwrite serializer description <a
href="https://redirect.github.com/tfranzel/drf-spectacular/issues/1463">#1463</a>
by <a href="https://github.com/tfranzel"><code>@​tfranzel</code></a> in
<a
href="https://redirect.github.com/tfranzel/drf-spectacular/pull/1464">tfranzel/drf-spectacular#1464</a></li>
<li>Improve to_filter_name support for django_filter by <a
href="https://github.com/matwey"><code>@​matwey</code></a> in <a
href="https://redirect.github.com/tfranzel/drf-spectacular/pull/1446">tfranzel/drf-spectacular#1446</a></li>
<li>fix: camelize tuples/fixed length array by <a
href="https://github.com/CharString"><code>@​CharString</code></a> in <a
href="https://redirect.github.com/tfranzel/drf-spectacular/pull/1432">tfranzel/drf-spectacular#1432</a></li>
<li>Fix memory leak by <a
href="https://github.com/artKucher"><code>@​artKucher</code></a> in <a
href="https://redirect.github.com/tfranzel/drf-spectacular/pull/1416">tfranzel/drf-spectacular#1416</a></li>
<li>fix: add check condition, that serializer meta has model attribute
by <a href="https://github.com/kritohanzo"><code>@​kritohanzo</code></a>
in <a
href="https://redirect.github.com/tfranzel/drf-spectacular/pull/1397">tfranzel/drf-spectacular#1397</a></li>
<li>[django-filter] Add null_label if set in ChoiceFilter by <a
href="https://github.com/epou"><code>@​epou</code></a> in <a
href="https://redirect.github.com/tfranzel/drf-spectacular/pull/1450">tfranzel/drf-spectacular#1450</a></li>
<li>Add l18n handling for Decimal field <a
href="https://redirect.github.com/tfranzel/drf-spectacular/issues/1466">#1466</a>
by <a href="https://github.com/tfranzel"><code>@​tfranzel</code></a> in
<a
href="https://redirect.github.com/tfranzel/drf-spectacular/pull/1467">tfranzel/drf-spectacular#1467</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/mikemanger"><code>@​mikemanger</code></a> made
their first contribution in <a
href="https://redirect.github.com/tfranzel/drf-spectacular/pull/1389">tfranzel/drf-spectacular#1389</a></li>
<li><a
href="https://github.com/mbienkowsk"><code>@​mbienkowsk</code></a> made
their first contribution in <a
href="https://redirect.github.com/tfranzel/drf-spectacular/pull/1408">tfranzel/drf-spectacular#1408</a></li>
<li><a
href="https://github.com/yegorLitvinov"><code>@​yegorLitvinov</code></a>
made their first contribution in <a
href="https://redirect.github.com/tfranzel/drf-spectacular/pull/1411">tfranzel/drf-spectacular#1411</a></li>
<li><a href="https://github.com/pauloxnet"><code>@​pauloxnet</code></a>
made their first contribution in <a
href="https://redirect.github.com/tfranzel/drf-spectacular/pull/1420">tfranzel/drf-spectacular#1420</a></li>
<li><a href="https://github.com/originell"><code>@​originell</code></a>
made their first contribution in <a
href="https://redirect.github.com/tfranzel/drf-spectacular/pull/1440">tfranzel/drf-spectacular#1440</a></li>
<li><a
href="https://github.com/florianvazelle"><code>@​florianvazelle</code></a>
made their first contribution in <a
href="https://redirect.github.com/tfranzel/drf-spectacular/pull/1433">tfranzel/drf-spectacular#1433</a></li>
<li><a href="https://github.com/maxhowald"><code>@​maxhowald</code></a>
made their first contribution in <a
href="https://redirect.github.com/tfranzel/drf-spectacular/pull/1429">tfranzel/drf-spectacular#1429</a></li>
<li><a href="https://github.com/keter2002"><code>@​keter2002</code></a>
made their first contribution in <a
href="https://redirect.github.com/tfranzel/drf-spectacular/pull/1457">tfranzel/drf-spectacular#1457</a></li>
<li><a
href="https://github.com/TheSuperiorStanislav"><code>@​TheSuperiorStanislav</code></a>
made their first contribution in <a
href="https://redirect.github.com/tfranzel/drf-spectacular/pull/1437">tfranzel/drf-spectacular#1437</a></li>
<li><a
href="https://github.com/astro-stan"><code>@​astro-stan</code></a> made
their first contribution in <a
href="https://redirect.github.com/tfranzel/drf-spectacular/pull/1405">tfranzel/drf-spectacular#1405</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/tfranzel/drf-spectacular/blob/master/CHANGELOG.rst">drf-spectacular's
changelog</a>.</em></p>
<blockquote>
<h2>0.29.0 (2025-11-01)</h2>
<ul>
<li>Add l18n handling for Decimal field
<code>[#1466](tfranzel/drf-spectacular#1466)
&lt;https://github.com/tfranzel/drf-spectacular/issues/1466&gt;</code>_</li>
<li>Fix LogoutSerializer for JWT/dj_rest_auth
<code>[#1392](tfranzel/drf-spectacular#1392)
&lt;https://github.com/tfranzel/drf-spectacular/issues/1392&gt;</code>_</li>
<li>fix: support token blacklist feature in rest_auth [Bart van
Andel]</li>
<li>[django-filter] Add null_label if set in ChoiceFilter
(<code>[#1450](tfranzel/drf-spectacular#1450)
&lt;https://github.com/tfranzel/drf-spectacular/issues/1450&gt;</code>_)
[Enric Pou]</li>
<li>fix: camelize tuples/fixed length array
(<code>[#1432](tfranzel/drf-spectacular#1432)
&lt;https://github.com/tfranzel/drf-spectacular/issues/1432&gt;</code>_)
[Chris Wesseling]</li>
<li>Fix items:False case in enum hook
<code>[#1432](tfranzel/drf-spectacular#1432)
&lt;https://github.com/tfranzel/drf-spectacular/issues/1432&gt;</code>_</li>
<li>Add option to overwrite serializer description
<code>[#1463](tfranzel/drf-spectacular#1463)
&lt;https://github.com/tfranzel/drf-spectacular/issues/1463&gt;</code>_</li>
<li>Fix <code>OpenApiViewExtension</code> not providing view instance
under <code>self.target</code>
(<code>[#1405](tfranzel/drf-spectacular#1405)
&lt;https://github.com/tfranzel/drf-spectacular/issues/1405&gt;</code>_)
[astro-stan]</li>
<li>Move list default fix to source of the problem
<code>[#1436](tfranzel/drf-spectacular#1436)
&lt;https://github.com/tfranzel/drf-spectacular/issues/1436&gt;</code>_</li>
<li>Improve confusing doc
<code>[#1461](tfranzel/drf-spectacular#1461)
&lt;https://github.com/tfranzel/drf-spectacular/issues/1461&gt;</code>_</li>
<li>Add assert to pagination test
<code>[#1459](tfranzel/drf-spectacular#1459)
&lt;https://github.com/tfranzel/drf-spectacular/issues/1459&gt;</code>_</li>
<li>fix SafeString handling for picky CDumper
(<code>[#1435](tfranzel/drf-spectacular#1435)
&lt;https://github.com/tfranzel/drf-spectacular/issues/1435&gt;</code>_)</li>
<li>Remove EOL 3.7 from suite; pydantic not updated for &lt;=3.8</li>
<li>Fix DecimalField with decimal_places and max_digits equal.
[keter2002]</li>
<li>fix test for i18n changes on DRF
(<code>[#1444](tfranzel/drf-spectacular#1444)
&lt;https://github.com/tfranzel/drf-spectacular/issues/1444&gt;</code>_)</li>
<li>Improve to_filter_name support for django_filter [Matwey V.
Kornilov]</li>
<li>fixes prefix estimation on windows [Luis Nell]</li>
<li>Fix default for array types [Stanislav Khlud]</li>
<li>fix: use CSafeDumper for render yaml if available [florian]</li>
<li>fix: sort list to produce same hash [florian]</li>
<li>Add typing.Generic to default lib_doc_excludes [Max Howald]</li>
<li>Add get_doc test for class that inherits from Generic [Max
Howald]</li>
<li>Add Django REST framework 3.16 support [Paolo Melchiorre]</li>
<li>Fix memory leak [artemkucher]</li>
<li>Fix python 3.11 slice index [Egor Litvinov]</li>
<li>fix: correct port mapping for the container in README [Maksym
Bieńkowski]</li>
<li>Update docs [q0w]</li>
<li>Allow setting callable for ENUM_NAME_OVERRIDES [q0w]</li>
<li>Add allauth's DRF token auth
<code>[#1401](tfranzel/drf-spectacular#1401)
&lt;https://github.com/tfranzel/drf-spectacular/issues/1401&gt;</code>_</li>
<li>update away from retired GH worker image</li>
<li>add condition to check, that serializer Meta has model attribute
[aliev_vt]</li>
<li>Fix docs compile issue and update some old code
(<code>[#1389](tfranzel/drf-spectacular#1389)
&lt;https://github.com/tfranzel/drf-spectacular/issues/1389&gt;</code>_)
[Mike Manger]</li>
<li>Fix location of <a
href="https://github.com/extend"><code>@​extend</code></a>_schema_field
[johnthagen]</li>
<li>Remove reference to non-exposed lazy_serializer [johnthagen]</li>
<li>Document how to lazily define a recursive SerializerMethod
[johnthagen]</li>
<li>Link to SerializerMethod docs [johnthagen]</li>
<li>Document Django 5.1 support in README [johnthagen]</li>
<li>Bump django from 4.2.11 to 4.2.18 in /requirements
[dependabot[bot]]</li>
<li>Enhance bug report template with instructions for better clarity
[antoliny0919]</li>
<li>add pydantic computed field to tests
<code>[#1354](tfranzel/drf-spectacular#1354)
&lt;https://github.com/tfranzel/drf-spectacular/issues/1354&gt;</code>_</li>
</ul>
<p>Breaking changes / important additions:</p>
<ul>
<li>Finally fixed the memory leak thanks to <a
href="https://github.com/artKucher"><code>@​artKucher</code></a>.</li>
<li>Another performance improvement is the usage of the C versions of
yaml, if available.</li>
<li>Apart from that, there are a lot of small improvements and
bugfixes.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/tfranzel/drf-spectacular/commit/7a7a1f2acc2287466738c87b7e62958b4cb10abd"><code>7a7a1f2</code></a>
disable py3.8 target due to pyproject.toml issues</li>
<li><a
href="https://github.com/tfranzel/drf-spectacular/commit/ff7a62bebf82da7c93d7f773522257f2bfd3df06"><code>ff7a62b</code></a>
fix docs</li>
<li><a
href="https://github.com/tfranzel/drf-spectacular/commit/e58143b50295257320ff836fb3422d1364575722"><code>e58143b</code></a>
version bump</li>
<li><a
href="https://github.com/tfranzel/drf-spectacular/commit/e40b287c22ab1a09e6182d32045055744f358d1f"><code>e40b287</code></a>
Renovate project setup <a
href="https://redirect.github.com/tfranzel/drf-spectacular/issues/1162">#1162</a></li>
<li><a
href="https://github.com/tfranzel/drf-spectacular/commit/62fc98b412112b8396796d76e6a06b4c7c0e45ca"><code>62fc98b</code></a>
Merge pull request <a
href="https://redirect.github.com/tfranzel/drf-spectacular/issues/1467">#1467</a>
from tfranzel/decimal_l18n</li>
<li><a
href="https://github.com/tfranzel/drf-spectacular/commit/d7247a5fa400888c3f7958041da78da8641fb86a"><code>d7247a5</code></a>
Add l18n handling for Decimal field <a
href="https://redirect.github.com/tfranzel/drf-spectacular/issues/1466">#1466</a></li>
<li><a
href="https://github.com/tfranzel/drf-spectacular/commit/5221afdd524091faca3839bb97ee883bdf1ac5b5"><code>5221afd</code></a>
Merge branch '<a
href="https://redirect.github.com/tfranzel/drf-spectacular/issues/1392">#1392</a>'</li>
<li><a
href="https://github.com/tfranzel/drf-spectacular/commit/88302fa5aead206d0156cf09e389bb14cd514879"><code>88302fa</code></a>
Fix LogoutSerializer for JWT/dj_rest_auth <a
href="https://redirect.github.com/tfranzel/drf-spectacular/issues/1392">#1392</a></li>
<li><a
href="https://github.com/tfranzel/drf-spectacular/commit/f7138e330e16da34c902246b05ea23fe08da8350"><code>f7138e3</code></a>
fix: support token blacklist feature in rest_auth</li>
<li><a
href="https://github.com/tfranzel/drf-spectacular/commit/2c71a35c5d11809f2c06b85ccb8d83b541f4f92c"><code>2c71a35</code></a>
[django-filter] Add null_label if set in ChoiceFilter (<a
href="https://redirect.github.com/tfranzel/drf-spectacular/issues/1450">#1450</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/tfranzel/drf-spectacular/compare/0.28.0...0.29.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=drf-spectacular&package-manager=pip&previous-version=0.28.0&new-version=0.29.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants