Update finch Petstore OAS2 (#126)

* Update finch sample

* Udpate 'finch' samples

* update finch with oas3 petstore (no diff)
This commit is contained in:
Jérémie Bresson
2018-04-20 15:52:22 +02:00
committed by William Cheng
parent 8a4f905892
commit d21e4227a6
3 changed files with 37 additions and 6 deletions

View File

@@ -94,13 +94,13 @@ trait DataAccessor {
*
* @return A Unit
*/
def User_createUsersWithArrayInput(seq: Seq[User]): Either[CommonError,Unit] = ???
def User_createUsersWithArrayInput(user: Seq[User]): Either[CommonError,Unit] = ???
/**
*
* @return A Unit
*/
def User_createUsersWithListInput(seq: Seq[User]): Either[CommonError,Unit] = ???
def User_createUsersWithListInput(user: Seq[User]): Either[CommonError,Unit] = ???
/**
*

View File

@@ -73,8 +73,8 @@ object UserApi {
* @return An endpoint representing a Unit
*/
private def createUsersWithArrayInput(da: DataAccessor): Endpoint[Unit] =
post("user" :: "createWithArray" :: jsonBody[Seq[User]]) { (seq: Seq[User]) =>
da.User_createUsersWithArrayInput(seq) match {
post("user" :: "createWithArray" :: jsonBody[Seq[User]]) { (user: Seq[User]) =>
da.User_createUsersWithArrayInput(user) match {
case Left(error) => checkError(error)
case Right(data) => Ok(data)
}
@@ -87,8 +87,8 @@ object UserApi {
* @return An endpoint representing a Unit
*/
private def createUsersWithListInput(da: DataAccessor): Endpoint[Unit] =
post("user" :: "createWithList" :: jsonBody[Seq[User]]) { (seq: Seq[User]) =>
da.User_createUsersWithListInput(seq) match {
post("user" :: "createWithList" :: jsonBody[Seq[User]]) { (user: Seq[User]) =>
da.User_createUsersWithListInput(user) match {
case Left(error) => checkError(error)
case Right(data) => Ok(data)
}