NoteDto: Add doc comments

Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
David Mehren 2021-01-25 22:45:34 +01:00
parent 7688b7c21f
commit 6a21665c3e
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3

View file

@ -9,12 +9,22 @@ import { NoteAuthorshipDto } from './note-authorship.dto';
import { NoteMetadataDto } from './note-metadata.dto'; import { NoteMetadataDto } from './note-metadata.dto';
export class NoteDto { export class NoteDto {
/**
* Markdown content of the note
* @example "# I am a heading"
*/
@IsString() @IsString()
content: string; content: string;
/**
* Metadata of the note
*/
@ValidateNested() @ValidateNested()
metadata: NoteMetadataDto; metadata: NoteMetadataDto;
/**
* Authorship information of this note
*/
@IsArray() @IsArray()
@ValidateNested({ each: true }) @ValidateNested({ each: true })
editedByAtPosition: NoteAuthorshipDto[]; editedByAtPosition: NoteAuthorshipDto[];