Bug 40174: Deal with enum
Data too long for column 'checkprevcheckout' Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
9ca9d1e764
commit
da17bc0f91
|
|
@ -6,6 +6,11 @@ const fs = require("fs");
|
|||
const generatedDataCache = new Set();
|
||||
|
||||
const generateMockData = (type, properties) => {
|
||||
if (properties.hasOwnProperty("enum")) {
|
||||
let values = properties.enum;
|
||||
return values[Math.floor(Math.random() * values.length)];
|
||||
}
|
||||
|
||||
switch (type) {
|
||||
case "string":
|
||||
if (properties?.maxLength) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue