Add HTTP method shortcuts and output expression support in DSL#1458
Open
matheusandre1 wants to merge 1 commit into
Open
Add HTTP method shortcuts and output expression support in DSL#1458matheusandre1 wants to merge 1 commit into
matheusandre1 wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds fluent DSL extensions for HTTP call tasks (HTTP verb shortcuts, headers/content-type helpers, redirect flag, post-configuration via andThen, and outputAs) and introduces tests to validate the new behavior.
Changes:
- Added HTTP verb shortcut methods and convenience helpers (redirect, accept/content-type shortcuts) to the HTTP DSL.
- Added
andThen(...)support onCallHttpSpecto apply additional builder modifications. - Added
outputAs(String)convenience method onCallHttpTaskBuilderand comprehensive JUnit tests for the new DSL features.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| fluent/spec/src/test/java/io/serverlessworkflow/fluent/spec/dsl/CallHttpDslExtensionsTest.java | Adds unit tests covering new HTTP DSL shortcuts, chaining with andThen, and outputAs. |
| fluent/spec/src/main/java/io/serverlessworkflow/fluent/spec/dsl/CallHttpSpec.java | Implements andThen(...) by storing additional steps to apply to the builder. |
| fluent/spec/src/main/java/io/serverlessworkflow/fluent/spec/dsl/BaseCallHttpSpec.java | Adds HTTP verb shortcuts and convenience methods for redirect and common headers. |
| fluent/spec/src/main/java/io/serverlessworkflow/fluent/spec/CallHttpTaskBuilder.java | Adds a convenience outputAs(String) method with Javadoc. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+125
to
+148
| default SELF PUT() { | ||
| steps().add(c -> c.method("PUT")); | ||
| return self(); | ||
| } | ||
|
|
||
| default SELF DELETE() { | ||
| steps().add(c -> c.method("DELETE")); | ||
| return self(); | ||
| } | ||
|
|
||
| default SELF PATCH() { | ||
| steps().add(c -> c.method("PATCH")); | ||
| return self(); | ||
| } | ||
|
|
||
| default SELF HEAD() { | ||
| steps().add(c -> c.method("HEAD")); | ||
| return self(); | ||
| } | ||
|
|
||
| default SELF OPTIONS() { | ||
| steps().add(c -> c.method("OPTIONS")); | ||
| return self(); | ||
| } |
Contributor
Author
There was a problem hiding this comment.
The default style for this class is uppercase.
Signed-off-by: Matheus André <matheusandr2@gmail.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.
Many thanks for submitting your Pull Request ❤️!
What this PR does / why we need it:
Closes: #1435
Special notes for reviewers:
Additional information (if needed):