Add support for interface only with vertx
Closed
CO
2mo ago+2579+2579+0123456789012345678901234567890123456789-16-16-01234567890123456789
Add support for interfaceOnly with vertx-web
PR checklist
- Read the contribution guidelines.
- Run the following to build the project and update samples:
(For Windows users, please run the script in WSL)./mvnw clean package || exit ./bin/generate-samples.sh ./bin/configs/*.yaml || exit ./bin/utils/export_docs_generators.sh || exit
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. - If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.
Summary by cubic
Adds interfaceOnly mode to the Vert.x Web server generator to output only API interfaces and handlers, skipping server bootstrap and impl stubs. Also improves handler logging and file upload validation, with samples and tests.
-
New Features
- New
interfaceOnlyoption forjava-vertx-web; generates*Apiand*Handleronly; skipsapiImpl.mustacheandHttpServerVerticle. apiHandler.mustache: remove deprecated no-arg constructor wheninterfaceOnly; redact password params and omit request bodies in debug logs.formParams.mustache: return 400 when a required file upload is missing; otherwise allow null instead of assuming a file.pom.mustacheandREADME.mustacheadapt wheninterfaceOnly(no main verticle, shade/exec plugins, or run steps).- Added
bin/configs/java-vertx-web-server-interface-only.yaml, a Petstore sample atsamples/server/petstore/java-vertx-web-interface-only, and tests covering template selection, logging redaction, and file upload checks.
- New
-
Migration
- No breaking changes. Default behavior stays the same; enable with
-p interfaceOnly=true(oradditionalProperties.interfaceOnly: "true").
- No breaking changes. Default behavior stays the same; enable with