You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's hard to know beforehand what will be the exact Java class name that is created by SchemaMapper.generate(...) so it would be very convenient if the JType created by:
ruleFactory.getSchemaRule().apply(className, schemaNode, jpackage, new Schema(null, schemaNode));
could be returned.
The text was updated successfully, but these errors were encountered:
A schema can ultimately cause many types to be generated. Would you be happy to just get the top-most type then traverse the available fields to find out about other types? It might be nicer if we return something like Set<JType>.
One way that I think you could work around this right now is by using a stateful custom annotator that simply stores the JDefinedClass every time a call to say propertyOrder(JDefinedClass,JsonNode) is made. The annotator could build a Set<JType> value and you could grab this after the call to generate has completed.
In my particular case - a generator for RAML http://raml.org/ - the top most class would be enough, but I understand that it's not generic enough, since many types can be created. The problem with a set is that it won't be possible to easily find out the top-most one, unless it's a sorted set and the order is based on the depth of the generated type.
It's hard to know beforehand what will be the exact Java class name that is created by
SchemaMapper.generate(...)
so it would be very convenient if theJType
created by:could be returned.
The text was updated successfully, but these errors were encountered: