File tree Expand file tree Collapse file tree 3 files changed +24
-4
lines changed
springdoc-openapi-kotlin/src/main
java/org/springdoc/kotlin Expand file tree Collapse file tree 3 files changed +24
-4
lines changed Original file line number Diff line number Diff line change 22
22
import io .swagger .v3 .core .util .Json ;
23
23
import kotlin .Deprecated ;
24
24
import kotlin .coroutines .Continuation ;
25
- import kotlinx .coroutines .flow .Flow ;
26
25
27
26
import org .springframework .boot .autoconfigure .condition .ConditionalOnProperty ;
28
27
import org .springframework .context .annotation .Bean ;
@@ -38,8 +37,7 @@ public class SpringDocKotlinConfiguration {
38
37
39
38
static {
40
39
getConfig ().addRequestWrapperToIgnore (Continuation .class )
41
- .addDeprecatedType (Deprecated .class )
42
- .addFluxWrapperToIgnore (Flow .class );
40
+ .addDeprecatedType (Deprecated .class );
43
41
Json .mapper ().registerModule (new KotlinModule ());
44
42
}
45
43
Original file line number Diff line number Diff line change
1
+ package org .springdoc .kotlin ;
2
+
3
+ import kotlinx .coroutines .flow .Flow ;
4
+
5
+ import org .springframework .boot .autoconfigure .condition .ConditionalOnClass ;
6
+ import org .springframework .boot .autoconfigure .condition .ConditionalOnProperty ;
7
+ import org .springframework .context .annotation .Configuration ;
8
+
9
+ import static org .springdoc .core .Constants .SPRINGDOC_ENABLED ;
10
+ import static org .springdoc .core .SpringDocUtils .getConfig ;
11
+
12
+ @ ConditionalOnClass (Flow .class )
13
+ @ Configuration
14
+ @ ConditionalOnProperty (name = SPRINGDOC_ENABLED , matchIfMissing = true )
15
+ public class SpringDocKotlinxConfiguration {
16
+
17
+ static {
18
+ getConfig ().addFluxWrapperToIgnore (Flow .class );
19
+ }
20
+
21
+ }
Original file line number Diff line number Diff line change 1
1
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
2
- org.springdoc.kotlin.SpringDocKotlinConfiguration
2
+ org.springdoc.kotlin.SpringDocKotlinConfiguration,\
3
+ org.springdoc.kotlin.SpringDocKotlinxConfiguration
You can’t perform that action at this time.
0 commit comments