Feature request: support configuring generated struct tags
codeboten opened this issue · 5 comments
Currently the generated code always sets a struct tag for json, yaml, and mapstructure. See:
go-jsonschema/pkg/generator/generate.go
Lines 807 to 811 in 1720613
It would be great if it was possible to pass in a configuration option to specify which of these to set.
Hi @codeboten, thanks for raising this issue and for contributing the PR! Question: do those unused, extra tags cause issues in downstream code, or is this change done for "cosmetic" purposes only?
@omissis the request came from this comment open-telemetry/opentelemetry-collector#7679 (comment). The rest of the code for the configuration for the collector only contains mapstructure
struct tags, so i think this is mostly for consistency
I see, thanks. I'll ask on that PR and I will take a look over the weekend
@codeboten yeah I asked on the pr some clarifications, and I'm ok with offloading some maintenance off them to have it here, even though I feel the command interface is becoming a bit bloated. I'll see to review this PR as soon as possible. Thanks!