-
Notifications
You must be signed in to change notification settings - Fork 154
chore: automatic README generation from user config schema #709
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces automatic README generation from the user configuration schema, making the user schema the single source of truth for configuration documentation. The changes implement a registry-based approach to store metadata for configuration fields and update the build process to automatically generate configuration tables.
- Enhanced Zod schema with metadata registry to store field-specific information like default value descriptions and secret flags
- Expanded the argument generation script to automatically update both server.json and README.md configuration tables
- Added ESLint rule to enforce use of zod/v4 only in config.ts
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/common/config.ts | Added metadata registry system with zod/v4 import and enhanced schema definitions with metadata |
| server.json | Updated configuration descriptions and added preview features environment variable |
| scripts/generateArguments.ts | Enhanced script to generate README configuration table and improved metadata handling |
| eslint.config.js | Added new ESLint rule for enforcing zod/v4 usage |
| eslint-rules/enforce-zod-v4.js | New ESLint rule to restrict zod/v4 imports to config.ts only |
| README.md | Auto-generated configuration table with improved formatting and completeness |
eslint-rules/enforce-zod-v4.js
Outdated
| meta: { | ||
| type: "problem", | ||
| docs: { | ||
| description: "Only allow importing 'zod/v4' in config.ts, all other imports are allowed elsewhere.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
zod v4 has some nice features (and actually exists already as a separate import in our current v3 version) but we want to make sure we don't use this for tool schemas until modelcontextprotocol/typescript-sdk#555 is resolved
Pull Request Test Coverage Report for Build 18973376541Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
This is another step towards making the user schema the one source of truth about our configuration.