You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Generated enums repeat values under _1 names (19 enums on 10.0.0b4, 17 on 9.3.0) #1782
Codegen emits some StrEnums with the same value twice, under a second name ending in _1. For example, postal_country_system.System has zip = 'zip' and zip_1 = 'zip', and display_tag_asset.Field17 has ad_request_url_1 = 'ad_request_url'. Python turns the second member into an alias of the first. So nothing breaks at runtime, but:
autocomplete, docs and __members__ offer names that are not AdCP values;
code that switches on a member name (or serializes member.name) can see zip_1;
the duplicates suggest the generator merges overlapping enum lists from sibling anyOf arms without deduplicating them.
Fixed on next by #1799 (squash 03572535): post_generate_fixes.dedupe_enum_member_values drops the _1 alias members and tests/test_generated_enums_have_no_aliases.py holds the whole generated tree to it. Ships in the next 10.0.0 beta; breaking for code that named an alias member (migration row added).
Activity
fix(codegen)!: name each generated enum value once
fix(codegen)!: name each generated enum value once (#1799)
bokelley commentedon Nov 2, 2026
Fixed on
nextby #1799 (squash03572535):post_generate_fixes.dedupe_enum_member_valuesdrops the_1alias members andtests/test_generated_enums_have_no_aliases.pyholds the whole generated tree to it. Ships in the next 10.0.0 beta; breaking for code that named an alias member (migration row added).