{"record":{"id":"46116ef441bd9d8e","repo":"larksuite/cli","slug":"l1-name-must-not-be-empty","errorCode":null,"errorMessage":"L1: name must not be empty","messagePattern":"L1: name must not be empty","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/schema/lint.go","lineNumber":34,"sourceCode":"\t\"number\":  true,\n\t\"boolean\": true,\n\t\"array\":   true,\n\t\"object\":  true,\n}\n\nvar validAccessTokens = map[string]bool{\n\t\"user\": true,\n\t\"bot\":  true,\n}\n\n// lintEnvelope runs L1-L3 checks and returns a list of errors. Empty slice\n// means the envelope is compliant.\nfunc lintEnvelope(env Envelope) []error {\n\tvar errs []error\n\n\t// ---- L1: structural ----\n\tif env.Name == \"\" {\n\t\terrs = append(errs, errors.New(\"L1: name must not be empty\"))\n\t}\n\tif env.InputSchema == nil {\n\t\terrs = append(errs, errors.New(\"L1: inputSchema must not be nil\"))\n\t} else {\n\t\tif env.InputSchema.Type != \"object\" {\n\t\t\terrs = append(errs, fmt.Errorf(\"L1: inputSchema.type = %q, want \\\"object\\\"\", env.InputSchema.Type))\n\t\t}\n\t\tif env.InputSchema.Properties == nil {\n\t\t\terrs = append(errs, errors.New(\"L1: inputSchema.properties must not be nil\"))\n\t\t}\n\t}\n\tif env.OutputSchema == nil {\n\t\terrs = append(errs, errors.New(\"L1: outputSchema must not be nil\"))\n\t} else {\n\t\tif env.OutputSchema.Type != \"object\" {\n\t\t\terrs = append(errs, fmt.Errorf(\"L1: outputSchema.type = %q, want \\\"object\\\"\", env.OutputSchema.Type))\n\t\t}\n\t}","sourceCodeStart":16,"sourceCodeEnd":52,"githubUrl":"https://github.com/larksuite/cli/blob/7fd6ef3c07182257ce776cdc5a614e122d5bd4b3/internal/schema/lint.go#L16-L52","documentation":"First L1 structural check in lintEnvelope: a command schema Envelope was submitted with an empty Name, so the envelope cannot identify the command it describes. Part of the schema compliance lint - an empty error slice means the envelope is compliant.","triggerScenarios":"Thrown at internal/schema/lint.go:34 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Populate Envelope.Name with the command's non-empty schema name before publishing"],"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"}