-
Notifications
You must be signed in to change notification settings - Fork 94
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
Feature request: support configuring generated struct tags #79
Comments
This feature allows users to configure which struct tags to generate. By default it generates json, yaml, mapstructure. Fix omissis#79 Signed-off-by: Alex Boten <aboten@lightstep.com>
This feature allows users to configure which struct tags to generate. By default it generates json, yaml, mapstructure. Fix omissis#79 Signed-off-by: Alex Boten <aboten@lightstep.com>
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 |
I see, thanks. I'll ask on that PR and I will take a look over the weekend |
@omissis any thoughts on whether the PR for this feature can get merged? |
@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! |
This feature allows users to configure which struct tags to generate. By default it generates json, yaml, mapstructure. Fix omissis#79 Signed-off-by: Alex Boten <aboten@lightstep.com>
This feature allows users to configure which struct tags to generate. By default it generates json, yaml, mapstructure. Fix #79 Signed-off-by: Alex Boten <aboten@lightstep.com>
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.
The text was updated successfully, but these errors were encountered: