mirror of
https://github.com/ershisan99/flashcards-api.git
synced 2026-01-05 05:02:08 +00:00
add scalar api reference
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
import { IsOptional, Length } from 'class-validator'
|
||||
|
||||
import { ApiSchema } from '../../../infrastructure/common/helpers/api-schema'
|
||||
|
||||
@ApiSchema({ name: 'CreateCardRequest' })
|
||||
export class CreateCardDto {
|
||||
@Length(3, 500)
|
||||
question: string
|
||||
|
||||
@@ -2,8 +2,11 @@ import { PartialType } from '@nestjs/mapped-types'
|
||||
import { ApiProperty } from '@nestjs/swagger'
|
||||
import { IsOptional, Length } from 'class-validator'
|
||||
|
||||
import { ApiSchema } from '../../../infrastructure/common/helpers/api-schema'
|
||||
|
||||
import { CreateCardDto } from './create-card.dto'
|
||||
|
||||
@ApiSchema({ name: 'UpdateCardRequest' })
|
||||
export class UpdateCardDto extends PartialType(CreateCardDto) {
|
||||
@IsOptional()
|
||||
@Length(3, 500)
|
||||
|
||||
Reference in New Issue
Block a user