registerVerbHandler
Register a custom verb handler for specialized validation and configuration of
a SWML verb. When a verb with a registered handler is added via
addVerb(), the handler’s
validateConfig() method is used instead of generic schema validation.
Custom verb handlers are useful when a verb has complex validation rules that go beyond JSON Schema checks — for example, mutually exclusive parameters or conditional requirements.
Parameters
handler
An object implementing the SWMLVerbHandler interface. Must implement three
methods:
getVerbName(): string— returns the verb name this handler managesvalidateConfig(config): [boolean, string[]]— returns[isValid, errors]buildConfig(opts): Record<string, unknown>— returns a configuration object
Returns
void