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
30
30
import org.springdoc.core.customizers.KotlinDeprecatedPropertyCustomizer
31
31
import org.springdoc.core.customizers.ParameterCustomizer
32
32
import org.springdoc.core.providers.ObjectMapperProvider
33
+ import org.springdoc.core.service.AbstractRequestService.addRequestWrapperToIgnore
33
34
import org.springdoc.core.utils.Constants
34
35
import org.springdoc.core.utils.SpringDocUtils
35
36
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean
@@ -69,6 +70,7 @@ class SpringDocKotlinConfiguration() {
69
70
*/
70
71
init {
71
72
SpringDocUtils .getConfig()
73
+ .addResponseTypeToIgnore(Unit ::class .java)
72
74
.addRequestWrapperToIgnore(Continuation ::class .java)
73
75
.addDeprecatedType(Deprecated ::class .java)
74
76
}
Original file line number Diff line number Diff line change 18
18
19
19
package test.org.springdoc.api.app2
20
20
21
+ import jakarta.validation.Valid
21
22
import kotlinx.coroutines.reactor.mono
23
+ import org.springframework.http.HttpStatus
22
24
import 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
23
28
import org.springframework.web.bind.annotation.RequestMapping
29
+ import org.springframework.web.bind.annotation.ResponseStatus
24
30
import org.springframework.web.bind.annotation.RestController
25
31
26
32
enum class SystemStatus (val status : String ) {
@@ -41,4 +47,13 @@ class SystemStatusController {
41
47
fun foo () = mono {
42
48
SystemStatusResponse (SystemStatus .OK )
43
49
}
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
+ }
44
59
}
Original file line number Diff line number Diff line change 11
11
}
12
12
],
13
13
"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
+ },
14
48
"/status" : {
15
49
"get" : {
16
50
"tags" : [
You can’t perform that action at this time.
0 commit comments