-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(common): add parse float and enum pipes #6232
feat(common): add parse float and enum pipes #6232
Conversation
Pull Request Test Coverage Report for Build 9a9ded65-2426-4dc3-9bbe-6c14cb01e97a
💛 - Coveralls |
* @param metadata contains metadata about the currently processed route argument | ||
*/ | ||
async transform(value: T, metadata: ArgumentMetadata): Promise<T> { | ||
if (!classValidator.isEnum(value, this.enumType)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we manually implement the isEnum
method logic and add it to this class instead of relying on class-validator
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes I wasn't even happy with that, I'll change this 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kamilmysliwiec I've updated the check now
LGTM thanks! |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Added two new pipe transformers for float and enum values
Issue Number: N/A
What is the new behavior?
It is possible now to use new pipe transformer for float values and enum values
Does this PR introduce a breaking change?
Other information