This PR adds configuration option parseBooleanStrings, which allows parsing boolean strings. It is disabled by default so that it does not break existing projects.
Checklist
[ x ] the pull request title describes what this PR does (not a vague title like Update index.md)
[ x ] the pull request targets the default branch of the repository (develop)
[ x ] the code follows the established code style of the repository
npm run prettier:check passes
npm run lint:check passes
[ x ] tests are added for the changes I made (if any source code was modified)
[ x ] documentation added or updated
[ x ] I have run the project locally and verified that there are no errors
Description
class-transformer
is often used in NestJS projects to parse request bodies/params. The current version transforms the string 'false' to true and requires ugly workarounds to make it work as expected, see #626, https://stackoverflow.com/questions/59046629/boolean-parameter-in-request-body-is-always-true-in-nestjs-api an the other linked issues.This PR adds configuration option
parseBooleanStrings
, which allows parsing boolean strings. It is disabled by default so that it does not break existing projects.Checklist
Update index.md
)develop
)npm run prettier:check
passesnpm run lint:check
passesFixes
fixes #626 fixes #2170 fixes #306