koxudaxi
datamodel-code-generator
BlogDocsChangelog

Use Enum Members in Discriminators with Safe Imports

#2609Merged
Comparing
enum-discriminator-literals-imports
(
fffd17f
) with
main
(
3930969
)
CodSpeed Performance Gauge
-1%
Untouched
32
Skipped
3

Benchmarks

Skipped (3)

Passed

test_main_modular
tests/main/openapi/test_main_openapi.py
CodSpeed Performance Gauge
-1%
311.1 ms312.7 ms
test_main_openapi_nullable
tests/main/openapi/test_main_openapi.py
CodSpeed Performance Gauge
-1%
130.8 ms131.6 ms
test_force_optional
tests/main/openapi/test_main_openapi.py
CodSpeed Performance Gauge
-1%
123.1 ms123.9 ms
test_main
tests/main/openapi/test_main_openapi.py
CodSpeed Performance Gauge
-1%
111.1 ms111.9 ms
test_main_jsonschema_root_model_ordering[extra_args0-jsonschema_root_model_ordering.py]
tests/main/jsonschema/test_main_jsonschema.py
CodSpeed Performance Gauge
-1%
110.1 ms111 ms
test_main_jsonschema_root_model_ordering[extra_args1-jsonschema_root_model_ordering_keep_model_order.py]
tests/main/jsonschema/test_main_jsonschema.py
CodSpeed Performance Gauge
-1%
110.1 ms111 ms
test_use_default
tests/main/openapi/test_main_openapi.py
CodSpeed Performance Gauge
-1%
112 ms113 ms
test_main_inheritance_forward_ref
tests/main/jsonschema/test_main_jsonschema.py
CodSpeed Performance Gauge
-1%
104 ms105 ms
test_main_with_snake_case_field
tests/main/openapi/test_main_openapi.py
CodSpeed Performance Gauge
-1%
115.9 ms117 ms
test_main_with_strip_default_none
tests/main/openapi/test_main_openapi.py
CodSpeed Performance Gauge
-1%
108.8 ms109.9 ms
test_main_root_id_jsonschema_self_refs_with_local_file
tests/main/jsonschema/test_main_jsonschema.py
CodSpeed Performance Gauge
-1%
71.1 ms71.8 ms
test_main_inheritance_forward_ref_keep_model_order
tests/main/jsonschema/test_main_jsonschema.py
CodSpeed Performance Gauge
-1%
103.7 ms104.7 ms
test_main_jsonschema_multiple_files
tests/main/jsonschema/test_main_jsonschema.py
CodSpeed Performance Gauge
-1%
75.2 ms76 ms
test_main_strict_types
tests/main/jsonschema/test_main_jsonschema.py
CodSpeed Performance Gauge
-1%
68.7 ms69.4 ms
test_main_root_id_jsonschema_self_refs_with_remote_file
tests/main/jsonschema/test_main_jsonschema.py
CodSpeed Performance Gauge
-1%
71.3 ms72.1 ms
test_main_jsonschema_nested_deep
tests/main/jsonschema/test_main_jsonschema.py
CodSpeed Performance Gauge
-1%
65.9 ms66.7 ms
test_main_jsonschema_collapsed_external_references
tests/main/jsonschema/test_main_jsonschema.py
CodSpeed Performance Gauge
-1%
67.6 ms68.4 ms
test_main_json_reuse_enum_default_member
tests/main/jsonschema/test_main_jsonschema.py
CodSpeed Performance Gauge
-1%
66.6 ms67.4 ms
test_main_collapse_root_models
tests/main/openapi/test_main_openapi.py
CodSpeed Performance Gauge
-1%
68.9 ms69.8 ms
test_main_type_alias_forward_ref_keep_model_order
tests/main/jsonschema/test_main_jsonschema.py
CodSpeed Performance Gauge
-1%
45.7 ms46.3 ms
test_main_jsonschema_special_field_name
tests/main/jsonschema/test_main_jsonschema.py
CodSpeed Performance Gauge
-1%
52.1 ms52.9 ms
test_main_jsonschema_field_include_all_keys
tests/main/jsonschema/test_main_jsonschema.py
CodSpeed Performance Gauge
-1%
49.8 ms50.6 ms
test_main_autodetect
tests/main/jsonschema/test_main_jsonschema.py
CodSpeed Performance Gauge
-1%
50.4 ms51.1 ms
test_main_jsonschema_required_and_any_of_required
tests/main/jsonschema/test_main_jsonschema.py
CodSpeed Performance Gauge
-2%
47.4 ms48.2 ms
test_main_openapi_all_of_required
tests/main/openapi/test_main_openapi.py
CodSpeed Performance Gauge
-2%
39.8 ms40.5 ms
test_main_all_of_ref
tests/main/jsonschema/test_main_jsonschema.py
CodSpeed Performance Gauge
-2%
36.4 ms37.1 ms
test_main_jsonschema_id
tests/main/jsonschema/test_main_jsonschema.py
CodSpeed Performance Gauge
-2%
40.1 ms40.9 ms
test_main_external_definitions
tests/main/jsonschema/test_main_jsonschema.py
CodSpeed Performance Gauge
-2%
36.3 ms37 ms
test_main_yaml
tests/main/test_main_yaml.py
CodSpeed Performance Gauge
-2%
32.3 ms33 ms
test_main_openapi_nullable_31
tests/main/openapi/test_main_openapi.py
CodSpeed Performance Gauge
-2%
33.7 ms34.5 ms
test_main_jsonschema_no_empty_collapsed_external_model
tests/main/jsonschema/test_main_jsonschema.py
CodSpeed Performance Gauge
-2%
32.4 ms33.1 ms
test_main_jsonschema_external_files
tests/main/jsonschema/test_main_jsonschema.py
CodSpeed Performance Gauge
-2%
34.2 ms34.9 ms

Commits

Click on a commit to change the comparison range
Base
main
3930969
-1.2%
Feat: Add support for using enum member literals in discriminator fields
ee50c47
20 hours ago
by koxudaxi
-0.16%
Feat: Implement enum member imports for discriminator literals and add tests
a79db26
17 hours ago
by koxudaxi
+0.1%
Refactor: Remove deprecated test for enum values in discriminator literals
8f6a46c
16 hours ago
by koxudaxi
+0.02%
Refactor: Clean up code with pragma comments for better coverage tracking
7b30a32
16 hours ago
by koxudaxi
-0.01%
Refactor: Add pragma comments to improve coverage tracking in base.py
59944db
15 hours ago
by koxudaxi
+0.02%
Merge branch 'main' into enum-discriminator-literals-imports
d942401
15 hours ago
by koxudaxi
-0.04%
Refactor: Simplify discriminator data type creation and enhance enum source resolution
fffd17f
15 hours ago
by koxudaxi
© 2025 CodSpeed Technology
Home Terms Privacy Docs