Skip to content

feat(#709): validate plugin config with manifest zod schema#768

Open
rbalogic wants to merge 2 commits into
ohcnetwork:mainfrom
rbalogic:issues/709/plugin-schema-validation
Open

feat(#709): validate plugin config with manifest zod schema#768
rbalogic wants to merge 2 commits into
ohcnetwork:mainfrom
rbalogic:issues/709/plugin-schema-validation

Conversation

@rbalogic

@rbalogic rbalogic commented May 6, 2026

Copy link
Copy Markdown

Proposed Changes

Fixes #709

  • Schema Support: Add optional configSchema support to the shared plugin manifest types so plugins can declare a Zod schema for their config.
  • Validation: Validate plugins.<id>.config during plugin loading in the runner, before setup(), scrape(), or aggregate() are called.
  • Context Injection: Pass the parsed Zod result into ctx.config, so plugins receive validated and transformed config values instead of raw YAML input.
  • Testing: Extend loader and runner tests to cover manifest validation, successful config parsing, and fail-fast behavior for invalid plugin config.
  • Documentation & Scaffolding: Update plugin scaffolding and plugin docs to show how to declare and use configSchema, including the required zod dependency.

Merge Checklist

  • Add specs that demonstrate the bug or test the new feature.
  • Update product documentation (https://docs.ohc.network/).
  • Ensure that UI text is placed in I18n files.
  • Prepare a screenshot or demo video for the changelog entry and attach it to the issue.
  • Request peer reviews.
  • Complete QA on mobile devices.
  • Complete QA on desktop devices.
  • Add or update Playwright tests for related changes

@rbalogic

rbalogic commented Jun 22, 2026

Copy link
Copy Markdown
Author

Hi @rithviknishad 👋 Just bumping this whenever you get a chance to take a look. No rush, but let me know if you need any changes or if there's anything I can clarify! Thanks.

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.

Add support for validating config initializing plugin using zod schema

1 participant