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:
Somay Chauhan
2024-12-17 10:29:07 +00:00
committed by GitHub
parent 5fad7c9478
commit a613c975d3
68 changed files with 1506 additions and 614 deletions
@@ -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[];