README ¶ swagger-api Quick Start 在项目中引入openapiv2 import "github.com/go-kratos/swagger-api/openapiv2" h := openapiv2.NewHandler() //将/q/路由放在最前匹配 httpSrv.HandlePrefix("/q/", h) 启动应用后,在浏览器中输入 http://<ip>:<port>/q/services,找到需要渲染的<package_name>.<service_name> 在浏览器中输入http://<ip>:<port>/q/swagger-ui/ (注意结尾有斜杠/),同时在Swagger ui界面的Explore栏目中输入http://<ip>:<port>/q/service/<package_name>.<service_name>并点击Explore Expand ▾ Collapse ▴ Directories ¶ Show internal Expand all Path Synopsis examples helloworld/helloworld helloworld/reply helloworld/server openapiv2 swagger_ui Click to show internal directories. Click to hide internal directories.