-
-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Summary
Add entryPoint and inheritEntryPoint arguments to coldbox create module
Detailed Description
When creating a module with the same name as an existing module, the naming conflict causes one of the module not to exist in the routing table. This is an issue with nested modules in an HMVC application, like an API. For example:
/foo/v1/bar/v1
Calling the route /foo/v1 will result in the error: The event: foo:v1 is not a valid registered event.
The workaround is to create the module fooV1 under foo and then update the ModuleConfig.cfc entries for this.entryPoint to v1 and this.inheritEntryPoint to true
Possible Implementation Ideas
By adding the arguments entryPoint and inheritEntryPoint to coldbox create module this issue could be resolved when creating the module. For example:
coldbox create module name=fooV1 entryPoint=v1 inheritEntryPoint=true
Optionally cfmapping=fooV1 could be added. The modelNamespace currently inherits the name value.