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:
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.
Summary
Add
entryPointandinheritEntryPointarguments tocoldbox create moduleDetailed 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/v1Calling the route
/foo/v1will result in the error:The event: foo:v1 is not a valid registered event.The workaround is to create the module
fooV1underfooand then update theModuleConfig.cfcentries forthis.entryPointtov1andthis.inheritEntryPointtotruePossible Implementation Ideas
By adding the arguments
entryPointandinheritEntryPointtocoldbox create modulethis issue could be resolved when creating the module. For example:coldbox create module name=fooV1 entryPoint=v1 inheritEntryPoint=trueOptionally
cfmapping=fooV1could be added. ThemodelNamespacecurrently inherits thenamevalue.