Hello.
There is Java DTO (it comes from 3rd part library, I cant modify it directly):
public class Test implements Iterable<String> {
@JsonProperty("items")
public List<String> items;
@JsonProperty("batch_error")
public final int batchError;
public Test(
@JsonProperty("items")
List<String> items,
@JsonProperty("batch_error")
int batchError
) {
this.items = items != null ? items : Collections.emptyList();
this.batchError = batchError;
}//new
@Override
public Iterator<String> iterator() {
return len(items) > 0
? items.iterator()
: Collections.emptyListIterator();
}
}
And this is TS generated type for endpoint method:
Promise<Array<string | undefined>>
As you can see, TS version is just an array, field “batch_error” is lost.
Is it possible to solve it? Vaadin Hilla 24