Repository navigation
Conversation
Author
|
Hey @bnasslahsen, check this one, please. |
…en plugins - springdoc-openapi-generator-worker: shared thin worker whose entry point GeneratorWorkerMain detects the app's web stack from the fork classpath and dispatches to GeneratorWorkerWebFlux (REACTIVE, no port bound via a no-op ReactiveWebServerFactory) or GeneratorWorkerWebMvc (SERVLET, ephemeral port 0, shut down immediately). Writes the JSON/YAML atomically and fails fast on an unsupported format. - Registered in springdoc-openapi-bom; added gitignore. - GeneratorWorkerMain exits explicitly once generation finishes (or fails) so a leaked non-daemon thread in the target app (e.g. a Vert.x instance or custom thread pool) cannot hang the forked worker JVM after the spec is written. The parent build waits for the process to exit and for its stdout to reach EOF, so without this the whole build could hang. System.exit runs shutdown hooks and flushes System.out, so worker logs still reach the calling build.
vpelikh
force-pushed
the
generator-worker
branch
from
October 6, 2026 04:00
5858c2b to
96b9a70
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds shared single forked-JVM worker (
springdoc-openapi-generator-worker) that boots the application context, lets springdoc-openapi build the spec, writes it to disk, and shuts the context down.Boots a reactive context with a no-op
ReactiveWebServerFactory(fully serverless) or a servlet context on an ephemeral port, writes the spec, then exits.Changes
New module
springdoc-openapi-generator-worker/— shared forked-JVM worker used by both plugins. Detects the target app's stack from its classpath and dispatches to a WebFlux or WebMvc generator.Design notes
ReactiveWebServerFactory); WebMvc starts a real, short-lived container because the servlet model requires aServletContext.Follow-ups
Part of #3367