Update parser.go

fix
This commit is contained in:
MaxToby 2021-09-02 21:16:33 +08:00 committed by GitHub
parent 80775cf7ef
commit 5c5157d75d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -58,6 +58,8 @@ func applyGenerate(p *plugin2.Plugin, host string, basePath string) (*swaggerObj
newSecDefValue.Type = "apiKey"
newSecDefValue.In = "header"
s.SecurityDefinitions["apiKey"] = newSecDefValue
s.Security = append(s.Security, swaggerSecurityRequirementObject{"apiKey": []string{}})
requestResponseRefs := refMap{}
renderServiceRoutes(p.Api.Service, p.Api.Service.Groups, s.Paths, requestResponseRefs)