Skip to content

Commit 2b0120d

Browse files
committed
Merge branch 'fix-misc-bugs' into release
2 parents c068a2f + 66774c7 commit 2b0120d

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ kotlin.code.style=official
22

33
# project id
44
projectGroupId=io.github.smiley4
5-
projectVersion=5.0.1
5+
projectVersion=5.0.2
66

77
# common publishing information
88
projectBaseScmUrl=https://github.com/SMILEY4/
@@ -16,7 +16,7 @@ projectDeveloperUrl=https://github.com/SMILEY4
1616
versionKtor=3.1.1
1717
versionSwaggerUI=5.17.14
1818
versionSwaggerParser=2.1.24
19-
versionSchemaKenerator=2.1.1
19+
versionSchemaKenerator=2.1.2
2020
versionKotlinLogging=7.0.0
2121
versionKotest=5.8.0
2222
versionKotlinTest=2.0.21

ktor-openapi/src/main/kotlin/io/github/smiley4/ktoropenapi/builder/openapi/ContentBuilder.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ internal class ContentBuilder(
6666
private fun buildMultipartMediaType(body: MultipartBodyData): MediaType {
6767
return MediaType().also { mediaType ->
6868
mediaType.schema = Schema<Any>().also { schema ->
69-
schema.type = "object"
69+
schema.types = setOf("object")
7070
schema.properties = mutableMapOf<String?, Schema<*>?>().also { props ->
7171
body.parts.forEach { part ->
7272
props[part.name] = schemaContext.getSchema(part.type)

ktor-openapi/src/test/kotlin/io/github/smiley4/ktorswaggerui/builder/OperationBuilderTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ class OperationBuilderTest : StringSpec({
585585
mediaType.schema
586586
.also { it.shouldNotBeNull() }
587587
?.also { schema ->
588-
schema.type shouldBe "object"
588+
schema.types shouldContainExactlyInAnyOrder listOf("object")
589589
schema.properties.keys shouldContainExactlyInAnyOrder listOf(
590590
"image",
591591
"data"
@@ -995,7 +995,7 @@ class OperationBuilderTest : StringSpec({
995995
mediaType.schema
996996
.also { it.shouldNotBeNull() }
997997
?.also { schema ->
998-
schema.type shouldBe "object"
998+
schema.types shouldContainExactlyInAnyOrder listOf("object")
999999
schema.properties.keys shouldContainExactlyInAnyOrder listOf("customData")
10001000
schema.properties["customData"]!!.`$ref` shouldBe "#/components/schemas/myCustomSchema"
10011001
}

0 commit comments

Comments
 (0)