Skip to content

Commit

Permalink
Merge pull request #159 from vektah/enum-only-generation
Browse files Browse the repository at this point in the history
Dont skip model generation if there are enums defined
  • Loading branch information
vektah authored Jul 1, 2018
2 parents 588aeac + 3f751a4 commit b16e842
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion codegen/codegen.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func Generate(cfg Config) error {
if err != nil {
return errors.Wrap(err, "model plan failed")
}
if len(modelsBuild.Models) > 0 {
if len(modelsBuild.Models) > 0 || len(modelsBuild.Enums) > 0 {
modelsBuild.PackageName = cfg.ModelPackageName
var buf *bytes.Buffer
buf, err = templates.Run("models.gotpl", modelsBuild)
Expand Down

0 comments on commit b16e842

Please sign in to comment.