Why do you require "Only fields with a valid json tag will be converted to TypeScript models."?
PaluMacil opened this issue · 5 comments
I would love a way to specify that I don't want to limit myself to tagged fields. Additionally, fields such as json:",omitempty"
shouldn't be ignored.
Hm, there is definitely no special reason. It was OK for my use-case, and nobody asked for this :)
At the moment I don't have the time to fix that (I'll probably fix a few smaller issues in the next 3-4 weeks). But, if it's important to you -- it shouldn't be difficult. The code handling it is in https://github.com/tkrajina/typescriptify-golang-structs/blob/master/typescriptify/typescriptify.go#L220
If you're open to a pull request, I'll see if I can find the time in the next couple days to contribute. Do you have any contribution guidelines?
If you're open to a pull request
I am :)
Am I doing something wrong where my structs without json fields aren't populating? For example, sql.NullInt32 doesn't populate
@austincollinpena I recommend opening a new issue. Even if your question is related, after more than 4 years I don't recall anything about this issue anyway. (Honestly, I don't recall using this library in the first place by now, though it looks nice.)