{"record":{"id":"dc00e144b508bad0","repo":"larksuite/cli","slug":"enum-value-q-is-not-boolean","errorCode":null,"errorMessage":"enum value %q is not boolean","messagePattern":"enum value %q is not boolean","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"shortcuts/common/typed_compile_data.go","lineNumber":85,"sourceCode":"func shapeForType(t reflect.Type, schema schemaTag, input bool, active map[reflect.Type]struct{}) (typedValueShape, error) {\n\tbaseType := t\n\tfor baseType.Kind() == reflect.Pointer {\n\t\tbaseType = baseType.Elem()\n\t}\n\tvar shape typedValueShape\n\tswitch baseType.Kind() {\n\tcase reflect.String:\n\t\tstringShape := typedStringShape{Format: schema.format, MinLength: schema.minLength, MaxLength: schema.maxLength}\n\t\tfor _, raw := range schema.enum {\n\t\t\tstringShape.Enum = append(stringShape.Enum, raw)\n\t\t}\n\t\tshape = stringShape\n\tcase reflect.Bool:\n\t\tbooleanShape := typedBooleanShape{}\n\t\tfor _, raw := range schema.enum {\n\t\t\tv, err := parseBool(raw)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"enum value %q is not boolean\", raw)\n\t\t\t}\n\t\t\tbooleanShape.Enum = append(booleanShape.Enum, v)\n\t\t}\n\t\tif hasStringConstraints(schema) || hasNumberConstraints(schema) || hasItemConstraints(schema) {\n\t\t\treturn nil, fmt.Errorf(\"boolean field has incompatible schema constraint\")\n\t\t}\n\t\tshape = booleanShape\n\tcase reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:\n\t\tif input && baseType.Kind() >= reflect.Uint && baseType.Kind() <= reflect.Uint64 {\n\t\t\treturn nil, fmt.Errorf(\"unsigned integer CLI input %s is not supported; use int or an explicit JSON encoding\", baseType)\n\t\t}\n\t\tintegerShape := typedIntegerShape{}\n\t\tif schema.minimum != nil {\n\t\t\tv := int64(*schema.minimum)\n\t\t\tif float64(v) != *schema.minimum {\n\t\t\t\treturn nil, fmt.Errorf(\"minimum must be an integer\")\n\t\t\t}\n\t\t\tintegerShape.Minimum = &v","sourceCodeStart":67,"sourceCodeEnd":103,"githubUrl":"https://github.com/larksuite/cli/blob/7fd6ef3c07182257ce776cdc5a614e122d5bd4b3/shortcuts/common/typed_compile_data.go#L67-L103","documentation":"Compile-time guard in shapeForType: an enum entry on a boolean field is not parseable as true/false, so it cannot populate the boolean shape's allowed values.","triggerScenarios":"Thrown at shortcuts/common/typed_compile_data.go:85 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Write bool enum values as true|false"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7fd6ef3c07182257ce776cdc5a614e122d5bd4b3","analyzedAt":"2026-09-04T21:17:44.649Z","contentChangedAt":"2026-09-04T21:17:44.649Z","schemaVersion":2},"datasetVersion":"2026-09-12T02:17:10.037Z"}