-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Server stub in spring from swagger yaml #9996
Milestone
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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;
}
.............................................................................................................................
Why is the type Object and not of Image?
The text was updated successfully, but these errors were encountered: