-
-
Notifications
You must be signed in to change notification settings - Fork 548
Closed
Description
Describe the bug
Schema annotations with field
use-site break when applied to a Boolean field named ^is.*$
To Reproduce
Demo application:
@Configuration
@OpenAPIDefinition(info = Info(title = "Demo Application", version = "0.0.1"))
open class OpenApiConfiguration
@RestController
@RequestMapping("/api")
class HelloController {
@GetMapping("/schema")
fun getSchemaResponse(): Response = Response()
}
@Schema(description = "Demo response object")
data class Response(
@field:Schema(description = "My boolean field description", example = "false")
val isMyBoolean: Boolean = false
)
Expected output
components:
schemas:
Response:
type: object
properties:
myBoolean:
type: boolean
description: My boolean field description
example: false
description: Demo response object
Actual output
components:
schemas:
Response:
type: object
properties:
myBoolean:
type: boolean
description: Demo response object
Metadata
Metadata
Assignees
Labels
No labels