Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
ghik committed Oct 11, 2018
1 parent c9a3b44 commit 53643f8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ object RestStructure extends AdtMetadataCompanion[RestStructure] {
})
Discriminator(caseFieldName, mapping)
}
RefOr(applyAdjusters(Schema(oneOf = caseSchemas, discriminator = disc.toOptArg)))
RefOr(applyAdjusters(Schema(
`type` = DataType.Object,
oneOf = caseSchemas,
discriminator = disc.toOptArg
)))
}
}
object Union extends AdtMetadataCompanion[Union]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,7 @@ class OpenApiGenerationTest extends FunSuite {
| "components": {
| "schemas": {
| "BaseEntity": {
| "type": "object",
| "oneOf": [
| {
| "type": "object",
Expand Down Expand Up @@ -523,6 +524,7 @@ class OpenApiGenerationTest extends FunSuite {
| ]
| },
| "FlatBaseEntity": {
| "type": "object",
| "description": "Flat sealed entity with some serious cases",
| "oneOf": [
| {
Expand Down

0 comments on commit 53643f8

Please sign in to comment.