File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,11 @@ const argv = yargs
2222 demandOption : false ,
2323 default : null ,
2424 } )
25+ . option ( "definer" , {
26+ describe : "Specify the name of definer function" ,
27+ type : "string" ,
28+ demandOption : false ,
29+ } )
2530 . argv ;
2631
2732type RemoveKeys < T , K extends keyof T > = {
Original file line number Diff line number Diff line change @@ -16,7 +16,11 @@ import findPredefinedSchemas from "./core/schemas";
1616 const schemaPaths = await getArgument ( "schemas" ) ;
1717 const schemas = await findPredefinedSchemas ( schemaPaths ) ;
1818
19- const spec = await generateOpenApiSpec ( schemas ) ;
19+ const routeDefinerName = await getArgument ( "definer" ) ;
20+
21+ const spec = await generateOpenApiSpec ( schemas , {
22+ routeDefinerName,
23+ } ) ;
2024 if ( ! spec . paths ) throw new Error ( "Couldn't find any valid path" ) ;
2125
2226 if ( spec . components . schemas ) {
You can’t perform that action at this time.
0 commit comments