I am using spring server stub from swagger yaml to generate POJO classes. In my definition, I am having allOf keyword for image property of the Images model. But, the stub generated does not have the correct class reference. It is generating with Object class instead of the type Image class. What is the mistake I am doing here? This is my swagger yaml.
Images:
title: images
type: object
description: A collection of still images related to the work
properties:
images:
type: object
#items:
allOf:
- $ref: '#/components/schemas/Image'
videos:
type: array
items:
$ref: '#/components/schemas/Video'
This is the generated POJO class of Images
public class Images {
@JsonProperty("images")
private Object images = null;
@JsonProperty("videos")
@Valid
private List<Video> videos = null;
public Images images(Object images) {
this.images = images;
return this;
}
}
Why is the type Object and not of Image?