Code Monkey home page Code Monkey logo

Comments (4)

shenchenguo avatar shenchenguo commented on June 11, 2024 1

// @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.

lvan100 avatar lvan100 commented on June 11, 2024

go-spring 不打算使用注释的方式实现 swagger,而是使用 API 注册元数据的方式。但是目前精力不在这一块,所以 go-spring 对 swagger 支持不友好。

from go-spring.

shenchenguo avatar shenchenguo commented on June 11, 2024

go-spring 不打算使用注释的方式实现 swagger,而是使用 API 注册元数据的方式。但是目前精力不在这一块,所以 go-spring 对 swagger 支持不友好。

如何通过API注册?源码中web/server.go有关Swagger和SwaggerHandler如何使用?怎么使用通过依赖注入的SpringGin.New获取gin对象

from go-spring.

lvan100 avatar lvan100 commented on June 11, 2024

https://github.com/go-spring/go-spring/blob/master/examples/spring-web-petstore/main.go 可以参考这个示例,大概会是这个样子,但是还没完美。

from go-spring.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.