Skip to content

Commit 450746f

Browse files
committed
updated jodatime version, added groupId and artifactId params
1 parent 827f03f commit 450746f

File tree

7 files changed

+39
-10
lines changed

7 files changed

+39
-10
lines changed

src/main/resources/Java/JsonUtil.mustache

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import com.fasterxml.jackson.databind.*;
55
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
66
import com.fasterxml.jackson.core.JsonGenerator.Feature;
77

8+
import com.fasterxml.jackson.datatype.joda.*;
9+
810
public class JsonUtil {
911
public static ObjectMapper mapper;
1012

src/main/resources/Java/pom.mustache

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
33
<modelVersion>4.0.0</modelVersion>
4-
<groupId>{{package}}</groupId>
5-
<artifactId>api-client</artifactId>
4+
<groupId>{{groupId}}</groupId>
5+
<artifactId>{{artifactId}}</artifactId>
66
<packaging>jar</packaging>
7-
<name>api-client</name>
7+
<name>{{artifactId}}</name>
88
<version>{{apiVersion}}</version>
99
<scm>
1010
<connection>scm:git:[email protected]:wordnik/swagger-mustache.git</connection>
@@ -181,7 +181,7 @@
181181
<dependency>
182182
<groupId>com.fasterxml.jackson.datatype</groupId>
183183
<artifactId>jackson-datatype-joda</artifactId>
184-
<version>${jackson-version}</version>
184+
<version>2.1.5</version>
185185
</dependency>
186186
<dependency>
187187
<groupId>joda-time</groupId>

src/main/resources/android-java/pom.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
33
<modelVersion>4.0.0</modelVersion>
4-
<groupId>com.wordnik</groupId>
4+
<groupId>{{groupId}}</groupId>
55
<artifactId>{{artifactId}}</artifactId>
66
<packaging>jar</packaging>
77
<name>{{artifactId}}</name>
8-
<version>1.0.0</version>
8+
<version>{{apiVersion}}</version>
99
<scm>
1010
<connection>scm:git:[email protected]:wordnik/swagger-mustache.git</connection>
1111
<developerConnection>scm:git:[email protected]:wordnik/swagger-codegen.git</developerConnection>

src/main/resources/scala/pom.mustache

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
33
<modelVersion>4.0.0</modelVersion>
4-
<groupId>com.wordnik</groupId>
5-
<artifactId>swagger-client</artifactId>
4+
<groupId>{{groupId}}</groupId>
5+
<artifactId>{{artifactId}}</artifactId>
66
<packaging>jar</packaging>
7-
<name>swagger-client</name>
8-
<version>1.0</version>
7+
<name>{{artifactId}}</name>
8+
<version>{{apiVersion}}</version>
99
<prerequisites>
1010
<maven>2.2.0</maven>
1111
</prerequisites>

src/main/scala/com/wordnik/swagger/codegen/BasicAndroidJavaClient.scala

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,15 @@ class BasicAndroidJavaGenerator extends BasicJavaGenerator {
5858
// package for api classes
5959
override def apiPackage = Some("com.wordnik.client.api")
6060

61+
/**
62+
* you should override these params for generating the pom.xml and processing
63+
* additional params
64+
**/
65+
additionalParams ++= Map(
66+
"artifactId" -> "android-client",
67+
"artifactVersion" -> "1.0.0",
68+
"groupId" -> "com.wordnik")
69+
6170
// supporting classes
6271
override def supportingFiles = List(
6372
("apiInvoker.mustache", destinationDir + java.io.File.separator + invokerPackage.get.replace(".", java.io.File.separator) + java.io.File.separator, "ApiInvoker.java"),

src/main/scala/com/wordnik/swagger/codegen/BasicJavaGenerator.scala

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,15 @@ class BasicJavaGenerator extends BasicGenerator {
183183
(declaredType, defaultValue)
184184
}
185185

186+
/**
187+
* you should override these params for generating the pom.xml and processing
188+
* additional params
189+
**/
190+
additionalParams ++= Map(
191+
"artifactId" -> "java-client",
192+
"artifactVersion" -> "1.0.0",
193+
"groupId" -> "com.wordnik")
194+
186195
/**
187196
* we are defaulting to null values since the codegen uses java objects instead of primitives
188197
* If you change to primitives, you can put in the appropriate values (0.0f, etc).

src/main/scala/com/wordnik/swagger/codegen/BasicScalaGenerator.scala

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,15 @@ class BasicScalaGenerator extends BasicGenerator {
205205
// escape keywords
206206
override def escapeReservedWord(word: String) = "`" + word + "`"
207207

208+
/**
209+
* you should override these params for generating the pom.xml and processing
210+
* additional params
211+
**/
212+
additionalParams ++= Map(
213+
"artifactId" -> "scala-client",
214+
"artifactVersion" -> "1.0.0",
215+
"groupId" -> "com.wordnik")
216+
208217
// supporting classes
209218
override def supportingFiles = List(
210219
("apiInvoker.mustache", destinationDir + "/com/wordnik/client", "ApiInvoker.scala"),

0 commit comments

Comments
 (0)