-
Notifications
You must be signed in to change notification settings - Fork 528
feat: add support for union/enum types for @FormField() #1778
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
base: master
Are you sure you want to change the base?
Conversation
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.
Hello there stsvilik 👋
Thank you and congrats 🎉 for opening your first PR on this project.✨
We will review the following PR soon! 👀
e4339a8
to
07c67b5
Compare
@WoH could you please review? 🙏 |
@lukeautry maybe you can review? |
Hi, the code change sounds reasonable, but can you add a test to demo the change? |
@WoH I found where to add tests and updated PR :) |
f2071dd
to
b0b7c54
Compare
@Get('ParameterHeaderStringType') | ||
public async headerStringType(@Header() header: string): Promise<void> { | ||
// | ||
@Get('FormData') |
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.
Renamed it from FormDataStringType
since now it supports many types.
// | ||
@Get('FormData') | ||
public async formData(@FormField() data: string, @FormField() indexes: EnumNumberValue, @FormField() gender: Gender): Promise<FormTestModel> { | ||
return Promise.resolve<FormTestModel>({ |
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.
Example of string
and two enum
types
b0b7c54
to
caee748
Compare
caee748
to
2a42d1f
Compare
All Submissions:
Closing issues
closes #1777
If this is a new feature submission:
Potential Problems With The Approach
Test plan