Skip to content

Enhancement/kotlin/retrofit2 #5697

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 19 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
aaef017
[Kotlin][Retrofit2] add generator support for coroutines and suspend …
ch4rl3x Mar 20, 2020
c2af66e
Merge branch 'master' of https://github.com/OpenAPITools/openapi-gene…
ch4rl3x Mar 20, 2020
69b18dd
remove unnecessary sample project
ch4rl3x Mar 20, 2020
824b9bb
fixed use of serializerBuilder in ApiClient
ch4rl3x Mar 20, 2020
e0fd01c
Add OAuth Intercepter to kotlin-retrofit2
ch4rl3x Mar 23, 2020
96aa987
Add OAuth Intercepter to kotlin-retrofit2
ch4rl3x Mar 23, 2020
15a49e7
Fixed some bugs and import issues in kotlin-jvm-retrofit2
ch4rl3x Mar 24, 2020
79ae851
Change serializerBuilder from val to var. Add simple logger to apiClient
ch4rl3x Mar 24, 2020
25e88b7
Merge branch 'master' of https://github.com/OpenAPITools/openapi-gene…
ch4rl3x Mar 24, 2020
336ccfa
Resolved issues after merge from master. Rebuild Test Project
ch4rl3x Mar 24, 2020
5126bbe
Delete merge files
ch4rl3x Mar 24, 2020
c417a62
Adds possibility to not initialize the default Serializer. Prevent cr…
ch4rl3x Mar 25, 2020
4d5d1d6
Add extension function to deserialize errors
ch4rl3x Mar 25, 2020
aab9405
Merge branch 'master' of https://github.com/OpenAPITools/openapi-gene…
ch4rl3x Mar 25, 2020
bf04ab7
Revert "Adds possibility to not initialize the default Serializer. Pr…
ch4rl3x Mar 25, 2020
a8bb0dc
moshiBuilder/gsonBuilder back from var to val
ch4rl3x Mar 25, 2020
0d1b471
Fixed logger access in ApiClient
ch4rl3x Apr 8, 2020
07f2869
ResponseExt now throws exceptions
ch4rl3x Apr 8, 2020
c83da46
Merge branch 'master' of https://github.com/OpenAPITools/openapi-gene…
ch4rl3x Apr 8, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 5 additions & 3 deletions bin/kotlin-client-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@

./bin/kotlin-client-gson.sh
./bin/kotlin-client-jackson.sh
./bin/kotlin-client-json-request-string.sh
./bin/kotlin-client-moshi-codegen.sh
./bin/kotlin-client-nonpublic.sh
./bin/kotlin-client-nullable.sh
./bin/kotlin-client-okhttp3.sh
./bin/kotlin-client-petstore-multiplatform.sh
./bin/kotlin-client-petstore.sh
./bin/kotlin-client-retrofit2-suspend.sh
./bin/kotlin-client-retrofit2.sh
./bin/kotlin-client-string.sh
./bin/kotlin-client-threetenbp.sh
./bin/kotlin-client-nullable.sh
./bin/kotlin-client-retrofit2.sh
./bin/kotlin-client-json-request-string.sh
./bin/kotlin-client-uppercase-enum.sh
2 changes: 1 addition & 1 deletion bin/kotlin-client-gson.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/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-petstore-gson --additional-properties serializationLibrary=gson -o samples/client/petstore/kotlin-gson $@"
ags="generate -t modules/openapi-generator/src/main/resources/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-petstore-gson --additional-properties serializationLibrary=gson -o samples/client/petstore/kotlin/gson $@"

java ${JAVA_OPTS} -jar ${executable} ${ags}
2 changes: 1 addition & 1 deletion bin/kotlin-client-jackson.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/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-petstore-jackson --additional-properties serializationLibrary=jackson --additional-properties enumPropertyNaming=UPPERCASE -o samples/client/petstore/kotlin-jackson $@"
ags="generate -t modules/openapi-generator/src/main/resources/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-petstore-jackson --additional-properties serializationLibrary=jackson --additional-properties enumPropertyNaming=UPPERCASE -o samples/client/petstore/kotlin/jackson $@"

java ${JAVA_OPTS} -jar ${executable} ${ags}
2 changes: 1 addition & 1 deletion bin/kotlin-client-json-request-string.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/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore-with-date-field.yaml -g kotlin --artifact-id kotlin-petstore-json-request-string --additional-properties requestDateConverter=toString -o samples/client/petstore/kotlin-json-request-string $@"
ags="generate -t modules/openapi-generator/src/main/resources/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore-with-date-field.yaml -g kotlin --artifact-id kotlin-petstore-json-request-string --additional-properties requestDateConverter=toString -o samples/client/petstore/kotlin/json-request-string $@"

