-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
binded arguments in the "path" between function's decorator and parameters' decorators are different #896
Comments
@micalevisk Is this intended spec of NestJS? Or just unexpected behavior but just supported by express? @yadav-saurabh If you want to generate SDK library through export class SomeClass {
public someMethod(
@Param("a") a: string,
@Param() params: {
b: string,
c: string,
} {}
} |
I don't see anything wrong with that code snippet |
Ah, understood. It was the original spec of NestJS. Thansk for quick response @micalevisk In the object type case, how |
@yadav-saurabh Is it okay to support object typed If |
yes, my initial thinking was the same. They are going be individual parameters from the frontend POV, just nestjs (maybe express) makes an object so that's easier to access if there are multiple parameters. |
type defs like that has not effect for |
Then should I define |
it will work if you don't use types but concrete classes (with no decorators, if you're using the or if you use not sure about the behavior when using both approaches |
@micalevisk Thaks for help. @yadav-saurabh To accomplish this mission, I've to disassemble the object typed By the way, this mission's benefit for users is a little bit lower, so that would be delayed due to lower priority. Until that, recommend to avoid using the object typed |
Yes, I can understand. Thanks for the quick response |
Will start this ticket after #211 |
Having isuue while running
npx nestia setup
Seems like Param's definition as an object is not supported, In Nestjs
@Param() params: { id: string; countryId: string }
is valid.@TypedParam()
doesn't support it yet.The text was updated successfully, but these errors were encountered: