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

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
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