@@ -35,42 +35,44 @@ const (
3535 // SnakeCase indicates using SnakeCase strategy for struct field.
3636 SnakeCase = "snakecase"
3737
38- idAttr = "@id"
39- acceptAttr = "@accept"
40- produceAttr = "@produce"
41- paramAttr = "@param"
42- successAttr = "@success"
43- failureAttr = "@failure"
44- responseAttr = "@response"
45- headerAttr = "@header"
46- tagsAttr = "@tags"
47- routerAttr = "@router"
48- deprecatedRouterAttr = "@deprecatedrouter"
49-
50- summaryAttr = "@summary"
51- deprecatedAttr = "@deprecated"
52- securityAttr = "@security"
53- titleAttr = "@title"
54- conNameAttr = "@contact.name"
55- conURLAttr = "@contact.url"
56- conEmailAttr = "@contact.email"
57- licNameAttr = "@license.name"
58- licURLAttr = "@license.url"
59- versionAttr = "@version"
60- descriptionAttr = "@description"
61- descriptionMarkdownAttr = "@description.markdown"
62- secBasicAttr = "@securitydefinitions.basic"
63- secAPIKeyAttr = "@securitydefinitions.apikey"
64- secApplicationAttr = "@securitydefinitions.oauth2.application"
65- secImplicitAttr = "@securitydefinitions.oauth2.implicit"
66- secPasswordAttr = "@securitydefinitions.oauth2.password"
67- secAccessCodeAttr = "@securitydefinitions.oauth2.accesscode"
68- tosAttr = "@termsofservice"
69- extDocsDescAttr = "@externaldocs.description"
70- extDocsURLAttr = "@externaldocs.url"
71- xCodeSamplesAttr = "@x-codesamples"
72- scopeAttrPrefix = "@scope."
73- stateAttr = "@state"
38+ idAttr = "@id"
39+ acceptAttr = "@accept"
40+ produceAttr = "@produce"
41+ paramAttr = "@param"
42+ successAttr = "@success"
43+ failureAttr = "@failure"
44+ responseAttr = "@response"
45+ headerAttr = "@header"
46+ tagsAttr = "@tags"
47+ routerAttr = "@router"
48+ deprecatedRouterAttr = "@deprecatedrouter"
49+
50+ summaryAttr = "@summary"
51+ deprecatedAttr = "@deprecated"
52+ securityAttr = "@security"
53+ titleAttr = "@title"
54+ conNameAttr = "@contact.name"
55+ conURLAttr = "@contact.url"
56+ conEmailAttr = "@contact.email"
57+ licNameAttr = "@license.name"
58+ licURLAttr = "@license.url"
59+ versionAttr = "@version"
60+ descriptionAttr = "@description"
61+ descriptionMarkdownAttr = "@description.markdown"
62+ secBasicAttr = "@securitydefinitions.basic"
63+ secAPIKeyAttr = "@securitydefinitions.apikey"
64+ secBearerAuthAttr = "@securitydefinitions.bearerauth"
65+ secApplicationAttr = "@securitydefinitions.oauth2.application"
66+ secImplicitAttr = "@securitydefinitions.oauth2.implicit"
67+ secPasswordAttr = "@securitydefinitions.oauth2.password"
68+ secAccessCodeAttr = "@securitydefinitions.oauth2.accesscode"
69+ tosAttr = "@termsofservice"
70+ extDocsDescAttr = "@externaldocs.description"
71+ extDocsURLAttr = "@externaldocs.url"
72+ xCodeSamplesAttr = "@x-codesamples"
73+ xCodeSamplesAttrOriginal = "@x-codeSamples"
74+ scopeAttrPrefix = "@scope."
75+ stateAttr = "@state"
7476)
7577
7678// ParseFlag determine what to parse
@@ -198,7 +200,7 @@ type Parser struct {
198200 // ParseFuncBody whether swag should parse api info inside of funcs
199201 ParseFuncBody bool
200202
201- // use new openAPI version
203+ // use new openAPI version
202204 openAPIVersion bool
203205}
204206
@@ -517,7 +519,7 @@ func (parser *Parser) parseDeps(absMainAPIFilePath string, parseDepth int) error
517519
518520 length := len (pkgs )
519521 for i := 0 ; i < length ; i ++ {
520- err := parser .getAllGoFileInfoFromDepsByList (pkgs [i ])
522+ err := parser .getAllGoFileInfoFromDepsByList (pkgs [i ], parser . ParseDependency )
521523 if err != nil {
522524 return err
523525 }
@@ -537,7 +539,7 @@ func (parser *Parser) parseDeps(absMainAPIFilePath string, parseDepth int) error
537539 }
538540
539541 for i := 0 ; i < len (t .Root .Deps ); i ++ {
540- if err := parser .getAllGoFileInfoFromDeps (& t .Root .Deps [i ]); err != nil {
542+ if err := parser .getAllGoFileInfoFromDeps (& t .Root .Deps [i ], parser . ParseDependency ); err != nil {
541543 return errors .Wrap (err , "could not parse dependencies" )
542544 }
543545 }
0 commit comments