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
*/
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;
}