Comments (4)
// @title Sample API
// @Version 2.0
// @description This is Sample server.
// @termsofservice http://swagger.io/terms/
// @contact.name API Support
// @contact.url http://www.swagger.io/support
// @contact.email [email protected]
// @license.name Apache 2.0
// @license.url http://www.apache.org/licenses/LICENSE-2.0.html
// @schemes http https
// @host localhost:8080
// @basepath /api/v1
func init() {
gs.HandleGet("/swagger/*any", SpringGin.Handler(ginSwagger.WrapHandler(swaggerFiles.Handler)))
}
from go-spring.
go-spring 不打算使用注释的方式实现 swagger,而是使用 API 注册元数据的方式。但是目前精力不在这一块,所以 go-spring 对 swagger 支持不友好。
from go-spring.
go-spring 不打算使用注释的方式实现 swagger,而是使用 API 注册元数据的方式。但是目前精力不在这一块,所以 go-spring 对 swagger 支持不友好。
如何通过API注册?源码中web/server.go有关Swagger和SwaggerHandler如何使用?怎么使用通过依赖注入的SpringGin.New获取gin对象
from go-spring.
https://github.com/go-spring/go-spring/blob/master/examples/spring-web-petstore/main.go 可以参考这个示例,大概会是这个样子,但是还没完美。
from go-spring.
Related Issues (20)
- StaticFS设置问题 HOT 4
- log xml配置添加dtd约束,滚动切割,压缩,增加io读取文件扩展
- gs调试模式log存在隐患 HOT 1
- 希望暴露gs.getProperty(key), 刷新bean方法 HOT 8
- 缺少http session,扩展sessionrepository,比如通过redis或者数据库操作
- 不是很了解当前项目的状态,Example 都编译不过? HOT 1
- 怎样实现自定义的中间件Client HOT 2
- 如何集成CORS? HOT 1
- 有没有FileAppender的例子 HOT 1
- 怎样使用内部重定向Redirect?
- 如何在内部获取 context.Context 上下文
- spring-core package missing conf.BindOption definition
- 使用starter-gin,如何使用中间件
- 为什么没有AOP特性?
- 是否支持html模板 HOT 1
- 关于XxxMapping方法和XxxBinding方法合并 HOT 3
- ioc可以支持多例bean HOT 2
- 日志滚动(rolling)记录器 HOT 2
- 需要内置一些过滤器,比如cors,csrf,xss,安全性过滤等等常用的 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-spring.