Skip to content

Commit 984f330

Browse files
authored
task: fix message in transformation engine (#259)
1 parent 1e50226 commit 984f330

File tree

1 file changed

+6
-0
lines changed
  • tools/transformer/src/transformations

1 file changed

+6
-0
lines changed

tools/transformer/src/transformations/oneOf.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,12 @@ function transformOneOfProperties(parentObject, api) {
104104
}
105105
} else {
106106
// Otherwise this situation require human intervention
107+
console.error(
108+
"OpenAPI object is missing properties or allOf field. This is usually an error in the OpenAPI spec."
109+
);
110+
console.error(
111+
"Please ensure that elements of oneOf schema are objects (classes) instead of single types (bool, string etc.)."
112+
);
107113
throw new Error(`${JSON.stringify(childObject, "", 2)}`);
108114
}
109115
}

0 commit comments

Comments
 (0)