Skip to content

Validate yaml in doc#1932

Merged
dgageot merged 2 commits intodocker:mainfrom
dgageot:validate-yaml-doc
Mar 4, 2026
Merged

Validate yaml in doc#1932
dgageot merged 2 commits intodocker:mainfrom
dgageot:validate-yaml-doc

Conversation

@dgageot
Copy link
Member

@dgageot dgageot commented Mar 4, 2026

No description provided.

dgageot added 2 commits March 4, 2026 19:54
Signed-off-by: David Gageot <david.gageot@docker.com>
Add TestDocYAMLSnippetsAreValid which extracts every fenced YAML block
from docs/ markdown files and validates that:

1. Every snippet is syntactically valid YAML.
2. Snippets that look like full agent configs (top-level keys match the
   schema root) are additionally validated against agent-schema.json.

Blocks can be excluded with a <!-- yaml-lint:skip --> comment on the
line before the opening fence.

The test caught several doc bugs which are fixed in this commit:
- RAG quick start had 'description' at the wrong nesting level
- API tool examples used flat fields instead of 'api_config' nesting
- Schema reference blocks used type names as placeholder values

Assisted-By: cagent
@dgageot dgageot requested a review from a team as a code owner March 4, 2026 19:04
@docker-agent
Copy link

docker-agent bot commented Mar 4, 2026

PR Review Failed — The review agent encountered an error and could not complete the review. View logs.

@dgageot dgageot merged commit a581891 into docker:main Mar 4, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants