Update default value for C++ related generator (#373)

* udpate default value for cpp, remove unused imports

* update cpprest template

* update tizen default value

* update cpp restbed default value

* update qt5cpp samples

* update pistache samples

* regenerate restbed ignore file
This commit is contained in:
William Cheng 2018-05-08 22:10:40 +08:00 committed by GitHub
parent 13f084e7b0
commit a9fa4cd0db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
133 changed files with 1012 additions and 1080 deletions

View File

@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
ags="$@ generate -t modules/openapi-generator/src/main/resources/tizen -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l cpp-tizen -o samples/client/petstore/tizen"
ags="generate -t modules/openapi-generator/src/main/resources/tizen -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l cpp-tizen -o samples/client/petstore/tizen $@"
java $JAVA_OPTS -jar $executable $ags

View File

@ -722,7 +722,6 @@ public class DefaultGenerator extends AbstractGenerator implements Generator {
URL url = URLPathUtils.getServerURL(openAPI);
bundle.put("openAPI", openAPI);
bundle.put("swagger", openAPI); // for backward compatibility
bundle.put("basePath", basePath);
bundle.put("basePathWithoutHost", basePathWithoutHost);
bundle.put("scheme", URLPathUtils.getScheme(url, config));

View File

@ -20,9 +20,6 @@ package org.openapitools.codegen.languages;
import org.openapitools.codegen.CodegenConfig;
import org.openapitools.codegen.CodegenProperty;
import org.openapitools.codegen.DefaultCodegen;
import org.openapitools.codegen.utils.ModelUtils;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.Operation;
import io.swagger.v3.oas.models.media.*;
import java.util.Arrays;

View File

@ -91,7 +91,7 @@ public class Apache2ConfigCodegen extends DefaultCodegen implements CodegenConfi
List<CodegenOperation> operationList = (List<CodegenOperation>) operations.get("operation");
List<CodegenOperation> newOpList = new ArrayList<CodegenOperation>();
for (CodegenOperation op : operationList) {
String path = new String(op.path);
String path = op.path;
String[] items = path.split("/", -1);
List<String> splitPath = new ArrayList<String>();

View File

@ -62,8 +62,8 @@ public class CppPistacheServerCodegen extends AbstractCppCodegen {
public CppPistacheServerCodegen() {
super();
apiPackage = "io.swagger.server.api";
modelPackage = "io.swagger.server.model";
apiPackage = "org.openapitools.server.api";
modelPackage = "org.openapitools.server.model";
modelTemplateFiles.put("model-header.mustache", ".h");
modelTemplateFiles.put("model-source.mustache", ".cpp");
@ -374,7 +374,7 @@ public class CppPistacheServerCodegen extends AbstractCppCodegen {
}
/**
* Optional - swagger type conversion. This is used to map swagger types in
* Optional - OpenAPI type conversion. This is used to map OpenAPI types in
* a `Schema` into either language specific types via `typeMapping` or
* into complex models if there is not a mapping.
*

View File

@ -21,10 +21,7 @@ import org.apache.commons.lang3.StringUtils;
import org.openapitools.codegen.*;
import org.openapitools.codegen.utils.ModelUtils;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.Operation;
import io.swagger.v3.oas.models.media.*;
import io.swagger.v3.oas.models.responses.ApiResponse;
import io.swagger.v3.parser.util.SchemaTypeUtil;
import java.io.File;
@ -39,14 +36,14 @@ public class CppQt5ClientCodegen extends AbstractCppCodegen implements CodegenCo
public static final String CPP_NAMESPACE_DESC = "C++ namespace (convention: name::space::for::api).";
public static final String OPTIONAL_PROJECT_FILE_DESC = "Generate client.pri.";
protected final String PREFIX = "SWG";
protected final String PREFIX = "OAI";
protected Set<String> foundationClasses = new HashSet<String>();
// source folder where to write the files
protected String sourceFolder = "client";
protected String apiVersion = "1.0.0";
protected Map<String, String> namespaces = new HashMap<String, String>();
protected Set<String> systemIncludes = new HashSet<String>();
protected String cppNamespace = "Swagger";
protected String cppNamespace = "OpenAPI";
protected boolean optionalProjectFileFlag = true;
public CppQt5ClientCodegen() {
@ -56,7 +53,7 @@ public class CppQt5ClientCodegen extends AbstractCppCodegen implements CodegenCo
outputFolder = "generated-code/qt5cpp";
// set modelNamePrefix as default for QT5CPP
if (modelNamePrefix == "") {
if ("".equals(modelNamePrefix)) {
modelNamePrefix = PREFIX;
}
@ -143,11 +140,10 @@ public class CppQt5ClientCodegen extends AbstractCppCodegen implements CodegenCo
typeMapping.put("boolean", "bool");
typeMapping.put("array", "QList");
typeMapping.put("map", "QMap");
typeMapping.put("file", "SWGHttpRequestInputFileElement");
typeMapping.put("file", "OAIHttpRequestInputFileElement");
typeMapping.put("object", PREFIX + "Object");
//TODO binary should be mapped to byte array
// mapped as "file" type for OAS 3.0
typeMapping.put("binary", "SWGHttpRequestInputFileElement");
typeMapping.put("binary", "OAIHttpRequestInputFileElement");
typeMapping.put("ByteArray", "QByteArray");
// UUID support - possible enhancement : use QUuid instead of QString.
// beware though that Serialisation/deserialisation of QUuid does not
@ -157,7 +153,7 @@ public class CppQt5ClientCodegen extends AbstractCppCodegen implements CodegenCo
importMapping = new HashMap<String, String>();
importMapping.put("SWGHttpRequestInputFileElement", "#include \"" + PREFIX + "HttpRequest.h\"");
importMapping.put("OAIHttpRequestInputFileElement", "#include \"" + PREFIX + "HttpRequest.h\"");
namespaces = new HashMap<String, String>();
@ -354,7 +350,7 @@ public class CppQt5ClientCodegen extends AbstractCppCodegen implements CodegenCo
}
/**
* Optional - swagger type conversion. This is used to map swagger types in a `Schema` into
* Optional - OpenAPI type conversion. This is used to map OpenAPI types in a `Schema` into
* either language specific types via `typeMapping` or into complex models if there is not a mapping.
*
* @return a string value of the type or complex model for this property

View File

@ -45,7 +45,6 @@ import java.util.HashSet;
import java.util.Map;
import java.util.Set;
public class CppRestClientCodegen extends AbstractCppCodegen {
public static final String DECLSPEC = "declspec";
@ -91,8 +90,8 @@ public class CppRestClientCodegen extends AbstractCppCodegen {
public CppRestClientCodegen() {
super();
apiPackage = "io.swagger.client.api";
modelPackage = "io.swagger.client.model";
apiPackage = "org.openapitools.client.api";
modelPackage = "org.openapitools.client.model";
modelTemplateFiles.put("model-header.mustache", ".h");
modelTemplateFiles.put("model-source.mustache", ".cpp");
@ -359,7 +358,7 @@ public class CppRestClientCodegen extends AbstractCppCodegen {
}
/**
* Optional - swagger type conversion. This is used to map swagger types in
* Optional - OpenAPI type conversion. This is used to map OpenAPI types in
* a `Schema` into either language specific types via `typeMapping` or
* into complex models if there is not a mapping.
*

View File

@ -26,17 +26,11 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import io.swagger.v3.parser.util.SchemaTypeUtil;
import org.apache.commons.lang3.StringUtils;
import org.openapitools.codegen.*;
import org.openapitools.codegen.utils.ModelUtils;
import io.swagger.v3.oas.models.security.SecurityScheme;
import io.swagger.v3.oas.models.*;
import io.swagger.v3.oas.models.media.*;
import io.swagger.v3.oas.models.responses.ApiResponse;
import io.swagger.v3.oas.models.parameters.*;
import io.swagger.v3.core.util.Yaml;
public class CppRestbedServerCodegen extends AbstractCppCodegen {
@ -50,8 +44,8 @@ public class CppRestbedServerCodegen extends AbstractCppCodegen {
public CppRestbedServerCodegen() {
super();
apiPackage = "io.swagger.server.api";
modelPackage = "io.swagger.server.model";
apiPackage = "org.openapitools.server.api";
modelPackage = "org.openapitools.server.model";
modelTemplateFiles.put("model-header.mustache", ".h");
modelTemplateFiles.put("model-source.mustache", ".cpp");
@ -226,7 +220,7 @@ public class CppRestbedServerCodegen extends AbstractCppCodegen {
List<CodegenOperation> operationList = (List<CodegenOperation>) operations.get("operation");
List<CodegenOperation> newOpList = new ArrayList<CodegenOperation>();
for (CodegenOperation op : operationList) {
String path = new String(op.path);
String path = op.path;
String[] items = path.split("/", -1);
String resourceNameCamelCase = "";
@ -349,7 +343,7 @@ public class CppRestbedServerCodegen extends AbstractCppCodegen {
}
/**
* Optional - swagger type conversion. This is used to map swagger types in
* Optional - OpenAPI type conversion. This is used to map OpenAPI types in
* a `Schema` into either language specific types via `typeMapping` or
* into complex models if there is not a mapping.
*

View File

@ -24,19 +24,13 @@ import org.openapitools.codegen.DefaultCodegen;
import org.openapitools.codegen.SupportingFile;
import org.openapitools.codegen.utils.ModelUtils;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.Operation;
import io.swagger.v3.oas.models.media.*;
import io.swagger.v3.oas.models.responses.ApiResponse;
import io.swagger.v3.parser.util.SchemaTypeUtil;
import java.io.File;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
public class CppTizenClientCodegen extends DefaultCodegen implements CodegenConfig {
protected static String PREFIX = "ArtikCloud";
@ -287,7 +281,7 @@ public class CppTizenClientCodegen extends DefaultCodegen implements CodegenConf
@Override
public String toOperationId(String operationId) {
// throw exception if method name is empty
if (operationId == "") {
if ("".equals(operationId)) {
throw new RuntimeException("Empty method name (operationId) not allowed");
}

View File

@ -23,18 +23,13 @@ import org.openapitools.codegen.CodegenConstants;
import org.openapitools.codegen.CodegenModel;
import org.openapitools.codegen.CodegenOperation;
import org.openapitools.codegen.CodegenParameter;
import org.openapitools.codegen.CodegenProperty;
import org.openapitools.codegen.CodegenSecurity;
import org.openapitools.codegen.CodegenType;
import org.openapitools.codegen.DefaultCodegen;
import org.openapitools.codegen.SupportingFile;
import org.openapitools.codegen.utils.ModelUtils;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.Operation;
import io.swagger.v3.oas.models.media.*;
import io.swagger.v3.oas.models.parameters.*;
import io.swagger.v3.parser.util.SchemaTypeUtil;
import java.io.File;
import java.util.Arrays;
@ -373,7 +368,7 @@ public class FinchServerCodegen extends DefaultCodegen implements CodegenConfig
private void generateScalaPath(CodegenOperation op) {
op.httpMethod = op.httpMethod.toLowerCase();
String path = new String(op.path);
String path = op.path;
// remove first /
if (path.startsWith("/")) {

View File

@ -25,8 +25,6 @@ import org.openapitools.codegen.DefaultCodegen;
import org.openapitools.codegen.SupportingFile;
import org.openapitools.codegen.utils.ModelUtils;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.Operation;
import io.swagger.v3.oas.models.media.*;
import java.io.File;
@ -249,7 +247,7 @@ public class PhpSilexServerCodegen extends DefaultCodegen implements CodegenConf
Map<String, Object> operations = (Map<String, Object>) objs.get("operations");
List<CodegenOperation> operationList = (List<CodegenOperation>) operations.get("operation");
for (CodegenOperation op : operationList) {
String path = new String(op.path);
String path = op.path;
String[] items = path.split("/", -1);
String opsPath = "";
int pathParamIndex = 0;

View File

@ -25,10 +25,7 @@ import org.openapitools.codegen.DefaultCodegen;
import org.openapitools.codegen.SupportingFile;
import org.openapitools.codegen.utils.ModelUtils;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.Operation;
import io.swagger.v3.oas.models.media.*;
import io.swagger.v3.core.util.Yaml;
import java.io.File;
import java.util.Arrays;
@ -109,9 +106,7 @@ public class PhpSlimServerCodegen extends DefaultCodegen implements CodegenConfi
typeMapping.put("array", "array");
typeMapping.put("list", "array");
typeMapping.put("object", "object");
//TODO binary should be mapped to byte array
// mapped to String as a workaround
typeMapping.put("binary", "string");
typeMapping.put("binary", "\\SplFileObject");
supportingFiles.add(new SupportingFile("README.mustache", packagePath.replace('/', File.separatorChar), "README.md"));
supportingFiles.add(new SupportingFile("composer.json", packagePath.replace('/', File.separatorChar), "composer.json"));

View File

@ -1,7 +1,7 @@
# Swagger MSF4J generated server
# OpenAPI MSF4J generated server
WSO2 Microservices Framework for Java (MSF4J) is a lightweight high performance framework for developing & running microservices. WSO2 MSF4J is one of the highest performing lightweight Java microservices frameworks. Now swagger code generator will generate micro service skeleton from OpenAPI definition. So you can use this project to convert your OpenAPI definitions to micro service quickly. With this approach you can develop complete micro service within seconds from your OpenAPI definition.
WSO2 Microservices Framework for Java (MSF4J) is a lightweight high performance framework for developing & running microservices. WSO2 MSF4J is one of the highest performing lightweight Java microservices frameworks. Now openapi-generator will generate micro service skeleton from OpenAPI definition. So you can use this project to convert your OpenAPI definitions to micro service quickly. With this approach you can develop complete micro service within seconds from your OpenAPI definition.
MSF4J generator uses java-msf4j as the default library.
Before you build/run service replace .deploy(new PetApi()) with your actual service class name in Application.java file like .deploy(new ApisAPI()) then it will start that service. If you have multiple service classes add them in , separated manner.

View File

@ -11,7 +11,7 @@
cmake_minimum_required (VERSION 2.8)
#PROJECT's NAME
project(CppRestSwaggerClient)
project(CppRestOpenAPIClient)
# THE LOCATION OF OUTPUT BINARIES

View File

@ -2,10 +2,14 @@
* {{{appName}}}
* {{{appDescription}}}
*
* {{#version}}OpenAPI spec version: {{{version}}}{{/version}}
* {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}}
{{#version}}
* OpenAPI spec version: {{{version}}}
{{/version}}
{{#infoEmail}}
* Contact: {{{infoEmail}}}
{{/infoEmail}}
*
* NOTE: This class is auto generated by the swagger code generator {{{generatorVersion}}}.
* NOTE: This class is auto generated by OpenAPI-Generator {{{generatorVersion}}}.
* https://openapi-generator.tech
* Do not edit the class manually.
*/

View File

@ -4,7 +4,6 @@
This API Server was generated by the [OpenAPI Generator](https://openapi-generator.tech) project.
It uses the [Pistache](https://github.com/oktal/pistache) Framework.
## Files organization
The Pistache C++ REST server generator creates three folders:
- `api`: This folder contains the handlers for each method specified in the OpenAPI definition. Every handler extracts
@ -45,6 +44,5 @@ cd build
put it under the model folder
## Namespaces
io::swagger::server::api
io::swagger::server::model
{{{apiPackage}}}
{{{modelPackage}}}

View File

@ -256,7 +256,7 @@ void {{prefix}}HttpRequestWorker::execute({{prefix}}HttpRequestInput *input) {
if ({{prefix}}HttpRequestWorker::sslDefaultConfiguration != nullptr) {
request.setSslConfiguration(*{{prefix}}HttpRequestWorker::sslDefaultConfiguration);
}
request.setRawHeader("User-Agent", "Swagger-Client");
request.setRawHeader("User-Agent", "{{#httpUserAgent}}{{.}}{{/httpUserAgent}}{{^httpUserAgent}}OpenAPI-Generator/{{apiVersion}}/cpp-qt5{{/httpUserAgent}}");
foreach(QString key, input->headers.keys()) {
request.setRawHeader(key.toStdString().c_str(), input->headers.value(key).toStdString().c_str());
}

View File

@ -19,5 +19,5 @@ restbed
## Namespaces
io::swagger::server::api
io::swagger::server::model
{{{apiPackage}}}
{{{modelPackage}}}

View File

@ -5,7 +5,7 @@
* {{#version}}OpenAPI spec version: {{{version}}}{{/version}}
* {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}}
*
* NOTE: This class is auto generated by the swagger code generator {{{generatorVersion}}}.
* NOTE: This class is auto generated by OpenAPI-Generator {{{generatorVersion}}}.
* https://openapi-generator.tech
* Do not edit the class manually.
*/

View File

@ -32,19 +32,19 @@ DOXYFILE_ENCODING = UTF-8
# title of most generated pages and in a few other places.
# The default value is: My Project.
PROJECT_NAME = {{#swagger}}{{#info}}"{{title}} {{version}} Tizen SDK"{{/info}}{{/swagger}}
PROJECT_NAME = {{#openAPI}}{{#info}}"{{title}} {{version}} Tizen SDK"{{/info}}{{/openAPI}}
# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
# could be handy for archiving the generated documentation or if some version
# control system is used.
PROJECT_NUMBER = {{#swagger}}{{#info}}{{version}}{{/info}}{{/swagger}}
PROJECT_NUMBER = {{#openAPI}}{{#info}}{{version}}{{/info}}{{/openAPI}}
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
# quick idea about the purpose of the project. Keep the description short.
PROJECT_BRIEF = "An SDK for creating client applications for {{#swagger}}{{#info}}{{title}}{{/info}}{{/swagger}} on Tizen Platform (http://tizen.org/)"
PROJECT_BRIEF = "An SDK for creating client applications for {{#openAPI}}{{#info}}{{title}}{{/info}}{{/openAPI}} on Tizen Platform (http://tizen.org/)"
# With the PROJECT_LOGO tag one can specify an logo or icon that is included in
# the documentation. The maximum height of the logo should not exceed 55 pixels

View File

@ -1,4 +1,4 @@
# Documentation for {{#swagger}}{{#info}}{{title}} {{version}} Tizen Client SDK{{/info}}{{/swagger}}
# Documentation for {{#openAPI}}{{#info}}{{title}} {{version}} Tizen Client SDK{{/info}}{{/openAPI}}
## How do I get the doc files?
First generate source code by running `openapi-generator`
@ -16,7 +16,7 @@ This is the structure of the doc folder:
├── Doxyfile \\Doxygen config files
├── generateDocumentation.sh \\Script to run to generate documentation
├── README.md \\This file
├── SDK \\Documentation for all classes in {{#swagger}}{{#info}}{{title}} Tizen Client SDK{{/info}}{{/swagger}}. See ./html/index.html
├── SDK \\Documentation for all classes in {{#openAPI}}{{#info}}{{title}} Tizen Client SDK{{/info}}{{/openAPI}}. See ./html/index.html
│   └── html
```
@ -42,8 +42,8 @@ All URIs are relative to {{{scheme}}}://{{{host}}}{{{basePath}}}
Method | HTTP request | Description
------------- | ------------- | -------------
{{#operation}}
*{{nickname}}Sync* | *{{httpMethod}}* {{{path}}} | {{{summary}}}.
*{{nickname}}ASync* | *{{httpMethod}}* {{{path}}} | {{{summary}}}.
*{{operationId}}Sync* | *{{httpMethod}}* {{{path}}} | {{{summary}}}.
*{{operationId}}ASync* | *{{httpMethod}}* {{{path}}} | {{{summary}}}.
{{/operation}}
{{/operations}}{{/apis}}{{/apiInfo}}

View File

@ -3,9 +3,8 @@
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator 3.0.0-SNAPSHOT.
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
@ -14,12 +13,12 @@
#include "MultipartFormData.h"
#include "ModelBase.h"
namespace io {
namespace swagger {
namespace org {
namespace openapitools {
namespace client {
namespace api {
using namespace io::swagger::client::model;
using namespace org::openapitools::client::model;
ApiClient::ApiClient(std::shared_ptr<ApiConfiguration> configuration )
: m_Configuration(configuration)

View File

@ -3,9 +3,8 @@
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator 3.0.0-SNAPSHOT.
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
@ -16,8 +15,8 @@
* This is an API client responsible for stating the HTTP calls
*/
#ifndef IO_SWAGGER_CLIENT_API_ApiClient_H_
#define IO_SWAGGER_CLIENT_API_ApiClient_H_
#ifndef ORG_OPENAPITOOLS_CLIENT_API_ApiClient_H_
#define ORG_OPENAPITOOLS_CLIENT_API_ApiClient_H_
#include "ApiConfiguration.h"
@ -31,12 +30,12 @@
#include <cpprest/details/basic_types.h>
#include <cpprest/http_client.h>
namespace io {
namespace swagger {
namespace org {
namespace openapitools {
namespace client {
namespace api {
using namespace io::swagger::client::model;
using namespace org::openapitools::client::model;
class ApiClient
{
@ -91,4 +90,4 @@ utility::string_t ApiClient::parameterToString(const std::vector<T>& value)
}
}
#endif /* IO_SWAGGER_CLIENT_API_ApiClient_H_ */
#endif /* ORG_OPENAPITOOLS_CLIENT_API_ApiClient_H_ */

View File

@ -3,17 +3,16 @@
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator 3.0.0-SNAPSHOT.
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
#include "ApiConfiguration.h"
namespace io {
namespace swagger {
namespace org {
namespace openapitools {
namespace client {
namespace api {

View File

@ -3,9 +3,8 @@
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator 3.0.0-SNAPSHOT.
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
@ -16,8 +15,8 @@
* This class represents a single item of a multipart-formdata request.
*/
#ifndef IO_SWAGGER_CLIENT_API_ApiConfiguration_H_
#define IO_SWAGGER_CLIENT_API_ApiConfiguration_H_
#ifndef ORG_OPENAPITOOLS_CLIENT_API_ApiConfiguration_H_
#define ORG_OPENAPITOOLS_CLIENT_API_ApiConfiguration_H_
@ -25,8 +24,8 @@
#include <cpprest/details/basic_types.h>
#include <cpprest/http_client.h>
namespace io {
namespace swagger {
namespace org {
namespace openapitools {
namespace client {
namespace api {
@ -62,4 +61,4 @@ protected:
}
}
}
#endif /* IO_SWAGGER_CLIENT_API_ApiConfiguration_H_ */
#endif /* ORG_OPENAPITOOLS_CLIENT_API_ApiConfiguration_H_ */

View File

@ -3,17 +3,16 @@
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator 3.0.0-SNAPSHOT.
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
#include "ApiException.h"
namespace io {
namespace swagger {
namespace org {
namespace openapitools {
namespace client {
namespace api {

View File

@ -3,9 +3,8 @@
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator 3.0.0-SNAPSHOT.
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
@ -16,8 +15,8 @@
* This is the exception being thrown in case the api call was not successful
*/
#ifndef IO_SWAGGER_CLIENT_API_ApiException_H_
#define IO_SWAGGER_CLIENT_API_ApiException_H_
#ifndef ORG_OPENAPITOOLS_CLIENT_API_ApiException_H_
#define ORG_OPENAPITOOLS_CLIENT_API_ApiException_H_
@ -28,8 +27,8 @@
#include <cpprest/http_msg.h>
namespace io {
namespace swagger {
namespace org {
namespace openapitools {
namespace client {
namespace api {
@ -59,4 +58,4 @@ protected:
}
}
#endif /* IO_SWAGGER_CLIENT_API_ApiBase_H_ */
#endif /* ORG_OPENAPITOOLS_CLIENT_API_ApiBase_H_ */

View File

@ -11,7 +11,7 @@
cmake_minimum_required (VERSION 2.8)
#PROJECT's NAME
project(CppRestSwaggerClient)
project(CppRestOpenAPIClient)
# THE LOCATION OF OUTPUT BINARIES

View File

@ -3,17 +3,16 @@
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator 3.0.0-SNAPSHOT.
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
#include "HttpContent.h"
namespace io {
namespace swagger {
namespace org {
namespace openapitools {
namespace client {
namespace model {

View File

@ -3,9 +3,8 @@
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator 3.0.0-SNAPSHOT.
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
@ -16,8 +15,8 @@
* This class represents a single item of a multipart-formdata request.
*/
#ifndef IO_SWAGGER_CLIENT_MODEL_HttpContent_H_
#define IO_SWAGGER_CLIENT_MODEL_HttpContent_H_
#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_HttpContent_H_
#define ORG_OPENAPITOOLS_CLIENT_MODEL_HttpContent_H_
@ -25,8 +24,8 @@
#include <cpprest/details/basic_types.h>
namespace io {
namespace swagger {
namespace org {
namespace openapitools {
namespace client {
namespace model {
@ -67,4 +66,4 @@ protected:
}
}
#endif /* IO_SWAGGER_CLIENT_MODEL_HttpContent_H_ */
#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_HttpContent_H_ */

View File

@ -3,9 +3,8 @@
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator 3.0.0-SNAPSHOT.
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
@ -16,14 +15,14 @@
* This is the interface for contents that can be sent to a remote HTTP server.
*/
#ifndef IO_SWAGGER_CLIENT_MODEL_IHttpBody_H_
#define IO_SWAGGER_CLIENT_MODEL_IHttpBody_H_
#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_IHttpBody_H_
#define ORG_OPENAPITOOLS_CLIENT_MODEL_IHttpBody_H_
#include <iostream>
namespace io {
namespace swagger {
namespace org {
namespace openapitools {
namespace client {
namespace model {
@ -40,4 +39,4 @@ public:
}
}
#endif /* IO_SWAGGER_CLIENT_MODEL_IHttpBody_H_ */
#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_IHttpBody_H_ */

View File

@ -3,17 +3,16 @@
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator 3.0.0-SNAPSHOT.
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
#include "JsonBody.h"
namespace io {
namespace swagger {
namespace org {
namespace openapitools {
namespace client {
namespace model {

View File

@ -3,9 +3,8 @@
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator 3.0.0-SNAPSHOT.
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
@ -16,16 +15,16 @@
* This is a JSON http body which can be submitted via http
*/
#ifndef IO_SWAGGER_CLIENT_MODEL_JsonBody_H_
#define IO_SWAGGER_CLIENT_MODEL_JsonBody_H_
#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_JsonBody_H_
#define ORG_OPENAPITOOLS_CLIENT_MODEL_JsonBody_H_
#include "IHttpBody.h"
#include <cpprest/json.h>
namespace io {
namespace swagger {
namespace org {
namespace openapitools {
namespace client {
namespace model {
@ -47,4 +46,4 @@ protected:
}
}
#endif /* IO_SWAGGER_CLIENT_MODEL_JsonBody_H_ */
#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_JsonBody_H_ */

View File

@ -3,17 +3,16 @@
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator 3.0.0-SNAPSHOT.
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
#include "ModelBase.h"
namespace io {
namespace swagger {
namespace org {
namespace openapitools {
namespace client {
namespace model {

View File

@ -3,9 +3,8 @@
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator 3.0.0-SNAPSHOT.
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
@ -16,8 +15,8 @@
* This is the base class for all model classes
*/
#ifndef IO_SWAGGER_CLIENT_MODEL_ModelBase_H_
#define IO_SWAGGER_CLIENT_MODEL_ModelBase_H_
#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_ModelBase_H_
#define ORG_OPENAPITOOLS_CLIENT_MODEL_ModelBase_H_
#include "HttpContent.h"
@ -28,8 +27,8 @@
#include <vector>
namespace io {
namespace swagger {
namespace org {
namespace openapitools {
namespace client {
namespace model {
@ -118,4 +117,4 @@ std::shared_ptr<HttpContent> ModelBase::toHttpContent( const utility::string_t&
}
}
#endif /* IO_SWAGGER_CLIENT_MODEL_ModelBase_H_ */
#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_ModelBase_H_ */

View File

@ -3,9 +3,8 @@
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator 3.0.0-SNAPSHOT.
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
@ -16,8 +15,8 @@
#include <boost/uuid/random_generator.hpp>
#include <boost/uuid/uuid_io.hpp>
namespace io {
namespace swagger {
namespace org {
namespace openapitools {
namespace client {
namespace model {

View File

@ -3,9 +3,8 @@
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator 3.0.0-SNAPSHOT.
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
@ -16,8 +15,8 @@
* This class represents a container for building a application/x-multipart-formdata requests.
*/
#ifndef IO_SWAGGER_CLIENT_MODEL_MultipartFormData_H_
#define IO_SWAGGER_CLIENT_MODEL_MultipartFormData_H_
#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_MultipartFormData_H_
#define ORG_OPENAPITOOLS_CLIENT_MODEL_MultipartFormData_H_
#include "IHttpBody.h"
@ -30,8 +29,8 @@
#include <cpprest/details/basic_types.h>
namespace io {
namespace swagger {
namespace org {
namespace openapitools {
namespace client {
namespace model {
@ -60,4 +59,4 @@ protected:
}
}
#endif /* IO_SWAGGER_CLIENT_MODEL_MultipartFormData_H_ */
#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_MultipartFormData_H_ */

View File

@ -3,17 +3,16 @@
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator 3.0.0-SNAPSHOT.
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
#include "Object.h"
namespace io {
namespace swagger {
namespace org {
namespace openapitools {
namespace client {
namespace model {

View File

@ -3,9 +3,8 @@
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator 3.0.0-SNAPSHOT.
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
@ -16,8 +15,8 @@
* This is the implementation of a JSON object.
*/
#ifndef IO_SWAGGER_CLIENT_MODEL_Object_H_
#define IO_SWAGGER_CLIENT_MODEL_Object_H_
#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_Object_H_
#define ORG_OPENAPITOOLS_CLIENT_MODEL_Object_H_
#include "ModelBase.h"
@ -25,8 +24,8 @@
#include <cpprest/details/basic_types.h>
#include <cpprest/json.h>
namespace io {
namespace swagger {
namespace org {
namespace openapitools {
namespace client {
namespace model {
@ -60,4 +59,4 @@ private:
}
}
#endif /* IO_SWAGGER_CLIENT_MODEL_Object_H_ */
#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_Object_H_ */

View File

@ -3,9 +3,8 @@
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator 3.0.0-SNAPSHOT.
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
@ -20,12 +19,12 @@
#include <boost/algorithm/string/replace.hpp>
namespace io {
namespace swagger {
namespace org {
namespace openapitools {
namespace client {
namespace api {
using namespace io::swagger::client::model;
using namespace org::openapitools::client::model;
PetApi::PetApi( std::shared_ptr<ApiClient> apiClient )
: m_ApiClient(apiClient)

View File

@ -3,9 +3,8 @@
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator 3.0.0-SNAPSHOT.
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
@ -16,8 +15,8 @@
*
*/
#ifndef IO_SWAGGER_CLIENT_API_PetApi_H_
#define IO_SWAGGER_CLIENT_API_PetApi_H_
#ifndef ORG_OPENAPITOOLS_CLIENT_API_PetApi_H_
#define ORG_OPENAPITOOLS_CLIENT_API_PetApi_H_
#include "../ApiClient.h"
@ -29,12 +28,12 @@
#include <boost/optional.hpp>
namespace io {
namespace swagger {
namespace org {
namespace openapitools {
namespace client {
namespace api {
using namespace io::swagger::client::model;
using namespace org::openapitools::client::model;
class PetApi
{
@ -141,5 +140,5 @@ protected:
}
}
#endif /* IO_SWAGGER_CLIENT_API_PetApi_H_ */
#endif /* ORG_OPENAPITOOLS_CLIENT_API_PetApi_H_ */

View File

@ -3,9 +3,8 @@
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator 3.0.0-SNAPSHOT.
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
@ -20,12 +19,12 @@
#include <boost/algorithm/string/replace.hpp>
namespace io {
namespace swagger {
namespace org {
namespace openapitools {
namespace client {
namespace api {
using namespace io::swagger::client::model;
using namespace org::openapitools::client::model;
StoreApi::StoreApi( std::shared_ptr<ApiClient> apiClient )
: m_ApiClient(apiClient)

View File

@ -3,9 +3,8 @@
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator 3.0.0-SNAPSHOT.
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
@ -16,8 +15,8 @@
*
*/
#ifndef IO_SWAGGER_CLIENT_API_StoreApi_H_
#define IO_SWAGGER_CLIENT_API_StoreApi_H_
#ifndef ORG_OPENAPITOOLS_CLIENT_API_StoreApi_H_
#define ORG_OPENAPITOOLS_CLIENT_API_StoreApi_H_
#include "../ApiClient.h"
@ -28,12 +27,12 @@
#include <boost/optional.hpp>
namespace io {
namespace swagger {
namespace org {
namespace openapitools {
namespace client {
namespace api {
using namespace io::swagger::client::model;
using namespace org::openapitools::client::model;
class StoreApi
{
@ -88,5 +87,5 @@ protected:
}
}
#endif /* IO_SWAGGER_CLIENT_API_StoreApi_H_ */
#endif /* ORG_OPENAPITOOLS_CLIENT_API_StoreApi_H_ */

View File

@ -3,9 +3,8 @@
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator 3.0.0-SNAPSHOT.
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
@ -20,12 +19,12 @@
#include <boost/algorithm/string/replace.hpp>
namespace io {
namespace swagger {
namespace org {
namespace openapitools {
namespace client {
namespace api {
using namespace io::swagger::client::model;
using namespace org::openapitools::client::model;
UserApi::UserApi( std::shared_ptr<ApiClient> apiClient )
: m_ApiClient(apiClient)

View File

@ -3,9 +3,8 @@
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator 3.0.0-SNAPSHOT.
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
@ -16,8 +15,8 @@
*
*/
#ifndef IO_SWAGGER_CLIENT_API_UserApi_H_
#define IO_SWAGGER_CLIENT_API_UserApi_H_
#ifndef ORG_OPENAPITOOLS_CLIENT_API_UserApi_H_
#define ORG_OPENAPITOOLS_CLIENT_API_UserApi_H_
#include "../ApiClient.h"
@ -28,12 +27,12 @@
#include <boost/optional.hpp>
namespace io {
namespace swagger {
namespace org {
namespace openapitools {
namespace client {
namespace api {
using namespace io::swagger::client::model;
using namespace org::openapitools::client::model;
class UserApi
{
@ -132,5 +131,5 @@ protected:
}
}
#endif /* IO_SWAGGER_CLIENT_API_UserApi_H_ */
#endif /* ORG_OPENAPITOOLS_CLIENT_API_UserApi_H_ */

View File

@ -3,9 +3,8 @@
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator 3.0.0-SNAPSHOT.
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
@ -14,8 +13,8 @@
#include "ApiResponse.h"
namespace io {
namespace swagger {
namespace org {
namespace openapitools {
namespace client {
namespace model {

View File

@ -3,9 +3,8 @@
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator 3.0.0-SNAPSHOT.
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
@ -16,16 +15,16 @@
* Describes the result of uploading an image resource
*/
#ifndef IO_SWAGGER_CLIENT_MODEL_ApiResponse_H_
#define IO_SWAGGER_CLIENT_MODEL_ApiResponse_H_
#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_ApiResponse_H_
#define ORG_OPENAPITOOLS_CLIENT_MODEL_ApiResponse_H_
#include "../ModelBase.h"
#include <cpprest/details/basic_types.h>
namespace io {
namespace swagger {
namespace org {
namespace openapitools {
namespace client {
namespace model {
@ -89,4 +88,4 @@ protected:
}
}
#endif /* IO_SWAGGER_CLIENT_MODEL_ApiResponse_H_ */
#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_ApiResponse_H_ */

View File

@ -3,9 +3,8 @@
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator 3.0.0-SNAPSHOT.
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
@ -14,8 +13,8 @@
#include "Category.h"
namespace io {
namespace swagger {
namespace org {
namespace openapitools {
namespace client {
namespace model {

View File

@ -3,9 +3,8 @@
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator 3.0.0-SNAPSHOT.
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
@ -16,16 +15,16 @@
* A category for a pet
*/
#ifndef IO_SWAGGER_CLIENT_MODEL_Category_H_
#define IO_SWAGGER_CLIENT_MODEL_Category_H_
#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_Category_H_
#define ORG_OPENAPITOOLS_CLIENT_MODEL_Category_H_
#include "../ModelBase.h"
#include <cpprest/details/basic_types.h>
namespace io {
namespace swagger {
namespace org {
namespace openapitools {
namespace client {
namespace model {
@ -80,4 +79,4 @@ protected:
}
}
#endif /* IO_SWAGGER_CLIENT_MODEL_Category_H_ */
#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_Category_H_ */

View File

@ -3,9 +3,8 @@
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator 3.0.0-SNAPSHOT.
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
@ -14,8 +13,8 @@
#include "Order.h"
namespace io {
namespace swagger {
namespace org {
namespace openapitools {
namespace client {
namespace model {

View File

@ -3,9 +3,8 @@
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator 3.0.0-SNAPSHOT.
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
@ -16,16 +15,16 @@
* An order for a pets from the pet store
*/
#ifndef IO_SWAGGER_CLIENT_MODEL_Order_H_
#define IO_SWAGGER_CLIENT_MODEL_Order_H_
#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_Order_H_
#define ORG_OPENAPITOOLS_CLIENT_MODEL_Order_H_
#include "../ModelBase.h"
#include <cpprest/details/basic_types.h>
namespace io {
namespace swagger {
namespace org {
namespace openapitools {
namespace client {
namespace model {
@ -116,4 +115,4 @@ protected:
}
}
#endif /* IO_SWAGGER_CLIENT_MODEL_Order_H_ */
#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_Order_H_ */

View File

@ -3,9 +3,8 @@
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator 3.0.0-SNAPSHOT.
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
@ -14,8 +13,8 @@
#include "Pet.h"
namespace io {
namespace swagger {
namespace org {
namespace openapitools {
namespace client {
namespace model {

View File

@ -3,9 +3,8 @@
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator 3.0.0-SNAPSHOT.
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
@ -16,8 +15,8 @@
* A pet for sale in the pet store
*/
#ifndef IO_SWAGGER_CLIENT_MODEL_Pet_H_
#define IO_SWAGGER_CLIENT_MODEL_Pet_H_
#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_Pet_H_
#define ORG_OPENAPITOOLS_CLIENT_MODEL_Pet_H_
#include "../ModelBase.h"
@ -27,8 +26,8 @@
#include "Category.h"
#include <vector>
namespace io {
namespace swagger {
namespace org {
namespace openapitools {
namespace client {
namespace model {
@ -113,4 +112,4 @@ protected:
}
}
#endif /* IO_SWAGGER_CLIENT_MODEL_Pet_H_ */
#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_Pet_H_ */

View File

@ -3,9 +3,8 @@
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator 3.0.0-SNAPSHOT.
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
@ -14,8 +13,8 @@
#include "Tag.h"
namespace io {
namespace swagger {
namespace org {
namespace openapitools {
namespace client {
namespace model {

View File

@ -3,9 +3,8 @@
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator 3.0.0-SNAPSHOT.
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
@ -16,16 +15,16 @@
* A tag for a pet
*/
#ifndef IO_SWAGGER_CLIENT_MODEL_Tag_H_
#define IO_SWAGGER_CLIENT_MODEL_Tag_H_
#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_Tag_H_
#define ORG_OPENAPITOOLS_CLIENT_MODEL_Tag_H_
#include "../ModelBase.h"
#include <cpprest/details/basic_types.h>
namespace io {
namespace swagger {
namespace org {
namespace openapitools {
namespace client {
namespace model {
@ -80,4 +79,4 @@ protected:
}
}
#endif /* IO_SWAGGER_CLIENT_MODEL_Tag_H_ */
#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_Tag_H_ */

View File

@ -3,9 +3,8 @@
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator 3.0.0-SNAPSHOT.
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
@ -14,8 +13,8 @@
#include "User.h"
namespace io {
namespace swagger {
namespace org {
namespace openapitools {
namespace client {
namespace model {

View File

@ -3,9 +3,8 @@
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator 3.0.0-SNAPSHOT.
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
@ -16,16 +15,16 @@
* A User who is purchasing from the pet store
*/
#ifndef IO_SWAGGER_CLIENT_MODEL_User_H_
#define IO_SWAGGER_CLIENT_MODEL_User_H_
#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_User_H_
#define ORG_OPENAPITOOLS_CLIENT_MODEL_User_H_
#include "../ModelBase.h"
#include <cpprest/details/basic_types.h>
namespace io {
namespace swagger {
namespace org {
namespace openapitools {
namespace client {
namespace model {
@ -134,4 +133,4 @@ protected:
}
}
#endif /* IO_SWAGGER_CLIENT_MODEL_User_H_ */
#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_User_H_ */

View File

@ -4,9 +4,9 @@
#include <QtTest/QtTest>
#include <QTimer>
#include "../client/SWGPetApi.h"
#include "../client/OAIPetApi.h"
using namespace Swagger;
using namespace OpenAPI;
class PetApiTests: public QObject {
Q_OBJECT
@ -17,8 +17,8 @@ public:
static void runTests();
private:
SWGPetApi* getApi();
SWGPet* createRandomPet();
OAIPetApi* getApi();
OAIPet* createRandomPet();
signals:
void quit();

View File

@ -11,32 +11,32 @@
*/
#include "SWGApiResponse.h"
#include "OAIApiResponse.h"
#include "SWGHelpers.h"
#include "OAIHelpers.h"
#include <QJsonDocument>
#include <QJsonArray>
#include <QObject>
#include <QDebug>
namespace Swagger {
namespace OpenAPI {
SWGApiResponse::SWGApiResponse(QString json) {
OAIApiResponse::OAIApiResponse(QString json) {
init();
this->fromJson(json);
}
SWGApiResponse::SWGApiResponse() {
OAIApiResponse::OAIApiResponse() {
init();
}
SWGApiResponse::~SWGApiResponse() {
OAIApiResponse::~OAIApiResponse() {
this->cleanup();
}
void
SWGApiResponse::init() {
OAIApiResponse::init() {
code = 0;
m_code_isSet = false;
type = new QString("");
@ -46,7 +46,7 @@ SWGApiResponse::init() {
}
void
SWGApiResponse::cleanup() {
OAIApiResponse::cleanup() {
if(type != nullptr) {
delete type;
@ -56,8 +56,8 @@ SWGApiResponse::cleanup() {
}
}
SWGApiResponse*
SWGApiResponse::fromJson(QString json) {
OAIApiResponse*
OAIApiResponse::fromJson(QString json) {
QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
@ -66,17 +66,17 @@ SWGApiResponse::fromJson(QString json) {
}
void
SWGApiResponse::fromJsonObject(QJsonObject pJson) {
::Swagger::setValue(&code, pJson["code"], "qint32", "");
OAIApiResponse::fromJsonObject(QJsonObject pJson) {
::OpenAPI::setValue(&code, pJson["code"], "qint32", "");
::Swagger::setValue(&type, pJson["type"], "QString", "QString");
::OpenAPI::setValue(&type, pJson["type"], "QString", "QString");
::Swagger::setValue(&message, pJson["message"], "QString", "QString");
::OpenAPI::setValue(&message, pJson["message"], "QString", "QString");
}
QString
SWGApiResponse::asJson ()
OAIApiResponse::asJson ()
{
QJsonObject obj = this->asJsonObject();
QJsonDocument doc(obj);
@ -85,7 +85,7 @@ SWGApiResponse::asJson ()
}
QJsonObject
SWGApiResponse::asJsonObject() {
OAIApiResponse::asJsonObject() {
QJsonObject obj;
if(m_code_isSet){
obj.insert("code", QJsonValue(code));
@ -101,38 +101,38 @@ SWGApiResponse::asJsonObject() {
}
qint32
SWGApiResponse::getCode() {
OAIApiResponse::getCode() {
return code;
}
void
SWGApiResponse::setCode(qint32 code) {
OAIApiResponse::setCode(qint32 code) {
this->code = code;
this->m_code_isSet = true;
}
QString*
SWGApiResponse::getType() {
OAIApiResponse::getType() {
return type;
}
void
SWGApiResponse::setType(QString* type) {
OAIApiResponse::setType(QString* type) {
this->type = type;
this->m_type_isSet = true;
}
QString*
SWGApiResponse::getMessage() {
OAIApiResponse::getMessage() {
return message;
}
void
SWGApiResponse::setMessage(QString* message) {
OAIApiResponse::setMessage(QString* message) {
this->message = message;
this->m_message_isSet = true;
}
bool
SWGApiResponse::isSet(){
OAIApiResponse::isSet(){
bool isObjectUpdated = false;
do{
if(m_code_isSet){ isObjectUpdated = true; break;}

View File

@ -11,35 +11,35 @@
*/
/*
* SWGApiResponse.h
* OAIApiResponse.h
*
* Describes the result of uploading an image resource
*/
#ifndef SWGApiResponse_H_
#define SWGApiResponse_H_
#ifndef OAIApiResponse_H_
#define OAIApiResponse_H_
#include <QJsonObject>
#include <QString>
#include "SWGObject.h"
#include "OAIObject.h"
namespace Swagger {
namespace OpenAPI {
class SWGApiResponse: public SWGObject {
class OAIApiResponse: public OAIObject {
public:
SWGApiResponse();
SWGApiResponse(QString json);
~SWGApiResponse();
OAIApiResponse();
OAIApiResponse(QString json);
~OAIApiResponse();
void init();
void cleanup();
QString asJson () override;
QJsonObject asJsonObject() override;
void fromJsonObject(QJsonObject json) override;
SWGApiResponse* fromJson(QString jsonString) override;
OAIApiResponse* fromJson(QString jsonString) override;
qint32 getCode();
void setCode(qint32 code);
@ -67,4 +67,4 @@ private:
}
#endif /* SWGApiResponse_H_ */
#endif /* OAIApiResponse_H_ */

View File

@ -11,32 +11,32 @@
*/
#include "SWGCategory.h"
#include "OAICategory.h"
#include "SWGHelpers.h"
#include "OAIHelpers.h"
#include <QJsonDocument>
#include <QJsonArray>
#include <QObject>
#include <QDebug>
namespace Swagger {
namespace OpenAPI {
SWGCategory::SWGCategory(QString json) {
OAICategory::OAICategory(QString json) {
init();
this->fromJson(json);
}
SWGCategory::SWGCategory() {
OAICategory::OAICategory() {
init();
}
SWGCategory::~SWGCategory() {
OAICategory::~OAICategory() {
this->cleanup();
}
void
SWGCategory::init() {
OAICategory::init() {
id = 0L;
m_id_isSet = false;
name = new QString("");
@ -44,15 +44,15 @@ SWGCategory::init() {
}
void
SWGCategory::cleanup() {
OAICategory::cleanup() {
if(name != nullptr) {
delete name;
}
}
SWGCategory*
SWGCategory::fromJson(QString json) {
OAICategory*
OAICategory::fromJson(QString json) {
QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
@ -61,15 +61,15 @@ SWGCategory::fromJson(QString json) {
}
void
SWGCategory::fromJsonObject(QJsonObject pJson) {
::Swagger::setValue(&id, pJson["id"], "qint64", "");
OAICategory::fromJsonObject(QJsonObject pJson) {
::OpenAPI::setValue(&id, pJson["id"], "qint64", "");
::Swagger::setValue(&name, pJson["name"], "QString", "QString");
::OpenAPI::setValue(&name, pJson["name"], "QString", "QString");
}
QString
SWGCategory::asJson ()
OAICategory::asJson ()
{
QJsonObject obj = this->asJsonObject();
QJsonDocument doc(obj);
@ -78,7 +78,7 @@ SWGCategory::asJson ()
}
QJsonObject
SWGCategory::asJsonObject() {
OAICategory::asJsonObject() {
QJsonObject obj;
if(m_id_isSet){
obj.insert("id", QJsonValue(id));
@ -91,28 +91,28 @@ SWGCategory::asJsonObject() {
}
qint64
SWGCategory::getId() {
OAICategory::getId() {
return id;
}
void
SWGCategory::setId(qint64 id) {
OAICategory::setId(qint64 id) {
this->id = id;
this->m_id_isSet = true;
}
QString*
SWGCategory::getName() {
OAICategory::getName() {
return name;
}
void
SWGCategory::setName(QString* name) {
OAICategory::setName(QString* name) {
this->name = name;
this->m_name_isSet = true;
}
bool
SWGCategory::isSet(){
OAICategory::isSet(){
bool isObjectUpdated = false;
do{
if(m_id_isSet){ isObjectUpdated = true; break;}

View File

@ -11,35 +11,35 @@
*/
/*
* SWGCategory.h
* OAICategory.h
*
* A category for a pet
*/
#ifndef SWGCategory_H_
#define SWGCategory_H_
#ifndef OAICategory_H_
#define OAICategory_H_
#include <QJsonObject>
#include <QString>
#include "SWGObject.h"
#include "OAIObject.h"
namespace Swagger {
namespace OpenAPI {
class SWGCategory: public SWGObject {
class OAICategory: public OAIObject {
public:
SWGCategory();
SWGCategory(QString json);
~SWGCategory();
OAICategory();
OAICategory(QString json);
~OAICategory();
void init();
void cleanup();
QString asJson () override;
QJsonObject asJsonObject() override;
void fromJsonObject(QJsonObject json) override;
SWGCategory* fromJson(QString jsonString) override;
OAICategory* fromJson(QString jsonString) override;
qint64 getId();
void setId(qint64 id);
@ -61,4 +61,4 @@ private:
}
#endif /* SWGCategory_H_ */
#endif /* OAICategory_H_ */

View File

@ -10,16 +10,16 @@
* Do not edit the class manually.
*/
#include "SWGHelpers.h"
#include "SWGModelFactory.h"
#include "SWGObject.h"
#include "OAIHelpers.h"
#include "OAIModelFactory.h"
#include "OAIObject.h"
#include <QDebug>
#include <QJsonArray>
#include <QJsonValue>
#include <QDateTime>
namespace Swagger {
namespace OpenAPI {
void
setValue(void* value, QJsonValue obj, QString type, QString complexType) {
@ -121,21 +121,21 @@ setValue(void* value, QJsonValue obj, QString type, QString complexType) {
qDebug() << "Can't set value because the target pointer is nullptr";
}
}
else if(type.startsWith("SWG") && obj.isObject()) {
else if(type.startsWith("OAI") && obj.isObject()) {
// complex type
QJsonObject jsonObj = obj.toObject();
SWGObject * so = (SWGObject*)::Swagger::create(complexType);
OAIObject * so = (OAIObject*)::OpenAPI::create(complexType);
if(so != nullptr) {
so->fromJsonObject(jsonObj);
SWGObject **val = static_cast<SWGObject**>(value);
OAIObject **val = static_cast<OAIObject**>(value);
if(*val != nullptr) delete *val;
*val = so;
}
}
else if(type.startsWith("QList") && QString("").compare(complexType) != 0 && obj.isArray()) {
// list of values
if(complexType.startsWith("SWG")) {
auto output = reinterpret_cast<QList<SWGObject *> **> (value);
if(complexType.startsWith("OAI")) {
auto output = reinterpret_cast<QList<OAIObject *> **> (value);
for (auto item : **output) {
if(item != nullptr) delete item;
}
@ -143,7 +143,7 @@ setValue(void* value, QJsonValue obj, QString type, QString complexType) {
QJsonArray arr = obj.toArray();
for (const QJsonValue & jval : arr) {
// it's an object
SWGObject * val = (SWGObject*)::Swagger::create(complexType);
OAIObject * val = (OAIObject*)::OpenAPI::create(complexType);
QJsonObject t = jval.toObject();
val->fromJsonObject(t);
(*output)->append(val);
@ -155,7 +155,7 @@ setValue(void* value, QJsonValue obj, QString type, QString complexType) {
QJsonArray arr = obj.toArray();
for (const QJsonValue & jval : arr){
qint32 val;
::Swagger::setValue(&val, jval, QStringLiteral("qint32"), QStringLiteral(""));
::OpenAPI::setValue(&val, jval, QStringLiteral("qint32"), QStringLiteral(""));
(*output)->push_back(val);
}
}
@ -165,7 +165,7 @@ setValue(void* value, QJsonValue obj, QString type, QString complexType) {
QJsonArray arr = obj.toArray();
for (const QJsonValue & jval : arr){
qint64 val;
::Swagger::setValue(&val, jval, QStringLiteral("qint64"), QStringLiteral(""));
::OpenAPI::setValue(&val, jval, QStringLiteral("qint64"), QStringLiteral(""));
(*output)->push_back(val);
}
}
@ -175,7 +175,7 @@ setValue(void* value, QJsonValue obj, QString type, QString complexType) {
QJsonArray arr = obj.toArray();
for (const QJsonValue & jval : arr){
bool val;
::Swagger::setValue(&val, jval, QStringLiteral("bool"), QStringLiteral(""));
::OpenAPI::setValue(&val, jval, QStringLiteral("bool"), QStringLiteral(""));
(*output)->push_back(val);
}
}
@ -185,7 +185,7 @@ setValue(void* value, QJsonValue obj, QString type, QString complexType) {
QJsonArray arr = obj.toArray();
for (const QJsonValue & jval : arr){
float val;
::Swagger::setValue(&val, jval, QStringLiteral("float"), QStringLiteral(""));
::OpenAPI::setValue(&val, jval, QStringLiteral("float"), QStringLiteral(""));
(*output)->push_back(val);
}
}
@ -195,7 +195,7 @@ setValue(void* value, QJsonValue obj, QString type, QString complexType) {
QJsonArray arr = obj.toArray();
for (const QJsonValue & jval : arr){
double val;
::Swagger::setValue(&val, jval, QStringLiteral("double"), QStringLiteral(""));
::OpenAPI::setValue(&val, jval, QStringLiteral("double"), QStringLiteral(""));
(*output)->push_back(val);
}
}
@ -208,7 +208,7 @@ setValue(void* value, QJsonValue obj, QString type, QString complexType) {
QJsonArray arr = obj.toArray();
for (const QJsonValue & jval : arr){
QString * val = new QString();
::Swagger::setValue(&val, jval, QStringLiteral("QString"), QStringLiteral(""));
::OpenAPI::setValue(&val, jval, QStringLiteral("QString"), QStringLiteral(""));
(*output)->push_back(val);
}
}
@ -221,7 +221,7 @@ setValue(void* value, QJsonValue obj, QString type, QString complexType) {
QJsonArray arr = obj.toArray();
for (const QJsonValue & jval : arr){
QDate * val = new QDate();
::Swagger::setValue(&val, jval, QStringLiteral("QDate"), QStringLiteral(""));
::OpenAPI::setValue(&val, jval, QStringLiteral("QDate"), QStringLiteral(""));
(*output)->push_back(val);
}
}
@ -234,15 +234,15 @@ setValue(void* value, QJsonValue obj, QString type, QString complexType) {
QJsonArray arr = obj.toArray();
for (const QJsonValue & jval : arr){
QDateTime * val = new QDateTime();
::Swagger::setValue(&val, jval, QStringLiteral("QDateTime"), QStringLiteral(""));
::OpenAPI::setValue(&val, jval, QStringLiteral("QDateTime"), QStringLiteral(""));
(*output)->push_back(val);
}
}
}
else if(type.startsWith("QMap") && QString("").compare(complexType) != 0 && obj.isObject()) {
// list of values
if(complexType.startsWith("SWG")) {
auto output = reinterpret_cast<QMap<QString, SWGObject*> **> (value);
if(complexType.startsWith("OAI")) {
auto output = reinterpret_cast<QMap<QString, OAIObject*> **> (value);
for (auto item : **output) {
if(item != nullptr) delete item;
}
@ -250,9 +250,9 @@ setValue(void* value, QJsonValue obj, QString type, QString complexType) {
auto varmap = obj.toObject().toVariantMap();
if(varmap.count() > 0){
for(auto itemkey : varmap.keys() ){
auto val = (SWGObject*)::Swagger::create(complexType);
auto val = (OAIObject*)::OpenAPI::create(complexType);
auto jsonval = QJsonValue::fromVariant(varmap.value(itemkey));
::Swagger::setValue(&val, jsonval, complexType, complexType);
::OpenAPI::setValue(&val, jsonval, complexType, complexType);
(*output)->insert(itemkey, val);
}
}
@ -265,7 +265,7 @@ setValue(void* value, QJsonValue obj, QString type, QString complexType) {
for(auto itemkey : varmap.keys() ){
qint32 val;
auto jsonval = QJsonValue::fromVariant(varmap.value(itemkey));
::Swagger::setValue(&val, jsonval, QStringLiteral("qint32"), QStringLiteral(""));
::OpenAPI::setValue(&val, jsonval, QStringLiteral("qint32"), QStringLiteral(""));
(*output)->insert( itemkey, val);
}
}
@ -278,7 +278,7 @@ setValue(void* value, QJsonValue obj, QString type, QString complexType) {
for(auto itemkey : varmap.keys() ){
qint64 val;
auto jsonval = QJsonValue::fromVariant(varmap.value(itemkey));
::Swagger::setValue(&val, jsonval, QStringLiteral("qint64"), QStringLiteral(""));
::OpenAPI::setValue(&val, jsonval, QStringLiteral("qint64"), QStringLiteral(""));
(*output)->insert( itemkey, val);
}
}
@ -291,7 +291,7 @@ setValue(void* value, QJsonValue obj, QString type, QString complexType) {
for(auto itemkey : varmap.keys() ){
bool val;
auto jsonval = QJsonValue::fromVariant(varmap.value(itemkey));
::Swagger::setValue(&val, jsonval, QStringLiteral("bool"), QStringLiteral(""));
::OpenAPI::setValue(&val, jsonval, QStringLiteral("bool"), QStringLiteral(""));
(*output)->insert( itemkey, val);
}
}
@ -304,7 +304,7 @@ setValue(void* value, QJsonValue obj, QString type, QString complexType) {
for(auto itemkey : varmap.keys() ){
float val;
auto jsonval = QJsonValue::fromVariant(varmap.value(itemkey));
::Swagger::setValue(&val, jsonval, QStringLiteral("float"), QStringLiteral(""));
::OpenAPI::setValue(&val, jsonval, QStringLiteral("float"), QStringLiteral(""));
(*output)->insert( itemkey, val);
}
}
@ -317,7 +317,7 @@ setValue(void* value, QJsonValue obj, QString type, QString complexType) {
for(auto itemkey : varmap.keys() ){
double val;
auto jsonval = QJsonValue::fromVariant(varmap.value(itemkey));
::Swagger::setValue(&val, jsonval, QStringLiteral("double"), QStringLiteral(""));
::OpenAPI::setValue(&val, jsonval, QStringLiteral("double"), QStringLiteral(""));
(*output)->insert( itemkey, val);
}
}
@ -333,7 +333,7 @@ setValue(void* value, QJsonValue obj, QString type, QString complexType) {
for(auto itemkey : varmap.keys() ){
QString * val = new QString();
auto jsonval = QJsonValue::fromVariant(varmap.value(itemkey));
::Swagger::setValue(&val, jsonval, QStringLiteral("QString"), QStringLiteral(""));
::OpenAPI::setValue(&val, jsonval, QStringLiteral("QString"), QStringLiteral(""));
(*output)->insert( itemkey, val);
}
}
@ -349,7 +349,7 @@ setValue(void* value, QJsonValue obj, QString type, QString complexType) {
for(auto itemkey : varmap.keys() ){
QDate * val = new QDate();
auto jsonval = QJsonValue::fromVariant(varmap.value(itemkey));
::Swagger::setValue(&val, jsonval, QStringLiteral("QDate"), QStringLiteral(""));
::OpenAPI::setValue(&val, jsonval, QStringLiteral("QDate"), QStringLiteral(""));
(*output)->insert( itemkey, val);
}
}
@ -365,7 +365,7 @@ setValue(void* value, QJsonValue obj, QString type, QString complexType) {
for(auto itemkey : varmap.keys() ){
QDateTime * val = new QDateTime();
auto jsonval = QJsonValue::fromVariant(varmap.value(itemkey));
::Swagger::setValue(&val, jsonval, QStringLiteral("QDateTime"), QStringLiteral(""));
::OpenAPI::setValue(&val, jsonval, QStringLiteral("QDateTime"), QStringLiteral(""));
(*output)->insert( itemkey, val);
}
}
@ -378,10 +378,10 @@ toJsonValue(QString name, void* value, QJsonObject& output, QString type) {
if(value == nullptr) {
return;
}
if(type.startsWith("SWG")) {
SWGObject *SWGobject = reinterpret_cast<SWGObject *>(value);
if(SWGobject != nullptr) {
QJsonObject o = SWGobject->asJsonObject();
if(type.startsWith("OAI")) {
OAIObject *OAIobject = reinterpret_cast<OAIObject *>(value);
if(OAIobject != nullptr) {
QJsonObject o = OAIobject->asJsonObject();
if(!name.isNull()) {
output.insert(name, o);
}
@ -437,11 +437,11 @@ toJsonArray(QList<void*>* value, QJsonObject& output, QString innerName, QString
return;
}
QJsonArray outputarray;
if(innerType.startsWith("SWG")){
if(innerType.startsWith("OAI")){
for(void* obj : *value) {
SWGObject *SWGobject = reinterpret_cast<SWGObject *>(obj);
if(SWGobject != nullptr) {
outputarray.append(SWGobject->asJsonObject());
OAIObject *OAIobject = reinterpret_cast<OAIObject *>(obj);
if(OAIobject != nullptr) {
outputarray.append(OAIobject->asJsonObject());
}
}
}
@ -493,69 +493,69 @@ toJsonMap(QMap<QString, void*>* value, QJsonObject& output, QString innerName, Q
return;
}
QJsonObject mapobj;
if(innerType.startsWith("SWG")){
auto items = reinterpret_cast< QMap<QString, SWGObject*> *>(value);
if(innerType.startsWith("OAI")){
auto items = reinterpret_cast< QMap<QString, OAIObject*> *>(value);
for(auto itemkey: items->keys()) {
::Swagger::toJsonValue(itemkey, items->value(itemkey),mapobj, innerType);
::OpenAPI::toJsonValue(itemkey, items->value(itemkey),mapobj, innerType);
}
}
else if(QStringLiteral("QString").compare(innerType) == 0) {
auto items = reinterpret_cast< QMap<QString, QString*> *>(value);
for(auto itemkey: items->keys()) {
::Swagger::toJsonValue(itemkey, items->value(itemkey), mapobj, innerType);
::OpenAPI::toJsonValue(itemkey, items->value(itemkey), mapobj, innerType);
}
}
else if(QStringLiteral("QDate").compare(innerType) == 0) {
auto items = reinterpret_cast< QMap<QString, QDate*> *>(value);
for(auto itemkey: items->keys()) {
::Swagger::toJsonValue(itemkey, items->value(itemkey), mapobj, innerType);
::OpenAPI::toJsonValue(itemkey, items->value(itemkey), mapobj, innerType);
}
}
else if(QStringLiteral("QDateTime").compare(innerType) == 0) {
auto items = reinterpret_cast< QMap<QString, QDateTime*> *>(value);
for(auto itemkey: items->keys()) {
::Swagger::toJsonValue(itemkey, items->value(itemkey), mapobj, innerType);
::OpenAPI::toJsonValue(itemkey, items->value(itemkey), mapobj, innerType);
}
}
else if(QStringLiteral("QByteArray").compare(innerType) == 0) {
auto items = reinterpret_cast< QMap<QString, QByteArray*> *>(value);
for(auto itemkey: items->keys()) {
::Swagger::toJsonValue(itemkey, items->value(itemkey), mapobj, innerType);
::OpenAPI::toJsonValue(itemkey, items->value(itemkey), mapobj, innerType);
}
}
else if(QStringLiteral("qint32").compare(innerType) == 0) {
auto items = reinterpret_cast< QMap<QString, qint32> *>(value);
for(auto itemkey: items->keys()) {
auto val = items->value(itemkey);
::Swagger::toJsonValue(itemkey, &val, mapobj, innerType);
::OpenAPI::toJsonValue(itemkey, &val, mapobj, innerType);
}
}
else if(QStringLiteral("qint64").compare(innerType) == 0) {
auto items = reinterpret_cast< QMap<QString, qint64> *>(value);
for(auto itemkey: items->keys()) {
auto val = items->value(itemkey);
::Swagger::toJsonValue(itemkey, &val, mapobj, innerType);
::OpenAPI::toJsonValue(itemkey, &val, mapobj, innerType);
}
}
else if(QStringLiteral("bool").compare(innerType) == 0) {
auto items = reinterpret_cast< QMap<QString, bool> *>(value);
for(auto itemkey: items->keys()) {
auto val = items->value(itemkey);
::Swagger::toJsonValue(itemkey, &val, mapobj, innerType);
::OpenAPI::toJsonValue(itemkey, &val, mapobj, innerType);
}
}
else if(QStringLiteral("float").compare(innerType) == 0) {
auto items = reinterpret_cast< QMap<QString, float> *>(value);
for(auto itemkey: items->keys()) {
auto val = items->value(itemkey);
::Swagger::toJsonValue(itemkey, &val, mapobj, innerType);
::OpenAPI::toJsonValue(itemkey, &val, mapobj, innerType);
}
}
else if(QStringLiteral("double").compare(innerType) == 0) {
auto items = reinterpret_cast< QMap<QString, double> *>(value);
for(auto itemkey: items->keys() ) {
auto val = items->value(itemkey);
::Swagger::toJsonValue(itemkey, &val, mapobj, innerType);
::OpenAPI::toJsonValue(itemkey, &val, mapobj, innerType);
}
}
output.insert(innerName, mapobj);

View File

@ -10,15 +10,15 @@
* Do not edit the class manually.
*/
#ifndef SWG_HELPERS_H
#define SWG_HELPERS_H
#ifndef OAI_HELPERS_H
#define OAI_HELPERS_H
#include <QJsonObject>
#include <QJsonValue>
#include <QList>
#include <QMap>
namespace Swagger {
namespace OpenAPI {
void setValue(void* value, QJsonValue obj, QString type, QString complexType);
void toJsonArray(QList<void*>* value, QJsonObject& output, QString innerName, QString innerType);
@ -32,4 +32,4 @@ namespace Swagger {
}
#endif // SWG_HELPERS_H
#endif // OAI_HELPERS_H

View File

@ -10,7 +10,7 @@
* Do not edit the class manually.
*/
#include "SWGHttpRequest.h"
#include "OAIHttpRequest.h"
#include <QDateTime>
#include <QUrl>
#include <QFileInfo>
@ -18,30 +18,30 @@
#include <QtGlobal>
namespace Swagger {
namespace OpenAPI {
SWGHttpRequestInput::SWGHttpRequestInput() {
OAIHttpRequestInput::OAIHttpRequestInput() {
initialize();
}
SWGHttpRequestInput::SWGHttpRequestInput(QString v_url_str, QString v_http_method) {
OAIHttpRequestInput::OAIHttpRequestInput(QString v_url_str, QString v_http_method) {
initialize();
url_str = v_url_str;
http_method = v_http_method;
}
void SWGHttpRequestInput::initialize() {
void OAIHttpRequestInput::initialize() {
var_layout = NOT_SET;
url_str = "";
http_method = "GET";
}
void SWGHttpRequestInput::add_var(QString key, QString value) {
void OAIHttpRequestInput::add_var(QString key, QString value) {
vars[key] = value;
}
void SWGHttpRequestInput::add_file(QString variable_name, QString local_filename, QString request_filename, QString mime_type) {
SWGHttpRequestInputFileElement file;
void OAIHttpRequestInput::add_file(QString variable_name, QString local_filename, QString request_filename, QString mime_type) {
OAIHttpRequestInputFileElement file;
file.variable_name = variable_name;
file.local_filename = local_filename;
file.request_filename = request_filename;
@ -50,19 +50,19 @@ void SWGHttpRequestInput::add_file(QString variable_name, QString local_filename
}
SWGHttpRequestWorker::SWGHttpRequestWorker(QObject *parent)
OAIHttpRequestWorker::OAIHttpRequestWorker(QObject *parent)
: QObject(parent), manager(nullptr)
{
qsrand(QDateTime::currentDateTime().toTime_t());
manager = new QNetworkAccessManager(this);
connect(manager, &QNetworkAccessManager::finished, this, &SWGHttpRequestWorker::on_manager_finished);
connect(manager, &QNetworkAccessManager::finished, this, &OAIHttpRequestWorker::on_manager_finished);
}
SWGHttpRequestWorker::~SWGHttpRequestWorker() {
OAIHttpRequestWorker::~OAIHttpRequestWorker() {
}
QString SWGHttpRequestWorker::http_attribute_encode(QString attribute_name, QString input) {
QString OAIHttpRequestWorker::http_attribute_encode(QString attribute_name, QString input) {
// result structure follows RFC 5987
bool need_utf_encoding = false;
QString result = "";
@ -110,7 +110,7 @@ QString SWGHttpRequestWorker::http_attribute_encode(QString attribute_name, QStr
return QString("%1=\"%2\"; %1*=utf-8''%3").arg(attribute_name, result, result_utf8);
}
void SWGHttpRequestWorker::execute(SWGHttpRequestInput *input) {
void OAIHttpRequestWorker::execute(OAIHttpRequestInput *input) {
// reset variables
@ -190,7 +190,7 @@ void SWGHttpRequestWorker::execute(SWGHttpRequestInput *input) {
}
// add files
for (QList<SWGHttpRequestInputFileElement>::iterator file_info = input->files.begin(); file_info != input->files.end(); file_info++) {
for (QList<OAIHttpRequestInputFileElement>::iterator file_info = input->files.begin(); file_info != input->files.end(); file_info++) {
QFileInfo fi(file_info->local_filename);
// ensure necessary variables are available
@ -262,10 +262,10 @@ void SWGHttpRequestWorker::execute(SWGHttpRequestInput *input) {
// prepare connection
QNetworkRequest request = QNetworkRequest(QUrl(input->url_str));
if (SWGHttpRequestWorker::sslDefaultConfiguration != nullptr) {
request.setSslConfiguration(*SWGHttpRequestWorker::sslDefaultConfiguration);
if (OAIHttpRequestWorker::sslDefaultConfiguration != nullptr) {
request.setSslConfiguration(*OAIHttpRequestWorker::sslDefaultConfiguration);
}
request.setRawHeader("User-Agent", "Swagger-Client");
request.setRawHeader("User-Agent", "OpenAPI-Generator/1.0.0/cpp-qt5");
foreach(QString key, input->headers.keys()) {
request.setRawHeader(key.toStdString().c_str(), input->headers.value(key).toStdString().c_str());
}
@ -310,7 +310,7 @@ void SWGHttpRequestWorker::execute(SWGHttpRequestInput *input) {
}
void SWGHttpRequestWorker::on_manager_finished(QNetworkReply *reply) {
void OAIHttpRequestWorker::on_manager_finished(QNetworkReply *reply) {
error_type = reply->error();
response = reply->readAll();
error_str = reply->errorString();
@ -319,7 +319,7 @@ void SWGHttpRequestWorker::on_manager_finished(QNetworkReply *reply) {
emit on_execution_finished(this);
}
QSslConfiguration* SWGHttpRequestWorker::sslDefaultConfiguration;
QSslConfiguration* OAIHttpRequestWorker::sslDefaultConfiguration;
}

View File

@ -16,8 +16,8 @@
*
**/
#ifndef SWG_HTTPREQUESTWORKER_H
#define SWG_HTTPREQUESTWORKER_H
#ifndef OAI_HTTPREQUESTWORKER_H
#define OAI_HTTPREQUESTWORKER_H
#include <QObject>
#include <QString>
@ -27,11 +27,11 @@
namespace Swagger {
namespace OpenAPI {
enum SWGHttpRequestVarLayout {NOT_SET, ADDRESS, URL_ENCODED, MULTIPART};
enum OAIHttpRequestVarLayout {NOT_SET, ADDRESS, URL_ENCODED, MULTIPART};
class SWGHttpRequestInputFileElement {
class OAIHttpRequestInputFileElement {
public:
QString variable_name;
@ -42,19 +42,19 @@ public:
};
class SWGHttpRequestInput {
class OAIHttpRequestInput {
public:
QString url_str;
QString http_method;
SWGHttpRequestVarLayout var_layout;
OAIHttpRequestVarLayout var_layout;
QMap<QString, QString> vars;
QMap<QString, QString> headers;
QList<SWGHttpRequestInputFileElement> files;
QList<OAIHttpRequestInputFileElement> files;
QByteArray request_body;
SWGHttpRequestInput();
SWGHttpRequestInput(QString v_url_str, QString v_http_method);
OAIHttpRequestInput();
OAIHttpRequestInput(QString v_url_str, QString v_http_method);
void initialize();
void add_var(QString key, QString value);
void add_file(QString variable_name, QString local_filename, QString request_filename, QString mime_type);
@ -62,7 +62,7 @@ public:
};
class SWGHttpRequestWorker : public QObject {
class OAIHttpRequestWorker : public QObject {
Q_OBJECT
public:
@ -70,15 +70,15 @@ public:
QNetworkReply::NetworkError error_type;
QString error_str;
explicit SWGHttpRequestWorker(QObject *parent = 0);
virtual ~SWGHttpRequestWorker();
explicit OAIHttpRequestWorker(QObject *parent = 0);
virtual ~OAIHttpRequestWorker();
QString http_attribute_encode(QString attribute_name, QString input);
void execute(SWGHttpRequestInput *input);
void execute(OAIHttpRequestInput *input);
static QSslConfiguration* sslDefaultConfiguration;
signals:
void on_execution_finished(SWGHttpRequestWorker *worker);
void on_execution_finished(OAIHttpRequestWorker *worker);
private:
QNetworkAccessManager *manager;
@ -90,4 +90,4 @@ private slots:
}
#endif // SWG_HTTPREQUESTWORKER_H
#endif // OAI_HTTPREQUESTWORKER_H

View File

@ -13,35 +13,35 @@
#ifndef ModelFactory_H_
#define ModelFactory_H_
#include "SWGObject.h"
#include "OAIObject.h"
#include "SWGApiResponse.h"
#include "SWGCategory.h"
#include "SWGOrder.h"
#include "SWGPet.h"
#include "SWGTag.h"
#include "SWGUser.h"
#include "OAIApiResponse.h"
#include "OAICategory.h"
#include "OAIOrder.h"
#include "OAIPet.h"
#include "OAITag.h"
#include "OAIUser.h"
namespace Swagger {
namespace OpenAPI {
inline void* create(QString type) {
if(QString("SWGApiResponse").compare(type) == 0) {
return new SWGApiResponse();
if(QString("OAIApiResponse").compare(type) == 0) {
return new OAIApiResponse();
}
if(QString("SWGCategory").compare(type) == 0) {
return new SWGCategory();
if(QString("OAICategory").compare(type) == 0) {
return new OAICategory();
}
if(QString("SWGOrder").compare(type) == 0) {
return new SWGOrder();
if(QString("OAIOrder").compare(type) == 0) {
return new OAIOrder();
}
if(QString("SWGPet").compare(type) == 0) {
return new SWGPet();
if(QString("OAIPet").compare(type) == 0) {
return new OAIPet();
}
if(QString("SWGTag").compare(type) == 0) {
return new SWGTag();
if(QString("OAITag").compare(type) == 0) {
return new OAITag();
}
if(QString("SWGUser").compare(type) == 0) {
return new SWGUser();
if(QString("OAIUser").compare(type) == 0) {
return new OAIUser();
}
return nullptr;
@ -51,7 +51,7 @@ namespace Swagger {
if(type.startsWith("QString")) {
return new QString();
}
auto val = static_cast<SWGObject*>(create(type));
auto val = static_cast<OAIObject*>(create(type));
if(val != nullptr) {
return val->fromJson(json);
}

View File

@ -10,22 +10,22 @@
* Do not edit the class manually.
*/
#ifndef _SWG_OBJECT_H_
#define _SWG_OBJECT_H_
#ifndef _OAI_OBJECT_H_
#define _OAI_OBJECT_H_
#include <QJsonObject>
namespace Swagger {
namespace OpenAPI {
class SWGObject {
class OAIObject {
public:
virtual QJsonObject asJsonObject() {
return QJsonObject();
}
virtual ~SWGObject() {}
virtual SWGObject* fromJson(QString jsonString) {
virtual ~OAIObject() {}
virtual OAIObject* fromJson(QString jsonString) {
Q_UNUSED(jsonString);
return new SWGObject();
return new OAIObject();
}
virtual void fromJsonObject(QJsonObject json) {
Q_UNUSED(json);
@ -40,4 +40,4 @@ class SWGObject {
}
#endif /* _SWG_OBJECT_H_ */
#endif /* _OAI_OBJECT_H_ */

View File

@ -11,32 +11,32 @@
*/
#include "SWGOrder.h"
#include "OAIOrder.h"
#include "SWGHelpers.h"
#include "OAIHelpers.h"
#include <QJsonDocument>
#include <QJsonArray>
#include <QObject>
#include <QDebug>
namespace Swagger {
namespace OpenAPI {
SWGOrder::SWGOrder(QString json) {
OAIOrder::OAIOrder(QString json) {
init();
this->fromJson(json);
}
SWGOrder::SWGOrder() {
OAIOrder::OAIOrder() {
init();
}
SWGOrder::~SWGOrder() {
OAIOrder::~OAIOrder() {
this->cleanup();
}
void
SWGOrder::init() {
OAIOrder::init() {
id = 0L;
m_id_isSet = false;
pet_id = 0L;
@ -52,7 +52,7 @@ SWGOrder::init() {
}
void
SWGOrder::cleanup() {
OAIOrder::cleanup() {
@ -65,8 +65,8 @@ SWGOrder::cleanup() {
}
SWGOrder*
SWGOrder::fromJson(QString json) {
OAIOrder*
OAIOrder::fromJson(QString json) {
QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
@ -75,23 +75,23 @@ SWGOrder::fromJson(QString json) {
}
void
SWGOrder::fromJsonObject(QJsonObject pJson) {
::Swagger::setValue(&id, pJson["id"], "qint64", "");
OAIOrder::fromJsonObject(QJsonObject pJson) {
::OpenAPI::setValue(&id, pJson["id"], "qint64", "");
::Swagger::setValue(&pet_id, pJson["petId"], "qint64", "");
::OpenAPI::setValue(&pet_id, pJson["petId"], "qint64", "");
::Swagger::setValue(&quantity, pJson["quantity"], "qint32", "");
::OpenAPI::setValue(&quantity, pJson["quantity"], "qint32", "");
::Swagger::setValue(&ship_date, pJson["shipDate"], "QDateTime", "QDateTime");
::OpenAPI::setValue(&ship_date, pJson["shipDate"], "QDateTime", "QDateTime");
::Swagger::setValue(&status, pJson["status"], "QString", "QString");
::OpenAPI::setValue(&status, pJson["status"], "QString", "QString");
::Swagger::setValue(&complete, pJson["complete"], "bool", "");
::OpenAPI::setValue(&complete, pJson["complete"], "bool", "");
}
QString
SWGOrder::asJson ()
OAIOrder::asJson ()
{
QJsonObject obj = this->asJsonObject();
QJsonDocument doc(obj);
@ -100,7 +100,7 @@ SWGOrder::asJson ()
}
QJsonObject
SWGOrder::asJsonObject() {
OAIOrder::asJsonObject() {
QJsonObject obj;
if(m_id_isSet){
obj.insert("id", QJsonValue(id));
@ -125,68 +125,68 @@ SWGOrder::asJsonObject() {
}
qint64
SWGOrder::getId() {
OAIOrder::getId() {
return id;
}
void
SWGOrder::setId(qint64 id) {
OAIOrder::setId(qint64 id) {
this->id = id;
this->m_id_isSet = true;
}
qint64
SWGOrder::getPetId() {
OAIOrder::getPetId() {
return pet_id;
}
void
SWGOrder::setPetId(qint64 pet_id) {
OAIOrder::setPetId(qint64 pet_id) {
this->pet_id = pet_id;
this->m_pet_id_isSet = true;
}
qint32
SWGOrder::getQuantity() {
OAIOrder::getQuantity() {
return quantity;
}
void
SWGOrder::setQuantity(qint32 quantity) {
OAIOrder::setQuantity(qint32 quantity) {
this->quantity = quantity;
this->m_quantity_isSet = true;
}
QDateTime*
SWGOrder::getShipDate() {
OAIOrder::getShipDate() {
return ship_date;
}
void
SWGOrder::setShipDate(QDateTime* ship_date) {
OAIOrder::setShipDate(QDateTime* ship_date) {
this->ship_date = ship_date;
this->m_ship_date_isSet = true;
}
QString*
SWGOrder::getStatus() {
OAIOrder::getStatus() {
return status;
}
void
SWGOrder::setStatus(QString* status) {
OAIOrder::setStatus(QString* status) {
this->status = status;
this->m_status_isSet = true;
}
bool
SWGOrder::isComplete() {
OAIOrder::isComplete() {
return complete;
}
void
SWGOrder::setComplete(bool complete) {
OAIOrder::setComplete(bool complete) {
this->complete = complete;
this->m_complete_isSet = true;
}
bool
SWGOrder::isSet(){
OAIOrder::isSet(){
bool isObjectUpdated = false;
do{
if(m_id_isSet){ isObjectUpdated = true; break;}

View File

@ -11,13 +11,13 @@
*/
/*
* SWGOrder.h
* OAIOrder.h
*
* An order for a pets from the pet store
*/
#ifndef SWGOrder_H_
#define SWGOrder_H_
#ifndef OAIOrder_H_
#define OAIOrder_H_
#include <QJsonObject>
@ -25,22 +25,22 @@
#include <QDateTime>
#include <QString>
#include "SWGObject.h"
#include "OAIObject.h"
namespace Swagger {
namespace OpenAPI {
class SWGOrder: public SWGObject {
class OAIOrder: public OAIObject {
public:
SWGOrder();
SWGOrder(QString json);
~SWGOrder();
OAIOrder();
OAIOrder(QString json);
~OAIOrder();
void init();
void cleanup();
QString asJson () override;
QJsonObject asJsonObject() override;
void fromJsonObject(QJsonObject json) override;
SWGOrder* fromJson(QString jsonString) override;
OAIOrder* fromJson(QString jsonString) override;
qint64 getId();
void setId(qint64 id);
@ -86,4 +86,4 @@ private:
}
#endif /* SWGOrder_H_ */
#endif /* OAIOrder_H_ */

View File

@ -11,48 +11,48 @@
*/
#include "SWGPet.h"
#include "OAIPet.h"
#include "SWGHelpers.h"
#include "OAIHelpers.h"
#include <QJsonDocument>
#include <QJsonArray>
#include <QObject>
#include <QDebug>
namespace Swagger {
namespace OpenAPI {
SWGPet::SWGPet(QString json) {
OAIPet::OAIPet(QString json) {
init();
this->fromJson(json);
}
SWGPet::SWGPet() {
OAIPet::OAIPet() {
init();
}
SWGPet::~SWGPet() {
OAIPet::~OAIPet() {
this->cleanup();
}
void
SWGPet::init() {
OAIPet::init() {
id = 0L;
m_id_isSet = false;
category = new SWGCategory();
category = new OAICategory();
m_category_isSet = false;
name = new QString("");
m_name_isSet = false;
photo_urls = new QList<QString*>();
m_photo_urls_isSet = false;
tags = new QList<SWGTag*>();
tags = new QList<OAITag*>();
m_tags_isSet = false;
status = new QString("");
m_status_isSet = false;
}
void
SWGPet::cleanup() {
OAIPet::cleanup() {
if(category != nullptr) {
delete category;
@ -79,8 +79,8 @@ SWGPet::cleanup() {
}
}
SWGPet*
SWGPet::fromJson(QString json) {
OAIPet*
OAIPet::fromJson(QString json) {
QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
@ -89,23 +89,23 @@ SWGPet::fromJson(QString json) {
}
void
SWGPet::fromJsonObject(QJsonObject pJson) {
::Swagger::setValue(&id, pJson["id"], "qint64", "");
OAIPet::fromJsonObject(QJsonObject pJson) {
::OpenAPI::setValue(&id, pJson["id"], "qint64", "");
::Swagger::setValue(&category, pJson["category"], "SWGCategory", "SWGCategory");
::OpenAPI::setValue(&category, pJson["category"], "OAICategory", "OAICategory");
::Swagger::setValue(&name, pJson["name"], "QString", "QString");
::OpenAPI::setValue(&name, pJson["name"], "QString", "QString");
::Swagger::setValue(&photo_urls, pJson["photoUrls"], "QList", "QString");
::OpenAPI::setValue(&photo_urls, pJson["photoUrls"], "QList", "QString");
::Swagger::setValue(&tags, pJson["tags"], "QList", "SWGTag");
::Swagger::setValue(&status, pJson["status"], "QString", "QString");
::OpenAPI::setValue(&tags, pJson["tags"], "QList", "OAITag");
::OpenAPI::setValue(&status, pJson["status"], "QString", "QString");
}
QString
SWGPet::asJson ()
OAIPet::asJson ()
{
QJsonObject obj = this->asJsonObject();
QJsonDocument doc(obj);
@ -114,13 +114,13 @@ SWGPet::asJson ()
}
QJsonObject
SWGPet::asJsonObject() {
OAIPet::asJsonObject() {
QJsonObject obj;
if(m_id_isSet){
obj.insert("id", QJsonValue(id));
}
if((category != nullptr) && (category->isSet())){
toJsonValue(QString("category"), category, obj, QString("SWGCategory"));
toJsonValue(QString("category"), category, obj, QString("OAICategory"));
}
if(name != nullptr && *name != QString("")){
toJsonValue(QString("name"), name, obj, QString("QString"));
@ -129,7 +129,7 @@ SWGPet::asJsonObject() {
toJsonArray((QList<void*>*)photo_urls, obj, "photoUrls", "QString");
}
if(tags->size() > 0){
toJsonArray((QList<void*>*)tags, obj, "tags", "SWGTag");
toJsonArray((QList<void*>*)tags, obj, "tags", "OAITag");
}
if(status != nullptr && *status != QString("")){
toJsonValue(QString("status"), status, obj, QString("QString"));
@ -139,68 +139,68 @@ SWGPet::asJsonObject() {
}
qint64
SWGPet::getId() {
OAIPet::getId() {
return id;
}
void
SWGPet::setId(qint64 id) {
OAIPet::setId(qint64 id) {
this->id = id;
this->m_id_isSet = true;
}
SWGCategory*
SWGPet::getCategory() {
OAICategory*
OAIPet::getCategory() {
return category;
}
void
SWGPet::setCategory(SWGCategory* category) {
OAIPet::setCategory(OAICategory* category) {
this->category = category;
this->m_category_isSet = true;
}
QString*
SWGPet::getName() {
OAIPet::getName() {
return name;
}
void
SWGPet::setName(QString* name) {
OAIPet::setName(QString* name) {
this->name = name;
this->m_name_isSet = true;
}
QList<QString*>*
SWGPet::getPhotoUrls() {
OAIPet::getPhotoUrls() {
return photo_urls;
}
void
SWGPet::setPhotoUrls(QList<QString*>* photo_urls) {
OAIPet::setPhotoUrls(QList<QString*>* photo_urls) {
this->photo_urls = photo_urls;
this->m_photo_urls_isSet = true;
}
QList<SWGTag*>*
SWGPet::getTags() {
QList<OAITag*>*
OAIPet::getTags() {
return tags;
}
void
SWGPet::setTags(QList<SWGTag*>* tags) {
OAIPet::setTags(QList<OAITag*>* tags) {
this->tags = tags;
this->m_tags_isSet = true;
}
QString*
SWGPet::getStatus() {
OAIPet::getStatus() {
return status;
}
void
SWGPet::setStatus(QString* status) {
OAIPet::setStatus(QString* status) {
this->status = status;
this->m_status_isSet = true;
}
bool
SWGPet::isSet(){
OAIPet::isSet(){
bool isObjectUpdated = false;
do{
if(m_id_isSet){ isObjectUpdated = true; break;}

View File

@ -11,44 +11,44 @@
*/
/*
* SWGPet.h
* OAIPet.h
*
* A pet for sale in the pet store
*/
#ifndef SWGPet_H_
#define SWGPet_H_
#ifndef OAIPet_H_
#define OAIPet_H_
#include <QJsonObject>
#include "SWGCategory.h"
#include "SWGTag.h"
#include "OAICategory.h"
#include "OAITag.h"
#include <QList>
#include <QString>
#include "SWGObject.h"
#include "OAIObject.h"
namespace Swagger {
namespace OpenAPI {
class SWGPet: public SWGObject {
class OAIPet: public OAIObject {
public:
SWGPet();
SWGPet(QString json);
~SWGPet();
OAIPet();
OAIPet(QString json);
~OAIPet();
void init();
void cleanup();
QString asJson () override;
QJsonObject asJsonObject() override;
void fromJsonObject(QJsonObject json) override;
SWGPet* fromJson(QString jsonString) override;
OAIPet* fromJson(QString jsonString) override;
qint64 getId();
void setId(qint64 id);
SWGCategory* getCategory();
void setCategory(SWGCategory* category);
OAICategory* getCategory();
void setCategory(OAICategory* category);
QString* getName();
void setName(QString* name);
@ -56,8 +56,8 @@ public:
QList<QString*>* getPhotoUrls();
void setPhotoUrls(QList<QString*>* photo_urls);
QList<SWGTag*>* getTags();
void setTags(QList<SWGTag*>* tags);
QList<OAITag*>* getTags();
void setTags(QList<OAITag*>* tags);
QString* getStatus();
void setStatus(QString* status);
@ -69,7 +69,7 @@ private:
qint64 id;
bool m_id_isSet;
SWGCategory* category;
OAICategory* category;
bool m_category_isSet;
QString* name;
@ -78,7 +78,7 @@ private:
QList<QString*>* photo_urls;
bool m_photo_urls_isSet;
QList<SWGTag*>* tags;
QList<OAITag*>* tags;
bool m_tags_isSet;
QString* status;
@ -88,4 +88,4 @@ private:
}
#endif /* SWGPet_H_ */
#endif /* OAIPet_H_ */

View File

@ -10,38 +10,38 @@
* Do not edit the class manually.
*/
#include "SWGPetApi.h"
#include "SWGHelpers.h"
#include "SWGModelFactory.h"
#include "SWGQObjectWrapper.h"
#include "OAIPetApi.h"
#include "OAIHelpers.h"
#include "OAIModelFactory.h"
#include "OAIQObjectWrapper.h"
#include <QJsonArray>
#include <QJsonDocument>
namespace Swagger {
namespace OpenAPI {
SWGPetApi::SWGPetApi() {}
OAIPetApi::OAIPetApi() {}
SWGPetApi::~SWGPetApi() {}
OAIPetApi::~OAIPetApi() {}
SWGPetApi::SWGPetApi(QString host, QString basePath) {
OAIPetApi::OAIPetApi(QString host, QString basePath) {
this->host = host;
this->basePath = basePath;
}
void
SWGPetApi::addPet(std::shared_ptr<SWGSWGPet>& swg_pet) {
OAIPetApi::addPet(std::shared_ptr<OAIOAIPet>& oai_pet) {
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/pet");
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker();
SWGHttpRequestInput input(fullPath, "POST");
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
OAIHttpRequestInput input(fullPath, "POST");
QString output = swg_pet.asJson();
QString output = oai_pet.asJson();
input.request_body.append(output);
@ -51,15 +51,15 @@ SWGPetApi::addPet(std::shared_ptr<SWGSWGPet>& swg_pet) {
}
connect(worker,
&SWGHttpRequestWorker::on_execution_finished,
&OAIHttpRequestWorker::on_execution_finished,
this,
&SWGPetApi::addPetCallback);
&OAIPetApi::addPetCallback);
worker->execute(&input);
}
void
SWGPetApi::addPetCallback(SWGHttpRequestWorker * worker) {
OAIPetApi::addPetCallback(OAIHttpRequestWorker * worker) {
QString msg;
QString error_str = worker->error_str;
QNetworkReply::NetworkError error_type = worker->error_type;
@ -82,7 +82,7 @@ SWGPetApi::addPetCallback(SWGHttpRequestWorker * worker) {
}
void
SWGPetApi::deletePet(qint64 pet_id, QString* api_key) {
OAIPetApi::deletePet(qint64 pet_id, QString* api_key) {
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/pet/{petId}");
@ -90,8 +90,8 @@ SWGPetApi::deletePet(qint64 pet_id, QString* api_key) {
fullPath.replace(pet_idPathParam, stringValue(pet_id));
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker();
SWGHttpRequestInput input(fullPath, "DELETE");
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
OAIHttpRequestInput input(fullPath, "DELETE");
@ -105,15 +105,15 @@ SWGPetApi::deletePet(qint64 pet_id, QString* api_key) {
}
connect(worker,
&SWGHttpRequestWorker::on_execution_finished,
&OAIHttpRequestWorker::on_execution_finished,
this,
&SWGPetApi::deletePetCallback);
&OAIPetApi::deletePetCallback);
worker->execute(&input);
}
void
SWGPetApi::deletePetCallback(SWGHttpRequestWorker * worker) {
OAIPetApi::deletePetCallback(OAIHttpRequestWorker * worker) {
QString msg;
QString error_str = worker->error_str;
QNetworkReply::NetworkError error_type = worker->error_type;
@ -136,7 +136,7 @@ SWGPetApi::deletePetCallback(SWGHttpRequestWorker * worker) {
}
void
SWGPetApi::findPetsByStatus(QList<QString*>* status) {
OAIPetApi::findPetsByStatus(QList<QString*>* status) {
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/pet/findByStatus");
@ -184,8 +184,8 @@ SWGPetApi::findPetsByStatus(QList<QString*>* status) {
}
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker();
SWGHttpRequestInput input(fullPath, "GET");
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
OAIHttpRequestInput input(fullPath, "GET");
@ -196,15 +196,15 @@ SWGPetApi::findPetsByStatus(QList<QString*>* status) {
}
connect(worker,
&SWGHttpRequestWorker::on_execution_finished,
&OAIHttpRequestWorker::on_execution_finished,
this,
&SWGPetApi::findPetsByStatusCallback);
&OAIPetApi::findPetsByStatusCallback);
worker->execute(&input);
}
void
SWGPetApi::findPetsByStatusCallback(SWGHttpRequestWorker * worker) {
OAIPetApi::findPetsByStatusCallback(OAIHttpRequestWorker * worker) {
QString msg;
QString error_str = worker->error_str;
QNetworkReply::NetworkError error_type = worker->error_type;
@ -216,19 +216,19 @@ SWGPetApi::findPetsByStatusCallback(SWGHttpRequestWorker * worker) {
msg = "Error: " + worker->error_str;
}
QList<SWGPet*>* output = new QList<SWGPet*>();
QList<OAIPet*>* output = new QList<OAIPet*>();
QString json(worker->response);
QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonArray jsonArray = doc.array();
auto wrapper = new SWGQObjectWrapper<QList<SWGPet*>*> (output);
auto wrapper = new OAIQObjectWrapper<QList<OAIPet*>*> (output);
wrapper->deleteLater();
foreach(QJsonValue obj, jsonArray) {
SWGPet* o = new SWGPet();
OAIPet* o = new OAIPet();
QJsonObject jv = obj.toObject();
QJsonObject * ptr = (QJsonObject*)&jv;
o->fromJsonObject(*ptr);
auto objwrapper = new SWGQObjectWrapper<SWGPet*> (o);
auto objwrapper = new OAIQObjectWrapper<OAIPet*> (o);
objwrapper->deleteLater();
output->append(o);
}
@ -243,7 +243,7 @@ SWGPetApi::findPetsByStatusCallback(SWGHttpRequestWorker * worker) {
}
void
SWGPetApi::findPetsByTags(QList<QString*>* tags) {
OAIPetApi::findPetsByTags(QList<QString*>* tags) {
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/pet/findByTags");
@ -291,8 +291,8 @@ SWGPetApi::findPetsByTags(QList<QString*>* tags) {
}
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker();
SWGHttpRequestInput input(fullPath, "GET");
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
OAIHttpRequestInput input(fullPath, "GET");
@ -303,15 +303,15 @@ SWGPetApi::findPetsByTags(QList<QString*>* tags) {
}
connect(worker,
&SWGHttpRequestWorker::on_execution_finished,
&OAIHttpRequestWorker::on_execution_finished,
this,
&SWGPetApi::findPetsByTagsCallback);
&OAIPetApi::findPetsByTagsCallback);
worker->execute(&input);
}
void
SWGPetApi::findPetsByTagsCallback(SWGHttpRequestWorker * worker) {
OAIPetApi::findPetsByTagsCallback(OAIHttpRequestWorker * worker) {
QString msg;
QString error_str = worker->error_str;
QNetworkReply::NetworkError error_type = worker->error_type;
@ -323,19 +323,19 @@ SWGPetApi::findPetsByTagsCallback(SWGHttpRequestWorker * worker) {
msg = "Error: " + worker->error_str;
}
QList<SWGPet*>* output = new QList<SWGPet*>();
QList<OAIPet*>* output = new QList<OAIPet*>();
QString json(worker->response);
QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonArray jsonArray = doc.array();
auto wrapper = new SWGQObjectWrapper<QList<SWGPet*>*> (output);
auto wrapper = new OAIQObjectWrapper<QList<OAIPet*>*> (output);
wrapper->deleteLater();
foreach(QJsonValue obj, jsonArray) {
SWGPet* o = new SWGPet();
OAIPet* o = new OAIPet();
QJsonObject jv = obj.toObject();
QJsonObject * ptr = (QJsonObject*)&jv;
o->fromJsonObject(*ptr);
auto objwrapper = new SWGQObjectWrapper<SWGPet*> (o);
auto objwrapper = new OAIQObjectWrapper<OAIPet*> (o);
objwrapper->deleteLater();
output->append(o);
}
@ -350,7 +350,7 @@ SWGPetApi::findPetsByTagsCallback(SWGHttpRequestWorker * worker) {
}
void
SWGPetApi::getPetById(qint64 pet_id) {
OAIPetApi::getPetById(qint64 pet_id) {
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/pet/{petId}");
@ -358,8 +358,8 @@ SWGPetApi::getPetById(qint64 pet_id) {
fullPath.replace(pet_idPathParam, stringValue(pet_id));
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker();
SWGHttpRequestInput input(fullPath, "GET");
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
OAIHttpRequestInput input(fullPath, "GET");
@ -370,15 +370,15 @@ SWGPetApi::getPetById(qint64 pet_id) {
}
connect(worker,
&SWGHttpRequestWorker::on_execution_finished,
&OAIHttpRequestWorker::on_execution_finished,
this,
&SWGPetApi::getPetByIdCallback);
&OAIPetApi::getPetByIdCallback);
worker->execute(&input);
}
void
SWGPetApi::getPetByIdCallback(SWGHttpRequestWorker * worker) {
OAIPetApi::getPetByIdCallback(OAIHttpRequestWorker * worker) {
QString msg;
QString error_str = worker->error_str;
QNetworkReply::NetworkError error_type = worker->error_type;
@ -391,8 +391,8 @@ SWGPetApi::getPetByIdCallback(SWGHttpRequestWorker * worker) {
}
QString json(worker->response);
SWGPet* output = static_cast<SWGPet*>(create(json, QString("SWGPet")));
auto wrapper = new SWGQObjectWrapper<SWGPet*> (output);
OAIPet* output = static_cast<OAIPet*>(create(json, QString("OAIPet")));
auto wrapper = new OAIQObjectWrapper<OAIPet*> (output);
wrapper->deleteLater();
worker->deleteLater();
@ -405,18 +405,18 @@ SWGPetApi::getPetByIdCallback(SWGHttpRequestWorker * worker) {
}
void
SWGPetApi::updatePet(std::shared_ptr<SWGSWGPet>& swg_pet) {
OAIPetApi::updatePet(std::shared_ptr<OAIOAIPet>& oai_pet) {
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/pet");
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker();
SWGHttpRequestInput input(fullPath, "PUT");
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
OAIHttpRequestInput input(fullPath, "PUT");
QString output = swg_pet.asJson();
QString output = oai_pet.asJson();
input.request_body.append(output);
@ -426,15 +426,15 @@ SWGPetApi::updatePet(std::shared_ptr<SWGSWGPet>& swg_pet) {
}
connect(worker,
&SWGHttpRequestWorker::on_execution_finished,
&OAIHttpRequestWorker::on_execution_finished,
this,
&SWGPetApi::updatePetCallback);
&OAIPetApi::updatePetCallback);
worker->execute(&input);
}
void
SWGPetApi::updatePetCallback(SWGHttpRequestWorker * worker) {
OAIPetApi::updatePetCallback(OAIHttpRequestWorker * worker) {
QString msg;
QString error_str = worker->error_str;
QNetworkReply::NetworkError error_type = worker->error_type;
@ -457,7 +457,7 @@ SWGPetApi::updatePetCallback(SWGHttpRequestWorker * worker) {
}
void
SWGPetApi::updatePetWithForm(qint64 pet_id, QString* name, QString* status) {
OAIPetApi::updatePetWithForm(qint64 pet_id, QString* name, QString* status) {
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/pet/{petId}");
@ -465,8 +465,8 @@ SWGPetApi::updatePetWithForm(qint64 pet_id, QString* name, QString* status) {
fullPath.replace(pet_idPathParam, stringValue(pet_id));
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker();
SWGHttpRequestInput input(fullPath, "POST");
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
OAIHttpRequestInput input(fullPath, "POST");
if (name != nullptr) {
input.add_var("name", *name);
@ -483,15 +483,15 @@ SWGPetApi::updatePetWithForm(qint64 pet_id, QString* name, QString* status) {
}
connect(worker,
&SWGHttpRequestWorker::on_execution_finished,
&OAIHttpRequestWorker::on_execution_finished,
this,
&SWGPetApi::updatePetWithFormCallback);
&OAIPetApi::updatePetWithFormCallback);
worker->execute(&input);
}
void
SWGPetApi::updatePetWithFormCallback(SWGHttpRequestWorker * worker) {
OAIPetApi::updatePetWithFormCallback(OAIHttpRequestWorker * worker) {
QString msg;
QString error_str = worker->error_str;
QNetworkReply::NetworkError error_type = worker->error_type;
@ -514,7 +514,7 @@ SWGPetApi::updatePetWithFormCallback(SWGHttpRequestWorker * worker) {
}
void
SWGPetApi::uploadFile(qint64 pet_id, QString* additional_metadata, SWGHttpRequestInputFileElement* file) {
OAIPetApi::uploadFile(qint64 pet_id, QString* additional_metadata, OAIHttpRequestInputFileElement* file) {
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/pet/{petId}/uploadImage");
@ -522,8 +522,8 @@ SWGPetApi::uploadFile(qint64 pet_id, QString* additional_metadata, SWGHttpReques
fullPath.replace(pet_idPathParam, stringValue(pet_id));
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker();
SWGHttpRequestInput input(fullPath, "POST");
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
OAIHttpRequestInput input(fullPath, "POST");
if (additional_metadata != nullptr) {
input.add_var("additionalMetadata", *additional_metadata);
@ -540,15 +540,15 @@ SWGPetApi::uploadFile(qint64 pet_id, QString* additional_metadata, SWGHttpReques
}
connect(worker,
&SWGHttpRequestWorker::on_execution_finished,
&OAIHttpRequestWorker::on_execution_finished,
this,
&SWGPetApi::uploadFileCallback);
&OAIPetApi::uploadFileCallback);
worker->execute(&input);
}
void
SWGPetApi::uploadFileCallback(SWGHttpRequestWorker * worker) {
OAIPetApi::uploadFileCallback(OAIHttpRequestWorker * worker) {
QString msg;
QString error_str = worker->error_str;
QNetworkReply::NetworkError error_type = worker->error_type;
@ -561,8 +561,8 @@ SWGPetApi::uploadFileCallback(SWGHttpRequestWorker * worker) {
}
QString json(worker->response);
SWGApiResponse* output = static_cast<SWGApiResponse*>(create(json, QString("SWGApiResponse")));
auto wrapper = new SWGQObjectWrapper<SWGApiResponse*> (output);
OAIApiResponse* output = static_cast<OAIApiResponse*>(create(json, QString("OAIApiResponse")));
auto wrapper = new OAIQObjectWrapper<OAIApiResponse*> (output);
wrapper->deleteLater();
worker->deleteLater();

View File

@ -10,78 +10,78 @@
* Do not edit the class manually.
*/
#ifndef _SWG_SWGPetApi_H_
#define _SWG_SWGPetApi_H_
#ifndef _OAI_OAIPetApi_H_
#define _OAI_OAIPetApi_H_
#include "SWGHttpRequest.h"
#include "OAIHttpRequest.h"
#include "OAIApiResponse.h"
#include "OAIHttpRequest.h"
#include "OAIPet.h"
#include <QString>
#include "SWGApiResponse.h"
#include "SWGHttpRequest.h"
#include "SWGPet.h"
#include <QObject>
namespace Swagger {
namespace OpenAPI {
class SWGPetApi: public QObject {
class OAIPetApi: public QObject {
Q_OBJECT
public:
SWGPetApi();
SWGPetApi(QString host, QString basePath);
~SWGPetApi();
OAIPetApi();
OAIPetApi(QString host, QString basePath);
~OAIPetApi();
QString host;
QString basePath;
QMap<QString, QString> defaultHeaders;
void addPet(std::shared_ptr<SWGSWGPet>& swg_pet);
void addPet(std::shared_ptr<OAIOAIPet>& oai_pet);
void deletePet(qint64 pet_id, QString* api_key);
void findPetsByStatus(QList<QString*>* status);
void findPetsByTags(QList<QString*>* tags);
void getPetById(qint64 pet_id);
void updatePet(std::shared_ptr<SWGSWGPet>& swg_pet);
void updatePet(std::shared_ptr<OAIOAIPet>& oai_pet);
void updatePetWithForm(qint64 pet_id, QString* name, QString* status);
void uploadFile(qint64 pet_id, QString* additional_metadata, SWGHttpRequestInputFileElement* file);
void uploadFile(qint64 pet_id, QString* additional_metadata, OAIHttpRequestInputFileElement* file);
private:
void addPetCallback (SWGHttpRequestWorker * worker);
void deletePetCallback (SWGHttpRequestWorker * worker);
void findPetsByStatusCallback (SWGHttpRequestWorker * worker);
void findPetsByTagsCallback (SWGHttpRequestWorker * worker);
void getPetByIdCallback (SWGHttpRequestWorker * worker);
void updatePetCallback (SWGHttpRequestWorker * worker);
void updatePetWithFormCallback (SWGHttpRequestWorker * worker);
void uploadFileCallback (SWGHttpRequestWorker * worker);
void addPetCallback (OAIHttpRequestWorker * worker);
void deletePetCallback (OAIHttpRequestWorker * worker);
void findPetsByStatusCallback (OAIHttpRequestWorker * worker);
void findPetsByTagsCallback (OAIHttpRequestWorker * worker);
void getPetByIdCallback (OAIHttpRequestWorker * worker);
void updatePetCallback (OAIHttpRequestWorker * worker);
void updatePetWithFormCallback (OAIHttpRequestWorker * worker);
void uploadFileCallback (OAIHttpRequestWorker * worker);
signals:
void addPetSignal();
void deletePetSignal();
void findPetsByStatusSignal(QList<SWGPet*>* summary);
void findPetsByTagsSignal(QList<SWGPet*>* summary);
void getPetByIdSignal(SWGPet* summary);
void findPetsByStatusSignal(QList<OAIPet*>* summary);
void findPetsByTagsSignal(QList<OAIPet*>* summary);
void getPetByIdSignal(OAIPet* summary);
void updatePetSignal();
void updatePetWithFormSignal();
void uploadFileSignal(SWGApiResponse* summary);
void uploadFileSignal(OAIApiResponse* summary);
void addPetSignalE(QNetworkReply::NetworkError error_type, QString& error_str);
void deletePetSignalE(QNetworkReply::NetworkError error_type, QString& error_str);
void findPetsByStatusSignalE(QList<SWGPet*>* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void findPetsByTagsSignalE(QList<SWGPet*>* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void getPetByIdSignalE(SWGPet* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void findPetsByStatusSignalE(QList<OAIPet*>* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void findPetsByTagsSignalE(QList<OAIPet*>* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void getPetByIdSignalE(OAIPet* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void updatePetSignalE(QNetworkReply::NetworkError error_type, QString& error_str);
void updatePetWithFormSignalE(QNetworkReply::NetworkError error_type, QString& error_str);
void uploadFileSignalE(SWGApiResponse* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void uploadFileSignalE(OAIApiResponse* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void addPetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void deletePetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void findPetsByStatusSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void findPetsByTagsSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void getPetByIdSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void updatePetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void updatePetWithFormSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void uploadFileSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void addPetSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void deletePetSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void findPetsByStatusSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void findPetsByTagsSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void getPetByIdSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void updatePetSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void updatePetWithFormSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void uploadFileSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
};

View File

@ -10,20 +10,20 @@
* Do not edit the class manually.
*/
#ifndef SWG_QOBJECT_WRAPPER_H
#define SWG_QOBJECT_WRAPPER_H
#ifndef OAI_QOBJECT_WRAPPER_H
#define OAI_QOBJECT_WRAPPER_H
#include <QObject>
namespace Swagger {
namespace OpenAPI {
template <typename ObjectPtrT>
class SWGQObjectWrapper : public QObject {
class OAIQObjectWrapper : public QObject {
public:
SWGQObjectWrapper(ObjectPtrT ptr){
OAIQObjectWrapper(ObjectPtrT ptr){
data = ptr;
}
~SWGQObjectWrapper(){
~OAIQObjectWrapper(){
delete data;
}
private :
@ -32,4 +32,4 @@ namespace Swagger {
}
#endif // SWG_QOBJECT_WRAPPER_H
#endif // OAI_QOBJECT_WRAPPER_H

View File

@ -10,27 +10,27 @@
* Do not edit the class manually.
*/
#include "SWGStoreApi.h"
#include "SWGHelpers.h"
#include "SWGModelFactory.h"
#include "SWGQObjectWrapper.h"
#include "OAIStoreApi.h"
#include "OAIHelpers.h"
#include "OAIModelFactory.h"
#include "OAIQObjectWrapper.h"
#include <QJsonArray>
#include <QJsonDocument>
namespace Swagger {
namespace OpenAPI {
SWGStoreApi::SWGStoreApi() {}
OAIStoreApi::OAIStoreApi() {}
SWGStoreApi::~SWGStoreApi() {}
OAIStoreApi::~OAIStoreApi() {}
SWGStoreApi::SWGStoreApi(QString host, QString basePath) {
OAIStoreApi::OAIStoreApi(QString host, QString basePath) {
this->host = host;
this->basePath = basePath;
}
void
SWGStoreApi::deleteOrder(QString* order_id) {
OAIStoreApi::deleteOrder(QString* order_id) {
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/store/order/{orderId}");
@ -38,8 +38,8 @@ SWGStoreApi::deleteOrder(QString* order_id) {
fullPath.replace(order_idPathParam, stringValue(order_id));
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker();
SWGHttpRequestInput input(fullPath, "DELETE");
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
OAIHttpRequestInput input(fullPath, "DELETE");
@ -50,15 +50,15 @@ SWGStoreApi::deleteOrder(QString* order_id) {
}
connect(worker,
&SWGHttpRequestWorker::on_execution_finished,
&OAIHttpRequestWorker::on_execution_finished,
this,
&SWGStoreApi::deleteOrderCallback);
&OAIStoreApi::deleteOrderCallback);
worker->execute(&input);
}
void
SWGStoreApi::deleteOrderCallback(SWGHttpRequestWorker * worker) {
OAIStoreApi::deleteOrderCallback(OAIHttpRequestWorker * worker) {
QString msg;
QString error_str = worker->error_str;
QNetworkReply::NetworkError error_type = worker->error_type;
@ -81,14 +81,14 @@ SWGStoreApi::deleteOrderCallback(SWGHttpRequestWorker * worker) {
}
void
SWGStoreApi::getInventory() {
OAIStoreApi::getInventory() {
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/store/inventory");
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker();
SWGHttpRequestInput input(fullPath, "GET");
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
OAIHttpRequestInput input(fullPath, "GET");
@ -99,15 +99,15 @@ SWGStoreApi::getInventory() {
}
connect(worker,
&SWGHttpRequestWorker::on_execution_finished,
&OAIHttpRequestWorker::on_execution_finished,
this,
&SWGStoreApi::getInventoryCallback);
&OAIStoreApi::getInventoryCallback);
worker->execute(&input);
}
void
SWGStoreApi::getInventoryCallback(SWGHttpRequestWorker * worker) {
OAIStoreApi::getInventoryCallback(OAIHttpRequestWorker * worker) {
QString msg;
QString error_str = worker->error_str;
QNetworkReply::NetworkError error_type = worker->error_type;
@ -141,7 +141,7 @@ SWGStoreApi::getInventoryCallback(SWGHttpRequestWorker * worker) {
}
void
SWGStoreApi::getOrderById(qint64 order_id) {
OAIStoreApi::getOrderById(qint64 order_id) {
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/store/order/{orderId}");
@ -149,8 +149,8 @@ SWGStoreApi::getOrderById(qint64 order_id) {
fullPath.replace(order_idPathParam, stringValue(order_id));
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker();
SWGHttpRequestInput input(fullPath, "GET");
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
OAIHttpRequestInput input(fullPath, "GET");
@ -161,15 +161,15 @@ SWGStoreApi::getOrderById(qint64 order_id) {
}
connect(worker,
&SWGHttpRequestWorker::on_execution_finished,
&OAIHttpRequestWorker::on_execution_finished,
this,
&SWGStoreApi::getOrderByIdCallback);
&OAIStoreApi::getOrderByIdCallback);
worker->execute(&input);
}
void
SWGStoreApi::getOrderByIdCallback(SWGHttpRequestWorker * worker) {
OAIStoreApi::getOrderByIdCallback(OAIHttpRequestWorker * worker) {
QString msg;
QString error_str = worker->error_str;
QNetworkReply::NetworkError error_type = worker->error_type;
@ -182,8 +182,8 @@ SWGStoreApi::getOrderByIdCallback(SWGHttpRequestWorker * worker) {
}
QString json(worker->response);
SWGOrder* output = static_cast<SWGOrder*>(create(json, QString("SWGOrder")));
auto wrapper = new SWGQObjectWrapper<SWGOrder*> (output);
OAIOrder* output = static_cast<OAIOrder*>(create(json, QString("OAIOrder")));
auto wrapper = new OAIQObjectWrapper<OAIOrder*> (output);
wrapper->deleteLater();
worker->deleteLater();
@ -196,18 +196,18 @@ SWGStoreApi::getOrderByIdCallback(SWGHttpRequestWorker * worker) {
}
void
SWGStoreApi::placeOrder(std::shared_ptr<SWGSWGOrder>& swg_order) {
OAIStoreApi::placeOrder(std::shared_ptr<OAIOAIOrder>& oai_order) {
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/store/order");
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker();
SWGHttpRequestInput input(fullPath, "POST");
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
OAIHttpRequestInput input(fullPath, "POST");
QString output = swg_order.asJson();
QString output = oai_order.asJson();
input.request_body.append(output);
@ -217,15 +217,15 @@ SWGStoreApi::placeOrder(std::shared_ptr<SWGSWGOrder>& swg_order) {
}
connect(worker,
&SWGHttpRequestWorker::on_execution_finished,
&OAIHttpRequestWorker::on_execution_finished,
this,
&SWGStoreApi::placeOrderCallback);
&OAIStoreApi::placeOrderCallback);
worker->execute(&input);
}
void
SWGStoreApi::placeOrderCallback(SWGHttpRequestWorker * worker) {
OAIStoreApi::placeOrderCallback(OAIHttpRequestWorker * worker) {
QString msg;
QString error_str = worker->error_str;
QNetworkReply::NetworkError error_type = worker->error_type;
@ -238,8 +238,8 @@ SWGStoreApi::placeOrderCallback(SWGHttpRequestWorker * worker) {
}
QString json(worker->response);
SWGOrder* output = static_cast<SWGOrder*>(create(json, QString("SWGOrder")));
auto wrapper = new SWGQObjectWrapper<SWGOrder*> (output);
OAIOrder* output = static_cast<OAIOrder*>(create(json, QString("OAIOrder")));
auto wrapper = new OAIQObjectWrapper<OAIOrder*> (output);
wrapper->deleteLater();
worker->deleteLater();

View File

@ -10,26 +10,26 @@
* Do not edit the class manually.
*/
#ifndef _SWG_SWGStoreApi_H_
#define _SWG_SWGStoreApi_H_
#ifndef _OAI_OAIStoreApi_H_
#define _OAI_OAIStoreApi_H_
#include "SWGHttpRequest.h"
#include "OAIHttpRequest.h"
#include "OAIOrder.h"
#include <QMap>
#include <QString>
#include "SWGOrder.h"
#include <QObject>
namespace Swagger {
namespace OpenAPI {
class SWGStoreApi: public QObject {
class OAIStoreApi: public QObject {
Q_OBJECT
public:
SWGStoreApi();
SWGStoreApi(QString host, QString basePath);
~SWGStoreApi();
OAIStoreApi();
OAIStoreApi(QString host, QString basePath);
~OAIStoreApi();
QString host;
QString basePath;
@ -38,29 +38,29 @@ public:
void deleteOrder(QString* order_id);
void getInventory();
void getOrderById(qint64 order_id);
void placeOrder(std::shared_ptr<SWGSWGOrder>& swg_order);
void placeOrder(std::shared_ptr<OAIOAIOrder>& oai_order);
private:
void deleteOrderCallback (SWGHttpRequestWorker * worker);
void getInventoryCallback (SWGHttpRequestWorker * worker);
void getOrderByIdCallback (SWGHttpRequestWorker * worker);
void placeOrderCallback (SWGHttpRequestWorker * worker);
void deleteOrderCallback (OAIHttpRequestWorker * worker);
void getInventoryCallback (OAIHttpRequestWorker * worker);
void getOrderByIdCallback (OAIHttpRequestWorker * worker);
void placeOrderCallback (OAIHttpRequestWorker * worker);
signals:
void deleteOrderSignal();
void getInventorySignal(QMap<QString, qint32>* summary);
void getOrderByIdSignal(SWGOrder* summary);
void placeOrderSignal(SWGOrder* summary);
void getOrderByIdSignal(OAIOrder* summary);
void placeOrderSignal(OAIOrder* summary);
void deleteOrderSignalE(QNetworkReply::NetworkError error_type, QString& error_str);
void getInventorySignalE(QMap<QString, qint32>* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void getOrderByIdSignalE(SWGOrder* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void placeOrderSignalE(SWGOrder* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void getOrderByIdSignalE(OAIOrder* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void placeOrderSignalE(OAIOrder* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void deleteOrderSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void getInventorySignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void getOrderByIdSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void placeOrderSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void deleteOrderSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void getInventorySignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void getOrderByIdSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void placeOrderSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
};

View File

@ -11,32 +11,32 @@
*/
#include "SWGTag.h"
#include "OAITag.h"
#include "SWGHelpers.h"
#include "OAIHelpers.h"
#include <QJsonDocument>
#include <QJsonArray>
#include <QObject>
#include <QDebug>
namespace Swagger {
namespace OpenAPI {
SWGTag::SWGTag(QString json) {
OAITag::OAITag(QString json) {
init();
this->fromJson(json);
}
SWGTag::SWGTag() {
OAITag::OAITag() {
init();
}
SWGTag::~SWGTag() {
OAITag::~OAITag() {
this->cleanup();
}
void
SWGTag::init() {
OAITag::init() {
id = 0L;
m_id_isSet = false;
name = new QString("");
@ -44,15 +44,15 @@ SWGTag::init() {
}
void
SWGTag::cleanup() {
OAITag::cleanup() {
if(name != nullptr) {
delete name;
}
}
SWGTag*
SWGTag::fromJson(QString json) {
OAITag*
OAITag::fromJson(QString json) {
QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
@ -61,15 +61,15 @@ SWGTag::fromJson(QString json) {
}
void
SWGTag::fromJsonObject(QJsonObject pJson) {
::Swagger::setValue(&id, pJson["id"], "qint64", "");
OAITag::fromJsonObject(QJsonObject pJson) {
::OpenAPI::setValue(&id, pJson["id"], "qint64", "");
::Swagger::setValue(&name, pJson["name"], "QString", "QString");
::OpenAPI::setValue(&name, pJson["name"], "QString", "QString");
}
QString
SWGTag::asJson ()
OAITag::asJson ()
{
QJsonObject obj = this->asJsonObject();
QJsonDocument doc(obj);
@ -78,7 +78,7 @@ SWGTag::asJson ()
}
QJsonObject
SWGTag::asJsonObject() {
OAITag::asJsonObject() {
QJsonObject obj;
if(m_id_isSet){
obj.insert("id", QJsonValue(id));
@ -91,28 +91,28 @@ SWGTag::asJsonObject() {
}
qint64
SWGTag::getId() {
OAITag::getId() {
return id;
}
void
SWGTag::setId(qint64 id) {
OAITag::setId(qint64 id) {
this->id = id;
this->m_id_isSet = true;
}
QString*
SWGTag::getName() {
OAITag::getName() {
return name;
}
void
SWGTag::setName(QString* name) {
OAITag::setName(QString* name) {
this->name = name;
this->m_name_isSet = true;
}
bool
SWGTag::isSet(){
OAITag::isSet(){
bool isObjectUpdated = false;
do{
if(m_id_isSet){ isObjectUpdated = true; break;}

View File

@ -11,35 +11,35 @@
*/
/*
* SWGTag.h
* OAITag.h
*
* A tag for a pet
*/
#ifndef SWGTag_H_
#define SWGTag_H_
#ifndef OAITag_H_
#define OAITag_H_
#include <QJsonObject>
#include <QString>
#include "SWGObject.h"
#include "OAIObject.h"
namespace Swagger {
namespace OpenAPI {
class SWGTag: public SWGObject {
class OAITag: public OAIObject {
public:
SWGTag();
SWGTag(QString json);
~SWGTag();
OAITag();
OAITag(QString json);
~OAITag();
void init();
void cleanup();
QString asJson () override;
QJsonObject asJsonObject() override;
void fromJsonObject(QJsonObject json) override;
SWGTag* fromJson(QString jsonString) override;
OAITag* fromJson(QString jsonString) override;
qint64 getId();
void setId(qint64 id);
@ -61,4 +61,4 @@ private:
}
#endif /* SWGTag_H_ */
#endif /* OAITag_H_ */

View File

@ -11,32 +11,32 @@
*/
#include "SWGUser.h"
#include "OAIUser.h"
#include "SWGHelpers.h"
#include "OAIHelpers.h"
#include <QJsonDocument>
#include <QJsonArray>
#include <QObject>
#include <QDebug>
namespace Swagger {
namespace OpenAPI {
SWGUser::SWGUser(QString json) {
OAIUser::OAIUser(QString json) {
init();
this->fromJson(json);
}
SWGUser::SWGUser() {
OAIUser::OAIUser() {
init();
}
SWGUser::~SWGUser() {
OAIUser::~OAIUser() {
this->cleanup();
}
void
SWGUser::init() {
OAIUser::init() {
id = 0L;
m_id_isSet = false;
username = new QString("");
@ -56,7 +56,7 @@ SWGUser::init() {
}
void
SWGUser::cleanup() {
OAIUser::cleanup() {
if(username != nullptr) {
delete username;
@ -79,8 +79,8 @@ SWGUser::cleanup() {
}
SWGUser*
SWGUser::fromJson(QString json) {
OAIUser*
OAIUser::fromJson(QString json) {
QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
@ -89,27 +89,27 @@ SWGUser::fromJson(QString json) {
}
void
SWGUser::fromJsonObject(QJsonObject pJson) {
::Swagger::setValue(&id, pJson["id"], "qint64", "");
OAIUser::fromJsonObject(QJsonObject pJson) {
::OpenAPI::setValue(&id, pJson["id"], "qint64", "");
::Swagger::setValue(&username, pJson["username"], "QString", "QString");
::OpenAPI::setValue(&username, pJson["username"], "QString", "QString");
::Swagger::setValue(&first_name, pJson["firstName"], "QString", "QString");
::OpenAPI::setValue(&first_name, pJson["firstName"], "QString", "QString");
::Swagger::setValue(&last_name, pJson["lastName"], "QString", "QString");
::OpenAPI::setValue(&last_name, pJson["lastName"], "QString", "QString");
::Swagger::setValue(&email, pJson["email"], "QString", "QString");
::OpenAPI::setValue(&email, pJson["email"], "QString", "QString");
::Swagger::setValue(&password, pJson["password"], "QString", "QString");
::OpenAPI::setValue(&password, pJson["password"], "QString", "QString");
::Swagger::setValue(&phone, pJson["phone"], "QString", "QString");
::OpenAPI::setValue(&phone, pJson["phone"], "QString", "QString");
::Swagger::setValue(&user_status, pJson["userStatus"], "qint32", "");
::OpenAPI::setValue(&user_status, pJson["userStatus"], "qint32", "");
}
QString
SWGUser::asJson ()
OAIUser::asJson ()
{
QJsonObject obj = this->asJsonObject();
QJsonDocument doc(obj);
@ -118,7 +118,7 @@ SWGUser::asJson ()
}
QJsonObject
SWGUser::asJsonObject() {
OAIUser::asJsonObject() {
QJsonObject obj;
if(m_id_isSet){
obj.insert("id", QJsonValue(id));
@ -149,88 +149,88 @@ SWGUser::asJsonObject() {
}
qint64
SWGUser::getId() {
OAIUser::getId() {
return id;
}
void
SWGUser::setId(qint64 id) {
OAIUser::setId(qint64 id) {
this->id = id;
this->m_id_isSet = true;
}
QString*
SWGUser::getUsername() {
OAIUser::getUsername() {
return username;
}
void
SWGUser::setUsername(QString* username) {
OAIUser::setUsername(QString* username) {
this->username = username;
this->m_username_isSet = true;
}
QString*
SWGUser::getFirstName() {
OAIUser::getFirstName() {
return first_name;
}
void
SWGUser::setFirstName(QString* first_name) {
OAIUser::setFirstName(QString* first_name) {
this->first_name = first_name;
this->m_first_name_isSet = true;
}
QString*
SWGUser::getLastName() {
OAIUser::getLastName() {
return last_name;
}
void
SWGUser::setLastName(QString* last_name) {
OAIUser::setLastName(QString* last_name) {
this->last_name = last_name;
this->m_last_name_isSet = true;
}
QString*
SWGUser::getEmail() {
OAIUser::getEmail() {
return email;
}
void
SWGUser::setEmail(QString* email) {
OAIUser::setEmail(QString* email) {
this->email = email;
this->m_email_isSet = true;
}
QString*
SWGUser::getPassword() {
OAIUser::getPassword() {
return password;
}
void
SWGUser::setPassword(QString* password) {
OAIUser::setPassword(QString* password) {
this->password = password;
this->m_password_isSet = true;
}
QString*
SWGUser::getPhone() {
OAIUser::getPhone() {
return phone;
}
void
SWGUser::setPhone(QString* phone) {
OAIUser::setPhone(QString* phone) {
this->phone = phone;
this->m_phone_isSet = true;
}
qint32
SWGUser::getUserStatus() {
OAIUser::getUserStatus() {
return user_status;
}
void
SWGUser::setUserStatus(qint32 user_status) {
OAIUser::setUserStatus(qint32 user_status) {
this->user_status = user_status;
this->m_user_status_isSet = true;
}
bool
SWGUser::isSet(){
OAIUser::isSet(){
bool isObjectUpdated = false;
do{
if(m_id_isSet){ isObjectUpdated = true; break;}

View File

@ -11,35 +11,35 @@
*/
/*
* SWGUser.h
* OAIUser.h
*
* A User who is purchasing from the pet store
*/
#ifndef SWGUser_H_
#define SWGUser_H_
#ifndef OAIUser_H_
#define OAIUser_H_
#include <QJsonObject>
#include <QString>
#include "SWGObject.h"
#include "OAIObject.h"
namespace Swagger {
namespace OpenAPI {
class SWGUser: public SWGObject {
class OAIUser: public OAIObject {
public:
SWGUser();
SWGUser(QString json);
~SWGUser();
OAIUser();
OAIUser(QString json);
~OAIUser();
void init();
void cleanup();
QString asJson () override;
QJsonObject asJsonObject() override;
void fromJsonObject(QJsonObject json) override;
SWGUser* fromJson(QString jsonString) override;
OAIUser* fromJson(QString jsonString) override;
qint64 getId();
void setId(qint64 id);
@ -97,4 +97,4 @@ private:
}
#endif /* SWGUser_H_ */
#endif /* OAIUser_H_ */

View File

@ -10,38 +10,38 @@
* Do not edit the class manually.
*/
#include "SWGUserApi.h"
#include "SWGHelpers.h"
#include "SWGModelFactory.h"
#include "SWGQObjectWrapper.h"
#include "OAIUserApi.h"
#include "OAIHelpers.h"
#include "OAIModelFactory.h"
#include "OAIQObjectWrapper.h"
#include <QJsonArray>
#include <QJsonDocument>
namespace Swagger {
namespace OpenAPI {
SWGUserApi::SWGUserApi() {}
OAIUserApi::OAIUserApi() {}
SWGUserApi::~SWGUserApi() {}
OAIUserApi::~OAIUserApi() {}
SWGUserApi::SWGUserApi(QString host, QString basePath) {
OAIUserApi::OAIUserApi(QString host, QString basePath) {
this->host = host;
this->basePath = basePath;
}
void
SWGUserApi::createUser(std::shared_ptr<SWGSWGUser>& swg_user) {
OAIUserApi::createUser(std::shared_ptr<OAIOAIUser>& oai_user) {
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/user");
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker();
SWGHttpRequestInput input(fullPath, "POST");
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
OAIHttpRequestInput input(fullPath, "POST");
QString output = swg_user.asJson();
QString output = oai_user.asJson();
input.request_body.append(output);
@ -51,15 +51,15 @@ SWGUserApi::createUser(std::shared_ptr<SWGSWGUser>& swg_user) {
}
connect(worker,
&SWGHttpRequestWorker::on_execution_finished,
&OAIHttpRequestWorker::on_execution_finished,
this,
&SWGUserApi::createUserCallback);
&OAIUserApi::createUserCallback);
worker->execute(&input);
}
void
SWGUserApi::createUserCallback(SWGHttpRequestWorker * worker) {
OAIUserApi::createUserCallback(OAIHttpRequestWorker * worker) {
QString msg;
QString error_str = worker->error_str;
QNetworkReply::NetworkError error_type = worker->error_type;
@ -82,20 +82,20 @@ SWGUserApi::createUserCallback(SWGHttpRequestWorker * worker) {
}
void
SWGUserApi::createUsersWithArrayInput(QList<SWGUser*>*& swg_user) {
OAIUserApi::createUsersWithArrayInput(QList<OAIUser*>*& oai_user) {
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/user/createWithArray");
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker();
SWGHttpRequestInput input(fullPath, "POST");
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
OAIHttpRequestInput input(fullPath, "POST");
QJsonObject swg_user_jobj;
toJsonArray((QList<void*>*)swg_user, swg_user_jobj, QString("body"), QString("SWGUser*"));
QJsonObject oai_user_jobj;
toJsonArray((QList<void*>*)oai_user, oai_user_jobj, QString("body"), QString("OAIUser*"));
QJsonDocument doc(swg_user_jobj);
QJsonDocument doc(oai_user_jobj);
QByteArray bytes = doc.toJson();
input.request_body.append(bytes);
@ -107,15 +107,15 @@ SWGUserApi::createUsersWithArrayInput(QList<SWGUser*>*& swg_user) {
}
connect(worker,
&SWGHttpRequestWorker::on_execution_finished,
&OAIHttpRequestWorker::on_execution_finished,
this,
&SWGUserApi::createUsersWithArrayInputCallback);
&OAIUserApi::createUsersWithArrayInputCallback);
worker->execute(&input);
}
void
SWGUserApi::createUsersWithArrayInputCallback(SWGHttpRequestWorker * worker) {
OAIUserApi::createUsersWithArrayInputCallback(OAIHttpRequestWorker * worker) {
QString msg;
QString error_str = worker->error_str;
QNetworkReply::NetworkError error_type = worker->error_type;
@ -138,20 +138,20 @@ SWGUserApi::createUsersWithArrayInputCallback(SWGHttpRequestWorker * worker) {
}
void
SWGUserApi::createUsersWithListInput(QList<SWGUser*>*& swg_user) {
OAIUserApi::createUsersWithListInput(QList<OAIUser*>*& oai_user) {
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/user/createWithList");
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker();
SWGHttpRequestInput input(fullPath, "POST");
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
OAIHttpRequestInput input(fullPath, "POST");
QJsonObject swg_user_jobj;
toJsonArray((QList<void*>*)swg_user, swg_user_jobj, QString("body"), QString("SWGUser*"));
QJsonObject oai_user_jobj;
toJsonArray((QList<void*>*)oai_user, oai_user_jobj, QString("body"), QString("OAIUser*"));
QJsonDocument doc(swg_user_jobj);
QJsonDocument doc(oai_user_jobj);
QByteArray bytes = doc.toJson();
input.request_body.append(bytes);
@ -163,15 +163,15 @@ SWGUserApi::createUsersWithListInput(QList<SWGUser*>*& swg_user) {
}
connect(worker,
&SWGHttpRequestWorker::on_execution_finished,
&OAIHttpRequestWorker::on_execution_finished,
this,
&SWGUserApi::createUsersWithListInputCallback);
&OAIUserApi::createUsersWithListInputCallback);
worker->execute(&input);
}
void
SWGUserApi::createUsersWithListInputCallback(SWGHttpRequestWorker * worker) {
OAIUserApi::createUsersWithListInputCallback(OAIHttpRequestWorker * worker) {
QString msg;
QString error_str = worker->error_str;
QNetworkReply::NetworkError error_type = worker->error_type;
@ -194,7 +194,7 @@ SWGUserApi::createUsersWithListInputCallback(SWGHttpRequestWorker * worker) {
}
void
SWGUserApi::deleteUser(QString* username) {
OAIUserApi::deleteUser(QString* username) {
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/user/{username}");
@ -202,8 +202,8 @@ SWGUserApi::deleteUser(QString* username) {
fullPath.replace(usernamePathParam, stringValue(username));
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker();
SWGHttpRequestInput input(fullPath, "DELETE");
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
OAIHttpRequestInput input(fullPath, "DELETE");
@ -214,15 +214,15 @@ SWGUserApi::deleteUser(QString* username) {
}
connect(worker,
&SWGHttpRequestWorker::on_execution_finished,
&OAIHttpRequestWorker::on_execution_finished,
this,
&SWGUserApi::deleteUserCallback);
&OAIUserApi::deleteUserCallback);
worker->execute(&input);
}
void
SWGUserApi::deleteUserCallback(SWGHttpRequestWorker * worker) {
OAIUserApi::deleteUserCallback(OAIHttpRequestWorker * worker) {
QString msg;
QString error_str = worker->error_str;
QNetworkReply::NetworkError error_type = worker->error_type;
@ -245,7 +245,7 @@ SWGUserApi::deleteUserCallback(SWGHttpRequestWorker * worker) {
}
void
SWGUserApi::getUserByName(QString* username) {
OAIUserApi::getUserByName(QString* username) {
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/user/{username}");
@ -253,8 +253,8 @@ SWGUserApi::getUserByName(QString* username) {
fullPath.replace(usernamePathParam, stringValue(username));
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker();
SWGHttpRequestInput input(fullPath, "GET");
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
OAIHttpRequestInput input(fullPath, "GET");
@ -265,15 +265,15 @@ SWGUserApi::getUserByName(QString* username) {
}
connect(worker,
&SWGHttpRequestWorker::on_execution_finished,
&OAIHttpRequestWorker::on_execution_finished,
this,
&SWGUserApi::getUserByNameCallback);
&OAIUserApi::getUserByNameCallback);
worker->execute(&input);
}
void
SWGUserApi::getUserByNameCallback(SWGHttpRequestWorker * worker) {
OAIUserApi::getUserByNameCallback(OAIHttpRequestWorker * worker) {
QString msg;
QString error_str = worker->error_str;
QNetworkReply::NetworkError error_type = worker->error_type;
@ -286,8 +286,8 @@ SWGUserApi::getUserByNameCallback(SWGHttpRequestWorker * worker) {
}
QString json(worker->response);
SWGUser* output = static_cast<SWGUser*>(create(json, QString("SWGUser")));
auto wrapper = new SWGQObjectWrapper<SWGUser*> (output);
OAIUser* output = static_cast<OAIUser*>(create(json, QString("OAIUser")));
auto wrapper = new OAIQObjectWrapper<OAIUser*> (output);
wrapper->deleteLater();
worker->deleteLater();
@ -300,7 +300,7 @@ SWGUserApi::getUserByNameCallback(SWGHttpRequestWorker * worker) {
}
void
SWGUserApi::loginUser(QString* username, QString* password) {
OAIUserApi::loginUser(QString* username, QString* password) {
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/user/login");
@ -322,8 +322,8 @@ SWGUserApi::loginUser(QString* username, QString* password) {
.append(QUrl::toPercentEncoding(stringValue(password)));
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker();
SWGHttpRequestInput input(fullPath, "GET");
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
OAIHttpRequestInput input(fullPath, "GET");
@ -334,15 +334,15 @@ SWGUserApi::loginUser(QString* username, QString* password) {
}
connect(worker,
&SWGHttpRequestWorker::on_execution_finished,
&OAIHttpRequestWorker::on_execution_finished,
this,
&SWGUserApi::loginUserCallback);
&OAIUserApi::loginUserCallback);
worker->execute(&input);
}
void
SWGUserApi::loginUserCallback(SWGHttpRequestWorker * worker) {
OAIUserApi::loginUserCallback(OAIHttpRequestWorker * worker) {
QString msg;
QString error_str = worker->error_str;
QNetworkReply::NetworkError error_type = worker->error_type;
@ -356,7 +356,7 @@ SWGUserApi::loginUserCallback(SWGHttpRequestWorker * worker) {
QString json(worker->response);
QString* output = static_cast<QString*>(create(json, QString("QString")));
auto wrapper = new SWGQObjectWrapper<QString*> (output);
auto wrapper = new OAIQObjectWrapper<QString*> (output);
wrapper->deleteLater();
worker->deleteLater();
@ -369,14 +369,14 @@ SWGUserApi::loginUserCallback(SWGHttpRequestWorker * worker) {
}
void
SWGUserApi::logoutUser() {
OAIUserApi::logoutUser() {
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/user/logout");
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker();
SWGHttpRequestInput input(fullPath, "GET");
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
OAIHttpRequestInput input(fullPath, "GET");
@ -387,15 +387,15 @@ SWGUserApi::logoutUser() {
}
connect(worker,
&SWGHttpRequestWorker::on_execution_finished,
&OAIHttpRequestWorker::on_execution_finished,
this,
&SWGUserApi::logoutUserCallback);
&OAIUserApi::logoutUserCallback);
worker->execute(&input);
}
void
SWGUserApi::logoutUserCallback(SWGHttpRequestWorker * worker) {
OAIUserApi::logoutUserCallback(OAIHttpRequestWorker * worker) {
QString msg;
QString error_str = worker->error_str;
QNetworkReply::NetworkError error_type = worker->error_type;
@ -418,7 +418,7 @@ SWGUserApi::logoutUserCallback(SWGHttpRequestWorker * worker) {
}
void
SWGUserApi::updateUser(QString* username, std::shared_ptr<SWGSWGUser>& swg_user) {
OAIUserApi::updateUser(QString* username, std::shared_ptr<OAIOAIUser>& oai_user) {
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/user/{username}");
@ -426,12 +426,12 @@ SWGUserApi::updateUser(QString* username, std::shared_ptr<SWGSWGUser>& swg_user)
fullPath.replace(usernamePathParam, stringValue(username));
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker();
SWGHttpRequestInput input(fullPath, "PUT");
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
OAIHttpRequestInput input(fullPath, "PUT");
QString output = swg_user.asJson();
QString output = oai_user.asJson();
input.request_body.append(output);
@ -441,15 +441,15 @@ SWGUserApi::updateUser(QString* username, std::shared_ptr<SWGSWGUser>& swg_user)
}
connect(worker,
&SWGHttpRequestWorker::on_execution_finished,
&OAIHttpRequestWorker::on_execution_finished,
this,
&SWGUserApi::updateUserCallback);
&OAIUserApi::updateUserCallback);
worker->execute(&input);
}
void
SWGUserApi::updateUserCallback(SWGHttpRequestWorker * worker) {
OAIUserApi::updateUserCallback(OAIHttpRequestWorker * worker) {
QString msg;
QString error_str = worker->error_str;
QNetworkReply::NetworkError error_type = worker->error_type;

View File

@ -10,56 +10,56 @@
* Do not edit the class manually.
*/
#ifndef _SWG_SWGUserApi_H_
#define _SWG_SWGUserApi_H_
#ifndef _OAI_OAIUserApi_H_
#define _OAI_OAIUserApi_H_
#include "SWGHttpRequest.h"
#include "OAIHttpRequest.h"
#include "OAIUser.h"
#include <QList>
#include <QString>
#include "SWGUser.h"
#include <QObject>
namespace Swagger {
namespace OpenAPI {
class SWGUserApi: public QObject {
class OAIUserApi: public QObject {
Q_OBJECT
public:
SWGUserApi();
SWGUserApi(QString host, QString basePath);
~SWGUserApi();
OAIUserApi();
OAIUserApi(QString host, QString basePath);
~OAIUserApi();
QString host;
QString basePath;
QMap<QString, QString> defaultHeaders;
void createUser(std::shared_ptr<SWGSWGUser>& swg_user);
void createUsersWithArrayInput(QList<SWGUser*>*& swg_user);
void createUsersWithListInput(QList<SWGUser*>*& swg_user);
void createUser(std::shared_ptr<OAIOAIUser>& oai_user);
void createUsersWithArrayInput(QList<OAIUser*>*& oai_user);
void createUsersWithListInput(QList<OAIUser*>*& oai_user);
void deleteUser(QString* username);
void getUserByName(QString* username);
void loginUser(QString* username, QString* password);
void logoutUser();
void updateUser(QString* username, std::shared_ptr<SWGSWGUser>& swg_user);
void updateUser(QString* username, std::shared_ptr<OAIOAIUser>& oai_user);
private:
void createUserCallback (SWGHttpRequestWorker * worker);
void createUsersWithArrayInputCallback (SWGHttpRequestWorker * worker);
void createUsersWithListInputCallback (SWGHttpRequestWorker * worker);
void deleteUserCallback (SWGHttpRequestWorker * worker);
void getUserByNameCallback (SWGHttpRequestWorker * worker);
void loginUserCallback (SWGHttpRequestWorker * worker);
void logoutUserCallback (SWGHttpRequestWorker * worker);
void updateUserCallback (SWGHttpRequestWorker * worker);
void createUserCallback (OAIHttpRequestWorker * worker);
void createUsersWithArrayInputCallback (OAIHttpRequestWorker * worker);
void createUsersWithListInputCallback (OAIHttpRequestWorker * worker);
void deleteUserCallback (OAIHttpRequestWorker * worker);
void getUserByNameCallback (OAIHttpRequestWorker * worker);
void loginUserCallback (OAIHttpRequestWorker * worker);
void logoutUserCallback (OAIHttpRequestWorker * worker);
void updateUserCallback (OAIHttpRequestWorker * worker);
signals:
void createUserSignal();
void createUsersWithArrayInputSignal();
void createUsersWithListInputSignal();
void deleteUserSignal();
void getUserByNameSignal(SWGUser* summary);
void getUserByNameSignal(OAIUser* summary);
void loginUserSignal(QString* summary);
void logoutUserSignal();
void updateUserSignal();
@ -68,19 +68,19 @@ signals:
void createUsersWithArrayInputSignalE(QNetworkReply::NetworkError error_type, QString& error_str);
void createUsersWithListInputSignalE(QNetworkReply::NetworkError error_type, QString& error_str);
void deleteUserSignalE(QNetworkReply::NetworkError error_type, QString& error_str);
void getUserByNameSignalE(SWGUser* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void getUserByNameSignalE(OAIUser* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void loginUserSignalE(QString* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void logoutUserSignalE(QNetworkReply::NetworkError error_type, QString& error_str);
void updateUserSignalE(QNetworkReply::NetworkError error_type, QString& error_str);
void createUserSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void createUsersWithArrayInputSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void createUsersWithListInputSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void deleteUserSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void getUserByNameSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void loginUserSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void logoutUserSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void updateUserSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void createUserSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void createUsersWithArrayInputSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void createUsersWithListInputSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void deleteUserSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void getUserByNameSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void loginUserSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void logoutUserSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void updateUserSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
};

View File

@ -2,36 +2,36 @@ QT += network
HEADERS += \
# Models
$${PWD}/SWGApiResponse.h \
$${PWD}/SWGCategory.h \
$${PWD}/SWGOrder.h \
$${PWD}/SWGPet.h \
$${PWD}/SWGTag.h \
$${PWD}/SWGUser.h \
$${PWD}/OAIApiResponse.h \
$${PWD}/OAICategory.h \
$${PWD}/OAIOrder.h \
$${PWD}/OAIPet.h \
$${PWD}/OAITag.h \
$${PWD}/OAIUser.h \
# APIs
$${PWD}/SWGPetApi.h \
$${PWD}/SWGStoreApi.h \
$${PWD}/SWGUserApi.h \
$${PWD}/OAIPetApi.h \
$${PWD}/OAIStoreApi.h \
$${PWD}/OAIUserApi.h \
# Others
$${PWD}/SWGHelpers.h \
$${PWD}/SWGHttpRequest.h \
$${PWD}/SWGModelFactory.h \
$${PWD}/SWGObject.h \
$${PWD}/SWGQObjectWrapper.h
$${PWD}/OAIHelpers.h \
$${PWD}/OAIHttpRequest.h \
$${PWD}/OAIModelFactory.h \
$${PWD}/OAIObject.h \
$${PWD}/OAIQObjectWrapper.h
SOURCES += \
# Models
$${PWD}/SWGApiResponse.cpp \
$${PWD}/SWGCategory.cpp \
$${PWD}/SWGOrder.cpp \
$${PWD}/SWGPet.cpp \
$${PWD}/SWGTag.cpp \
$${PWD}/SWGUser.cpp \
$${PWD}/OAIApiResponse.cpp \
$${PWD}/OAICategory.cpp \
$${PWD}/OAIOrder.cpp \
$${PWD}/OAIPet.cpp \
$${PWD}/OAITag.cpp \
$${PWD}/OAIUser.cpp \
# APIs
$${PWD}/SWGPetApi.cpp \
$${PWD}/SWGStoreApi.cpp \
$${PWD}/SWGUserApi.cpp \
$${PWD}/OAIPetApi.cpp \
$${PWD}/OAIStoreApi.cpp \
$${PWD}/OAIUserApi.cpp \
# Others
$${PWD}/SWGHelpers.cpp \
$${PWD}/SWGHttpRequest.cpp
$${PWD}/OAIHelpers.cpp \
$${PWD}/OAIHttpRequest.cpp

View File

@ -15,7 +15,7 @@
#include "pistache/router.h"
#include "PetApiImpl.h"
using namespace io::swagger::server::api;
using namespace org::openapitools::server::api;
int main() {
Pistache::Address addr(Pistache::Ipv4::any(), Pistache::Port(8080));

View File

@ -4,7 +4,6 @@
This API Server was generated by the [OpenAPI Generator](https://openapi-generator.tech) project.
It uses the [Pistache](https://github.com/oktal/pistache) Framework.
## Files organization
The Pistache C++ REST server generator creates three folders:
- `api`: This folder contains the handlers for each method specified in the OpenAPI definition. Every handler extracts
@ -45,6 +44,5 @@ cd build
put it under the model folder
## Namespaces
io::swagger::server::api
io::swagger::server::model
org.openapitools.server.api
org.openapitools.server.model

View File

@ -15,7 +15,7 @@
#include "pistache/router.h"
#include "StoreApiImpl.h"
using namespace io::swagger::server::api;
using namespace org::openapitools::server::api;
int main() {
Pistache::Address addr(Pistache::Ipv4::any(), Pistache::Port(8080));

View File

@ -15,7 +15,7 @@
#include "pistache/router.h"
#include "UserApiImpl.h"
using namespace io::swagger::server::api;
using namespace org::openapitools::server::api;
int main() {
Pistache::Address addr(Pistache::Ipv4::any(), Pistache::Port(8080));

View File

@ -12,12 +12,12 @@
#include "PetApi.h"
namespace io {
namespace swagger {
namespace org {
namespace openapitools {
namespace server {
namespace api {
using namespace io::swagger::server::model;
using namespace org::openapitools::server::model;
PetApi::PetApi(Pistache::Address addr)
: httpEndpoint(std::make_shared<Pistache::Http::Endpoint>(addr))

View File

@ -28,12 +28,12 @@
#include "Pet.h"
#include <string>
namespace io {
namespace swagger {
namespace org {
namespace openapitools {
namespace server {
namespace api {
using namespace io::swagger::server::model;
using namespace org::openapitools::server::model;
class PetApi {
public:

View File

@ -12,12 +12,12 @@
#include "StoreApi.h"
namespace io {
namespace swagger {
namespace org {
namespace openapitools {
namespace server {
namespace api {
using namespace io::swagger::server::model;
using namespace org::openapitools::server::model;
StoreApi::StoreApi(Pistache::Address addr)
: httpEndpoint(std::make_shared<Pistache::Http::Endpoint>(addr))

View File

@ -28,12 +28,12 @@
#include <map>
#include <string>
namespace io {
namespace swagger {
namespace org {
namespace openapitools {
namespace server {
namespace api {
using namespace io::swagger::server::model;
using namespace org::openapitools::server::model;
class StoreApi {
public:

View File

@ -12,12 +12,12 @@
#include "UserApi.h"
namespace io {
namespace swagger {
namespace org {
namespace openapitools {
namespace server {
namespace api {
using namespace io::swagger::server::model;
using namespace org::openapitools::server::model;
UserApi::UserApi(Pistache::Address addr)
: httpEndpoint(std::make_shared<Pistache::Http::Endpoint>(addr))

View File

@ -28,12 +28,12 @@
#include <string>
#include <vector>
namespace io {
namespace swagger {
namespace org {
namespace openapitools {
namespace server {
namespace api {
using namespace io::swagger::server::model;
using namespace org::openapitools::server::model;
class UserApi {
public:

View File

@ -12,12 +12,12 @@
#include "PetApiImpl.h"
namespace io {
namespace swagger {
namespace org {
namespace openapitools {
namespace server {
namespace api {
using namespace io::swagger::server::model;
using namespace org::openapitools::server::model;
PetApiImpl::PetApiImpl(Pistache::Address addr)
: PetApi(addr)

View File

@ -31,14 +31,14 @@
#include "Pet.h"
#include <string>
namespace io {
namespace swagger {
namespace org {
namespace openapitools {
namespace server {
namespace api {
using namespace io::swagger::server::model;
using namespace org::openapitools::server::model;
class PetApiImpl : public io::swagger::server::api::PetApi {
class PetApiImpl : public org::openapitools::server::api::PetApi {
public:
PetApiImpl(Pistache::Address addr);
~PetApiImpl() { };

View File

@ -12,12 +12,12 @@
#include "StoreApiImpl.h"
namespace io {
namespace swagger {
namespace org {
namespace openapitools {
namespace server {
namespace api {
using namespace io::swagger::server::model;
using namespace org::openapitools::server::model;
StoreApiImpl::StoreApiImpl(Pistache::Address addr)
: StoreApi(addr)

View File

@ -31,14 +31,14 @@
#include <map>
#include <string>
namespace io {
namespace swagger {
namespace org {
namespace openapitools {
namespace server {
namespace api {
using namespace io::swagger::server::model;
using namespace org::openapitools::server::model;
class StoreApiImpl : public io::swagger::server::api::StoreApi {
class StoreApiImpl : public org::openapitools::server::api::StoreApi {
public:
StoreApiImpl(Pistache::Address addr);
~StoreApiImpl() { };

View File

@ -12,12 +12,12 @@
#include "UserApiImpl.h"
namespace io {
namespace swagger {
namespace org {
namespace openapitools {
namespace server {
namespace api {
using namespace io::swagger::server::model;
using namespace org::openapitools::server::model;
UserApiImpl::UserApiImpl(Pistache::Address addr)
: UserApi(addr)

View File

@ -31,14 +31,14 @@
#include <string>
#include <vector>
namespace io {
namespace swagger {
namespace org {
namespace openapitools {
namespace server {
namespace api {
using namespace io::swagger::server::model;
using namespace org::openapitools::server::model;
class UserApiImpl : public io::swagger::server::api::UserApi {
class UserApiImpl : public org::openapitools::server::api::UserApi {
public:
UserApiImpl(Pistache::Address addr);
~UserApiImpl() { };

Some files were not shown because too many files have changed in this diff Show More