You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Python 3.9 support dropped - Minimum Python version is now 3.10+ (#2692)
13
+
14
+
### Default Behavior Changes
15
+
* Native type hints by default - `list[...]`/`dict[...]` are now used instead of `List[...]`/`Dict[...]`. Use `--no-use-standard-collections` to restore previous behavior (#2699)
16
+
* 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)
17
+
18
+
### Code Generation Changes
19
+
* 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)
20
+
* 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)
21
+
* 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)
22
+
23
+
24
+
## What's Changed
25
+
* feat: Add --use-status-code-in-response-name option by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/2688
26
+
* feat: Add support for number type with time-delta format by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/2689
27
+
* docs: Add CHANGELOG.md with auto-update workflow by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/2690
28
+
* feat: Add --enum-field-as-literal none option and respect user settings for TypedDict by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/2691
29
+
* docs: Clarify default encoding behavior in documentation by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/2693
30
+
* ci: Improve CLI docs generation workflow by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/2695
31
+
* feat(docs): Group CLI examples by schema type with tabs by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/2696
32
+
* feat: Add --ignore-enum-constraints option by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/2694
33
+
* Add zensical.toml configuration by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/2697
34
+
* fix: Make docs generation deterministic by sorting glob results and dict iterations by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/2698
35
+
* feat: Drop Python 3.9 support, require Python 3.10+ by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/2692
36
+
* fix: Update zensical dependency version to 0.0.13 for Python 3.10+ by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/2700
37
+
* feat: Default to native list/dict type hints instead of typing.List/Dict by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/2699
38
+
* fix: Remove unnecessary pass statement when nested class exists by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/2704
39
+
* build: Replace pre-commit with prek by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/2702
40
+
* fix: Improve state management in Imports, DataType, and DataModel classes by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/2705
41
+
* feat: Default to union operator for type hints by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/2703
42
+
* fix: handle fork PRs in lint workflow by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/2706
43
+
* fix: handle fork PRs in readme and cli-docs workflows by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/2707
44
+
* Nullable required fields should not have default value by @raymondbutcher in https://github.com/koxudaxi/datamodel-code-generator/pull/2520
45
+
* Add support for prefixItems to emit tuples by @saulshanabrook in https://github.com/koxudaxi/datamodel-code-generator/pull/2537
46
+
* Remove unnecessary flags from --check test by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/2708
47
+
* fix: update expected files to use modern union type syntax (`str | None`) by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/2709
48
+
* fix: trigger docs build after changelog update by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/2710
49
+
50
+
## New Contributors
51
+
*@raymondbutcher made their first contribution in https://github.com/koxudaxi/datamodel-code-generator/pull/2520
52
+
*@saulshanabrook made their first contribution in https://github.com/koxudaxi/datamodel-code-generator/pull/2537
0 commit comments