File tree Expand file tree Collapse file tree 1 file changed +4
-12
lines changed
tests/codegen/snapshot/snapshots/test_unknown_enum/enumService Expand file tree Collapse file tree 1 file changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ def encode_NeedsenumobjectInputOneOf_in_first(
3838
3939
4040class NeedsenumobjectInputOneOf_in_first (TypedDict ):
41- kind : Literal ["in_first" ]
41+ kind : Annotated [ Literal ["in_first" ], Field ( alias = "$kind" ) ]
4242 value : str
4343
4444
@@ -58,7 +58,7 @@ def encode_NeedsenumobjectInputOneOf_in_second(
5858
5959
6060class NeedsenumobjectInputOneOf_in_second (TypedDict ):
61- kind : Literal ["in_second" ]
61+ kind : Annotated [ Literal ["in_second" ], Field ( alias = "$kind" ) ]
6262 bleep : int
6363
6464
@@ -83,20 +83,12 @@ def encode_NeedsenumobjectInput(
8383
8484
8585class NeedsenumobjectOutputFooOneOf_out_first (BaseModel ):
86- kind : Literal ["out_first" ] = Field (
87- "out_first" ,
88- alias = "$kind" , # type: ignore
89- )
90-
86+ kind : Annotated [Literal ["out_first" ], Field (alias = "$kind" )] = "out_first"
9187 foo : int
9288
9389
9490class NeedsenumobjectOutputFooOneOf_out_second (BaseModel ):
95- kind : Literal ["out_second" ] = Field (
96- "out_second" ,
97- alias = "$kind" , # type: ignore
98- )
99-
91+ kind : Annotated [Literal ["out_second" ], Field (alias = "$kind" )] = "out_second"
10092 bar : int
10193
10294
You can’t perform that action at this time.
0 commit comments