bee icon indicating copy to clipboard operation
bee copied to clipboard

how to generate swagger with structs from external modules?

Open Kesigomon opened this issue 2 years ago • 2 comments

package controllers
import (
    "github.com/bwmarrin/discordgo"
    beego "github.com/beego/beego/v2/server/web"
)
type DiscordChannelController struct {
	beego.Controller
}
// Post
// @Title SendMessage
// @Description Send Message from Bot
// @Param   :channel_id        path    string  true        "when channel send"
// @Success 200 {object} discordgo.Message
// @Failure 403 body is empty
// @router /:channel_id/ [post]
func (c *DiscordChannelController) Post()  {}

when generate swagger document with structs from external modules, got a waring

WARN     ▶ 0001 Cannot find the object: discordgo.Message

I think this is not for discordgo's problem, but about external modules. Is there any ways to use structs from external modules in generating swagger?

discordgo: https://github.com/bwmarrin/discordgo

Kesigomon avatar Aug 16 '21 16:08 Kesigomon

sorry, Bee can not do this.

flycash avatar Aug 18 '21 13:08 flycash

Look forward to supporting this feature in the future!

JackZxj avatar Aug 26 '21 07:08 JackZxj