Skip to content

Commit

Permalink
fix: dynamic schemes bugfix (#450)
Browse files Browse the repository at this point in the history
  • Loading branch information
ubogdan authored and easonlin404 committed Jul 11, 2019
1 parent 4f5a434 commit 6de832a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion gen/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ func (g *Gen) Build(config *Config) error {
for _, scheme := range swagger.Schemes {
schemes = append(schemes, fmt.Sprintf("%q", scheme))
}
swagger.Schemes = []string{}

b, err := json.MarshalIndent(swagger, "", " ")
if err != nil {
Expand Down Expand Up @@ -111,6 +110,12 @@ func (g *Gen) Build(config *Config) error {
return err
}

swagger.Schemes = []string{}
b, err = json.MarshalIndent(swagger, "", " ")
if err != nil {
return err
}

if err := packageTemplate.Execute(docs, struct {
Timestamp time.Time
Doc string
Expand Down

0 comments on commit 6de832a

Please sign in to comment.