Well, likely the location of the api-docs isn’t what you think it is. Take a look at this project setup to see if it can help. My guess is that you have configured the server.contextPath in application.properties. The api-docs are, by default, relative to that location at /v2/api-docs.
Note that you can override that location as well. The sample project here: https://github.com/swagger-api/swagger-samples/tree/master/java/java-spring-boot <https://github.com/swagger-api/swagger-samples/tree/master/java/java-spring-boot> shows you how. > On Sep 16, 2016, at 6:10 AM, Anand Vaidya <anandvaidya...@gmail.com> wrote: > > I have import a spring-boot project in eclipse it is having an swagger api. > every thing is working fine but when I reach to api page it response "Can't > read swagger JSON from http://localhost:8080/v2/api-docs". > > what I have to do next to solve this error? > > -- > 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-swaggersocket+unsubscr...@googlegroups.com > <mailto:swagger-swaggersocket+unsubscr...@googlegroups.com>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. -- 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-swaggersocket+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.