Skip to content

Commit

Permalink
additional checks
Browse files Browse the repository at this point in the history
  • Loading branch information
wing328 committed Nov 5, 2023
1 parent bf468d4 commit 0a518a0
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7583,7 +7583,8 @@ public CodegenParameter fromRequestBody(RequestBody body, Set<String> imports, S
Schema schema = ModelUtils.getSchemaFromRequestBody(body);
Schema original = null;
// check if it's allOf (only 1 sub schema) with or without default/nullable/etc set in the top level
if (ModelUtils.isAllOf(schema) && schema.getAllOf().size() == 1) {
if (ModelUtils.isAllOf(schema) && schema.getAllOf().size() == 1 &&
schema.getType() == null && schema.getTypes() == null) {
if (schema.getAllOf().get(0) instanceof Schema) {
original = schema;
schema = (Schema) schema.getAllOf().get(0);
Expand Down

0 comments on commit 0a518a0

Please sign in to comment.