I need to generate object from *.yaml definitions file. My end goal is generated POJO like in example below:
public class MyGeneratedPojo {
private List<Map<String, MyInternalObject>> internalProperties;
}
I know that I could use additionalProperties in order to model the map. Or I could do something like this:
MyGeneratedPojo:
properties:
type: array
items:
$ref: '#/.../MyInternalMapDefinition'
MyInternalMapDefinition:
type: object
additionalProperties:
type: array
items:
$ref: '#/.../MyInternalMapDefinition'
What I don't like is this "MyInternalMapDefinition" definition. Is there anyway to define/model it as part of "MyGeneratedPojo"