File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ export class ExplainTool extends MongoDBToolBase {
1616 ...DbOperationArgs ,
1717 method : z
1818 . array (
19- z . union ( [
19+ z . discriminatedUnion ( "name" , [
2020 z . object ( {
2121 name : z . literal ( "aggregate" ) ,
2222 arguments : z . object ( AggregateArgs ) ,
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import { EJSON } from "bson";
66import { checkIndexUsage } from "../../../helpers/indexCheck.js" ;
77
88export const AggregateArgs = {
9- pipeline : z . array ( z . record ( z . string ( ) , z . unknown ( ) ) ) . describe ( "An array of aggregation stages to execute" ) ,
9+ pipeline : z . array ( z . object ( { } ) . passthrough ( ) ) . describe ( "An array of aggregation stages to execute" ) ,
1010} ;
1111
1212export class AggregateTool extends MongoDBToolBase {
You can’t perform that action at this time.
0 commit comments