Skip to content

Commit

Permalink
Paths should start with a slash
Browse files Browse the repository at this point in the history
In the jaxrs version of this code the generated path always starts with
a slash.  Which is a good thing, because swagger-ui concatenates the path
directly with the baseUrl.

In the play2 version it was just starting from the method name (no leading
slash).  This made the swagger-ui 'try it out' button not work with play2
based classes (as seen with the play2 version of the pets sample application).

With this change the samples/scala-play2 will work with swagger-ui
'try it out' (and it now works for my app as well)
  • Loading branch information
Kevin Hester committed Jul 2, 2012
1 parent 8dac1cf commit 688616e
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -131,7 +131,7 @@ private class PlayApiSpecParser(_hostClass: Class[_], _apiVersion: String, _swag
case e: String => str.replaceAll(".json", FORMAT_STRING).replaceAll(".xml", FORMAT_STRING)
}
Logger debug (s)
s
"/" + s
}

override protected def processOperation(method: Method, o: DocumentationOperation) = {
Expand Down

0 comments on commit 688616e

Please sign in to comment.