Skip to content

Modifications#1321

Closed
fjtirado wants to merge 3 commits intoserverlessworkflow:mainfrom
fjtirado:modifications
Closed

Modifications#1321
fjtirado wants to merge 3 commits intoserverlessworkflow:mainfrom
fjtirado:modifications

Conversation

@fjtirado
Copy link
Copy Markdown
Collaborator

Many thanks for submitting your Pull Request ❤️!

What this PR does / why we need it:

Special notes for reviewers:

Additional information (if needed):

- Enhanced CallOpenAPITaskFluent.document(String) to automatically detect whether the input is a literal URI or a JQ runtime expression
- Added EndpointUtil.isJqExpr() helper method to identify JQ expressions (strings starting with "${" )
- Added comprehensive test coverage with FuncOpenAPITest using MockWebServer
- Added serverlessworkflow-impl-openapi dependency to experimental/test module
- Updated .gitignore to exclude Bob-Shell notes directory

The document() method now intelligently handles both:
  - Literal URI strings (e.g., "http://example.com/swagger.json")
  - JQ runtime expressions (e.g., "${.openapi.url}")

This improves the developer experience by eliminating the need to choose between document(String) and document(URI) methods based on the input type.

Closes serverlessworkflow#1303

Signed-off-by: Matheus Cruz <matheuscruz.dev@gmail.com>
Signed-off-by: Matheus Cruz <matheuscruz.dev@gmail.com>
Copilot AI review requested due to automatic review settings April 16, 2026 13:59
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates how fluent builders represent HTTP/OpenAPI endpoints (especially when authentication is present) by moving endpoint expressions/URIs into EndpointConfiguration.uri (EndpointUri) and aligning tests accordingly. It also adds an experimental functional test for OpenAPI execution and updates test dependencies.

Changes:

  • Refactor endpoint construction to populate EndpointConfiguration.uri (literal vs expression) when auth is configured.
  • Update multiple DSL/unit tests to assert against EndpointConfiguration.uri.*EndpointURI instead of Endpoint.runtimeExpression / Endpoint.uriTemplate in auth-related cases.
  • Add an experimental OpenAPI functional test using MockWebServer and wire required test dependencies.

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
fluent/spec/src/test/java/io/serverlessworkflow/fluent/spec/dsl/CallOpenApiDslTest.java Update assertion to validate document endpoint expression via EndpointConfiguration.uri.
fluent/spec/src/test/java/io/serverlessworkflow/fluent/spec/dsl/CallHttpAuthDslTest.java Update endpoint-expression assertions to validate ExpressionEndpointURI under auth.
fluent/spec/src/main/java/io/serverlessworkflow/fluent/spec/spi/EndpointUtil.java Extend endpoint parsing to build EndpointConfiguration + EndpointUri when auth is provided.
fluent/spec/src/main/java/io/serverlessworkflow/fluent/spec/spi/CallOpenAPITaskFluent.java Use EndpointUtil for document endpoints (string overloads) and avoid rebuilding auth twice.
fluent/spec/src/main/java/io/serverlessworkflow/fluent/spec/spi/CallHttpTaskFluent.java Route auth-enabled string endpoints through EndpointUtil.fromString(expr, auth).
experimental/test/src/test/java/io/serverlessworkflow/fluent/test/FuncOpenAPITest.java New functional test exercising OpenAPI document loading + operation invocation.
experimental/test/pom.xml Add test dependency on serverlessworkflow-impl-openapi (and mark impl-jq as test scope).
experimental/fluent/func/src/test/java/io/serverlessworkflow/fluent/func/FuncDSLTest.java Update auth-related endpoint assertions to validate EndpointConfiguration.uri.literalEndpointURI.
.gitignore Normalize .vscode/ entry and ignore .bob/notes/.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread fluent/spec/src/main/java/io/serverlessworkflow/fluent/spec/spi/EndpointUtil.java Outdated
Signed-off-by: fjtirado <ftirados@redhat.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.

3 participants