File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,8 @@ export class YupGenerator {
3939 public generate ( ) : string {
4040 return [
4141 ...Object . values ( this . enums ) . map (
42- ( enumdef ) => `export const ${ enumdef . name . value } Schema = yup.mixed().oneOf(Object.values(${ enumdef . name . value } ))`
42+ ( enumdef ) =>
43+ `export const ${ enumdef . name . value } Schema = yup.mixed().oneOf(Object.values(${ enumdef . name . value } ))`
4344 ) ,
4445 ...this . inputObjects . map ( ( inputObject ) =>
4546 this . generateInputObjectYupSchema ( inputObject )
@@ -87,9 +88,8 @@ export class YupGenerator {
8788 type : TypeNode
8889 ) : string => {
8990 if ( isListType ( type ) ) {
90- return `yup.array().of(${ this . generateInputObjectFieldTypeYupSchema (
91- type . type
92- ) } )`;
91+ const schema = this . generateInputObjectFieldTypeYupSchema ( type . type ) ;
92+ return `yup.array().of(${ maybeLazy ( type . type , schema ) } )` ;
9393 }
9494 if ( isNonNullType ( type ) ) {
9595 const schema = this . generateInputObjectFieldTypeYupSchema ( type . type ) ;
You can’t perform that action at this time.
0 commit comments