Skip to content

Commit

Permalink
Ability to user forceGenerate and extraFields together
Browse files Browse the repository at this point in the history
  • Loading branch information
Roman A. Grigorovich committed Sep 8, 2023
1 parent f90ac05 commit 9623620
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions codegen/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -600,12 +600,7 @@ func (c *Config) autobind() error {
ps := c.Packages.LoadAll(c.AutoBind...)

for _, t := range c.Schema.Types {
if c.Models.UserDefined(t.Name) {
continue
}

if c.Models[t.Name].ForceGenerate {
delete(c.Models, t.Name)
if c.Models.UserDefined(t.Name) || c.Models[t.Name].ForceGenerate {
continue
}

Expand All @@ -621,6 +616,10 @@ func (c *Config) autobind() error {
}

for i, t := range c.Models {
if t.ForceGenerate {
continue
}

for j, m := range t.Model {
pkg, typename := code.PkgAndType(m)

Expand Down

0 comments on commit 9623620

Please sign in to comment.