Skip to content

Commit

Permalink
remove extra if statement
Browse files Browse the repository at this point in the history
  • Loading branch information
lewisjkl committed Jul 16, 2024
1 parent e817957 commit 52dbd74
Showing 1 changed file with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,17 +92,15 @@ class DiscriminatedUnionMemberComponents() extends OpenApiMapper {
}

componentSchemas.get(union.toShapeId).foreach { sch =>
if (!sch.getOneOf.isEmpty) {
componentBuilder.putSchema(
union.toShapeId.getName,
updateDiscriminatedUnion(
union,
sch.toBuilder(),
discriminatorField
)
.build()
componentBuilder.putSchema(
union.toShapeId.getName,
updateDiscriminatedUnion(
union,
sch.toBuilder(),
discriminatorField
)
}
.build()
)
}

}
Expand Down

0 comments on commit 52dbd74

Please sign in to comment.