forked from loafle/openapi-generator-original
Update finch Petstore OAS2 (#126)
* Update finch sample * Udpate 'finch' samples * update finch with oas3 petstore (no diff)
This commit is contained in:
committed by
William Cheng
parent
8a4f905892
commit
d21e4227a6
@@ -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] = ???
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user