Skip to content

fix: Missing descriptions on Kotlin ByteArray fields #2711

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ class SpringDocKotlinConfiguration() {
init {
SpringDocUtils.getConfig()
.addRequestWrapperToIgnore(Continuation::class.java)
.replaceWithSchema(ByteArray::class.java, ByteArraySchema())
.addDeprecatedType(Deprecated::class.java)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,15 @@

package test.org.springdoc.api.app6

import io.swagger.v3.oas.annotations.media.Schema
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController

data class Foo(val data: ByteArray)
data class Foo(
@Schema(description = "Some description about a byte array.")
val data: ByteArray
)

@RestController
@RequestMapping("/bytearray")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"properties": {
"data": {
"type": "string",
"description":"Some description about a byte array.",
"format": "byte"
}
}
Expand Down