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] {
4444 })
4545 Discriminator (caseFieldName, mapping)
4646 }
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+ )))
4852 }
4953 }
5054 object Union extends AdtMetadataCompanion [Union ]
Original file line number Diff line number Diff line change @@ -471,6 +471,7 @@ class OpenApiGenerationTest extends FunSuite {
471471 | "components": {
472472 | "schemas": {
473473 | "BaseEntity": {
474+ | "type": "object",
474475 | "oneOf": [
475476 | {
476477 | "type": "object",
@@ -523,6 +524,7 @@ class OpenApiGenerationTest extends FunSuite {
523524 | ]
524525 | },
525526 | "FlatBaseEntity": {
527+ | "type": "object",
526528 | "description": "Flat sealed entity with some serious cases",
527529 | "oneOf": [
528530 | {
You can’t perform that action at this time.
0 commit comments