Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[input_as_map] Use NewFieldPath(....).Name() for Fieldnames in modelgen.go #13

Closed
DENKweit opened this issue Aug 2, 2021 · 3 comments
Closed

Comments

@DENKweit
Copy link

DENKweit commented Aug 2, 2021

In clientgen.go:

- genType := r.GetGenType(def.Name)
+ genType := r.GetGenType(NewFieldPath(def.Kind, def.Name).Name())
@DENKweit DENKweit changed the title Use ToGo for Fieldnames in modelgen.go [input_as_map] Use ToGo for Fieldnames in modelgen.go Aug 2, 2021
@DENKweit DENKweit changed the title [input_as_map] Use ToGo for Fieldnames in modelgen.go [input_as_map] Use NewFieldPatch(....).Name() for Fieldnames in modelgen.go Aug 2, 2021
@raphaelfff
Copy link
Contributor

There is no file called clientgen.go, can you be more precise what is the issue here ?

@raphaelfff raphaelfff changed the title [input_as_map] Use NewFieldPatch(....).Name() for Fieldnames in modelgen.go [input_as_map] Use NewFieldPath(....).Name() for Fieldnames in modelgen.go Aug 2, 2021
@DENKweit
Copy link
Author

DENKweit commented Aug 2, 2021

Sorry, I meant clientgen/modelgen.go

The issue is that otherwise genType might be nil because e.g. def.name is FooType_hash instead of FooTypeHash

@raphaelfff
Copy link
Contributor

Fixed in a1bc669

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants