Last active
September 30, 2015 18:03
-
-
Save ptwohig/407080950fb0f7cb9462 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Foo { | |
private String bar; | |
} | |
class Container<ContainedT> { | |
private List<Contained>T objects; | |
} | |
public class Resource { | |
// This case Swagger shows the return model as something like this | |
// [ | |
// { "bar" : "string" } | |
// ] | |
@ApiOperation | |
List<Foo> getListOfFoo() {return theList;} | |
// This case Swagger shows the return model as something like this | |
// { | |
// "objects" : [ ... ] | |
// } | |
// WHen I actually want it to show something like... | |
// { | |
// "objects" : [ { "bar" : "string" } ] | |
// } | |
@ApiOperation | |
Container<Foo> getContainerOfFoo() {return theContainer;} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment