我想获得localhost:3000/api
产生的@nest/swagger
上显示的示例值。
@Post()
@ApiOperation({ title: 'Create One Tag' })
@ApiCreatedResponse({ description: 'Successfully created.'})
async create(@Body() tagDto: TagDto) {
const result = await this.tagService.create(tagDto);
return result;
}
"post": {
"summary": "Create One Tag",
"parameters": [
{
"name": "TagDto",
"required": true,
"in": "body",
"schema": {
"$ref": "#/definitions/TagDto"
}
}
],
"responses": {
"201": {
"description": "Successfully created."
}
},
"tags": [
"Tags RESTful Service"
],
"produces": [
"application/json"
],
"consumes": [
"application/json"
]
}
{
"name": "string",
"type": "Sponsor",
"org": 0
}
我希望SwaggerModule也可以在其中生成示例值,这可能吗?