2014-02-22 22 views
4

我剛剛將Swagger集成到我的Play應用程序中並且它可以工作– http://localhost:9000/api-docs/以JSON格式返回api文檔。現在Swagger-UI如何在Play應用程序中工作

我想用揚鞭的UI ......我已經複製了distromyApp\public爲自述文件中建議,但是沒辦法,使其工作–文檔似乎有點過時。

我試圖把它添加到conf\routes ...

GET /swagger-ui staticDir:public/swagger-ui 

...但它不工作,我總是得到以下錯誤消息:

Controller method call expected 

內容目錄public/swagger的目錄是here。 謝謝。

回答

4

只是增加了以下路線文件routes

GET /swagger-ui/*file controllers.Assets.at(path = "/public/swagger-ui", file) 

我希望它能幫助。

+0

適合我!謝謝 :-) – tuxdna

相關問題