mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-06 18:45:23 +00:00
Swagger-codegen: renaming input parameter for output directory and default test runner task
This commit is contained in:
parent
7ccf9df9e3
commit
8bd7111bda
@ -17,27 +17,28 @@
|
||||
|
||||
<condition property="outputPath.set">
|
||||
<and>
|
||||
<isset property="outputPath"/>
|
||||
<isset property="outputDir"/>
|
||||
<isset property="apiServerRootDir"/>
|
||||
</and>
|
||||
</condition>
|
||||
<!-- generates the classes -->
|
||||
<target name="generate-java" depends="compile" description="generates APIs and model classes for java language">
|
||||
<fail unless="outputPath.set">
|
||||
Must specify the parameters: outputPath and apiServerRootDir eg. -DoutputPath=../../api-server-lib/java/src/main/java/com/wordnik/
|
||||
Must specify the parameters: outputDir and apiServerRootDir eg. -DoutputDir=../../api-server-lib/java/src/main/java/com/wordnik/
|
||||
-DapiServerRootDir=../../api-server-lib/java/
|
||||
These are the output path of the Apis and the root directory that will be created for the api server (directory where structure is created)
|
||||
These are the output path of the Apis
|
||||
and the root directory that will be created for the api server (directory where artifacts like build.xml and other contents from the structure are created)
|
||||
</fail>
|
||||
<mkdir dir="${outputPath}/api"/>
|
||||
<mkdir dir="${outputPath}/model"/>
|
||||
<mkdir dir="${outputDir}/api"/>
|
||||
<mkdir dir="${outputDir}/model"/>
|
||||
<echo>
|
||||
outputPath for Api = ${outputPath}
|
||||
outputDir for Api = ${outputDir}
|
||||
</echo>
|
||||
<echo>
|
||||
apiServerRootDir = ${apiServerRootDir}
|
||||
</echo>
|
||||
<delete>
|
||||
<fileset dir="${outputPath}" includes="*.java"/>
|
||||
<fileset dir="${outputDir}" includes="*.java"/>
|
||||
</delete>
|
||||
<java classname="com.wordnik.swagger.codegen.config.java.JavaLibCodeGen">
|
||||
<classpath>
|
||||
@ -46,7 +47,7 @@
|
||||
<include name="**/*.jar"/>
|
||||
</fileset>
|
||||
</classpath>
|
||||
<arg value="${outputPath}"/>
|
||||
<arg value="${outputDir}"/>
|
||||
</java>
|
||||
<copy todir="${apiServerRootDir}" overwrite="true">
|
||||
<fileset dir="conf/java/structure"/>
|
||||
|
@ -3,24 +3,22 @@
|
||||
<property environment="env" />
|
||||
<property name="version.identifier" value="4.04" />
|
||||
|
||||
<!-- property name="application.description" value="Wordnik Java Driver"/>
|
||||
<property name="application.name" value="java-driver"/ -->
|
||||
<condition property="build.common.dir" value="${env.BUILD_COMMON}">
|
||||
<isset property="env.BUILD_COMMON" />
|
||||
</condition>
|
||||
<echo message="using build common dir: ${build.common.dir}"/>
|
||||
|
||||
<target name="runtests" description="runs the test cases" depends="compile, test.compile">
|
||||
<java classname="com.wordnik.swagger.test.APITestRunner">
|
||||
<arg value="JAVA" />
|
||||
<classpath>
|
||||
<pathelement location="build/main/java" />
|
||||
<pathelement location="build/test/java" />
|
||||
<fileset dir="lib">
|
||||
<include name="**/*.jar"/>
|
||||
</fileset>
|
||||
</classpath>
|
||||
</java>
|
||||
<target name="run.tests" description="runs the test cases" depends="compile, test.compile">
|
||||
<java classname="com.wordnik.swagger.test.APITestRunner">
|
||||
<arg value="JAVA" />
|
||||
<classpath>
|
||||
<pathelement location="build/main/java" />
|
||||
<pathelement location="build/test/java" />
|
||||
<fileset dir="lib">
|
||||
<include name="**/*.jar"/>
|
||||
</fileset>
|
||||
</classpath>
|
||||
</java>
|
||||
</target>
|
||||
|
||||
<!-- Creating directories used in app structure if required-->
|
||||
@ -32,6 +30,7 @@
|
||||
<mkdir dir="src/main/java"/>
|
||||
<mkdir dir="src/test/java"/>
|
||||
<mkdir dir="src/test/scala"/>
|
||||
<mkdir dir="src/lang"/>
|
||||
|
||||
<target name="merge.custom" description="Copying from the lang folder to merge with generated">
|
||||
<copy todir="../java/src/main/java/" overwrite="true">
|
||||
|
Loading…
Reference in New Issue
Block a user