{"record":{"id":"4ee9413fd316a734","repo":"vectordotdev/vector","slug":"component-kind-kind-is-not-an-object","errorCode":null,"errorMessage":"Component kind {kind} is not an object","messagePattern":"Component kind (.+?) is not an object","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"vdev/src/commands/check/component_examples.rs","lineNumber":127,"sourceCode":"    bail!(\"{} validation failure(s).\", failures.len())\n}\n\nfn validation_cases(\n    examples_dir: &Path,\n    docs: &Value,\n) -> Result<(Vec<ValidationCase>, usize, usize)> {\n    let components = docs\n        .get(\"components\")\n        .and_then(Value::as_object)\n        .ok_or_else(|| anyhow!(\"Documentation model has no components\"))?;\n    let mut cases = Vec::new();\n    let mut total = 0;\n    let mut skipped = 0;\n\n    for (kind, components_of_kind) in components {\n        let components_of_kind = components_of_kind\n            .as_object()\n            .ok_or_else(|| anyhow!(\"Component kind {kind} is not an object\"))?;\n        for (component_type, component) in components_of_kind {\n            for variant in [\"minimal\", \"advanced\"] {\n                total += 1;\n                let key = format!(\"{kind}/{component_type} ({variant})\");\n                let path = examples_dir\n                    .join(kind)\n                    .join(component_type)\n                    .join(format!(\"{variant}.yaml\"));\n                let yaml = fs::read_to_string(&path)\n                    .with_context(|| format!(\"Could not read {}\", path.display()))?;\n                let yaml = serde_yaml::from_str(&yaml)\n                    .with_context(|| format!(\"YAML parse error for {key}\"))?;\n\n                let Some(config) = wrap_config(kind, yaml, component)? else {\n                    skipped += 1;\n                    continue;\n                };\n                cases.push(ValidationCase { key, config });","sourceCodeStart":109,"sourceCodeEnd":145,"githubUrl":"https://github.com/vectordotdev/vector/blob/bdb87aeaa4c4ff27c0ba643c1c77b21bf2ef4013/vdev/src/commands/check/component_examples.rs#L109-L145","documentation":"Type guard while iterating the docs model: under components, each kind key ('sources', 'transforms', 'sinks', ...) must map to an object of components. This fires when the value for {kind} is an array, string, or null, meaning the generated documentation model has an unexpected shape for that kind and per-kind example validation cannot proceed.","triggerScenarios":"Thrown at vdev/src/commands/check/component_examples.rs:127 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Regenerate the documentation model to restore the expected per-kind object shape","Check for manual edits to the generated JSON that changed the kind mapping to a non-object"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"bdb87aeaa4c4ff27c0ba643c1c77b21bf2ef4013","analyzedAt":"2026-09-16T02:53:35.741Z","contentChangedAt":"2026-09-16T02:53:35.741Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}