Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 0 additions & 32 deletions bin/openapi3/scala-akka-petstore.sh

This file was deleted.

32 changes: 0 additions & 32 deletions bin/openapi3/scala-httpclient-petstore.sh

This file was deleted.

32 changes: 0 additions & 32 deletions bin/openapi3/scalatra-petstore-server.sh

This file was deleted.

32 changes: 0 additions & 32 deletions bin/openapi3/scalaz-petstore.sh

This file was deleted.

2 changes: 1 addition & 1 deletion bin/scala-akka-http-server-petstore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,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 -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g scala-akka-http-server -o samples/server/petstore/scala-akka-http-server $@"
ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g scala-akka-http-server -o samples/server/petstore/scala-akka-http-server $@"

java ${JAVA_OPTS} -jar ${executable} ${ags}
4 changes: 2 additions & 2 deletions bin/scala-akka-petstore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"

if [ ! -f "$executable" ]
then
mvn -B clean package
mvn clean package
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-akka-petstore-client" -t modules/openapi-generator/src/main/resources/scala-akka-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g scala-akka -o samples/client/petstore/scala-akka $@"
ags="generate --artifact-id "scala-akka-petstore-client" -t modules/openapi-generator/src/main/resources/scala-akka-client -i modules/openapi-generator/src/test/resources/3_0/scala-akka/petstore.yaml -g scala-akka -o samples/client/petstore/scala-akka $@"

java $JAVA_OPTS -jar $executable $ags
2 changes: 1 addition & 1 deletion bin/scala-finch-petstore-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 -t modules/openapi-generator/src/main/resources/scala-finch -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g scala-finch -o samples/server/petstore/scala-finch $@"
ags="generate -t modules/openapi-generator/src/main/resources/scala-finch -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g scala-finch -o samples/server/petstore/scala-finch -DskipFormModel=true $@"

java $JAVA_OPTS -jar $executable $ags
2 changes: 1 addition & 1 deletion bin/scala-gatling-petstore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 -t modules/openapi-generator/src/main/resources/scala-gatling -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g scala-gatling -o samples/client/petstore/scala-gatling $@"
ags="generate -t modules/openapi-generator/src/main/resources/scala-gatling -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g scala-gatling -o samples/client/petstore/scala-gatling $@"

java $JAVA_OPTS -jar $executable $ags
4 changes: 2 additions & 2 deletions bin/scala-httpclient-petstore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"

if [ ! -f "$executable" ]
then
mvn -B clean package
mvn clean package
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 -t modules/openapi-generator/src/main/resources/scala-httpclient -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g scala-httpclient-deprecated -o samples/client/petstore/scala-httpclient $@"
ags="generate -t modules/openapi-generator/src/main/resources/scala-httpclient -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g scala-httpclient-deprecated -o samples/client/petstore/scala-httpclient $@"

java $JAVA_OPTS -jar $executable $ags
2 changes: 1 addition & 1 deletion bin/scala-lagom-server-petstore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 -t modules/openapi-generator/src/main/resources/scala-lagom-server -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g scala-lagom-server -o samples/server/petstore/scala-lagom-server $@"
ags="generate -t modules/openapi-generator/src/main/resources/scala-lagom-server -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g scala-lagom-server -o samples/server/petstore/scala-lagom-server -DskipFormModel=true $@"

java $JAVA_OPTS -jar $executable $ags
2 changes: 1 addition & 1 deletion bin/scala-play-framework-petstore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 -t modules/openapi-generator/src/main/resources/scala-play-server -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g scala-play-server -o samples/server/petstore/scala-play-server --additional-properties hideGenerationTimestamp=true $@"
ags="generate -t modules/openapi-generator/src/main/resources/scala-play-server -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g scala-play-server -o samples/server/petstore/scala-play-server --additional-properties hideGenerationTimestamp=true $@"

java $JAVA_OPTS -jar $executable $ags
Original file line number Diff line number Diff line change
Expand Up @@ -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' -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 $@"
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/client/petstore/scala-sttp $@"

java $JAVA_OPTS -jar $executable $ags
4 changes: 2 additions & 2 deletions bin/scalatra-petstore-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"

if [ ! -f "$executable" ]
then
mvn -B clean package
mvn clean package
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 -t modules/openapi-generator/src/main/resources/scalatra -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g scalatra -o samples/server/petstore/scalatra $@"
ags="generate -t modules/openapi-generator/src/main/resources/scalatra -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g scalatra -o samples/server/petstore/scalatra $@"

java $JAVA_OPTS -jar $executable $ags
4 changes: 2 additions & 2 deletions bin/scalaz-petstore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"

if [ ! -f "$executable" ]
then
mvn -B clean package
mvn clean package
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 -t modules/openapi-generator/src/main/resources/scalaz -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g scalaz -o samples/client/petstore/scalaz $@"
ags="generate -t modules/openapi-generator/src/main/resources/scalaz -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g scalaz -o samples/client/petstore/scalaz -DskipFormModel=true $@"

