INNER CODE UNIT · Go

required

bjw-s-labs/helm-charts · tools/helm-schema-tools/internal/schema/schema.go:83

		required = append(required, collectRequired(schema.AnyOf[0], depth+1)...)
	}
	return required
}

// HasAnyProperties returns true if a schema has any properties, either
// directly or via allOf/oneOf/anyOf composition.
func HasAnyProperties(schema *jsonschema.Schema) bool {
	if schema == nil {
		return false
	}
	if schema.Properties != nil && len(*schema.Properties) > 0 {
		return true
	}
	return slices.ContainsFunc(schema.AllOf, HasAnyProperties) ||
		slices.ContainsFunc(schema.OneOf, HasAnyProperties) ||
		slices.ContainsFunc(schema.AnyOf, HasAnyProperties)
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…