Self Checks
Dify version
1.14.2
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
It seems that Dify comes with a OpenAPI documentation (aka Swagger). However, when running
it via docker-compose a few things seem not to work.
✔️ Expected Behavior
When enabling OpenAPI docs via "SWAGGER_UI_ENABLED=True" in .env a fully functional Online
OpenAPI documentation becomes available under /api/swagger-ui.html.
❌ Actual Behavior
- The page appears empty because /swaggerui is not covered by nginx/conf.d/default.conf. As a workaround
one may add this to nginx/conf.d/default.conf.template and restart the containers:
location /swaggerui {
proxy_pass http://api:5001;
include proxy.conf;
}
- Even with the workaround a few things seem to be off:
- Some (all?) URLs used are wrong, e.g.: "/api/login" when "/console/api/login" would have worked.
- Some API docs seem to be out-dated, e.g. the /login path does not document the "remember_me"
parameter used by the actual web application.
Maybe /api/swagger.json is just outdated and and should be regenerated when building the Docker image?
Self Checks
Dify version
1.14.2
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
It seems that Dify comes with a OpenAPI documentation (aka Swagger). However, when running
it via docker-compose a few things seem not to work.
✔️ Expected Behavior
When enabling OpenAPI docs via "SWAGGER_UI_ENABLED=True" in .env a fully functional Online
OpenAPI documentation becomes available under /api/swagger-ui.html.
❌ Actual Behavior
one may add this to nginx/conf.d/default.conf.template and restart the containers:
parameter used by the actual web application.
Maybe /api/swagger.json is just outdated and and should be regenerated when building the Docker image?