Skip to content

Validate the JSON configs against the frontend schemas in CI - #675

Merged
tom2drum merged 1 commit into
mainfrom
validate-configs-against-frontend-schema
Nov 27, 2026
Merged

tom2drum merged 1 commit into
mainfrom
validate-configs-against-frontend-schema

Conversation

@tom2drum

Copy link
Copy Markdown
Collaborator

Description

The JSON configs here are described by the schemas of the frontend's envs validator, but nothing checked a file against them before it was merged: a broken config was found only when a frontend container that uses it started. The validators this repository used to keep were copies of those schemas and went stale, which is why they were removed.

This PR adds a CI job that validates the configs against the schemas where they live, without a copy:

Validated directories:

Directory Variable
featured-networks NEXT_PUBLIC_FEATURED_NETWORKS
marketplace NEXT_PUBLIC_MARKETPLACE_CONFIG_URL
marketplace-categories NEXT_PUBLIC_MARKETPLACE_CATEGORIES_URL
marketplace-subgraph-links NEXT_PUBLIC_MARKETPLACE_GRAPH_LINKS_URL
footer-links NEXT_PUBLIC_FOOTER_LINKS
widgets NEXT_PUBLIC_ADDRESS_3RD_PARTY_WIDGETS_CONFIG_URL
homepage-highlights NEXT_PUBLIC_HOMEPAGE_HIGHLIGHTS_CONFIG
hero-banner NEXT_PUBLIC_HOMEPAGE_HERO_BANNER_CONFIG
color-themes NEXT_PUBLIC_COLOR_THEME_OVERRIDES

All 220 files in them pass the schemas on the frontend's main.

What this changes for a contributor

  • A pull request with a config that does not match the schema now fails the Validate configs against the frontend schema job, with the file and the path of the problem in the log.
  • The schemas are read from the frontend's main, so a schema tightened there can turn this repository's checks red without a change here. The frontend's validator docs tell its authors to run this validation before merging such a change.

Not validated

  • cross-chain — the ZetaChain files belong to a chain variant that is being removed (Remove ZetaChain support frontend#3897), and the frontend has no schema for the Avalanche ones.
  • marketplace-security-reports — its variable is deprecated.
  • multisearch — not read by the frontend application.
  • A key the schema does not know is dropped by it, not rejected, so a mistyped optional key still passes.

🤖 Generated with Claude Code

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

@tom2drum tom2drum left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Cleared — 0 blockers, 0 majors open

blocker 0 · major 0 · nit 0 · not anchorable 0

Axes: spec skipped (no spec) · standards · correctness

— Reviewed by cursor (Grok 4.7)

@tom2drum
tom2drum merged commit 01c8cef into main Nov 27, 2026
3 checks passed
@tom2drum
tom2drum deleted the validate-configs-against-frontend-schema branch November 27, 2026 19:17
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.

1 participant