UserInfoDto: Add doc comments

Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
David Mehren 2021-01-25 22:22:01 +01:00
parent 9a77cd5565
commit 1a825ed199
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3

View file

@ -4,15 +4,41 @@
* SPDX-License-Identifier: AGPL-3.0-only * SPDX-License-Identifier: AGPL-3.0-only
*/ */
import { ApiProperty } from '@nestjs/swagger';
import { IsString } from 'class-validator'; import { IsString } from 'class-validator';
export class UserInfoDto { export class UserInfoDto {
/**
* The username
* @example "john.smith"
*/
@IsString() @IsString()
userName: string; userName: string;
/**
* The display name
* @example "John Smith"
*/
@IsString() @IsString()
displayName: string; displayName: string;
/**
* URL of the profile picture
* @example "https://hedgedoc.example.com/uploads/johnsmith.png"
*/
@ApiProperty({
format: 'uri',
})
@IsString() @IsString()
photo: string; photo: string;
/**
* Email address of the user
* @example "john.smith@example.com"
*/
@ApiProperty({
format: 'email',
})
@IsString() @IsString()
email: string; email: string;
} }