This fix addresses a breaking change introduced in class-validator 0.14.0
where the default for forbidUnknownValues changed from false to true.
Issue:
- POST /connections was returning 400 "an unknown value was passed to the
validate function" errors
- This occurred because CreateConnectionDto and UpdateConnectionDto have no
validation decorators, causing class-validator 0.14.0+ to treat them as
"unknown values"
- Extra fields (like connector_version) in request payloads would fail
validation
Solution:
- Set forbidUnknownValues: false to allow DTOs without validation decorators
- Set whitelist: true to automatically strip extra properties not defined
in DTOs
- This maintains backward compatibility while adding security by removing
unexpected fields
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>