feat(templates): client-Java API examples for template-form (#6583) - #6618
Merged
Conversation
The .form artefact stays exactly as it is; only the two example services behind
it move from TypeScript to client Java - sdk.http.{Controller, Get, Post, Body},
sdk.utils.Uuid and sdk.log.Logging instead of console.log.
order.form's productOptions feed and its submit handler are repointed at the
controllers' new routes (/services/java/<project>/<package>/{Products,Orders}Service);
a controller is routed by its fully qualified class name, so the URLs must move
with the package.
Part of #6591.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
delchev
force-pushed
the
feat/templates-form-java
branch
from
August 8, 2026 06:16
e8c11c7 to
aaf0efb
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.
Closes #6583. Part of the umbrella #6591.
The
.formauthoring artefact stays exactly as it is — only the two example services behind it movefrom TypeScript to client Java:
form/products.ts.template→form/ProductsService.java.template—sdk.http.{Controller,Get},returning a
List<Product>record (serialized to JSON)form/orders.ts.template→form/OrdersService.java.template—sdk.http.{Controller,Post,Body},sdk.utils.Uuid.random(), andsdk.log.Logginginstead ofconsole.logshippingOptions.jsonis untouched.The URL contract matters here: a
@Controlleris routed by its fully qualified class name, sothe endpoints move with the package.
order.form'sproductOptionsfeed and its submit handler arerepointed to
/services/java/{{projectName}}/{{javaPackageName}}/{Products,Orders}Service— miss thisand the product dropdown silently loses its options.
Verification (scaffolded, published, called on a running instance)
GET /services/java/demoform/demoform/ProductsService→ the 10 productsPOST /services/java/demoform/demoform/OrdersService→{"orderId":"213759f8-…","status":"Accepted"}order.form's feed URL matches the controller route exactly.tsleft undercomponents/template/template-form; Problems view clean🤖 Generated with Claude Code