diff --git a/samples/client/petstore/scala-akka/.openapi-generator/VERSION b/samples/client/petstore/scala-akka/.openapi-generator/VERSION index 0e97bd19efbf..58592f031f65 100644 --- a/samples/client/petstore/scala-akka/.openapi-generator/VERSION +++ b/samples/client/petstore/scala-akka/.openapi-generator/VERSION @@ -1 +1 @@ -4.1.3-SNAPSHOT \ No newline at end of file +4.2.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/scala-gatling/.openapi-generator/VERSION b/samples/client/petstore/scala-gatling/.openapi-generator/VERSION index 096bf47efe31..58592f031f65 100644 --- a/samples/client/petstore/scala-gatling/.openapi-generator/VERSION +++ b/samples/client/petstore/scala-gatling/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +4.2.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/scala-gatling/src/gatling/resources/data/loginUser-queryParams.csv b/samples/client/petstore/scala-gatling/src/gatling/resources/data/loginUser-queryParams.csv index d8bc9aec67d0..418fd574de51 100644 --- a/samples/client/petstore/scala-gatling/src/gatling/resources/data/loginUser-queryParams.csv +++ b/samples/client/petstore/scala-gatling/src/gatling/resources/data/loginUser-queryParams.csv @@ -1 +1 @@ -username,password \ No newline at end of file +password,username \ No newline at end of file diff --git a/samples/client/petstore/scala-gatling/src/gatling/scala/org/openapitools/client/api/UserApiSimulation.scala b/samples/client/petstore/scala-gatling/src/gatling/scala/org/openapitools/client/api/UserApiSimulation.scala index c12112e8b0da..6b97d7c04907 100644 --- a/samples/client/petstore/scala-gatling/src/gatling/scala/org/openapitools/client/api/UserApiSimulation.scala +++ b/samples/client/petstore/scala-gatling/src/gatling/scala/org/openapitools/client/api/UserApiSimulation.scala @@ -147,8 +147,8 @@ class UserApiSimulation extends Simulation { .feed(loginUserQUERYFeeder) .exec(http("loginUser") .httpRequest("GET","/user/login") - .queryParam("username","${username}") .queryParam("password","${password}") + .queryParam("username","${username}") ) // Run scnloginUser with warm up and reach a constant rate for entire duration diff --git a/samples/client/petstore/scala-httpclient/.openapi-generator/VERSION b/samples/client/petstore/scala-httpclient/.openapi-generator/VERSION index 06b5019af3f4..58592f031f65 100644 --- a/samples/client/petstore/scala-httpclient/.openapi-generator/VERSION +++ b/samples/client/petstore/scala-httpclient/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.1-SNAPSHOT \ No newline at end of file +4.2.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/scala-httpclient/git_push.sh b/samples/client/petstore/scala-httpclient/git_push.sh index 8442b80bb445..ced3be2b0c7b 100644 --- a/samples/client/petstore/scala-httpclient/git_push.sh +++ b/samples/client/petstore/scala-httpclient/git_push.sh @@ -1,11 +1,17 @@ #!/bin/sh # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # -# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" @@ -28,7 +34,7 @@ git init # Adds the files in the local repository and stages them for commit. git add . -# Commits the tracked changes and prepares them to be pushed to a remote repository. +# Commits the tracked changes and prepares them to be pushed to a remote repository. git commit -m "$release_note" # Sets the new remote @@ -37,9 +43,9 @@ if [ "$git_remote" = "" ]; then # git remote not defined if [ "$GIT_TOKEN" = "" ]; then echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git fi fi @@ -47,6 +53,6 @@ fi git pull origin master # Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" git push origin master 2>&1 | grep -v 'To https' diff --git a/samples/client/petstore/scalaz/.openapi-generator/VERSION b/samples/client/petstore/scalaz/.openapi-generator/VERSION index e4955748d3e7..58592f031f65 100644 --- a/samples/client/petstore/scalaz/.openapi-generator/VERSION +++ b/samples/client/petstore/scalaz/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.2-SNAPSHOT \ No newline at end of file +4.2.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/scalaz/project/build.properties b/samples/client/petstore/scalaz/project/build.properties index 64317fdae59f..cf19fd026fd1 100644 --- a/samples/client/petstore/scalaz/project/build.properties +++ b/samples/client/petstore/scalaz/project/build.properties @@ -1 +1 @@ -sbt.version=0.13.15 +sbt.version=0.13.15 \ No newline at end of file diff --git a/samples/server/petstore/scala-lagom-server/.openapi-generator/VERSION b/samples/server/petstore/scala-lagom-server/.openapi-generator/VERSION index f9f7450d1359..58592f031f65 100644 --- a/samples/server/petstore/scala-lagom-server/.openapi-generator/VERSION +++ b/samples/server/petstore/scala-lagom-server/.openapi-generator/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +4.2.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/scala-lagom-server/README.md b/samples/server/petstore/scala-lagom-server/README.md index 938d7331cb7d..e80ddccb7e17 100644 --- a/samples/server/petstore/scala-lagom-server/README.md +++ b/samples/server/petstore/scala-lagom-server/README.md @@ -1,9 +1,9 @@ -# Swagger generated scala-lagomApi +# OpenAPI generated scala-lagomApi ## Overview -This server was generated by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project. By using the -[OpenAPI-Spec](https://github.com/swagger-api/swagger-core/wiki) from a remote server, you can easily generate a server stub. This -is an example of building a swagger-enabled lagon-api. +This server was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the +[OpenAPI-Spec](https://openapis.org) from a remote server, you can easily generate a server stub. This +is an example of building a OpenAPI-enabled lagon-api. This example uses the [lagomframework](https://www.lagomframework.com) lagomframework. diff --git a/samples/server/petstore/scala-lagom-server/build.sbt b/samples/server/petstore/scala-lagom-server/build.sbt index ea9dd5789f03..b6ab43cf17b3 100644 --- a/samples/server/petstore/scala-lagom-server/build.sbt +++ b/samples/server/petstore/scala-lagom-server/build.sbt @@ -2,7 +2,7 @@ version := "1.0.0" name := "scala-lagom-server" -organization := "io.swagger" +organization := "org.openapitools" scalaVersion := "2.11.8" diff --git a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/PetApi.scala b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/PetApi.scala index 6ee03b22acac..559f0820c428 100644 --- a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/PetApi.scala +++ b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/PetApi.scala @@ -1,12 +1,12 @@ /** - * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * The version of the OpenAPI document: 1.0.0 + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/StoreApi.scala b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/StoreApi.scala index ff42a995e9ae..2386c182986d 100644 --- a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/StoreApi.scala +++ b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/StoreApi.scala @@ -1,12 +1,12 @@ /** - * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * The version of the OpenAPI document: 1.0.0 + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/UserApi.scala b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/UserApi.scala index b62b48d87504..211db9974bfb 100644 --- a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/UserApi.scala +++ b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/UserApi.scala @@ -1,12 +1,12 @@ /** - * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * The version of the OpenAPI document: 1.0.0 + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. */ @@ -75,7 +75,7 @@ trait UserApi extends Service { * Get user by user name * * - * @param username The name that needs to be fetched. Use user1 for testing. + * @param username The name that needs to be fetched. Use user1 for testing. * @return User */ def getUserByName(username: String): ServiceCall[NotUsed ,User] diff --git a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/ApiResponse.scala b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/ApiResponse.scala index 884853e5c25b..28448672d579 100644 --- a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/ApiResponse.scala +++ b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/ApiResponse.scala @@ -1,12 +1,12 @@ /** - * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * The version of the OpenAPI document: 1.0.0 + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. */ @@ -15,7 +15,7 @@ import play.api.libs.json._ case class ApiResponse ( code: Option[Int], - _type: Option[String], + `type`: Option[String], message: Option[String] ) diff --git a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Category.scala b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Category.scala index c50c6e71c64d..68f37da0d9e2 100644 --- a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Category.scala +++ b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Category.scala @@ -1,12 +1,12 @@ /** - * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * The version of the OpenAPI document: 1.0.0 + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Order.scala b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Order.scala index c79ffb780e54..1f86d47b25be 100644 --- a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Order.scala +++ b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Order.scala @@ -1,12 +1,12 @@ /** - * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * The version of the OpenAPI document: 1.0.0 + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Pet.scala b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Pet.scala index acc6c25afc38..56798d01eef0 100644 --- a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Pet.scala +++ b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Pet.scala @@ -1,12 +1,12 @@ /** - * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * The version of the OpenAPI document: 1.0.0 + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Tag.scala b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Tag.scala index 65aa9c628bcd..8d8da70ff8ae 100644 --- a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Tag.scala +++ b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Tag.scala @@ -1,12 +1,12 @@ /** - * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * The version of the OpenAPI document: 1.0.0 + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/User.scala b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/User.scala index b21cd2e7e770..f5de40df3690 100644 --- a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/User.scala +++ b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/User.scala @@ -1,12 +1,12 @@ /** - * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * The version of the OpenAPI document: 1.0.0 + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/scala-play-server/.openapi-generator/VERSION b/samples/server/petstore/scala-play-server/.openapi-generator/VERSION index afa636560641..58592f031f65 100644 --- a/samples/server/petstore/scala-play-server/.openapi-generator/VERSION +++ b/samples/server/petstore/scala-play-server/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.0-SNAPSHOT \ No newline at end of file +4.2.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/scala-play-server/README.md b/samples/server/petstore/scala-play-server/README.md index 7f342575759e..87528aac7f01 100644 --- a/samples/server/petstore/scala-play-server/README.md +++ b/samples/server/petstore/scala-play-server/README.md @@ -2,7 +2,7 @@ This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. -This Scala Play Framework project was generated by the OpenAPI generator tool at 2019-03-26T16:21:58.590+08:00[Asia/Hong_Kong]. +This Scala Play Framework project was generated by the OpenAPI generator tool at 2020-01-04T23:10:22.106-05:00[America/New_York]. ## API diff --git a/samples/server/petstore/scala-play-server/app/api/PetApi.scala b/samples/server/petstore/scala-play-server/app/api/PetApi.scala index 1f7eaed70b40..ec7dc810a4b6 100644 --- a/samples/server/petstore/scala-play-server/app/api/PetApi.scala +++ b/samples/server/petstore/scala-play-server/app/api/PetApi.scala @@ -4,7 +4,7 @@ import model.ApiResponse import model.Pet import play.api.libs.Files.TemporaryFile -@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2019-03-26T16:21:58.590+08:00[Asia/Hong_Kong]") +@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2020-01-04T23:10:22.106-05:00[America/New_York]") trait PetApi { /** * Add a new pet to the store diff --git a/samples/server/petstore/scala-play-server/app/api/PetApiController.scala b/samples/server/petstore/scala-play-server/app/api/PetApiController.scala index 33f07975634d..36d5ff287fd4 100644 --- a/samples/server/petstore/scala-play-server/app/api/PetApiController.scala +++ b/samples/server/petstore/scala-play-server/app/api/PetApiController.scala @@ -8,7 +8,7 @@ import model.ApiResponse import model.Pet import play.api.libs.Files.TemporaryFile -@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2019-03-26T16:21:58.590+08:00[Asia/Hong_Kong]") +@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2020-01-04T23:10:22.106-05:00[America/New_York]") @Singleton class PetApiController @Inject()(cc: ControllerComponents, api: PetApi) extends AbstractController(cc) { /** diff --git a/samples/server/petstore/scala-play-server/app/api/PetApiImpl.scala b/samples/server/petstore/scala-play-server/app/api/PetApiImpl.scala index d3a8ea67b1bb..b5186deba44d 100644 --- a/samples/server/petstore/scala-play-server/app/api/PetApiImpl.scala +++ b/samples/server/petstore/scala-play-server/app/api/PetApiImpl.scala @@ -7,7 +7,7 @@ import play.api.libs.Files.TemporaryFile /** * Provides a default implementation for [[PetApi]]. */ -@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2019-03-26T16:21:58.590+08:00[Asia/Hong_Kong]") +@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2020-01-04T23:10:22.106-05:00[America/New_York]") class PetApiImpl extends PetApi { /** * @inheritdoc diff --git a/samples/server/petstore/scala-play-server/app/api/StoreApi.scala b/samples/server/petstore/scala-play-server/app/api/StoreApi.scala index 11ee20112683..3197b95ed814 100644 --- a/samples/server/petstore/scala-play-server/app/api/StoreApi.scala +++ b/samples/server/petstore/scala-play-server/app/api/StoreApi.scala @@ -2,7 +2,7 @@ package api import model.Order -@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2019-03-26T16:21:58.590+08:00[Asia/Hong_Kong]") +@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2020-01-04T23:10:22.106-05:00[America/New_York]") trait StoreApi { /** * Delete purchase order by ID diff --git a/samples/server/petstore/scala-play-server/app/api/StoreApiController.scala b/samples/server/petstore/scala-play-server/app/api/StoreApiController.scala index 161cf5805c68..f36218bd62d6 100644 --- a/samples/server/petstore/scala-play-server/app/api/StoreApiController.scala +++ b/samples/server/petstore/scala-play-server/app/api/StoreApiController.scala @@ -6,7 +6,7 @@ import play.api.libs.json._ import play.api.mvc._ import model.Order -@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2019-03-26T16:21:58.590+08:00[Asia/Hong_Kong]") +@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2020-01-04T23:10:22.106-05:00[America/New_York]") @Singleton class StoreApiController @Inject()(cc: ControllerComponents, api: StoreApi) extends AbstractController(cc) { /** diff --git a/samples/server/petstore/scala-play-server/app/api/StoreApiImpl.scala b/samples/server/petstore/scala-play-server/app/api/StoreApiImpl.scala index 8a996a93e462..efe32363e9cd 100644 --- a/samples/server/petstore/scala-play-server/app/api/StoreApiImpl.scala +++ b/samples/server/petstore/scala-play-server/app/api/StoreApiImpl.scala @@ -5,7 +5,7 @@ import model.Order /** * Provides a default implementation for [[StoreApi]]. */ -@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2019-03-26T16:21:58.590+08:00[Asia/Hong_Kong]") +@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2020-01-04T23:10:22.106-05:00[America/New_York]") class StoreApiImpl extends StoreApi { /** * @inheritdoc diff --git a/samples/server/petstore/scala-play-server/app/api/UserApi.scala b/samples/server/petstore/scala-play-server/app/api/UserApi.scala index 41b24e87562a..df0471d833f5 100644 --- a/samples/server/petstore/scala-play-server/app/api/UserApi.scala +++ b/samples/server/petstore/scala-play-server/app/api/UserApi.scala @@ -2,7 +2,7 @@ package api import model.User -@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2019-03-26T16:21:58.590+08:00[Asia/Hong_Kong]") +@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2020-01-04T23:10:22.106-05:00[America/New_York]") trait UserApi { /** * Create user diff --git a/samples/server/petstore/scala-play-server/app/api/UserApiController.scala b/samples/server/petstore/scala-play-server/app/api/UserApiController.scala index 05550df7c665..2675c44bafa6 100644 --- a/samples/server/petstore/scala-play-server/app/api/UserApiController.scala +++ b/samples/server/petstore/scala-play-server/app/api/UserApiController.scala @@ -6,7 +6,7 @@ import play.api.libs.json._ import play.api.mvc._ import model.User -@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2019-03-26T16:21:58.590+08:00[Asia/Hong_Kong]") +@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2020-01-04T23:10:22.106-05:00[America/New_York]") @Singleton class UserApiController @Inject()(cc: ControllerComponents, api: UserApi) extends AbstractController(cc) { /** diff --git a/samples/server/petstore/scala-play-server/app/api/UserApiImpl.scala b/samples/server/petstore/scala-play-server/app/api/UserApiImpl.scala index 01ce46e98e55..b14446f643f4 100644 --- a/samples/server/petstore/scala-play-server/app/api/UserApiImpl.scala +++ b/samples/server/petstore/scala-play-server/app/api/UserApiImpl.scala @@ -5,7 +5,7 @@ import model.User /** * Provides a default implementation for [[UserApi]]. */ -@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2019-03-26T16:21:58.590+08:00[Asia/Hong_Kong]") +@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2020-01-04T23:10:22.106-05:00[America/New_York]") class UserApiImpl extends UserApi { /** * @inheritdoc diff --git a/samples/server/petstore/scala-play-server/app/model/ApiResponse.scala b/samples/server/petstore/scala-play-server/app/model/ApiResponse.scala index 529462aa0864..956360fa5ea1 100644 --- a/samples/server/petstore/scala-play-server/app/model/ApiResponse.scala +++ b/samples/server/petstore/scala-play-server/app/model/ApiResponse.scala @@ -5,7 +5,7 @@ import play.api.libs.json._ /** * Describes the result of uploading an image resource */ -@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2019-03-26T16:21:58.590+08:00[Asia/Hong_Kong]") +@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2020-01-04T23:10:22.106-05:00[America/New_York]") case class ApiResponse( code: Option[Int], `type`: Option[String], diff --git a/samples/server/petstore/scala-play-server/app/model/Category.scala b/samples/server/petstore/scala-play-server/app/model/Category.scala index 006c0e561dea..120411990fb3 100644 --- a/samples/server/petstore/scala-play-server/app/model/Category.scala +++ b/samples/server/petstore/scala-play-server/app/model/Category.scala @@ -5,7 +5,7 @@ import play.api.libs.json._ /** * A category for a pet */ -@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2019-03-26T16:21:58.590+08:00[Asia/Hong_Kong]") +@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2020-01-04T23:10:22.106-05:00[America/New_York]") case class Category( id: Option[Long], name: Option[String] diff --git a/samples/server/petstore/scala-play-server/app/model/Order.scala b/samples/server/petstore/scala-play-server/app/model/Order.scala index b82378a3791a..c911b7f444d2 100644 --- a/samples/server/petstore/scala-play-server/app/model/Order.scala +++ b/samples/server/petstore/scala-play-server/app/model/Order.scala @@ -7,7 +7,7 @@ import java.time.OffsetDateTime * An order for a pets from the pet store * @param status Order Status */ -@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2019-03-26T16:21:58.590+08:00[Asia/Hong_Kong]") +@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2020-01-04T23:10:22.106-05:00[America/New_York]") case class Order( id: Option[Long], petId: Option[Long], diff --git a/samples/server/petstore/scala-play-server/app/model/Pet.scala b/samples/server/petstore/scala-play-server/app/model/Pet.scala index 207929809288..2f50116cd436 100644 --- a/samples/server/petstore/scala-play-server/app/model/Pet.scala +++ b/samples/server/petstore/scala-play-server/app/model/Pet.scala @@ -6,7 +6,7 @@ import play.api.libs.json._ * A pet for sale in the pet store * @param status pet status in the store */ -@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2019-03-26T16:21:58.590+08:00[Asia/Hong_Kong]") +@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2020-01-04T23:10:22.106-05:00[America/New_York]") case class Pet( id: Option[Long], category: Option[Category], diff --git a/samples/server/petstore/scala-play-server/app/model/Tag.scala b/samples/server/petstore/scala-play-server/app/model/Tag.scala index 2d8a1f21fcb8..4a20e2acdf08 100644 --- a/samples/server/petstore/scala-play-server/app/model/Tag.scala +++ b/samples/server/petstore/scala-play-server/app/model/Tag.scala @@ -5,7 +5,7 @@ import play.api.libs.json._ /** * A tag for a pet */ -@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2019-03-26T16:21:58.590+08:00[Asia/Hong_Kong]") +@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2020-01-04T23:10:22.106-05:00[America/New_York]") case class Tag( id: Option[Long], name: Option[String] diff --git a/samples/server/petstore/scala-play-server/app/model/User.scala b/samples/server/petstore/scala-play-server/app/model/User.scala index 4d92a101a9e5..af11a3d3c934 100644 --- a/samples/server/petstore/scala-play-server/app/model/User.scala +++ b/samples/server/petstore/scala-play-server/app/model/User.scala @@ -6,7 +6,7 @@ import play.api.libs.json._ * A User who is purchasing from the pet store * @param userStatus User Status */ -@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2019-03-26T16:21:58.590+08:00[Asia/Hong_Kong]") +@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2020-01-04T23:10:22.106-05:00[America/New_York]") case class User( id: Option[Long], username: Option[String], diff --git a/samples/server/petstore/scala-play-server/app/org/openapitools/Module.scala b/samples/server/petstore/scala-play-server/app/org/openapitools/Module.scala index f135171d48d1..98382284f9e9 100644 --- a/samples/server/petstore/scala-play-server/app/org/openapitools/Module.scala +++ b/samples/server/petstore/scala-play-server/app/org/openapitools/Module.scala @@ -4,7 +4,7 @@ import api._ import play.api.inject.{Binding, Module => PlayModule} import play.api.{Configuration, Environment} -@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2019-03-26T16:21:58.590+08:00[Asia/Hong_Kong]") +@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2020-01-04T23:10:22.106-05:00[America/New_York]") class Module extends PlayModule { override def bindings(environment: Environment, configuration: Configuration): Seq[Binding[_]] = Seq( bind[PetApi].to[PetApiImpl], diff --git a/samples/server/petstore/scala-play-server/public/openapi.json b/samples/server/petstore/scala-play-server/public/openapi.json index 5781506eb926..0ef21458be8d 100644 --- a/samples/server/petstore/scala-play-server/public/openapi.json +++ b/samples/server/petstore/scala-play-server/public/openapi.json @@ -1,35 +1,32 @@ { "openapi" : "3.0.1", "info" : { - "title" : "OpenAPI Petstore", "description" : "This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.", "license" : { "name" : "Apache-2.0", "url" : "http://www.apache.org/licenses/LICENSE-2.0.html" }, + "title" : "OpenAPI Petstore", "version" : "1.0.0" }, "servers" : [ { "url" : "http://petstore.swagger.io/v2" } ], "tags" : [ { - "name" : "pet", - "description" : "Everything about your Pets" + "description" : "Everything about your Pets", + "name" : "pet" }, { - "name" : "store", - "description" : "Access to Petstore orders" + "description" : "Access to Petstore orders", + "name" : "store" }, { - "name" : "user", - "description" : "Operations about user" + "description" : "Operations about user", + "name" : "user" } ], "paths" : { "/pet" : { - "put" : { - "tags" : [ "pet" ], - "summary" : "Update an existing pet", - "operationId" : "updatePet", + "post" : { + "operationId" : "addPet", "requestBody" : { - "description" : "Pet object that needs to be added to the store", "content" : { "application/json" : { "schema" : { @@ -42,33 +39,25 @@ } } }, + "description" : "Pet object that needs to be added to the store", "required" : true }, "responses" : { - "400" : { - "description" : "Invalid ID supplied", - "content" : { } - }, - "404" : { - "description" : "Pet not found", - "content" : { } - }, "405" : { - "description" : "Validation exception", - "content" : { } + "content" : { }, + "description" : "Invalid input" } }, "security" : [ { "petstore_auth" : [ "write:pets", "read:pets" ] } ], + "summary" : "Add a new pet to the store", + "tags" : [ "pet" ], "x-codegen-request-body-name" : "body" }, - "post" : { - "tags" : [ "pet" ], - "summary" : "Add a new pet to the store", - "operationId" : "addPet", + "put" : { + "operationId" : "updatePet", "requestBody" : { - "description" : "Pet object that needs to be added to the store", "content" : { "application/json" : { "schema" : { @@ -81,146 +70,184 @@ } } }, + "description" : "Pet object that needs to be added to the store", "required" : true }, "responses" : { + "400" : { + "content" : { }, + "description" : "Invalid ID supplied" + }, + "404" : { + "content" : { }, + "description" : "Pet not found" + }, "405" : { - "description" : "Invalid input", - "content" : { } + "content" : { }, + "description" : "Validation exception" } }, "security" : [ { "petstore_auth" : [ "write:pets", "read:pets" ] } ], + "summary" : "Update an existing pet", + "tags" : [ "pet" ], "x-codegen-request-body-name" : "body" } }, "/pet/findByStatus" : { "get" : { - "tags" : [ "pet" ], - "summary" : "Finds Pets by status", "description" : "Multiple status values can be provided with comma separated strings", "operationId" : "findPetsByStatus", "parameters" : [ { - "name" : "status", - "in" : "query", "description" : "Status values that need to be considered for filter", - "required" : true, - "style" : "form", "explode" : false, + "in" : "query", + "name" : "status", + "required" : true, "schema" : { - "type" : "array", "items" : { - "type" : "string", "default" : "available", - "enum" : [ "available", "pending", "sold" ] - } - } + "enum" : [ "available", "pending", "sold" ], + "type" : "string" + }, + "type" : "array" + }, + "style" : "form" } ], "responses" : { "200" : { - "description" : "successful operation", "content" : { "application/xml" : { "schema" : { - "type" : "array", "items" : { "$ref" : "#/components/schemas/Pet" - } + }, + "type" : "array" } }, "application/json" : { "schema" : { - "type" : "array", "items" : { "$ref" : "#/components/schemas/Pet" - } + }, + "type" : "array" } } - } + }, + "description" : "successful operation" }, "400" : { - "description" : "Invalid status value", - "content" : { } + "content" : { }, + "description" : "Invalid status value" } }, "security" : [ { "petstore_auth" : [ "write:pets", "read:pets" ] - } ] + } ], + "summary" : "Finds Pets by status", + "tags" : [ "pet" ] } }, "/pet/findByTags" : { "get" : { - "tags" : [ "pet" ], - "summary" : "Finds Pets by tags", + "deprecated" : true, "description" : "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", "operationId" : "findPetsByTags", "parameters" : [ { - "name" : "tags", - "in" : "query", "description" : "Tags to filter by", - "required" : true, - "style" : "form", "explode" : false, + "in" : "query", + "name" : "tags", + "required" : true, "schema" : { - "type" : "array", "items" : { "type" : "string" - } - } + }, + "type" : "array" + }, + "style" : "form" } ], "responses" : { "200" : { - "description" : "successful operation", "content" : { "application/xml" : { "schema" : { - "type" : "array", "items" : { "$ref" : "#/components/schemas/Pet" - } + }, + "type" : "array" } }, "application/json" : { "schema" : { - "type" : "array", "items" : { "$ref" : "#/components/schemas/Pet" - } + }, + "type" : "array" } } - } + }, + "description" : "successful operation" }, "400" : { - "description" : "Invalid tag value", - "content" : { } + "content" : { }, + "description" : "Invalid tag value" } }, - "deprecated" : true, "security" : [ { "petstore_auth" : [ "write:pets", "read:pets" ] - } ] + } ], + "summary" : "Finds Pets by tags", + "tags" : [ "pet" ] } }, "/pet/{petId}" : { + "delete" : { + "operationId" : "deletePet", + "parameters" : [ { + "in" : "header", + "name" : "api_key", + "schema" : { + "type" : "string" + } + }, { + "description" : "Pet id to delete", + "in" : "path", + "name" : "petId", + "required" : true, + "schema" : { + "format" : "int64", + "type" : "integer" + } + } ], + "responses" : { + "400" : { + "content" : { }, + "description" : "Invalid pet value" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "summary" : "Deletes a pet", + "tags" : [ "pet" ] + }, "get" : { - "tags" : [ "pet" ], - "summary" : "Find pet by ID", "description" : "Returns a single pet", "operationId" : "getPetById", "parameters" : [ { - "name" : "petId", - "in" : "path", "description" : "ID of pet to return", + "in" : "path", + "name" : "petId", "required" : true, "schema" : { - "type" : "integer", - "format" : "int64" + "format" : "int64", + "type" : "integer" } } ], "responses" : { "200" : { - "description" : "successful operation", "content" : { "application/xml" : { "schema" : { @@ -232,33 +259,34 @@ "$ref" : "#/components/schemas/Pet" } } - } + }, + "description" : "successful operation" }, "400" : { - "description" : "Invalid ID supplied", - "content" : { } + "content" : { }, + "description" : "Invalid ID supplied" }, "404" : { - "description" : "Pet not found", - "content" : { } + "content" : { }, + "description" : "Pet not found" } }, "security" : [ { "api_key" : [ ] - } ] + } ], + "summary" : "Find pet by ID", + "tags" : [ "pet" ] }, "post" : { - "tags" : [ "pet" ], - "summary" : "Updates a pet in the store with form data", "operationId" : "updatePetWithForm", "parameters" : [ { - "name" : "petId", - "in" : "path", "description" : "ID of pet that needs to be updated", + "in" : "path", + "name" : "petId", "required" : true, "schema" : { - "type" : "integer", - "format" : "int64" + "format" : "int64", + "type" : "integer" } } ], "requestBody" : { @@ -267,12 +295,12 @@ "schema" : { "properties" : { "name" : { - "type" : "string", - "description" : "Updated name of the pet" + "description" : "Updated name of the pet", + "type" : "string" }, "status" : { - "type" : "string", - "description" : "Updated status of the pet" + "description" : "Updated status of the pet", + "type" : "string" } } } @@ -281,58 +309,28 @@ }, "responses" : { "405" : { - "description" : "Invalid input", - "content" : { } + "content" : { }, + "description" : "Invalid input" } }, "security" : [ { "petstore_auth" : [ "write:pets", "read:pets" ] - } ] - }, - "delete" : { - "tags" : [ "pet" ], - "summary" : "Deletes a pet", - "operationId" : "deletePet", - "parameters" : [ { - "name" : "api_key", - "in" : "header", - "schema" : { - "type" : "string" - } - }, { - "name" : "petId", - "in" : "path", - "description" : "Pet id to delete", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int64" - } } ], - "responses" : { - "400" : { - "description" : "Invalid pet value", - "content" : { } - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ] + "summary" : "Updates a pet in the store with form data", + "tags" : [ "pet" ] } }, "/pet/{petId}/uploadImage" : { "post" : { - "tags" : [ "pet" ], - "summary" : "uploads an image", "operationId" : "uploadFile", "parameters" : [ { - "name" : "petId", - "in" : "path", "description" : "ID of pet to update", + "in" : "path", + "name" : "petId", "required" : true, "schema" : { - "type" : "integer", - "format" : "int64" + "format" : "int64", + "type" : "integer" } } ], "requestBody" : { @@ -341,13 +339,13 @@ "schema" : { "properties" : { "additionalMetadata" : { - "type" : "string", - "description" : "Additional data to pass to server" + "description" : "Additional data to pass to server", + "type" : "string" }, "file" : { - "type" : "string", "description" : "file to upload", - "format" : "binary" + "format" : "binary", + "type" : "string" } } } @@ -356,55 +354,54 @@ }, "responses" : { "200" : { - "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ApiResponse" } } - } + }, + "description" : "successful operation" } }, "security" : [ { "petstore_auth" : [ "write:pets", "read:pets" ] - } ] + } ], + "summary" : "uploads an image", + "tags" : [ "pet" ] } }, "/store/inventory" : { "get" : { - "tags" : [ "store" ], - "summary" : "Returns pet inventories by status", "description" : "Returns a map of status codes to quantities", "operationId" : "getInventory", "responses" : { "200" : { - "description" : "successful operation", "content" : { "application/json" : { "schema" : { - "type" : "object", "additionalProperties" : { - "type" : "integer", - "format" : "int32" - } + "format" : "int32", + "type" : "integer" + }, + "type" : "object" } } - } + }, + "description" : "successful operation" } }, "security" : [ { "api_key" : [ ] - } ] + } ], + "summary" : "Returns pet inventories by status", + "tags" : [ "store" ] } }, "/store/order" : { "post" : { - "tags" : [ "store" ], - "summary" : "Place an order for a pet", "operationId" : "placeOrder", "requestBody" : { - "description" : "order placed for purchasing the pet", "content" : { "*/*" : { "schema" : { @@ -412,11 +409,11 @@ } } }, + "description" : "order placed for purchasing the pet", "required" : true }, "responses" : { "200" : { - "description" : "successful operation", "content" : { "application/xml" : { "schema" : { @@ -428,37 +425,62 @@ "$ref" : "#/components/schemas/Order" } } - } + }, + "description" : "successful operation" }, "400" : { - "description" : "Invalid Order", - "content" : { } + "content" : { }, + "description" : "Invalid Order" } }, + "summary" : "Place an order for a pet", + "tags" : [ "store" ], "x-codegen-request-body-name" : "body" } }, "/store/order/{orderId}" : { + "delete" : { + "description" : "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", + "operationId" : "deleteOrder", + "parameters" : [ { + "description" : "ID of the order that needs to be deleted", + "in" : "path", + "name" : "orderId", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { }, + "description" : "Invalid ID supplied" + }, + "404" : { + "content" : { }, + "description" : "Order not found" + } + }, + "summary" : "Delete purchase order by ID", + "tags" : [ "store" ] + }, "get" : { - "tags" : [ "store" ], - "summary" : "Find purchase order by ID", "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", "operationId" : "getOrderById", "parameters" : [ { - "name" : "orderId", - "in" : "path", "description" : "ID of pet that needs to be fetched", + "in" : "path", + "name" : "orderId", "required" : true, "schema" : { + "format" : "int64", "maximum" : 5, "minimum" : 1, - "type" : "integer", - "format" : "int64" + "type" : "integer" } } ], "responses" : { "200" : { - "description" : "successful operation", "content" : { "application/xml" : { "schema" : { @@ -470,52 +492,27 @@ "$ref" : "#/components/schemas/Order" } } - } + }, + "description" : "successful operation" }, "400" : { - "description" : "Invalid ID supplied", - "content" : { } + "content" : { }, + "description" : "Invalid ID supplied" }, "404" : { - "description" : "Order not found", - "content" : { } - } - } - }, - "delete" : { - "tags" : [ "store" ], - "summary" : "Delete purchase order by ID", - "description" : "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", - "operationId" : "deleteOrder", - "parameters" : [ { - "name" : "orderId", - "in" : "path", - "description" : "ID of the order that needs to be deleted", - "required" : true, - "schema" : { - "type" : "string" + "content" : { }, + "description" : "Order not found" } - } ], - "responses" : { - "400" : { - "description" : "Invalid ID supplied", - "content" : { } - }, - "404" : { - "description" : "Order not found", - "content" : { } - } - } + }, + "summary" : "Find purchase order by ID", + "tags" : [ "store" ] } }, "/user" : { "post" : { - "tags" : [ "user" ], - "summary" : "Create user", "description" : "This can only be done by the logged in user.", "operationId" : "createUser", "requestBody" : { - "description" : "Created user object", "content" : { "*/*" : { "schema" : { @@ -523,90 +520,91 @@ } } }, + "description" : "Created user object", "required" : true }, "responses" : { "default" : { - "description" : "successful operation", - "content" : { } + "content" : { }, + "description" : "successful operation" } }, + "summary" : "Create user", + "tags" : [ "user" ], "x-codegen-request-body-name" : "body" } }, "/user/createWithArray" : { "post" : { - "tags" : [ "user" ], - "summary" : "Creates list of users with given input array", "operationId" : "createUsersWithArrayInput", "requestBody" : { - "description" : "List of user object", "content" : { "*/*" : { "schema" : { - "type" : "array", "items" : { "$ref" : "#/components/schemas/User" - } + }, + "type" : "array" } } }, + "description" : "List of user object", "required" : true }, "responses" : { "default" : { - "description" : "successful operation", - "content" : { } + "content" : { }, + "description" : "successful operation" } }, + "summary" : "Creates list of users with given input array", + "tags" : [ "user" ], "x-codegen-request-body-name" : "body" } }, "/user/createWithList" : { "post" : { - "tags" : [ "user" ], - "summary" : "Creates list of users with given input array", "operationId" : "createUsersWithListInput", "requestBody" : { - "description" : "List of user object", "content" : { "*/*" : { "schema" : { - "type" : "array", "items" : { "$ref" : "#/components/schemas/User" - } + }, + "type" : "array" } } }, + "description" : "List of user object", "required" : true }, "responses" : { "default" : { - "description" : "successful operation", - "content" : { } + "content" : { }, + "description" : "successful operation" } }, + "summary" : "Creates list of users with given input array", + "tags" : [ "user" ], "x-codegen-request-body-name" : "body" } }, "/user/login" : { "get" : { - "tags" : [ "user" ], - "summary" : "Logs user into the system", "operationId" : "loginUser", "parameters" : [ { - "name" : "username", - "in" : "query", "description" : "The user name for login", + "in" : "query", + "name" : "username", "required" : true, "schema" : { "type" : "string" } }, { - "name" : "password", - "in" : "query", "description" : "The password for login in clear text", + "in" : "query", + "name" : "password", "required" : true, "schema" : { "type" : "string" @@ -614,65 +612,90 @@ } ], "responses" : { "200" : { - "description" : "successful operation", - "headers" : { - "X-Rate-Limit" : { - "description" : "calls per hour allowed by the user", + "content" : { + "application/xml" : { "schema" : { - "type" : "integer", - "format" : "int32" + "type" : "string" } }, - "X-Expires-After" : { - "description" : "date in UTC when toekn expires", + "application/json" : { "schema" : { - "type" : "string", - "format" : "date-time" + "type" : "string" } } }, - "content" : { - "application/xml" : { + "description" : "successful operation", + "headers" : { + "X-Rate-Limit" : { + "description" : "calls per hour allowed by the user", "schema" : { - "type" : "string" + "format" : "int32", + "type" : "integer" } }, - "application/json" : { + "X-Expires-After" : { + "description" : "date in UTC when toekn expires", "schema" : { + "format" : "date-time", "type" : "string" } } } }, "400" : { - "description" : "Invalid username/password supplied", - "content" : { } + "content" : { }, + "description" : "Invalid username/password supplied" } - } + }, + "summary" : "Logs user into the system", + "tags" : [ "user" ] } }, "/user/logout" : { "get" : { - "tags" : [ "user" ], - "summary" : "Logs out current logged in user session", "operationId" : "logoutUser", "responses" : { "default" : { - "description" : "successful operation", - "content" : { } + "content" : { }, + "description" : "successful operation" } - } + }, + "summary" : "Logs out current logged in user session", + "tags" : [ "user" ] } }, "/user/{username}" : { + "delete" : { + "description" : "This can only be done by the logged in user.", + "operationId" : "deleteUser", + "parameters" : [ { + "description" : "The name that needs to be deleted", + "in" : "path", + "name" : "username", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { }, + "description" : "Invalid username supplied" + }, + "404" : { + "content" : { }, + "description" : "User not found" + } + }, + "summary" : "Delete user", + "tags" : [ "user" ] + }, "get" : { - "tags" : [ "user" ], - "summary" : "Get user by user name", "operationId" : "getUserByName", "parameters" : [ { - "name" : "username", - "in" : "path", "description" : "The name that needs to be fetched. Use user1 for testing.", + "in" : "path", + "name" : "username", "required" : true, "schema" : { "type" : "string" @@ -680,7 +703,6 @@ } ], "responses" : { "200" : { - "description" : "successful operation", "content" : { "application/xml" : { "schema" : { @@ -692,34 +714,34 @@ "$ref" : "#/components/schemas/User" } } - } + }, + "description" : "successful operation" }, "400" : { - "description" : "Invalid username supplied", - "content" : { } + "content" : { }, + "description" : "Invalid username supplied" }, "404" : { - "description" : "User not found", - "content" : { } + "content" : { }, + "description" : "User not found" } - } + }, + "summary" : "Get user by user name", + "tags" : [ "user" ] }, "put" : { - "tags" : [ "user" ], - "summary" : "Updated user", "description" : "This can only be done by the logged in user.", "operationId" : "updateUser", "parameters" : [ { - "name" : "username", - "in" : "path", "description" : "name that need to be deleted", + "in" : "path", + "name" : "username", "required" : true, "schema" : { "type" : "string" } } ], "requestBody" : { - "description" : "Updated user object", "content" : { "*/*" : { "schema" : { @@ -727,120 +749,107 @@ } } }, + "description" : "Updated user object", "required" : true }, "responses" : { "400" : { - "description" : "Invalid user supplied", - "content" : { } + "content" : { }, + "description" : "Invalid user supplied" }, "404" : { - "description" : "User not found", - "content" : { } + "content" : { }, + "description" : "User not found" } }, - "x-codegen-request-body-name" : "body" - }, - "delete" : { + "summary" : "Updated user", "tags" : [ "user" ], - "summary" : "Delete user", - "description" : "This can only be done by the logged in user.", - "operationId" : "deleteUser", - "parameters" : [ { - "name" : "username", - "in" : "path", - "description" : "The name that needs to be deleted", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "400" : { - "description" : "Invalid username supplied", - "content" : { } - }, - "404" : { - "description" : "User not found", - "content" : { } - } - } + "x-codegen-request-body-name" : "body" } } }, "components" : { "schemas" : { "Order" : { - "title" : "Pet Order", - "type" : "object", + "description" : "An order for a pets from the pet store", + "example" : { + "petId" : 6, + "quantity" : 1, + "id" : 0, + "shipDate" : "2000-01-23T04:56:07.000+00:00", + "complete" : false, + "status" : "placed" + }, "properties" : { "id" : { - "type" : "integer", - "format" : "int64" + "format" : "int64", + "type" : "integer" }, "petId" : { - "type" : "integer", - "format" : "int64" + "format" : "int64", + "type" : "integer" }, "quantity" : { - "type" : "integer", - "format" : "int32" + "format" : "int32", + "type" : "integer" }, "shipDate" : { - "type" : "string", - "format" : "date-time" + "format" : "date-time", + "type" : "string" }, "status" : { - "type" : "string", "description" : "Order Status", - "enum" : [ "placed", "approved", "delivered" ] + "enum" : [ "placed", "approved", "delivered" ], + "type" : "string" }, "complete" : { - "type" : "boolean", - "default" : false + "default" : false, + "type" : "boolean" } }, - "description" : "An order for a pets from the pet store", - "example" : { - "petId" : 6, - "quantity" : 1, - "id" : 0, - "shipDate" : "2000-01-23T04:56:07.000+00:00", - "complete" : false, - "status" : "placed" - }, + "title" : "Pet Order", + "type" : "object", "xml" : { "name" : "Order" } }, "Category" : { - "title" : "Pet category", - "type" : "object", + "description" : "A category for a pet", + "example" : { + "name" : "name", + "id" : 6 + }, "properties" : { "id" : { - "type" : "integer", - "format" : "int64" + "format" : "int64", + "type" : "integer" }, "name" : { "type" : "string" } }, - "description" : "A category for a pet", - "example" : { - "name" : "name", - "id" : 6 - }, + "title" : "Pet category", + "type" : "object", "xml" : { "name" : "Category" } }, "User" : { - "title" : "a User", - "type" : "object", + "description" : "A User who is purchasing from the pet store", + "example" : { + "firstName" : "firstName", + "lastName" : "lastName", + "password" : "password", + "userStatus" : 6, + "phone" : "phone", + "id" : 0, + "email" : "email", + "username" : "username" + }, "properties" : { "id" : { - "type" : "integer", - "format" : "int64" + "format" : "int64", + "type" : "integer" }, "username" : { "type" : "string" @@ -861,118 +870,113 @@ "type" : "string" }, "userStatus" : { - "type" : "integer", "description" : "User Status", - "format" : "int32" + "format" : "int32", + "type" : "integer" } }, - "description" : "A User who is purchasing from the pet store", - "example" : { - "firstName" : "firstName", - "lastName" : "lastName", - "password" : "password", - "userStatus" : 6, - "phone" : "phone", - "id" : 0, - "email" : "email", - "username" : "username" - }, + "title" : "a User", + "type" : "object", "xml" : { "name" : "User" } }, "Tag" : { - "title" : "Pet Tag", - "type" : "object", + "description" : "A tag for a pet", + "example" : { + "name" : "name", + "id" : 1 + }, "properties" : { "id" : { - "type" : "integer", - "format" : "int64" + "format" : "int64", + "type" : "integer" }, "name" : { "type" : "string" } }, - "description" : "A tag for a pet", - "example" : { - "name" : "name", - "id" : 1 - }, + "title" : "Pet Tag", + "type" : "object", "xml" : { "name" : "Tag" } }, "Pet" : { - "title" : "a Pet", - "required" : [ "name", "photoUrls" ], - "type" : "object", + "description" : "A pet for sale in the pet store", + "example" : { + "photoUrls" : [ "photoUrls", "photoUrls" ], + "name" : "doggie", + "id" : 0, + "category" : { + "name" : "name", + "id" : 6 + }, + "tags" : [ { + "name" : "name", + "id" : 1 + }, { + "name" : "name", + "id" : 1 + } ], + "status" : "available" + }, "properties" : { "id" : { - "type" : "integer", - "format" : "int64" + "format" : "int64", + "type" : "integer" }, "category" : { "$ref" : "#/components/schemas/Category" }, "name" : { - "type" : "string", - "example" : "doggie" + "example" : "doggie", + "type" : "string" }, "photoUrls" : { + "items" : { + "type" : "string" + }, "type" : "array", "xml" : { "name" : "photoUrl", "wrapped" : true - }, - "items" : { - "type" : "string" } }, "tags" : { + "items" : { + "$ref" : "#/components/schemas/Tag" + }, "type" : "array", "xml" : { "name" : "tag", "wrapped" : true - }, - "items" : { - "$ref" : "#/components/schemas/Tag" } }, "status" : { - "type" : "string", "description" : "pet status in the store", - "enum" : [ "available", "pending", "sold" ] + "enum" : [ "available", "pending", "sold" ], + "type" : "string" } }, - "description" : "A pet for sale in the pet store", - "example" : { - "photoUrls" : [ "photoUrls", "photoUrls" ], - "name" : "doggie", - "id" : 0, - "category" : { - "name" : "name", - "id" : 6 - }, - "tags" : [ { - "name" : "name", - "id" : 1 - }, { - "name" : "name", - "id" : 1 - } ], - "status" : "available" - }, + "required" : [ "name", "photoUrls" ], + "title" : "a Pet", + "type" : "object", "xml" : { "name" : "Pet" } }, "ApiResponse" : { - "title" : "An uploaded response", - "type" : "object", + "description" : "Describes the result of uploading an image resource", + "example" : { + "code" : 0, + "type" : "type", + "message" : "message" + }, "properties" : { "code" : { - "type" : "integer", - "format" : "int32" + "format" : "int32", + "type" : "integer" }, "type" : { "type" : "string" @@ -981,17 +985,12 @@ "type" : "string" } }, - "description" : "Describes the result of uploading an image resource", - "example" : { - "code" : 0, - "type" : "type", - "message" : "message" - } + "title" : "An uploaded response", + "type" : "object" } }, "securitySchemes" : { "petstore_auth" : { - "type" : "oauth2", "flows" : { "implicit" : { "authorizationUrl" : "http://petstore.swagger.io/api/oauth/dialog", @@ -1000,12 +999,13 @@ "read:pets" : "read your pets" } } - } + }, + "type" : "oauth2" }, "api_key" : { - "type" : "apiKey", + "in" : "header", "name" : "api_key", - "in" : "header" + "type" : "apiKey" } } }