forked from loafle/openapi-generator-original
update petstore samples (#2697)
This commit is contained in:
parent
d6306d8fee
commit
cce35d75a4
@ -7,7 +7,7 @@ version = '1.0.0'
|
||||
buildscript {
|
||||
repositories {
|
||||
jcenter {
|
||||
url "http://jcenter.bintray.com/"
|
||||
url "https://jcenter.bintray.com/"
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
|
@ -7,7 +7,7 @@ version = '1.0.0'
|
||||
buildscript {
|
||||
repositories {
|
||||
jcenter {
|
||||
url "http://jcenter.bintray.com/"
|
||||
url "https://jcenter.bintray.com/"
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
|
@ -1 +1 @@
|
||||
3.0.0-SNAPSHOT
|
||||
4.0.0-SNAPSHOT
|
@ -10,13 +10,13 @@ scalaVersion := "2.12.3"
|
||||
|
||||
resolvers += Resolver.sonatypeRepo("snapshots")
|
||||
|
||||
resolvers += "TM" at "http://maven.twttr.com"
|
||||
resolvers += "TM" at "https://maven.twttr.com"
|
||||
|
||||
resolvers += "Local Maven Repository" at "file://"+Path.userHome.absolutePath+"/.m2/repository"
|
||||
|
||||
resolvers += "Sonatype OSS Snapshots" at "http://oss.sonatype.org/content/repositories/snapshots/"
|
||||
resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots/"
|
||||
|
||||
resolvers += "Sonatype OSS Releases" at "http://oss.sonatype.org/content/repositories/releases/"
|
||||
resolvers += "Sonatype OSS Releases" at "https://oss.sonatype.org/content/repositories/releases/"
|
||||
|
||||
Defaults.itSettings
|
||||
|
||||
|
@ -18,7 +18,7 @@ trait DataAccessor {
|
||||
*
|
||||
* @return A Unit
|
||||
*/
|
||||
def Pet_addPet(pet: Pet): Either[CommonError,Unit] = Left(TODO)
|
||||
def Pet_addPet(body: Pet): Either[CommonError,Unit] = Left(TODO)
|
||||
|
||||
/**
|
||||
*
|
||||
@ -48,7 +48,7 @@ trait DataAccessor {
|
||||
*
|
||||
* @return A Unit
|
||||
*/
|
||||
def Pet_updatePet(pet: Pet): Either[CommonError,Unit] = Left(TODO)
|
||||
def Pet_updatePet(body: Pet): Either[CommonError,Unit] = Left(TODO)
|
||||
|
||||
/**
|
||||
*
|
||||
@ -84,25 +84,25 @@ trait DataAccessor {
|
||||
*
|
||||
* @return A Order
|
||||
*/
|
||||
def Store_placeOrder(order: Order): Either[CommonError,Order] = Left(TODO)
|
||||
def Store_placeOrder(body: Order): Either[CommonError,Order] = Left(TODO)
|
||||
|
||||
/**
|
||||
*
|
||||
* @return A Unit
|
||||
*/
|
||||
def User_createUser(user: User): Either[CommonError,Unit] = Left(TODO)
|
||||
def User_createUser(body: User): Either[CommonError,Unit] = Left(TODO)
|
||||
|
||||
/**
|
||||
*
|
||||
* @return A Unit
|
||||
*/
|
||||
def User_createUsersWithArrayInput(user: Seq[User]): Either[CommonError,Unit] = Left(TODO)
|
||||
def User_createUsersWithArrayInput(body: Seq[User]): Either[CommonError,Unit] = Left(TODO)
|
||||
|
||||
/**
|
||||
*
|
||||
* @return A Unit
|
||||
*/
|
||||
def User_createUsersWithListInput(user: Seq[User]): Either[CommonError,Unit] = Left(TODO)
|
||||
def User_createUsersWithListInput(body: Seq[User]): Either[CommonError,Unit] = Left(TODO)
|
||||
|
||||
/**
|
||||
*
|
||||
@ -132,6 +132,6 @@ trait DataAccessor {
|
||||
*
|
||||
* @return A Unit
|
||||
*/
|
||||
def User_updateUser(username: String, user: User): Either[CommonError,Unit] = Left(TODO)
|
||||
def User_updateUser(username: String, body: User): Either[CommonError,Unit] = Left(TODO)
|
||||
|
||||
}
|
@ -60,8 +60,8 @@ object PetApi {
|
||||
* @return An endpoint representing a Unit
|
||||
*/
|
||||
private def addPet(da: DataAccessor): Endpoint[Unit] =
|
||||
post("pet" :: jsonBody[Pet]) { (pet: Pet) =>
|
||||
da.Pet_addPet(pet) match {
|
||||
post("pet" :: jsonBody[Pet]) { (body: Pet) =>
|
||||
da.Pet_addPet(body) match {
|
||||
case Left(error) => checkError(error)
|
||||
case Right(data) => Ok(data)
|
||||
}
|
||||
@ -130,8 +130,8 @@ object PetApi {
|
||||
* @return An endpoint representing a Unit
|
||||
*/
|
||||
private def updatePet(da: DataAccessor): Endpoint[Unit] =
|
||||
put("pet" :: jsonBody[Pet]) { (pet: Pet) =>
|
||||
da.Pet_updatePet(pet) match {
|
||||
put("pet" :: jsonBody[Pet]) { (body: Pet) =>
|
||||
da.Pet_updatePet(body) match {
|
||||
case Left(error) => checkError(error)
|
||||
case Right(data) => Ok(data)
|
||||
}
|
||||
|
@ -96,8 +96,8 @@ object StoreApi {
|
||||
* @return An endpoint representing a Order
|
||||
*/
|
||||
private def placeOrder(da: DataAccessor): Endpoint[Order] =
|
||||
post("store" :: "order" :: jsonBody[Order]) { (order: Order) =>
|
||||
da.Store_placeOrder(order) match {
|
||||
post("store" :: "order" :: jsonBody[Order]) { (body: Order) =>
|
||||
da.Store_placeOrder(body) match {
|
||||
case Left(error) => checkError(error)
|
||||
case Right(data) => Ok(data)
|
||||
}
|
||||
|
@ -59,8 +59,8 @@ object UserApi {
|
||||
* @return An endpoint representing a Unit
|
||||
*/
|
||||
private def createUser(da: DataAccessor): Endpoint[Unit] =
|
||||
post("user" :: jsonBody[User]) { (user: User) =>
|
||||
da.User_createUser(user) match {
|
||||
post("user" :: jsonBody[User]) { (body: User) =>
|
||||
da.User_createUser(body) match {
|
||||
case Left(error) => checkError(error)
|
||||
case Right(data) => Ok(data)
|
||||
}
|
||||
@ -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]]) { (user: Seq[User]) =>
|
||||
da.User_createUsersWithArrayInput(user) match {
|
||||
post("user" :: "createWithArray" :: jsonBody[Seq[User]]) { (body: Seq[User]) =>
|
||||
da.User_createUsersWithArrayInput(body) 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]]) { (user: Seq[User]) =>
|
||||
da.User_createUsersWithListInput(user) match {
|
||||
post("user" :: "createWithList" :: jsonBody[Seq[User]]) { (body: Seq[User]) =>
|
||||
da.User_createUsersWithListInput(body) match {
|
||||
case Left(error) => checkError(error)
|
||||
case Right(data) => Ok(data)
|
||||
}
|
||||
@ -157,8 +157,8 @@ object UserApi {
|
||||
* @return An endpoint representing a Unit
|
||||
*/
|
||||
private def updateUser(da: DataAccessor): Endpoint[Unit] =
|
||||
put("user" :: string :: jsonBody[User]) { (username: String, user: User) =>
|
||||
da.User_updateUser(username, user) match {
|
||||
put("user" :: string :: jsonBody[User]) { (username: String, body: User) =>
|
||||
da.User_updateUser(username, body) match {
|
||||
case Left(error) => checkError(error)
|
||||
case Right(data) => Ok(data)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user