Skip to content
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

Body as Array #12

Closed
adomurad opened this issue Oct 10, 2018 · 1 comment
Closed

Body as Array #12

adomurad opened this issue Oct 10, 2018 · 1 comment

Comments

@adomurad
Copy link

Hi,

I'm using typestack with routing controller and class-validator and so on...
And my models are mostly arrays.
e.g. @Body({ type: User }) users: User[],
And in my generated documentation, I get as type of body an "Array".

I tried to add @openapi decorator with:
$ref: '#/components/schemas/User'
But then I get a blank body type.

How can I make the Array to appear in the docs as an array of users ?

epiphone pushed a commit that referenced this issue Oct 10, 2018
@epiphone
Copy link
Owner

Hi, turns out the library missed handling for the type parameter in @Body. I pushed a fix in 1.4.2. That's a good catch, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants