Avatar for the koxudaxi user
koxudaxi
datamodel-code-generator
BlogDocsChangelog

Add GenerateConfig class and auto-generate TypedDicts for type-safe config

#2844Merged
Comparing
refactor/config-class
(
fba28c9
) with
main
(
12fc77c
)
CodSpeed Performance Gauge
-3%
Untouched
11
Skipped
98

Benchmarks

98 total
test_main_nested_directory
tests/main/jsonschema/test_main_jsonschema.py
Skipped
247.9 ms*
test_main_strict_types_all_with_field_constraints
tests/main/jsonschema/test_main_jsonschema.py
Skipped
81 ms*
test_main_jsonschema_complex_any_of
tests/main/jsonschema/test_main_jsonschema.py
Skipped
68 ms*
test_main_allof_root_model_constraints
tests/main/jsonschema/test_main_jsonschema.py
Skipped
287.1 ms*
test_main_use_frozen_field_dataclass
tests/main/jsonschema/test_main_jsonschema.py
Skipped
35.8 ms*
test_main_use_frozen_field_pydantic_v1
tests/main/jsonschema/test_main_jsonschema.py
Skipped
48.5 ms*
test_main_use_frozen_field_pydantic_v2
tests/main/jsonschema/test_main_jsonschema.py
Skipped
54 ms*
test_main_jsonschema_reserved_field_name_typed_dict
tests/main/jsonschema/test_main_jsonschema.py
Skipped
29 ms*
test_main_jsonschema_reserved_field_name_dataclass
tests/main/jsonschema/test_main_jsonschema.py
Skipped
29.8 ms*
test_main_jsonschema_reserved_field_name_pydantic
tests/main/jsonschema/test_main_jsonschema.py
Skipped
45.6 ms*
test_main_all_of_ref
tests/main/jsonschema/test_main_jsonschema.py
Skipped
39.3 ms*
test_main_allof_root_model_constraints_merge
tests/main/jsonschema/test_main_jsonschema.py
Skipped
262.9 ms*
test_main_lookaround_union_types_pydantic_v2
tests/main/jsonschema/test_main_jsonschema.py
Skipped
58.4 ms*
test_main_use_default_factory_for_optional_nested_models_with_dict[pydantic_v2.BaseModel-default_factory_nested_model_with_dict_pydantic_v2.py]
tests/main/jsonschema/test_main_jsonschema.py
Skipped
68.4 ms*
test_force_optional
tests/main/openapi/test_main_openapi.py
Skipped
123.8 ms*
test_main_allof_root_model_constraints_merge_pydantic_v2
tests/main/jsonschema/test_main_jsonschema.py
Skipped
302.3 ms*
test_main_use_default_factory_for_optional_nested_models_with_dict[msgspec.Struct-default_factory_nested_model_with_dict_msgspec.py]
tests/main/jsonschema/test_main_jsonschema.py
Skipped
59 ms*
test_main_lookaround_mixed_constraints_pydantic_v2
tests/main/jsonschema/test_main_jsonschema.py
Skipped
59.9 ms*
test_main_use_frozen_field[dataclasses.dataclass-use_frozen_field_dataclass.py]
tests/main/jsonschema/test_main_jsonschema.py
Skipped
34.6 ms*
test_main_nested_lookaround_array_standard_collections
tests/main/jsonschema/test_main_jsonschema.py
Skipped
59.4 ms*
test_main_nested_lookaround_array_pydantic_v2
tests/main/jsonschema/test_main_jsonschema.py
Skipped
59.4 ms*
test_main_autodetect
tests/main/jsonschema/test_main_jsonschema.py
Skipped
52.1 ms*
test_main_builtin_field_names
tests/main/jsonschema/test_main_jsonschema.py
Skipped
50 ms*
test_main_allof_root_model_constraints_none
tests/main/jsonschema/test_main_jsonschema.py
Skipped
261.9 ms*
test_main_openapi_nullable_31
tests/main/openapi/test_main_openapi.py
Skipped
47.5 ms*

Commits

Click on a commit to change the comparison range
Base
main
12fc77c
-1.48%
Regenerate TypedDicts after merging set/frozenset fix
c12a383
4 months ago
by koxudaxi
+0.38%
Add test for extra_template_data override and coverage pragmas
8d05fb0
4 months ago
by koxudaxi
-0.07%
Restore --unsafe-fixes flag in ruff commands
ead4e16
4 months ago
by koxudaxi
+1.1%
Restore _try_rebuild_model and test_input_model_config_class after merge
ef68905
4 months ago
by koxudaxi
-0.04%
Use --input-model-ref-strategy to simplify config type generation
445bc44
4 months ago
by koxudaxi
+22.59%
Regenerate config types with improved reuse-foreign strategy
c8d60ef
4 months ago
by koxudaxi
-3.34%
Remove WithJsonSchema annotations - automatic handling works
c308216
4 months ago
by koxudaxi
-24.47%
Add tests to ensure Config and ConfigDict fields/types match
6d513e8
4 months ago
by koxudaxi
+2.89%
Add comprehensive Config/TypedDict compatibility tests
1aff1b7
4 months ago
by koxudaxi
+2.35%
Fix N806 lint: rename UnionMode variable to lowercase
1689892
4 months ago
by koxudaxi
+19.85%
Simplify type comparison tests for Config/TypedDict
abfc76c
4 months ago
by koxudaxi
-21.67%
Add type comparison tests for Config/TypedDict equivalence
2104ed0
4 months ago
by koxudaxi
+1.53%
Skip Config/TypedDict tests on Pydantic v1
b786adc
4 months ago
by koxudaxi
-4.55%
Add default value tests for ParserConfig and ParseConfig
6e861cd
4 months ago
by koxudaxi
+3.7%
Use @PYDANTIC_V2_SKIP decorator for pydantic v2 tests
87efda7
4 months ago
by koxudaxi
-1.38%
Fix type normalization for types.UnionType (Python 3.10+)
fba28c9
4 months ago
by koxudaxi
© 2026 CodSpeed Technology
Home Terms Privacy Docs