#properties of DTOs in swagger docs do not appear unless decorated with @ApiProperty()

3 messages · Page 1 of 1 (latest)

cloud wave
#

I'm using swc in a nestjs monorepo, metadata is generated well and the graphql schema works as expected.

The endpoitnts and controllers show up, however a couple of things are lacking:

  • responses do not show up to endpoints unless defined with @ApiResponse(), although defined in the return function.

Data models appear for input & output but they are blank unless I manually add @ApiProperty() to each key in the class of the DTO definitions.

My impression was that the CLI plugin was supposed to work by not having to define the defaults of everything.

Is there extra configuration needed or am I misinterpreting the docs?

rose quest
#

I am not sure that the plugin is supposed to work with swc

cloud wave
#

works fine -- I had the wrong file suffixes in my config for some reason