Code Monkey home page Code Monkey logo

eapi's People

Contributors

askuy avatar kl7sn avatar link-duan avatar sevennt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

eapi's Issues

@tags是否能像@ignore支持多个接口

因为写在handler一个文件会写多次重复

以下是demo

// @tags User
{
  app.GET("/ping", test.Ping)
  app.GET("/message", test.Message)
}

或者这种

// @tags User
func registerRoutes() {
  g.GET("/v1/resources", handler.ResourceList)
  g.POST("/v1/resources", handler.ResourceCreate)
  g.GET("/v1/pods", handler.PodList)
}

请问request自定义请求参数绑定未生效是bug吗?

这两个函数没有生成参数,请问是这样写吗?
配置:

  request:
    - type: '*gin/core.Context'
      method: 'DefaultQuery' # gin提供的函数
      return:
        data:
          type: 'args[0]'
    - type: '*gin/core.Context'
      method: 'MyQuery' # 自定义函数
      return:
        data:
          type: 'args[0]'

go代码:

	current := c.Query("current")
	pageSize := c.Query("pageSize")
	fmt.Println("xxx", current, pageSize)

	test := c.MyQuery("test")
	fmt.Println("test", test)

	test2 := c.DefaultQuery("test22", "222")
	fmt.Println("test", test2)

生成的openapi
image

生成的文档为空

我们api目录下放的都是controller相关代码,用gin框架解析参数之类的,执行的命令

egogen --output docs2 --plugin gin --dir api

docs2目录中生成的swagger.json内容:

{
    "swagger": "2.0",
    "info": {},
    "paths": {}
}

没有日志输出,请问该如何排查呢?感谢

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.