Fix missing $schema entries - data migration#806
Merged
Conversation
This change enforces that all server.json files must have a valid $schema URL. Empty or invalid schema URLs are now rejected by both the API validator and the mcp-publisher CLI. Changes: - Add ValidSchemaVersions constant listing all accepted schema versions - Add IsValidSchemaURL() helper function for validation - Update API validator to require exact match of valid schema URLs - Update mcp-publisher to reject empty or invalid $schema fields - Add migration 011 to fix 17 existing entries with empty $schema - Add comprehensive tests for schema validation Fixes #805
Remove unnecessary code changes since schema validation was already deployed. This PR now only contains the migration to fix historical entries that were published before schema validation was enforced.
domdomegg
approved these changes
Nov 30, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Drafted by Claude Code, reviewed by me.
Summary
This PR adds a data migration to fix 17 server entries that were published with empty
$schemafields.This is a pure data migration - no code changes are needed because:
$schemafield was already added in commit 6d2001b on 2025-10-07Affected Entries (17 total)
Note on outlier:
io.github.antuelle78/weather-mcpwas published on 2025-10-09, which is after the validation code was committed (2025-10-07) but before it was deployed (2025-10-14). This confirms the entries slipped through due to the gap between merge and deployment.Dry Run SQL
To verify affected rows before running the migration:
Result against prod: