Skip to content

Commit 9680861

Browse files
authored
Merge branch 'main' into fix/exclude-extension-fields
2 parents 43eb240 + 767714f commit 9680861

195 files changed

Lines changed: 134883 additions & 837 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/codspeed.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- uses: actions/checkout@v4
2121
# uv standalone build is not compatible with CodSpeedHQ
2222
# https://github.com/astral-sh/uv/issues/11006
23-
- uses: actions/setup-python@v4
23+
- uses: actions/setup-python@v6
2424
with:
2525
python-version: "3.14"
2626
- name: Install the latest version of uv
@@ -31,5 +31,5 @@ jobs:
3131
uses: CodSpeedHQ/action@v4
3232
with:
3333
token: ${{ secrets.CODSPEED_TOKEN }}
34-
run: .venv/bin/pytest tests/ --codspeed -n auto
34+
run: .venv/bin/pytest tests/ --codspeed -n auto -m "benchmark and not perf"
3535
mode: "instrumentation"

CHANGELOG.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,46 @@ All notable changes to this project are documented in this file.
44
This changelog is automatically generated from GitHub Releases.
55

66
---
7+
## [0.49.0](https://github.com/koxudaxi/datamodel-code-generator/releases/tag/0.49.0) - 2025-12-25
8+
9+
## Breaking Changes
10+
11+
### SchemaParseError for Invalid Schema Data
12+
* Schema validation errors now raise `SchemaParseError` instead of Pydantic `ValidationError` - When parsing invalid schema data (e.g., `"minimum": "not_a_number"`), the library now raises `SchemaParseError` instead of passing through Pydantic's `ValidationError`. Users catching `pydantic.ValidationError` for schema validation failures should update to catch `SchemaParseError`. The original error is preserved in the `original_error` attribute. (#2786)
13+
14+
## Bug Fixes
15+
16+
### CLI Now Correctly Outputs to stdout
17+
* Fixed CLI to actually output to stdout when `--output` is not specified - The `--output` argument has always documented `(default: stdout)` in `--help`, but previously no output was produced. Now works as documented. (#2787)
18+
19+
## Other Notable Changes
20+
21+
* `generate()` function now returns `str | GeneratedModules | None` instead of `None` - Existing code ignoring the return value is unaffected. (#2787)
22+
* Error message for multi-module output without directory changed to be more descriptive. (#2787)
23+
24+
## What's Changed
25+
* Merge duplicate breaking change headings in release notes by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/2776
26+
* Optimize O(n²) algorithms and reduce redundant iterations by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/2778
27+
* Optimize performance with LRU caching and O(n) algorithms by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/2777
28+
* Optimize Jinja2 environment caching and ruff batch formatting by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/2779
29+
* Remove YAML parsing cache and deepcopy overhead by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/2781
30+
* Add performance e2e tests with large schema fixtures by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/2782
31+
* Convert Import class from Pydantic to dataclass for performance by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/2783
32+
* Add schema path context to error messages by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/2786
33+
* Return str or dict when output=None in generate() by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/2787
34+
* Add --http-timeout CLI option by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/2788
35+
* Pass schema extensions to templates by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/2790
36+
* Add propertyNames and x-propertyNames support by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/2789
37+
* Add support for additional_imports in extra-template-data JSON by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/2793
38+
* Update zensical to 0.0.15 by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/2794
39+
* Add --use-field-description-example option by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/2792
40+
* Add --collapse-root-models-name-strategy option by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/2791
41+
42+
43+
**Full Changelog**: https://github.com/koxudaxi/datamodel-code-generator/compare/0.48.0...0.49.0
44+
45+
---
46+
747
## [0.48.0](https://github.com/koxudaxi/datamodel-code-generator/releases/tag/0.48.0) - 2025-12-24
848

949
## Breaking Changes

0 commit comments

Comments
 (0)