File tree Expand file tree Collapse file tree
advanced-modeling/codegen/generators
showcase/codegen/generators Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -735,7 +735,10 @@ export const routesFile = function routesFile(opts?: RoutesFileOpts): Generator
735735 name : "routes-file" ,
736736 // Read by the api reference (`apiDocsFile()`): it lists the verbs this file mounts, so an
737737 // `expose` you pass here is honoured there. Keep this line if you change what the file mounts.
738- mountsRoutes : opts ?. expose !== undefined ? { expose : opts . expose } : { } ,
738+ mountsRoutes : {
739+ ...( opts ?. expose !== undefined && { expose : opts . expose } ) ,
740+ ...( opts ?. filter !== undefined && { filter : opts . filter } ) ,
741+ } ,
739742 // TPH subtypes get no standalone routes file (their routes live in the discriminator
740743 // base's); AND-composed with your filter.
741744 // #248 R2: an object with no declared/inherited source.rdb (of ANY kind) isn't
Original file line number Diff line number Diff line change @@ -735,7 +735,10 @@ export const routesFile = function routesFile(opts?: RoutesFileOpts): Generator
735735 name : "routes-file" ,
736736 // Read by the api reference (`apiDocsFile()`): it lists the verbs this file mounts, so an
737737 // `expose` you pass here is honoured there. Keep this line if you change what the file mounts.
738- mountsRoutes : opts ?. expose !== undefined ? { expose : opts . expose } : { } ,
738+ mountsRoutes : {
739+ ...( opts ?. expose !== undefined && { expose : opts . expose } ) ,
740+ ...( opts ?. filter !== undefined && { filter : opts . filter } ) ,
741+ } ,
739742 // TPH subtypes get no standalone routes file (their routes live in the discriminator
740743 // base's); AND-composed with your filter.
741744 // #248 R2: an object with no declared/inherited source.rdb (of ANY kind) isn't
You can’t perform that action at this time.
0 commit comments