forked from loafle/openapi-generator-original
update samples for cpp-qt client
This commit is contained in:
parent
03f3fd09cd
commit
c3c82513fe
@ -54,7 +54,7 @@ public:
|
|||||||
QString value = serverVariable._defaultValue;
|
QString value = serverVariable._defaultValue;
|
||||||
|
|
||||||
if (!serverVariable._enumValues.empty() && !serverVariable._enumValues.contains(value)) {
|
if (!serverVariable._enumValues.empty() && !serverVariable._enumValues.contains(value)) {
|
||||||
throw std::runtime_error(QString("The variable " + name + " in the server URL has invalid value " + value + ".").toUtf8());
|
throw std::runtime_error(QString("The variable " + name + " in the server URL has invalid value " + value + ".").toUtf8().toStdString());
|
||||||
}
|
}
|
||||||
QRegularExpression regex(QString("\\{" + name + "\\}"));
|
QRegularExpression regex(QString("\\{" + name + "\\}"));
|
||||||
url = url.replace(regex, value);
|
url = url.replace(regex, value);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user