@@ -128,11 +128,12 @@ describe("Types", () => {
128128 } ) ;
129129
130130 describe ( "GetRequestParamsInputFromDef" , ( ) => {
131- it ( "should get input type for all fields, ignoring a single response " , ( ) => {
131+ it ( "should get input type for all fields, ignoring other fields on the definition " , ( ) => {
132132 type Def = {
133133 query : z . ZodObject < { asc : z . ZodCoercedBoolean < string > } > ;
134
8000
134 params : z . ZodObject < { id : z . ZodString } > ;
135135 body : z . ZodObject < { id : z . ZodString ; user : z . ZodString } > ;
136+ operationId : string ;
136137 responses : z . ZodArray <
137138 z . ZodObject < { id : z . ZodString ; user : z . ZodString } >
138139 > ;
@@ -148,27 +149,6 @@ describe("Types", () => {
148149 expectTypeOf < Actual > ( ) . toEqualTypeOf < Expected > ( ) ;
149150 } ) ;
150151
151- it ( "should get input type for all fields, ignoring multiple responses" , ( ) => {
152- type Def = {
153- query : z . ZodObject < { asc : z . ZodCoercedBoolean < string > } > ;
154- params : z . ZodObject < { id : z . ZodString } > ;
155- body : z . ZodObject < { id : z . ZodString ; user : z . ZodString } > ;
156- responses : {
157- 200 : z . ZodArray < z . ZodObject < { id : z . ZodString ; user : z . ZodString } > > ;
158- 400 : typeof ErrorResponse ;
159- } ;
160- } ;
161- type Expected = {
162- query : { asc : string } ;
163- params : { id : string } ;
164- body : { id : string ; user : string } ;
165- } ;
166-
167- type Actual = t . GetRequestParamsInputFromDef < Def > ;
168-
169- expectTypeOf < Actual > ( ) . toEqualTypeOf < Expected > ( ) ;
170- } ) ;
171-
172152 it ( "should include only the body" , ( ) => {
173153 type Def = {
174154 body : z . ZodObject < { id : z . ZodString ; user : z . ZodString } > ;
0 commit comments