feature/new-http-functions-extension#71
Open
marioserrano09 wants to merge 8 commits into
Open
Conversation
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>
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.
No description provided.