Skip to content

Commit 6087181

Browse files
author
Ganesh Subramanian
committed
Added import mapping for Timestamp
1 parent c09adc4 commit 6087181

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ 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.*",

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)