From 1a825ed199e2d15d64e57c0c3e2d5b64f59ede28 Mon Sep 17 00:00:00 2001 From: David Mehren Date: Mon, 25 Jan 2021 22:22:01 +0100 Subject: [PATCH] UserInfoDto: Add doc comments Signed-off-by: David Mehren --- src/users/user-info.dto.ts | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/users/user-info.dto.ts b/src/users/user-info.dto.ts index 183c6a37d..d6702b5ac 100644 --- a/src/users/user-info.dto.ts +++ b/src/users/user-info.dto.ts @@ -4,15 +4,41 @@ * SPDX-License-Identifier: AGPL-3.0-only */ +import { ApiProperty } from '@nestjs/swagger'; import { IsString } from 'class-validator'; export class UserInfoDto { + /** + * The username + * @example "john.smith" + */ @IsString() userName: string; + + /** + * The display name + * @example "John Smith" + */ @IsString() displayName: string; + + /** + * URL of the profile picture + * @example "https://hedgedoc.example.com/uploads/johnsmith.png" + */ + @ApiProperty({ + format: 'uri', + }) @IsString() photo: string; + + /** + * Email address of the user + * @example "john.smith@example.com" + */ + @ApiProperty({ + format: 'email', + }) @IsString() email: string; }