File tree 3 files changed +3
-2
lines changed
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';
83
83
@JsonApi (Users , {
84
84
allowMethod: excludeMethod ([' deleteRelationship' ]),
85
85
requiredSelectField: true ,
86
+ overrideName: ' user' ,
86
87
})
87
88
export class ExtendUserController extends JsonBaseController <Users > {
88
89
@InjectService () public service: JsonApiService <Users >;
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ export function setSwaggerDecorator(
24
24
const entityName =
25
25
entity instanceof Function ? entity . name : entity . options . name ;
26
26
27
- ApiTags ( config [ 'overrideName' ] || `${ camelToKebab ( entityName ) } ` ) (
27
+ ApiTags ( config ?. [ 'overrideName' ] || `${ camelToKebab ( entityName ) } ` ) (
28
28
controller
29
29
) ;
30
30
}
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ BaseModuleClass.forRoot = function (options): DynamicModule {
53
53
54
54
const transformService = transformMixin ( entity , connectionName ) ;
55
55
const serviceClass = typeormMixin ( entity , connectionName , transformService ) ;
56
- Controller ( decoratorOptions [ 'overrideName' ] || `${ camelToKebab ( entityName ) } ` ) (
56
+ Controller ( decoratorOptions ?. [ 'overrideName' ] || `${ camelToKebab ( entityName ) } ` ) (
57
57
controllerClass
58
58
) ;
59
59
UseInterceptors ( ErrorInterceptors ) ( controllerClass ) ;
You can’t perform that action at this time.
0 commit comments