{"record":{"id":"149368c82fd5146b","repo":"grpc-ecosystem/grpc-gateway","slug":"the-provided-format-q-is-not-a-valid-extension-of","errorCode":null,"errorMessage":"the provided format %q is not a valid extension of the type %q","messagePattern":"the provided format %q is not a valid extension of the type %q","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"protoc-gen-openapiv2/internal/genopenapi/template.go","lineNumber":2729,"sourceCode":"\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\"float\",\n\t\t\t\"float32\",\n\t\t\t\"float64\",\n\t\t\t\"complex64\",\n\t\t\t\"complex128\",\n\t\t\t\"double\",\n\t\t\t\"byte\",\n\t\t\t\"rune\",\n\t\t\t\"uintptr\",\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 \"integer\":\n\t\tswitch format {\n\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}","sourceCodeStart":2711,"sourceCodeEnd":2747,"githubUrl":"https://github.com/grpc-ecosystem/grpc-gateway/blob/a58a4436a376a4bcc7d8f10c4d4f919a8438bba9/protoc-gen-openapiv2/internal/genopenapi/template.go#L2711-L2747","documentation":"Validation error from validateDefaultValueTypeAndFormat: for a string-typed header parameter, the supplied format extension is not one of the permitted string formats (byte, date, date-time, password, binary, and the listed numeric-name strings, or empty). The offending inputs are the header type/format pair from the openapiv2 options.","triggerScenarios":"Thrown at protoc-gen-openapiv2/internal/genopenapi/template.go:2729 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a valid string format (e.g. date-time, byte) or omit the format.","Correct typos in the openapiv2 header option's format field."],"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"}