mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-21 15:51:47 -05:00
Swagger generated code: fixed warnings with latest swagger-codegen commit
This commit is contained in:
parent
33ce771e24
commit
fc7615e7d1
@ -51634,7 +51634,7 @@ except ApiException as e:
|
||||
</div>
|
||||
<div id="generator">
|
||||
<div class="content">
|
||||
Generated 2021-12-24T20:37:17.750+01:00
|
||||
Generated 2021-12-27T21:57:14.290+01:00
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -45,7 +45,7 @@ SWGDeviceSetApi::devicesetChannelActionsPost(qint32 device_set_index, qint32 cha
|
||||
|
||||
|
||||
QString output = body.asJson();
|
||||
input.request_body.append(output);
|
||||
input.request_body.append(output.toUtf8());
|
||||
|
||||
|
||||
|
||||
@ -158,7 +158,7 @@ SWGDeviceSetApi::devicesetChannelPost(qint32 device_set_index, SWGChannelSetting
|
||||
|
||||
|
||||
QString output = body.asJson();
|
||||
input.request_body.append(output);
|
||||
input.request_body.append(output.toUtf8());
|
||||
|
||||
|
||||
|
||||
@ -329,7 +329,7 @@ SWGDeviceSetApi::devicesetChannelSettingsPatch(qint32 device_set_index, qint32 c
|
||||
|
||||
|
||||
QString output = body.asJson();
|
||||
input.request_body.append(output);
|
||||
input.request_body.append(output.toUtf8());
|
||||
|
||||
|
||||
|
||||
@ -388,7 +388,7 @@ SWGDeviceSetApi::devicesetChannelSettingsPut(qint32 device_set_index, qint32 cha
|
||||
|
||||
|
||||
QString output = body.asJson();
|
||||
input.request_body.append(output);
|
||||
input.request_body.append(output.toUtf8());
|
||||
|
||||
|
||||
|
||||
@ -499,7 +499,7 @@ SWGDeviceSetApi::devicesetDeviceActionsPost(qint32 device_set_index, SWGDeviceAc
|
||||
|
||||
|
||||
QString output = body.asJson();
|
||||
input.request_body.append(output);
|
||||
input.request_body.append(output.toUtf8());
|
||||
|
||||
|
||||
|
||||
@ -556,7 +556,7 @@ SWGDeviceSetApi::devicesetDevicePut(qint32 device_set_index, SWGDeviceListItem&
|
||||
|
||||
|
||||
QString output = body.asJson();
|
||||
input.request_body.append(output);
|
||||
input.request_body.append(output.toUtf8());
|
||||
|
||||
|
||||
|
||||
@ -667,7 +667,7 @@ SWGDeviceSetApi::devicesetDeviceRunDelete(qint32 device_set_index, SWGDeviceSett
|
||||
|
||||
|
||||
QString output = body.asJson();
|
||||
input.request_body.append(output);
|
||||
input.request_body.append(output.toUtf8());
|
||||
|
||||
|
||||
|
||||
@ -778,7 +778,7 @@ SWGDeviceSetApi::devicesetDeviceRunPost(qint32 device_set_index, SWGDeviceSettin
|
||||
|
||||
|
||||
QString output = body.asJson();
|
||||
input.request_body.append(output);
|
||||
input.request_body.append(output.toUtf8());
|
||||
|
||||
|
||||
|
||||
@ -889,7 +889,7 @@ SWGDeviceSetApi::devicesetDeviceSettingsPatch(qint32 device_set_index, SWGDevice
|
||||
|
||||
|
||||
QString output = body.asJson();
|
||||
input.request_body.append(output);
|
||||
input.request_body.append(output.toUtf8());
|
||||
|
||||
|
||||
|
||||
@ -946,7 +946,7 @@ SWGDeviceSetApi::devicesetDeviceSettingsPut(qint32 device_set_index, SWGDeviceSe
|
||||
|
||||
|
||||
QString output = body.asJson();
|
||||
input.request_body.append(output);
|
||||
input.request_body.append(output.toUtf8());
|
||||
|
||||
|
||||
|
||||
@ -1005,7 +1005,7 @@ SWGDeviceSetApi::devicesetDeviceSubsystemRunDelete(qint32 device_set_index, qint
|
||||
|
||||
|
||||
QString output = body.asJson();
|
||||
input.request_body.append(output);
|
||||
input.request_body.append(output.toUtf8());
|
||||
|
||||
|
||||
|
||||
@ -1120,7 +1120,7 @@ SWGDeviceSetApi::devicesetDeviceSubsystemRunPost(qint32 device_set_index, qint32
|
||||
|
||||
|
||||
QString output = body.asJson();
|
||||
input.request_body.append(output);
|
||||
input.request_body.append(output.toUtf8());
|
||||
|
||||
|
||||
|
||||
@ -1501,7 +1501,7 @@ SWGDeviceSetApi::devicesetSpectrumSettingsPatch(qint32 device_set_index, SWGGLSp
|
||||
|
||||
|
||||
QString output = body.asJson();
|
||||
input.request_body.append(output);
|
||||
input.request_body.append(output.toUtf8());
|
||||
|
||||
|
||||
|
||||
@ -1558,7 +1558,7 @@ SWGDeviceSetApi::devicesetSpectrumSettingsPut(qint32 device_set_index, SWGGLSpec
|
||||
|
||||
|
||||
QString output = body.asJson();
|
||||
input.request_body.append(output);
|
||||
input.request_body.append(output.toUtf8());
|
||||
|
||||
|
||||
|
||||
|
@ -45,7 +45,7 @@ SWGFeatureSetApi::featuresetFEatureSettingsPut(qint32 feature_set_index, qint32
|
||||
|
||||
|
||||
QString output = body.asJson();
|
||||
input.request_body.append(output);
|
||||
input.request_body.append(output.toUtf8());
|
||||
|
||||
|
||||
|
||||
@ -104,7 +104,7 @@ SWGFeatureSetApi::featuresetFeatureActionsPost(qint32 feature_set_index, qint32
|
||||
|
||||
|
||||
QString output = body.asJson();
|
||||
input.request_body.append(output);
|
||||
input.request_body.append(output.toUtf8());
|
||||
|
||||
|
||||
|
||||
@ -217,7 +217,7 @@ SWGFeatureSetApi::featuresetFeaturePost(qint32 feature_set_index, SWGFeatureSett
|
||||
|
||||
|
||||
QString output = body.asJson();
|
||||
input.request_body.append(output);
|
||||
input.request_body.append(output.toUtf8());
|
||||
|
||||
|
||||
|
||||
@ -556,7 +556,7 @@ SWGFeatureSetApi::featuresetFeatureSettingsPatch(qint32 feature_set_index, qint3
|
||||
|
||||
|
||||
QString output = body.asJson();
|
||||
input.request_body.append(output);
|
||||
input.request_body.append(output.toUtf8());
|
||||
|
||||
|
||||
|
||||
@ -667,7 +667,7 @@ SWGFeatureSetApi::featuresetPresetPatch(qint32 feature_set_index, SWGFeaturePres
|
||||
|
||||
|
||||
QString output = body.asJson();
|
||||
input.request_body.append(output);
|
||||
input.request_body.append(output.toUtf8());
|
||||
|
||||
|
||||
|
||||
@ -724,7 +724,7 @@ SWGFeatureSetApi::featuresetPresetPost(qint32 feature_set_index, SWGFeaturePrese
|
||||
|
||||
|
||||
QString output = body.asJson();
|
||||
input.request_body.append(output);
|
||||
input.request_body.append(output.toUtf8());
|
||||
|
||||
|
||||
|
||||
@ -781,7 +781,7 @@ SWGFeatureSetApi::featuresetPresetPut(qint32 feature_set_index, SWGFeaturePreset
|
||||
|
||||
|
||||
QString output = body.asJson();
|
||||
input.request_body.append(output);
|
||||
input.request_body.append(output.toUtf8());
|
||||
|
||||
|
||||
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include <QFileInfo>
|
||||
#include <QBuffer>
|
||||
#include <QtGlobal>
|
||||
#include <QRandomGenerator>
|
||||
|
||||
|
||||
namespace SWGSDRangel {
|
||||
@ -53,7 +54,7 @@ void SWGHttpRequestInput::add_file(QString variable_name, QString local_filename
|
||||
SWGHttpRequestWorker::SWGHttpRequestWorker(QObject *parent)
|
||||
: QObject(parent), manager(nullptr)
|
||||
{
|
||||
qsrand(QDateTime::currentDateTime().toTime_t());
|
||||
QRandomGenerator::global()->seed(QDateTime::currentDateTime().toTime_t());
|
||||
|
||||
manager = new QNetworkAccessManager(this);
|
||||
connect(manager, SIGNAL(finished(QNetworkReply*)), this, SLOT(on_manager_finished(QNetworkReply*)));
|
||||
@ -143,12 +144,12 @@ void SWGHttpRequestWorker::execute(SWGHttpRequestInput *input) {
|
||||
isFormData = true;
|
||||
foreach (QString key, input->vars.keys()) {
|
||||
if (!first) {
|
||||
request_content.append("&");
|
||||
request_content.append('&');
|
||||
}
|
||||
first = false;
|
||||
|
||||
request_content.append(QUrl::toPercentEncoding(key));
|
||||
request_content.append("=");
|
||||
request_content.append('=');
|
||||
request_content.append(QUrl::toPercentEncoding(input->vars.value(key)));
|
||||
}
|
||||
|
||||
@ -163,30 +164,30 @@ void SWGHttpRequestWorker::execute(SWGHttpRequestInput *input) {
|
||||
|
||||
boundary = "__-----------------------"
|
||||
+ QString::number(QDateTime::currentDateTime().toTime_t())
|
||||
+ QString::number(qrand());
|
||||
+ QString::number(QRandomGenerator::global()->generate());
|
||||
QString boundary_delimiter = "--";
|
||||
QString new_line = "\r\n";
|
||||
|
||||
// add variables
|
||||
foreach (QString key, input->vars.keys()) {
|
||||
// add boundary
|
||||
request_content.append(boundary_delimiter);
|
||||
request_content.append(boundary);
|
||||
request_content.append(new_line);
|
||||
request_content.append(boundary_delimiter.toUtf8());
|
||||
request_content.append(boundary.toUtf8());
|
||||
request_content.append(new_line.toUtf8());
|
||||
|
||||
// add header
|
||||
request_content.append("Content-Disposition: form-data; ");
|
||||
request_content.append(http_attribute_encode("name", key));
|
||||
request_content.append(new_line);
|
||||
request_content.append("Content-Type: text/plain");
|
||||
request_content.append(new_line);
|
||||
request_content.append(QString("Content-Disposition: form-data; ").toUtf8());
|
||||
request_content.append(http_attribute_encode("name", key).toUtf8());
|
||||
request_content.append(new_line.toUtf8());
|
||||
request_content.append(QString("Content-Type: text/plain").toUtf8());
|
||||
request_content.append(new_line.toUtf8());
|
||||
|
||||
// add header to body splitter
|
||||
request_content.append(new_line);
|
||||
request_content.append(new_line.toUtf8());
|
||||
|
||||
// add variable content
|
||||
request_content.append(input->vars.value(key));
|
||||
request_content.append(new_line);
|
||||
request_content.append((input->vars.value(key)).toUtf8());
|
||||
request_content.append(new_line.toUtf8());
|
||||
}
|
||||
|
||||
// add files
|
||||
@ -218,40 +219,41 @@ void SWGHttpRequestWorker::execute(SWGHttpRequestInput *input) {
|
||||
}
|
||||
|
||||
// add boundary
|
||||
request_content.append(boundary_delimiter);
|
||||
request_content.append(boundary);
|
||||
request_content.append(new_line);
|
||||
request_content.append(boundary_delimiter.toUtf8());
|
||||
request_content.append(boundary.toUtf8());
|
||||
request_content.append(new_line.toUtf8());
|
||||
|
||||
// add header
|
||||
request_content.append(QString("Content-Disposition: form-data; %1; %2").arg(
|
||||
QString s = QString("Content-Disposition: form-data; %1; %2").arg(
|
||||
http_attribute_encode("name", file_info->variable_name),
|
||||
http_attribute_encode("filename", file_info->request_filename)
|
||||
));
|
||||
request_content.append(new_line);
|
||||
);
|
||||
request_content.append(s.toUtf8());
|
||||
request_content.append(new_line.toUtf8());
|
||||
|
||||
if (file_info->mime_type != nullptr && !file_info->mime_type.isEmpty()) {
|
||||
request_content.append("Content-Type: ");
|
||||
request_content.append(file_info->mime_type);
|
||||
request_content.append(new_line);
|
||||
request_content.append(QString("Content-Type: ").toUtf8());
|
||||
request_content.append((file_info->mime_type).toUtf8());
|
||||
request_content.append(new_line.toUtf8());
|
||||
}
|
||||
|
||||
request_content.append("Content-Transfer-Encoding: binary");
|
||||
request_content.append(new_line);
|
||||
request_content.append(QString("Content-Transfer-Encoding: binary").toUtf8());
|
||||
request_content.append(new_line.toUtf8());
|
||||
|
||||
// add header to body splitter
|
||||
request_content.append(new_line);
|
||||
request_content.append(new_line.toUtf8());
|
||||
|
||||
// add file content
|
||||
request_content.append(file.readAll());
|
||||
request_content.append(new_line);
|
||||
request_content.append(new_line.toUtf8());
|
||||
|
||||
file.close();
|
||||
}
|
||||
|
||||
// add end of body
|
||||
request_content.append(boundary_delimiter);
|
||||
request_content.append(boundary);
|
||||
request_content.append(boundary_delimiter);
|
||||
request_content.append(boundary_delimiter.toUtf8());
|
||||
request_content.append(boundary.toUtf8());
|
||||
request_content.append(boundary_delimiter.toUtf8());
|
||||
}
|
||||
|
||||
if(input->request_body.size() > 0) {
|
||||
|
@ -145,7 +145,7 @@ SWGInstanceApi::instanceAMBEDevicesPatch(SWGAMBEDevices& body) {
|
||||
|
||||
|
||||
QString output = body.asJson();
|
||||
input.request_body.append(output);
|
||||
input.request_body.append(output.toUtf8());
|
||||
|
||||
|
||||
|
||||
@ -200,7 +200,7 @@ SWGInstanceApi::instanceAMBEDevicesPut(SWGAMBEDevices& body) {
|
||||
|
||||
|
||||
QString output = body.asJson();
|
||||
input.request_body.append(output);
|
||||
input.request_body.append(output.toUtf8());
|
||||
|
||||
|
||||
|
||||
@ -411,7 +411,7 @@ SWGInstanceApi::instanceAudioInputDelete(SWGAudioInputDevice& body) {
|
||||
|
||||
|
||||
QString output = body.asJson();
|
||||
input.request_body.append(output);
|
||||
input.request_body.append(output.toUtf8());
|
||||
|
||||
|
||||
|
||||
@ -466,7 +466,7 @@ SWGInstanceApi::instanceAudioInputPatch(SWGAudioInputDevice& body) {
|
||||
|
||||
|
||||
QString output = body.asJson();
|
||||
input.request_body.append(output);
|
||||
input.request_body.append(output.toUtf8());
|
||||
|
||||
|
||||
|
||||
@ -573,7 +573,7 @@ SWGInstanceApi::instanceAudioOutputDelete(SWGAudioOutputDevice& body) {
|
||||
|
||||
|
||||
QString output = body.asJson();
|
||||
input.request_body.append(output);
|
||||
input.request_body.append(output.toUtf8());
|
||||
|
||||
|
||||
|
||||
@ -628,7 +628,7 @@ SWGInstanceApi::instanceAudioOutputPatch(SWGAudioOutputDevice& body) {
|
||||
|
||||
|
||||
QString output = body.asJson();
|
||||
input.request_body.append(output);
|
||||
input.request_body.append(output.toUtf8());
|
||||
|
||||
|
||||
|
||||
@ -795,7 +795,7 @@ SWGInstanceApi::instanceConfigPatch(SWGInstanceConfigResponse& body) {
|
||||
|
||||
|
||||
QString output = body.asJson();
|
||||
input.request_body.append(output);
|
||||
input.request_body.append(output.toUtf8());
|
||||
|
||||
|
||||
|
||||
@ -850,7 +850,7 @@ SWGInstanceApi::instanceConfigPut(SWGInstanceConfigResponse& body) {
|
||||
|
||||
|
||||
QString output = body.asJson();
|
||||
input.request_body.append(output);
|
||||
input.request_body.append(output.toUtf8());
|
||||
|
||||
|
||||
|
||||
@ -1069,7 +1069,7 @@ SWGInstanceApi::instanceFeaturePresetDelete(SWGFeaturePresetIdentifier& body) {
|
||||
|
||||
|
||||
QString output = body.asJson();
|
||||
input.request_body.append(output);
|
||||
input.request_body.append(output.toUtf8());
|
||||
|
||||
|
||||
|
||||
@ -1340,7 +1340,7 @@ SWGInstanceApi::instanceLimeRFEConfigPut(SWGLimeRFESettings& body) {
|
||||
|
||||
|
||||
QString output = body.asJson();
|
||||
input.request_body.append(output);
|
||||
input.request_body.append(output.toUtf8());
|
||||
|
||||
|
||||
|
||||
@ -1455,7 +1455,7 @@ SWGInstanceApi::instanceLimeRFERunPut(SWGLimeRFESettings& body) {
|
||||
|
||||
|
||||
QString output = body.asJson();
|
||||
input.request_body.append(output);
|
||||
input.request_body.append(output.toUtf8());
|
||||
|
||||
|
||||
|
||||
@ -1614,7 +1614,7 @@ SWGInstanceApi::instanceLocationPut(SWGLocationInformation& body) {
|
||||
|
||||
|
||||
QString output = body.asJson();
|
||||
input.request_body.append(output);
|
||||
input.request_body.append(output.toUtf8());
|
||||
|
||||
|
||||
|
||||
@ -1721,7 +1721,7 @@ SWGInstanceApi::instanceLoggingPut(SWGLoggingInfo& body) {
|
||||
|
||||
|
||||
QString output = body.asJson();
|
||||
input.request_body.append(output);
|
||||
input.request_body.append(output.toUtf8());
|
||||
|
||||
|
||||
|
||||
@ -1776,7 +1776,7 @@ SWGInstanceApi::instancePresetDelete(SWGPresetIdentifier& body) {
|
||||
|
||||
|
||||
QString output = body.asJson();
|
||||
input.request_body.append(output);
|
||||
input.request_body.append(output.toUtf8());
|
||||
|
||||
|
||||
|
||||
@ -1831,7 +1831,7 @@ SWGInstanceApi::instancePresetFilePost(SWGPresetExport& body) {
|
||||
|
||||
|
||||
QString output = body.asJson();
|
||||
input.request_body.append(output);
|
||||
input.request_body.append(output.toUtf8());
|
||||
|
||||
|
||||
|
||||
@ -1886,7 +1886,7 @@ SWGInstanceApi::instancePresetFilePut(SWGPresetImport& body) {
|
||||
|
||||
|
||||
QString output = body.asJson();
|
||||
input.request_body.append(output);
|
||||
input.request_body.append(output.toUtf8());
|
||||
|
||||
|
||||
|
||||
@ -1993,7 +1993,7 @@ SWGInstanceApi::instancePresetPatch(SWGPresetTransfer& body) {
|
||||
|
||||
|
||||
QString output = body.asJson();
|
||||
input.request_body.append(output);
|
||||
input.request_body.append(output.toUtf8());
|
||||
|
||||
|
||||
|
||||
@ -2048,7 +2048,7 @@ SWGInstanceApi::instancePresetPost(SWGPresetTransfer& body) {
|
||||
|
||||
|
||||
QString output = body.asJson();
|
||||
input.request_body.append(output);
|
||||
input.request_body.append(output.toUtf8());
|
||||
|
||||
|
||||
|
||||
@ -2103,7 +2103,7 @@ SWGInstanceApi::instancePresetPut(SWGPresetTransfer& body) {
|
||||
|
||||
|
||||
QString output = body.asJson();
|
||||
input.request_body.append(output);
|
||||
input.request_body.append(output.toUtf8());
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user