File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
main/scala/com/avsystem/commons/rest/openapi
test/scala/com/avsystem/commons/rest/openapi Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,11 @@ object RestStructure extends AdtMetadataCompanion[RestStructure] {
44
44
})
45
45
Discriminator (caseFieldName, mapping)
46
46
}
47
- RefOr (applyAdjusters(Schema (oneOf = caseSchemas, discriminator = disc.toOptArg)))
47
+ RefOr (applyAdjusters(Schema (
48
+ `type` = DataType .Object ,
49
+ oneOf = caseSchemas,
50
+ discriminator = disc.toOptArg
51
+ )))
48
52
}
49
53
}
50
54
object Union extends AdtMetadataCompanion [Union ]
Original file line number Diff line number Diff line change @@ -471,6 +471,7 @@ class OpenApiGenerationTest extends FunSuite {
471
471
| "components": {
472
472
| "schemas": {
473
473
| "BaseEntity": {
474
+ | "type": "object",
474
475
| "oneOf": [
475
476
| {
476
477
| "type": "object",
@@ -523,6 +524,7 @@ class OpenApiGenerationTest extends FunSuite {
523
524
| ]
524
525
| },
525
526
| "FlatBaseEntity": {
527
+ | "type": "object",
526
528
| "description": "Flat sealed entity with some serious cases",
527
529
| "oneOf": [
528
530
| {
You can’t perform that action at this time.
0 commit comments