CommandRoute
Marks a class or annotation as a command route, defining the action, method, and other properties for handling commands.
Parameters
The name of the action or sub-resource. Defaults to DEFAULT_COMMAND_ACTION.
Whether the command route is enabled. Defaults to true
.
The HTTP method associated with the command. Defaults to Method.DEFAULT.
A prefix to be added to the command path. Defaults to an empty string.
Determines if the ID path should be appended. Defaults to AppendPath.DEFAULT.
Determines if the tenant path should be appended. Defaults to AppendPath.DEFAULT.
Determines if the owner path should be appended. Defaults to AppendPath.DEFAULT.
A deprecated field for providing a summary. Use @Summary instead. Defaults to an empty string.
A deprecated field for providing a description. Use @Description instead. Defaults to an empty string.
Example usage:
@CommandRoute(
action = "create",
method = CommandRoute.Method.POST,
prefix = "/api/v1",
appendIdPath = CommandRoute.AppendPath.ALWAYS,
enabled = true
)
class CreateResourceCommand {
// Command implementation
}