API Docs improvements (#46)
This commit is contained in:
parent
3183d10dbe
commit
607dbd6ae8
100 changed files with 1306 additions and 9201 deletions
2
vendor/github.com/swaggo/swag/operation.go
generated
vendored
2
vendor/github.com/swaggo/swag/operation.go
generated
vendored
|
|
@ -53,7 +53,7 @@ func (operation *Operation) ParseComment(comment string, astFile *ast.File) erro
|
|||
if operation.Description == "" {
|
||||
operation.Description = lineRemainder
|
||||
} else {
|
||||
operation.Description += "<br>" + lineRemainder
|
||||
operation.Description += "\n" + lineRemainder
|
||||
}
|
||||
case "@summary":
|
||||
operation.Summary = lineRemainder
|
||||
|
|
|
|||
6
vendor/github.com/swaggo/swag/parser.go
generated
vendored
6
vendor/github.com/swaggo/swag/parser.go
generated
vendored
|
|
@ -130,7 +130,11 @@ func (parser *Parser) ParseGeneralAPIInfo(mainAPIFile string) error {
|
|||
case "@title":
|
||||
parser.swagger.Info.Title = strings.TrimSpace(commentLine[len(attribute):])
|
||||
case "@description":
|
||||
parser.swagger.Info.Description = strings.TrimSpace(commentLine[len(attribute):])
|
||||
if parser.swagger.Info.Description == "{{.Description}}" {
|
||||
parser.swagger.Info.Description = strings.TrimSpace(commentLine[len(attribute):])
|
||||
} else {
|
||||
parser.swagger.Info.Description += "\n" + strings.TrimSpace(commentLine[len(attribute):])
|
||||
}
|
||||
case "@termsofservice":
|
||||
parser.swagger.Info.TermsOfService = strings.TrimSpace(commentLine[len(attribute):])
|
||||
case "@contact.name":
|
||||
|
|
|
|||
Reference in a new issue