You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Similar issue was reported here but this might be a better home for it, not sure.
In this code the tool conflates an optional field (i.e. a field that does not have to be specified) with a field that allows null values. But this is not correct and these are distinct things in some cases (e.g. Kubernetes schemas)
As a real world example, if you have a Kubernetes Deployment and set a secret volume like this (with secretName having the null value)...
The schema produced from openapi2jsonschema using kubeval will happily consider this config valid. But if you try to apply the config using kubectl or kustomize, it complains that secretName cannot take a null value. And indeed if you look at the upstream schema, nowhere does it specify that the field is nullable.
The text was updated successfully, but these errors were encountered:
Similar issue was reported here but this might be a better home for it, not sure.
In this code the tool conflates an optional field (i.e. a field that does not have to be specified) with a field that allows
null
values. But this is not correct and these are distinct things in some cases (e.g. Kubernetes schemas)As a real world example, if you have a Kubernetes
Deployment
and set a secret volume like this (withsecretName
having thenull
value)...The schema produced from
openapi2jsonschema
usingkubeval
will happily consider this config valid. But if you try to apply the config usingkubectl
orkustomize
, it complains thatsecretName
cannot take a null value. And indeed if you look at the upstream schema, nowhere does it specify that the field is nullable.The text was updated successfully, but these errors were encountered: