Skip to content

feature/new-http-functions-extension#71

Open
marioserrano09 wants to merge 8 commits into
mainfrom
feature/new-http-functions-extension
Open

feature/new-http-functions-extension#71
marioserrano09 wants to merge 8 commits into
mainfrom
feature/new-http-functions-extension

Conversation

@marioserrano09

Copy link
Copy Markdown
Contributor

No description provided.

marioserrano09 and others added 8 commits March 6, 2026 11:05
Complete the http-functions extension per its README: parameter validation,
version resolution, HTTP execution engine, static DynamiaFunctions facade,
and the /api/dynamia/fx/{functionName} controller with JSON/binary responses.

Also align module versions with the rest of the framework (26.6.0, was
pinned to a stale 26.2.3) so the module actually compiles.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…load

Distinguish a missing DynamiaHttpFunction (FunctionNotFoundException) from
one that exists but is not ACTIVE (new FunctionInactiveException), instead
of collapsing both into a single 404 cause.

Add a call(name, params, autoCreate) overload (and version variant) that
auto-registers a missing function as a DRAFT placeholder for later
configuration instead of failing outright. The version validator now only
requires url once the function is ACTIVE, so DRAFT placeholders can be
created without one.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
callAsync (and its version/autoCreate overloads) run the call on a Virtual
Thread via SchedulerUtil.runWithResult, returning a CompletableFuture so
callers can fire-and-forget or compose without blocking.

FunctionResult gains isJson()/toJson()/toJson(Class<T>) so consumers don't
have to deal with raw Map/String payloads directly.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Covers FunctionResult (isJson/toJson/toJson(Class)), the versioning
validator (mocking CrudService via a Containers-installed SimpleObjectContainer),
the service's call/callAsync flow (outbound HTTP mocked with
MockRestServiceServer bound to an injectable RestClient — no real network
access), and the controller's status/body mapping (service mocked with
Mockito).

DynamiaHttpFunctionsServiceImpl.restClient is now package-private-settable
so tests can bind it to a MockRestServiceServer instead of issuing real
requests.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…est action)

Add tools.dynamia.modules.functions.ui (ZK), following the same layout as
the other extensions' ui submodules:

- DynamiaHttpFunctionsModuleProvider contributes an "Http Functions" page
  group to the existing saas module instead of a new top-level module.
- View descriptors for DynamiaHttpFunction (form/table/crud) and
  DynamiaHttpFunctionParameter (form/table), with the parameter list
  rendered as a nested crudview inside the function form.
- TestHttpFunctionAction: a crud action to call a selected function with
  ad-hoc JSON parameters and inspect the FunctionResult without leaving
  the back office.

Also fixes the module wiring: http-functions/sources/pom.xml now declares
<modules>core/ui</modules> and the shared build/dependency config like
every other extension's parent pom, and the top-level extensions/pom.xml
no longer double-registers sources/core directly (which would have
duplicated it in the reactor once sources/pom.xml declares its own
modules).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Add a Getting Started walkthrough, document previously-undocumented
autoCreate/callAsync behavior, and trim the roadmap to what is
actually still pending.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.

1 participant