fix: register google-duration format to silence unknown format warnings - #2601
Open
appflowsolution wants to merge 3 commits into
Open
Conversation
Firebase MCP and other Google Cloud API MCP servers use the 'google-duration' format (e.g. '3600s', '1.5s') in their JSON Schemas. AJV logs 'unknown format "google-duration" ignored' warnings for each schema that references it, creating noisy startup output. Register the format with a regex validator matching Google's Duration proto format: a number followed by a time unit suffix (s, ms, us, ns, m, h, d). This silences the warnings without affecting validation behavior since the SDK already ignores unknown formats.
🦋 Changeset detectedLatest commit: fce58bc The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@modelcontextprotocol/client
@modelcontextprotocol/codemod
@modelcontextprotocol/core
@modelcontextprotocol/server
@modelcontextprotocol/server-legacy
@modelcontextprotocol/express
@modelcontextprotocol/fastify
@modelcontextprotocol/hono
@modelcontextprotocol/node
commit: |
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.
Why
Firebase MCP (and other Google Cloud API MCP servers) use the
google-durationformat in their JSON Schemas — values like"3600s","1.5s","100ms". AJV logsunknown format "google-duration" ignored in schema at path "#/properties/versionRetentionPeriod"warnings for every schema that references it, creating noisy startup output for every user of these MCP servers.What
Register the
google-durationformat on the default AJV instances created byAjvJsonSchemaValidator. The regex matches Google's Duration proto format: a number (integer or decimal) followed by a time unit suffix (s,ms,us,ns,m,h,d).Impact
unknown format "google-duration"warnings at startupcreateDefaultAjvInstanceTesting
No new tests needed — this is a format registration that silences a warning. The existing test suite covers
AjvJsonSchemaValidatorbehavior.