java ${JAVA_OPTS} -jar ${executable} ${ags}
2 changes: 1 addition & 1 deletion bin/kotlin-client-moshi-codegen.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/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-petstore-moshi-codegen --additional-properties serializationLibrary=moshi,moshiCodeGen=true -o samples/client/petstore/kotlin-moshi-codegen $@"
ags="generate -t modules/openapi-generator/src/main/resources/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-petstore-moshi-codegen --additional-properties serializationLibrary=moshi,moshiCodeGen=true -o samples/client/petstore/kotlin/moshi-codegen $@"

java ${JAVA_OPTS} -jar ${executable} ${ags}
2 changes: 1 addition & 1 deletion bin/kotlin-client-nonpublic.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/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-petstore-nonpublic --additional-properties nonPublicApi=true -o samples/client/petstore/kotlin-nonpublic $@"
ags="generate -t modules/openapi-generator/src/main/resources/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-petstore-nonpublic --additional-properties nonPublicApi=true -o samples/client/petstore/kotlin/nonpublic $@"

java ${JAVA_OPTS} -jar ${executable} ${ags}
2 changes: 1 addition & 1 deletion bin/kotlin-client-nullable.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/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-petstore-nullable --additional-properties nullableReturnType=true,serializableModel=true -o samples/client/petstore/kotlin-nullable $@"
ags="generate -t modules/openapi-generator/src/main/resources/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-petstore-nullable --additional-properties nullableReturnType=true,serializableModel=true -o samples/client/petstore/kotlin/nullable $@"

java ${JAVA_OPTS} -jar ${executable} ${ags}
2 changes: 1 addition & 1 deletion bin/kotlin-client-okhttp3.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/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-petstore-okhttp3 --library jvm-okhttp3 -o samples/client/petstore/kotlin-okhttp3 $@"
ags="generate -t modules/openapi-generator/src/main/resources/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-petstore-okhttp3 --library jvm-okhttp3 -o samples/client/petstore/kotlin/okhttp3 $@"

java ${JAVA_OPTS} -jar ${executable} ${ags}
2 changes: 1 addition & 1 deletion bin/kotlin-client-petstore-multiplatform.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/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-client-petstore-multiplatform --library multiplatform -o samples/client/petstore/kotlin-multiplatform $@"
ags="generate -t modules/openapi-generator/src/main/resources/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-client-petstore-multiplatform --library multiplatform -o samples/client/petstore/kotlin/multiplatform $@"

java ${JAVA_OPTS} -jar ${executable} ${ags}
2 changes: 1 addition & 1 deletion bin/kotlin-client-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/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-petstore-client --additional-properties dateLibrary=java8,serializableModel=true -o samples/client/petstore/kotlin $@"
ags="generate -t modules/openapi-generator/src/main/resources/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-petstore-client --additional-properties dateLibrary=java8,serializableModel=true -o samples/client/petstore/kotlin/petstore $@"

java ${JAVA_OPTS} -jar ${executable} ${ags}
32 changes: 32 additions & 0 deletions bin/kotlin-client-retrofit2-coroutines.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/sh

SCRIPT="$0"
echo "# START SCRIPT: $SCRIPT"

while [ -h "$SCRIPT" ] ; do
ls=$(ls -ld "$SCRIPT")
link=$(expr "$ls" : '.*-> \(.*\)$')
if expr "$link" : '/.*' > /dev/null; then
SCRIPT="$link"
else
SCRIPT=$(dirname "$SCRIPT")/"$link"
fi
done

if [ ! -d "${APP_DIR}" ]; then
APP_DIR=$(dirname "$SCRIPT")/..
APP_DIR=$(cd "${APP_DIR}"; pwd)
fi

executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"

if [ ! -f "$executable" ]
then
mvn -B 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/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-petstore-retrofit2-coroutines --library jvm-retrofit2 --additional-properties useCoroutines=true -o samples/client/petstore/kotlin/retrofit2-coroutines $@"

java ${JAVA_OPTS} -jar ${executable} ${ags}
2 changes: 1 addition & 1 deletion bin/kotlin-client-retrofit2.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/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-petstore-retrofit2 --library jvm-retrofit2 -o samples/client/petstore/kotlin-retrofit2 $@"
ags="generate -t modules/openapi-generator/src/main/resources/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-petstore-retrofit2 --library jvm-retrofit2 -o samples/client/petstore/kotlin/retrofit2 $@"

