-
Notifications
You must be signed in to change notification settings - Fork 471
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
ApiProperty containing a key as an array of objects #3041
Labels
Comments
Please provide a minimum reproduction repository (Git repository/StackBlitz/CodeSandbox project). |
here's a minimal repro how to setup
can we return it to (bug)(needs triage) instead of (needs clarification)? thank you :) Things to play with:
|
Ping |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there an existing issue for this?
Current behavior
This is related to the following issues: 2945, 2418, 1112, 1113, 2418, 735, 90.
I have these 2 classes:
I am getting this
I tried the following:
@ApiProperty
: doesn't work.@ApiProperty({ type: [FilterDto]})
instead of@ApiProperty({ type: FilterDto, isArray: true })
: doesn't work.FilterDto
to get an array of strings: worksSo I figured the problem is somewhere in reading array of objects only.
I read some workarounds using $ref and @apiquery over the controller directly, but it doesn't make sense to do workarounds that will disorganize the code when there might be a bug that needs fixing.
Minimum reproduction code
Reproduction repo
Steps to reproduce
No response
Expected behavior
the expected behaviour should be like the image
Package version
7.4.0
NestJS version
9.4.3
Node.js version
20.11.0
In which operating systems have you tested?
Other
This has been reported in more than 5 other issues since 2018, is there anything we can do to fix? there is even an open PR
The text was updated successfully, but these errors were encountered: