Can't read swagger JSON from http://localhost:8080/v2/api-docs

1,880 views
Skip to first unread message

Anand Vaidya

unread,
Sep 16, 2016, 9:10:50 AM9/16/16
to Swagger
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? 

tony tam

unread,
Sep 18, 2016, 5:04:14 PM9/18/16
to swagger-sw...@googlegroups.com
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:


shows you how.


On Sep 16, 2016, at 6:10 AM, Anand Vaidya <anandva...@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-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages