diff --git a/.github/workflows/samples-dotnet.yaml b/.github/workflows/samples-dotnet.yaml
index ddae0329c66..2edaf7f92a2 100644
--- a/.github/workflows/samples-dotnet.yaml
+++ b/.github/workflows/samples-dotnet.yaml
@@ -8,7 +8,6 @@ on:
- 'samples/server/petstore/aspnetcore-6.0/**'
- 'samples/server/petstore/aspnetcore-6.0-pocoModels/**'
- 'samples/server/petstore/aspnetcore-6.0-useSwashBuckle/**'
- - 'samples/server/petstore/aspnetcore-6.0-useNewtonsoft/**'
pull_request:
paths:
- 'samples/client/petstore/csharp/**net6.0**/'
diff --git a/.github/workflows/samples-dotnet6-server.yaml b/.github/workflows/samples-dotnet6-server.yaml
index aff0bb3a803..6f91443ad1a 100644
--- a/.github/workflows/samples-dotnet6-server.yaml
+++ b/.github/workflows/samples-dotnet6-server.yaml
@@ -6,7 +6,6 @@ on:
- 'samples/server/petstore/aspnetcore-6.0/**'
- 'samples/server/petstore/aspnetcore-6.0-pocoModels/**'
- 'samples/server/petstore/aspnetcore-6.0-useSwashBuckle/**'
- - 'samples/server/petstore/aspnetcore-6.0-useNewtonsoft/**'
pull_request:
paths:
- 'samples/server/petstore/aspnetcore-6.0/**'
diff --git a/bin/configs/unmaintained/openapi3/cpp-qt5-client-cpp-qt5.yaml b/bin/configs/unmaintained/openapi3/cpp-qt-client-cpp-qt.yaml
similarity index 62%
rename from bin/configs/unmaintained/openapi3/cpp-qt5-client-cpp-qt5.yaml
rename to bin/configs/unmaintained/openapi3/cpp-qt-client-cpp-qt.yaml
index 904d99a7510..8e9d8cf5bb8 100644
--- a/bin/configs/unmaintained/openapi3/cpp-qt5-client-cpp-qt5.yaml
+++ b/bin/configs/unmaintained/openapi3/cpp-qt-client-cpp-qt.yaml
@@ -1,4 +1,4 @@
-generatorName: cpp-qt5-client
-outputDir: samples/client/petstore/cpp-qt5
+generatorName: cpp-qt-client
+outputDir: samples/client/petstore/cpp-qt
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
-templateDir: modules/openapi-generator/src/main/resources/cpp-qt5-client
+templateDir: modules/openapi-generator/src/main/resources/cpp-qt-client
diff --git a/bin/configs/unmaintained/openapi3/cpp-qt5-qhttpengine-server.yaml b/bin/configs/unmaintained/openapi3/cpp-qt-qhttpengine-server.yaml
similarity index 52%
rename from bin/configs/unmaintained/openapi3/cpp-qt5-qhttpengine-server.yaml
rename to bin/configs/unmaintained/openapi3/cpp-qt-qhttpengine-server.yaml
index 285c0d9d5dd..8cd3281d3ab 100644
--- a/bin/configs/unmaintained/openapi3/cpp-qt5-qhttpengine-server.yaml
+++ b/bin/configs/unmaintained/openapi3/cpp-qt-qhttpengine-server.yaml
@@ -1,4 +1,4 @@
-generatorName: cpp-qt5-qhttpengine-server
-outputDir: samples/client/petstore/cpp-qt5-qhttpengine-server
+generatorName: cpp-qt-qhttpengine-server
+outputDir: samples/client/petstore/cpp-qt-qhttpengine-server
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
-templateDir: modules/openapi-generator/src/main/resources/cpp-qt5-qhttpengine-server
+templateDir: modules/openapi-generator/src/main/resources/cpp-qt-qhttpengine-server
diff --git a/bin/configs/unmaintained/openapi3/csharp-OpenAPIClient.yaml b/bin/configs/unmaintained/openapi3/csharp-OpenAPIClient.yaml
deleted file mode 100644
index 24a5fd2b5b3..00000000000
--- a/bin/configs/unmaintained/openapi3/csharp-OpenAPIClient.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
-generatorName: csharp
-outputDir: samples/openapi3/client/petstore/csharp/OpenAPIClient
-inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
-templateDir: modules/openapi-generator/src/main/resources/csharp
-additionalProperties:
- packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
diff --git a/bin/configs/unmaintained/openapi3/csharp-OpenAPIClientNetStandard.yaml b/bin/configs/unmaintained/openapi3/csharp-OpenAPIClientNetStandard.yaml
deleted file mode 100644
index e2dcfd8e9a2..00000000000
--- a/bin/configs/unmaintained/openapi3/csharp-OpenAPIClientNetStandard.yaml
+++ /dev/null
@@ -1,7 +0,0 @@
-generatorName: csharp
-outputDir: samples/client/petstore/csharp/OpenAPIClientNetStandard
-inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
-templateDir: modules/openapi-generator/src/main/resources/csharp
-additionalProperties:
- targetFramework: netstandard1.3
- packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
diff --git a/bin/configs/unmaintained/openapi3/csharp-OpenAPIClientWithPropertyChanged.yaml b/bin/configs/unmaintained/openapi3/csharp-OpenAPIClientWithPropertyChanged.yaml
deleted file mode 100644
index 03034797145..00000000000
--- a/bin/configs/unmaintained/openapi3/csharp-OpenAPIClientWithPropertyChanged.yaml
+++ /dev/null
@@ -1,8 +0,0 @@
-generatorName: csharp
-outputDir: samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged
-inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
-templateDir: modules/openapi-generator/src/main/resources/csharp
-additionalProperties:
- packageGuid: '{5CD900DE-8266-412F-A758-28E1F9C623D5}'
- generatePropertyChanged: "true"
- optionalEmitDefaultValues: "true"
diff --git a/bin/configs/unmaintained/openapi3/csharp-dotnet2-OpenAPIClient.yaml b/bin/configs/unmaintained/openapi3/csharp-dotnet2-OpenAPIClient.yaml
deleted file mode 100644
index 428ce87b8b9..00000000000
--- a/bin/configs/unmaintained/openapi3/csharp-dotnet2-OpenAPIClient.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
-generatorName: csharp-dotnet2
-outputDir: samples/client/petstore/csharp-dotnet2/OpenAPIClientTest/Lib/OpenAPIClient
-inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
-templateDir: modules/openapi-generator/src/main/resources/csharp-dotnet2
-additionalProperties:
- hideGenerationTimestamp: "true"
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractEiffelCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractEiffelCodegen.java
index 112861cbb8f..5ec99bafe61 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractEiffelCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractEiffelCodegen.java
@@ -278,9 +278,6 @@ public abstract class AbstractEiffelCodegen extends DefaultCodegen implements Co
childrenByParent.put(model.parent, model);
}
}
- if (StringUtils.isNotBlank(model.parentSchema)) {
- model.parentSchema = model.parentSchema.toLowerCase(Locale.ROOT);
- }
}
@Override
diff --git a/samples/client/petstore/async-scala/.openapi-generator-ignore b/samples/client/petstore/async-scala/.openapi-generator-ignore
deleted file mode 100644
index deed424f8a1..00000000000
--- a/samples/client/petstore/async-scala/.openapi-generator-ignore
+++ /dev/null
@@ -1,23 +0,0 @@
-# Swagger Codegen Ignore
-# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen
-
-# Use this file to prevent files from being overwritten by the generator.
-# The patterns follow closely to .gitignore or .dockerignore.
-
-# As an example, the C# client generator defines ApiClient.cs.
-# You can make changes and tell Swagger Codegen to ignore just this file by uncommenting the following line:
-#ApiClient.cs
-
-# You can match any string of characters against a directory, file or extension with a single asterisk (*):
-#foo/*/qux
-# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
-
-# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
-#foo/**/qux
-# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
-
-# You can also negate patterns with an exclamation (!).
-# For example, you can ignore all files in a docs folder with the file extension .md:
-#docs/*.md
-# Then explicitly reverse the ignore rule for a single file:
-#!docs/README.md
diff --git a/samples/client/petstore/async-scala/.openapi-generator/VERSION b/samples/client/petstore/async-scala/.openapi-generator/VERSION
deleted file mode 100644
index 7fea99011a6..00000000000
--- a/samples/client/petstore/async-scala/.openapi-generator/VERSION
+++ /dev/null
@@ -1 +0,0 @@
-2.2.3-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/async-scala/build.sbt b/samples/client/petstore/async-scala/build.sbt
deleted file mode 100644
index e612d5937ea..00000000000
--- a/samples/client/petstore/async-scala/build.sbt
+++ /dev/null
@@ -1,12 +0,0 @@
-organization := ""
-
-name := "-client"
-
-libraryDependencies ++= Seq(
- "com.wordnik.swagger" %% "swagger-async-httpclient" % "0.3.5",
- "joda-time" % "joda-time" % "2.3",
- "org.joda" % "joda-convert" % "1.3.1",
- "ch.qos.logback" % "logback-classic" % "1.0.13" % "provided",
- "org.scalatest" %% "scalatest" % "2.2.1" % "test",
- "junit" % "junit" % "4.11" % "test"
-)
diff --git a/samples/client/petstore/async-scala/src/main/scala/io/swagger/client/SwaggerClient.scala b/samples/client/petstore/async-scala/src/main/scala/io/swagger/client/SwaggerClient.scala
deleted file mode 100644
index 7c4afb20e09..00000000000
--- a/samples/client/petstore/async-scala/src/main/scala/io/swagger/client/SwaggerClient.scala
+++ /dev/null
@@ -1,28 +0,0 @@
-package io.swagger.client
-
-import io.swagger.client.api._
-
-import com.wordnik.swagger.client._
-
-import java.io.Closeable
-
-class SwaggerClient(config: SwaggerConfig) extends Closeable {
- val locator = config.locator
- val name = config.name
-
- private[this] val client = transportClient
-
- protected def transportClient: TransportClient = new RestClient(config)
-
- val pet = new PetApi(client, config)
-
- val store = new StoreApi(client, config)
-
- val user = new UserApi(client, config)
-
-
- def close() {
- client.close()
- }
-}
-
diff --git a/samples/client/petstore/async-scala/src/main/scala/io/swagger/client/api/PetApi.scala b/samples/client/petstore/async-scala/src/main/scala/io/swagger/client/api/PetApi.scala
deleted file mode 100644
index f11d2aaa1b5..00000000000
--- a/samples/client/petstore/async-scala/src/main/scala/io/swagger/client/api/PetApi.scala
+++ /dev/null
@@ -1,155 +0,0 @@
-package io.swagger.client.api
-
-import io.swagger.client.model.ApiResponse
-import java.io.File
-import io.swagger.client.model.Pet
-import com.wordnik.swagger.client._
-import scala.concurrent.Future
-import collection.mutable
-
-class PetApi(client: TransportClient, config: SwaggerConfig) extends ApiClient(client, config) {
-
- def addPet(body: Pet)(implicit reader: ClientResponseReader[Unit], writer: RequestWriter[Pet]): Future[Unit] = {
- // create path and map variables
- val path = (addFmt("/pet"))
-
- // query params
- val queryParams = new mutable.HashMap[String, String]
- val headerParams = new mutable.HashMap[String, String]
-
- if (body == null) throw new Exception("Missing required parameter 'body' when calling PetApi->addPet")
-
- val resFuture = client.submit("POST", path, queryParams.toMap, headerParams.toMap, writer.write(body))
- resFuture flatMap { resp =>
- process(reader.read(resp))
- }
- }
-
- def deletePet(petId: Long,
- apiKey: Option[String] = None
- )(implicit reader: ClientResponseReader[Unit]): Future[Unit] = {
- // create path and map variables
- val path = (addFmt("/pet/{petId}")
- replaceAll ("\\{" + "petId" + "\\}",petId.toString))
-
- // query params
- val queryParams = new mutable.HashMap[String, String]
- val headerParams = new mutable.HashMap[String, String]
-
- apiKey match {
- case Some(param) => headerParams += "api_key" -> param.toString
- case _ => headerParams
- }
-
- val resFuture = client.submit("DELETE", path, queryParams.toMap, headerParams.toMap, "")
- resFuture flatMap { resp =>
- process(reader.read(resp))
- }
- }
-
- def findPetsByStatus(status: List[String])(implicit reader: ClientResponseReader[List[Pet]]): Future[List[Pet]] = {
- // create path and map variables
- val path = (addFmt("/pet/findByStatus"))
-
- // query params
- val queryParams = new mutable.HashMap[String, String]
- val headerParams = new mutable.HashMap[String, String]
-
- if (status == null) throw new Exception("Missing required parameter 'status' when calling PetApi->findPetsByStatus")
- queryParams += "status" -> status.toString
-
- val resFuture = client.submit("GET", path, queryParams.toMap, headerParams.toMap, "")
- resFuture flatMap { resp =>
- process(reader.read(resp))
- }
- }
-
- def findPetsByTags(tags: List[String])(implicit reader: ClientResponseReader[List[Pet]]): Future[List[Pet]] = {
- // create path and map variables
- val path = (addFmt("/pet/findByTags"))
-
- // query params
- val queryParams = new mutable.HashMap[String, String]
- val headerParams = new mutable.HashMap[String, String]
-
- if (tags == null) throw new Exception("Missing required parameter 'tags' when calling PetApi->findPetsByTags")
- queryParams += "tags" -> tags.toString
-
- val resFuture = client.submit("GET", path, queryParams.toMap, headerParams.toMap, "")
- resFuture flatMap { resp =>
- process(reader.read(resp))
- }
- }
-
- def getPetById(petId: Long)(implicit reader: ClientResponseReader[Pet]): Future[Pet] = {
- // create path and map variables
- val path = (addFmt("/pet/{petId}")
- replaceAll ("\\{" + "petId" + "\\}",petId.toString))
-
- // query params
- val queryParams = new mutable.HashMap[String, String]
- val headerParams = new mutable.HashMap[String, String]
-
-
- val resFuture = client.submit("GET", path, queryParams.toMap, headerParams.toMap, "")
- resFuture flatMap { resp =>
- process(reader.read(resp))
- }
- }
-
- def updatePet(body: Pet)(implicit reader: ClientResponseReader[Unit], writer: RequestWriter[Pet]): Future[Unit] = {
- // create path and map variables
- val path = (addFmt("/pet"))
-
- // query params
- val queryParams = new mutable.HashMap[String, String]
- val headerParams = new mutable.HashMap[String, String]
-
- if (body == null) throw new Exception("Missing required parameter 'body' when calling PetApi->updatePet")
-
- val resFuture = client.submit("PUT", path, queryParams.toMap, headerParams.toMap, writer.write(body))
- resFuture flatMap { resp =>
- process(reader.read(resp))
- }
- }
-
- def updatePetWithForm(petId: Long,
- name: Option[String] = None,
- status: Option[String] = None
- )(implicit reader: ClientResponseReader[Unit]): Future[Unit] = {
- // create path and map variables
- val path = (addFmt("/pet/{petId}")
- replaceAll ("\\{" + "petId" + "\\}",petId.toString))
-
- // query params
- val queryParams = new mutable.HashMap[String, String]
- val headerParams = new mutable.HashMap[String, String]
-
-
- val resFuture = client.submit("POST", path, queryParams.toMap, headerParams.toMap, "")
- resFuture flatMap { resp =>
- process(reader.read(resp))
- }
- }
-
- def uploadFile(petId: Long,
- additionalMetadata: Option[String] = None,
- file: Option[File] = None
- )(implicit reader: ClientResponseReader[ApiResponse]): Future[ApiResponse] = {
- // create path and map variables
- val path = (addFmt("/pet/{petId}/uploadImage")
- replaceAll ("\\{" + "petId" + "\\}",petId.toString))
-
- // query params
- val queryParams = new mutable.HashMap[String, String]
- val headerParams = new mutable.HashMap[String, String]
-
-
- val resFuture = client.submit("POST", path, queryParams.toMap, headerParams.toMap, "")
- resFuture flatMap { resp =>
- process(reader.read(resp))
- }
- }
-
-
-}
diff --git a/samples/client/petstore/async-scala/src/main/scala/io/swagger/client/api/StoreApi.scala b/samples/client/petstore/async-scala/src/main/scala/io/swagger/client/api/StoreApi.scala
deleted file mode 100644
index 22fb3706712..00000000000
--- a/samples/client/petstore/async-scala/src/main/scala/io/swagger/client/api/StoreApi.scala
+++ /dev/null
@@ -1,76 +0,0 @@
-package io.swagger.client.api
-
-import io.swagger.client.model.Order
-import com.wordnik.swagger.client._
-import scala.concurrent.Future
-import collection.mutable
-
-class StoreApi(client: TransportClient, config: SwaggerConfig) extends ApiClient(client, config) {
-
- def deleteOrder(orderId: String)(implicit reader: ClientResponseReader[Unit]): Future[Unit] = {
- // create path and map variables
- val path = (addFmt("/store/order/{orderId}")
- replaceAll ("\\{" + "orderId" + "\\}",orderId.toString))
-
- // query params
- val queryParams = new mutable.HashMap[String, String]
- val headerParams = new mutable.HashMap[String, String]
-
- if (orderId == null) throw new Exception("Missing required parameter 'orderId' when calling StoreApi->deleteOrder")
-
-
- val resFuture = client.submit("DELETE", path, queryParams.toMap, headerParams.toMap, "")
- resFuture flatMap { resp =>
- process(reader.read(resp))
- }
- }
-
- def getInventory()(implicit reader: ClientResponseReader[Map[String, Integer]]): Future[Map[String, Integer]] = {
- // create path and map variables
- val path = (addFmt("/store/inventory"))
-
- // query params
- val queryParams = new mutable.HashMap[String, String]
- val headerParams = new mutable.HashMap[String, String]
-
-
- val resFuture = client.submit("GET", path, queryParams.toMap, headerParams.toMap, "")
- resFuture flatMap { resp =>
- process(reader.read(resp))
- }
- }
-
- def getOrderById(orderId: Long)(implicit reader: ClientResponseReader[Order]): Future[Order] = {
- // create path and map variables
- val path = (addFmt("/store/order/{orderId}")
- replaceAll ("\\{" + "orderId" + "\\}",orderId.toString))
-
- // query params
- val queryParams = new mutable.HashMap[String, String]
- val headerParams = new mutable.HashMap[String, String]
-
-
- val resFuture = client.submit("GET", path, queryParams.toMap, headerParams.toMap, "")
- resFuture flatMap { resp =>
- process(reader.read(resp))
- }
- }
-
- def placeOrder(body: Order)(implicit reader: ClientResponseReader[Order], writer: RequestWriter[Order]): Future[Order] = {
- // create path and map variables
- val path = (addFmt("/store/order"))
-
- // query params
- val queryParams = new mutable.HashMap[String, String]
- val headerParams = new mutable.HashMap[String, String]
-
- if (body == null) throw new Exception("Missing required parameter 'body' when calling StoreApi->placeOrder")
-
- val resFuture = client.submit("POST", path, queryParams.toMap, headerParams.toMap, writer.write(body))
- resFuture flatMap { resp =>
- process(reader.read(resp))
- }
- }
-
-
-}
diff --git a/samples/client/petstore/async-scala/src/main/scala/io/swagger/client/api/UserApi.scala b/samples/client/petstore/async-scala/src/main/scala/io/swagger/client/api/UserApi.scala
deleted file mode 100644
index 025c9f26925..00000000000
--- a/samples/client/petstore/async-scala/src/main/scala/io/swagger/client/api/UserApi.scala
+++ /dev/null
@@ -1,152 +0,0 @@
-package io.swagger.client.api
-
-import io.swagger.client.model.User
-import com.wordnik.swagger.client._
-import scala.concurrent.Future
-import collection.mutable
-
-class UserApi(client: TransportClient, config: SwaggerConfig) extends ApiClient(client, config) {
-
- def createUser(body: User)(implicit reader: ClientResponseReader[Unit], writer: RequestWriter[User]): Future[Unit] = {
- // create path and map variables
- val path = (addFmt("/user"))
-
- // query params
- val queryParams = new mutable.HashMap[String, String]
- val headerParams = new mutable.HashMap[String, String]
-
- if (body == null) throw new Exception("Missing required parameter 'body' when calling UserApi->createUser")
-
- val resFuture = client.submit("POST", path, queryParams.toMap, headerParams.toMap, writer.write(body))
- resFuture flatMap { resp =>
- process(reader.read(resp))
- }
- }
-
- def createUsersWithArrayInput(body: List[User])(implicit reader: ClientResponseReader[Unit], writer: RequestWriter[List[User]]): Future[Unit] = {
- // create path and map variables
- val path = (addFmt("/user/createWithArray"))
-
- // query params
- val queryParams = new mutable.HashMap[String, String]
- val headerParams = new mutable.HashMap[String, String]
-
- if (body == null) throw new Exception("Missing required parameter 'body' when calling UserApi->createUsersWithArrayInput")
-
- val resFuture = client.submit("POST", path, queryParams.toMap, headerParams.toMap, writer.write(body))
- resFuture flatMap { resp =>
- process(reader.read(resp))
- }
- }
-
- def createUsersWithListInput(body: List[User])(implicit reader: ClientResponseReader[Unit], writer: RequestWriter[List[User]]): Future[Unit] = {
- // create path and map variables
- val path = (addFmt("/user/createWithList"))
-
- // query params
- val queryParams = new mutable.HashMap[String, String]
- val headerParams = new mutable.HashMap[String, String]
-
- if (body == null) throw new Exception("Missing required parameter 'body' when calling UserApi->createUsersWithListInput")
-
- val resFuture = client.submit("POST", path, queryParams.toMap, headerParams.toMap, writer.write(body))
- resFuture flatMap { resp =>
- process(reader.read(resp))
- }
- }
-
- def deleteUser(username: String)(implicit reader: ClientResponseReader[Unit]): Future[Unit] = {
- // create path and map variables
- val path = (addFmt("/user/{username}")
- replaceAll ("\\{" + "username" + "\\}",username.toString))
-
- // query params
- val queryParams = new mutable.HashMap[String, String]
- val headerParams = new mutable.HashMap[String, String]
-
- if (username == null) throw new Exception("Missing required parameter 'username' when calling UserApi->deleteUser")
-
-
- val resFuture = client.submit("DELETE", path, queryParams.toMap, headerParams.toMap, "")
- resFuture flatMap { resp =>
- process(reader.read(resp))
- }
- }
-
- def getUserByName(username: String)(implicit reader: ClientResponseReader[User]): Future[User] = {
- // create path and map variables
- val path = (addFmt("/user/{username}")
- replaceAll ("\\{" + "username" + "\\}",username.toString))
-
- // query params
- val queryParams = new mutable.HashMap[String, String]
- val headerParams = new mutable.HashMap[String, String]
-
- if (username == null) throw new Exception("Missing required parameter 'username' when calling UserApi->getUserByName")
-
-
- val resFuture = client.submit("GET", path, queryParams.toMap, headerParams.toMap, "")
- resFuture flatMap { resp =>
- process(reader.read(resp))
- }
- }
-
- def loginUser(username: String,
- password: String)(implicit reader: ClientResponseReader[String]): Future[String] = {
- // create path and map variables
- val path = (addFmt("/user/login"))
-
- // query params
- val queryParams = new mutable.HashMap[String, String]
- val headerParams = new mutable.HashMap[String, String]
-
- if (username == null) throw new Exception("Missing required parameter 'username' when calling UserApi->loginUser")
-
- if (password == null) throw new Exception("Missing required parameter 'password' when calling UserApi->loginUser")
-
- queryParams += "username" -> username.toString
- queryParams += "password" -> password.toString
-
- val resFuture = client.submit("GET", path, queryParams.toMap, headerParams.toMap, "")
- resFuture flatMap { resp =>
- process(reader.read(resp))
- }
- }
-
- def logoutUser()(implicit reader: ClientResponseReader[Unit]): Future[Unit] = {
- // create path and map variables
- val path = (addFmt("/user/logout"))
-
- // query params
- val queryParams = new mutable.HashMap[String, String]
- val headerParams = new mutable.HashMap[String, String]
-
-
- val resFuture = client.submit("GET", path, queryParams.toMap, headerParams.toMap, "")
- resFuture flatMap { resp =>
- process(reader.read(resp))
- }
- }
-
- def updateUser(username: String,
- body: User)(implicit reader: ClientResponseReader[Unit], writer: RequestWriter[User]): Future[Unit] = {
- // create path and map variables
- val path = (addFmt("/user/{username}")
- replaceAll ("\\{" + "username" + "\\}",username.toString))
-
- // query params
- val queryParams = new mutable.HashMap[String, String]
- val headerParams = new mutable.HashMap[String, String]
-
- if (username == null) throw new Exception("Missing required parameter 'username' when calling UserApi->updateUser")
-
- if (body == null) throw new Exception("Missing required parameter 'body' when calling UserApi->updateUser")
-
- val resFuture = client.submit("PUT", path, queryParams.toMap, headerParams.toMap, writer.write(body))
- resFuture flatMap { resp =>
- process(reader.read(resp))
- }
- }
-
-
-}
diff --git a/samples/client/petstore/async-scala/src/main/scala/io/swagger/client/model/ApiResponse.scala b/samples/client/petstore/async-scala/src/main/scala/io/swagger/client/model/ApiResponse.scala
deleted file mode 100644
index d1d2c29d588..00000000000
--- a/samples/client/petstore/async-scala/src/main/scala/io/swagger/client/model/ApiResponse.scala
+++ /dev/null
@@ -1,11 +0,0 @@
-package io.swagger.client.model
-
-import org.joda.time.DateTime
-import java.util.UUID
-
-
-case class ApiResponse (
- code: Option[Integer],
-_type: Option[String],
-message: Option[String]
-)
diff --git a/samples/client/petstore/async-scala/src/main/scala/io/swagger/client/model/Category.scala b/samples/client/petstore/async-scala/src/main/scala/io/swagger/client/model/Category.scala
deleted file mode 100644
index afd533df15e..00000000000
--- a/samples/client/petstore/async-scala/src/main/scala/io/swagger/client/model/Category.scala
+++ /dev/null
@@ -1,10 +0,0 @@
-package io.swagger.client.model
-
-import org.joda.time.DateTime
-import java.util.UUID
-
-
-case class Category (
- id: Option[Long],
-name: Option[String]
-)
diff --git a/samples/client/petstore/async-scala/src/main/scala/io/swagger/client/model/Order.scala b/samples/client/petstore/async-scala/src/main/scala/io/swagger/client/model/Order.scala
deleted file mode 100644
index 42f4859e2e3..00000000000
--- a/samples/client/petstore/async-scala/src/main/scala/io/swagger/client/model/Order.scala
+++ /dev/null
@@ -1,14 +0,0 @@
-package io.swagger.client.model
-
-import org.joda.time.DateTime
-import java.util.UUID
-
-
-case class Order (
- id: Option[Long],
-petId: Option[Long],
-quantity: Option[Integer],
-shipDate: Option[DateTime],
-status: Option[String], // Order Status
-complete: Option[Boolean]
-)
diff --git a/samples/client/petstore/async-scala/src/main/scala/io/swagger/client/model/Pet.scala b/samples/client/petstore/async-scala/src/main/scala/io/swagger/client/model/Pet.scala
deleted file mode 100644
index f296c7f7146..00000000000
--- a/samples/client/petstore/async-scala/src/main/scala/io/swagger/client/model/Pet.scala
+++ /dev/null
@@ -1,14 +0,0 @@
-package io.swagger.client.model
-
-import org.joda.time.DateTime
-import java.util.UUID
-
-
-case class Pet (
- id: Option[Long],
-category: Option[Category],
-name: String,
-photoUrls: List[String],
-tags: Option[List[Tag]],
-status: Option[String] // pet status in the store
-)
diff --git a/samples/client/petstore/async-scala/src/main/scala/io/swagger/client/model/Tag.scala b/samples/client/petstore/async-scala/src/main/scala/io/swagger/client/model/Tag.scala
deleted file mode 100644
index 3d7772c5659..00000000000
--- a/samples/client/petstore/async-scala/src/main/scala/io/swagger/client/model/Tag.scala
+++ /dev/null
@@ -1,10 +0,0 @@
-package io.swagger.client.model
-
-import org.joda.time.DateTime
-import java.util.UUID
-
-
-case class Tag (
- id: Option[Long],
-name: Option[String]
-)
diff --git a/samples/client/petstore/async-scala/src/main/scala/io/swagger/client/model/User.scala b/samples/client/petstore/async-scala/src/main/scala/io/swagger/client/model/User.scala
deleted file mode 100644
index e016b7a88dd..00000000000
--- a/samples/client/petstore/async-scala/src/main/scala/io/swagger/client/model/User.scala
+++ /dev/null
@@ -1,16 +0,0 @@
-package io.swagger.client.model
-
-import org.joda.time.DateTime
-import java.util.UUID
-
-
-case class User (
- id: Option[Long],
-username: Option[String],
-firstName: Option[String],
-lastName: Option[String],
-email: Option[String],
-password: Option[String],
-phone: Option[String],
-userStatus: Option[Integer] // User Status
-)
diff --git a/samples/client/petstore/async-scala/src/test/scala/Test.scala b/samples/client/petstore/async-scala/src/test/scala/Test.scala
deleted file mode 100644
index 796c96ca822..00000000000
--- a/samples/client/petstore/async-scala/src/test/scala/Test.scala
+++ /dev/null
@@ -1,36 +0,0 @@
-import java.net.URI
-
-import com.wordnik.swagger.client.ClientResponseReaders.Json4sFormatsReader._
-import com.wordnik.swagger.client.RequestWriters.Json4sFormatsWriter._
-import com.wordnik.swagger.client.SwaggerConfig
-import io.swagger.client.SwaggerClient
-import org.junit.runner.RunWith
-import org.scalatest._
-import org.scalatest.junit.JUnitRunner
-
-import scala.concurrent.ExecutionContext.Implicits.global
-import scala.concurrent._
-import scala.concurrent.duration._
-import scala.util.{Failure, Success}
-
-@RunWith(classOf[JUnitRunner])
-class SimpleTest extends FlatSpec with Matchers {
- implicit val formats = org.json4s.DefaultFormats
- implicit val reader = JsonFormatsReader
- implicit val writer = JsonFormatsWriter
-
- it should "call the api" in {
- val config = SwaggerConfig.forUrl(new URI("http://petstore.swagger.io/v2"))
- val client = new SwaggerClient(config)
-
- val future = client.pet.getPetById(3)
- val await = Await.ready(future, Duration.Inf)
-
- await onComplete {
- case Success(pet) => {
- println(pet)
- }
- case Failure(t) => println("failed " + t.getMessage)
- }
- }
-}
diff --git a/samples/client/petstore/spring-stubs/.openapi-generator-ignore b/samples/client/petstore/spring-stubs/.openapi-generator-ignore
deleted file mode 100644
index 7484ee590a3..00000000000
--- a/samples/client/petstore/spring-stubs/.openapi-generator-ignore
+++ /dev/null
@@ -1,23 +0,0 @@
-# OpenAPI Generator Ignore
-# Generated by openapi-generator https://github.com/openapitools/openapi-generator
-
-# Use this file to prevent files from being overwritten by the generator.
-# The patterns follow closely to .gitignore or .dockerignore.
-
-# As an example, the C# client generator defines ApiClient.cs.
-# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
-#ApiClient.cs
-
-# You can match any string of characters against a directory, file or extension with a single asterisk (*):
-#foo/*/qux
-# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
-
-# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
-#foo/**/qux
-# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
-
-# You can also negate patterns with an exclamation (!).
-# For example, you can ignore all files in a docs folder with the file extension .md:
-#docs/*.md
-# Then explicitly reverse the ignore rule for a single file:
-#!docs/README.md
diff --git a/samples/client/petstore/spring-stubs/.openapi-generator/FILES b/samples/client/petstore/spring-stubs/.openapi-generator/FILES
deleted file mode 100644
index 718ebc8e8c9..00000000000
--- a/samples/client/petstore/spring-stubs/.openapi-generator/FILES
+++ /dev/null
@@ -1,13 +0,0 @@
-.openapi-generator-ignore
-README.md
-pom.xml
-src/main/java/org/openapitools/api/ApiUtil.java
-src/main/java/org/openapitools/api/PetApi.java
-src/main/java/org/openapitools/api/StoreApi.java
-src/main/java/org/openapitools/api/UserApi.java
-src/main/java/org/openapitools/model/Category.java
-src/main/java/org/openapitools/model/ModelApiResponse.java
-src/main/java/org/openapitools/model/Order.java
-src/main/java/org/openapitools/model/Pet.java
-src/main/java/org/openapitools/model/Tag.java
-src/main/java/org/openapitools/model/User.java
diff --git a/samples/client/petstore/spring-stubs/.openapi-generator/VERSION b/samples/client/petstore/spring-stubs/.openapi-generator/VERSION
deleted file mode 100644
index 757e6740040..00000000000
--- a/samples/client/petstore/spring-stubs/.openapi-generator/VERSION
+++ /dev/null
@@ -1 +0,0 @@
-7.0.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/spring-stubs/README.md b/samples/client/petstore/spring-stubs/README.md
deleted file mode 100644
index d43a1de307d..00000000000
--- a/samples/client/petstore/spring-stubs/README.md
+++ /dev/null
@@ -1,27 +0,0 @@
-
-# OpenAPI generated API stub
-
-Spring Framework stub
-
-
-## Overview
-This code was generated by the [OpenAPI Generator](https://openapi-generator.tech) project.
-By using the [OpenAPI-Spec](https://openapis.org), you can easily generate an API stub.
-This is an example of building API stub interfaces in Java using the Spring framework.
-
-The stubs generated can be used in your existing Spring-MVC or Spring-Boot application to create controller endpoints
-by adding ```@Controller``` classes that implement the interface. Eg:
-```java
-@Controller
-public class PetController implements PetApi {
-// implement all PetApi methods
-}
-```
-
-You can also use the interface to create [Spring-Cloud Feign clients](http://projects.spring.io/spring-cloud/spring-cloud.html#spring-cloud-feign-inheritance).Eg:
-```java
-@FeignClient(name="pet", url="http://petstore.swagger.io/v2")
-public interface PetClient extends PetApi {
-
-}
-```
diff --git a/samples/client/petstore/spring-stubs/pom.xml b/samples/client/petstore/spring-stubs/pom.xml
deleted file mode 100644
index 1e88f315c06..00000000000
--- a/samples/client/petstore/spring-stubs/pom.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-
- 4.0.0
- org.openapitools
- spring-stubs
- jar
- spring-stubs
- 1.0.0
-
- 1.8
- ${java.version}
- ${java.version}
- UTF-8
- 2.9.2
- 4.10.3
-
-
- org.springframework.boot
- spring-boot-starter-parent
- 2.5.14
-
-
-
- src/main/java
-
-
-
- org.springframework.boot
- spring-boot-starter-web
-
-
- org.springframework.data
- spring-data-commons
-
-
-
- io.springfox
- springfox-swagger2
- ${springfox.version}
-
-
- org.webjars
- swagger-ui
- ${swagger-ui.version}
-
-
- org.webjars
- webjars-locator-core
-
-
-
- com.google.code.findbugs
- jsr305
- 3.0.2
-
-
- com.fasterxml.jackson.dataformat
- jackson-dataformat-yaml
-
-
- com.fasterxml.jackson.datatype
- jackson-datatype-jsr310
-
-
- org.openapitools
- jackson-databind-nullable
- 0.2.2
-
-
-
- org.springframework.boot
- spring-boot-starter-validation
-
-
- com.fasterxml.jackson.core
- jackson-databind
-
-
- org.springframework.boot
- spring-boot-starter-test
- test
-
-
-
diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/ApiUtil.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/ApiUtil.java
deleted file mode 100644
index 1245b1dd0cc..00000000000
--- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/ApiUtil.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package org.openapitools.api;
-
-import org.springframework.web.context.request.NativeWebRequest;
-
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-
-public class ApiUtil {
- public static void setExampleResponse(NativeWebRequest req, String contentType, String example) {
- try {
- HttpServletResponse res = req.getNativeResponse(HttpServletResponse.class);
- res.setCharacterEncoding("UTF-8");
- res.addHeader("Content-Type", contentType);
- res.getWriter().print(example);
- } catch (IOException e) {
- throw new RuntimeException(e);
- }
- }
-}
diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java
deleted file mode 100644
index d41b6f67273..00000000000
--- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java
+++ /dev/null
@@ -1,395 +0,0 @@
-/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.0-SNAPSHOT).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-package org.openapitools.api;
-
-import org.openapitools.model.ModelApiResponse;
-import org.openapitools.model.Pet;
-import io.swagger.annotations.*;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.MediaType;
-import org.springframework.http.ResponseEntity;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.*;
-import org.springframework.web.context.request.NativeWebRequest;
-import org.springframework.web.multipart.MultipartFile;
-
-import javax.validation.Valid;
-import javax.validation.constraints.*;
-import java.util.List;
-import java.util.Map;
-import java.util.Optional;
-import javax.annotation.Generated;
-
-@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
-@Validated
-@Api(value = "pet", description = "Everything about your Pets")
-@RequestMapping("${openapi.openAPIPetstore.base-path:/v2}")
-public interface PetApi {
-
- default Optional getRequest() {
- return Optional.empty();
- }
-
- /**
- * POST /pet : Add a new pet to the store
- *
- * @param body Pet object that needs to be added to the store (required)
- * @return Invalid input (status code 405)
- */
- @ApiOperation(
- tags = { "pet" },
- value = "Add a new pet to the store",
- nickname = "addPet",
- notes = "",
- authorizations = {
- @Authorization(value = "petstore_auth", scopes = {
- @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
- @AuthorizationScope(scope = "read:pets", description = "read your pets")
- })
- }
- )
- @ApiResponses({
- @ApiResponse(code = 405, message = "Invalid input")
- })
- @RequestMapping(
- method = RequestMethod.POST,
- value = "/pet",
- consumes = "application/json"
- )
- default ResponseEntity addPet(
- @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body
- ) {
- return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
-
- }
-
-
- /**
- * DELETE /pet/{petId} : Deletes a pet
- *
- * @param petId Pet id to delete (required)
- * @param apiKey (optional)
- * @return Invalid pet value (status code 400)
- */
- @ApiOperation(
- tags = { "pet" },
- value = "Deletes a pet",
- nickname = "deletePet",
- notes = "",
- authorizations = {
- @Authorization(value = "petstore_auth", scopes = {
- @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
- @AuthorizationScope(scope = "read:pets", description = "read your pets")
- })
- }
- )
- @ApiResponses({
- @ApiResponse(code = 400, message = "Invalid pet value")
- })
- @RequestMapping(
- method = RequestMethod.DELETE,
- value = "/pet/{petId}"
- )
- default ResponseEntity deletePet(
- @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId,
- @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey
- ) {
- return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
-
-
- }
-
-
- /**
- * GET /pet/findByStatus : Finds Pets by status
- * Multiple status values can be provided with comma separated strings
- *
- * @param status Status values that need to be considered for filter (required)
- * @return successful operation (status code 200)
- * or Invalid status value (status code 400)
- */
- @ApiOperation(
- tags = { "pet" },
- value = "Finds Pets by status",
- nickname = "findPetsByStatus",
- notes = "Multiple status values can be provided with comma separated strings",
- response = Pet.class,
- responseContainer = "List",
- authorizations = {
- @Authorization(value = "petstore_auth", scopes = {
- @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
- @AuthorizationScope(scope = "read:pets", description = "read your pets")
- })
- }
- )
- @ApiResponses({
- @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
- @ApiResponse(code = 400, message = "Invalid status value")
- })
- @RequestMapping(
- method = RequestMethod.GET,
- value = "/pet/findByStatus",
- produces = "application/json"
- )
- default ResponseEntity> findPetsByStatus(
- @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status
- ) {
- getRequest().ifPresent(request -> {
- for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
- if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
- String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }";
- ApiUtil.setExampleResponse(request, "application/json", exampleString);
- break;
- }
- if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) {
- String exampleString = " 123456789 doggie aeiou aeiou ";
- ApiUtil.setExampleResponse(request, "application/xml", exampleString);
- break;
- }
- }
- });
- return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
-
-
- }
-
-
- /**
- * GET /pet/findByTags : Finds Pets by tags
- * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
- *
- * @param tags Tags to filter by (required)
- * @return successful operation (status code 200)
- * or Invalid tag value (status code 400)
- * @deprecated
- */
- @Deprecated
- @ApiOperation(
- tags = { "pet" },
- value = "Finds Pets by tags",
- nickname = "findPetsByTags",
- notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.",
- response = Pet.class,
- responseContainer = "List",
- authorizations = {
- @Authorization(value = "petstore_auth", scopes = {
- @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
- @AuthorizationScope(scope = "read:pets", description = "read your pets")
- })
- }
- )
- @ApiResponses({
- @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
- @ApiResponse(code = 400, message = "Invalid tag value")
- })
- @RequestMapping(
- method = RequestMethod.GET,
- value = "/pet/findByTags",
- produces = "application/json"
- )
- default ResponseEntity> findPetsByTags(
- @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags
- ) {
- getRequest().ifPresent(request -> {
- for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
- if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
- String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }";
- ApiUtil.setExampleResponse(request, "application/json", exampleString);
- break;
- }
- if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) {
- String exampleString = " 123456789 doggie aeiou aeiou ";
- ApiUtil.setExampleResponse(request, "application/xml", exampleString);
- break;
- }
- }
- });
- return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
-
-
- }
-
-
- /**
- * GET /pet/{petId} : Find pet by ID
- * Returns a single pet
- *
- * @param petId ID of pet to return (required)
- * @return successful operation (status code 200)
- * or Invalid ID supplied (status code 400)
- * or Pet not found (status code 404)
- */
- @ApiOperation(
- tags = { "pet" },
- value = "Find pet by ID",
- nickname = "getPetById",
- notes = "Returns a single pet",
- response = Pet.class,
- authorizations = {
- @Authorization(value = "api_key")
- }
- )
- @ApiResponses({
- @ApiResponse(code = 200, message = "successful operation", response = Pet.class),
- @ApiResponse(code = 400, message = "Invalid ID supplied"),
- @ApiResponse(code = 404, message = "Pet not found")
- })
- @RequestMapping(
- method = RequestMethod.GET,
- value = "/pet/{petId}",
- produces = "application/json"
- )
- default ResponseEntity getPetById(
- @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId
- ) {
- getRequest().ifPresent(request -> {
- for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
- if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
- String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }";
- ApiUtil.setExampleResponse(request, "application/json", exampleString);
- break;
- }
- if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) {
- String exampleString = " 123456789 doggie aeiou aeiou ";
- ApiUtil.setExampleResponse(request, "application/xml", exampleString);
- break;
- }
- }
- });
- return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
-
-
- }
-
-
- /**
- * PUT /pet : Update an existing pet
- *
- * @param body Pet object that needs to be added to the store (required)
- * @return Invalid ID supplied (status code 400)
- * or Pet not found (status code 404)
- * or Validation exception (status code 405)
- */
- @ApiOperation(
- tags = { "pet" },
- value = "Update an existing pet",
- nickname = "updatePet",
- notes = "",
- authorizations = {
- @Authorization(value = "petstore_auth", scopes = {
- @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
- @AuthorizationScope(scope = "read:pets", description = "read your pets")
- })
- }
- )
- @ApiResponses({
- @ApiResponse(code = 400, message = "Invalid ID supplied"),
- @ApiResponse(code = 404, message = "Pet not found"),
- @ApiResponse(code = 405, message = "Validation exception")
- })
- @RequestMapping(
- method = RequestMethod.PUT,
- value = "/pet",
- consumes = "application/json"
- )
- default ResponseEntity updatePet(
- @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body
- ) {
- return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
-
-
- }
-
-
- /**
- * POST /pet/{petId} : Updates a pet in the store with form data
- *
- * @param petId ID of pet that needs to be updated (required)
- * @param name Updated name of the pet (optional)
- * @param status Updated status of the pet (optional)
- * @return Invalid input (status code 405)
- */
- @ApiOperation(
- tags = { "pet" },
- value = "Updates a pet in the store with form data",
- nickname = "updatePetWithForm",
- notes = "",
- authorizations = {
- @Authorization(value = "petstore_auth", scopes = {
- @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
- @AuthorizationScope(scope = "read:pets", description = "read your pets")
- })
- }
- )
- @ApiResponses({
- @ApiResponse(code = 405, message = "Invalid input")
- })
- @RequestMapping(
- method = RequestMethod.POST,
- value = "/pet/{petId}",
- consumes = "application/x-www-form-urlencoded"
- )
- default ResponseEntity updatePetWithForm(
- @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId,
- @ApiParam(value = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name,
- @ApiParam(value = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status
- ) {
- return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
-
-
- }
-
-
- /**
- * POST /pet/{petId}/uploadImage : uploads an image
- *
- * @param petId ID of pet to update (required)
- * @param additionalMetadata Additional data to pass to server (optional)
- * @param file file to upload (optional)
- * @return successful operation (status code 200)
- */
- @ApiOperation(
- tags = { "pet" },
- value = "uploads an image",
- nickname = "uploadFile",
- notes = "",
- response = ModelApiResponse.class,
- authorizations = {
- @Authorization(value = "petstore_auth", scopes = {
- @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
- @AuthorizationScope(scope = "read:pets", description = "read your pets")
- })
- }
- )
- @ApiResponses({
- @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class)
- })
- @RequestMapping(
- method = RequestMethod.POST,
- value = "/pet/{petId}/uploadImage",
- produces = "application/json",
- consumes = "multipart/form-data"
- )
- default ResponseEntity uploadFile(
- @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId,
- @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata,
- @ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file
- ) {
- getRequest().ifPresent(request -> {
- for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
- if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
- String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\" }";
- ApiUtil.setExampleResponse(request, "application/json", exampleString);
- break;
- }
- }
- });
- return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
-
-
- }
-
-}
diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java
deleted file mode 100644
index 2c8321118e9..00000000000
--- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java
+++ /dev/null
@@ -1,195 +0,0 @@
-/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.0-SNAPSHOT).
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
-package org.openapitools.api;
-
-import java.util.Map;
-import org.openapitools.model.Order;
-import io.swagger.annotations.*;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.MediaType;
-import org.springframework.http.ResponseEntity;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.*;
-import org.springframework.web.context.request.NativeWebRequest;
-import org.springframework.web.multipart.MultipartFile;
-
-import javax.validation.Valid;
-import javax.validation.constraints.*;
-import java.util.List;
-import java.util.Map;
-import java.util.Optional;
-import javax.annotation.Generated;
-
-@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
-@Validated
-@Api(value = "store", description = "Access to Petstore orders")
-@RequestMapping("${openapi.openAPIPetstore.base-path:/v2}")
-public interface StoreApi {
-
- default Optional getRequest() {
- return Optional.empty();
- }
-
- /**
- * DELETE /store/order/{orderId} : Delete purchase order by ID
- * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
- *
- * @param orderId ID of the order that needs to be deleted (required)
- * @return Invalid ID supplied (status code 400)
- * or Order not found (status code 404)
- */
- @ApiOperation(
- tags = { "store" },
- value = "Delete purchase order by ID",
- nickname = "deleteOrder",
- notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors"
- )
- @ApiResponses({
- @ApiResponse(code = 400, message = "Invalid ID supplied"),
- @ApiResponse(code = 404, message = "Order not found")
- })
- @RequestMapping(
- method = RequestMethod.DELETE,
- value = "/store/order/{orderId}"
- )
- default ResponseEntity deleteOrder(
- @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("orderId") String orderId
- ) {
- return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
-
-
- }
-
-
- /**
- * GET /store/inventory : Returns pet inventories by status
- * Returns a map of status codes to quantities
- *
- * @return successful operation (status code 200)
- */
- @ApiOperation(
- tags = { "store" },
- value = "Returns pet inventories by status",
- nickname = "getInventory",
- notes = "Returns a map of status codes to quantities",
- response = Integer.class,
- responseContainer = "Map",
- authorizations = {
- @Authorization(value = "api_key")
- }
- )
- @ApiResponses({
- @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map")
- })
- @RequestMapping(
- method = RequestMethod.GET,
- value = "/store/inventory",
- produces = "application/json"
- )
- default ResponseEntity