mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-29 06:15:29 -04:00

This makes it possible for the autogenerated openapi file to contain all the dtos instead of nothing. Signed-off-by: Philip Molares <philip.molares@udo.edu>
46 lines
814 B
TypeScript
46 lines
814 B
TypeScript
/*
|
|
* SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
|
|
*
|
|
* 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()
|
|
@ApiProperty()
|
|
userName: string;
|
|
|
|
/**
|
|
* The display name
|
|
* @example "John Smith"
|
|
*/
|
|
@IsString()
|
|
@ApiProperty()
|
|
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;
|
|
}
|