File tree Expand file tree Collapse file tree 9 files changed +19
-12
lines changed
springdoc-openapi-common/src/main/java/org/springdoc/core
springdoc-openapi-ui/src/test/java/test/org/springdoc/ui
springdoc-openapi-webflux-core/src/test/java/test/org/springdoc/api/app66
springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api Expand file tree Collapse file tree 9 files changed +19
-12
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
15
15
- Added separate module for spring-hateoas
16
16
- Added SpringDocUtils.addHiddenRestControllers(String ...)
17
17
- Added support for wrapper types on request
18
+ - Mark GroupedOpenApi.setGroup as deprecated. Use GroupedOpenApi.group instead.
18
19
### Changed
19
20
- Upgrade swagger-ui to 3.25.4
20
21
- Upgrade to spring-boot 2.3.0.RELEASE
Original file line number Diff line number Diff line change @@ -116,11 +116,17 @@ private Builder() {
116
116
// use static factory method in parent class
117
117
}
118
118
119
+ @ Deprecated
119
120
public Builder setGroup (String group ) {
120
121
this .group = group ;
121
122
return this ;
122
123
}
123
124
125
+ public Builder group (String group ) {
126
+ this .group = group ;
127
+ return this ;
128
+ }
129
+
124
130
public Builder pathsToMatch (String ... pathsToMatch ) {
125
131
this .pathsToMatch = Arrays .asList (pathsToMatch );
126
132
return this ;
Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory)
63
63
builder .packagesToScan (elt .getPackagesToScan ().toArray (new String [0 ]));
64
64
if (!CollectionUtils .isEmpty (elt .getPathsToMatch ()))
65
65
builder .pathsToMatch (elt .getPathsToMatch ().toArray (new String [0 ]));
66
- return builder .setGroup (elt .getGroup ()).build ();
66
+ return builder .group (elt .getGroup ()).build ();
67
67
})
68
68
.collect (Collectors .toList ());
69
69
groupedOpenApis .forEach (elt -> beanFactory .registerSingleton (elt .getGroup (), elt ));
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ public static void main(String[] args) {
35
35
public GroupedOpenApi storeOpenApi () {
36
36
String paths [] = { "/store/**" };
37
37
return GroupedOpenApi .builder ()
38
- .setGroup ("stores" )
38
+ .group ("stores" )
39
39
.pathsToMatch (paths )
40
40
.build ();
41
41
}
@@ -44,7 +44,7 @@ public GroupedOpenApi storeOpenApi() {
44
44
public GroupedOpenApi groupOpenApi () {
45
45
String paths [] = { "/pet/**" };
46
46
return GroupedOpenApi .builder ()
47
- .setGroup ("pets" )
47
+ .group ("pets" )
48
48
.pathsToMatch (paths )
49
49
.build ();
50
50
}
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ public static void main(String[] args) {
35
35
public GroupedOpenApi storeOpenApi () {
36
36
String paths [] = { "/store/**" };
37
37
return GroupedOpenApi .builder ()
38
- .setGroup ("stores" )
38
+ .group ("stores" )
39
39
.pathsToMatch (paths )
40
40
.build ();
41
41
}
@@ -44,7 +44,7 @@ public GroupedOpenApi storeOpenApi() {
44
44
public GroupedOpenApi groupOpenApi () {
45
45
String paths [] = { "/pet/**" };
46
46
return GroupedOpenApi .builder ()
47
- .setGroup ("pets" )
47
+ .group ("pets" )
48
48
.pathsToMatch (paths )
49
49
.build ();
50
50
}
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ public OpenAPI customOpenAPI() {
50
50
public GroupedOpenApi streamOpenApi () {
51
51
String [] paths = { "/stream/**" };
52
52
String [] packagedToMatch = { "test.org.springdoc.api.app66" };
53
- return GroupedOpenApi .builder ().setGroup ("stream" ).pathsToMatch (paths )
53
+ return GroupedOpenApi .builder ().group ("stream" ).pathsToMatch (paths )
54
54
.build ();
55
55
}
56
56
Original file line number Diff line number Diff line change @@ -48,15 +48,15 @@ public static void main(String[] args) {
48
48
@ Bean
49
49
public GroupedOpenApi storeOpenApi () {
50
50
return GroupedOpenApi .builder ()
51
- .setGroup ("stores" )
51
+ .group ("stores" )
52
52
.pathsToMatch ("/store/**" )
53
53
.build ();
54
54
}
55
55
56
56
@ Bean
57
57
public GroupedOpenApi userOpenApi () {
58
58
return GroupedOpenApi .builder ()
59
- .setGroup ("users" )
59
+ .group ("users" )
60
60
.packagesToScan ("test.org.springdoc.api.app68.api.user" ).addOpenApiCustomiser (serverOpenApiCustomiser1 ())
61
61
.addOperationCustomizer (operationCustomizer ())
62
62
.build ();
@@ -89,15 +89,15 @@ OperationCustomizer operationCustomizer() {
89
89
@ Bean
90
90
public GroupedOpenApi petOpenApi () {
91
91
return GroupedOpenApi .builder ()
92
- .setGroup ("pets" )
92
+ .group ("pets" )
93
93
.pathsToMatch ("/pet/**" ).addOpenApiCustomiser (serverOpenApiCustomiser2 ())
94
94
.build ();
95
95
}
96
96
97
97
@ Bean
98
98
public GroupedOpenApi groupOpenApi () {
99
99
return GroupedOpenApi .builder ()
100
- .setGroup ("groups test" )
100
+ .group ("groups test" )
101
101
.pathsToMatch ("/v1/**" ).pathsToExclude ("/v1/users" )
102
102
.packagesToScan ("test.org.springdoc.api.app68.api.user" , "test.org.springdoc.api.app68.api.store" )
103
103
.build ();
Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ static class TestApp {
99
99
@ Bean
100
100
GroupedOpenApi testGroupedOpenApi () {
101
101
return GroupedOpenApi .builder ()
102
- .setGroup ("test-group" )
102
+ .group ("test-group" )
103
103
.packagesToScan ("org.test" )
104
104
.build ();
105
105
}
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ static class TestApp {
48
48
@ Bean
49
49
GroupedOpenApi testGroupedOpenApi () {
50
50
return GroupedOpenApi .builder ()
51
- .setGroup ("test-group" )
51
+ .group ("test-group" )
52
52
.packagesToScan ("org.test" )
53
53
.build ();
54
54
}
You can’t perform that action at this time.
0 commit comments