#I had a few mistakes integrating swagger with pure js development
16 messages · Page 1 of 1 (latest)
can you show your nest-cli.json?
The official Javascript-stater default configuration has not been changed
The automatic swagger generation that Nest tries to do with the swagger module only works with Typescript, because it needs type metadata that _type_script provides. You could explicitly set the @ApiBody()/@ApiQuery()/etc decorators with schemas if you want to use them still
Thank u! Let me try
I tried a few things, but it didn't work
You have to give type to the ApiProperty({ type: ... }) as well.
More than likely, you're gonna be fighting this way more than you would if you just used Typescript
It doesn't seem to work
Do you still recommend that I use TypeScript 🧐
1000%
I will always recommend Typescript over raw, or even Babel filled, JS
What is the @Bind problem that prevents the application from starting? I removed the decorator and swagger can be used normally
It's not @Bind() that's stopping it, it's the lack of type metadata that Nest is trying to read, that it expects to exist from Typescript
Too bad these two decorators can't coexist, so do I have to migrate to TypeScript if I want to use swagger