Skip to content

Commit 83b42c7

Browse files
committed
Added support for spring-boot 2.5.0. Fixes #1091
1 parent 4a2ce96 commit 83b42c7

File tree

18 files changed

+243
-78
lines changed

18 files changed

+243
-78
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<parent>
1212
<groupId>org.springframework.boot</groupId>
1313
<artifactId>spring-boot-starter-parent</artifactId>
14-
<version>2.4.5</version>
14+
<version>2.5.0</version>
1515
</parent>
1616

1717
<licenses>

springdoc-openapi-data-rest/src/test/java/test/org/springdoc/api/app26/SpringRestConfiguration.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
import org.springframework.context.annotation.Configuration;
44
import org.springframework.data.rest.core.config.RepositoryRestConfiguration;
55
import org.springframework.data.rest.webmvc.config.RepositoryRestConfigurer;
6+
import org.springframework.web.servlet.config.annotation.CorsRegistry;
67

78
@Configuration
89
public class SpringRestConfiguration implements RepositoryRestConfigurer {
910
@Override
10-
public void configureRepositoryRestConfiguration(RepositoryRestConfiguration config) {
11+
public void configureRepositoryRestConfiguration(RepositoryRestConfiguration config, CorsRegistry cors) {
1112
config.exposeIdsFor(Person.class);
1213
}
1314
}

springdoc-openapi-data-rest/src/test/java/test/org/springdoc/api/app9/core/config/SpringRestConfiguration.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@
44
import org.springframework.data.rest.core.config.RepositoryRestConfiguration;
55
import org.springframework.data.rest.webmvc.config.RepositoryRestConfigurer;
66
import org.springframework.http.MediaType;
7+
import org.springframework.web.servlet.config.annotation.CorsRegistry;
78

89
@Configuration
910
public class SpringRestConfiguration implements RepositoryRestConfigurer {
1011
@Override
11-
public void configureRepositoryRestConfiguration(RepositoryRestConfiguration config) {
12+
public void configureRepositoryRestConfiguration(RepositoryRestConfiguration config, CorsRegistry cors) {
1213
config.setDefaultMediaType(MediaType.APPLICATION_JSON);
1314
config.useHalAsDefaultJsonMediaType(false);
1415
}

springdoc-openapi-webflux-core/src/test/java/test/org/springdoc/api/AbstractSpringDocTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ public void testApp() throws Exception {
4747
result = new String(getResult.getResponseBody());
4848
String className = getClass().getSimpleName();
4949
String testNumber = className.replaceAll("[^0-9]", "");
50-
5150
String expected = getContent("results/app" + testNumber + ".json");
5251
assertEquals(expected, result, true);
5352
}

springdoc-openapi-webflux-core/src/test/java/test/org/springdoc/api/app76/SpringDocApp76Test.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ public SpringDocApp76Test() {
4141
public void testApp() throws Exception {
4242
webTestClient.get().uri(Constants.DEFAULT_API_DOCS_URL + groupName).exchange().expectStatus().isOk().expectBody()
4343
.jsonPath("$.openapi").isEqualTo("3.0.1")
44-
.jsonPath("$.paths./actuator/info.get.operationId").exists()
4544
.jsonPath("$.paths./actuator/health.get.operationId").exists();
4645
}
4746

springdoc-openapi-webflux-core/src/test/resources/results/app146-1.json

Lines changed: 38 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -319,12 +319,22 @@
319319
}
320320
}
321321
},
322-
"/application/configprops": {
322+
"/application/configprops/{prefix}": {
323323
"get": {
324324
"tags": [
325325
"Actuator"
326326
],
327327
"operationId": "handle_14",
328+
"parameters": [
329+
{
330+
"name": "prefix",
331+
"in": "path",
332+
"required": true,
333+
"schema": {
334+
"type": "string"
335+
}
336+
}
337+
],
328338
"responses": {
329339
"200": {
330340
"description": "OK",
@@ -339,7 +349,7 @@
339349
}
340350
}
341351
},
342-
"/application/conditions": {
352+
"/application/configprops": {
343353
"get": {
344354
"tags": [
345355
"Actuator"
@@ -359,12 +369,32 @@
359369
}
360370
}
361371
},
362-
"/application/caches/{cache}": {
372+
"/application/conditions": {
363373
"get": {
364374
"tags": [
365375
"Actuator"
366376
],
367377
"operationId": "handle_16",
378+
"responses": {
379+
"200": {
380+
"description": "OK",
381+
"content": {
382+
"*/*": {
383+
"schema": {
384+
"$ref": "#/components/schemas/PublisherResponseEntityObject"
385+
}
386+
}
387+
}
388+
}
389+
}
390+
}
391+
},
392+
"/application/caches/{cache}": {
393+
"get": {
394+
"tags": [
395+
"Actuator"
396+
],
397+
"operationId": "handle_17",
368398
"parameters": [
369399
{
370400
"name": "cache",
@@ -392,7 +422,7 @@
392422
"tags": [
393423
"Actuator"
394424
],
395-
"operationId": "handle_21",
425+
"operationId": "handle_22",
396426
"parameters": [
397427
{
398428
"name": "cache",
@@ -422,7 +452,7 @@
422452
"tags": [
423453
"Actuator"
424454
],
425-
"operationId": "handle_17",
455+
"operationId": "handle_18",
426456
"responses": {
427457
"200": {
428458
"description": "OK",
@@ -440,7 +470,7 @@
440470
"tags": [
441471
"Actuator"
442472
],
443-
"operationId": "handle_20",
473+
"operationId": "handle_21",
444474
"responses": {
445475
"200": {
446476
"description": "OK",
@@ -460,7 +490,7 @@
460490
"tags": [
461491
"Actuator"
462492
],
463-
"operationId": "handle_18",
493+
"operationId": "handle_19",
464494
"responses": {
465495
"200": {
466496
"description": "OK",
@@ -481,7 +511,7 @@
481511
"Actuator"
482512
],
483513
"summary": "Actuator root web endpoint",
484-
"operationId": "links_19",
514+
"operationId": "links_20",
485515
"responses": {
486516
"200": {
487517
"description": "OK",

springdoc-openapi-webflux-core/src/test/resources/results/app147-1.json

Lines changed: 38 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -319,12 +319,22 @@
319319
}
320320
}
321321
},
322-
"/application/configprops": {
322+
"/application/configprops/{prefix}": {
323323
"get": {
324324
"tags": [
325325
"Actuator"
326326
],
327327
"operationId": "handle_14",
328+
"parameters": [
329+
{
330+
"name": "prefix",
331+
"in": "path",
332+
"required": true,
333+
"schema": {
334+
"type": "string"
335+
}
336+
}
337+
],
328338
"responses": {
329339
"200": {
330340
"description": "OK",
@@ -339,7 +349,7 @@
339349
}
340350
}
341351
},
342-
"/application/conditions": {
352+
"/application/configprops": {
343353
"get": {
344354
"tags": [
345355
"Actuator"
@@ -359,12 +369,32 @@
359369
}
360370
}
361371
},
362-
"/application/caches/{cache}": {
372+
"/application/conditions": {
363373
"get": {
364374
"tags": [
365375
"Actuator"
366376
],
367377
"operationId": "handle_16",
378+
"responses": {
379+
"200": {
380+
"description": "OK",
381+
"content": {
382+
"*/*": {
383+
"schema": {
384+
"$ref": "#/components/schemas/PublisherResponseEntityObject"
385+
}
386+
}
387+
}
388+
}
389+
}
390+
}
391+
},
392+
"/application/caches/{cache}": {
393+
"get": {
394+
"tags": [
395+
"Actuator"
396+
],
397+
"operationId": "handle_17",
368398
"parameters": [
369399
{
370400
"name": "cache",
@@ -392,7 +422,7 @@
392422
"tags": [
393423
"Actuator"
394424
],
395-
"operationId": "handle_21",
425+
"operationId": "handle_22",
396426
"parameters": [
397427
{
398428
"name": "cache",
@@ -422,7 +452,7 @@
422452
"tags": [
423453
"Actuator"
424454
],
425-
"operationId": "handle_17",
455+
"operationId": "handle_18",
426456
"responses": {
427457
"200": {
428458
"description": "OK",
@@ -440,7 +470,7 @@
440470
"tags": [
441471
"Actuator"
442472
],
443-
"operationId": "handle_20",
473+
"operationId": "handle_21",
444474
"responses": {
445475
"200": {
446476
"description": "OK",
@@ -460,7 +490,7 @@
460490
"tags": [
461491
"Actuator"
462492
],
463-
"operationId": "handle_18",
493+
"operationId": "handle_19",
464494
"responses": {
465495
"200": {
466496
"description": "OK",
@@ -481,7 +511,7 @@
481511
"Actuator"
482512
],
483513
"summary": "Actuator root web endpoint",
484-
"operationId": "links_19",
514+
"operationId": "links_20",
485515
"responses": {
486516
"200": {
487517
"description": "OK",

springdoc-openapi-webflux-core/src/test/resources/results/app148-2.json

Lines changed: 38 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -319,12 +319,22 @@
319319
}
320320
}
321321
},
322-
"/application/configprops": {
322+
"/application/configprops/{prefix}": {
323323
"get": {
324324
"tags": [
325325
"Actuator"
326326
],
327327
"operationId": "handle_14",
328+
"parameters": [
329+
{
330+
"name": "prefix",
331+
"in": "path",
332+
"required": true,
333+
"schema": {
334+
"type": "string"
335+
}
336+
}
337+
],
328338
"responses": {
329339
"200": {
330340
"description": "OK",
@@ -339,7 +349,7 @@
339349
}
340350
}
341351
},
342-
"/application/conditions": {
352+
"/application/configprops": {
343353
"get": {
344354
"tags": [
345355
"Actuator"
@@ -359,12 +369,32 @@
359369
}
360370
}
361371
},
362-
"/application/caches/{cache}": {
372+
"/application/conditions": {
363373
"get": {
364374
"tags": [
365375
"Actuator"
366376
],
367377
"operationId": "handle_16",
378+
"responses": {
379+
"200": {
380+
"description": "OK",
381+
"content": {
382+
"*/*": {
383+
"schema": {
384+
"$ref": "#/components/schemas/PublisherResponseEntityObject"
385+
}
386+
}
387+
}
388+
}
389+
}
390+
}
391+
},
392+
"/application/caches/{cache}": {
393+
"get": {
394+
"tags": [
395+
"Actuator"
396+
],
397+
"operationId": "handle_17",
368398
"parameters": [
369399
{
370400
"name": "cache",
@@ -392,7 +422,7 @@
392422
"tags": [
393423
"Actuator"
394424
],
395-
"operationId": "handle_21",
425+
"operationId": "handle_22",
396426
"parameters": [
397427
{
398428
"name": "cache",
@@ -422,7 +452,7 @@
422452
"tags": [
423453
"Actuator"
424454
],
425-
"operationId": "handle_17",
455+
"operationId": "handle_18",
426456
"responses": {
427457
"200": {
428458
"description": "OK",
@@ -440,7 +470,7 @@
440470
"tags": [
441471
"Actuator"
442472
],
443-
"operationId": "handle_20",
473+
"operationId": "handle_21",
444474
"responses": {
445475
"200": {
446476
"description": "OK",
@@ -460,7 +490,7 @@
460490
"tags": [
461491
"Actuator"
462492
],
463-
"operationId": "handle_18",
493+
"operationId": "handle_19",
464494
"responses": {
465495
"200": {
466496
"description": "OK",
@@ -481,7 +511,7 @@
481511
"Actuator"
482512
],
483513
"summary": "Actuator root web endpoint",
484-
"operationId": "links_19",
514+
"operationId": "links_20",
485515
"responses": {
486516
"200": {
487517
"description": "OK",

springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app1/HelloController.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818

1919
package test.org.springdoc.api.app1;
2020

21-
import org.hibernate.validator.constraints.SafeHtml.Tag;
21+
22+
import io.swagger.v3.oas.annotations.tags.Tag;
2223

2324
import org.springframework.http.HttpStatus;
2425
import org.springframework.web.bind.annotation.GetMapping;

0 commit comments

Comments
 (0)