Skip to content

Commit a13f46e

Browse files
committed
Merge pull request #245 from ganeshs/master
Added import mappings for java.util.Set and java.sql.Timestamp
2 parents a626dea + 3ad1ecf commit a13f46e

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,11 @@ class BasicJavaGenerator extends BasicGenerator {
8484
override def importMapping = Map(
8585
"File" -> "java.io.File",
8686
"Date" -> "java.util.Date",
87+
"Timestamp" -> "java.sql.Timestamp",
8788
"Array" -> "java.util.*",
8889
"ArrayList" -> "java.util.*",
8990
"List" -> "java.util.*",
91+
"Set" -> "java.util.*",
9092
"DateTime" -> "org.joda.time.*",
9193
"LocalDateTime" -> "org.joda.time.*",
9294
"LocalDate" -> "org.joda.time.*",

src/test/scala/BasicJavaGeneratorTest.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ class BasicJavaGeneratorTest extends FlatSpec with ShouldMatchers {
123123
it should "honor the import mapping" in {
124124
config.importMapping("Date") should be ("java.util.Date")
125125
config.importMapping("DateTime") should be ("org.joda.time.*")
126+
config.importMapping("Timestamp") should be ("java.sql.Timestamp")
127+
config.importMapping("Set") should be ("java.util.*")
126128
}
127129

128130
/*

0 commit comments

Comments
 (0)