Skip to content

Comments

fix: add so that the type annotation is considered again if kotlin is not present#3215

Merged
bnasslahsen merged 1 commit intospringdoc:mainfrom
Mattias-Sehlstedt:path-variable-description
Feb 20, 2026
Merged

fix: add so that the type annotation is considered again if kotlin is not present#3215
bnasslahsen merged 1 commit intospringdoc:mainfrom
Mattias-Sehlstedt:path-variable-description

Conversation

@Mattias-Sehlstedt
Copy link
Contributor

Fixes #3213

The change in 0ed32af#diff-be80ed57071d5a58204a5cc398c2284ace48ff3e1c355f961e0fe9fcde987f94L372 from

(... && methodParameter.getParameterType().getAnnotation(io.swagger.v3.oas.annotations.media.Schema.class) == null) {

to

(... && Arrays.stream(mergedAnnotations)
    .noneMatch(a -> a.annotationType() == io.swagger.v3.oas.annotations.media.Schema.class)) {

Accidentally dropped the parameter type annotations when not using Kotlin (previously checked with methodParameter.getParameterType()). This PR reintroduce so that those annotations are also checked and considered again.

@Mattias-Sehlstedt Mattias-Sehlstedt force-pushed the path-variable-description branch from 2c2e200 to 4d447bf Compare February 10, 2026 17:38
@bnasslahsen bnasslahsen merged commit 9ab95a8 into springdoc:main Feb 20, 2026
1 check passed
@Mattias-Sehlstedt Mattias-Sehlstedt deleted the path-variable-description branch February 20, 2026 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@PathVariable with Spring Type Conversion loses @Schema definition with 2.8.15

2 participants