java ${JAVA_OPTS} -jar ${executable} ${ags}
2 changes: 1 addition & 1 deletion bin/kotlin-client-string.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ 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/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-petstore-string --additional-properties dateLibrary=string,serializableModel=true,sortParamsByRequiredFlag=false,sortModelPropertiesByRequiredFlag=false -o samples/client/petstore/kotlin-string $@"
ags="generate -t modules/openapi-generator/src/main/resources/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-petstore-string --additional-properties dateLibrary=string,serializableModel=true,sortParamsByRequiredFlag=false,sortModelPropertiesByRequiredFlag=false -o samples/client/petstore/kotlin/string $@"

java ${JAVA_OPTS} -jar ${executable} ${ags}

Expand Down
2 changes: 1 addition & 1 deletion bin/kotlin-client-threetenbp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ 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/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-petstore-threetenbp --additional-properties dateLibrary=threetenbp -o samples/client/petstore/kotlin-threetenbp $@"
ags="generate -t modules/openapi-generator/src/main/resources/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-petstore-threetenbp --additional-properties dateLibrary=threetenbp -o samples/client/petstore/kotlin/threetenbp $@"

java ${JAVA_OPTS} -jar ${executable} ${ags}

Expand Down
2 changes: 1 addition & 1 deletion bin/kotlin-client-uppercase-enum.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ 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/kotlin-client -i modules/openapi-generator/src/test/resources/3_0/issue-4062.yaml -g kotlin --artifact-id kotlin-uppercase-enum --additional-properties enumPropertyNaming=UPPERCASE -o samples/client/petstore/kotlin-uppercase-enum $@"
ags="generate -t modules/openapi-generator/src/main/resources/kotlin-client -i modules/openapi-generator/src/test/resources/3_0/issue-4062.yaml -g kotlin --artifact-id kotlin-uppercase-enum --additional-properties enumPropertyNaming=UPPERCASE -o samples/client/petstore/kotlin/uppercase-enum $@"

java ${JAVA_OPTS} -jar ${executable} ${ags}

Expand Down
9 changes: 6 additions & 3 deletions bin/windows/kotlin-client-all.bat
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
call powershell -command "& '%~dp0\kotlin-client-gson.bat'"
call powershell -command "& '%~dp0\kotlin-client-jackson.bat'"
call powershell -command "& '%~dp0\kotlin-client-json-request-string.bat'"
call powershell -command "& '%~dp0\kotlin-client-moshi-codegen.bat'"
call powershell -command "& '%~dp0\kotlin-client-nonpublic.bat'"
call powershell -command "& '%~dp0\kotlin-client-nullable.bat'"
call powershell -command "& '%~dp0\kotlin-client-okhttp3.bat'"
call powershell -command "& '%~dp0\kotlin-client-petstore-multiplatform.bat'"
call powershell -command "& '%~dp0\kotlin-client-petstore.bat'"
call powershell -command "& '%~dp0\kotlin-client-retrofit2-suspend.bat'"
call powershell -command "& '%~dp0\kotlin-client-retrofit2.bat'"
call powershell -command "& '%~dp0\kotlin-client-string.bat'"
call powershell -command "& '%~dp0\kotlin-client-threetenbp.bat'"
call powershell -command "& '%~dp0\kotlin-client-nullable.bat'"
call powershell -command "& '%~dp0\kotlin-client-json-request-string.bat'"
call powershell -command "& '%~dp0\kotlin-client-retrofit2.bat'"
call powershell -command "& '%~dp0\kotlin-client-uppercase-enum.bat'"
2 changes: 1 addition & 1 deletion bin/windows/kotlin-client-gson.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ If Not Exist %executable% (
)

REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties
set ags=generate --artifact-id "kotlin-petstore-gson" -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g kotlin --additional-properties serializationLibrary=gson -o samples\client\petstore\kotlin-gson
set ags=generate --artifact-id "kotlin-petstore-gson" -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g kotlin --additional-properties serializationLibrary=gson -o samples\client\petstore\kotlin\gson

java %JAVA_OPTS% -jar %executable% %ags%
11 changes: 11 additions & 0 deletions bin/windows/kotlin-client-jackson.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
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 "kotlin-petstore-jackson" -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g kotlin --additional-properties serializationLibrary=jackson,serializationLibrary=jackson -o samples\client\petstore\kotlin\jackson


java %JAVA_OPTS% -jar %executable% %ags%
2 changes: 1 addition & 1 deletion bin/windows/kotlin-client-json-request-string.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ If Not Exist %executable% (
)

REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties
set ags=generate --artifact-id "kotlin-petstore-json-request-string" -i modules\openapi-generator\src\test\resources\2_0\petstore-with-date-field.yaml -g kotlin --additional-properties requestDateConverter=toString -o samples\client\petstore\kotlin-json-request-string
set ags=generate --artifact-id "kotlin-petstore-json-request-string" -i modules\openapi-generator\src\test\resources\2_0\petstore-with-date-field.yaml -g kotlin --additional-properties requestDateConverter=toString -o samples\client\petstore\kotlin\json-request-string

