{"record":{"id":"7ec7c60266615cb6","repo":"risingwavelabs/risingwave","slug":"ref-ref-string-cannot-be-resolved-as-a-pointer","errorCode":null,"errorMessage":"ref `{ref_string}` cannot be resolved as a pointer, and `{ref_fragment}` cannot be found in the schema","messagePattern":"ref `(.+?)` cannot be resolved as a pointer, and `(.+?)` cannot be found in the schema","errorType":"error_code","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/connector/codec/src/decoder/json/mod.rs","lineNumber":70,"sourceCode":"    SchemaFromFile {\n        filename: String,\n        source: std::io::Error,\n    },\n    #[error(\"parse error for url {url}\")]\n    UrlParse {\n        url: String,\n        source: url::ParseError,\n    },\n    #[error(\"schema from {url} not valid JSON\")]\n    SchemaNotJson { url: String, source: std::io::Error },\n    #[error(\"request error\")]\n    Request { url: String, source: reqwest::Error },\n    #[error(\"schema from {url} not valid JSON\")]\n    SchemaNotJsonSerde {\n        url: String,\n        source: serde_json::Error,\n    },\n    #[error(\n        \"ref `{ref_string}` cannot be resolved as a pointer, and `{ref_fragment}` cannot be found in the schema\"\n    )]\n    JsonRefPointerNotFound {\n        ref_string: String,\n        ref_fragment: String,\n    },\n    #[error(\"json ref error\")]\n    JsonRef {\n        #[from]\n        source: std::io::Error,\n    },\n    #[error(\"need url to be a file or a http based, got {url}\")]\n    UnsupportedUrl { url: String },\n    #[error(transparent)]\n    Uncategorized(\n        #[from]\n        #[backtrace]\n        anyhow::Error,","sourceCodeStart":52,"sourceCodeEnd":88,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/codec/src/decoder/json/mod.rs#L52-L88","documentation":"Error::JsonRefPointerNotFound indicates a $ref in the JSON schema could not be resolved: it is neither a valid JSON pointer into the document, nor does the named fragment exist within the schema. The decoder cannot inline the referenced type and aborts schema conversion.","triggerScenarios":"Loading a JSON schema containing \"$ref\": \"#/definitions/Foo\" (or a fragment ref) where definitions/Foo is absent, or a ref string that is not a valid JSON pointer and not resolvable to a fragment inside the loaded schema.","commonSituations":"Splitting a schema into multiple files and keeping cross-file $refs that this loader does not fetch; renaming definitions without updating refs; refs pointing to external URLs not resolvable as pointers.","solutions":["Inline all referenced definitions so the schema is self-contained (one JSON document).","Fix the $ref string to match an existing definition path in the schema (check spelling and pointer path).","Pre-process the schema with a bundler (e.g. json-schema-ref-parser) before feeding it to RisingWave."],"exampleFix":"// before\n{\"type\":\"record\",\"fields\":[{\"name\":\"addr\",\"type\":{\"$ref\":\"#/definitions/Address\"}}]}  // definitions/Address missing\n// after\n{\"type\":\"record\",\"fields\":[{\"name\":\"addr\",\"type\":{\"type\":\"record\",\"name\":\"Address\",\"fields\":[{\"name\":\"city\",\"type\":\"string\"}]}}]}","handlingStrategy":"validation","validationCode":"const ref = findRefs(schema)[0];\nif (ref?.startsWith('#')) {\n  const frag = ref.slice(2).split('/');\n  let node = schema;\n  for (const k of frag) { node = node?.[k]; if (node === undefined) throw new Error(`unresolved $ref: ${ref}`); }\n}","typeGuard":null,"tryCatchPattern":"if let Err(Error::JsonRefPointerNotFound { ref_string, ref_fragment }) = res {\n  eprintln!(\"inline or fix $ref '{ref_string}' (fragment '{ref_fragment}' missing)\");\n}","preventionTips":["Bundle the schema into a single self-contained document before use.","Keep definitions and refs in sync; rename via tooling, not by hand.","Avoid cross-file $refs — this loader resolves pointers/fragments within one document."],"tags":["json-schema","ref","resolution"],"backgroundTag":"resource-not-found","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-14T21:17:11.552Z"}