{"record":{"id":"0d9762e2143ac3bf","repo":"grpc-ecosystem/grpc-gateway","slug":"failed-to-resolve-method-fqn-s","errorCode":null,"errorMessage":"failed to resolve method FQN: '%s'","messagePattern":"failed to resolve method FQN: '(.+?)'","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"protoc-gen-openapiv2/internal/genopenapi/template.go","lineNumber":1770,"sourceCode":"\t\t\t\t\t\t\t// Special workaround for Empty: it's well-known type but wknSchemas only returns schema.schemaCore; but we need to set schema.Properties which is a level higher.\n\t\t\t\t\t\t\tif meth.RequestType.FQMN() == \".google.protobuf.Empty\" {\n\t\t\t\t\t\t\t\tschema.Properties = &openapiSchemaObjectProperties{}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tmessageSchema, err := renderMessageAsDefinition(meth.RequestType, reg, customRefs, b.PathParams)\n\t\t\t\t\t\t\tif err != nil {\n\t\t\t\t\t\t\t\treturn err\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif len(b.PathParams) == 0 {\n\t\t\t\t\t\t\t\tif err := schema.setRefFromFQN(meth.RequestType.FQMN(), reg); err != nil {\n\t\t\t\t\t\t\t\t\treturn err\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdesc = messageSchema.Description\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif meth.Name != nil {\n\t\t\t\t\t\t\t\t\tmethFQN, ok := fullyQualifiedNameToOpenAPIName(meth.FQMN(), reg)\n\t\t\t\t\t\t\t\t\tif !ok {\n\t\t\t\t\t\t\t\t\t\tpanic(fmt.Errorf(\"failed to resolve method FQN: '%s'\", meth.FQMN()))\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdefName := methFQN + \"Body\"\n\t\t\t\t\t\t\t\t\tschema.Ref = fmt.Sprintf(\"#/definitions/%s\", defName)\n\t\t\t\t\t\t\t\t\tdefs[defName] = messageSchema\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tschema = messageSchema\n\t\t\t\t\t\t\t\t\tif schema.Properties == nil || len(*schema.Properties) == 0 {\n\t\t\t\t\t\t\t\t\t\tgrpclog.Warningf(\"created a body with 0 properties in the message, this might be unintended: %s\", *meth.RequestType)\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// google.api.HttpRule.body documents body fields as top-level request fields:\n\t\t\t\t\t\t// \"NOTE: the referred field must be present at the top-level of the request message type.\"\n\t\t\t\t\t\t// Ref: https://github.com/googleapis/googleapis/blob/b3397f5febbf21dfc69b875ddabaf76bee765058/google/api/http.proto#L350-L352\n\t\t\t\t\t\t// grpc-gateway accepts nested body field paths when generating gateway handlers,\n\t\t\t\t\t\t// so OpenAPI rendering also follows the full path and uses the terminal field type.","sourceCodeStart":1752,"sourceCodeEnd":1788,"githubUrl":"https://github.com/grpc-ecosystem/grpc-gateway/blob/a58a4436a376a4bcc7d8f10c4d4f919a8438bba9/protoc-gen-openapiv2/internal/genopenapi/template.go#L1752-L1788","documentation":"Registry lookup error surfaced in renderServices: the generator failed to resolve a binding method's request-type fully-qualified name (meth.RequestType FQMN) when building the request schema/ref. The error names the FQMN string; the input at fault is a method whose request message cannot be located in the registry.","triggerScenarios":"Thrown at protoc-gen-openapiv2/internal/genopenapi/template.go:1770 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the request message type is defined/imported in the analyzed proto set.","Check that the method's input_type is set correctly and descriptors are complete.","Regenerate with the same descriptor set passed to the plugin."],"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"}