We have a nestjs controller decorated with @Crud. The model is pretty simple, just 5 fields, 4 strings and a boolean. We generate swagger.json from our service, and generate SDK's from swagger.json using openApiTools. Recently, we started getting errors from openApiTools when generating the SDK. For each of the routes that are auto-generated from @Crud, we get an error of the form -attribute paths.'/api/someroute/{id}'(put).responses.200.description is missing.
If I look at the swagger.json, sure enough, the "responses.200" key has no description for the auto-generated routes. If I manually add a description, the errors go away (but this isn't a solution, it was just an experiment). For the routes we create explicitly (i.e., not using @Crud), we use the "@ApiOkResponse({ description: 'Describe the response here' })" decorator, which adds the description to the response key, and everything is happy.
Request: Have @Crud add a description for each response
We have a nestjs controller decorated with @Crud. The model is pretty simple, just 5 fields, 4 strings and a boolean. We generate swagger.json from our service, and generate SDK's from swagger.json using openApiTools. Recently, we started getting errors from openApiTools when generating the SDK. For each of the routes that are auto-generated from @Crud, we get an error of the form -attribute paths.'/api/someroute/{id}'(put).responses.200.description is missing.
If I look at the swagger.json, sure enough, the "responses.200" key has no description for the auto-generated routes. If I manually add a description, the errors go away (but this isn't a solution, it was just an experiment). For the routes we create explicitly (i.e., not using @Crud), we use the "@ApiOkResponse({ description: 'Describe the response here' })" decorator, which adds the description to the response key, and everything is happy.
Request: Have @Crud add a description for each response
Tools versions: nestjs: 6.11.4 nestjs/swagger: 4.2.3 nestjsx/crud: 4.4.1 class-validator: 0.10.0 openapitools/openapi-generator-cli: 1.0.8-4.2.2