File tree Expand file tree Collapse file tree 3 files changed +17
-9
lines changed
springdoc-openapi-common/src/main/java/org/springdoc/core
springdoc-openapi-data-rest/src/main/java/org/springdoc/data/rest
springdoc-openapi-hateoas/src/test/java/test/org/springdoc/api/app2 Expand file tree Collapse file tree 3 files changed +17
-9
lines changed Original file line number Diff line number Diff line change @@ -177,7 +177,7 @@ SchemaPropertyDeprecatingConverter schemaPropertyDeprecatingConverter() {
177
177
*/
178
178
@ Bean
179
179
@ ConditionalOnMissingBean
180
- @ ConditionalOnProperty (name = SPRINGDOC_PAGEABLE_CONVERTER_ENABLED , matchIfMissing = true )
180
+ @ ConditionalOnProperty (name = SPRINGDOC_PAGEABLE_CONVERTER_ENABLED )
181
181
@ Lazy (false )
182
182
PageableOpenAPIConverter pageableOpenAPIConverter () {
183
183
return new PageableOpenAPIConverter ();
Original file line number Diff line number Diff line change 34
34
import org .springdoc .core .OperationService ;
35
35
import org .springdoc .core .RequestBodyService ;
36
36
import org .springdoc .core .SpringDocConfigProperties ;
37
+ import org .springdoc .core .converters .PageableOpenAPIConverter ;
37
38
import org .springdoc .core .converters .models .DefaultPageable ;
38
39
import org .springdoc .core .converters .models .Pageable ;
39
40
import org .springdoc .core .customizers .DelegatingMethodParameterCustomizer ;
72
73
import org .springframework .hateoas .server .LinkRelationProvider ;
73
74
74
75
import static org .springdoc .core .Constants .SPRINGDOC_ENABLED ;
76
+ import static org .springdoc .core .Constants .SPRINGDOC_PAGEABLE_CONVERTER_ENABLED ;
75
77
import static org .springdoc .core .SpringDocUtils .getConfig ;
76
78
77
79
/**
@@ -88,6 +90,18 @@ public class SpringDocDataRestConfiguration {
88
90
.replaceParameterObjectWithClass (org .springframework .data .domain .PageRequest .class , Pageable .class );
89
91
}
90
92
93
+ /**
94
+ * Pageable open api converter pageable open api converter.
95
+ *
96
+ * @return the pageable open api converter
97
+ */
98
+ @ Bean
99
+ @ ConditionalOnMissingBean
100
+ @ ConditionalOnProperty (name = SPRINGDOC_PAGEABLE_CONVERTER_ENABLED , matchIfMissing = true )
101
+ @ Lazy (false )
102
+ PageableOpenAPIConverter pageableOpenAPIConverter () {
103
+ return new PageableOpenAPIConverter ();
104
+ }
91
105
92
106
/**
93
107
* Delegating method parameter customizer delegating method parameter customizer.
Original file line number Diff line number Diff line change 18
18
19
19
package test .org .springdoc .api .app2 ;
20
20
21
- import org .springdoc .core .converters .models .Pageable ;
22
21
import test .org .springdoc .api .AbstractSpringDocTest ;
23
22
24
23
import org .springframework .boot .autoconfigure .SpringBootApplication ;
24
+ import org .springframework .test .context .TestPropertySource ;
25
25
26
- import static org .springdoc .core .SpringDocUtils .getConfig ;
27
-
26
+ @ TestPropertySource (properties = "springdoc.model-converters.pageable-converter.enabled=true" )
28
27
public class SpringDocApp2Test extends AbstractSpringDocTest {
29
28
30
- static {
31
- getConfig ().replaceParameterObjectWithClass (org .springframework .data .domain .Pageable .class , Pageable .class )
32
- .replaceParameterObjectWithClass (org .springframework .data .domain .PageRequest .class , Pageable .class );
33
- }
34
-
35
29
@ SpringBootApplication
36
30
static class SpringDocTestApp {}
37
31
You can’t perform that action at this time.
0 commit comments