Skip to content

Commit

Permalink
fix: issue with extraFields being thrown away (#2674)
Browse files Browse the repository at this point in the history
* fix: issue with extraFields being thrown away

* Go fumpt on file

Signed-off-by: Steve Coffman <steve@khanacademy.org>

---------

Signed-off-by: Steve Coffman <steve@khanacademy.org>
Co-authored-by: Steve Coffman <steve@khanacademy.org>
  • Loading branch information
odannyc and StevenACoffman committed Jun 14, 2023
1 parent 71d16aa commit d16f498
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions codegen/config/config.go
Expand Up @@ -305,8 +305,9 @@ func (c *Config) injectTypesFromSchema() error {

if c.Models[schemaType.Name].Fields == nil {
c.Models[schemaType.Name] = TypeMapEntry{
Model: c.Models[schemaType.Name].Model,
Fields: map[string]TypeMapField{},
Model: c.Models[schemaType.Name].Model,
ExtraFields: c.Models[schemaType.Name].ExtraFields,
Fields: map[string]TypeMapField{},
}
}

Expand Down

0 comments on commit d16f498

Please sign in to comment.