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
Context: json-schema does not apply any restrictions on the default field, but openapi schema does. Specifically, they say "the value MUST conform to the defined type for the Schema Object".
Shouldn't we just add nullable: true when a null property is detected?
At least, I don't think we should throw an error.
Example:
## @section kubeappsapis parameterskubeappsapis:
pluginConfig:
kappController:
packages:
v1alpha1:
## @param kubeappsapis.pluginConfig.kappController.packages.v1alpha1.defaultPrereleasesVersionSelection Default policy for allowing prereleases containing one of the identifiers## ref: https://carvel.dev/kapp-controller/docs/latest/package-consumer-concepts/#prereleases## e.g:# defaultPrereleasesVersionSelection: # - rcdefaultPrereleasesVersionSelection: null
{name: 'kubeappsapis.pluginConfig.kappController.packages.v1alpha1.defaultPrereleasesVersionSelection',value: 'null',description: 'Default policy for allowing prereleases containing one of the identifiers',section: 'kubeappsapis parameters',type: 'object',nullable: true}
The text was updated successfully, but these errors were encountered:
I think we can move the check of the null parameters to the metadata checks and allow setting null as a value.
The error was set for the case in which there is not a default value at all on one property but looks like for some reason null is also considered as if there were no value.
Context: json-schema does not apply any restrictions on the default field, but openapi schema does. Specifically, they say "the value MUST conform to the defined type for the Schema Object".
I assume this is the reason why this check is there. However, if the
nullable: true
is passed, thenull
value is allowed. Spec here. Issue hereShouldn't we just add
nullable: true
when anull
property is detected?At least, I don't think we should throw an error.
Example:
The text was updated successfully, but these errors were encountered: