Swagger: How to handle a response containing a java 'object' class -


i trying understand how specify in "swagger" response object of class "viewobject.java" contains object of class "object" in example below contains instance of "app.java". in below code when specify @apioperation "response = viewobject.class" cannot figure out in viewobject "result" field contains instance of "app".


@get @path("/app/{appcode}") @produces("application/json") @apioperation(value = "get app configuration", response = viewobject.class) public @responsebody  viewobject getapp(@pathparam("appcode") string appcode) throws freemoexception,exception {     app app = new app();     app.setappcode(appcode);     viewobject viewobject = new viewobject();     app apploadedfromdb  = appservice.getapp(app.getappcode()); //load app db      viewobject.setstatus(freemostatus.success);     viewobject.setresult(apploadedfromdb);     return viewobject; } 

viewobject.java:     public class viewobject  extends freemomodel{         private freemostatus status;         private string message;         private object result;     } 


Comments

Popular posts from this blog

php - Admin SDK -- get information about the group -

dns - How To Use Custom Nameserver On Free Cloudflare? -

Python Error - TypeError: input expected at most 1 arguments, got 3 -