diff --git a/models/RoutesParser.cfc b/models/RoutesParser.cfc index 47ca675..f13ee3d 100644 --- a/models/RoutesParser.cfc +++ b/models/RoutesParser.cfc @@ -295,7 +295,7 @@ component accessors="true" threadsafe singleton { appendFunctionInfo( methodName = methodName, method = path[ lCase( methodName ) ], - functionName = actions[ methodList ], + functionName = listLast( actions[ methodList ], "." ), handlerMetadata = arguments.handlerMetadata, moduleName = len( arguments.routeConfig.module ) ? arguments.routeConfig.module : javacast( "null", @@ -424,10 +424,14 @@ component accessors="true" threadsafe singleton { * @throws cbSwagger.RoutesParse.handlerSyntaxException */ private any function getHandlerMetadata( required any route ){ - var handlerRoute = ( isNull( arguments.route.handler ) ? "" : arguments.route.handler ); var module = ( isNull( arguments.route.module ) ? "" : arguments.route.module ); + var handlerRoute = ( isNull( arguments.route.handler ) ? "" : arguments.route.handler ); var fullEvent = ( isNull( arguments.route.event ) ? "" : arguments.route.event ); + if( !len( handlerRoute ) && isStruct( arguments.route.action ) ){ + var fullEvent = arguments.route.action[ arguments.route.action.keyArray().first() ]; + } + // Do event's first, if found, use it for the handler location if ( len( fullEvent ) ) { // remove last part which should be the action @@ -480,6 +484,10 @@ component accessors="true" threadsafe singleton { ); // Name arguments.method[ "x-coldbox-operation" ] = operationPath & "." & arguments.functionName; + if( findnoCase( "timers.timers", arguments.method[ "x-coldbox-operation" ] ) ){ + writeDUmp( arguments ); + abort; + } arguments.method[ "operationId" ] = arguments.method[ "x-coldbox-operation" ]; arguments.functionMetaData = getFunctionMetaData( arguments.functionName, arguments.handlerMetadata ); // Process function metadata