chore: fix apiv2 org teams doc (#15746)

This commit is contained in:
Morgan authored and GitHub committed 2024-07-15 10:27:33 +00:00
1 parent eb0768917c
commit 9ff10877e7
5 files changed
+345 -32

No files matched your search

+5
View File
@@ -1,3 +1,4 @@
import { ApiProperty } from "@nestjs/swagger";
import { Transform } from "class-transformer";
import { IsNumber, Min, Max, IsOptional } from "class-validator";
import type { Response as BaseResponse } from "express";
@@ -41,6 +42,7 @@ export type ApiResponse<T = undefined> = T extends undefined
export type ApiResponseMaybeRedirect<T = undefined> = ApiResponse<T> | ApiRedirectResponseType;
export class Pagination {
@ApiProperty({ required: false, description: "The number of items to return", example: 10 })
@Transform(({ value }: { value: string }) => value && parseInt(value))
@IsNumber()
@Min(1)
@@ -49,6 +51,7 @@ export class Pagination {
limit?: number;
@Transform(({ value }: { value: string }) => value && parseInt(value))
@ApiProperty({ required: false, description: "The number of items to skip", example: 0 })
@IsNumber()
@Min(0)
@Max(100)
@@ -57,6 +60,7 @@ export class Pagination {
}
export class SkipTakePagination {
@ApiProperty({ required: false, description: "The number of items to return", example: 10 })
@Transform(({ value }: { value: string }) => value && parseInt(value))
@IsNumber()
@Min(1)
@@ -64,6 +68,7 @@ export class SkipTakePagination {
@IsOptional()
take?: number;
@ApiProperty({ required: false, description: "The number of items to skip", example: 0 })
@Transform(({ value }: { value: string }) => value && parseInt(value))
@IsNumber()
@Min(0)