java $JAVA_OPTS -jar $executable $ags
3 changes: 1 addition & 2 deletions bin/utils/ensure-up-to-date
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ declare -a samples=(
"${root}/bin/cpp-qt5-qhttpengine-server-petstore.sh"
#"${root}/bin/openapi3/powershell-experimental-petstore.sh"
"${root}/bin/scala-akka-petstore.sh"
"${root}/bin/openapi3/scala-akka-petstore.sh"
"${root}/bin/openapi3/scala-sttp-petstore.sh"
"${root}/bin/scala-sttp-petstore.sh"
"${root}/bin/lua-petstore.sh"
)

Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1295,8 +1295,8 @@
<module>samples/openapi3/client/petstore/go-experimental</module>
<module>samples/openapi3/client/petstore/go</module>
<!-- test java-related projects -->
<module>samples/openapi3/client/petstore/scala-akka</module>
<module>samples/openapi3/client/petstore/scala-sttp</module>
<module>samples/client/petstore/scala-akka</module>
<module>samples/client/petstore/scala-sttp</module>
<module>samples/client/petstore/scala-httpclient</module>
<module>samples/client/petstore/scalaz</module>
<module>samples/client/petstore/clojure</module>
Expand Down Expand Up @@ -1389,10 +1389,10 @@
<!-- clients -->
<module>samples/openapi3/client/petstore/ruby</module>
<!-- test java-related projects -->
<module>samples/openapi3/client/petstore/scala-akka</module>
<module>samples/client/petstore/dart2/petstore</module>
<module>samples/client/petstore/dart-jaguar/openapi</module>
<module>samples/client/petstore/dart-jaguar/flutter_petstore/openapi</module>
<module>samples/client/petstore/scala-akka</module>
<module>samples/client/petstore/scala-httpclient</module>
<module>samples/client/petstore/java/feign</module>
<module>samples/client/petstore/java/jersey1</module>
Expand Down
2 changes: 2 additions & 0 deletions samples/client/petstore/scala-akka/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ src/main/scala/org/openapitools/client/core/Serializers.scala
src/main/scala/org/openapitools/client/core/requests.scala
src/main/scala/org/openapitools/client/model/ApiResponse.scala
src/main/scala/org/openapitools/client/model/Category.scala
src/main/scala/org/openapitools/client/model/InlineObject.scala
src/main/scala/org/openapitools/client/model/InlineObject1.scala
src/main/scala/org/openapitools/client/model/Order.scala
src/main/scala/org/openapitools/client/model/Pet.scala
src/main/scala/org/openapitools/client/model/Tag.scala
Expand Down
8 changes: 8 additions & 0 deletions samples/client/petstore/scala-akka/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ Class | Method | HTTP request | Description

- [ApiResponse](ApiResponse.md)
- [Category](Category.md)
- [InlineObject](InlineObject.md)
- [InlineObject1](InlineObject1.md)
- [Order](Order.md)
- [Pet](Pet.md)
- [Tag](Tag.md)
Expand All @@ -106,6 +108,12 @@ Authentication schemes defined for the API:
- **API key parameter name**: api_key
- **Location**: HTTP header

### auth_cookie

- **Type**: API key
- **API key parameter name**: AUTH_KEY
- **Location**:


## Author

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,15 @@ class PetApi(baseUrl: String) {

/**
* Expected answers:
* code 200 : Pet (successful operation)
* code 405 : (Invalid input)
*
* @param body Pet object that needs to be added to the store
* @param pet Pet object that needs to be added to the store
*/
def addPet(body: Pet): ApiRequest[Unit] =
ApiRequest[Unit](ApiMethods.POST, baseUrl, "/pet", "application/json")
.withBody(body)
def addPet(pet: Pet): ApiRequest[Pet] =
ApiRequest[Pet](ApiMethods.POST, baseUrl, "/pet", "application/json")
.withBody(pet)
.withSuccessResponse[Pet](200)
.withErrorResponse[Unit](405)


Expand Down Expand Up @@ -107,22 +109,25 @@ class PetApi(baseUrl: String) {

/**
* Expected answers:
* code 200 : Pet (successful operation)
* code 400 : (Invalid ID supplied)
* code 404 : (Pet not found)
* code 405 : (Validation exception)
*
* @param body Pet object that needs to be added to the store
* @param pet Pet object that needs to be added to the store
*/
def updatePet(body: Pet): ApiRequest[Unit] =
ApiRequest[Unit](ApiMethods.PUT, baseUrl, "/pet", "application/json")
.withBody(body)
def updatePet(pet: Pet): ApiRequest[Pet] =
ApiRequest[Pet](ApiMethods.PUT, baseUrl, "/pet", "application/json")
.withBody(pet)
.withSuccessResponse[Pet](200)
.withErrorResponse[Unit](400)
.withErrorResponse[Unit](404)
.withErrorResponse[Unit](405)


/**
* Expected answers:
* code 200 : (successful operation)
* code 405 : (Invalid input)
*
* @param petId ID of pet that needs to be updated
Expand All @@ -134,6 +139,7 @@ class PetApi(baseUrl: String) {
.withFormParam("name", name)
.withFormParam("status", status)
.withPathParam("petId", petId)
.withSuccessResponse[Unit](200)
.withErrorResponse[Unit](405)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ class StoreApi(baseUrl: String) {
* code 200 : Order (successful operation)
* code 400 : (Invalid Order)
*
* @param body order placed for purchasing the pet
* @param order order placed for purchasing the pet
*/
def placeOrder(body: Order): ApiRequest[Order] =
def placeOrder(order: Order): ApiRequest[Order] =
ApiRequest[Order](ApiMethods.POST, baseUrl, "/store/order", "application/json")
.withBody(body)
.withBody(order)
.withSuccessResponse[Order](200)
.withErrorResponse[Unit](400)

Expand Down
Loading