Skip to content

Commit

Permalink
render proper json for swagger with auth
Browse files Browse the repository at this point in the history
  • Loading branch information
casualjim committed Feb 5, 2013
1 parent 49e99b4 commit e33449c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Expand Up @@ -38,6 +38,7 @@ class JValueResultSpec extends MutableScalatraSpec {
get("/empty-halt") {
halt(400, null)
}

error {
case t: Throwable =>
t.printStackTrace()
Expand Down
Expand Up @@ -123,7 +123,7 @@ object AuthApi {
new ModelFieldSerializer,
new AuthOperationSerializer(userOption)) ++ JodaTimeSerializers.all

def toJValue[T <: AnyRef](doc: Any, uOpt: Option[T]) = (Extraction.decompose(doc)(formats(uOpt)).noNulls)
def toJValue[T <: AnyRef](doc: Any, uOpt: Option[T]) = Extraction.decompose(doc)(formats(uOpt))

class AuthOperationSerializer[T <: AnyRef](userOption: Option[T]) extends Serializer[AuthOperation[T]] {

Expand Down

0 comments on commit e33449c

Please sign in to comment.