Closed
Description
In avaje-http
v1.36 the following endpoint definition:
@Get("myEndpoint")
public void myEndpoint(@BeanParam MyRecord myRecord) {
....
}
with the following record definition:
public record MyRecord(@QueryParam("myEnum") Set<MyEnum> myEnums) { }
generates the following code:
ApiBuilder.get("myEndpoint", ctx -> {
ctx.status(200);
var myRecord = new MyRecord(
set(qp -> (MyEnum) asEnum(MyEnum.class, qp), ctx.queryParams("myEnum")
);
...
});
but fails to import the MyEnum.class
, so the generated code is invalid resulting in an error at compile time.
Metadata
Metadata
Assignees
Labels
No labels