Goswagger - Skipping '', recursion detected
问题:当使用的结构体为嵌套格式,会提示 recursion detected 或 cannot find type definition go 1 2 3 4 5 6 7 8 9 10 11 type Instance struct { metav1.TypeMeta Instances []InstanceItem `json:"instances" yaml:"instances" form:"instances" binding:"required"` ServiceSelector map[string]string `json:"serivce_selector" yaml:"serivce_selector" form:"serivce_selector"` } type InstanceItem struct { Name string `json:"name" yaml:"name" form:"name" binding:"required"` PromEndpoint string `json:"prom_endpoint" yaml:"prom_endpoint" form:"prom_endpoint" binding:"required"` Labels map[string]string `json:"labels" yaml:"labels" form:"labels"` } go swagger 注释为 text 1 2 3 4 5 6 7 8 9 10 // deleteInstance godoc // @Summary Remove prometheus instance....