-
Notifications
You must be signed in to change notification settings - Fork 63
Treat unspecified keys as their default value if provided #83
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
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jennybuckley The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
How do you plan on generating the default field value? |
Talked offline, but I'll write it here too. The plan is to get this from the openapi, and that will come from the default markers in types.go that are going to eventually be defined. Like: // types.go
type Foo struct {
// +default={"bar": "abc"}
Foo *Bar
} # openapi
{"properties": {"name": "foo", ... "default": {"bar": "abc"}}} # schema.List
defaultedKeys:
- fieldName: foo
defaultValue: "{\"bar\": \"abc\"}" |
Right, I like that idea. Are we going to generate |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
f9904db
to
11d962f
Compare
rebased |
bedde8c
to
0ba4282
Compare
0ba4282
to
b9da353
Compare
I think only for defaulted keys, but that can be decided once we are integrating this into kube-openapi |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closed this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Replacement for #79
Relies on default key values being part of the schema so we can treat null as that value when constructing field paths, instead of actually doing defaulting.
Probably won't allow this except for some existing cases like containerPorts
cc @apelisse