[jaxrs-spec][quarkus] Migrate the Jakarta path to Quarkus REST and fix file upload types#24455
Open
Ignacio-Vidal wants to merge 1 commit into
Open
Conversation
Ignacio-Vidal
force-pushed
the
jaxrs-spec-quarkus-rest-migration
branch
from
July 26, 2026 09:24
c34e33b to
bc6433f
Compare
3 tasks
Ignacio-Vidal
force-pushed
the
jaxrs-spec-quarkus-rest-migration
branch
from
July 26, 2026 09:47
bc6433f to
6bb4578
Compare
3 tasks
Ignacio-Vidal
marked this pull request as ready for review
July 26, 2026 11:47
The quarkus library generated for RESTEasy Classic (quarkus-resteasy), while current Quarkus defaults to Quarkus REST. Two consequences are fixed here. File form parameters were bound to InputStream, which Quarkus REST does not support as a multipart type. And a `type: array` of `format: binary` properties was collapsed onto that scalar, so a multi-file upload was generated with the same signature as a single-file one and only one file could ever be bound. Under useJakartaEe=true the generated project now depends on quarkus-rest and binds file form parameters to the RESTEasy Reactive multipart types: `@RestForm FileUpload`, or `@RestForm List<FileUpload>` when the property is an array, which is the binding Quarkus REST provides for several files sharing one part name. The platform moves to 3.27.4.1 (oldest supported LTS) and the BOM to quarkus-bom, since quarkus-universe-bom was discontinued after 3.0.1 and quarkus-rest does not exist before 3.9. quarkus-hibernate-validator is now declared explicitly because, unlike quarkus-resteasy, quarkus-rest does not pull bean validation in transitively. The compiler release moves to 17 on that path, as Quarkus 3.x requires it, so the quarkus-security sample moves from the JDK 11 samples-jaxrs workflow to samples-jdk17. The useJakartaEe=false path is pinned to Quarkus 1.13.7, which predates Quarkus REST, so it keeps RESTEasy Classic, Java 8 and its InputStream binding. The array is deliberately left scalar there: @FormParam is a string-based annotation, so List<InputStream> is rejected at deployment with RESTEASY003875. Refs OpenAPITools#24454
Ignacio-Vidal
force-pushed
the
jaxrs-spec-quarkus-rest-migration
branch
from
July 26, 2026 15:43
6bb4578 to
e70af99
Compare
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.
Proposal to solve #24454
The
quarkuslibrary ofjaxrs-specgenerates for RESTEasy Classic (quarkus-resteasy) on a Quarkus version from 2021, while current Quarkus defaults to Quarkus REST. This migrates theuseJakartaEe=truepath and fixes the file upload binding that the old stack forced.1. Migrate to Quarkus REST
quarkus-rest(formerly RESTEasy Reactive) is the default REST stack in current Quarkus. One knock-on: unlikequarkus-resteasy, it does not pull bean validation in transitively, soquarkus-hibernate-validatoris now declared explicitly underuseBeanValidation. Without it the generatedjakarta.validationimports fail to compile.2. BOM import and version upgrade
The migration cannot happen on the currently generated version, so two coupled changes are required:
quarkus-universe-bom→quarkus-bom— the universe BOM was discontinued after 3.0.1 and does not exist for later releases.3.0.1.Final→3.27.4.1—quarkus-restdoes not exist before 3.9 (it wasquarkus-resteasy-reactiveearlier). Per the Quarkus release schedule, 3.27 is the oldest LTS still under active support (until 24 Sep 2026) - see question 4 in [REQ] [jaxrs-spec] Migrate the quarkus library from RESTEasy Classic to Quarkus REST (and fix file upload types) #24454.1.8→17, since Quarkus 3.x requires it. Thequarkus-securitysample therefore moves out of the JDK 11samples-jaxrsworkflow intosamples-jdk17.3. File upload fixes
Two defects follow from the old stack, both fixed by the migration:
Wrong type. File form parameters were bound to
InputStream, which is not a supported multipart type on Quarkus REST (the supported ones areFileUpload,Path,File,byte[],Buffer— see the Quarkus REST guide):Dropped array dimension. A
type: arrayofformat: binaryproperties was collapsed onto that scalar, so a multi-file upload got the same signature as a single-file one and only one file could ever be bound:List<FileUpload>is the binding Quarkus REST provides for several files sharing one part name.The
org.jboss.resteasy.reactivetypes are emitted from a newlibraries/quarkus/formParams.mustacherather than the sharedspec/formParams.mustache, to avoid changes to thorntail, helidon, openliberty and kumuluzee libraries.Scope: the javax path is deliberately untouched
pom.mustacheforks onuseJakartaEe, and thefalsebranch is pinned to Quarkus 1.13.7 — which predates Quarkus REST entirely. That path therefore keeps RESTEasy Classic, Java 8 and itsInputStreambinding.useJakartaEejaxrs-spec/quarkus-securitytruequarkus-restjaxrs-spec-microprofile-openapi-annotationsjaxrs-spec-quarkus-mutinyBreaking change
Two, both on the
useJakartaEe=truepath:InputStream _fileInputStream→FileUpload _file(the parameter name loses its suffix too). Code implementing the generated interfaces will not compile until updated.Testing
JavaJAXRSSpecServerCodegenTest, pinning both paths:testQuarkusJakartaBindsFileFormParamToFileUpload— asserts the@RestForm/FileUploadimports, the scalarFileUpload, the arrayList<FileUpload>, andquarkus-restin the generatedpom.xml.testQuarkusJavaxKeepsResteasyClassicFileBinding— asserts the javax path still emits@FormParam/InputStream, does not gain the RESTEasy Reactive import, does not turn the array intoList<InputStream>, and keepsquarkus-resteasy.jaxrs-spec/quarkus-securityon Quarkus REST 3.27.4.1 with JDK 17 (matching its new workflow), and both javax samples unchanged on 1.13.7 with JDK 11.Note
jaxrs-spec-quarkus-mutinyis not listed in.github/workflows/samples-jaxrs.yaml, so CI never compiles it — I compiled it locally.PR checklist
Commit all changed files.
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example
./bin/generate-samples.sh bin/configs/java*.IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.