Created
July 5, 2013 23:18
-
-
Save jlopezr/5937807 to your computer and use it in GitHub Desktop.
Patch for swagger-play
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 729edf3cceeb6284e48246aa680faac02f9b7fd3 Mon Sep 17 00:00:00 2001 | |
From: =?UTF-8?q?Juan=20L=C3=B3pez=20Rubio?= <[email protected]> | |
Date: Fri, 5 Jul 2013 18:40:33 -0400 | |
Subject: [PATCH] Making scala happy | |
--- | |
modules/swagger-play/src/play/modules/swagger/ApiHelpInventory.scala | 3 ++- | |
modules/swagger-play/src/play/modules/swagger/HelpApi.scala | 4 ++-- | |
modules/swagger-play/src/play/modules/swagger/PlayApiReader.scala | 1 + | |
3 files changed, 5 insertions(+), 3 deletions(-) | |
diff --git a/modules/swagger-play/src/play/modules/swagger/ApiHelpInventory.scala b/modules/swagger-play/src/play/modules/swagger/ApiHelpInventory.scala | |
index 853da4e..c09f51d 100644 | |
--- a/modules/swagger-play/src/play/modules/swagger/ApiHelpInventory.scala | |
+++ b/modules/swagger-play/src/play/modules/swagger/ApiHelpInventory.scala | |
@@ -21,6 +21,7 @@ import play.{Play, Logger} | |
import collection.mutable.ListBuffer | |
import com.wordnik.swagger.core._ | |
+import com.wordnik.swagger.annotations._ | |
import com.wordnik.swagger.play._ | |
import javax.xml.bind.JAXBContext | |
@@ -191,4 +192,4 @@ object ApiHelpInventory { | |
} | |
isAdded | |
} | |
-} | |
\ No newline at end of file | |
+} | |
diff --git a/modules/swagger-play/src/play/modules/swagger/HelpApi.scala b/modules/swagger-play/src/play/modules/swagger/HelpApi.scala | |
index 407a1d1..2937738 100644 | |
--- a/modules/swagger-play/src/play/modules/swagger/HelpApi.scala | |
+++ b/modules/swagger-play/src/play/modules/swagger/HelpApi.scala | |
@@ -85,7 +85,7 @@ class HelpApi { | |
types.foreach(t => { | |
try { | |
val c = SwaggerContext.loadClass(t) | |
- val n = ApiPropertiesReader.read(c) | |
+ val n = ApiPropertiesReader.read(c.getName) | |
if (null != n && null != n.getFields && n.getFields.length > 0) { | |
d.addModel(n.getName, n.toDocumentationSchema()) | |
} else { | |
@@ -118,4 +118,4 @@ class HelpApi { | |
} | |
l.toList | |
} | |
-} | |
\ No newline at end of file | |
+} | |
diff --git a/modules/swagger-play/src/play/modules/swagger/PlayApiReader.scala b/modules/swagger-play/src/play/modules/swagger/PlayApiReader.scala | |
index c250d3d..75b0a83 100644 | |
--- a/modules/swagger-play/src/play/modules/swagger/PlayApiReader.scala | |
+++ b/modules/swagger-play/src/play/modules/swagger/PlayApiReader.scala | |
@@ -17,6 +17,7 @@ | |
package play.modules.swagger | |
import com.wordnik.swagger.core._ | |
+import com.wordnik.swagger.annotations._ | |
import scala.collection.JavaConversions._ | |
import org.slf4j.LoggerFactory | |
-- | |
1.8.3.1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment