Closed FrancoisPoinsot closed 7 months ago
Hey @yannh Is that PR a thing you would be interested in?
Hi @FrancoisPoinsot ! So the issue if I understand it correctly, is that the behavior set by --strict can be overriden in-schema for certain fields, with x-kubernetes-preserve-unknown-fields being set to true or false?
correct
Hi @FrancoisPoinsot , sorry for the delayed response - any chance to add a test to ensure this works and doesn't break in the future? Otherwise it looks good to me.
I will be honest, I am not super familiar with python I will try to see what I can do But if you already have some idea in mind, don't hesitate to add a commit to that PR.
I see 2 suites of test.
One at the root, called with
make docker-build-static
make docker-acceptance
The other under /scripts
.
The first one has more scenario but only the second one is called from github action.
Which one should I extend?
edit: Forget that, I see the test for openapi2jsonschema.py
is the one under /scripts
Added a couple of test.
1 in /scripts
to check the generated schema remains the same.
1 at the root to check an emissary Mapping. This is one of the custom resources I had trouble with originaly.
@yannh , does that look alright to you?
@yannh should I close that PR?
skip setting "additionalProperties: false" when x-kubernetes-preserve-unknown-fields == true
This should implement the behavior of https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#controlling-pruning
fixes https://github.com/yannh/kubeconform/issues/224