java %JAVA_OPTS% -jar %executable% %ags%
2 changes: 1 addition & 1 deletion bin/windows/kotlin-client-moshi-codegen.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ If Not Exist %executable% (
)

REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties
set ags=generate --artifact-id "kotlin-petstore-moshi-codegen" -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g kotlin --additional-properties serializationLibrary=moshi,moshiCodeGen=true -o samples\client\petstore\kotlin-moshi-codegen
set ags=generate --artifact-id "kotlin-petstore-moshi-codegen" -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g kotlin --additional-properties serializationLibrary=moshi,moshiCodeGen=true -o samples\client\petstore\kotlin\moshi-codegen

java %JAVA_OPTS% -jar %executable% %ags%
2 changes: 1 addition & 1 deletion bin/windows/kotlin-client-nonpublic.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ If Not Exist %executable% (
)

REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties
set ags=generate --artifact-id "kotlin-petstore-nonpublic" -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g kotlin --additional-properties nonPublicApi=true -o samples\client\petstore\kotlin-nonpublic
set ags=generate --artifact-id "kotlin-petstore-nonpublic" -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g kotlin --additional-properties nonPublicApi=true -o samples\client\petstore\kotlin\nonpublic

java %JAVA_OPTS% -jar %executable% %ags%
2 changes: 1 addition & 1 deletion bin/windows/kotlin-client-nullable.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ If Not Exist %executable% (
)

REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g kotlin --artifact-id "kotlin-petstore-nullable" --additional-properties nullableReturnType=true,serializableModel=true -o samples\client\petstore\kotlin-nullable
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g kotlin --artifact-id "kotlin-petstore-nullable" --additional-properties nullableReturnType=true,serializableModel=true -o samples\client\petstore\kotlin\nullable

java %JAVA_OPTS% -jar %executable% %ags%
2 changes: 1 addition & 1 deletion bin/windows/kotlin-client-okhttp3.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ If Not Exist %executable% (
)

REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties
set ags=generate --artifact-id "kotlin-petstore-okhttp3" -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g kotlin --library jvm-okhttp3 -o samples\client\petstore\kotlin-okhttp3
set ags=generate --artifact-id "kotlin-petstore-okhttp3" -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g kotlin --library jvm-okhttp3 -o samples\client\petstore\kotlin\okhttp3

java %JAVA_OPTS% -jar %executable% %ags%
2 changes: 1 addition & 1 deletion bin/windows/kotlin-client-petstore-multiplatform.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ If Not Exist %executable% (
)

REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties
set ags=generate --artifact-id "kotlin-client-petstore-multiplatform" -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g kotlin --library multiplatform -o samples\client\petstore\kotlin-multiplatform
set ags=generate --artifact-id "kotlin-client-petstore-multiplatform" -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g kotlin --library multiplatform -o samples\client\petstore\kotlin\multiplatform

java %JAVA_OPTS% -jar %executable% %ags%
2 changes: 1 addition & 1 deletion bin/windows/kotlin-client-petstore.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ If Not Exist %executable% (
)

REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties
set ags=generate --artifact-id "kotlin-petstore-client" -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g kotlin -o samples\client\petstore\kotlin --additional-properties dateLibrary=java8,serializableModel=true
set ags=generate --artifact-id "kotlin-petstore-client" -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g kotlin --additional-properties dateLibrary=java8,serializableModel=true -o samples\client\petstore\kotlin\petstore

java %JAVA_OPTS% -jar %executable% %ags%
10 changes: 10 additions & 0 deletions bin/windows/kotlin-client-retrofit2-suspend.bat
Original file line number Diff line number Diff line change
@@ -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 "kotlin-petstore-retrofit2" -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g kotlin --library jvm-retrofit2 --additional-properties useCoroutines=true -o samples\client\petstore\kotlin\retrofit2-coroutines

java %JAVA_OPTS% -jar %executable% %ags%
2 changes: 1 addition & 1 deletion bin/windows/kotlin-client-retrofit2.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ If Not Exist %executable% (
)

REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties
set ags=generate --artifact-id "kotlin-petstore-retrofit2" -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g kotlin --library jvm-retrofit2 -o samples\client\petstore\kotlin-retrofit2
set ags=generate --artifact-id "kotlin-petstore-retrofit2" -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g kotlin --library jvm-retrofit2 -o samples\client\petstore\kotlin\retrofit2

java %JAVA_OPTS% -jar %executable% %ags%
Loading