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: update schema validation from oneOf to anyOf for dataset creation and updates #1544

Merged
merged 2 commits into from
Dec 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading