From 61002448789b081bccc94478311251f9fb4897d1 Mon Sep 17 00:00:00 2001 From: junjiequan Date: Tue, 17 Dec 2024 11:42:29 +0100 Subject: [PATCH] declare datasetName field in the raw and derived obsolete createdataset dto --- src/datasets/dto/create-dataset.dto.ts | 9 --------- src/datasets/dto/create-derived-dataset-obsolete.dto.ts | 9 +++++++++ src/datasets/dto/create-raw-dataset-obsolete.dto.ts | 9 +++++++++ 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/src/datasets/dto/create-dataset.dto.ts b/src/datasets/dto/create-dataset.dto.ts index abbf8083f..ebee8621c 100644 --- a/src/datasets/dto/create-dataset.dto.ts +++ b/src/datasets/dto/create-dataset.dto.ts @@ -20,13 +20,4 @@ export class CreateDatasetDto extends UpdateDatasetDto { }) @IsString() readonly type: string; - - @ApiProperty({ - type: String, - required: true, - description: - "A name for the dataset, given by the creator to carry some semantic meaning. Useful for display purposes e.g. instead of displaying the pid.", - }) - @IsString() - declare readonly datasetName: string; } diff --git a/src/datasets/dto/create-derived-dataset-obsolete.dto.ts b/src/datasets/dto/create-derived-dataset-obsolete.dto.ts index f6fcc180f..2432c379e 100644 --- a/src/datasets/dto/create-derived-dataset-obsolete.dto.ts +++ b/src/datasets/dto/create-derived-dataset-obsolete.dto.ts @@ -24,4 +24,13 @@ export class CreateDerivedDatasetObsoleteDto extends UpdateDerivedDatasetObsolet @IsOptional() @IsString() readonly version?: string; + + @ApiProperty({ + type: String, + required: true, + description: + "A name for the dataset, given by the creator to carry some semantic meaning. Useful for display purposes e.g. instead of displaying the pid.", + }) + @IsString() + declare readonly datasetName: string; } diff --git a/src/datasets/dto/create-raw-dataset-obsolete.dto.ts b/src/datasets/dto/create-raw-dataset-obsolete.dto.ts index 57f7d6ba9..5de0df978 100644 --- a/src/datasets/dto/create-raw-dataset-obsolete.dto.ts +++ b/src/datasets/dto/create-raw-dataset-obsolete.dto.ts @@ -24,4 +24,13 @@ export class CreateRawDatasetObsoleteDto extends UpdateRawDatasetObsoleteDto { @IsOptional() @IsString() readonly version?: string; + + @ApiProperty({ + type: String, + required: true, + description: + "A name for the dataset, given by the creator to carry some semantic meaning. Useful for display purposes e.g. instead of displaying the pid.", + }) + @IsString() + declare readonly datasetName: string; }