Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Extend Map returns to supports more types than basic and json (enums, etc...)

Open
#90 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
48/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Stale
Tech stack
java
Domain
tooling

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

enhancement

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from eclipse-vertx/vertx-codegen

All issues in eclipse-vertx/vertx-codegen

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.