{"record":{"id":"df156039f2f579e3","repo":"vectordotdev/vector","slug":"documentation-model-has-no-components","errorCode":null,"errorMessage":"Documentation model has no components","messagePattern":"Documentation model has no components","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"vdev/src/commands/check/component_examples.rs","lineNumber":119,"sourceCode":"    );\n    if failures.is_empty() {\n        println!(\"All examples passed.\");\n        return Ok(());\n    }\n    for failure in &failures {\n        println!(\"{failure}\");\n    }\n    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()))?;","sourceCodeStart":101,"sourceCodeEnd":137,"githubUrl":"https://github.com/vectordotdev/vector/blob/bdb87aeaa4c4ff27c0ba643c1c77b21bf2ef4013/vdev/src/commands/check/component_examples.rs#L101-L137","documentation":"Data-shape guard in validation_cases: the loaded docs model JSON is expected to contain a 'components' object mapping component kinds to components, and this fires when that key is missing or not an object — indicating the generated documentation model is empty, truncated, or the wrong file entirely, not a problem with any example.","triggerScenarios":"Thrown at vdev/src/commands/check/component_examples.rs:119 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Regenerate the docs model (make generate-docs) before running component example validation","Verify the JSON file passed to the check is the generated documentation model and not an unrelated file","Inspect the JSON root keys to confirm 'components' exists"],"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"}