Expose shlink's API endpoints via swagger ui while running Docker image #1875
-
Shlink versionAll PHP versionAll How do you serve ShlinkRoadRunner Docker image Database engineSQLite Database versionN/A SummaryI'd like to have some API path which would expose shlink's swagger ui (sth similar to this one in the documentation), which is matching API definition of the respective version eg. 3.6.3. For example if I run the docker locally it would be http://localhost:8080/swagger-ui Is there such possibility? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
What I usually do is have a swagger-ui dist copy inside the You can download latest's swagger-ui from here https://github.com/swagger-api/swagger-ui/archive/refs/heads/master.zip, then pick Then you'll need some way to serve the local swagger-ui. If you use WebStorm, it has a way to spin-up a static file server by right-clicking swagger-ui's That said, I could explore including a copy and serve it with the project itself. |
Beta Was this translation helpful? Give feedback.
If you apply this diff to the
docker-compose.yml
file, you'll have a swagger-ui on http://localhost:8005 which serves the Open API spec fromdocs/swagger
.I'll push this change soon to
develop
.