Docs: Add ApiProperty to all Dtos

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>
This commit is contained in:
Philip Molares 2021-03-19 12:08:34 +01:00 committed by David Mehren
parent 3f4f5936cb
commit 47ca8be78b
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3
14 changed files with 95 additions and 7 deletions

View file

@ -6,6 +6,7 @@
import { IsDate, IsNumber } from 'class-validator';
import { Revision } from './revision.entity';
import { ApiProperty } from '@nestjs/swagger';
export class RevisionMetadataDto {
/**
@ -13,6 +14,7 @@ export class RevisionMetadataDto {
* @example 13
*/
@IsNumber()
@ApiProperty()
id: Revision['id'];
/**
@ -20,6 +22,7 @@ export class RevisionMetadataDto {
* @example "2020-12-01 12:23:34"
*/
@IsDate()
@ApiProperty()
createdAt: Date;
/**
@ -27,5 +30,6 @@ export class RevisionMetadataDto {
* @example 142
*/
@IsNumber()
@ApiProperty()
length: number;
}