diff --git a/README.md b/README.md
index 4c4632337224..6a93010b9ddd 100644
--- a/README.md
+++ b/README.md
@@ -64,7 +64,7 @@ OpenAPI Generator allows generation of API client libraries (SDK generation), se
| | Languages/Frameworks |
|-|-|
-**API clients** | **ActionScript**, **Ada**, **Apex**, **Bash**, **C**, **C#** (.net 2.0, 3.5 or later, .NET Standard 1.3 - 2.0, .NET Core 2.0), **C++** (cpp-restsdk, Qt5, Tizen), **Clojure**, **Dart (1.x, 2.x)**, **Elixir**, **Elm**, **Eiffel**, **Erlang**, **Go**, **Groovy**, **Haskell** (http-client, Servant), **Java** (Jersey1.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign, RestTemplate, RESTEasy, Vertx, Google API Client Library for Java, Rest-assured, Spring 5 Web Client, MicroProfile Rest Client), **k6**, **Kotlin**, **Lua**, **Nim**, **Node.js/JavaScript** (ES5, ES6, AngularJS with Google Closure Compiler annotations, Flow types), **Objective-C**, **OCaml**, **Perl**, **PHP**, **PowerShell**, **Python**, **R**, **Ruby**, **Rust** (rust, rust-server), **Scala** (akka, http4s, scalaz, swagger-async-httpclient), **Swift** (2.x, 3.x, 4.x, 5.x), **Typescript** (AngularJS, Angular (2.x - 8.x), Aurelia, Axios, Fetch, Inversify, jQuery, Node, Rxjs)
+**API clients** | **ActionScript**, **Ada**, **Apex**, **Bash**, **C**, **C#** (.net 2.0, 3.5 or later, .NET Standard 1.3 - 2.0, .NET Core 2.0), **C++** (cpp-restsdk, Qt5, Tizen), **Clojure**, **Dart (1.x, 2.x)**, **Elixir**, **Elm**, **Eiffel**, **Erlang**, **Go**, **Groovy**, **Haskell** (http-client, Servant), **Java** (Jersey1.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign, RestTemplate, RESTEasy, Vertx, Google API Client Library for Java, Rest-assured, Spring 5 Web Client, MicroProfile Rest Client), **k6**, **Kotlin**, **Lua**, **Nim**, **Node.js/JavaScript** (ES5, ES6, AngularJS with Google Closure Compiler annotations, Flow types), **Objective-C**, **OCaml**, **Perl**, **PHP**, **PowerShell**, **Python**, **R**, **Ruby**, **Rust** (rust, rust-server), **Scala** (akka, http4s, scalaz, sttp, swagger-async-httpclient), **Swift** (2.x, 3.x, 4.x, 5.x), **Typescript** (AngularJS, Angular (2.x - 8.x), Aurelia, Axios, Fetch, Inversify, jQuery, Node, Rxjs)
**Server stubs** | **Ada**, **C#** (ASP.NET Core, NancyFx), **C++** (Pistache, Restbed, Qt5 QHTTPEngine), **Erlang**, **F#** (Giraffe), **Go** (net/http, Gin), **Haskell** (Servant), **Java** (MSF4J, Spring, Undertow, JAX-RS: CDI, CXF, Inflector, Jersey, RestEasy, Play Framework, [PKMST](https://github.com/ProKarma-Inc/pkmst-getting-started-examples), [Vert.x](https://vertx.io/)), **Kotlin** (Spring Boot, Ktor, Vertx), **PHP** (Laravel, Lumen, Slim, Silex, [Symfony](https://symfony.com/), [Zend Expressive](https://github.com/zendframework/zend-expressive)), **Python** (Flask), **NodeJS**, **Ruby** (Sinatra, Rails5), **Rust** (rust-server), **Scala** ([Finch](https://github.com/finagle/finch), [Lagom](https://github.com/lagom/lagom), [Play](https://www.playframework.com/), Scalatra)
**API documentation generators** | **HTML**, **Confluence Wiki**, **Asciidoc**
**Configuration files** | [**Apache2**](https://httpd.apache.org/)
@@ -814,6 +814,7 @@ Here is a list of template creators:
* Rust (rust-server): @metaswitch
* Scala (scalaz & http4s): @tbrown1979
* Scala (Akka): @cchafer
+ * Scala (sttp): @chameleon82
* Swift: @tkqubo
* Swift 3: @hexelon
* Swift 4: @ehyche
diff --git a/bin/openapi3/scala-sttp-petstore.sh b/bin/openapi3/scala-sttp-petstore.sh
old mode 100644
new mode 100755
index 2a9753df2956..9157368acfb0
--- a/bin/openapi3/scala-sttp-petstore.sh
+++ b/bin/openapi3/scala-sttp-petstore.sh
@@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate --artifact-id "scala-sttp-petstore-client" -t modules/openapi-generator/src/main/resources/scala-sttp-client -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g scala-sttp -o samples/client/petstore/scala-sttp $@"
+ags="generate --artifact-id 'scala-sttp-petstore' -t modules/openapi-generator/src/main/resources/scala-sttp -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g scala-sttp -o samples/openapi3/client/petstore/scala-sttp $@"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/openapi3/windows/scala-sttp-petstore.bat b/bin/openapi3/windows/scala-sttp-petstore.bat
new file mode 100755
index 000000000000..3aaf98462a8b
--- /dev/null
+++ b/bin/openapi3/windows/scala-sttp-petstore.bat
@@ -0,0 +1,10 @@
+set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar
+
+If Not Exist %executable% (
+ mvn clean package
+)
+
+REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties
+set ags=generate --artifact-id "scala-sttp-petstore" -t modules\openapi-generator\src\main\resources\scala-sttp -i modules\openapi-generator\src\test\resources\3_0\petstore.yaml -g scala-sttp -o samples\openapi3\client\petstore\scala-sttp
+
+java %JAVA_OPTS% -jar %executable% %ags%
diff --git a/docs/generators.md b/docs/generators.md
index ab157a3e4607..1991c57ffddc 100644
--- a/docs/generators.md
+++ b/docs/generators.md
@@ -54,7 +54,7 @@ The following generators are available:
* [scala-akka](generators/scala-akka.md)
* [scala-gatling](generators/scala-gatling.md)
* [scala-httpclient-deprecated (deprecated)](generators/scala-httpclient-deprecated.md)
-* [scala-sttp](generators/scala-sttp.md)
+* [scala-sttp (beta)](generators/scala-sttp.md)
* [scalaz](generators/scalaz.md)
* [swift2-deprecated (deprecated)](generators/swift2-deprecated.md)
* [swift3-deprecated (deprecated)](generators/swift3-deprecated.md)
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaSttpClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaSttpClientCodegen.java
index a00f57263a37..2c1441c2bdef 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaSttpClientCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaSttpClientCodegen.java
@@ -1,3 +1,19 @@
+/*
+ * Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
package org.openapitools.codegen.languages;
import io.swagger.v3.oas.models.Operation;
@@ -5,6 +21,8 @@
import org.openapitools.codegen.CodegenConfig;
import org.openapitools.codegen.CodegenOperation;
import org.openapitools.codegen.SupportingFile;
+import org.openapitools.codegen.meta.GeneratorMetadata;
+import org.openapitools.codegen.meta.Stability;
import java.io.File;
import java.util.List;
@@ -14,8 +32,13 @@ public class ScalaSttpClientCodegen extends ScalaAkkaClientCodegen implements Co
public ScalaSttpClientCodegen() {
super();
- }
+ generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata)
+ .stability(Stability.BETA)
+ .build();
+ embeddedTemplateDir = templateDir = "scala-sttp";
+ outputFolder = "generated-code/scala-sttp";
+ }
@Override
public void processOpts() {
@@ -52,13 +75,13 @@ public String getName() {
@Override
public String getHelp() {
- return "Generates a Scala client library base on Sttp.";
+ return "Generates a Scala client library (beta) based on Sttp.";
}
@Override
public String encodePath(String input) {
String result = super.encodePath(input);
- return result.replace("{","${");
+ return result.replace("{", "${");
}
@Override
diff --git a/modules/openapi-generator/src/main/resources/scala-sttp-client/README.mustache b/modules/openapi-generator/src/main/resources/scala-sttp/README.mustache
similarity index 100%
rename from modules/openapi-generator/src/main/resources/scala-sttp-client/README.mustache
rename to modules/openapi-generator/src/main/resources/scala-sttp/README.mustache
diff --git a/modules/openapi-generator/src/main/resources/scala-sttp-client/api.mustache b/modules/openapi-generator/src/main/resources/scala-sttp/api.mustache
similarity index 100%
rename from modules/openapi-generator/src/main/resources/scala-sttp-client/api.mustache
rename to modules/openapi-generator/src/main/resources/scala-sttp/api.mustache
diff --git a/modules/openapi-generator/src/main/resources/scala-sttp-client/apiInvoker.mustache b/modules/openapi-generator/src/main/resources/scala-sttp/apiInvoker.mustache
similarity index 100%
rename from modules/openapi-generator/src/main/resources/scala-sttp-client/apiInvoker.mustache
rename to modules/openapi-generator/src/main/resources/scala-sttp/apiInvoker.mustache
diff --git a/modules/openapi-generator/src/main/resources/scala-sttp-client/build.sbt.mustache b/modules/openapi-generator/src/main/resources/scala-sttp/build.sbt.mustache
similarity index 100%
rename from modules/openapi-generator/src/main/resources/scala-sttp-client/build.sbt.mustache
rename to modules/openapi-generator/src/main/resources/scala-sttp/build.sbt.mustache
diff --git a/modules/openapi-generator/src/main/resources/scala-sttp-client/enumsSerializers.mustache b/modules/openapi-generator/src/main/resources/scala-sttp/enumsSerializers.mustache
similarity index 100%
rename from modules/openapi-generator/src/main/resources/scala-sttp-client/enumsSerializers.mustache
rename to modules/openapi-generator/src/main/resources/scala-sttp/enumsSerializers.mustache
diff --git a/modules/openapi-generator/src/main/resources/scala-sttp-client/javadoc.mustache b/modules/openapi-generator/src/main/resources/scala-sttp/javadoc.mustache
similarity index 100%
rename from modules/openapi-generator/src/main/resources/scala-sttp-client/javadoc.mustache
rename to modules/openapi-generator/src/main/resources/scala-sttp/javadoc.mustache
diff --git a/modules/openapi-generator/src/main/resources/scala-sttp-client/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/scala-sttp/licenseInfo.mustache
similarity index 100%
rename from modules/openapi-generator/src/main/resources/scala-sttp-client/licenseInfo.mustache
rename to modules/openapi-generator/src/main/resources/scala-sttp/licenseInfo.mustache
diff --git a/modules/openapi-generator/src/main/resources/scala-sttp-client/methodParameters.mustache b/modules/openapi-generator/src/main/resources/scala-sttp/methodParameters.mustache
similarity index 100%
rename from modules/openapi-generator/src/main/resources/scala-sttp-client/methodParameters.mustache
rename to modules/openapi-generator/src/main/resources/scala-sttp/methodParameters.mustache
diff --git a/modules/openapi-generator/src/main/resources/scala-sttp-client/model.mustache b/modules/openapi-generator/src/main/resources/scala-sttp/model.mustache
similarity index 100%
rename from modules/openapi-generator/src/main/resources/scala-sttp-client/model.mustache
rename to modules/openapi-generator/src/main/resources/scala-sttp/model.mustache
diff --git a/modules/openapi-generator/src/main/resources/scala-sttp-client/operationReturnType.mustache b/modules/openapi-generator/src/main/resources/scala-sttp/operationReturnType.mustache
similarity index 100%
rename from modules/openapi-generator/src/main/resources/scala-sttp-client/operationReturnType.mustache
rename to modules/openapi-generator/src/main/resources/scala-sttp/operationReturnType.mustache
diff --git a/modules/openapi-generator/src/main/resources/scala-sttp-client/paramCreation.mustache b/modules/openapi-generator/src/main/resources/scala-sttp/paramCreation.mustache
similarity index 100%
rename from modules/openapi-generator/src/main/resources/scala-sttp-client/paramCreation.mustache
rename to modules/openapi-generator/src/main/resources/scala-sttp/paramCreation.mustache
diff --git a/modules/openapi-generator/src/main/resources/scala-sttp-client/paramFormCreation.mustache b/modules/openapi-generator/src/main/resources/scala-sttp/paramFormCreation.mustache
similarity index 100%
rename from modules/openapi-generator/src/main/resources/scala-sttp-client/paramFormCreation.mustache
rename to modules/openapi-generator/src/main/resources/scala-sttp/paramFormCreation.mustache
diff --git a/modules/openapi-generator/src/main/resources/scala-sttp-client/paramQueryCreation.mustache b/modules/openapi-generator/src/main/resources/scala-sttp/paramQueryCreation.mustache
similarity index 100%
rename from modules/openapi-generator/src/main/resources/scala-sttp-client/paramQueryCreation.mustache
rename to modules/openapi-generator/src/main/resources/scala-sttp/paramQueryCreation.mustache
diff --git a/modules/openapi-generator/src/main/resources/scala-sttp-client/requests.mustache b/modules/openapi-generator/src/main/resources/scala-sttp/requests.mustache
similarity index 100%
rename from modules/openapi-generator/src/main/resources/scala-sttp-client/requests.mustache
rename to modules/openapi-generator/src/main/resources/scala-sttp/requests.mustache
diff --git a/modules/openapi-generator/src/main/resources/scala-sttp-client/responseState.mustache b/modules/openapi-generator/src/main/resources/scala-sttp/responseState.mustache
similarity index 100%
rename from modules/openapi-generator/src/main/resources/scala-sttp-client/responseState.mustache
rename to modules/openapi-generator/src/main/resources/scala-sttp/responseState.mustache
diff --git a/modules/openapi-generator/src/main/resources/scala-sttp-client/serializers.mustache b/modules/openapi-generator/src/main/resources/scala-sttp/serializers.mustache
similarity index 100%
rename from modules/openapi-generator/src/main/resources/scala-sttp-client/serializers.mustache
rename to modules/openapi-generator/src/main/resources/scala-sttp/serializers.mustache
diff --git a/pom.xml b/pom.xml
index 8c468600e3f8..bbf7ee1ecf66 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1291,6 +1291,7 @@
samples/openapi3/client/petstore/go
+ samples/openapi3/client/petstore/scala-sttp
samples/client/petstore/scala-httpclient
samples/client/petstore/scalaz
samples/client/petstore/clojure
diff --git a/samples/client/petstore/scala-sttp/project/build.properties b/samples/client/petstore/scala-sttp/project/build.properties
deleted file mode 100644
index c0bab04941d7..000000000000
--- a/samples/client/petstore/scala-sttp/project/build.properties
+++ /dev/null
@@ -1 +0,0 @@
-sbt.version=1.2.8
diff --git a/samples/client/petstore/scala-sttp/src/test/scala/PetApiTest.scala b/samples/client/petstore/scala-sttp/src/test/scala/PetApiTest.scala
deleted file mode 100644
index f03ae223b51a..000000000000
--- a/samples/client/petstore/scala-sttp/src/test/scala/PetApiTest.scala
+++ /dev/null
@@ -1,99 +0,0 @@
-import org.junit.runner.RunWith
-import org.openapitools.client.api._
-import org.openapitools.client.core.{ApiInvoker, ApiKeyValue, SttpSerializer}
-import org.openapitools.client.model._
-import org.scalatest.Inspectors._
-import org.scalatest._
-import org.scalatest.junit.JUnitRunner
-import sttp.client.{HttpURLConnectionBackend, Identity, NothingT, SttpBackend}
-
-@RunWith(classOf[JUnitRunner])
-class PetApiTest extends AsyncFlatSpec with Matchers {
-
- implicit val sttpSerializer: SttpSerializer = new SttpSerializer
- implicit val backend: SttpBackend[Identity, Nothing, NothingT] = HttpURLConnectionBackend()
- val api = new PetApi("https://petstore3.swagger.io/api/v3")
-
- implicit val apiKey: ApiKeyValue = ApiKeyValue("api-key")
-
- import ApiInvoker._
-
- behavior of "PetApi"
-
- it should "add and fetch a pet" in {
- val petId = 1000
- val createdPet = Pet(
- Some(petId),
- Some(Category(Some(1), Some("sold"))),
- "dragon",
- (for (i <- 1 to 10) yield "http://foo.com/photo/" + i).toList,
- Some((for (i <- 1 to 5) yield org.openapitools.client.model.Tag(Some(i), Some("tag-" + i))).toList),
- Some(PetEnums.Status.Sold)
- )
-
- val addPetRequest = api.addPet(createdPet)
- val getPetRequest = api.getPetById(petId)
-
- addPetRequest.result
- val pet = getPetRequest.result
-
- pet should have(
- 'id(createdPet.id),
- 'status(createdPet.status),
- 'category(createdPet.category),
- 'name(createdPet.name)
- )
- pet.tags should not be empty
- pet.tags.get should contain theSameElementsInOrderAs createdPet.tags.get
- pet.photoUrls should contain theSameElementsInOrderAs createdPet.photoUrls
- }
-
- it should "update a pet" in {
- val petId = (Math.random() * 1000000000).toLong
- val createdPetObj = Pet(
- Some(petId),
- Some(Category(Some(1), Some("sold"))),
- "programmer",
- (for (i <- 1 to 10) yield "http://foo.com/photo/" + i).toList,
- Some((for (i <- 1 to 5) yield org.openapitools.client.model.Tag(Some(i), Some("tag-" + i))).toList),
- Some(PetEnums.Status.Available)
- )
-
- val createdPet = api.addPet(createdPetObj).result
- val pet = api.getPetById(createdPet.id.get).result
- val updatedPetObj = pet.copy(status = Some(PetEnums.Status.Sold), name = "developer")
- val updatedPet = api.updatePet(updatedPetObj).result
- val updatedRequested = api.getPetById(createdPet.id.get).result
-
- pet.name should be("programmer")
- pet.status should be(Some(PetEnums.Status.Available))
-
- updatedPet.name should be("developer")
- updatedPet.status should be(Some(PetEnums.Status.Sold))
-
- updatedRequested.name should be("developer")
- updatedRequested.status should be(Some(PetEnums.Status.Sold))
-
- }
-
- it should "find pets by status" in {
- val pets = api.findPetsByStatus(List("available")).result
- pets should not be empty
-
-
- forAll(pets.toList) { pet =>
- pet.status should contain(PetEnums.Status.Available)
- }
- }
-
- it should "find pets by tag" in {
- val pets = api.findPetsByTags(List("tag1", "tag2")).result
- pets should not be empty
-
- forAll(pets.toList) { pet =>
- val tagNames = pet.tags.toList.flatten.map(_.name).collect { case Some(name) => name }
- tagNames should contain atLeastOneOf("tag1", "tag2")
- }
- }
-
-}
\ No newline at end of file
diff --git a/samples/client/petstore/scala-sttp/.openapi-generator-ignore b/samples/openapi3/client/petstore/scala-sttp/.openapi-generator-ignore
similarity index 100%
rename from samples/client/petstore/scala-sttp/.openapi-generator-ignore
rename to samples/openapi3/client/petstore/scala-sttp/.openapi-generator-ignore
diff --git a/samples/client/petstore/scala-sttp/.openapi-generator/VERSION b/samples/openapi3/client/petstore/scala-sttp/.openapi-generator/VERSION
similarity index 100%
rename from samples/client/petstore/scala-sttp/.openapi-generator/VERSION
rename to samples/openapi3/client/petstore/scala-sttp/.openapi-generator/VERSION
diff --git a/samples/client/petstore/scala-sttp/README.md b/samples/openapi3/client/petstore/scala-sttp/README.md
similarity index 93%
rename from samples/client/petstore/scala-sttp/README.md
rename to samples/openapi3/client/petstore/scala-sttp/README.md
index b3d417a26fe5..c745a7ecee88 100644
--- a/samples/client/petstore/scala-sttp/README.md
+++ b/samples/openapi3/client/petstore/scala-sttp/README.md
@@ -1,4 +1,4 @@
-# scala-sttp-petstore-client
+# 'scala-sttp-petstore'
OpenAPI Petstore
- API version: 1.0.0
@@ -37,7 +37,7 @@ Add this dependency to your project's POM:
```xml
org.openapitools
- scala-sttp-petstore-client
+ 'scala-sttp-petstore'
1.0.0
compile
@@ -48,13 +48,13 @@ Add this dependency to your project's POM:
Add this dependency to your project's build file:
```groovy
-compile "org.openapitools:scala-sttp-petstore-client:1.0.0"
+compile "org.openapitools:'scala-sttp-petstore':1.0.0"
```
### SBT users
```scala
-libraryDependencies += "org.openapitools" % "scala-sttp-petstore-client" % "1.0.0"
+libraryDependencies += "org.openapitools" % "'scala-sttp-petstore'" % "1.0.0"
```
## Getting Started
diff --git a/samples/client/petstore/scala-sttp/build.sbt b/samples/openapi3/client/petstore/scala-sttp/build.sbt
similarity index 93%
rename from samples/client/petstore/scala-sttp/build.sbt
rename to samples/openapi3/client/petstore/scala-sttp/build.sbt
index 6964f664a1d4..610244cee605 100644
--- a/samples/client/petstore/scala-sttp/build.sbt
+++ b/samples/openapi3/client/petstore/scala-sttp/build.sbt
@@ -1,5 +1,5 @@
version := "1.0.0"
-name := "scala-sttp-petstore-client"
+name := "'scala-sttp-petstore'"
organization := "org.openapitools"
scalaVersion := "2.13.0"
diff --git a/samples/openapi3/client/petstore/scala-sttp/pom.xml b/samples/openapi3/client/petstore/scala-sttp/pom.xml
new file mode 100644
index 000000000000..6b6a83b21e2d
--- /dev/null
+++ b/samples/openapi3/client/petstore/scala-sttp/pom.xml
@@ -0,0 +1,32 @@
+
+ 4.0.0
+ org.openapitools
+ scalaz-sttp-petstore-client
+ pom
+ 1.0-SNAPSHOT
+ scala-sttp-petstore-client
+
+
+
+ org.codehaus.mojo
+ exec-maven-plugin
+ 1.5.0
+
+
+ sbt-test
+ integration-test
+
+ exec
+
+
+ sbt
+
+ test
+
+
+
+
+
+
+
+
diff --git a/samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/api/EnumsSerializers.scala b/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/api/EnumsSerializers.scala
similarity index 100%
rename from samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/api/EnumsSerializers.scala
rename to samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/api/EnumsSerializers.scala
diff --git a/samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/api/PetApi.scala b/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/api/PetApi.scala
similarity index 100%
rename from samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/api/PetApi.scala
rename to samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/api/PetApi.scala
diff --git a/samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/api/StoreApi.scala b/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/api/StoreApi.scala
similarity index 100%
rename from samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/api/StoreApi.scala
rename to samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/api/StoreApi.scala
diff --git a/samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/api/UserApi.scala b/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/api/UserApi.scala
similarity index 100%
rename from samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/api/UserApi.scala
rename to samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/api/UserApi.scala
diff --git a/samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/core/ApiInvoker.scala b/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/core/ApiInvoker.scala
similarity index 100%
rename from samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/core/ApiInvoker.scala
rename to samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/core/ApiInvoker.scala
diff --git a/samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/core/Serializers.scala b/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/core/Serializers.scala
similarity index 100%
rename from samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/core/Serializers.scala
rename to samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/core/Serializers.scala
diff --git a/samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/core/requests.scala b/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/core/requests.scala
similarity index 100%
rename from samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/core/requests.scala
rename to samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/core/requests.scala
diff --git a/samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/ApiResponse.scala b/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/ApiResponse.scala
similarity index 100%
rename from samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/ApiResponse.scala
rename to samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/ApiResponse.scala
diff --git a/samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/Category.scala b/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/Category.scala
similarity index 100%
rename from samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/Category.scala
rename to samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/Category.scala
diff --git a/samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/InlineObject.scala b/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/InlineObject.scala
similarity index 100%
rename from samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/InlineObject.scala
rename to samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/InlineObject.scala
diff --git a/samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/InlineObject1.scala b/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/InlineObject1.scala
similarity index 100%
rename from samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/InlineObject1.scala
rename to samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/InlineObject1.scala
diff --git a/samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/Order.scala b/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/Order.scala
similarity index 100%
rename from samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/Order.scala
rename to samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/Order.scala
diff --git a/samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/Pet.scala b/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/Pet.scala
similarity index 100%
rename from samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/Pet.scala
rename to samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/Pet.scala
diff --git a/samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/Tag.scala b/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/Tag.scala
similarity index 100%
rename from samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/Tag.scala
rename to samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/Tag.scala
diff --git a/samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/User.scala b/samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/User.scala
similarity index 100%
rename from samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/User.scala
rename to samples/openapi3/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/User.scala