forked from loafle/openapi-generator-original
* Validation script batches only samples In this change, the validation script will batch only sample generation. For meta and documentation, it will always be iterative. Also made changes to meta-codegen*.sh so conditionals which may invoke maven are explicitly rooted. * [ci] batch python-experimental, include new springboot option
25 lines
924 B
Bash
Executable File
25 lines
924 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
SCRIPT="$0"
|
|
echo "# START SCRIPT: $SCRIPT"
|
|
|
|
declare cwd="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
declare root="$(cd "$cwd" && cd ../ && pwd)"
|
|
|
|
executable="${root}/modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
|
|
|
if [ ! -f "$executable" ]; then
|
|
(cd "$root" && ./mvnw -B clean package)
|
|
fi
|
|
|
|
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
|
|
ags="meta -n myClientCodegen -t DOCUMENTATION -p com.my.company.codegen -o samples/meta-codegen/lib $@"
|
|
|
|
java $JAVA_OPTS -jar $executable $ags
|
|
|
|
(cd "$root" && ./mvnw clean package -f samples/meta-codegen/pom.xml)
|
|
|
|
ags2="generate -g myClientCodegen -i modules/openapi-generator/src/test/resources/2_0/petstore.json -o samples/meta-codegen/usage $@"
|
|
|
|
java $JAVA_OPTS -cp ${root}/samples/meta-codegen/lib/target/myClientCodegen-openapi-generator-1.0.0.jar:$executable org.openapitools.codegen.OpenAPIGenerator $ags2
|