From 09cf25d1110acf3ca2a9b58416631ec515e0a336 Mon Sep 17 00:00:00 2001 From: David Mehren Date: Mon, 25 Jan 2021 22:44:11 +0100 Subject: [PATCH] RevisionDto: Add doc comments Signed-off-by: David Mehren --- src/revisions/revision.dto.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/revisions/revision.dto.ts b/src/revisions/revision.dto.ts index e40330623..1c9748eca 100644 --- a/src/revisions/revision.dto.ts +++ b/src/revisions/revision.dto.ts @@ -8,12 +8,30 @@ import { IsDate, IsNumber, IsString } from 'class-validator'; import { Revision } from './revision.entity'; export class RevisionDto { + /** + * ID of this revision + * @example 13 + */ @IsNumber() id: Revision['id']; + + /** + * Markdown content of the revision + * @example "# I am a heading" + */ @IsString() content: string; + + /** + * Patch from the preceding revision to this one + */ @IsString() patch: string; + + /** + * Datestring of the time this revision was created + * @example "2020-12-01 12:23:34" + */ @IsDate() createdAt: Date; }