Extend Map returns to supports more types than basic and json (enums, etc...)
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 48/100
Hướng nghiên cứu
Bắt đầu tại io.vertx.codegen.ProxyModel.isLegalListSetMapResult và tái hiện ví dụ MyProxyService từ issue. So sánh hành vi của nó với tài liệu về các kiểu được cho phép; công việc hoàn tất khi phương thức proxy Map<String, MyEnum> được xử lý nhất quán với các kiểu được hỗ trợ đã được tài liệu hóa.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Java
- Star
- 111
- Fork
- 88
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của eclipse-vertx/vertx-codegen
-
Protobuf enum supportĐang mởenhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
eclipse-vertx/vertx-codegen#361 ·
-
help wanted
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
eclipse-vertx/vertx-codegen#340 · 11 bình luận · 2 reaction ·
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
eclipse-vertx/vertx-codegen#335 ·
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
eclipse-vertx/vertx-codegen#320 · 4 bình luận ·
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
eclipse-vertx/vertx-codegen#319 · 1 bình luận · 1 reaction ·
Tất cả issue của eclipse-vertx/vertx-codegen
Issue tương tự
-
P2 testing
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area/core kind/bug status/triage team/core-shared
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
checkstyle/checkstyle#21755 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
spring-projects/spring-integration#11495 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày