Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to view my index.html file inside webapp which is cloned from swagger ui on a url

maven-3.0.5

I want to access the swagger sample application on a browser. I'm following the instructions of sample swagger-core using this link(https://github.com/wordnik/swagger-core/tree/master/samples/java-jaxrs).

I have cloned the swagger ui from this link(https://github.com/wordnik/swagger-ui) and placed under the webapp folder.

How can i view my index.html file inside a web-app folder which is cloned from swagger-ui on a url?

Whenever I try to access a url it displays:

This XML file does not appear to have any style information associated with it. The document tree is shown below.

<apiResponse>
  <message>  
     null for url: http://<host>:8002/api/api-docs
  </message>
  <type>
     unknown
  </type>
</apiResponse>

I can't access the swagger-ui. Please help me to do that.

like image 216
user3468598 Avatar asked Mar 28 '14 05:03

user3468598


1 Answers

Is the index.html file loaded by your browser? If so, it seems to me like your api endpoint is not configured correctly.

Your /api-docs url should give something back like

{"apiVersion":"1.0.0","swaggerVersion":"1.2"}

If that happens, you just have to enter this url into your index.html search field...

like image 121
ulrich Avatar answered Nov 11 '22 00:11

ulrich