larksuite/cli · error
schema enum requires at least one value
Error message
schema enum requires at least one value
What it means
Schema tag guard: the enum token was given with no values; an enum constraint must list at least one allowed value.
Source
Thrown at shortcuts/common/typed_compile_args.go:446
return result, fmt.Errorf("schema cannot declare both nullable and nonnullable")
}
v := key == "nullable"
result.nullable = &v
case "default":
if !hasValue || value == "" {
return result, fmt.Errorf("schema default requires a JSON literal")
}
if !input {
return result, fmt.Errorf("Data field cannot declare default")
}
var decoded any
if err := json.Unmarshal([]byte(value), &decoded); err != nil {
return result, fmt.Errorf("schema default is not valid JSON: %w", err)
}
result.defaultValue = typedInputDefault{Set: true, Value: decoded}
case "enum":
if !hasValue || value == "" {
return result, fmt.Errorf("schema enum requires at least one value")
}
result.enum = strings.Split(value, "|")
case "format":
if !hasValue || value == "" {
return result, fmt.Errorf("schema format requires a name")
}
result.format = value
case "minLength":
v, err := parseNonnegativeInt(value)
if err != nil {
return result, fmt.Errorf("schema minLength: %w", err)
}
result.minLength = &v
case "maxLength":
v, err := parseNonnegativeInt(value)
if err != nil {
return result, fmt.Errorf("schema maxLength: %w", err)
}View on GitHub (pinned to 7fd6ef3c07)
Solutions
- List pipe-separated values, e.g. enum:"a|b"
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at shortcuts/common/typed_compile_args.go:446 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of larksuite/cli@7fd6ef3c07 (2026-09-04).
Data as JSON: /api/errors/c8f481435df8ccad.
Report an issue: GitHub.