kataras / iris

The fastest HTTP/2 Go Web Framework. New, modern and easy to learn. Fast development with Code you control. Unbeatable cost-performance ratio :rocket:
https://www.iris-go.com
BSD 3-Clause "New" or "Revised" License
25.15k stars 2.48k forks source link

[FEATURE REQUEST] How to configure swagger comments with iris using mvc #2408

Open Macfee opened 5 months ago

Macfee commented 5 months ago

Description I am trying to integrate Swagger documentation into a Go project using the Iris framework, but it seems that Swagger UI cannot be correctly generated or accessed in MVC mode. I followed the official documentation and some online resources, but the issue persists. I am hoping for some help or guidance on this matter.

Steps to Reproduce Create a new Iris project and set it up in MVC mode. Configure Swagger according to the Swagger Integration Guide Start the application and attempt to access the Swagger UI. Expected Behavior I expect to be able to access the Swagger UI, and all defined APIs should be correctly displayed within it.

Actual Behavior When I try to access the Swagger UI, the Swagger UI loads but does not display any API definitions.

Attempted Solutions Checked if routes and controllers were correctly set up. Reviewed the Swagger configuration file for errors. Searched for similar issues and solutions in the Iris community and Stack Overflow but didn't find any effective information. Additional Information If there are any error logs or screenshots, please attach them. If there are relevant code snippets or a project repository, providing links or code would be very helpful.