forked from loafle/openapi-generator-original
moved to client subdirectory
This commit is contained in:
parent
ad5d44769b
commit
1077e48e7e
@ -25,7 +25,7 @@ object ScalaPetstoreCodegen extends BasicScalaGenerator {
|
|||||||
override def invokerPackage = Some("com.wordnik.client")
|
override def invokerPackage = Some("com.wordnik.client")
|
||||||
|
|
||||||
// where to write generated code
|
// where to write generated code
|
||||||
override def destinationDir = "samples/petstore/scala/src/main/scala"
|
override def destinationDir = "samples/client/petstore/scala/src/main/scala"
|
||||||
|
|
||||||
// package for models
|
// package for models
|
||||||
override def modelPackage = Some("com.wordnik.petstore.model")
|
override def modelPackage = Some("com.wordnik.petstore.model")
|
||||||
@ -35,7 +35,7 @@ object ScalaPetstoreCodegen extends BasicScalaGenerator {
|
|||||||
|
|
||||||
// supporting classes
|
// supporting classes
|
||||||
override def supportingFiles = List(
|
override def supportingFiles = List(
|
||||||
("apiInvoker.mustache", "samples/petstore/scala/src/main/scala/com/wordnik/client", "ApiInvoker.scala"),
|
("apiInvoker.mustache", "samples/client/petstore/scala/src/main/scala/com/wordnik/client", "ApiInvoker.scala"),
|
||||||
("pom.mustache", "samples/petstore/scala", "pom.xml")
|
("pom.mustache", "samples/client/petstore/scala", "pom.xml")
|
||||||
)
|
)
|
||||||
}
|
}
|
@ -1,6 +1,5 @@
|
|||||||
package com.wordnik.client
|
package com.wordnik.client
|
||||||
|
|
||||||
import com.wordnik.swagger.core.util.JsonUtil
|
|
||||||
import com.sun.jersey.api.client.Client
|
import com.sun.jersey.api.client.Client
|
||||||
import com.sun.jersey.api.client.ClientResponse
|
import com.sun.jersey.api.client.ClientResponse
|
||||||
import com.sun.jersey.api.client.config.ClientConfig
|
import com.sun.jersey.api.client.config.ClientConfig
|
||||||
@ -13,7 +12,27 @@ import javax.ws.rs.core.MediaType
|
|||||||
import scala.collection.JavaConverters._
|
import scala.collection.JavaConverters._
|
||||||
import scala.collection.mutable.HashMap
|
import scala.collection.mutable.HashMap
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.module.scala.DefaultScalaModule
|
||||||
|
import com.fasterxml.jackson.core.JsonGenerator.Feature
|
||||||
|
import com.fasterxml.jackson.databind._
|
||||||
|
import com.fasterxml.jackson.annotation._
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize
|
||||||
|
|
||||||
|
object ScalaJsonUtil {
|
||||||
|
def getJsonMapper = {
|
||||||
|
val mapper = new ObjectMapper()
|
||||||
|
mapper.registerModule(new DefaultScalaModule())
|
||||||
|
mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
|
||||||
|
mapper.setSerializationInclusion(JsonInclude.Include.NON_DEFAULT)
|
||||||
|
mapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false)
|
||||||
|
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
|
||||||
|
mapper.setSerializationInclusion(JsonInclude.Include.NON_EMPTY)
|
||||||
|
mapper
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
object ApiInvoker {
|
object ApiInvoker {
|
||||||
|
val mapper = ScalaJsonUtil.getJsonMapper
|
||||||
val defaultHeaders: HashMap[String, String] = HashMap()
|
val defaultHeaders: HashMap[String, String] = HashMap()
|
||||||
val hostMap: HashMap[String, Client] = HashMap()
|
val hostMap: HashMap[String, Client] = HashMap()
|
||||||
|
|
||||||
@ -33,14 +52,14 @@ object ApiInvoker {
|
|||||||
} else {
|
} else {
|
||||||
containerType match {
|
containerType match {
|
||||||
case "List" => {
|
case "List" => {
|
||||||
val typeInfo = JsonUtil.getJsonMapper.getTypeFactory().constructCollectionType(classOf[java.util.List[_]], cls)
|
val typeInfo = mapper.getTypeFactory().constructCollectionType(classOf[java.util.List[_]], cls)
|
||||||
val response = JsonUtil.getJsonMapper.readValue(json, typeInfo).asInstanceOf[java.util.List[_]]
|
val response = mapper.readValue(json, typeInfo).asInstanceOf[java.util.List[_]]
|
||||||
response.asScala.toList
|
response.asScala.toList
|
||||||
}
|
}
|
||||||
case _ => {
|
case _ => {
|
||||||
json match {
|
json match {
|
||||||
case e: String if ("\"\"" == e) => null
|
case e: String if ("\"\"" == e) => null
|
||||||
case _ => JsonUtil.getJsonMapper.readValue(json, cls)
|
case _ => mapper.readValue(json, cls)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -50,8 +69,8 @@ object ApiInvoker {
|
|||||||
def serialize(obj: AnyRef): String = {
|
def serialize(obj: AnyRef): String = {
|
||||||
if (obj != null) {
|
if (obj != null) {
|
||||||
obj match {
|
obj match {
|
||||||
case e: List[_] => JsonUtil.getJsonMapper.writeValueAsString(obj.asInstanceOf[List[_]].asJava)
|
case e: List[_] => mapper.writeValueAsString(obj.asInstanceOf[List[_]].asJava)
|
||||||
case _ => JsonUtil.getJsonMapper.writeValueAsString(obj)
|
case _ => mapper.writeValueAsString(obj)
|
||||||
}
|
}
|
||||||
} else null
|
} else null
|
||||||
}
|
}
|
||||||
@ -115,3 +134,4 @@ class ApiException extends Exception {
|
|||||||
this()
|
this()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -0,0 +1,6 @@
|
|||||||
|
package com.wordnik.petstore.model
|
||||||
|
|
||||||
|
case class Category (
|
||||||
|
id: Long,
|
||||||
|
name: String)
|
||||||
|
|
@ -0,0 +1,11 @@
|
|||||||
|
package com.wordnik.petstore.model
|
||||||
|
|
||||||
|
import java.util.Date
|
||||||
|
case class Order (
|
||||||
|
id: Long,
|
||||||
|
petId: Long,
|
||||||
|
/* Order Status */
|
||||||
|
status: String,
|
||||||
|
quantity: Int,
|
||||||
|
shipDate: Date)
|
||||||
|
|
@ -0,0 +1,13 @@
|
|||||||
|
package com.wordnik.petstore.model
|
||||||
|
|
||||||
|
import com.wordnik.petstore.model.Category
|
||||||
|
import com.wordnik.petstore.model.Tag
|
||||||
|
case class Pet (
|
||||||
|
id: Long,
|
||||||
|
tags: List[Tag],
|
||||||
|
category: Category,
|
||||||
|
/* pet status in the store */
|
||||||
|
status: String,
|
||||||
|
name: String,
|
||||||
|
photoUrls: List[String])
|
||||||
|
|
@ -0,0 +1,6 @@
|
|||||||
|
package com.wordnik.petstore.model
|
||||||
|
|
||||||
|
case class Tag (
|
||||||
|
id: Long,
|
||||||
|
name: String)
|
||||||
|
|
@ -0,0 +1,13 @@
|
|||||||
|
package com.wordnik.petstore.model
|
||||||
|
|
||||||
|
case class User (
|
||||||
|
id: Long,
|
||||||
|
lastName: String,
|
||||||
|
username: String,
|
||||||
|
phone: String,
|
||||||
|
email: String,
|
||||||
|
/* User Status */
|
||||||
|
userStatus: Int,
|
||||||
|
firstName: String,
|
||||||
|
password: String)
|
||||||
|
|
@ -7,7 +7,7 @@ import org.scalatest.FlatSpec
|
|||||||
import org.scalatest.matchers.ShouldMatchers
|
import org.scalatest.matchers.ShouldMatchers
|
||||||
|
|
||||||
import scala.collection.mutable.{ ListBuffer, HashMap }
|
import scala.collection.mutable.{ ListBuffer, HashMap }
|
||||||
import scala.collection.JavaConversions._
|
import scala.collection.JavaConverters._
|
||||||
import scala.reflect.BeanProperty
|
import scala.reflect.BeanProperty
|
||||||
|
|
||||||
@RunWith(classOf[JUnitRunner])
|
@RunWith(classOf[JUnitRunner])
|
||||||
@ -26,22 +26,13 @@ class PetApiTest extends FlatSpec with ShouldMatchers {
|
|||||||
}
|
}
|
||||||
|
|
||||||
it should "add a new pet" in {
|
it should "add a new pet" in {
|
||||||
val pet = new Pet
|
val pet = Pet(
|
||||||
pet.id = 1000
|
1000,
|
||||||
|
(for (i <- (1 to 5)) yield Tag(i, "tag-" + i)).toList,
|
||||||
pet.tags = (for (i <- (1 to 5)) yield {
|
Category(1, "sold"),
|
||||||
val tag = new Tag
|
"lost",
|
||||||
tag.id = i; tag.name = "tag-" + i; tag
|
"dragon",
|
||||||
}).toList
|
(for (i <- (1 to 10)) yield "http://foo.com/photo/" + i).toList)
|
||||||
pet.status = "lost"
|
|
||||||
pet.category = {
|
|
||||||
val category = new Category; category.id = 1; category.name = "sold"
|
|
||||||
category
|
|
||||||
}
|
|
||||||
pet.name = "dragon"
|
|
||||||
pet.photoUrls = (for (i <- (1 to 10)) yield {
|
|
||||||
"http://foo.com/photo/" + i
|
|
||||||
}).toList
|
|
||||||
|
|
||||||
api.addPet(pet)
|
api.addPet(pet)
|
||||||
api.getPetById("1000") match {
|
api.getPetById("1000") match {
|
||||||
@ -59,11 +50,14 @@ class PetApiTest extends FlatSpec with ShouldMatchers {
|
|||||||
}
|
}
|
||||||
|
|
||||||
it should "update a pet" in {
|
it should "update a pet" in {
|
||||||
val pet = new Pet
|
val pet = Pet(
|
||||||
pet.id = 1000
|
1000,
|
||||||
|
(for (i <- (1 to 5)) yield Tag(i, "tag-" + i)).toList,
|
||||||
|
Category(1, "sold"),
|
||||||
|
"confused",
|
||||||
|
"programmer",
|
||||||
|
(for (i <- (1 to 10)) yield "http://foo.com/photo/" + i).toList)
|
||||||
|
|
||||||
pet.name = "programmer"
|
|
||||||
pet.status = "confused"
|
|
||||||
api.addPet(pet)
|
api.addPet(pet)
|
||||||
|
|
||||||
api.getPetById("1000") match {
|
api.getPetById("1000") match {
|
||||||
@ -73,8 +67,8 @@ class PetApiTest extends FlatSpec with ShouldMatchers {
|
|||||||
}
|
}
|
||||||
case None => fail("didn't find pet created")
|
case None => fail("didn't find pet created")
|
||||||
}
|
}
|
||||||
pet.status = "fulfilled"
|
val updatedPet = pet.copy(status="fulfilled")
|
||||||
api.updatePet(pet)
|
api.updatePet(updatedPet)
|
||||||
api.getPetById("1000") match {
|
api.getPetById("1000") match {
|
||||||
case Some(pet) => {
|
case Some(pet) => {
|
||||||
pet.name should be("programmer")
|
pet.name should be("programmer")
|
||||||
@ -97,14 +91,13 @@ class PetApiTest extends FlatSpec with ShouldMatchers {
|
|||||||
println("finding by tags")
|
println("finding by tags")
|
||||||
api.findPetsByTags("tag1,tag2") match {
|
api.findPetsByTags("tag1,tag2") match {
|
||||||
case Some(pets) => {
|
case Some(pets) => {
|
||||||
/* pets.foreach(pet => {
|
pets.foreach(pet => {
|
||||||
val tags = (for (tag <- pet.tags) yield tag.name).toSet
|
val tags = (for (tag <- pet.tags) yield tag.name).toSet
|
||||||
println("checking tags " + tags)
|
if ((tags & Set("tag1", "tag2")).size == 0)
|
||||||
if ((tags & Set("tag1", "tag2")).size == 0) fail("unexpected tags in " + tags)
|
fail("unexpected tags in " + tags)
|
||||||
})
|
})
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
case None => //fail("didn't find pets by tag")
|
case None => fail("didn't find pets by tag")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -32,11 +32,12 @@ class StoreApiTest extends FlatSpec with ShouldMatchers {
|
|||||||
|
|
||||||
it should "place an order" in {
|
it should "place an order" in {
|
||||||
val now = new java.util.Date
|
val now = new java.util.Date
|
||||||
val order = new Order
|
val order = Order (
|
||||||
order.id = 1000
|
1000,
|
||||||
order.petId = 10
|
10,
|
||||||
order.quantity = 101
|
"pending",
|
||||||
order.shipDate = now
|
101,
|
||||||
|
now)
|
||||||
|
|
||||||
api.placeOrder(order)
|
api.placeOrder(order)
|
||||||
|
|
||||||
@ -53,11 +54,12 @@ class StoreApiTest extends FlatSpec with ShouldMatchers {
|
|||||||
|
|
||||||
it should "delete an order" in {
|
it should "delete an order" in {
|
||||||
val now = new java.util.Date
|
val now = new java.util.Date
|
||||||
val order = new Order
|
val order = Order(
|
||||||
order.id = 1001
|
1001,
|
||||||
order.petId = 10
|
10,
|
||||||
order.quantity = 101
|
"pending",
|
||||||
order.shipDate = now
|
101,
|
||||||
|
now)
|
||||||
|
|
||||||
api.placeOrder(order)
|
api.placeOrder(order)
|
||||||
|
|
@ -47,15 +47,15 @@ class UserApiTest extends FlatSpec with ShouldMatchers {
|
|||||||
}
|
}
|
||||||
|
|
||||||
it should "create a user" in {
|
it should "create a user" in {
|
||||||
val user = new User
|
val user = User(
|
||||||
user.id = 1002
|
1002,
|
||||||
user.username = "johnny"
|
"Rocket",
|
||||||
user.password = "XXXXXXXXXXX"
|
"johnny",
|
||||||
user.email = "johnny@fail.com"
|
"408-867-5309",
|
||||||
user.firstName = "Johnny"
|
"johnny@fail.com",
|
||||||
user.lastName = "Rocket"
|
1,
|
||||||
user.phone = "408-867-5309"
|
"Johnny",
|
||||||
user.userStatus = 1
|
"XXXXXXXXXXX")
|
||||||
|
|
||||||
api.createUser(user)
|
api.createUser(user)
|
||||||
|
|
||||||
@ -70,16 +70,15 @@ class UserApiTest extends FlatSpec with ShouldMatchers {
|
|||||||
|
|
||||||
it should "create 2 users" in {
|
it should "create 2 users" in {
|
||||||
val userArray = (for (i <- (1 to 2)) yield {
|
val userArray = (for (i <- (1 to 2)) yield {
|
||||||
val user = new User
|
User(
|
||||||
user.id = 2000 + i
|
2000 + i,
|
||||||
user.username = "johnny-" + i
|
"Rocket-" + i,
|
||||||
user.password = "XXXXXXXXXXX"
|
"johnny-" + i,
|
||||||
user.email = "johnny-" + i + "@fail.com"
|
"408-867-5309",
|
||||||
user.firstName = "Johnny"
|
"johnny-" + i + "@fail.com",
|
||||||
user.lastName = "Rocket-" + i
|
1,
|
||||||
user.phone = "408-867-5309"
|
"Johnny",
|
||||||
user.userStatus = 1
|
"XXXXXXXXXXX")
|
||||||
user
|
|
||||||
}).toArray
|
}).toArray
|
||||||
api.createUsersWithArrayInput(userArray)
|
api.createUsersWithArrayInput(userArray)
|
||||||
|
|
||||||
@ -96,16 +95,15 @@ class UserApiTest extends FlatSpec with ShouldMatchers {
|
|||||||
|
|
||||||
it should "create 3 users" in {
|
it should "create 3 users" in {
|
||||||
val userList = (for (i <- (1 to 3)) yield {
|
val userList = (for (i <- (1 to 3)) yield {
|
||||||
val user = new User
|
User(
|
||||||
user.id = 3000 + i
|
3000 + i,
|
||||||
user.username = "fred-" + i
|
"Rocket-" + i,
|
||||||
user.password = "XXXXXXXXXXX"
|
"fred-" + i,
|
||||||
user.email = "fred-" + i + "@fail.com"
|
"408-867-5309",
|
||||||
user.firstName = "Johnny"
|
"fred-" + i + "@fail.com",
|
||||||
user.lastName = "Rocket-" + i
|
1,
|
||||||
user.phone = "408-867-5309"
|
"Johnny",
|
||||||
user.userStatus = 1
|
"XXXXXXXXXXX")
|
||||||
user
|
|
||||||
}).toList
|
}).toList
|
||||||
api.createUsersWithListInput(userList)
|
api.createUsersWithListInput(userList)
|
||||||
|
|
||||||
@ -121,15 +119,15 @@ class UserApiTest extends FlatSpec with ShouldMatchers {
|
|||||||
}
|
}
|
||||||
|
|
||||||
it should "update a user" in {
|
it should "update a user" in {
|
||||||
val user = new User
|
val user = User(
|
||||||
user.id = 4000
|
4000,
|
||||||
user.username = "tony"
|
"Tiger",
|
||||||
user.password = "XXXXXXXXXXX"
|
"tony",
|
||||||
user.email = "tony@fail.com"
|
"408-867-5309",
|
||||||
user.firstName = "Tony"
|
"tony@fail.com",
|
||||||
user.lastName = "Tiger"
|
1,
|
||||||
user.phone = "408-867-5309"
|
"Tony",
|
||||||
user.userStatus = 1
|
"XXXXXXXXXXX")
|
||||||
|
|
||||||
api.createUser(user)
|
api.createUser(user)
|
||||||
|
|
||||||
@ -140,9 +138,10 @@ class UserApiTest extends FlatSpec with ShouldMatchers {
|
|||||||
}
|
}
|
||||||
case None =>
|
case None =>
|
||||||
}
|
}
|
||||||
user.email = "tony@succeed.com"
|
|
||||||
|
|
||||||
api.updateUser("tony", user)
|
val updatedUser = user.copy(email="tony@succeed.com")
|
||||||
|
|
||||||
|
api.updateUser("tony", updatedUser)
|
||||||
api.getUserByName("tony") match {
|
api.getUserByName("tony") match {
|
||||||
case Some(user) => {
|
case Some(user) => {
|
||||||
user.email should be ("tony@succeed.com")
|
user.email should be ("tony@succeed.com")
|
@ -1,17 +0,0 @@
|
|||||||
package com.wordnik.petstore.model
|
|
||||||
|
|
||||||
import scala.reflect.BeanProperty
|
|
||||||
|
|
||||||
class Category {
|
|
||||||
@BeanProperty var id: Long = 0L
|
|
||||||
@BeanProperty var name: String = _
|
|
||||||
override def toString: String = {
|
|
||||||
val sb = new StringBuilder
|
|
||||||
sb.append("class Category {\n")
|
|
||||||
sb.append(" id: ").append(id).append("\n")
|
|
||||||
sb.append(" name: ").append(name).append("\n")
|
|
||||||
sb.append("}\n")
|
|
||||||
sb.toString
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
|||||||
package com.wordnik.petstore.model
|
|
||||||
|
|
||||||
import java.util.Date
|
|
||||||
import scala.reflect.BeanProperty
|
|
||||||
|
|
||||||
class Order {
|
|
||||||
@BeanProperty var id: Long = 0L
|
|
||||||
@BeanProperty var petId: Long = 0L
|
|
||||||
/* Order Status */
|
|
||||||
@BeanProperty var status: String = _
|
|
||||||
@BeanProperty var quantity: Int = 0
|
|
||||||
@BeanProperty var shipDate: Date = _
|
|
||||||
override def toString: String = {
|
|
||||||
val sb = new StringBuilder
|
|
||||||
sb.append("class Order {\n")
|
|
||||||
sb.append(" id: ").append(id).append("\n")
|
|
||||||
sb.append(" petId: ").append(petId).append("\n")
|
|
||||||
sb.append(" status: ").append(status).append("\n")
|
|
||||||
sb.append(" quantity: ").append(quantity).append("\n")
|
|
||||||
sb.append(" shipDate: ").append(shipDate).append("\n")
|
|
||||||
sb.append("}\n")
|
|
||||||
sb.toString
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,28 +0,0 @@
|
|||||||
package com.wordnik.petstore.model
|
|
||||||
|
|
||||||
import com.wordnik.petstore.model.Category
|
|
||||||
import com.wordnik.petstore.model.Tag
|
|
||||||
import scala.reflect.BeanProperty
|
|
||||||
|
|
||||||
class Pet {
|
|
||||||
@BeanProperty var id: Long = 0L
|
|
||||||
@BeanProperty var tags: java.util.List[Tag] = _
|
|
||||||
@BeanProperty var category: Category = _
|
|
||||||
/* pet status in the store */
|
|
||||||
@BeanProperty var status: String = _
|
|
||||||
@BeanProperty var name: String = _
|
|
||||||
@BeanProperty var photoUrls: java.util.List[String] = _
|
|
||||||
override def toString: String = {
|
|
||||||
val sb = new StringBuilder
|
|
||||||
sb.append("class Pet {\n")
|
|
||||||
sb.append(" id: ").append(id).append("\n")
|
|
||||||
sb.append(" tags: ").append(tags).append("\n")
|
|
||||||
sb.append(" category: ").append(category).append("\n")
|
|
||||||
sb.append(" status: ").append(status).append("\n")
|
|
||||||
sb.append(" name: ").append(name).append("\n")
|
|
||||||
sb.append(" photoUrls: ").append(photoUrls).append("\n")
|
|
||||||
sb.append("}\n")
|
|
||||||
sb.toString
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
|||||||
package com.wordnik.petstore.model
|
|
||||||
|
|
||||||
import scala.reflect.BeanProperty
|
|
||||||
|
|
||||||
class Tag {
|
|
||||||
@BeanProperty var id: Long = 0L
|
|
||||||
@BeanProperty var name: String = _
|
|
||||||
override def toString: String = {
|
|
||||||
val sb = new StringBuilder
|
|
||||||
sb.append("class Tag {\n")
|
|
||||||
sb.append(" id: ").append(id).append("\n")
|
|
||||||
sb.append(" name: ").append(name).append("\n")
|
|
||||||
sb.append("}\n")
|
|
||||||
sb.toString
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
|||||||
package com.wordnik.petstore.model
|
|
||||||
|
|
||||||
import scala.reflect.BeanProperty
|
|
||||||
|
|
||||||
class User {
|
|
||||||
@BeanProperty var id: Long = 0L
|
|
||||||
@BeanProperty var lastName: String = _
|
|
||||||
@BeanProperty var username: String = _
|
|
||||||
@BeanProperty var phone: String = _
|
|
||||||
@BeanProperty var email: String = _
|
|
||||||
/* User Status */
|
|
||||||
@BeanProperty var userStatus: Int = 0
|
|
||||||
@BeanProperty var firstName: String = _
|
|
||||||
@BeanProperty var password: String = _
|
|
||||||
override def toString: String = {
|
|
||||||
val sb = new StringBuilder
|
|
||||||
sb.append("class User {\n")
|
|
||||||
sb.append(" id: ").append(id).append("\n")
|
|
||||||
sb.append(" lastName: ").append(lastName).append("\n")
|
|
||||||
sb.append(" username: ").append(username).append("\n")
|
|
||||||
sb.append(" phone: ").append(phone).append("\n")
|
|
||||||
sb.append(" email: ").append(email).append("\n")
|
|
||||||
sb.append(" userStatus: ").append(userStatus).append("\n")
|
|
||||||
sb.append(" firstName: ").append(firstName).append("\n")
|
|
||||||
sb.append(" password: ").append(password).append("\n")
|
|
||||||
sb.append("}\n")
|
|
||||||
sb.toString
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user