Skip to content

Add Args to ColdBox Create Module #20

@richardherbert

Description

@richardherbert

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions