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

Add dynamic model generation support

#2901Merged
Comparing
feature/dynamic-model-generation-v2
(
8cf8bdf
) with
main
(
a2b2756
)
CodSpeed Performance Gauge
-3%
Untouched
11
Skipped
98

Benchmarks

109 total
test_perf_duplicate_names
tests/main/test_performance.py
CodSpeed Performance Gauge
-1%
1 s1 s
test_perf_deep_nested
tests/main/test_performance.py
CodSpeed Performance Gauge
-1%
6 s6.1 s
test_perf_all_options_enabled
tests/main/test_performance.py
CodSpeed Performance Gauge
-2%
6.7 s6.8 s
test_perf_stripe_style_pydantic_v2
tests/main/test_performance.py
CodSpeed Performance Gauge
-2%
2 s2 s
test_perf_large_models_pydantic_v2
tests/main/test_performance.py
CodSpeed Performance Gauge
-2%
3.6 s3.7 s
test_perf_multiple_files_input
tests/main/test_performance.py
CodSpeed Performance Gauge
-2%
3.7 s3.8 s
test_perf_openapi_large
tests/main/test_performance.py
CodSpeed Performance Gauge
-3%
2.8 s2.9 s
test_perf_graphql_style_pydantic_v2
tests/main/test_performance.py
CodSpeed Performance Gauge
-3%
813.8 ms842.3 ms
test_perf_kubernetes_style_pydantic_v2
tests/main/test_performance.py
CodSpeed Performance Gauge
-4%
2.6 s2.7 s
test_perf_complex_refs
tests/main/test_performance.py
CodSpeed Performance Gauge
-4%
2 s2.1 s
test_perf_aws_style_openapi_pydantic_v2
tests/main/test_performance.py
CodSpeed Performance Gauge
-5%
1.9 s2 s
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*

Commits

Click on a commit to change the comparison range
Base
main
a2b2756
+20.73%
Add dynamic model generation support
a323995
4 months ago
by koxudaxi
-22.82%
Add dynamic model generation support
b46fa8b
4 months ago
by koxudaxi
+1.21%
Move dynamic model generation to separate module with lazy import
27ac766
4 months ago
by koxudaxi
-5.31%
Move imports to top level except circular import avoidance
2d7ab5e
4 months ago
by koxudaxi
+6.07%
Add create_module_getattr helper for DRY lazy imports
7bc4a21
4 months ago
by koxudaxi
-0.68%
Move dynamic.py imports to top level and use direct import in __init__.py
46f7a71
4 months ago
by koxudaxi
+2.53%
Add multi-module support and simplify thread lock
b266a57
4 months ago
by koxudaxi
-0.27%
Refactor tests with assert helpers and DRY patterns
9d9c8bb
4 months ago
by koxudaxi
-2.14%
Refactor to use stable_toposort and ast-based import parsing
f2ddb50
4 months ago
by koxudaxi
+0.64%
Refactor tests to use model_validate assertions
091770b
4 months ago
by koxudaxi
-12.91%
Add generate_and_validate helper with inline-snapshot
751b28d
4 months ago
by koxudaxi
+33.42%
Use assert_dynamic_models helper with external_file
a1be68f
4 months ago
by koxudaxi
-22.06%
Fix test helper to use external_file for JSON comparison
e90286a
4 months ago
by koxudaxi
+1.76%
Remove inline comment from test helper
be0ed14
4 months ago
by koxudaxi
-2.84%
Extract OpenAPI schema to external file
4e94952
4 months ago
by koxudaxi
-1.25%
Add tests to achieve 100% coverage for dynamic.py
8044952
4 months ago
by koxudaxi
+2.69%
Fix thread safety issues in dynamic model generation
9792cbf
4 months ago
by koxudaxi
-1.37%
Refactor cache key to preserve list order and remove dead code
3b1bef0
4 months ago
by koxudaxi
+2.02%
Make dynamic module imports lazy
b70edb0
4 months ago
by koxudaxi
-2.11%
Add dynamic model generation to docs navigation
8cf8bdf
4 months ago
by koxudaxi
© 2026 CodSpeed Technology
Home Terms Privacy Docs