{"record":{"id":"2ecd70ec909c13a9","repo":"flipped-aurora/gin-vue-admin","slug":"d-humppackagename","errorCode":null,"errorMessage":"模块 %d 的 humpPackageName 不能为空","messagePattern":"模块 (.+?) 的 humpPackageName 不能为空","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/mcp/gva_execute.go","lineNumber":344,"sourceCode":"\t\t\t\treturn fmt.Errorf(\"模块 %d 的 package 不能为空\", moduleIndex+1)\n\t\t\t}\n\t\t\tif moduleInfo.StructName == \"\" {\n\t\t\t\treturn fmt.Errorf(\"模块 %d 的 structName 不能为空\", moduleIndex+1)\n\t\t\t}\n\t\t\tif moduleInfo.TableName == \"\" {\n\t\t\t\treturn fmt.Errorf(\"模块 %d 的 tableName 不能为空\", moduleIndex+1)\n\t\t\t}\n\t\t\tif moduleInfo.Description == \"\" {\n\t\t\t\treturn fmt.Errorf(\"模块 %d 的 description 不能为空\", moduleIndex+1)\n\t\t\t}\n\t\t\tif moduleInfo.Abbreviation == \"\" {\n\t\t\t\treturn fmt.Errorf(\"模块 %d 的 abbreviation 不能为空\", moduleIndex+1)\n\t\t\t}\n\t\t\tif moduleInfo.PackageName == \"\" {\n\t\t\t\treturn fmt.Errorf(\"模块 %d 的 packageName 不能为空\", moduleIndex+1)\n\t\t\t}\n\t\t\tif moduleInfo.HumpPackageName == \"\" {\n\t\t\t\treturn fmt.Errorf(\"模块 %d 的 humpPackageName 不能为空\", moduleIndex+1)\n\t\t\t}\n\t\t\tif len(moduleInfo.Fields) == 0 {\n\t\t\t\treturn fmt.Errorf(\"模块 %d 的 fields 不能为空，至少需要一个字段\", moduleIndex+1)\n\t\t\t}\n\n\t\t\tfor i, field := range moduleInfo.Fields {\n\t\t\t\tif field.FieldName == \"\" {\n\t\t\t\t\treturn fmt.Errorf(\"模块 %d 字段 %d 的 fieldName 不能为空\", moduleIndex+1, i+1)\n\t\t\t\t}\n\t\t\t\tif len(field.FieldName) > 0 {\n\t\t\t\t\tfirstChar := string(field.FieldName[0])\n\t\t\t\t\tif firstChar >= \"a\" && firstChar <= \"z\" {\n\t\t\t\t\t\tmoduleInfo.Fields[i].FieldName = strings.ToUpper(firstChar) + field.FieldName[1:]\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif field.FieldDesc == \"\" {\n\t\t\t\t\treturn fmt.Errorf(\"模块 %d 字段 %d 的 fieldDesc 不能为空\", moduleIndex+1, i+1)\n\t\t\t\t}","sourceCodeStart":326,"sourceCodeEnd":362,"githubUrl":"https://github.com/flipped-aurora/gin-vue-admin/blob/3136500ef380842b0eb6c4daa87c3f8a47fcf9e0/server/mcp/gva_execute.go#L326-L362","documentation":"Besides packageName, the plan requires a HumpPackageName (camelCase variant, e.g. gvaArticle) used in generated identifiers, titles, and web-side naming. validateExecutionPlan throws this error when modules[i].humpPackageName is empty. It runs within Handle before generation.","triggerScenarios":"Calling gva_execute with a plan where modules[i].humpPackageName is missing or \"\" while packageName is set.","commonSituations":"Plans that assume the generator derives the camelCase name automatically; scripts that copy packageName into both fields and accidentally blank the hump variant; older plan formats that lacked this field.","solutions":["Add a camelCase humpPackageName (e.g. \"gvaArticle\" or \"article\") to the module entry","Make it consistent with packageName (same word, camel-cased) to avoid confusing generated names","Re-run gva_execute"],"exampleFix":"// before\n{\"packageName\":\"article\",\"humpPackageName\":\"\"}\n// after\n{\"packageName\":\"article\",\"humpPackageName\":\"article\"}","handlingStrategy":"validation","validationCode":"for i, m := range plan.Modules {\n  if m.HumpPackageName == \"\" {\n    return fmt.Errorf(\"modules[%d].humpPackageName is required\", i)\n  }\n}","typeGuard":"func hasHumpPackageName(m Module) bool { return m.HumpPackageName != \"\" }","tryCatchPattern":null,"preventionTips":["Derive humpPackageName from packageName instead of writing it manually","Keep both name fields filled by a single plan-authoring helper","Validate all module metadata fields together in one pre-flight pass"],"tags":["mcp","code-generation","validation","naming"],"backgroundTag":"missing-required-field","analyzedSha":"3136500ef380842b0eb6c4daa87c3f8a47fcf9e0","analyzedAt":"2026-08-31T13:50:02.721Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}