Extend Map returns to supports more types than basic and json (enums, etc...)
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 48/100
Research direction
Start at io.vertx.codegen.ProxyModel.isLegalListSetMapResult and reproduce the MyProxyService example from the issue. Compare its behavior with the permitted-types documentation; the work is done when the Map<String, MyEnum> proxy method is handled consistently with the documented supported types.
Written by the indexing model from the issue text.
Description
The following proxy interface doesn't compile:
package com.melusyn.gatekeeper.service;
import io.vertx.codegen.annotations.ProxyGen;
import io.vertx.codegen.annotations.VertxGen;
import io.vertx.core.AsyncResult;
import io.vertx.core.Handler;
import java.util.Map;
/**
* The service interface.
*/
@ProxyGen
@VertxGen // Generate the proxy and handler
public interface MyProxyService {
enum MyEnum {
Value1,
Value2,
Value3,
}
void callThatReturnsAMap(String param1, Handler<AsyncResult<Map<String, MyEnum>>> handler);
}
The compilation fails with the error:
type <io.vertx.core.AsyncResult<java.util.Map<java.lang.String,MyEnum>>> is not legal for use for a parameter in proxy
However, the documentation says otherwise (https://github.com/vert-x3/vertx-codegen#permitted-types).
The following set R of types are permitted as return types from any API method:
[...]
type java.util.List, java.util.Set or java.util.Map<String, C> where C contains
[...]
The method io.vertx.codegen.ProxyModel.isLegalListSetMapResult does not check for Map type.
Has this been overlooked or this is on purpose? I found an old issue #8 referring to it... But not much was said at that time.
I'm willing to do a PR if the core team feel this is missing and should been implemented.
- 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