mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-18 05:01:07 +00:00
Give explicit error if table doesn't have a primary key
This commit is contained in:
@ -360,6 +360,11 @@ public class GenerateOpenApiSpecAction extends AbstractQActionFunction<GenerateO
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!StringUtils.hasContent(table.getPrimaryKeyField()))
|
||||||
|
{
|
||||||
|
throw (new QException("Unable to generate OpenAPI spec for table " + tableName + ", because it does not have a primary key."));
|
||||||
|
}
|
||||||
|
|
||||||
String tableApiName = StringUtils.hasContent(apiTableMetaData.getApiTableName()) ? apiTableMetaData.getApiTableName() : tableName;
|
String tableApiName = StringUtils.hasContent(apiTableMetaData.getApiTableName()) ? apiTableMetaData.getApiTableName() : tableName;
|
||||||
String tableApiNameUcFirst = StringUtils.ucFirst(tableApiName);
|
String tableApiNameUcFirst = StringUtils.ucFirst(tableApiName);
|
||||||
String tableLabel = table.getLabel();
|
String tableLabel = table.getLabel();
|
||||||
|
Reference in New Issue
Block a user