CommandRoute

annotation class CommandRoute(val action: String = DEFAULT_COMMAND_ACTION, val enabled: Boolean = true, val method: CommandRoute.Method = Method.DEFAULT, val prefix: String = "", val appendIdPath: CommandRoute.AppendPath = AppendPath.DEFAULT, val appendTenantPath: CommandRoute.AppendPath = AppendPath.DEFAULT, val appendOwnerPath: CommandRoute.AppendPath = AppendPath.DEFAULT, val summary: String = "", val description: String = "")

Marks a class or annotation as a command route, defining the action, method, and other properties for handling commands.

Parameters

action

The name of the action or sub-resource. Defaults to DEFAULT_COMMAND_ACTION.

enabled

Whether the command route is enabled. Defaults to true.

method

The HTTP method associated with the command. Defaults to Method.DEFAULT.

prefix

A prefix to be added to the command path. Defaults to an empty string.

appendIdPath

Determines if the ID path should be appended. Defaults to AppendPath.DEFAULT.

appendTenantPath

Determines if the tenant path should be appended. Defaults to AppendPath.DEFAULT.

appendOwnerPath

Determines if the owner path should be appended. Defaults to AppendPath.DEFAULT.

summary

A deprecated field for providing a summary. Use @Summary instead. Defaults to an empty string.

description

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
}

Types

Link copied to clipboard
Link copied to clipboard
annotation class HeaderVariable(val name: String = "", val nestedPath: Array<String> = [], val required: Boolean = true)
Link copied to clipboard
Link copied to clipboard
annotation class PathVariable(val name: String = "", val nestedPath: Array<String> = [], val required: Boolean = true)

Properties

Link copied to clipboard

action name or sub resource name

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val enabled: Boolean = true
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard