Commit 5ef44045 authored by mingyard's avatar mingyard

feat:修改swagger

parent 1324bcb1
...@@ -2,11 +2,19 @@ import { ...@@ -2,11 +2,19 @@ import {
FanYiGouSourceLanguages, FanYiGouSourceLanguages,
FanYiGouTargetLanguages, FanYiGouTargetLanguages,
} from '@/common/utils/constants'; } from '@/common/utils/constants';
import { FilesInterceptor } from '@nestjs/platform-express';
import { ApiProperty } from '@nestjs/swagger'; import { ApiProperty } from '@nestjs/swagger';
import { Expose } from 'class-transformer'; import { Expose } from 'class-transformer';
import { IsEnum, IsNotEmpty } from 'class-validator'; import { IsEnum, IsNotEmpty } from 'class-validator';
export class TranslateImageReqDto { export class TranslateImageReqDto {
@ApiProperty({
description: '要翻译的图片文件',
format: 'binary',
example: '图片文件',
})
file: any;
@ApiProperty({ @ApiProperty({
description: '目标语言', description: '目标语言',
enum: FanYiGouTargetLanguages, enum: FanYiGouTargetLanguages,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment