@@ -15,7 +15,7 @@ func TestEnumSupport(t *testing.T) {
1515 Format string `json:"format,omitempty" enum:"json,xml,text"`
1616 }
1717
18- schema := Generate (reflect .TypeOf ( WeatherInput {} ))
18+ schema := Generate (reflect .TypeFor [ WeatherInput ]( ))
1919
2020 require .Equal (t , "object" , schema .Type )
2121
@@ -300,7 +300,7 @@ func TestGenerateSchemaPointerTypes(t *testing.T) {
300300 Age * int `json:"age"`
301301 }
302302
303- schema := Generate (reflect .TypeOf ( StructWithPointers {} ))
303+ schema := Generate (reflect .TypeFor [ StructWithPointers ]( ))
304304
305305 require .Equal (t , "object" , schema .Type )
306306
@@ -324,7 +324,7 @@ func TestGenerateSchemaNestedStructs(t *testing.T) {
324324 Address Address `json:"address"`
325325 }
326326
327- schema := Generate (reflect .TypeOf ( Person {} ))
327+ schema := Generate (reflect .TypeFor [ Person ]( ))
328328
329329 require .Equal (t , "object" , schema .Type )
330330
@@ -345,7 +345,7 @@ func TestGenerateSchemaRecursiveStructs(t *testing.T) {
345345 Next * Node `json:"next,omitempty"`
346346 }
347347
348- schema := Generate (reflect .TypeOf ( Node {} ))
348+ schema := Generate (reflect .TypeFor [ Node ]( ))
349349
350350 require .Equal (t , "object" , schema .Type )
351351
@@ -367,7 +367,7 @@ func TestGenerateSchemaWithEnumTags(t *testing.T) {
367367 Optional string `json:"optional,omitempty" enum:"a,b,c"`
368368 }
369369
370- schema := Generate (reflect .TypeOf ( ConfigInput {} ))
370+ schema := Generate (reflect .TypeFor [ ConfigInput ]( ))
371371
372372 // Check level field
373373 levelSchema := schema .Properties ["level" ]
@@ -398,7 +398,7 @@ func TestGenerateSchemaComplexTypes(t *testing.T) {
398398 Interface any `json:"interface"`
399399 }
400400
401- schema := Generate (reflect .TypeOf ( ComplexInput {} ))
401+ schema := Generate (reflect .TypeFor [ ComplexInput ]( ))
402402
403403 // Check string slice
404404 stringSliceSchema := schema .Properties ["string_slice" ]
0 commit comments