Abstract data object support in params
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Start by tracing the code generator's handling of @DataObject parameters and how it reconstructs JsonObject values. Compare the proposed static AuthOptions.fromJson(JsonObject) entry point with current generated parameter handling. Done means abstract data-object parameters can be reconstructed from JSON for service proxies or configuration, with coverage for the AuthOptions example.
Written by the indexing model from the issue text.
Description
Data object params needs to be a plain class because it needs to be reconstructed from Json format (for example in JavaScript or Groovy). This is now not possible because the code generator will not know which data object to create.
We could work around this by having a static method fromJson returning an instance of that object that would be invoked by the generator, delegating the responsibility of creating the right instance to this method. This method could either use some hard coded mechanism or something else.
For example:
@DataObject
public abstract class AuthOptions {
public static AuthOptions fromJson(JsonObject object) {
...
}
}
This would allow for example the use of a common data object in service proxies or configuration.
- Dominant language
- Java
- Stars
- 111
- Forks
- 88
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from eclipse-vertx/vertx-codegen
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 15/100
eclipse-vertx/vertx-codegen#361 ·
-
help wanted
Difficulty 4/5 3-5 days Newbie friendliness 35/100
eclipse-vertx/vertx-codegen#340 · 11 comments · 2 reactions ·
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 25/100
eclipse-vertx/vertx-codegen#335 ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 25/100
eclipse-vertx/vertx-codegen#320 · 4 comments ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 45/100
eclipse-vertx/vertx-codegen#319 · 1 comment · 1 reaction ·
All issues in eclipse-vertx/vertx-codegen
Similar issues
-
area-deployment area-integrations triage:bot-seen
Difficulty 2/5 Half a day Newbie friendliness 86/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
apache/flink-agents#1156 ·
-
[source-shopify] FAILED bulk operation without partialDataUrl is silently treated as successful Openarea/connectors autoteam community connectors/source/shopify needs-triage team/use type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100