File tree Expand file tree Collapse file tree 3 files changed +51
-0
lines changed
springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration
springdoc-openapi-tests/springdoc-openapi-kotlin-webflux-tests/src/test
kotlin/test/org/springdoc/api/app2 Expand file tree Collapse file tree 3 files changed +51
-0
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ import io.swagger.v3.oas.annotations.Parameter
3030import org.springdoc.core.customizers.KotlinDeprecatedPropertyCustomizer
3131import org.springdoc.core.customizers.ParameterCustomizer
3232import org.springdoc.core.providers.ObjectMapperProvider
33+ import org.springdoc.core.service.AbstractRequestService.addRequestWrapperToIgnore
3334import org.springdoc.core.utils.Constants
3435import org.springdoc.core.utils.SpringDocUtils
3536import org.springframework.boot.autoconfigure.condition.ConditionalOnBean
@@ -69,6 +70,7 @@ class SpringDocKotlinConfiguration() {
6970 */
7071 init {
7172 SpringDocUtils .getConfig()
73+ .addResponseTypeToIgnore(Unit ::class .java)
7274 .addRequestWrapperToIgnore(Continuation ::class .java)
7375 .addDeprecatedType(Deprecated ::class .java)
7476 }
Original file line number Diff line number Diff line change 1818
1919package test.org.springdoc.api.app2
2020
21+ import jakarta.validation.Valid
2122import kotlinx.coroutines.reactor.mono
23+ import org.springframework.http.HttpStatus
2224import org.springframework.web.bind.annotation.GetMapping
25+ import org.springframework.web.bind.annotation.PathVariable
26+ import org.springframework.web.bind.annotation.PostMapping
27+ import org.springframework.web.bind.annotation.RequestBody
2328import org.springframework.web.bind.annotation.RequestMapping
29+ import org.springframework.web.bind.annotation.ResponseStatus
2430import org.springframework.web.bind.annotation.RestController
2531
2632enum class SystemStatus (val status : String ) {
@@ -41,4 +47,13 @@ class SystemStatusController {
4147 fun foo () = mono {
4248 SystemStatusResponse (SystemStatus .OK )
4349 }
50+
51+ @PostMapping(" {token}/activate" )
52+ @ResponseStatus(HttpStatus .NO_CONTENT )
53+ suspend fun activateUser (
54+ @PathVariable token : String ,
55+ @RequestBody @Valid request : String
56+ ) {
57+ // do something
58+ }
4459}
Original file line number Diff line number Diff line change 1111 }
1212 ],
1313 "paths" : {
14+ "/status/{token}/activate" : {
15+ "post" : {
16+ "tags" : [
17+ " system-status-controller"
18+ ],
19+ "operationId" : " activateUser" ,
20+ "parameters" : [
21+ {
22+ "name" : " token" ,
23+ "in" : " path" ,
24+ "required" : true ,
25+ "schema" : {
26+ "type" : " string"
27+ }
28+ }
29+ ],
30+ "requestBody" : {
31+ "content" : {
32+ "application/json" : {
33+ "schema" : {
34+ "type" : " string"
35+ }
36+ }
37+ },
38+ "required" : true
39+ },
40+ "responses" : {
41+ "204" : {
42+ "description" : " No Content" ,
43+ "content" : {}
44+ }
45+ }
46+ }
47+ },
1448 "/status" : {
1549 "get" : {
1650 "tags" : [
You can’t perform that action at this time.
0 commit comments