{"record":{"id":"c3756172b4a2fc8e","repo":"grpc-ecosystem/grpc-gateway","slug":"the-provided-header-type-q-is-not-supported","errorCode":null,"errorMessage":"the provided header type %q is not supported","messagePattern":"the provided header type %q is not supported","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"protoc-gen-openapiv2/internal/genopenapi/template.go","lineNumber":2751,"sourceCode":"\t\tcase \"uint\",\n\t\t\t\"uint8\",\n\t\t\t\"uint16\",\n\t\t\t\"uint32\",\n\t\t\t\"uint64\",\n\t\t\t\"int\",\n\t\t\t\"int8\",\n\t\t\t\"int16\",\n\t\t\t\"int32\",\n\t\t\t\"int64\",\n\t\t\t\"\":\n\t\t\treturn nil\n\t\tdefault:\n\t\t\treturn fmt.Errorf(\"the provided format %q is not a valid extension of the type %q\", format, headerType)\n\t\t}\n\tcase \"boolean\":\n\t\treturn nil\n\t}\n\treturn fmt.Errorf(\"the provided header type %q is not supported\", headerType)\n}\n\nfunc validateDefaultValueTypeAndFormat(headerType string, defaultValue string, format string) error {\n\tswitch headerType {\n\tcase \"string\":\n\t\tif !isQuotedString(defaultValue) {\n\t\t\treturn fmt.Errorf(\"the provided default value %q does not match provider type %q, or is not properly quoted with escaped quotations\", defaultValue, headerType)\n\t\t}\n\t\tswitch format {\n\t\tcase \"date-time\":\n\t\t\tunquoteTime := strings.Trim(defaultValue, `\"`)\n\t\t\tif _, err := time.Parse(time.RFC3339, unquoteTime); err != nil {\n\t\t\t\treturn fmt.Errorf(\"the provided default value %q is not a valid RFC3339 date-time string\", defaultValue)\n\t\t\t}\n\t\tcase \"date\":\n\t\t\tconst layoutRFC3339Date = \"2006-01-02\"\n\t\t\tunquoteDate := strings.Trim(defaultValue, `\"`)\n\t\t\tif _, err := time.Parse(layoutRFC3339Date, unquoteDate); err != nil {","sourceCodeStart":2733,"sourceCodeEnd":2769,"githubUrl":"https://github.com/grpc-ecosystem/grpc-gateway/blob/a58a4436a376a4bcc7d8f10c4d4f919a8438bba9/protoc-gen-openapiv2/internal/genopenapi/template.go#L2733-L2769","documentation":"Validation error at the end of validateDefaultValueTypeAndFormat: the header parameter's type is not one of the supported OpenAPI types (string, number, integer, boolean), so no type/format/default checks can apply. The offending input is the header option's type value, reported verbatim in the message.","triggerScenarios":"Thrown at protoc-gen-openapiv2/internal/genopenapi/template.go:2751 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set the header parameter type to string, number, integer, or boolean.","Remove the unsupported type from the openapiv2 header options."],"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"}