springdoc / springdoc-openapi

Library for OpenAPI 3 with spring-boot
https://springdoc.org
Apache License 2.0
3.29k stars 499 forks source link

Kotlin - CoroutineContext and ContinuationObject parameters exposed in swagger docs for suspend functions #1983

Closed bkielczewski closed 1 year ago

bkielczewski commented 1 year ago

Describe the bug

Since 2.0, if Kotlin suspend fun is used on rest endpoints, CoroutineContext and ContinuationObject appear in the generated docs. This behavior is a regression from 1.+ where it was properly handled (hidden) by Kotlin module.

To Reproduce Steps to reproduce the behavior:

3.0.0

webflux-ui 2.0.0

` @RestController class HelloController {

@GetMapping suspend fun hello() = "hello"

}

`

Expected behavior

CoroutineContext and ContinuationObject should not be visible in the docs.

bnasslahsen commented 1 year ago

see https://github.com/springdoc/springdoc-openapi/issues/1961