jensoleg / swagger-ui

Swagger UI is a dependency-free collection of HTML, Javascript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.
http://swagger.io
Other
1.13k stars 310 forks source link

How can I set this up and use it? #67

Open ghost opened 7 years ago

ghost commented 7 years ago

Another post looking for some kind of installation guide, even very basic.

Thanks :)

Gillardo commented 7 years ago

This would be a help as I would like to use this

ghost commented 7 years ago

Hi Gillardo, I failed to get this working with Docker but I could serve it with gulp without too much difficulty. Install npm (node package manager) and then install gulp, then run gulp serve in the root directory. This will serve your webpage on localhost:8080. Then when you can see the UI, copy your own json file into the dist folder and change the file path in the top left of the UI to the file path of your json file. Then the UI will populate the swagger ui using your json file.

Gillardo commented 7 years ago

I got swaggerUI and swagger working in my aspnet core application, but how do i use this responsive theme?

ghost commented 7 years ago

Do you have a json file for your api? Put the json file in swagger-ui-master\dist and then in the top left of the jensoleg swaggerUI, change the file path to the path for your json file. Then click the arrow and the page will refresh using your new json file. apidocsjson

Gillardo commented 7 years ago

I have no idea where my json file is? if i use the normal swagger UI, the url appears in the top and if i press browse it works, but i cannot find it on the file system, as i am guessing it is generated in memory.

But how do i install this responsive theme and use it?