FreiheitPT
6 years agoNew Member
Nested models - Java
Hi everyone.
I scanned my class with ApiListingResource and SwaggerSerializers.
I used that method with beanConfig when using an application.
I'm manually defining some models and I would like to do something like this:
"definitions" : { "User" : { "type" : "object", "properties" : { "name" : { "type" : "object",
"properties" : {
"givenName" : {
"type" : "string"
},
"familyName" : {
"type" : "string"
} }
}
.....
I could achieve the same with references and just more definitions, but I would like, in this case, not to use another definition for the "name" property.
How can I achieve that in Java? (I'm building this using the afterScan method)
I'm using properties, modelImpl, swagger.addDefinition, and so on.
Thanks!