Open
Description
Problem
Swagger UI can't show OpenAPI specs from services running inside the Docker network.
Solution
30 lines for Nginx: https://gitlab.com/plgrnd/swagger-ui/-/blob/main/embedding.conf
Usage
swagger-ui:
image: swagger-ui:latest
environment:
URLS: '[{"url":"/service-a:8000/v3/api-docs", "name":"service-a"},{"url":"/service-b:9000/v3/api-docs", "name":"service-b"}]'
ports:
- "8080:8080"
Result
Start the services and open http://localhost:8080 in your browser. The Servers drop-down will now include option Proxied server url
.
Metadata
Metadata
Assignees
Labels
No labels