beego / bee

Bee is a tool for helping develop with beego app framework.
Apache License 2.0
1.44k stars 920 forks source link

how to generate swagger with structs from external modules? #797

Open Kesigomon opened 3 years ago

Kesigomon commented 3 years ago
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

flycash commented 3 years ago

sorry, Bee can not do this.

JackZxj commented 3 years ago

Look forward to supporting this feature in the future!