Skip to content

Validate and bound config request inputs #540

Description

@mikewheeleer

Validate config

Description

config inputs aren't fully bounded. This issue adds declarative validation.

Requirements and context

  • Repository scope: StableRoute-Org/Stableroute-backend only.
  • Validate config request inputs against a schema with sane bounds; reject invalid with structured 400s.
  • Behaviour otherwise unchanged.
  • Cover valid and invalid in tests.

Suggested execution

  • Fork the repo and create a branch
  • git checkout -b refactor/config-91-validate
  • Implement changes
    • Write code in: the relevant module.
    • Write comprehensive tests in: cover the new behaviour and edge cases.
  • Test and commit

Test and commit

  • Run npm run lint, npm test, and npm run build.
  • Cover edge cases: valid passes, oversized/malformed rejected.
  • Include the full test output in the PR description.

Example commit message

refactor(config): validate and bound inputs

Guidelines

  • Minimum 95 percent test coverage for impacted modules.
  • Clear, reviewer-focused documentation.
  • Timeframe: 96 hours.

Community & contribution rewards

  • 💬 Join the StableRoute community on Discord: https://discord.gg/37aCpusvx
  • ⭐ This is a GrantFox OSS / Official Campaign task and may be rewarded. When your PR is merged you'll be prompted to rate the project — a 5-star rating is much appreciated.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions