{"record":{"id":"851fe7b93f694d11","repo":"grpc-ecosystem/grpc-gateway","slug":"invalid-header-parameter-type-v","errorCode":null,"errorMessage":"invalid header parameter type: %+v","messagePattern":"invalid header parameter type: %\\+v","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"protoc-gen-openapiv2/internal/genopenapi/template.go","lineNumber":2190,"sourceCode":"\t\t\t\t\t\t\tparam := openapiParameterObject{\n\t\t\t\t\t\t\t\tIn:          \"header\",\n\t\t\t\t\t\t\t\tName:        header.Name,\n\t\t\t\t\t\t\t\tDescription: header.Description,\n\t\t\t\t\t\t\t\tRequired:    header.Required,\n\t\t\t\t\t\t\t\tFormat:      header.Format,\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tswitch header.Type {\n\t\t\t\t\t\t\tcase openapi_options.HeaderParameter_STRING:\n\t\t\t\t\t\t\t\tparam.Type = \"string\"\n\t\t\t\t\t\t\tcase openapi_options.HeaderParameter_NUMBER:\n\t\t\t\t\t\t\t\tparam.Type = \"number\"\n\t\t\t\t\t\t\tcase openapi_options.HeaderParameter_INTEGER:\n\t\t\t\t\t\t\t\tparam.Type = \"integer\"\n\t\t\t\t\t\t\tcase openapi_options.HeaderParameter_BOOLEAN:\n\t\t\t\t\t\t\t\tparam.Type = \"boolean\"\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\treturn fmt.Errorf(\"invalid header parameter type: %+v\", header.Type)\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\toperationObject.Parameters = append(operationObject.Parameters, param)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// TODO(ivucica): add remaining fields of operation object\n\t\t\t\t}\n\n\t\t\t\tswitch b.HTTPMethod {\n\t\t\t\tcase \"DELETE\":\n\t\t\t\t\tpathItemObject.Delete = operationObject\n\t\t\t\tcase \"GET\":\n\t\t\t\t\tpathItemObject.Get = operationObject\n\t\t\t\tcase \"POST\":\n\t\t\t\t\tpathItemObject.Post = operationObject\n\t\t\t\tcase \"PUT\":\n\t\t\t\t\tpathItemObject.Put = operationObject","sourceCodeStart":2172,"sourceCodeEnd":2208,"githubUrl":"https://github.com/grpc-ecosystem/grpc-gateway/blob/a58a4436a376a4bcc7d8f10c4d4f919a8438bba9/protoc-gen-openapiv2/internal/genopenapi/template.go#L2172-L2208","documentation":"Schema-mapping error in genopenapi renderServices: an openapi_options HeaderParameter has a type enum value outside the known STRING/NUMBER/INTEGER/BOOLEAN set, so the generator cannot map it to an OpenAPI parameter type. The failing input is the header parameter option with the unsupported type value.","triggerScenarios":"Thrown at protoc-gen-openapiv2/internal/genopenapi/template.go:2190 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set the header parameter's type to one of STRING, NUMBER, INTEGER, or BOOLEAN in the openapiv2 options.","Regenerate if a newer plugin supports additional header types."],"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"}