Skip to content

fix: unwrap a WebAsyncTask return type - #3368

Open
kdelay wants to merge 1 commit into
springdoc:mainfrom
kdelay:fix/webasynctask-response-wrapper
Open

kdelay wants to merge 1 commit into
springdoc:mainfrom
kdelay:fix/webasynctask-response-wrapper

Conversation

@kdelay

@kdelay kdelay commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

WebAsyncTask<V> is a supported Spring MVC async return type, but springdoc does not treat it as a response wrapper. The generated response schema is a $ref to a WebAsyncTask component schema instead of V.

Callable, DeferredResult and Future are already registered in SpringDocConfiguration. WebAsyncTask is the one that is missing, so this adds it.

For a controller returning WebAsyncTask<String>, the response schema is now {"type": "string"} and no WebAsyncTask schema is emitted in components.

Verification: the new app273 tests (v30 and v31) fail on master with Unexpected: $ref and pass with the change. mvn test is green for springdoc-openapi-starter-common (55), springdoc-openapi-starter-webmvc-api (655) and springdoc-openapi-starter-webflux-api (136).

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.

1 participant