Skip to content

Commit

Permalink
Merge branch 'master' into cleanup-template-management
Browse files Browse the repository at this point in the history
* master:
  [kotlin][client] add support for coroutines with OkHttp (OpenAPITools#6362)
  update package-json.lock (OpenAPITools#6430)
  fix hardcoded match type (OpenAPITools#6431)
  java jersey2 enhance anyOf (OpenAPITools#6420)
  [Java][jersey2] minor improvement to jersey2 tests (OpenAPITools#6418)
  ps minor style change (OpenAPITools#6424)
  [JS] mark ES5 as deprecated (OpenAPITools#6408)
  [ci] Execute maven and verify with no-snapshot-updates (OpenAPITools#6415)
  add new file in ts axios samples
  Migrate all scala generators to use OAS3 (OpenAPITools#6407)
  migrate ruby samples to oas3 (OpenAPITools#6414)
  [PS] check if JSON properties is defined (OpenAPITools#6419)
  Add C++ UE4  client generator (OpenAPITools#6399)
  Add a link to the article in dev.to (OpenAPITools#6421)
  typescript-axios anytype is not defined (OpenAPITools#6335)
  [Java][jersey2] Make (de)serialization work for oneOf models, add convenience and comparison methods (OpenAPITools#6323)
  Migrate OCaml petstore to use OAS v3 spec (OpenAPITools#6348)
  [Python-experimental] Fix type error if oneof/anyof child schema is null type (OpenAPITools#6387)
  [Python-server] Fix blueplanet 'file not found' error  (OpenAPITools#6411)
  [nodejs] Fix deprecation notice when running sample nodejs script (OpenAPITools#6412)
  • Loading branch information
jimschubert committed May 27, 2020
2 parents e934bec + fac233b commit 062b4d2
Show file tree
Hide file tree
Showing 2,180 changed files with 23,479 additions and 166,304 deletions.
12 changes: 6 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,13 @@ script:
- /bin/bash ./bin/utils/detect_tab_in_java_class.sh
# run integration tests defined in maven pom.xml
# WARN: Travis will timeout after 10 minutes of no stdout/stderr activity, which is problematic with mvn --quiet.
- mvn --quiet --batch-mode --show-version clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- mvn --quiet --batch-mode --show-version verify -Psamples -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- mvn --no-snapshot-updates --quiet --batch-mode --show-version clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- mvn --no-snapshot-updates --quiet --batch-mode --show-version verify -Psamples -Dorg.slf4j.simpleLogger.defaultLogLevel=error
# test maven plugin
- mvn --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/java-client.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- mvn --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/multi-module/pom.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- mvn --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/kotlin.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- mvn --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/spring.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- mvn --no-snapshot-updates --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/java-client.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- mvn --no-snapshot-updates --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/multi-module/pom.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- mvn --no-snapshot-updates --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/kotlin.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- mvn --no-snapshot-updates --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/spring.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error
# test gradle plugin
- (cd modules/openapi-generator-gradle-plugin/samples/local-spec && ./gradlew buildGoSdk)
- (cd modules/openapi-generator-gradle-plugin/samples/local-spec && ./gradlew openApiGenerate)
Expand Down
2 changes: 1 addition & 1 deletion CI/.travis.yml.bash
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ script:
- set -e
# run integration tests defined in maven pom.xml
- cp pom.xml.bash pom.xml
- mvn --batch-mode verify -Psamples
- mvn --no-snapshot-updates --batch-mode verify -Psamples
2 changes: 1 addition & 1 deletion CI/.travis.yml.ios
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ before_install:

script:
# run integration tests defined in maven pom.xml
- mvn -q --batch-mode verify -Psamples.ios -Dmaven.javadoc.skip=true
- mvn --no-snapshot-updates -q --batch-mode verify -Psamples.ios -Dmaven.javadoc.skip=true
2 changes: 1 addition & 1 deletion CI/bitrise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ workflows:
set -e
mvn package -Dorg.slf4j.simpleLogger.defaultLogLevel=error
mvn --no-snapshot-updates package -Dorg.slf4j.simpleLogger.defaultLogLevel=error
title: Build openapi-generator
- script@1.1.5:
title: Update Swift samples
Expand Down
8 changes: 4 additions & 4 deletions CI/circle_parallel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ if [ "$NODE_INDEX" = "1" ]; then
export PATH="/usr/local/go1.14/go/bin:$PATH"
go version

mvn --quiet verify -Psamples.circleci -Dorg.slf4j.simpleLogger.defaultLogLevel=error
mvn --quiet javadoc:javadoc -Psamples.circleci -Dorg.slf4j.simpleLogger.defaultLogLevel=error
mvn --no-snapshot-updates --quiet verify -Psamples.circleci -Dorg.slf4j.simpleLogger.defaultLogLevel=error
mvn --no-snapshot-updates --quiet javadoc:javadoc -Psamples.circleci -Dorg.slf4j.simpleLogger.defaultLogLevel=error

elif [ "$NODE_INDEX" = "2" ]; then
# run ensure-up-to-date sample script on SNAPSHOT version only
Expand Down Expand Up @@ -58,7 +58,7 @@ elif [ "$NODE_INDEX" = "2" ]; then
sudo apt-get -y install libcurl4-gnutls-dev

# run integration tests
mvn --quiet verify -Psamples.misc -Dorg.slf4j.simpleLogger.defaultLogLevel=error
mvn --no-snapshot-updates --quiet verify -Psamples.misc -Dorg.slf4j.simpleLogger.defaultLogLevel=error
else
echo "Running node $NODE_INDEX to test 'samples.circleci.jdk7' defined in pom.xml ..."
sudo update-java-alternatives -s java-1.7.0-openjdk-amd64
Expand All @@ -73,7 +73,7 @@ else
sudo apt-get install dart
export PATH="$PATH:/usr/lib/dart/bin"

mvn --quiet verify -Psamples.circleci.jdk7 -Dorg.slf4j.simpleLogger.defaultLogLevel=error
mvn --no-snapshot-updates --quiet verify -Psamples.circleci.jdk7 -Dorg.slf4j.simpleLogger.defaultLogLevel=error
fi


2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -749,6 +749,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
- 2020-05-09 - [OpenAPIでお手軽にモックAPIサーバーを動かす](https://qiita.com/kasa_le/items/97ca6a8dd4605695c25c) by [Sachie Kamba](https://qiita.com/kasa_le)
- 2020-05-18 - [Spring Boot REST with OpenAPI 3](https://dev.to/alfonzjanfrithz/spring-boot-rest-with-openapi-3-59jm) by [Alfonz Jan Frithz](https://dev.to/alfonzjanfrithz)
- 2020-05-19 - [Dead Simple APIs with Open API](https://www.youtube.com/watch?v=sIaXmR6xRAw) by [Chris Tankersley](https://github.com/dragonmantank) at [Nexmo](https://developer.nexmo.com/)
- 2020-05-22 - [TypeScript REST API Client](https://dev.to/unhurried/typescript-rest-api-client-4in3) by ["unhurried"](https://dev.to/unhurried)

## [6 - About Us](#table-of-contents)

Expand Down Expand Up @@ -778,6 +779,7 @@ Here is a list of template creators:
* Bash: @bkryza
* C: @PowerOfCreation @zhemant [:heart:](https://www.patreon.com/zhemant)
* C++ REST: @Danielku15
* C++ UE4: @Kahncode
* C# (.NET 2.0): @who
* C# (.NET Standard 1.3 ): @Gronsak
* C# (.NET 4.5 refactored): @jimschubert [:heart:](https://www.patreon.com/jimschubert)
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ build_script:
- nuget restore samples\client\petstore\csharp\OpenAPIClientNetStandard\Org.OpenAPITools.sln
- msbuild samples\client\petstore\csharp\OpenAPIClientNetStandard\Org.OpenAPITools.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
# install openapi-generator locally
- mvn clean install --quiet -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- mvn --no-snapshot-updates --quiet clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error
# run the locally installed openapi-generator-gradle-plugin
- gradle -b modules\openapi-generator-gradle-plugin\samples\local-spec\build.gradle buildGoSdk --stacktrace
test_script:
Expand Down
31 changes: 31 additions & 0 deletions bin/cpp-ue4-petstore.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/sh

SCRIPT="$0"

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 clean package
fi

# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
ags="$@ generate -t modules/openapi-generator/src/main/resources/cpp-ue4 -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g cpp-ue4 -o samples/client/petstore/cpp-ue4"

java $JAVA_OPTS -jar $executable $ags
2 changes: 0 additions & 2 deletions bin/java-petstore-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
./bin/java-petstore-feign.sh
./bin/java-petstore-google-api-client.sh
./bin/java-petstore-jersey1.sh
./bin/java-petstore-jersey2-java6.sh
./bin/java-petstore-jersey2-java7.sh
./bin/java-petstore-jersey2-java8.sh
./bin/java-petstore-microprofile.sh
./bin/java-petstore-native.sh
Expand Down
39 changes: 0 additions & 39 deletions bin/java-petstore-jersey2-java6.sh

This file was deleted.

48 changes: 0 additions & 48 deletions bin/java-petstore-jersey2-java7.sh

This file was deleted.

5 changes: 2 additions & 3 deletions bin/javascript-es6-petstore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,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/Javascript/es6 \
-i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g javascript \
--additional-properties appName=PetstoreClient \
-o samples/client/petstore/javascript-es6 $@"
-i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g javascript \
-o samples/client/petstore/javascript-es6 --additional-properties appName=PetstoreClient $@"

java $JAVA_OPTS -jar $executable $ags
2 changes: 0 additions & 2 deletions bin/javascript-petstore-all.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#!/bin/sh

./bin/javascript-petstore.sh
./bin/javascript-promise-petstore.sh
./bin/javascript-es6-petstore.sh
./bin/javascript-promise-es6-petstore.sh
32 changes: 0 additions & 32 deletions bin/javascript-petstore.sh

This file was deleted.

4 changes: 2 additions & 2 deletions bin/javascript-promise-es6-petstore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ 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/Javascript/es6 \
-i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g javascript \
-i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g javascript \
-o samples/client/petstore/javascript-promise-es6 \
--additional-properties appName=PetstoreClient,usePromises=true,useES6=true $@"
--additional-properties appName=PetstoreClient,usePromises=true $@"

java $JAVA_OPTS -jar $executable $ags
38 changes: 0 additions & 38 deletions bin/javascript-promise-petstore.sh

This file was deleted.

1 change: 1 addition & 0 deletions bin/kotlin-client-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@
./bin/kotlin-client-nullable.sh
./bin/kotlin-client-retrofit2.sh
./bin/kotlin-client-json-request-string.sh
./bin/kotlin-client-petstore-okhttp-coroutines.sh
37 changes: 37 additions & 0 deletions bin/kotlin-client-petstore-okhttp-coroutines.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/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 clean package
fi

samplePath="samples/client/petstore/kotlin-jvm-okhttp4-coroutines"

export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -t modules/openapi-generator/src/main/resources/kotlin-client -g kotlin --artifact-id kotlin-petstore-okhttp4-coroutines-client --library jvm-okhttp4 --additional-properties serializationLibrary=gson,dateLibrary=java8,serializableModel=true,useCoroutines=true -o $samplePath $@"

echo "Cleaning previously generated files if any from $samplePath"
rm -rf $samplePath

echo "Generating Kotling client..."
java $JAVA_OPTS -jar $executable $ags
2 changes: 1 addition & 1 deletion bin/nodejs-express-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/nodejs-express-server -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g nodejs-express-server -o samples/server/petstore/nodejs-express-server -Dservice $@"
ags="generate -t modules/openapi-generator/src/main/resources/nodejs-express-server -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g nodejs-express-server -o samples/server/petstore/nodejs-express-server $@"

java $JAVA_OPTS -jar $executable $ags
2 changes: 1 addition & 1 deletion bin/ocaml-petstore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"

args="generate -t modules/openapi-generator/src/main/resources/ocaml -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g ocaml -o samples/client/petstore/ocaml --additional-properties packageName=petstore_client $@"
args="generate -t modules/openapi-generator/src/main/resources/ocaml -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g ocaml -o samples/client/petstore/ocaml --additional-properties packageName=petstore_client $@"

echo "java ${JAVA_OPTS} -jar ${executable} ${args}"
java $JAVA_OPTS -jar $executable $args
Loading

0 comments on commit 062b4d2

Please sign in to comment.