Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(createDatasetDto): datasetName field in the CreateDatasetDto(obsoletes) should be required #1574

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

Junjiequan
Copy link
Contributor

@Junjiequan Junjiequan commented Dec 17, 2024

Description

This PR explicitly overrides the datasetName field in CreateDatasetDto to ensure it is required.

Motivation

Previously, datasetName was optional in CreateRawDatasetObsoleteDto and CreateDerivedDatasetObsoleteDto, due to its inheritance from UpdateDatasetObsoleteDto.

Fixes

  • Bug fixed (#X)

Changes:

  • changes made

Tests included

  • Included for each change/fix?
  • Passing?

Documentation

  • swagger documentation updated (required for API changes)
  • official documentation updated

official documentation info

@@ -20,4 +20,13 @@ export class CreateDatasetDto extends UpdateDatasetDto {
})
@IsString()
readonly type: string;

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Junjiequan I think that the UpdateDatasetDto includes this already and the CreateDatasetDto is just an extension of the Update one.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I have mistyped. It should be update-dataset-obsolete.dto.ts

Copy link
Collaborator

@martin-trajanovski martin-trajanovski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if these changes are really needed as some of them are already there

throw new HttpException(
"Instrument with the same unique name already exists",
HttpStatus.BAD_REQUEST,
{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have reverted it, let's use what you have done there, I can leave a comment there.
The rest should be fine

@Junjiequan Junjiequan changed the title fix(createDatasetDto): datasetName field in the CreateDatasetDto should be required fix(createDatasetDto): datasetName field in the CreateDatasetDto(obsolte) should be required Dec 17, 2024
@Junjiequan Junjiequan changed the title fix(createDatasetDto): datasetName field in the CreateDatasetDto(obsolte) should be required fix(createDatasetDto): datasetName field in the CreateDatasetDto(obsoletes) should be required Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants