Skip to content

feat(templates): client-Java API examples for template-form (#6583) - #6618

Merged
delchev merged 1 commit into
masterfrom
feat/templates-form-java
Aug 8, 2026
Merged

feat(templates): client-Java API examples for template-form (#6583)#6618
delchev merged 1 commit into
masterfrom
feat/templates-form-java

Conversation

@delchev

@delchev delchev commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Closes #6583. Part of the umbrella #6591.

The .form authoring artefact stays exactly as it is — only the two example services behind it move
from TypeScript to client Java:

  • form/products.ts.templateform/ProductsService.java.templatesdk.http.{Controller,Get},
    returning a List<Product> record (serialized to JSON)
  • form/orders.ts.templateform/OrdersService.java.templatesdk.http.{Controller,Post,Body},
    sdk.utils.Uuid.random(), and sdk.log.Logging instead of console.log

shippingOptions.json is untouched.

The URL contract matters here: a @Controller is routed by its fully qualified class name, so
the endpoints move with the package. order.form's productOptions feed and its submit handler are
repointed to /services/java/{{projectName}}/{{javaPackageName}}/{Products,Orders}Service — miss this
and the product dropdown silently loses its options.

Verification (scaffolded, published, called on a running instance)

  • GET /services/java/demoform/demoform/ProductsService → the 10 products
  • POST /services/java/demoform/demoform/OrdersService{"orderId":"213759f8-…","status":"Accepted"}
  • the generated order.form's feed URL matches the controller route exactly
  • no .ts left under components/template/template-form; Problems view clean

🤖 Generated with Claude Code

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
delchev force-pushed the feat/templates-form-java branch from e8c11c7 to aaf0efb Compare August 8, 2026 06:16
@delchev
delchev merged commit 77e108f into master Aug 8, 2026
10 checks passed
@delchev
delchev deleted the feat/templates-form-java branch August 8, 2026 06:20
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.

templates: template-form - client-Java API examples instead of TypeScript

1 participant