mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-07 02:55:19 +00:00
made mvn compliant and also fixed issue sin scala resource template
This commit is contained in:
parent
293f8ad1f5
commit
edf0be71f8
@ -2,7 +2,7 @@
|
||||
<property environment="env" />
|
||||
<property name="version.identifier" value="1.1-SHAPSHOT.121026" />
|
||||
<property name="artifact.ext" value="jar" />
|
||||
<property name="organization" value="wordnik" />
|
||||
<property name="organization" value="com.wordnik" />
|
||||
<property name="module" value="${ant.project.name}" />
|
||||
<property name="scala.home" value="${env.SCALA_HOME}" />
|
||||
|
||||
|
@ -41,6 +41,8 @@ import $import$
|
||||
*/
|
||||
object $resource$ {
|
||||
|
||||
var apiInvoker:APIInvoker = null;
|
||||
|
||||
$methods:{ method |
|
||||
/**
|
||||
* $method.title$
|
||||
@ -105,22 +107,22 @@ $endif$
|
||||
//make the API Call
|
||||
$if(method.hasResponseValue)$
|
||||
$if(method.postObject)$
|
||||
val response = APIInvoker.getApiInvoker.invokeAPI(resourcePath, method, queryParams, postData, headerParams)
|
||||
val response = apiInvoker.invokeAPI(resourcePath, method, queryParams, postData, headerParams)
|
||||
$else$
|
||||
val response = APIInvoker.getApiInvoker.invokeAPI(resourcePath, method, queryParams, null, headerParams)
|
||||
val response = apiInvoker.getApiInvoker.invokeAPI(resourcePath, method, queryParams, null, headerParams)
|
||||
$endif$
|
||||
$else$
|
||||
$if(method.postObject)$
|
||||
APIInvoker.getApiInvoker.invokeAPI(resourcePath, method, queryParams, postData, headerParams)
|
||||
apiInvoker.invokeAPI(resourcePath, method, queryParams, postData, headerParams)
|
||||
$else$
|
||||
APIInvoker.getApiInvoker.invokeAPI(resourcePath, method, queryParams, null, headerParams)
|
||||
apiInvoker.invokeAPI(resourcePath, method, queryParams, null, headerParams)
|
||||
$endif$
|
||||
$endif$
|
||||
$if(!method.responseVoid)$
|
||||
|
||||
$if(method.hasResponseValue)$
|
||||
if(null == response || response.length() == 0){
|
||||
null
|
||||
return null
|
||||
}
|
||||
$endif$
|
||||
$if(!method.returnValueList)$
|
||||
@ -146,4 +148,15 @@ $endif$
|
||||
$endif$
|
||||
}
|
||||
}$
|
||||
|
||||
def getApiInvoker():APIInvoker = {
|
||||
if(null == apiInvoker){
|
||||
apiInvoker = APIInvoker.getApiInvoker();
|
||||
}
|
||||
return apiInvoker;
|
||||
}
|
||||
|
||||
def setApiInvoker(invoker:APIInvoker) = {
|
||||
apiInvoker = invoker;
|
||||
}
|
||||
}
|
||||
|
4
ivy.xml
4
ivy.xml
@ -1,5 +1,5 @@
|
||||
<ivy-module version="2.0">
|
||||
<info organisation="wordnik" module="swagger-libs-gen" />
|
||||
<info organisation="com.wordnik" module="swagger-libs-gen" />
|
||||
<configurations>
|
||||
<conf name="build" visibility="public" />
|
||||
<conf name="test" visibility="public" />
|
||||
@ -38,4 +38,4 @@
|
||||
<exclude org="asm" name="asm" />
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</ivy-module>
|
||||
</ivy-module>
|
||||
|
291
pom.xml
Normal file
291
pom.xml
Normal file
@ -0,0 +1,291 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<parent>
|
||||
<groupId>org.sonatype.oss</groupId>
|
||||
<artifactId>oss-parent</artifactId>
|
||||
<version>5</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.wordnik</groupId>
|
||||
<artifactId>swagger-codegen</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<name>wordnik-swagger-codegen</name>
|
||||
<version>1.0</version>
|
||||
<url>https://github.com/wordnik/swagger-codegen</url>
|
||||
<scm>
|
||||
<connection>scm:git:git@github.com:wordnik/swagger-codegen.git</connection>
|
||||
<developerConnection>scm:git:git@github.com:wordnik/swagger-codegen.git</developerConnection>
|
||||
<url>https://github.com/wordnik/swagger-codegen</url>
|
||||
</scm>
|
||||
<prerequisites>
|
||||
<maven>2.2.0</maven>
|
||||
</prerequisites>
|
||||
<developers>
|
||||
<developer>
|
||||
<id>rpidikiti</id>
|
||||
<name>Ramesh Pidikiti</name>
|
||||
<email>ramesh@wordnik.com</email>
|
||||
</developer>
|
||||
</developers>
|
||||
<issueManagement>
|
||||
<system>github</system>
|
||||
<url>https://github.com/wordnik/wordnik-oss/issues</url>
|
||||
</issueManagement>
|
||||
<mailingLists>
|
||||
<mailingList>
|
||||
<name>wordnik-api</name>
|
||||
<archive>https://groups.google.com/forum/#!forum/wordnik-api</archive>
|
||||
</mailingList>
|
||||
</mailingLists>
|
||||
<licenses>
|
||||
<license>
|
||||
<name>Apache License 2.0</name>
|
||||
<url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
|
||||
<distribution>repo</distribution>
|
||||
</license>
|
||||
</licenses>
|
||||
<build>
|
||||
<sourceDirectory>src/main/java</sourceDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>conf</directory>
|
||||
</resource>
|
||||
</resources>
|
||||
<testSourceDirectory>src/test/java</testSourceDirectory>
|
||||
<outputDirectory>target/classes</outputDirectory>
|
||||
<defaultGoal>install</defaultGoal>
|
||||
<directory>target</directory>
|
||||
<finalName>${project.artifactId}-${project.version}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>copy-dependencies</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${project.build.directory}/lib</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
<version>2.1.2</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-sources</id>
|
||||
<phase>verify</phase>
|
||||
<goals>
|
||||
<goal>jar-no-fork</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>2.7</version>
|
||||
<configuration>
|
||||
<aggregate>true</aggregate>
|
||||
<source>1.6</source>
|
||||
<encoding>UTF-8</encoding>
|
||||
<maxmemory>1g</maxmemory>
|
||||
<links>
|
||||
<link>http://java.sun.com/javase/6/docs/api/</link>
|
||||
</links>
|
||||
<excludePackageNames>${javadoc.package.exclude}</excludePackageNames>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-javadocs</id>
|
||||
<phase>verify</phase>
|
||||
<goals>
|
||||
<goal>jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>2.2</version>
|
||||
<configuration>
|
||||
<source>1.6</source>
|
||||
<target>1.6</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>2.2</version>
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifestEntries>
|
||||
<mode>development</mode>
|
||||
<url>${project.url}</url>
|
||||
<implementation-version>${project.version}</implementation-version>
|
||||
<package>com.wordnik</package>
|
||||
</manifestEntries>
|
||||
</archive>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-site-plugin</artifactId>
|
||||
<version>2.1</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-release-plugin</artifactId>
|
||||
<version>2.1</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-eclipse-plugin</artifactId>
|
||||
<version>2.6</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-gpg-plugin</artifactId>
|
||||
<configuration>
|
||||
<releaseProfiles>release</releaseProfiles>
|
||||
<goals>sign</goals>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-plugin-tools-api</artifactId>
|
||||
<version>2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.felix</groupId>
|
||||
<artifactId>maven-bundle-plugin</artifactId>
|
||||
<version>1.4.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-ext</artifactId>
|
||||
<version>${slf4j-version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>${slf4j-version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-beanutils</groupId>
|
||||
<artifactId>commons-beanutils</artifactId>
|
||||
<version>${commons-beanutils-version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>${junit-version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sun.jersey</groupId>
|
||||
<artifactId>jersey-json</artifactId>
|
||||
<version>${jersey-version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sun.jersey</groupId>
|
||||
<artifactId>jersey-client</artifactId>
|
||||
<version>${jersey-version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sun.jersey</groupId>
|
||||
<artifactId>jersey-core</artifactId>
|
||||
<version>${jersey-version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sun.jersey</groupId>
|
||||
<artifactId>jersey-server</artifactId>
|
||||
<version>${jersey-version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-log4j12</artifactId>
|
||||
<version>${slf4j-version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.jackson</groupId>
|
||||
<artifactId>jackson-jaxrs</artifactId>
|
||||
<version>${jackson-version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.jackson</groupId>
|
||||
<artifactId>jackson-xc</artifactId>
|
||||
<version>${jackson-version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.jackson</groupId>
|
||||
<artifactId>jackson-mapper-asl</artifactId>
|
||||
<version>${jackson-version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.antlr</groupId>
|
||||
<artifactId>stringtemplate</artifactId>
|
||||
<version>${org.antlr-version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>oss.sonatype.org</id>
|
||||
<url>http://oss.sonatype.org/content/repositories/releases</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>oss.sonatype.org-snapshot</id>
|
||||
<url>http://oss.sonatype.org/content/repositories/snapshots</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>scala-tools.org</id>
|
||||
<name>Scala-Tools Maven2 Repository</name>
|
||||
<url>http://scala-tools.org/repo-releases</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>jboss</id>
|
||||
<url>https://repository.jboss.org/nexus/content/groups/public/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>codehaus</id>
|
||||
<name>repository.codehaus.org</name>
|
||||
<url>http://repository.codehaus.org</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>codehaus-snapshots</id>
|
||||
<url>http://snapshots.repository.codehaus.org</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
<properties>
|
||||
<swagger-codegen-version>1.1</swagger-codegen-version>
|
||||
<servlet-api-version>2.5</servlet-api-version>
|
||||
<jersey-version>1.7</jersey-version>
|
||||
<jackson-version>1.7.7</jackson-version>
|
||||
<junit-version>4.8.1</junit-version>
|
||||
<maven-plugin.version>1.0.0</maven-plugin.version>
|
||||
<commons-beanutils-version>1.8.0</commons-beanutils-version>
|
||||
<slf4j-version>1.5.8</slf4j-version>
|
||||
<org.antlr-version>3.2</org.antlr-version>
|
||||
</properties>
|
||||
</project>
|
Loading…
Reference in New Issue
Block a user