File tree Expand file tree Collapse file tree 1 file changed +21
-3
lines changed Expand file tree Collapse file tree 1 file changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -585,14 +585,32 @@ export class Runner implements IRunner {
585585 syncAllMentionedCells ( inputs ) ;
586586 await Promise . all ( promises ) ;
587587
588- const sourceCell = resultCell . getSourceCell ( {
588+ // TODO(@ubik2): Move this to a more general method in schema.ts or cfc.ts
589+ const processCellSchema : any = {
589590 type : "object" ,
590591 properties : {
591592 [ TYPE ] : { type : "string" } ,
592- argument : recipe . argumentSchema ?? { } ,
593+ argument : recipe . argumentSchema ?? true ,
593594 } ,
594595 required : [ TYPE ] ,
595- } ) ;
596+ } ;
597+
598+ if (
599+ isRecord ( processCellSchema ) && "properties" in processCellSchema &&
600+ isObject ( recipe . argumentSchema )
601+ ) {
602+ // extract $defs and definitions and remove them from argumentSchema
603+ const { $defs, definitions, ...rest } = recipe . argumentSchema ;
604+ ( processCellSchema as any ) . properties . argument = rest ?? true ;
605+ if ( isRecord ( $defs ) ) {
606+ ( processCellSchema as any ) . $defs = $defs ;
607+ }
608+ if ( isRecord ( definitions ) ) {
609+ ( processCellSchema as any ) . definitions = definitions ;
610+ }
611+ }
612+
613+ const sourceCell = resultCell . getSourceCell ( processCellSchema ) ;
596614 if ( ! sourceCell ) return false ;
597615
598616 await sourceCell . sync ( ) ;
You can’t perform that action at this time.
0 commit comments