Skip to content

Commit

Permalink
fix: update schema validation from oneOf to anyOf for dataset creatio…
Browse files Browse the repository at this point in the history
…n and updates (#1544)

Co-authored-by: Martin <[email protected]>
  • Loading branch information
Junjiequan and martin-trajanovski authored Dec 10, 2024
1 parent ed04b4c commit 3b4f602
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/datasets/datasets.controller.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @/quotes */
import {
Body,
Controller,
Expand Down Expand Up @@ -567,7 +566,7 @@ export class DatasetsController {
description: "Input fields for the dataset to be created",
required: true,
schema: {
oneOf: [
anyOf: [
{ $ref: getSchemaPath(CreateRawDatasetObsoleteDto) },
{ $ref: getSchemaPath(CreateDerivedDatasetObsoleteDto) },
{ $ref: getSchemaPath(CreateDatasetDto) },
Expand Down Expand Up @@ -731,7 +730,7 @@ export class DatasetsController {
description: "Input fields for the dataset that needs to be validated",
required: true,
schema: {
oneOf: [
anyOf: [
{ $ref: getSchemaPath(CreateRawDatasetObsoleteDto) },
{ $ref: getSchemaPath(CreateDerivedDatasetObsoleteDto) },
{ $ref: getSchemaPath(CreateDatasetDto) },
Expand Down Expand Up @@ -1245,7 +1244,7 @@ export class DatasetsController {
"Fields that needs to be updated in the dataset. Only the fields that needs to be updated have to be passed in.",
required: true,
schema: {
oneOf: [
anyOf: [
{ $ref: getSchemaPath(PartialUpdateRawDatasetObsoleteDto) },
{ $ref: getSchemaPath(PartialUpdateDerivedDatasetObsoleteDto) },
{ $ref: getSchemaPath(PartialUpdateDatasetDto) },
Expand Down Expand Up @@ -1357,7 +1356,7 @@ export class DatasetsController {
"Dataset object that needs to be updated. The whole dataset object with updated fields have to be passed in.",
required: true,
schema: {
oneOf: [
anyOf: [
{ $ref: getSchemaPath(UpdateRawDatasetObsoleteDto) },
{ $ref: getSchemaPath(UpdateDerivedDatasetObsoleteDto) },
{ $ref: getSchemaPath(UpdateDatasetDto) },
Expand Down

0 comments on commit 3b4f602

Please sign in to comment.