Skip to content

Conversation

@dependabot
Copy link

@dependabot dependabot bot commented on behalf of github Dec 21, 2025

Bumps datamodel-code-generator from 0.41.0 to 0.46.0.

Release notes

Sourced from datamodel-code-generator's releases.

0.46.0

Breaking Changes

Python Version

  • Python 3.9 support dropped - Minimum Python version is now 3.10+ (#2692)

Default Behavior Changes

  • Native type hints by default - list[...]/dict[...] are now used instead of List[...]/Dict[...]. Use --no-use-standard-collections to restore previous behavior (#2699)
  • Union operator by default - X | Y syntax is now used instead of Union[X, Y]/Optional[X]. Use --no-use-union-operator to restore previous behavior (#2703)

Code Generation Changes

  • Nullable required fields no longer have default values (Pydantic v2) - Fields marked as both required and nullable no longer get = None. The pydantic_v2/BaseModel.jinja2 template logic was updated to only assign default values when field.required is false. This fixes incorrect behavior where required fields could be omitted (#2520)
  • TypedDict respects enum_field_as_literal setting - TypedDict output now respects user's --enum-field-as-literal setting instead of forcing all. Added new --enum-field-as-literal none option (#2691)
  • prefixItems now generates tuple types - JSON Schema prefixItems with matching minItems/maxItems and no items now generates tuple[T1, T2, ...] instead of list[...]. This applies when the array has a fixed length with heterogeneous types (#2537)

What's Changed

New Contributors

Full Changelog: koxudaxi/datamodel-code-generator@0.45.0...0.46.0

0.45.0

What's Changed

... (truncated)

Changelog

Sourced from datamodel-code-generator's changelog.

0.46.0 - 2025-12-20

Breaking Changes

Python Version

  • Python 3.9 support dropped - Minimum Python version is now 3.10+ (#2692)

Default Behavior Changes

  • Native type hints by default - list[...]/dict[...] are now used instead of List[...]/Dict[...]. Use --no-use-standard-collections to restore previous behavior (#2699)
  • Union operator by default - X | Y syntax is now used instead of Union[X, Y]/Optional[X]. Use --no-use-union-operator to restore previous behavior (#2703)

Code Generation Changes

  • Nullable required fields no longer have default values (Pydantic v2) - Fields marked as both required and nullable no longer get = None. The pydantic_v2/BaseModel.jinja2 template logic was updated to only assign default values when field.required is false. This fixes incorrect behavior where required fields could be omitted (#2520)
  • TypedDict respects enum_field_as_literal setting - TypedDict output now respects user's --enum-field-as-literal setting instead of forcing all. Added new --enum-field-as-literal none option (#2691)
  • prefixItems now generates tuple types - JSON Schema prefixItems with matching minItems/maxItems and no items now generates tuple[T1, T2, ...] instead of list[...]. This applies when the array has a fixed length with heterogeneous types (#2537)

What's Changed

New Contributors

Full Changelog: koxudaxi/datamodel-code-generator@0.45.0...0.46.0


... (truncated)

Commits
  • 95736ad fix: trigger docs build after changelog update (#2710)
  • fba4713 fix: update type annotations to use modern syntax (#2709)
  • 8ecc458 Remove unnecessary flags from --check test (#2708)
  • 66769b1 docs: update CLI reference documentation
  • 930fa97 fix: use modern type format in --check option documentation example
  • 25e0f6a docs: update CLI reference documentation
  • 6fefde7 Add support for prefixItems to emit tuples (#2537)
  • 4423a49 Nullable required fields should not have default value (#2520)
  • 590e568 fix: handle fork PRs in readme and cli-docs workflows (#2707)
  • e52e1e0 fix: handle fork PRs in lint workflow (#2706)
  • Additional commits viewable in compare view

Dependabot compatibility score

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 commands and options

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 merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @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)

Bumps [datamodel-code-generator](https://github.com/koxudaxi/datamodel-code-generator) from 0.41.0 to 0.46.0.
- [Release notes](https://github.com/koxudaxi/datamodel-code-generator/releases)
- [Changelog](https://github.com/koxudaxi/datamodel-code-generator/blob/main/CHANGELOG.md)
- [Commits](koxudaxi/datamodel-code-generator@0.41.0...0.46.0)

---
updated-dependencies:
- dependency-name: datamodel-code-generator
  dependency-version: 0.46.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file python Pull requests that update Python code labels Dec 21, 2025
@dependabot @github
Copy link
Author

dependabot bot commented on behalf of github Dec 28, 2025

Superseded by #399.

@dependabot dependabot bot closed this Dec 28, 2025
@dependabot dependabot bot deleted the dependabot/pip/datamodel-code-generator-0.46.0 branch December 28, 2025 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file python Pull requests that update Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants