title: How to specify json response for swagger's @ApiOperation in my Play/Scala project
body: <p>I am using swagger for documenting my Play-Scala application. </p>
  
  <p>My controller is as below:</p>
  
  <pre><code>@Api(value = "/people")
  class PersonController {
    import JsonFormats._
  
    @ApiOperation(response = ?????, responseContainer = "Array", httpMethod = "GET")
    def showPeople(...) = Action {
      // Code here..to get persons of type List[Person]
  
      val json: JsObject = Json.obj("people" -&gt; persons)
      Ok(json)
    }
  }
  </code></pre>
  
  <p>My JsonFormats.scala is as below:</p>
  
  <pre><code>object JsonFormats {
    implicit val personFormat = new Format[Person] {
      def writes(person: Person): JsValue = {
        Json.obj(
          "fName" -&gt; person.name.fName,
          "lName" -&gt; person.name.lName,
          "age" -&gt; person.age)
  
    }
  }
  </code></pre>
  
  <p>My model classes are as below</p>
  
  <pre><code>case class Person(name: Name, age: String) {
    gender: String
  }
  
  case class Name {
    fName: String,
    lName: String,
  }
  </code></pre>
  
  <p><strong>Question</strong>: What to specify at @ApiOperation's response param in my controller, so it displays the json response structure as expected format (as below), in swagger-ui.</p>
  
  <pre><code>{ 
      "people":[
                  {
                      "fName":"",
                      "lName":"",
                      "age":""
                  }
                ]
  }
  </code></pre>