rename (#543)
This commit is contained in:
@@ -11,10 +11,11 @@ import (
|
||||
const (
|
||||
bodyTagKey = "json"
|
||||
formTagKey = "form"
|
||||
pathTagKey = "path"
|
||||
defaultSummaryKey = "summary"
|
||||
)
|
||||
|
||||
var definedKeys = []string{bodyTagKey, formTagKey, "path"}
|
||||
var definedKeys = []string{bodyTagKey, formTagKey, pathTagKey}
|
||||
|
||||
// Routes returns all routes in api service
|
||||
func (s Service) Routes() []Route {
|
||||
@@ -25,7 +26,7 @@ func (s Service) Routes() []Route {
|
||||
return result
|
||||
}
|
||||
|
||||
// Tags retuens all tags in Member
|
||||
// Tags returns all tags in Member
|
||||
func (m Member) Tags() []*Tag {
|
||||
tags, err := Parse(m.Tag)
|
||||
if err != nil {
|
||||
@@ -141,7 +142,7 @@ func (t DefineStruct) GetFormMembers() []Member {
|
||||
return result
|
||||
}
|
||||
|
||||
// GetNonBodyMembers retruns all have no tag fields
|
||||
// GetNonBodyMembers returns all have no tag fields
|
||||
func (t DefineStruct) GetNonBodyMembers() []Member {
|
||||
var result []Member
|
||||
for _, member := range t.Members {
|
||||
@@ -162,16 +163,16 @@ func (r Route) JoinedDoc() string {
|
||||
return strings.TrimSpace(doc)
|
||||
}
|
||||
|
||||
// GetAnnotation returns the value by specified key
|
||||
// GetAnnotation returns the value by specified key from @server
|
||||
func (r Route) GetAnnotation(key string) string {
|
||||
if r.Annotation.Properties == nil {
|
||||
if r.AtServerAnnotation.Properties == nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
return r.Annotation.Properties[key]
|
||||
return r.AtServerAnnotation.Properties[key]
|
||||
}
|
||||
|
||||
// GetAnnotation returns the value by specified key
|
||||
// GetAnnotation returns the value by specified key from @server
|
||||
func (g Group) GetAnnotation(key string) string {
|
||||
if g.Annotation.Properties == nil {
|
||||
return ""
|
||||
|
||||
Reference in New Issue
Block a user