api-docs page giving resource not found error

40 views
Skip to first unread message

AD

unread,
Jun 27, 2015, 8:37:19 AM6/27/15
to swagger-sw...@googlegroups.com
I am new to spring and Swagger.I am trying to integrate swagger with my existing application and i am using spring MVC and Maven.
I don't know why I am getting this error.
Whenever i try to access http://localhost:8040/WAR_file_name/api-docs i get resoure not found error and for http://localhost:8040/WAR_file_name/swagger I see the swagger page but no APIs are listed.
My dispatcher servlet is mapped to ".controller". Is it because of that?
How should i write my annotations?(@Api, @ApiOperation)

Josh Ponelat

unread,
Jun 29, 2015, 3:43:10 AM6/29/15
to swagger-sw...@googlegroups.com
Our expert is on vacation (lucky guy), so my help may be a bit primitive...
But what versions are you using? Are you on SpringFox ? Check out their website... http://springfox.github.io/springfox/
You might find what you need there, otherwise in a few days help will arrive!


--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

AD

unread,
Jul 1, 2015, 3:07:33 AM7/1/15
to swagger-sw...@googlegroups.com
I'm using swagger 1.2
In my pom.XML I added mangofactory bean.
Whenever I try to access http://localhost:8040/context_root/api-docs I get can't read json error.

Ron Ratovsky

unread,
Jul 5, 2015, 3:53:14 PM7/5/15
to swagger-sw...@googlegroups.com
Since this is a new integration, as Josh mentioned, please use https://github.com/springfox/springfox. There's really no point integrating anything older.

--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
-----------------------------------------
http://swagger.io
https://twitter.com/SwaggerApi
-----------------------------------------

Anjor Deshmukh

unread,
Jul 5, 2015, 9:28:07 PM7/5/15
to swagger-sw...@googlegroups.com
I cannot change the code right now. Can you help me with this integration?
Now, the swagger-ui screen gets hanged and shows "fetching resource list" and in chrome dev tools it shows cannot read length of defined.   
And http://localhost:8040/context_root/api-docs shows this only: "apiVersion":"1.0.0",     "swaggerVersion":"1.2"

--
You received this message because you are subscribed to a topic in the Google Groups "Swagger" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/swagger-swaggersocket/8S4HuwlomeI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to swagger-swaggers...@googlegroups.com.

Ron Ratovsky

unread,
Jul 6, 2015, 1:12:49 AM7/6/15
to swagger-sw...@googlegroups.com
That means that your swagger-springmvc configuration is off, but I have no idea what.
Since this is an old version, I don't know if its developers would offer support for it anymore, but you can wait and see if they'll reply.

Reply all
Reply to author
Forward
0 new messages