From 7c998a2d672f43057de10a7dc5cb7303ff08935a Mon Sep 17 00:00:00 2001 From: Tony Tam Date: Fri, 10 Oct 2014 22:07:08 -0700 Subject: [PATCH] addressed import mappings --- .../codegen/languages/ScalatraServerCodegen.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/wordnik/swagger/codegen/languages/ScalatraServerCodegen.java b/src/main/java/com/wordnik/swagger/codegen/languages/ScalatraServerCodegen.java index 6e923f348e..effc94281c 100644 --- a/src/main/java/com/wordnik/swagger/codegen/languages/ScalatraServerCodegen.java +++ b/src/main/java/com/wordnik/swagger/codegen/languages/ScalatraServerCodegen.java @@ -19,15 +19,16 @@ public class ScalatraServerCodegen extends DefaultCodegen implements CodegenConf outputFolder = "generated-code/scalatra"; modelTemplateFiles.put("model.mustache", ".scala"); apiTemplateFiles.put("api.mustache", ".scala"); - templateDir = "src/main/resources/scalatra"; + templateDir = "scalatra"; apiPackage = "com.wordnik.client.api"; modelPackage = "com.wordnik.client.model"; defaultIncludes = new HashSet( Arrays.asList("double", - "int", - "long", - "short", + "Int", + "Long", + "Float", + "Double", "char", "float", "String", @@ -42,6 +43,9 @@ public class ScalatraServerCodegen extends DefaultCodegen implements CodegenConf "Map") ); + typeMapping.put("integer", "Int"); + typeMapping.put("long", "Long"); + additionalProperties.put("appName", "Swagger Sample"); additionalProperties.put("appName", "Swagger Sample"); additionalProperties.put("appDescription", "A sample swagger server");