From 26005e37293c67201308e0a98a921ee2633fa119 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 21 Aug 2026 12:42:20 +0000 Subject: [PATCH 1/2] Bump io.github.vpelikh:swagger-core from 4.0.3 to 4.0.5 Bumps [io.github.vpelikh:swagger-core](https://github.com/vpelikh/swagger-core) from 4.0.3 to 4.0.5. - [Release notes](https://github.com/vpelikh/swagger-core/releases) - [Changelog](https://github.com/vpelikh/swagger-core/blob/master/CHANGELOG.md) - [Commits](https://github.com/vpelikh/swagger-core/compare/v4.0.3...v4.0.5) --- updated-dependencies: - dependency-name: io.github.vpelikh:swagger-core dependency-version: 4.0.5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index aed340674..1bc531e44 100644 --- a/pom.xml +++ b/pom.xml @@ -62,7 +62,7 @@ 3.3.1 0.11.0 1.8.0 - 4.0.3 + 4.0.5 5.32.14 5.1.0 0.13.0 From f4760c490c329449ac90d2dc8657ade80320ea8d Mon Sep 17 00:00:00 2001 From: Vasily Pelikh <2010720+vpelikh@users.noreply.github.com> Date: Fri, 21 Aug 2026 16:58:45 +0300 Subject: [PATCH 2/2] fix: adapt app115 Duration tests to swagger-core 4.0.5 swagger-core 4.0.5 resolves java.time.Duration as a native string primitive (format=duration) with null properties, instead of an object schema exposing a 'seconds' property. Guard the getProperties().clear() calls in the app115 OperationCustomizers and update the expected OAS 3.0.1/3.1.0 fixtures from 'properties: {}' to 'format: duration'. --- .../api/v31/app115/JavaTimeOperationCustomizer.java | 7 ++++--- .../src/test/resources/results/3.1.0/app115.json | 2 +- .../api/v30/app115/JavaTimeOperationCustomizer.java | 4 +++- .../api/v31/app115/JavaTimeOperationCustomizer.java | 7 ++++--- .../src/test/resources/results/3.0.1/app115.json | 2 +- .../src/test/resources/results/3.1.0/app115.json | 2 +- 6 files changed, 14 insertions(+), 10 deletions(-) diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app115/JavaTimeOperationCustomizer.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app115/JavaTimeOperationCustomizer.java index 32e9be4e5..fbda7223d 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app115/JavaTimeOperationCustomizer.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v31/app115/JavaTimeOperationCustomizer.java @@ -26,7 +26,6 @@ import java.time.Duration; import java.util.Map; -import java.util.Set; import io.swagger.v3.oas.models.Operation; import io.swagger.v3.oas.models.media.Content; @@ -47,8 +46,10 @@ public Operation customize(Operation operation, HandlerMethod handlerMethod) { Content content = response.getContent(); if (content.containsKey(MediaType.APPLICATION_JSON_VALUE)) { Schema schema = content.get(MediaType.APPLICATION_JSON_VALUE).getSchema(); - schema.getProperties().clear(); - schema.types(Set.of("string")); + if (schema.getProperties() != null) { + schema.getProperties().clear(); + } + schema.setType("string"); } } } diff --git a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.1.0/app115.json b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.1.0/app115.json index f3685cb97..322ede3ed 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.1.0/app115.json +++ b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.1.0/app115.json @@ -24,7 +24,7 @@ "application/json": { "schema": { "type": "string", - "properties": {} + "format": "duration" } } } diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/v30/app115/JavaTimeOperationCustomizer.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/v30/app115/JavaTimeOperationCustomizer.java index 544878a19..5991b4f67 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/v30/app115/JavaTimeOperationCustomizer.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/v30/app115/JavaTimeOperationCustomizer.java @@ -58,7 +58,9 @@ public Operation customize(Operation operation, HandlerMethod handlerMethod) { Content content = response.getContent(); if (content.containsKey(MediaType.APPLICATION_JSON_VALUE)) { Schema schema = content.get(MediaType.APPLICATION_JSON_VALUE).getSchema(); - schema.getProperties().clear(); + if (schema.getProperties() != null) { + schema.getProperties().clear(); + } schema.setType("string"); } } diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/v31/app115/JavaTimeOperationCustomizer.java b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/v31/app115/JavaTimeOperationCustomizer.java index e891dcec7..f3f7aea5e 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/v31/app115/JavaTimeOperationCustomizer.java +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/v31/app115/JavaTimeOperationCustomizer.java @@ -28,7 +28,6 @@ import java.time.Duration; import java.util.Map; -import java.util.Set; import io.swagger.v3.oas.models.Operation; import io.swagger.v3.oas.models.media.Content; @@ -59,8 +58,10 @@ public Operation customize(Operation operation, HandlerMethod handlerMethod) { Content content = response.getContent(); if (content.containsKey(MediaType.APPLICATION_JSON_VALUE)) { Schema schema = content.get(MediaType.APPLICATION_JSON_VALUE).getSchema(); - schema.types(Set.of("string")); - schema.getProperties().clear(); + schema.setType("string"); + if (schema.getProperties() != null) { + schema.getProperties().clear(); + } } } } diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/3.0.1/app115.json b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/3.0.1/app115.json index 174ff999c..cde841b58 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/3.0.1/app115.json +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/3.0.1/app115.json @@ -32,7 +32,7 @@ "application/json": { "schema": { "type": "string", - "properties": {} + "format": "duration" } } } diff --git a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/3.1.0/app115.json b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/3.1.0/app115.json index 052562581..0dc185f8f 100644 --- a/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/3.1.0/app115.json +++ b/springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/3.1.0/app115.json @@ -32,7 +32,7 @@ "application/json": { "schema": { "type": "string", - "properties": {} + "format": "duration" } } }