File tree Expand file tree Collapse file tree 3 files changed +3
-2
lines changed
Expand file tree Collapse file tree 3 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -83,6 +83,7 @@ import {ExampleService} from '../../service/example/example.service';
8383@JsonApi (Users , {
8484 allowMethod: excludeMethod ([' deleteRelationship' ]),
8585 requiredSelectField: true ,
86+ overrideName: ' user' ,
8687})
8788export class ExtendUserController extends JsonBaseController <Users > {
8889 @InjectService () public service: JsonApiService <Users >;
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ export function setSwaggerDecorator(
2424 const entityName =
2525 entity instanceof Function ? entity . name : entity . options . name ;
2626
27- ApiTags ( config [ 'overrideName' ] || `${ camelToKebab ( entityName ) } ` ) (
27+ ApiTags ( config ?. [ 'overrideName' ] || `${ camelToKebab ( entityName ) } ` ) (
2828 controller
2929 ) ;
3030 }
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ BaseModuleClass.forRoot = function (options): DynamicModule {
5353
5454 const transformService = transformMixin ( entity , connectionName ) ;
5555 const serviceClass = typeormMixin ( entity , connectionName , transformService ) ;
56- Controller ( decoratorOptions [ 'overrideName' ] || `${ camelToKebab ( entityName ) } ` ) (
56+ Controller ( decoratorOptions ?. [ 'overrideName' ] || `${ camelToKebab ( entityName ) } ` ) (
5757 controllerClass
5858 ) ;
5959 UseInterceptors ( ErrorInterceptors ) ( controllerClass ) ;
You can’t perform that action at this time.
0 commit comments