mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-07-24 17:59:52 +00:00
Minor: Add column count validation when creating table-type custom property (#20418)
* Minor: Add column count validation when creating table-type custom property * Minor: Add column count validation when creating table-type custom property
This commit is contained in:
parent
a2804a8933
commit
d696a0c6e7
@ -265,6 +265,14 @@ public class TypeRepository extends EntityRepository<Type> {
|
||||
if (uniqueColumns.size() != columns.size()) {
|
||||
throw new IllegalArgumentException("Column names must be unique.");
|
||||
}
|
||||
if (columns.size() < tableConfig.getMinColumns()
|
||||
|| columns.size() > tableConfig.getMaxColumns()) {
|
||||
throw new IllegalArgumentException(
|
||||
"Custom Property table has invalid value columns size must be between "
|
||||
+ tableConfig.getMinColumns()
|
||||
+ " and "
|
||||
+ tableConfig.getMaxColumns());
|
||||
}
|
||||
|
||||
try {
|
||||
JsonUtils.validateJsonSchema(config.getConfig(), TableConfig.class);
|
||||
|
Loading…
x
Reference in New Issue
Block a user