Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
added new schemagen tag support for headcomments of yaml file
this is gated in the generate command by a feature flag that you will need to enable by passing in
--schemagen
The idea behind this initial pass is that you will be able to modify the types of your yaml through the yaml comments.
so for example:
Will allow you to modify the
maxReplicas
to become a number type when by default it would have been an integer.here is the difference in the output
bin/schema-gen generate ./testdata/values.yaml --schemagen --destination json.schema
bin/schema-gen -l debug generate ./testdata/demo.yaml --destination json.schema
As part of this effort I also added global logging to allow us to gather information by just passing context. The new flag allows you to specify the log level for the zap logger, so most of the troubleshooting can be done with
-l debug
Here is the associated help file for this command change