refactor: added ApiPropertyOptional decorator for optional fields in api for better documentation (#18208)
* update decorators 1 * update decorators 2 * update decorators 3 * update decorators 4 * update decorators 4 * update decorators 6 * update decorators 7 * added documentation,json and openapi.json * implemented feedback * remove default values from update dto's * update * removed default from redirectUris
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { ApiProperty } from "@nestjs/swagger";
|
||||
import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
|
||||
import { Transform } from "class-transformer";
|
||||
import { IsOptional, Validate } from "class-validator";
|
||||
|
||||
@@ -12,7 +12,8 @@ export class GetUsersInput extends SkipTakePagination {
|
||||
@Transform(({ value }: { value: string | string[] }) => {
|
||||
return typeof value === "string" ? [value] : value;
|
||||
})
|
||||
@ApiProperty({
|
||||
@ApiPropertyOptional({
|
||||
type: [String],
|
||||
description: "The email address or an array of email addresses to filter by",
|
||||
})
|
||||
emails?: string[];
|
||||
|
||||
Reference in New Issue
Block a user