Replies: 1 comment
-
|
Hi @hhuber1, Sure, a dynamic lookup of subtypes is possible, and I tried to illustrate that in the SubtypeLookUpExample as well. I reckon your issue is merely in this part of your SubtypeResolver: return queryOperators.stream()
.map(c -> typeContext.resolveSubtype(declaredType, c))
.toList();Is it possible that the annotation you're looking for here is on another type besides the Set<Class<?>> queryOperators = reflections.getTypesAnnotatedWith(QueryOperator.class);That could lead to |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I am quite new in using Victools, and I have a problem which shows in an error message like
Here is what I try to do:
I have an interface
ILogicOperatorwhich is implemented by many classes, e.g. the
HasOperator:Please note, that the
HasOperatorreferences anotherILogigOperatorin itsconstraintproperty.Because other projects that use our framework are allowed to extend the system by implementing their own operators, I cannot annotate
ILogicOperatorstaticly with@JsonSubtypes.Therefore, in the schema generator I try to resolve the subtype structure dynamically:
The Problem also arises if I try to resolve the hierarchy of th
HasOperatoronly, likeMy suspicion is that the problem is something to do with the self referencing classes that I pointed out above.
Is there a way to achieve a dynamic subtype resolution in my case?
Beta Was this translation helpful? Give feedback.
All reactions