DataSource: Fix openapi spec (#112150)

This commit is contained in:
Ryan McKinley
2025-10-08 14:36:24 +03:00
committed by GitHub
parent 047c51be01
commit 13a3c46079
6 changed files with 1191 additions and 12 deletions
@@ -136,6 +136,10 @@ func (UnstructuredSpec) OpenAPIDefinition() openapi.OpenAPIDefinition {
s := schema_pkg_apis_datasource_v0alpha1_GenericDataSourceSpec(func(path string) spec.Ref {
return spec.MustCreateRef(path)
})
jsonData := spec.MapProperty(nil)
jsonData.AdditionalProperties = &spec.SchemaOrBool{Allows: true}
jsonData.Extensions = map[string]any{"x-kubernetes-preserve-unknown-fields": true}
s.Schema.Properties["jsonData"] = *jsonData
s.Schema.AdditionalProperties = &spec.SchemaOrBool{
Allows: true,
}