![]() ![]() This file should get checked in with your own server's code base. Make that your canonical source of truth. (I should note that I'm really only using Swagger for its documentation capabilities as I already have an API and a testing framework.) I've pieced together ONE way to do it that worked for me. From what I've read, there are many different ways to get your API to show in a Swagger UI on your own server but I could never find one place with all the steps. So, I found that the docker approach was the easiest way to go. Then I ran the command that was supposed to let me see my own API configuration in the UI (minus the -v run option):ĭocker run -p 80:8080 -e "SWAGGER_JSON=/path/to/my/swagger.json" swaggerapi/swagger-ui I was successfully able to see the petstore example on localhost. I then ran the commands specified in the swagger-ui github project:ĭocker run -p 80:8080 swaggerapi/swagger-ui This is not a small step and seems to render the cloning step as unnecessary, no? I installed docker and created an account on docker hub. While not explicitly mentioned in your documentation, it's clear that you require docker to be installed. ![]() I cloned the github swagger-ui project ( ) though I'm not sure why I need to do this if I'm just using the pre-built docker image. I'm building my API in swaggerhub and I exported a JSON file. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |