{"record":{"id":"0e8d81b497cca1c6","repo":"grpc-ecosystem/grpc-gateway","slug":"tag-entry-missing-required-name","errorCode":null,"errorMessage":"tag entry missing required \"name\"","messagePattern":"tag entry missing required \"name\"","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"openapiv3-merge/internal/merge/merge.go","lineNumber":475,"sourceCode":"\tdec := json.NewDecoder(bytes.NewReader(raw))\n\tdec.UseNumber()\n\tif err := dec.Decode(&v); err != nil {\n\t\treturn nil, err\n\t}\n\treturn json.Marshal(v)\n}\n\n// tagName extracts the `name` field from a tag entry. Tag entries without\n// a name violate the OpenAPI spec and are rejected.\nfunc tagName(raw json.RawMessage) (string, error) {\n\tvar t struct {\n\t\tName string `json:\"name\"`\n\t}\n\tif err := json.Unmarshal(raw, &t); err != nil {\n\t\treturn \"\", fmt.Errorf(\"invalid tag entry: %w\", err)\n\t}\n\tif t.Name == \"\" {\n\t\treturn \"\", errors.New(\"tag entry missing required \\\"name\\\"\")\n\t}\n\treturn t.Name, nil\n}\n\n// isJSONNull reports whether raw is the JSON null literal (possibly\n// surrounded by whitespace). Empty input also counts as null.\nfunc isJSONNull(raw json.RawMessage) bool {\n\tif len(raw) == 0 {\n\t\treturn true\n\t}\n\treturn bytes.Equal(bytes.TrimSpace(raw), []byte(\"null\"))\n}\n\n// orderedObject is an insertion-ordered JSON object. It is used for\n// `paths`, `webhooks`, and the bucket of unrecognised top-level keys —\n// the three places where input-file order matters and encoding/json's\n// alphabetical key sort would lose information.\ntype orderedObject struct {","sourceCodeStart":457,"sourceCodeEnd":493,"githubUrl":"https://github.com/grpc-ecosystem/grpc-gateway/blob/a58a4436a376a4bcc7d8f10c4d4f919a8438bba9/openapiv3-merge/internal/merge/merge.go#L457-L493","documentation":"Spec-compliance error from tagName: a tag object in the merged document's OpenAPI tags array has no non-empty \"name\" field, which the OpenAPI spec requires. The merge rejects the input rather than emitting an invalid nameless tag.","triggerScenarios":"Thrown at openapiv3-merge/internal/merge/merge.go:475 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add a non-empty \"name\" to the tag entry in the source OpenAPI document.","Remove the nameless tag entry if it is unneeded.","Ensure the generating plugin always emits tag objects with names."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a58a4436a376a4bcc7d8f10c4d4f919a8438bba9","analyzedAt":"2026-09-02T10:28:31.537Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T16:17:10.729Z"}