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. # 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" 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 java $JAVA_OPTS -jar $executable $ags

View File

@ -722,7 +722,6 @@ public class DefaultGenerator extends AbstractGenerator implements Generator {
URL url = URLPathUtils.getServerURL(openAPI); URL url = URLPathUtils.getServerURL(openAPI);
bundle.put("openAPI", openAPI); bundle.put("openAPI", openAPI);
bundle.put("swagger", openAPI); // for backward compatibility
bundle.put("basePath", basePath); bundle.put("basePath", basePath);
bundle.put("basePathWithoutHost", basePathWithoutHost); bundle.put("basePathWithoutHost", basePathWithoutHost);
bundle.put("scheme", URLPathUtils.getScheme(url, config)); 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.CodegenConfig;
import org.openapitools.codegen.CodegenProperty; import org.openapitools.codegen.CodegenProperty;
import org.openapitools.codegen.DefaultCodegen; 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 io.swagger.v3.oas.models.media.*;
import java.util.Arrays; 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> operationList = (List<CodegenOperation>) operations.get("operation");
List<CodegenOperation> newOpList = new ArrayList<CodegenOperation>(); List<CodegenOperation> newOpList = new ArrayList<CodegenOperation>();
for (CodegenOperation op : operationList) { for (CodegenOperation op : operationList) {
String path = new String(op.path); String path = op.path;
String[] items = path.split("/", -1); String[] items = path.split("/", -1);
List<String> splitPath = new ArrayList<String>(); List<String> splitPath = new ArrayList<String>();

View File

@ -62,8 +62,8 @@ public class CppPistacheServerCodegen extends AbstractCppCodegen {
public CppPistacheServerCodegen() { public CppPistacheServerCodegen() {
super(); super();
apiPackage = "io.swagger.server.api"; apiPackage = "org.openapitools.server.api";
modelPackage = "io.swagger.server.model"; modelPackage = "org.openapitools.server.model";
modelTemplateFiles.put("model-header.mustache", ".h"); modelTemplateFiles.put("model-header.mustache", ".h");
modelTemplateFiles.put("model-source.mustache", ".cpp"); 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 * a `Schema` into either language specific types via `typeMapping` or
* into complex models if there is not a mapping. * 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.*;
import org.openapitools.codegen.utils.ModelUtils; 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.media.*;
import io.swagger.v3.oas.models.responses.ApiResponse;
import io.swagger.v3.parser.util.SchemaTypeUtil; import io.swagger.v3.parser.util.SchemaTypeUtil;
import java.io.File; 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 CPP_NAMESPACE_DESC = "C++ namespace (convention: name::space::for::api).";
public static final String OPTIONAL_PROJECT_FILE_DESC = "Generate client.pri."; 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>(); protected Set<String> foundationClasses = new HashSet<String>();
// source folder where to write the files // source folder where to write the files
protected String sourceFolder = "client"; protected String sourceFolder = "client";
protected String apiVersion = "1.0.0"; protected String apiVersion = "1.0.0";
protected Map<String, String> namespaces = new HashMap<String, String>(); protected Map<String, String> namespaces = new HashMap<String, String>();
protected Set<String> systemIncludes = new HashSet<String>(); protected Set<String> systemIncludes = new HashSet<String>();
protected String cppNamespace = "Swagger"; protected String cppNamespace = "OpenAPI";
protected boolean optionalProjectFileFlag = true; protected boolean optionalProjectFileFlag = true;
public CppQt5ClientCodegen() { public CppQt5ClientCodegen() {
@ -56,7 +53,7 @@ public class CppQt5ClientCodegen extends AbstractCppCodegen implements CodegenCo
outputFolder = "generated-code/qt5cpp"; outputFolder = "generated-code/qt5cpp";
// set modelNamePrefix as default for QT5CPP // set modelNamePrefix as default for QT5CPP
if (modelNamePrefix == "") { if ("".equals(modelNamePrefix)) {
modelNamePrefix = PREFIX; modelNamePrefix = PREFIX;
} }
@ -143,11 +140,10 @@ public class CppQt5ClientCodegen extends AbstractCppCodegen implements CodegenCo
typeMapping.put("boolean", "bool"); typeMapping.put("boolean", "bool");
typeMapping.put("array", "QList"); typeMapping.put("array", "QList");
typeMapping.put("map", "QMap"); typeMapping.put("map", "QMap");
typeMapping.put("file", "SWGHttpRequestInputFileElement"); typeMapping.put("file", "OAIHttpRequestInputFileElement");
typeMapping.put("object", PREFIX + "Object"); typeMapping.put("object", PREFIX + "Object");
//TODO binary should be mapped to byte array
// mapped as "file" type for OAS 3.0 // mapped as "file" type for OAS 3.0
typeMapping.put("binary", "SWGHttpRequestInputFileElement"); typeMapping.put("binary", "OAIHttpRequestInputFileElement");
typeMapping.put("ByteArray", "QByteArray"); typeMapping.put("ByteArray", "QByteArray");
// UUID support - possible enhancement : use QUuid instead of QString. // UUID support - possible enhancement : use QUuid instead of QString.
// beware though that Serialisation/deserialisation of QUuid does not // 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 = new HashMap<String, String>();
importMapping.put("SWGHttpRequestInputFileElement", "#include \"" + PREFIX + "HttpRequest.h\""); importMapping.put("OAIHttpRequestInputFileElement", "#include \"" + PREFIX + "HttpRequest.h\"");
namespaces = new HashMap<String, String>(); 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. * 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 * @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.Map;
import java.util.Set; import java.util.Set;
public class CppRestClientCodegen extends AbstractCppCodegen { public class CppRestClientCodegen extends AbstractCppCodegen {
public static final String DECLSPEC = "declspec"; public static final String DECLSPEC = "declspec";
@ -91,8 +90,8 @@ public class CppRestClientCodegen extends AbstractCppCodegen {
public CppRestClientCodegen() { public CppRestClientCodegen() {
super(); super();
apiPackage = "io.swagger.client.api"; apiPackage = "org.openapitools.client.api";
modelPackage = "io.swagger.client.model"; modelPackage = "org.openapitools.client.model";
modelTemplateFiles.put("model-header.mustache", ".h"); modelTemplateFiles.put("model-header.mustache", ".h");
modelTemplateFiles.put("model-source.mustache", ".cpp"); 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 * a `Schema` into either language specific types via `typeMapping` or
* into complex models if there is not a mapping. * 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.Map;
import java.util.Set; import java.util.Set;
import io.swagger.v3.parser.util.SchemaTypeUtil;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.openapitools.codegen.*; import org.openapitools.codegen.*;
import org.openapitools.codegen.utils.ModelUtils; 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.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 { public class CppRestbedServerCodegen extends AbstractCppCodegen {
@ -50,8 +44,8 @@ public class CppRestbedServerCodegen extends AbstractCppCodegen {
public CppRestbedServerCodegen() { public CppRestbedServerCodegen() {
super(); super();
apiPackage = "io.swagger.server.api"; apiPackage = "org.openapitools.server.api";
modelPackage = "io.swagger.server.model"; modelPackage = "org.openapitools.server.model";
modelTemplateFiles.put("model-header.mustache", ".h"); modelTemplateFiles.put("model-header.mustache", ".h");
modelTemplateFiles.put("model-source.mustache", ".cpp"); 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> operationList = (List<CodegenOperation>) operations.get("operation");
List<CodegenOperation> newOpList = new ArrayList<CodegenOperation>(); List<CodegenOperation> newOpList = new ArrayList<CodegenOperation>();
for (CodegenOperation op : operationList) { for (CodegenOperation op : operationList) {
String path = new String(op.path); String path = op.path;
String[] items = path.split("/", -1); String[] items = path.split("/", -1);
String resourceNameCamelCase = ""; 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 * a `Schema` into either language specific types via `typeMapping` or
* into complex models if there is not a mapping. * 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.SupportingFile;
import org.openapitools.codegen.utils.ModelUtils; 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.media.*;
import io.swagger.v3.oas.models.responses.ApiResponse;
import io.swagger.v3.parser.util.SchemaTypeUtil; import io.swagger.v3.parser.util.SchemaTypeUtil;
import java.io.File; import java.io.File;
import java.util.Arrays; import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import java.util.HashSet; import java.util.HashSet;
import java.util.Map;
import java.util.Set;
public class CppTizenClientCodegen extends DefaultCodegen implements CodegenConfig { public class CppTizenClientCodegen extends DefaultCodegen implements CodegenConfig {
protected static String PREFIX = "ArtikCloud"; protected static String PREFIX = "ArtikCloud";
@ -287,7 +281,7 @@ public class CppTizenClientCodegen extends DefaultCodegen implements CodegenConf
@Override @Override
public String toOperationId(String operationId) { public String toOperationId(String operationId) {
// throw exception if method name is empty // throw exception if method name is empty
if (operationId == "") { if ("".equals(operationId)) {
throw new RuntimeException("Empty method name (operationId) not allowed"); 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.CodegenModel;
import org.openapitools.codegen.CodegenOperation; import org.openapitools.codegen.CodegenOperation;
import org.openapitools.codegen.CodegenParameter; import org.openapitools.codegen.CodegenParameter;
import org.openapitools.codegen.CodegenProperty;
import org.openapitools.codegen.CodegenSecurity; import org.openapitools.codegen.CodegenSecurity;
import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.CodegenType;
import org.openapitools.codegen.DefaultCodegen; import org.openapitools.codegen.DefaultCodegen;
import org.openapitools.codegen.SupportingFile; import org.openapitools.codegen.SupportingFile;
import org.openapitools.codegen.utils.ModelUtils; 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.media.*;
import io.swagger.v3.oas.models.parameters.*;
import io.swagger.v3.parser.util.SchemaTypeUtil;
import java.io.File; import java.io.File;
import java.util.Arrays; import java.util.Arrays;
@ -373,7 +368,7 @@ public class FinchServerCodegen extends DefaultCodegen implements CodegenConfig
private void generateScalaPath(CodegenOperation op) { private void generateScalaPath(CodegenOperation op) {
op.httpMethod = op.httpMethod.toLowerCase(); op.httpMethod = op.httpMethod.toLowerCase();
String path = new String(op.path); String path = op.path;
// remove first / // remove first /
if (path.startsWith("/")) { if (path.startsWith("/")) {

View File

@ -25,8 +25,6 @@ import org.openapitools.codegen.DefaultCodegen;
import org.openapitools.codegen.SupportingFile; import org.openapitools.codegen.SupportingFile;
import org.openapitools.codegen.utils.ModelUtils; 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.media.*;
import java.io.File; 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"); Map<String, Object> operations = (Map<String, Object>) objs.get("operations");
List<CodegenOperation> operationList = (List<CodegenOperation>) operations.get("operation"); List<CodegenOperation> operationList = (List<CodegenOperation>) operations.get("operation");
for (CodegenOperation op : operationList) { for (CodegenOperation op : operationList) {
String path = new String(op.path); String path = op.path;
String[] items = path.split("/", -1); String[] items = path.split("/", -1);
String opsPath = ""; String opsPath = "";
int pathParamIndex = 0; int pathParamIndex = 0;

View File

@ -25,10 +25,7 @@ import org.openapitools.codegen.DefaultCodegen;
import org.openapitools.codegen.SupportingFile; import org.openapitools.codegen.SupportingFile;
import org.openapitools.codegen.utils.ModelUtils; 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.media.*;
import io.swagger.v3.core.util.Yaml;
import java.io.File; import java.io.File;
import java.util.Arrays; import java.util.Arrays;
@ -109,9 +106,7 @@ public class PhpSlimServerCodegen extends DefaultCodegen implements CodegenConfi
typeMapping.put("array", "array"); typeMapping.put("array", "array");
typeMapping.put("list", "array"); typeMapping.put("list", "array");
typeMapping.put("object", "object"); typeMapping.put("object", "object");
//TODO binary should be mapped to byte array typeMapping.put("binary", "\\SplFileObject");
// mapped to String as a workaround
typeMapping.put("binary", "string");
supportingFiles.add(new SupportingFile("README.mustache", packagePath.replace('/', File.separatorChar), "README.md")); supportingFiles.add(new SupportingFile("README.mustache", packagePath.replace('/', File.separatorChar), "README.md"));
supportingFiles.add(new SupportingFile("composer.json", packagePath.replace('/', File.separatorChar), "composer.json")); 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. 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. 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) cmake_minimum_required (VERSION 2.8)
#PROJECT's NAME #PROJECT's NAME
project(CppRestSwaggerClient) project(CppRestOpenAPIClient)
# THE LOCATION OF OUTPUT BINARIES # THE LOCATION OF OUTPUT BINARIES

View File

@ -2,10 +2,14 @@
* {{{appName}}} * {{{appName}}}
* {{{appDescription}}} * {{{appDescription}}}
* *
* {{#version}}OpenAPI spec version: {{{version}}}{{/version}} {{#version}}
* {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} * 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 * https://openapi-generator.tech
* Do not edit the class manually. * 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. This API Server was generated by the [OpenAPI Generator](https://openapi-generator.tech) project.
It uses the [Pistache](https://github.com/oktal/pistache) Framework. It uses the [Pistache](https://github.com/oktal/pistache) Framework.
## Files organization ## Files organization
The Pistache C++ REST server generator creates three folders: 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 - `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 put it under the model folder
## Namespaces ## Namespaces
io::swagger::server::api {{{apiPackage}}}
{{{modelPackage}}}
io::swagger::server::model

View File

@ -256,7 +256,7 @@ void {{prefix}}HttpRequestWorker::execute({{prefix}}HttpRequestInput *input) {
if ({{prefix}}HttpRequestWorker::sslDefaultConfiguration != nullptr) { if ({{prefix}}HttpRequestWorker::sslDefaultConfiguration != nullptr) {
request.setSslConfiguration(*{{prefix}}HttpRequestWorker::sslDefaultConfiguration); 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()) { foreach(QString key, input->headers.keys()) {
request.setRawHeader(key.toStdString().c_str(), input->headers.value(key).toStdString().c_str()); request.setRawHeader(key.toStdString().c_str(), input->headers.value(key).toStdString().c_str());
} }

View File

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

View File

@ -5,7 +5,7 @@
* {{#version}}OpenAPI spec version: {{{version}}}{{/version}} * {{#version}}OpenAPI spec version: {{{version}}}{{/version}}
* {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} * {{#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 * https://openapi-generator.tech
* Do not edit the class manually. * 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. # title of most generated pages and in a few other places.
# The default value is: My Project. # 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 # 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 # could be handy for archiving the generated documentation or if some version
# control system is used. # 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 # 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 # 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. # 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 # 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 # 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? ## How do I get the doc files?
First generate source code by running `openapi-generator` First generate source code by running `openapi-generator`
@ -16,7 +16,7 @@ This is the structure of the doc folder:
├── Doxyfile \\Doxygen config files ├── Doxyfile \\Doxygen config files
├── generateDocumentation.sh \\Script to run to generate documentation ├── generateDocumentation.sh \\Script to run to generate documentation
├── README.md \\This file ├── 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 │   └── html
``` ```
@ -42,8 +42,8 @@ All URIs are relative to {{{scheme}}}://{{{host}}}{{{basePath}}}
Method | HTTP request | Description Method | HTTP request | Description
------------- | ------------- | ------------- ------------- | ------------- | -------------
{{#operation}} {{#operation}}
*{{nickname}}Sync* | *{{httpMethod}}* {{{path}}} | {{{summary}}}. *{{operationId}}Sync* | *{{httpMethod}}* {{{path}}} | {{{summary}}}.
*{{nickname}}ASync* | *{{httpMethod}}* {{{path}}} | {{{summary}}}. *{{operationId}}ASync* | *{{httpMethod}}* {{{path}}} | {{{summary}}}.
{{/operation}} {{/operation}}
{{/operations}}{{/apis}}{{/apiInfo}} {{/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. * 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 * 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 * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
@ -14,12 +13,12 @@
#include "MultipartFormData.h" #include "MultipartFormData.h"
#include "ModelBase.h" #include "ModelBase.h"
namespace io { namespace org {
namespace swagger { namespace openapitools {
namespace client { namespace client {
namespace api { namespace api {
using namespace io::swagger::client::model; using namespace org::openapitools::client::model;
ApiClient::ApiClient(std::shared_ptr<ApiConfiguration> configuration ) ApiClient::ApiClient(std::shared_ptr<ApiConfiguration> configuration )
: m_Configuration(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. * 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 * 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 * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
@ -16,8 +15,8 @@
* This is an API client responsible for stating the HTTP calls * This is an API client responsible for stating the HTTP calls
*/ */
#ifndef IO_SWAGGER_CLIENT_API_ApiClient_H_ #ifndef ORG_OPENAPITOOLS_CLIENT_API_ApiClient_H_
#define IO_SWAGGER_CLIENT_API_ApiClient_H_ #define ORG_OPENAPITOOLS_CLIENT_API_ApiClient_H_
#include "ApiConfiguration.h" #include "ApiConfiguration.h"
@ -31,12 +30,12 @@
#include <cpprest/details/basic_types.h> #include <cpprest/details/basic_types.h>
#include <cpprest/http_client.h> #include <cpprest/http_client.h>
namespace io { namespace org {
namespace swagger { namespace openapitools {
namespace client { namespace client {
namespace api { namespace api {
using namespace io::swagger::client::model; using namespace org::openapitools::client::model;
class ApiClient 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. * 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 * 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 * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
#include "ApiConfiguration.h" #include "ApiConfiguration.h"
namespace io { namespace org {
namespace swagger { namespace openapitools {
namespace client { namespace client {
namespace api { 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. * 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 * 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 * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
@ -16,8 +15,8 @@
* This class represents a single item of a multipart-formdata request. * This class represents a single item of a multipart-formdata request.
*/ */
#ifndef IO_SWAGGER_CLIENT_API_ApiConfiguration_H_ #ifndef ORG_OPENAPITOOLS_CLIENT_API_ApiConfiguration_H_
#define IO_SWAGGER_CLIENT_API_ApiConfiguration_H_ #define ORG_OPENAPITOOLS_CLIENT_API_ApiConfiguration_H_
@ -25,8 +24,8 @@
#include <cpprest/details/basic_types.h> #include <cpprest/details/basic_types.h>
#include <cpprest/http_client.h> #include <cpprest/http_client.h>
namespace io { namespace org {
namespace swagger { namespace openapitools {
namespace client { namespace client {
namespace api { 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. * 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 * 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 * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
#include "ApiException.h" #include "ApiException.h"
namespace io { namespace org {
namespace swagger { namespace openapitools {
namespace client { namespace client {
namespace api { 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. * 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 * 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 * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
@ -16,8 +15,8 @@
* This is the exception being thrown in case the api call was not successful * This is the exception being thrown in case the api call was not successful
*/ */
#ifndef IO_SWAGGER_CLIENT_API_ApiException_H_ #ifndef ORG_OPENAPITOOLS_CLIENT_API_ApiException_H_
#define IO_SWAGGER_CLIENT_API_ApiException_H_ #define ORG_OPENAPITOOLS_CLIENT_API_ApiException_H_
@ -28,8 +27,8 @@
#include <cpprest/http_msg.h> #include <cpprest/http_msg.h>
namespace io { namespace org {
namespace swagger { namespace openapitools {
namespace client { namespace client {
namespace api { 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) cmake_minimum_required (VERSION 2.8)
#PROJECT's NAME #PROJECT's NAME
project(CppRestSwaggerClient) project(CppRestOpenAPIClient)
# THE LOCATION OF OUTPUT BINARIES # 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. * 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 * 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 * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
#include "HttpContent.h" #include "HttpContent.h"
namespace io { namespace org {
namespace swagger { namespace openapitools {
namespace client { namespace client {
namespace model { 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. * 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 * 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 * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
@ -16,8 +15,8 @@
* This class represents a single item of a multipart-formdata request. * This class represents a single item of a multipart-formdata request.
*/ */
#ifndef IO_SWAGGER_CLIENT_MODEL_HttpContent_H_ #ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_HttpContent_H_
#define IO_SWAGGER_CLIENT_MODEL_HttpContent_H_ #define ORG_OPENAPITOOLS_CLIENT_MODEL_HttpContent_H_
@ -25,8 +24,8 @@
#include <cpprest/details/basic_types.h> #include <cpprest/details/basic_types.h>
namespace io { namespace org {
namespace swagger { namespace openapitools {
namespace client { namespace client {
namespace model { 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. * 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 * 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 * https://openapi-generator.tech
* Do not edit the class manually. * 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. * This is the interface for contents that can be sent to a remote HTTP server.
*/ */
#ifndef IO_SWAGGER_CLIENT_MODEL_IHttpBody_H_ #ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_IHttpBody_H_
#define IO_SWAGGER_CLIENT_MODEL_IHttpBody_H_ #define ORG_OPENAPITOOLS_CLIENT_MODEL_IHttpBody_H_
#include <iostream> #include <iostream>
namespace io { namespace org {
namespace swagger { namespace openapitools {
namespace client { namespace client {
namespace model { 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. * 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 * 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 * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
#include "JsonBody.h" #include "JsonBody.h"
namespace io { namespace org {
namespace swagger { namespace openapitools {
namespace client { namespace client {
namespace model { 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. * 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 * 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 * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
@ -16,16 +15,16 @@
* This is a JSON http body which can be submitted via http * This is a JSON http body which can be submitted via http
*/ */
#ifndef IO_SWAGGER_CLIENT_MODEL_JsonBody_H_ #ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_JsonBody_H_
#define IO_SWAGGER_CLIENT_MODEL_JsonBody_H_ #define ORG_OPENAPITOOLS_CLIENT_MODEL_JsonBody_H_
#include "IHttpBody.h" #include "IHttpBody.h"
#include <cpprest/json.h> #include <cpprest/json.h>
namespace io { namespace org {
namespace swagger { namespace openapitools {
namespace client { namespace client {
namespace model { 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. * 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 * 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 * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
#include "ModelBase.h" #include "ModelBase.h"
namespace io { namespace org {
namespace swagger { namespace openapitools {
namespace client { namespace client {
namespace model { 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. * 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 * 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 * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
@ -16,8 +15,8 @@
* This is the base class for all model classes * This is the base class for all model classes
*/ */
#ifndef IO_SWAGGER_CLIENT_MODEL_ModelBase_H_ #ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_ModelBase_H_
#define IO_SWAGGER_CLIENT_MODEL_ModelBase_H_ #define ORG_OPENAPITOOLS_CLIENT_MODEL_ModelBase_H_
#include "HttpContent.h" #include "HttpContent.h"
@ -28,8 +27,8 @@
#include <vector> #include <vector>
namespace io { namespace org {
namespace swagger { namespace openapitools {
namespace client { namespace client {
namespace model { 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. * 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 * 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 * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
@ -16,8 +15,8 @@
#include <boost/uuid/random_generator.hpp> #include <boost/uuid/random_generator.hpp>
#include <boost/uuid/uuid_io.hpp> #include <boost/uuid/uuid_io.hpp>
namespace io { namespace org {
namespace swagger { namespace openapitools {
namespace client { namespace client {
namespace model { 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. * 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 * 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 * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
@ -16,8 +15,8 @@
* This class represents a container for building a application/x-multipart-formdata requests. * This class represents a container for building a application/x-multipart-formdata requests.
*/ */
#ifndef IO_SWAGGER_CLIENT_MODEL_MultipartFormData_H_ #ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_MultipartFormData_H_
#define IO_SWAGGER_CLIENT_MODEL_MultipartFormData_H_ #define ORG_OPENAPITOOLS_CLIENT_MODEL_MultipartFormData_H_
#include "IHttpBody.h" #include "IHttpBody.h"
@ -30,8 +29,8 @@
#include <cpprest/details/basic_types.h> #include <cpprest/details/basic_types.h>
namespace io { namespace org {
namespace swagger { namespace openapitools {
namespace client { namespace client {
namespace model { 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. * 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 * 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 * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
#include "Object.h" #include "Object.h"
namespace io { namespace org {
namespace swagger { namespace openapitools {
namespace client { namespace client {
namespace model { 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. * 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 * 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 * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
@ -16,8 +15,8 @@
* This is the implementation of a JSON object. * This is the implementation of a JSON object.
*/ */
#ifndef IO_SWAGGER_CLIENT_MODEL_Object_H_ #ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_Object_H_
#define IO_SWAGGER_CLIENT_MODEL_Object_H_ #define ORG_OPENAPITOOLS_CLIENT_MODEL_Object_H_
#include "ModelBase.h" #include "ModelBase.h"
@ -25,8 +24,8 @@
#include <cpprest/details/basic_types.h> #include <cpprest/details/basic_types.h>
#include <cpprest/json.h> #include <cpprest/json.h>
namespace io { namespace org {
namespace swagger { namespace openapitools {
namespace client { namespace client {
namespace model { 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. * 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 * 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 * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
@ -20,12 +19,12 @@
#include <boost/algorithm/string/replace.hpp> #include <boost/algorithm/string/replace.hpp>
namespace io { namespace org {
namespace swagger { namespace openapitools {
namespace client { namespace client {
namespace api { namespace api {
using namespace io::swagger::client::model; using namespace org::openapitools::client::model;
PetApi::PetApi( std::shared_ptr<ApiClient> apiClient ) PetApi::PetApi( std::shared_ptr<ApiClient> apiClient )
: m_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. * 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 * 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 * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
@ -16,8 +15,8 @@
* *
*/ */
#ifndef IO_SWAGGER_CLIENT_API_PetApi_H_ #ifndef ORG_OPENAPITOOLS_CLIENT_API_PetApi_H_
#define IO_SWAGGER_CLIENT_API_PetApi_H_ #define ORG_OPENAPITOOLS_CLIENT_API_PetApi_H_
#include "../ApiClient.h" #include "../ApiClient.h"
@ -29,12 +28,12 @@
#include <boost/optional.hpp> #include <boost/optional.hpp>
namespace io { namespace org {
namespace swagger { namespace openapitools {
namespace client { namespace client {
namespace api { namespace api {
using namespace io::swagger::client::model; using namespace org::openapitools::client::model;
class PetApi 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. * 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 * 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 * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
@ -20,12 +19,12 @@
#include <boost/algorithm/string/replace.hpp> #include <boost/algorithm/string/replace.hpp>
namespace io { namespace org {
namespace swagger { namespace openapitools {
namespace client { namespace client {
namespace api { namespace api {
using namespace io::swagger::client::model; using namespace org::openapitools::client::model;
StoreApi::StoreApi( std::shared_ptr<ApiClient> apiClient ) StoreApi::StoreApi( std::shared_ptr<ApiClient> apiClient )
: m_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. * 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 * 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 * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
@ -16,8 +15,8 @@
* *
*/ */
#ifndef IO_SWAGGER_CLIENT_API_StoreApi_H_ #ifndef ORG_OPENAPITOOLS_CLIENT_API_StoreApi_H_
#define IO_SWAGGER_CLIENT_API_StoreApi_H_ #define ORG_OPENAPITOOLS_CLIENT_API_StoreApi_H_
#include "../ApiClient.h" #include "../ApiClient.h"
@ -28,12 +27,12 @@
#include <boost/optional.hpp> #include <boost/optional.hpp>
namespace io { namespace org {
namespace swagger { namespace openapitools {
namespace client { namespace client {
namespace api { namespace api {
using namespace io::swagger::client::model; using namespace org::openapitools::client::model;
class StoreApi 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. * 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 * 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 * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
@ -20,12 +19,12 @@
#include <boost/algorithm/string/replace.hpp> #include <boost/algorithm/string/replace.hpp>
namespace io { namespace org {
namespace swagger { namespace openapitools {
namespace client { namespace client {
namespace api { namespace api {
using namespace io::swagger::client::model; using namespace org::openapitools::client::model;
UserApi::UserApi( std::shared_ptr<ApiClient> apiClient ) UserApi::UserApi( std::shared_ptr<ApiClient> apiClient )
: m_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. * 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 * 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 * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
@ -16,8 +15,8 @@
* *
*/ */
#ifndef IO_SWAGGER_CLIENT_API_UserApi_H_ #ifndef ORG_OPENAPITOOLS_CLIENT_API_UserApi_H_
#define IO_SWAGGER_CLIENT_API_UserApi_H_ #define ORG_OPENAPITOOLS_CLIENT_API_UserApi_H_
#include "../ApiClient.h" #include "../ApiClient.h"
@ -28,12 +27,12 @@
#include <boost/optional.hpp> #include <boost/optional.hpp>
namespace io { namespace org {
namespace swagger { namespace openapitools {
namespace client { namespace client {
namespace api { namespace api {
using namespace io::swagger::client::model; using namespace org::openapitools::client::model;
class UserApi 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. * 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 * 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 * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
@ -14,8 +13,8 @@
#include "ApiResponse.h" #include "ApiResponse.h"
namespace io { namespace org {
namespace swagger { namespace openapitools {
namespace client { namespace client {
namespace model { 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. * 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 * 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 * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
@ -16,16 +15,16 @@
* Describes the result of uploading an image resource * Describes the result of uploading an image resource
*/ */
#ifndef IO_SWAGGER_CLIENT_MODEL_ApiResponse_H_ #ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_ApiResponse_H_
#define IO_SWAGGER_CLIENT_MODEL_ApiResponse_H_ #define ORG_OPENAPITOOLS_CLIENT_MODEL_ApiResponse_H_
#include "../ModelBase.h" #include "../ModelBase.h"
#include <cpprest/details/basic_types.h> #include <cpprest/details/basic_types.h>
namespace io { namespace org {
namespace swagger { namespace openapitools {
namespace client { namespace client {
namespace model { 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. * 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 * 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 * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
@ -14,8 +13,8 @@
#include "Category.h" #include "Category.h"
namespace io { namespace org {
namespace swagger { namespace openapitools {
namespace client { namespace client {
namespace model { 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. * 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 * 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 * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
@ -16,16 +15,16 @@
* A category for a pet * A category for a pet
*/ */
#ifndef IO_SWAGGER_CLIENT_MODEL_Category_H_ #ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_Category_H_
#define IO_SWAGGER_CLIENT_MODEL_Category_H_ #define ORG_OPENAPITOOLS_CLIENT_MODEL_Category_H_
#include "../ModelBase.h" #include "../ModelBase.h"
#include <cpprest/details/basic_types.h> #include <cpprest/details/basic_types.h>
namespace io { namespace org {
namespace swagger { namespace openapitools {
namespace client { namespace client {
namespace model { 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. * 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 * 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 * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
@ -14,8 +13,8 @@
#include "Order.h" #include "Order.h"
namespace io { namespace org {
namespace swagger { namespace openapitools {
namespace client { namespace client {
namespace model { 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. * 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 * 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 * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
@ -16,16 +15,16 @@
* An order for a pets from the pet store * An order for a pets from the pet store
*/ */
#ifndef IO_SWAGGER_CLIENT_MODEL_Order_H_ #ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_Order_H_
#define IO_SWAGGER_CLIENT_MODEL_Order_H_ #define ORG_OPENAPITOOLS_CLIENT_MODEL_Order_H_
#include "../ModelBase.h" #include "../ModelBase.h"
#include <cpprest/details/basic_types.h> #include <cpprest/details/basic_types.h>
namespace io { namespace org {
namespace swagger { namespace openapitools {
namespace client { namespace client {
namespace model { 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. * 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 * 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 * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
@ -14,8 +13,8 @@
#include "Pet.h" #include "Pet.h"
namespace io { namespace org {
namespace swagger { namespace openapitools {
namespace client { namespace client {
namespace model { 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. * 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 * 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 * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
@ -16,8 +15,8 @@
* A pet for sale in the pet store * A pet for sale in the pet store
*/ */
#ifndef IO_SWAGGER_CLIENT_MODEL_Pet_H_ #ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_Pet_H_
#define IO_SWAGGER_CLIENT_MODEL_Pet_H_ #define ORG_OPENAPITOOLS_CLIENT_MODEL_Pet_H_
#include "../ModelBase.h" #include "../ModelBase.h"
@ -27,8 +26,8 @@
#include "Category.h" #include "Category.h"
#include <vector> #include <vector>
namespace io { namespace org {
namespace swagger { namespace openapitools {
namespace client { namespace client {
namespace model { 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. * 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 * 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 * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
@ -14,8 +13,8 @@
#include "Tag.h" #include "Tag.h"
namespace io { namespace org {
namespace swagger { namespace openapitools {
namespace client { namespace client {
namespace model { 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. * 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 * 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 * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
@ -16,16 +15,16 @@
* A tag for a pet * A tag for a pet
*/ */
#ifndef IO_SWAGGER_CLIENT_MODEL_Tag_H_ #ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_Tag_H_
#define IO_SWAGGER_CLIENT_MODEL_Tag_H_ #define ORG_OPENAPITOOLS_CLIENT_MODEL_Tag_H_
#include "../ModelBase.h" #include "../ModelBase.h"
#include <cpprest/details/basic_types.h> #include <cpprest/details/basic_types.h>
namespace io { namespace org {
namespace swagger { namespace openapitools {
namespace client { namespace client {
namespace model { 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. * 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 * 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 * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
@ -14,8 +13,8 @@
#include "User.h" #include "User.h"
namespace io { namespace org {
namespace swagger { namespace openapitools {
namespace client { namespace client {
namespace model { 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. * 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 * 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 * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
@ -16,16 +15,16 @@
* A User who is purchasing from the pet store * A User who is purchasing from the pet store
*/ */
#ifndef IO_SWAGGER_CLIENT_MODEL_User_H_ #ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_User_H_
#define IO_SWAGGER_CLIENT_MODEL_User_H_ #define ORG_OPENAPITOOLS_CLIENT_MODEL_User_H_
#include "../ModelBase.h" #include "../ModelBase.h"
#include <cpprest/details/basic_types.h> #include <cpprest/details/basic_types.h>
namespace io { namespace org {
namespace swagger { namespace openapitools {
namespace client { namespace client {
namespace model { 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 <QtTest/QtTest>
#include <QTimer> #include <QTimer>
#include "../client/SWGPetApi.h" #include "../client/OAIPetApi.h"
using namespace Swagger; using namespace OpenAPI;
class PetApiTests: public QObject { class PetApiTests: public QObject {
Q_OBJECT Q_OBJECT
@ -17,8 +17,8 @@ public:
static void runTests(); static void runTests();
private: private:
SWGPetApi* getApi(); OAIPetApi* getApi();
SWGPet* createRandomPet(); OAIPet* createRandomPet();
signals: signals:
void quit(); void quit();

View File

@ -11,32 +11,32 @@
*/ */
#include "SWGApiResponse.h" #include "OAIApiResponse.h"
#include "SWGHelpers.h" #include "OAIHelpers.h"
#include <QJsonDocument> #include <QJsonDocument>
#include <QJsonArray> #include <QJsonArray>
#include <QObject> #include <QObject>
#include <QDebug> #include <QDebug>
namespace Swagger { namespace OpenAPI {
SWGApiResponse::SWGApiResponse(QString json) { OAIApiResponse::OAIApiResponse(QString json) {
init(); init();
this->fromJson(json); this->fromJson(json);
} }
SWGApiResponse::SWGApiResponse() { OAIApiResponse::OAIApiResponse() {
init(); init();
} }
SWGApiResponse::~SWGApiResponse() { OAIApiResponse::~OAIApiResponse() {
this->cleanup(); this->cleanup();
} }
void void
SWGApiResponse::init() { OAIApiResponse::init() {
code = 0; code = 0;
m_code_isSet = false; m_code_isSet = false;
type = new QString(""); type = new QString("");
@ -46,7 +46,7 @@ SWGApiResponse::init() {
} }
void void
SWGApiResponse::cleanup() { OAIApiResponse::cleanup() {
if(type != nullptr) { if(type != nullptr) {
delete type; delete type;
@ -56,8 +56,8 @@ SWGApiResponse::cleanup() {
} }
} }
SWGApiResponse* OAIApiResponse*
SWGApiResponse::fromJson(QString json) { OAIApiResponse::fromJson(QString json) {
QByteArray array (json.toStdString().c_str()); QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array); QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object(); QJsonObject jsonObject = doc.object();
@ -66,17 +66,17 @@ SWGApiResponse::fromJson(QString json) {
} }
void void
SWGApiResponse::fromJsonObject(QJsonObject pJson) { OAIApiResponse::fromJsonObject(QJsonObject pJson) {
::Swagger::setValue(&code, pJson["code"], "qint32", ""); ::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 QString
SWGApiResponse::asJson () OAIApiResponse::asJson ()
{ {
QJsonObject obj = this->asJsonObject(); QJsonObject obj = this->asJsonObject();
QJsonDocument doc(obj); QJsonDocument doc(obj);
@ -85,7 +85,7 @@ SWGApiResponse::asJson ()
} }
QJsonObject QJsonObject
SWGApiResponse::asJsonObject() { OAIApiResponse::asJsonObject() {
QJsonObject obj; QJsonObject obj;
if(m_code_isSet){ if(m_code_isSet){
obj.insert("code", QJsonValue(code)); obj.insert("code", QJsonValue(code));
@ -101,38 +101,38 @@ SWGApiResponse::asJsonObject() {
} }
qint32 qint32
SWGApiResponse::getCode() { OAIApiResponse::getCode() {
return code; return code;
} }
void void
SWGApiResponse::setCode(qint32 code) { OAIApiResponse::setCode(qint32 code) {
this->code = code; this->code = code;
this->m_code_isSet = true; this->m_code_isSet = true;
} }
QString* QString*
SWGApiResponse::getType() { OAIApiResponse::getType() {
return type; return type;
} }
void void
SWGApiResponse::setType(QString* type) { OAIApiResponse::setType(QString* type) {
this->type = type; this->type = type;
this->m_type_isSet = true; this->m_type_isSet = true;
} }
QString* QString*
SWGApiResponse::getMessage() { OAIApiResponse::getMessage() {
return message; return message;
} }
void void
SWGApiResponse::setMessage(QString* message) { OAIApiResponse::setMessage(QString* message) {
this->message = message; this->message = message;
this->m_message_isSet = true; this->m_message_isSet = true;
} }
bool bool
SWGApiResponse::isSet(){ OAIApiResponse::isSet(){
bool isObjectUpdated = false; bool isObjectUpdated = false;
do{ do{
if(m_code_isSet){ isObjectUpdated = true; break;} 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 * Describes the result of uploading an image resource
*/ */
#ifndef SWGApiResponse_H_ #ifndef OAIApiResponse_H_
#define SWGApiResponse_H_ #define OAIApiResponse_H_
#include <QJsonObject> #include <QJsonObject>
#include <QString> #include <QString>
#include "SWGObject.h" #include "OAIObject.h"
namespace Swagger { namespace OpenAPI {
class SWGApiResponse: public SWGObject { class OAIApiResponse: public OAIObject {
public: public:
SWGApiResponse(); OAIApiResponse();
SWGApiResponse(QString json); OAIApiResponse(QString json);
~SWGApiResponse(); ~OAIApiResponse();
void init(); void init();
void cleanup(); void cleanup();
QString asJson () override; QString asJson () override;
QJsonObject asJsonObject() override; QJsonObject asJsonObject() override;
void fromJsonObject(QJsonObject json) override; void fromJsonObject(QJsonObject json) override;
SWGApiResponse* fromJson(QString jsonString) override; OAIApiResponse* fromJson(QString jsonString) override;
qint32 getCode(); qint32 getCode();
void setCode(qint32 code); 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 <QJsonDocument>
#include <QJsonArray> #include <QJsonArray>
#include <QObject> #include <QObject>
#include <QDebug> #include <QDebug>
namespace Swagger { namespace OpenAPI {
SWGCategory::SWGCategory(QString json) { OAICategory::OAICategory(QString json) {
init(); init();
this->fromJson(json); this->fromJson(json);
} }
SWGCategory::SWGCategory() { OAICategory::OAICategory() {
init(); init();
} }
SWGCategory::~SWGCategory() { OAICategory::~OAICategory() {
this->cleanup(); this->cleanup();
} }
void void
SWGCategory::init() { OAICategory::init() {
id = 0L; id = 0L;
m_id_isSet = false; m_id_isSet = false;
name = new QString(""); name = new QString("");
@ -44,15 +44,15 @@ SWGCategory::init() {
} }
void void
SWGCategory::cleanup() { OAICategory::cleanup() {
if(name != nullptr) { if(name != nullptr) {
delete name; delete name;
} }
} }
SWGCategory* OAICategory*
SWGCategory::fromJson(QString json) { OAICategory::fromJson(QString json) {
QByteArray array (json.toStdString().c_str()); QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array); QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object(); QJsonObject jsonObject = doc.object();
@ -61,15 +61,15 @@ SWGCategory::fromJson(QString json) {
} }
void void
SWGCategory::fromJsonObject(QJsonObject pJson) { OAICategory::fromJsonObject(QJsonObject pJson) {
::Swagger::setValue(&id, pJson["id"], "qint64", ""); ::OpenAPI::setValue(&id, pJson["id"], "qint64", "");
::Swagger::setValue(&name, pJson["name"], "QString", "QString"); ::OpenAPI::setValue(&name, pJson["name"], "QString", "QString");
} }
QString QString
SWGCategory::asJson () OAICategory::asJson ()
{ {
QJsonObject obj = this->asJsonObject(); QJsonObject obj = this->asJsonObject();
QJsonDocument doc(obj); QJsonDocument doc(obj);
@ -78,7 +78,7 @@ SWGCategory::asJson ()
} }
QJsonObject QJsonObject
SWGCategory::asJsonObject() { OAICategory::asJsonObject() {
QJsonObject obj; QJsonObject obj;
if(m_id_isSet){ if(m_id_isSet){
obj.insert("id", QJsonValue(id)); obj.insert("id", QJsonValue(id));
@ -91,28 +91,28 @@ SWGCategory::asJsonObject() {
} }
qint64 qint64
SWGCategory::getId() { OAICategory::getId() {
return id; return id;
} }
void void
SWGCategory::setId(qint64 id) { OAICategory::setId(qint64 id) {
this->id = id; this->id = id;
this->m_id_isSet = true; this->m_id_isSet = true;
} }
QString* QString*
SWGCategory::getName() { OAICategory::getName() {
return name; return name;
} }
void void
SWGCategory::setName(QString* name) { OAICategory::setName(QString* name) {
this->name = name; this->name = name;
this->m_name_isSet = true; this->m_name_isSet = true;
} }
bool bool
SWGCategory::isSet(){ OAICategory::isSet(){
bool isObjectUpdated = false; bool isObjectUpdated = false;
do{ do{
if(m_id_isSet){ isObjectUpdated = true; break;} if(m_id_isSet){ isObjectUpdated = true; break;}

View File

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

View File

@ -10,15 +10,15 @@
* Do not edit the class manually. * Do not edit the class manually.
*/ */
#ifndef SWG_HELPERS_H #ifndef OAI_HELPERS_H
#define SWG_HELPERS_H #define OAI_HELPERS_H
#include <QJsonObject> #include <QJsonObject>
#include <QJsonValue> #include <QJsonValue>
#include <QList> #include <QList>
#include <QMap> #include <QMap>
namespace Swagger { namespace OpenAPI {
void setValue(void* value, QJsonValue obj, QString type, QString complexType); void setValue(void* value, QJsonValue obj, QString type, QString complexType);
void toJsonArray(QList<void*>* value, QJsonObject& output, QString innerName, QString innerType); 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. * Do not edit the class manually.
*/ */
#include "SWGHttpRequest.h" #include "OAIHttpRequest.h"
#include <QDateTime> #include <QDateTime>
#include <QUrl> #include <QUrl>
#include <QFileInfo> #include <QFileInfo>
@ -18,30 +18,30 @@
#include <QtGlobal> #include <QtGlobal>
namespace Swagger { namespace OpenAPI {
SWGHttpRequestInput::SWGHttpRequestInput() { OAIHttpRequestInput::OAIHttpRequestInput() {
initialize(); initialize();
} }
SWGHttpRequestInput::SWGHttpRequestInput(QString v_url_str, QString v_http_method) { OAIHttpRequestInput::OAIHttpRequestInput(QString v_url_str, QString v_http_method) {
initialize(); initialize();
url_str = v_url_str; url_str = v_url_str;
http_method = v_http_method; http_method = v_http_method;
} }
void SWGHttpRequestInput::initialize() { void OAIHttpRequestInput::initialize() {
var_layout = NOT_SET; var_layout = NOT_SET;
url_str = ""; url_str = "";
http_method = "GET"; http_method = "GET";
} }
void SWGHttpRequestInput::add_var(QString key, QString value) { void OAIHttpRequestInput::add_var(QString key, QString value) {
vars[key] = value; vars[key] = value;
} }
void SWGHttpRequestInput::add_file(QString variable_name, QString local_filename, QString request_filename, QString mime_type) { void OAIHttpRequestInput::add_file(QString variable_name, QString local_filename, QString request_filename, QString mime_type) {
SWGHttpRequestInputFileElement file; OAIHttpRequestInputFileElement file;
file.variable_name = variable_name; file.variable_name = variable_name;
file.local_filename = local_filename; file.local_filename = local_filename;
file.request_filename = request_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) : QObject(parent), manager(nullptr)
{ {
qsrand(QDateTime::currentDateTime().toTime_t()); qsrand(QDateTime::currentDateTime().toTime_t());
manager = new QNetworkAccessManager(this); 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 // result structure follows RFC 5987
bool need_utf_encoding = false; bool need_utf_encoding = false;
QString result = ""; 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); 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 // reset variables
@ -190,7 +190,7 @@ void SWGHttpRequestWorker::execute(SWGHttpRequestInput *input) {
} }
// add files // 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); QFileInfo fi(file_info->local_filename);
// ensure necessary variables are available // ensure necessary variables are available
@ -262,10 +262,10 @@ void SWGHttpRequestWorker::execute(SWGHttpRequestInput *input) {
// prepare connection // prepare connection
QNetworkRequest request = QNetworkRequest(QUrl(input->url_str)); QNetworkRequest request = QNetworkRequest(QUrl(input->url_str));
if (SWGHttpRequestWorker::sslDefaultConfiguration != nullptr) { if (OAIHttpRequestWorker::sslDefaultConfiguration != nullptr) {
request.setSslConfiguration(*SWGHttpRequestWorker::sslDefaultConfiguration); 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()) { foreach(QString key, input->headers.keys()) {
request.setRawHeader(key.toStdString().c_str(), input->headers.value(key).toStdString().c_str()); 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(); error_type = reply->error();
response = reply->readAll(); response = reply->readAll();
error_str = reply->errorString(); error_str = reply->errorString();
@ -319,7 +319,7 @@ void SWGHttpRequestWorker::on_manager_finished(QNetworkReply *reply) {
emit on_execution_finished(this); emit on_execution_finished(this);
} }
QSslConfiguration* SWGHttpRequestWorker::sslDefaultConfiguration; QSslConfiguration* OAIHttpRequestWorker::sslDefaultConfiguration;
} }

View File

@ -16,8 +16,8 @@
* *
**/ **/
#ifndef SWG_HTTPREQUESTWORKER_H #ifndef OAI_HTTPREQUESTWORKER_H
#define SWG_HTTPREQUESTWORKER_H #define OAI_HTTPREQUESTWORKER_H
#include <QObject> #include <QObject>
#include <QString> #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: public:
QString variable_name; QString variable_name;
@ -42,19 +42,19 @@ public:
}; };
class SWGHttpRequestInput { class OAIHttpRequestInput {
public: public:
QString url_str; QString url_str;
QString http_method; QString http_method;
SWGHttpRequestVarLayout var_layout; OAIHttpRequestVarLayout var_layout;
QMap<QString, QString> vars; QMap<QString, QString> vars;
QMap<QString, QString> headers; QMap<QString, QString> headers;
QList<SWGHttpRequestInputFileElement> files; QList<OAIHttpRequestInputFileElement> files;
QByteArray request_body; QByteArray request_body;
SWGHttpRequestInput(); OAIHttpRequestInput();
SWGHttpRequestInput(QString v_url_str, QString v_http_method); OAIHttpRequestInput(QString v_url_str, QString v_http_method);
void initialize(); void initialize();
void add_var(QString key, QString value); void add_var(QString key, QString value);
void add_file(QString variable_name, QString local_filename, QString request_filename, QString mime_type); 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 Q_OBJECT
public: public:
@ -70,15 +70,15 @@ public:
QNetworkReply::NetworkError error_type; QNetworkReply::NetworkError error_type;
QString error_str; QString error_str;
explicit SWGHttpRequestWorker(QObject *parent = 0); explicit OAIHttpRequestWorker(QObject *parent = 0);
virtual ~SWGHttpRequestWorker(); virtual ~OAIHttpRequestWorker();
QString http_attribute_encode(QString attribute_name, QString input); QString http_attribute_encode(QString attribute_name, QString input);
void execute(SWGHttpRequestInput *input); void execute(OAIHttpRequestInput *input);
static QSslConfiguration* sslDefaultConfiguration; static QSslConfiguration* sslDefaultConfiguration;
signals: signals:
void on_execution_finished(SWGHttpRequestWorker *worker); void on_execution_finished(OAIHttpRequestWorker *worker);
private: private:
QNetworkAccessManager *manager; 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_ #ifndef ModelFactory_H_
#define ModelFactory_H_ #define ModelFactory_H_
#include "SWGObject.h" #include "OAIObject.h"
#include "SWGApiResponse.h" #include "OAIApiResponse.h"
#include "SWGCategory.h" #include "OAICategory.h"
#include "SWGOrder.h" #include "OAIOrder.h"
#include "SWGPet.h" #include "OAIPet.h"
#include "SWGTag.h" #include "OAITag.h"
#include "SWGUser.h" #include "OAIUser.h"
namespace Swagger { namespace OpenAPI {
inline void* create(QString type) { inline void* create(QString type) {
if(QString("SWGApiResponse").compare(type) == 0) { if(QString("OAIApiResponse").compare(type) == 0) {
return new SWGApiResponse(); return new OAIApiResponse();
} }
if(QString("SWGCategory").compare(type) == 0) { if(QString("OAICategory").compare(type) == 0) {
return new SWGCategory(); return new OAICategory();
} }
if(QString("SWGOrder").compare(type) == 0) { if(QString("OAIOrder").compare(type) == 0) {
return new SWGOrder(); return new OAIOrder();
} }
if(QString("SWGPet").compare(type) == 0) { if(QString("OAIPet").compare(type) == 0) {
return new SWGPet(); return new OAIPet();
} }
if(QString("SWGTag").compare(type) == 0) { if(QString("OAITag").compare(type) == 0) {
return new SWGTag(); return new OAITag();
} }
if(QString("SWGUser").compare(type) == 0) { if(QString("OAIUser").compare(type) == 0) {
return new SWGUser(); return new OAIUser();
} }
return nullptr; return nullptr;
@ -51,7 +51,7 @@ namespace Swagger {
if(type.startsWith("QString")) { if(type.startsWith("QString")) {
return new QString(); return new QString();
} }
auto val = static_cast<SWGObject*>(create(type)); auto val = static_cast<OAIObject*>(create(type));
if(val != nullptr) { if(val != nullptr) {
return val->fromJson(json); return val->fromJson(json);
} }

View File

@ -10,22 +10,22 @@
* Do not edit the class manually. * Do not edit the class manually.
*/ */
#ifndef _SWG_OBJECT_H_ #ifndef _OAI_OBJECT_H_
#define _SWG_OBJECT_H_ #define _OAI_OBJECT_H_
#include <QJsonObject> #include <QJsonObject>
namespace Swagger { namespace OpenAPI {
class SWGObject { class OAIObject {
public: public:
virtual QJsonObject asJsonObject() { virtual QJsonObject asJsonObject() {
return QJsonObject(); return QJsonObject();
} }
virtual ~SWGObject() {} virtual ~OAIObject() {}
virtual SWGObject* fromJson(QString jsonString) { virtual OAIObject* fromJson(QString jsonString) {
Q_UNUSED(jsonString); Q_UNUSED(jsonString);
return new SWGObject(); return new OAIObject();
} }
virtual void fromJsonObject(QJsonObject json) { virtual void fromJsonObject(QJsonObject json) {
Q_UNUSED(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 <QJsonDocument>
#include <QJsonArray> #include <QJsonArray>
#include <QObject> #include <QObject>
#include <QDebug> #include <QDebug>
namespace Swagger { namespace OpenAPI {
SWGOrder::SWGOrder(QString json) { OAIOrder::OAIOrder(QString json) {
init(); init();
this->fromJson(json); this->fromJson(json);
} }
SWGOrder::SWGOrder() { OAIOrder::OAIOrder() {
init(); init();
} }
SWGOrder::~SWGOrder() { OAIOrder::~OAIOrder() {
this->cleanup(); this->cleanup();
} }
void void
SWGOrder::init() { OAIOrder::init() {
id = 0L; id = 0L;
m_id_isSet = false; m_id_isSet = false;
pet_id = 0L; pet_id = 0L;
@ -52,7 +52,7 @@ SWGOrder::init() {
} }
void void
SWGOrder::cleanup() { OAIOrder::cleanup() {
@ -65,8 +65,8 @@ SWGOrder::cleanup() {
} }
SWGOrder* OAIOrder*
SWGOrder::fromJson(QString json) { OAIOrder::fromJson(QString json) {
QByteArray array (json.toStdString().c_str()); QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array); QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object(); QJsonObject jsonObject = doc.object();
@ -75,23 +75,23 @@ SWGOrder::fromJson(QString json) {
} }
void void
SWGOrder::fromJsonObject(QJsonObject pJson) { OAIOrder::fromJsonObject(QJsonObject pJson) {
::Swagger::setValue(&id, pJson["id"], "qint64", ""); ::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 QString
SWGOrder::asJson () OAIOrder::asJson ()
{ {
QJsonObject obj = this->asJsonObject(); QJsonObject obj = this->asJsonObject();
QJsonDocument doc(obj); QJsonDocument doc(obj);
@ -100,7 +100,7 @@ SWGOrder::asJson ()
} }
QJsonObject QJsonObject
SWGOrder::asJsonObject() { OAIOrder::asJsonObject() {
QJsonObject obj; QJsonObject obj;
if(m_id_isSet){ if(m_id_isSet){
obj.insert("id", QJsonValue(id)); obj.insert("id", QJsonValue(id));
@ -125,68 +125,68 @@ SWGOrder::asJsonObject() {
} }
qint64 qint64
SWGOrder::getId() { OAIOrder::getId() {
return id; return id;
} }
void void
SWGOrder::setId(qint64 id) { OAIOrder::setId(qint64 id) {
this->id = id; this->id = id;
this->m_id_isSet = true; this->m_id_isSet = true;
} }
qint64 qint64
SWGOrder::getPetId() { OAIOrder::getPetId() {
return pet_id; return pet_id;
} }
void void
SWGOrder::setPetId(qint64 pet_id) { OAIOrder::setPetId(qint64 pet_id) {
this->pet_id = pet_id; this->pet_id = pet_id;
this->m_pet_id_isSet = true; this->m_pet_id_isSet = true;
} }
qint32 qint32
SWGOrder::getQuantity() { OAIOrder::getQuantity() {
return quantity; return quantity;
} }
void void
SWGOrder::setQuantity(qint32 quantity) { OAIOrder::setQuantity(qint32 quantity) {
this->quantity = quantity; this->quantity = quantity;
this->m_quantity_isSet = true; this->m_quantity_isSet = true;
} }
QDateTime* QDateTime*
SWGOrder::getShipDate() { OAIOrder::getShipDate() {
return ship_date; return ship_date;
} }
void void
SWGOrder::setShipDate(QDateTime* ship_date) { OAIOrder::setShipDate(QDateTime* ship_date) {
this->ship_date = ship_date; this->ship_date = ship_date;
this->m_ship_date_isSet = true; this->m_ship_date_isSet = true;
} }
QString* QString*
SWGOrder::getStatus() { OAIOrder::getStatus() {
return status; return status;
} }
void void
SWGOrder::setStatus(QString* status) { OAIOrder::setStatus(QString* status) {
this->status = status; this->status = status;
this->m_status_isSet = true; this->m_status_isSet = true;
} }
bool bool
SWGOrder::isComplete() { OAIOrder::isComplete() {
return complete; return complete;
} }
void void
SWGOrder::setComplete(bool complete) { OAIOrder::setComplete(bool complete) {
this->complete = complete; this->complete = complete;
this->m_complete_isSet = true; this->m_complete_isSet = true;
} }
bool bool
SWGOrder::isSet(){ OAIOrder::isSet(){
bool isObjectUpdated = false; bool isObjectUpdated = false;
do{ do{
if(m_id_isSet){ isObjectUpdated = true; break;} 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 * An order for a pets from the pet store
*/ */
#ifndef SWGOrder_H_ #ifndef OAIOrder_H_
#define SWGOrder_H_ #define OAIOrder_H_
#include <QJsonObject> #include <QJsonObject>
@ -25,22 +25,22 @@
#include <QDateTime> #include <QDateTime>
#include <QString> #include <QString>
#include "SWGObject.h" #include "OAIObject.h"
namespace Swagger { namespace OpenAPI {
class SWGOrder: public SWGObject { class OAIOrder: public OAIObject {
public: public:
SWGOrder(); OAIOrder();
SWGOrder(QString json); OAIOrder(QString json);
~SWGOrder(); ~OAIOrder();
void init(); void init();
void cleanup(); void cleanup();
QString asJson () override; QString asJson () override;
QJsonObject asJsonObject() override; QJsonObject asJsonObject() override;
void fromJsonObject(QJsonObject json) override; void fromJsonObject(QJsonObject json) override;
SWGOrder* fromJson(QString jsonString) override; OAIOrder* fromJson(QString jsonString) override;
qint64 getId(); qint64 getId();
void setId(qint64 id); 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 <QJsonDocument>
#include <QJsonArray> #include <QJsonArray>
#include <QObject> #include <QObject>
#include <QDebug> #include <QDebug>
namespace Swagger { namespace OpenAPI {
SWGPet::SWGPet(QString json) { OAIPet::OAIPet(QString json) {
init(); init();
this->fromJson(json); this->fromJson(json);
} }
SWGPet::SWGPet() { OAIPet::OAIPet() {
init(); init();
} }
SWGPet::~SWGPet() { OAIPet::~OAIPet() {
this->cleanup(); this->cleanup();
} }
void void
SWGPet::init() { OAIPet::init() {
id = 0L; id = 0L;
m_id_isSet = false; m_id_isSet = false;
category = new SWGCategory(); category = new OAICategory();
m_category_isSet = false; m_category_isSet = false;
name = new QString(""); name = new QString("");
m_name_isSet = false; m_name_isSet = false;
photo_urls = new QList<QString*>(); photo_urls = new QList<QString*>();
m_photo_urls_isSet = false; m_photo_urls_isSet = false;
tags = new QList<SWGTag*>(); tags = new QList<OAITag*>();
m_tags_isSet = false; m_tags_isSet = false;
status = new QString(""); status = new QString("");
m_status_isSet = false; m_status_isSet = false;
} }
void void
SWGPet::cleanup() { OAIPet::cleanup() {
if(category != nullptr) { if(category != nullptr) {
delete category; delete category;
@ -79,8 +79,8 @@ SWGPet::cleanup() {
} }
} }
SWGPet* OAIPet*
SWGPet::fromJson(QString json) { OAIPet::fromJson(QString json) {
QByteArray array (json.toStdString().c_str()); QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array); QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object(); QJsonObject jsonObject = doc.object();
@ -89,23 +89,23 @@ SWGPet::fromJson(QString json) {
} }
void void
SWGPet::fromJsonObject(QJsonObject pJson) { OAIPet::fromJsonObject(QJsonObject pJson) {
::Swagger::setValue(&id, pJson["id"], "qint64", ""); ::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"); ::OpenAPI::setValue(&tags, pJson["tags"], "QList", "OAITag");
::Swagger::setValue(&status, pJson["status"], "QString", "QString"); ::OpenAPI::setValue(&status, pJson["status"], "QString", "QString");
} }
QString QString
SWGPet::asJson () OAIPet::asJson ()
{ {
QJsonObject obj = this->asJsonObject(); QJsonObject obj = this->asJsonObject();
QJsonDocument doc(obj); QJsonDocument doc(obj);
@ -114,13 +114,13 @@ SWGPet::asJson ()
} }
QJsonObject QJsonObject
SWGPet::asJsonObject() { OAIPet::asJsonObject() {
QJsonObject obj; QJsonObject obj;
if(m_id_isSet){ if(m_id_isSet){
obj.insert("id", QJsonValue(id)); obj.insert("id", QJsonValue(id));
} }
if((category != nullptr) && (category->isSet())){ if((category != nullptr) && (category->isSet())){
toJsonValue(QString("category"), category, obj, QString("SWGCategory")); toJsonValue(QString("category"), category, obj, QString("OAICategory"));
} }
if(name != nullptr && *name != QString("")){ if(name != nullptr && *name != QString("")){
toJsonValue(QString("name"), name, obj, QString("QString")); toJsonValue(QString("name"), name, obj, QString("QString"));
@ -129,7 +129,7 @@ SWGPet::asJsonObject() {
toJsonArray((QList<void*>*)photo_urls, obj, "photoUrls", "QString"); toJsonArray((QList<void*>*)photo_urls, obj, "photoUrls", "QString");
} }
if(tags->size() > 0){ if(tags->size() > 0){
toJsonArray((QList<void*>*)tags, obj, "tags", "SWGTag"); toJsonArray((QList<void*>*)tags, obj, "tags", "OAITag");
} }
if(status != nullptr && *status != QString("")){ if(status != nullptr && *status != QString("")){
toJsonValue(QString("status"), status, obj, QString("QString")); toJsonValue(QString("status"), status, obj, QString("QString"));
@ -139,68 +139,68 @@ SWGPet::asJsonObject() {
} }
qint64 qint64
SWGPet::getId() { OAIPet::getId() {
return id; return id;
} }
void void
SWGPet::setId(qint64 id) { OAIPet::setId(qint64 id) {
this->id = id; this->id = id;
this->m_id_isSet = true; this->m_id_isSet = true;
} }
SWGCategory* OAICategory*
SWGPet::getCategory() { OAIPet::getCategory() {
return category; return category;
} }
void void
SWGPet::setCategory(SWGCategory* category) { OAIPet::setCategory(OAICategory* category) {
this->category = category; this->category = category;
this->m_category_isSet = true; this->m_category_isSet = true;
} }
QString* QString*
SWGPet::getName() { OAIPet::getName() {
return name; return name;
} }
void void
SWGPet::setName(QString* name) { OAIPet::setName(QString* name) {
this->name = name; this->name = name;
this->m_name_isSet = true; this->m_name_isSet = true;
} }
QList<QString*>* QList<QString*>*
SWGPet::getPhotoUrls() { OAIPet::getPhotoUrls() {
return photo_urls; return photo_urls;
} }
void void
SWGPet::setPhotoUrls(QList<QString*>* photo_urls) { OAIPet::setPhotoUrls(QList<QString*>* photo_urls) {
this->photo_urls = photo_urls; this->photo_urls = photo_urls;
this->m_photo_urls_isSet = true; this->m_photo_urls_isSet = true;
} }
QList<SWGTag*>* QList<OAITag*>*
SWGPet::getTags() { OAIPet::getTags() {
return tags; return tags;
} }
void void
SWGPet::setTags(QList<SWGTag*>* tags) { OAIPet::setTags(QList<OAITag*>* tags) {
this->tags = tags; this->tags = tags;
this->m_tags_isSet = true; this->m_tags_isSet = true;
} }
QString* QString*
SWGPet::getStatus() { OAIPet::getStatus() {
return status; return status;
} }
void void
SWGPet::setStatus(QString* status) { OAIPet::setStatus(QString* status) {
this->status = status; this->status = status;
this->m_status_isSet = true; this->m_status_isSet = true;
} }
bool bool
SWGPet::isSet(){ OAIPet::isSet(){
bool isObjectUpdated = false; bool isObjectUpdated = false;
do{ do{
if(m_id_isSet){ isObjectUpdated = true; break;} 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 * A pet for sale in the pet store
*/ */
#ifndef SWGPet_H_ #ifndef OAIPet_H_
#define SWGPet_H_ #define OAIPet_H_
#include <QJsonObject> #include <QJsonObject>
#include "SWGCategory.h" #include "OAICategory.h"
#include "SWGTag.h" #include "OAITag.h"
#include <QList> #include <QList>
#include <QString> #include <QString>
#include "SWGObject.h" #include "OAIObject.h"
namespace Swagger { namespace OpenAPI {
class SWGPet: public SWGObject { class OAIPet: public OAIObject {
public: public:
SWGPet(); OAIPet();
SWGPet(QString json); OAIPet(QString json);
~SWGPet(); ~OAIPet();
void init(); void init();
void cleanup(); void cleanup();
QString asJson () override; QString asJson () override;
QJsonObject asJsonObject() override; QJsonObject asJsonObject() override;
void fromJsonObject(QJsonObject json) override; void fromJsonObject(QJsonObject json) override;
SWGPet* fromJson(QString jsonString) override; OAIPet* fromJson(QString jsonString) override;
qint64 getId(); qint64 getId();
void setId(qint64 id); void setId(qint64 id);
SWGCategory* getCategory(); OAICategory* getCategory();
void setCategory(SWGCategory* category); void setCategory(OAICategory* category);
QString* getName(); QString* getName();
void setName(QString* name); void setName(QString* name);
@ -56,8 +56,8 @@ public:
QList<QString*>* getPhotoUrls(); QList<QString*>* getPhotoUrls();
void setPhotoUrls(QList<QString*>* photo_urls); void setPhotoUrls(QList<QString*>* photo_urls);
QList<SWGTag*>* getTags(); QList<OAITag*>* getTags();
void setTags(QList<SWGTag*>* tags); void setTags(QList<OAITag*>* tags);
QString* getStatus(); QString* getStatus();
void setStatus(QString* status); void setStatus(QString* status);
@ -69,7 +69,7 @@ private:
qint64 id; qint64 id;
bool m_id_isSet; bool m_id_isSet;
SWGCategory* category; OAICategory* category;
bool m_category_isSet; bool m_category_isSet;
QString* name; QString* name;
@ -78,7 +78,7 @@ private:
QList<QString*>* photo_urls; QList<QString*>* photo_urls;
bool m_photo_urls_isSet; bool m_photo_urls_isSet;
QList<SWGTag*>* tags; QList<OAITag*>* tags;
bool m_tags_isSet; bool m_tags_isSet;
QString* status; 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. * Do not edit the class manually.
*/ */
#include "SWGPetApi.h" #include "OAIPetApi.h"
#include "SWGHelpers.h" #include "OAIHelpers.h"
#include "SWGModelFactory.h" #include "OAIModelFactory.h"
#include "SWGQObjectWrapper.h" #include "OAIQObjectWrapper.h"
#include <QJsonArray> #include <QJsonArray>
#include <QJsonDocument> #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->host = host;
this->basePath = basePath; this->basePath = basePath;
} }
void void
SWGPetApi::addPet(std::shared_ptr<SWGSWGPet>& swg_pet) { OAIPetApi::addPet(std::shared_ptr<OAIOAIPet>& oai_pet) {
QString fullPath; QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/pet"); fullPath.append(this->host).append(this->basePath).append("/pet");
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker(); OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
SWGHttpRequestInput input(fullPath, "POST"); OAIHttpRequestInput input(fullPath, "POST");
QString output = swg_pet.asJson(); QString output = oai_pet.asJson();
input.request_body.append(output); input.request_body.append(output);
@ -51,15 +51,15 @@ SWGPetApi::addPet(std::shared_ptr<SWGSWGPet>& swg_pet) {
} }
connect(worker, connect(worker,
&SWGHttpRequestWorker::on_execution_finished, &OAIHttpRequestWorker::on_execution_finished,
this, this,
&SWGPetApi::addPetCallback); &OAIPetApi::addPetCallback);
worker->execute(&input); worker->execute(&input);
} }
void void
SWGPetApi::addPetCallback(SWGHttpRequestWorker * worker) { OAIPetApi::addPetCallback(OAIHttpRequestWorker * worker) {
QString msg; QString msg;
QString error_str = worker->error_str; QString error_str = worker->error_str;
QNetworkReply::NetworkError error_type = worker->error_type; QNetworkReply::NetworkError error_type = worker->error_type;
@ -82,7 +82,7 @@ SWGPetApi::addPetCallback(SWGHttpRequestWorker * worker) {
} }
void void
SWGPetApi::deletePet(qint64 pet_id, QString* api_key) { OAIPetApi::deletePet(qint64 pet_id, QString* api_key) {
QString fullPath; QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/pet/{petId}"); 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)); fullPath.replace(pet_idPathParam, stringValue(pet_id));
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker(); OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
SWGHttpRequestInput input(fullPath, "DELETE"); OAIHttpRequestInput input(fullPath, "DELETE");
@ -105,15 +105,15 @@ SWGPetApi::deletePet(qint64 pet_id, QString* api_key) {
} }
connect(worker, connect(worker,
&SWGHttpRequestWorker::on_execution_finished, &OAIHttpRequestWorker::on_execution_finished,
this, this,
&SWGPetApi::deletePetCallback); &OAIPetApi::deletePetCallback);
worker->execute(&input); worker->execute(&input);
} }
void void
SWGPetApi::deletePetCallback(SWGHttpRequestWorker * worker) { OAIPetApi::deletePetCallback(OAIHttpRequestWorker * worker) {
QString msg; QString msg;
QString error_str = worker->error_str; QString error_str = worker->error_str;
QNetworkReply::NetworkError error_type = worker->error_type; QNetworkReply::NetworkError error_type = worker->error_type;
@ -136,7 +136,7 @@ SWGPetApi::deletePetCallback(SWGHttpRequestWorker * worker) {
} }
void void
SWGPetApi::findPetsByStatus(QList<QString*>* status) { OAIPetApi::findPetsByStatus(QList<QString*>* status) {
QString fullPath; QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/pet/findByStatus"); fullPath.append(this->host).append(this->basePath).append("/pet/findByStatus");
@ -184,8 +184,8 @@ SWGPetApi::findPetsByStatus(QList<QString*>* status) {
} }
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker(); OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
SWGHttpRequestInput input(fullPath, "GET"); OAIHttpRequestInput input(fullPath, "GET");
@ -196,15 +196,15 @@ SWGPetApi::findPetsByStatus(QList<QString*>* status) {
} }
connect(worker, connect(worker,
&SWGHttpRequestWorker::on_execution_finished, &OAIHttpRequestWorker::on_execution_finished,
this, this,
&SWGPetApi::findPetsByStatusCallback); &OAIPetApi::findPetsByStatusCallback);
worker->execute(&input); worker->execute(&input);
} }
void void
SWGPetApi::findPetsByStatusCallback(SWGHttpRequestWorker * worker) { OAIPetApi::findPetsByStatusCallback(OAIHttpRequestWorker * worker) {
QString msg; QString msg;
QString error_str = worker->error_str; QString error_str = worker->error_str;
QNetworkReply::NetworkError error_type = worker->error_type; QNetworkReply::NetworkError error_type = worker->error_type;
@ -216,19 +216,19 @@ SWGPetApi::findPetsByStatusCallback(SWGHttpRequestWorker * worker) {
msg = "Error: " + worker->error_str; msg = "Error: " + worker->error_str;
} }
QList<SWGPet*>* output = new QList<SWGPet*>(); QList<OAIPet*>* output = new QList<OAIPet*>();
QString json(worker->response); QString json(worker->response);
QByteArray array (json.toStdString().c_str()); QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array); QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonArray jsonArray = doc.array(); QJsonArray jsonArray = doc.array();
auto wrapper = new SWGQObjectWrapper<QList<SWGPet*>*> (output); auto wrapper = new OAIQObjectWrapper<QList<OAIPet*>*> (output);
wrapper->deleteLater(); wrapper->deleteLater();
foreach(QJsonValue obj, jsonArray) { foreach(QJsonValue obj, jsonArray) {
SWGPet* o = new SWGPet(); OAIPet* o = new OAIPet();
QJsonObject jv = obj.toObject(); QJsonObject jv = obj.toObject();
QJsonObject * ptr = (QJsonObject*)&jv; QJsonObject * ptr = (QJsonObject*)&jv;
o->fromJsonObject(*ptr); o->fromJsonObject(*ptr);
auto objwrapper = new SWGQObjectWrapper<SWGPet*> (o); auto objwrapper = new OAIQObjectWrapper<OAIPet*> (o);
objwrapper->deleteLater(); objwrapper->deleteLater();
output->append(o); output->append(o);
} }
@ -243,7 +243,7 @@ SWGPetApi::findPetsByStatusCallback(SWGHttpRequestWorker * worker) {
} }
void void
SWGPetApi::findPetsByTags(QList<QString*>* tags) { OAIPetApi::findPetsByTags(QList<QString*>* tags) {
QString fullPath; QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/pet/findByTags"); fullPath.append(this->host).append(this->basePath).append("/pet/findByTags");
@ -291,8 +291,8 @@ SWGPetApi::findPetsByTags(QList<QString*>* tags) {
} }
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker(); OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
SWGHttpRequestInput input(fullPath, "GET"); OAIHttpRequestInput input(fullPath, "GET");
@ -303,15 +303,15 @@ SWGPetApi::findPetsByTags(QList<QString*>* tags) {
} }
connect(worker, connect(worker,
&SWGHttpRequestWorker::on_execution_finished, &OAIHttpRequestWorker::on_execution_finished,
this, this,
&SWGPetApi::findPetsByTagsCallback); &OAIPetApi::findPetsByTagsCallback);
worker->execute(&input); worker->execute(&input);
} }
void void
SWGPetApi::findPetsByTagsCallback(SWGHttpRequestWorker * worker) { OAIPetApi::findPetsByTagsCallback(OAIHttpRequestWorker * worker) {
QString msg; QString msg;
QString error_str = worker->error_str; QString error_str = worker->error_str;
QNetworkReply::NetworkError error_type = worker->error_type; QNetworkReply::NetworkError error_type = worker->error_type;
@ -323,19 +323,19 @@ SWGPetApi::findPetsByTagsCallback(SWGHttpRequestWorker * worker) {
msg = "Error: " + worker->error_str; msg = "Error: " + worker->error_str;
} }
QList<SWGPet*>* output = new QList<SWGPet*>(); QList<OAIPet*>* output = new QList<OAIPet*>();
QString json(worker->response); QString json(worker->response);
QByteArray array (json.toStdString().c_str()); QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array); QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonArray jsonArray = doc.array(); QJsonArray jsonArray = doc.array();
auto wrapper = new SWGQObjectWrapper<QList<SWGPet*>*> (output); auto wrapper = new OAIQObjectWrapper<QList<OAIPet*>*> (output);
wrapper->deleteLater(); wrapper->deleteLater();
foreach(QJsonValue obj, jsonArray) { foreach(QJsonValue obj, jsonArray) {
SWGPet* o = new SWGPet(); OAIPet* o = new OAIPet();
QJsonObject jv = obj.toObject(); QJsonObject jv = obj.toObject();
QJsonObject * ptr = (QJsonObject*)&jv; QJsonObject * ptr = (QJsonObject*)&jv;
o->fromJsonObject(*ptr); o->fromJsonObject(*ptr);
auto objwrapper = new SWGQObjectWrapper<SWGPet*> (o); auto objwrapper = new OAIQObjectWrapper<OAIPet*> (o);
objwrapper->deleteLater(); objwrapper->deleteLater();
output->append(o); output->append(o);
} }
@ -350,7 +350,7 @@ SWGPetApi::findPetsByTagsCallback(SWGHttpRequestWorker * worker) {
} }
void void
SWGPetApi::getPetById(qint64 pet_id) { OAIPetApi::getPetById(qint64 pet_id) {
QString fullPath; QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/pet/{petId}"); 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)); fullPath.replace(pet_idPathParam, stringValue(pet_id));
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker(); OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
SWGHttpRequestInput input(fullPath, "GET"); OAIHttpRequestInput input(fullPath, "GET");
@ -370,15 +370,15 @@ SWGPetApi::getPetById(qint64 pet_id) {
} }
connect(worker, connect(worker,
&SWGHttpRequestWorker::on_execution_finished, &OAIHttpRequestWorker::on_execution_finished,
this, this,
&SWGPetApi::getPetByIdCallback); &OAIPetApi::getPetByIdCallback);
worker->execute(&input); worker->execute(&input);
} }
void void
SWGPetApi::getPetByIdCallback(SWGHttpRequestWorker * worker) { OAIPetApi::getPetByIdCallback(OAIHttpRequestWorker * worker) {
QString msg; QString msg;
QString error_str = worker->error_str; QString error_str = worker->error_str;
QNetworkReply::NetworkError error_type = worker->error_type; QNetworkReply::NetworkError error_type = worker->error_type;
@ -391,8 +391,8 @@ SWGPetApi::getPetByIdCallback(SWGHttpRequestWorker * worker) {
} }
QString json(worker->response); QString json(worker->response);
SWGPet* output = static_cast<SWGPet*>(create(json, QString("SWGPet"))); OAIPet* output = static_cast<OAIPet*>(create(json, QString("OAIPet")));
auto wrapper = new SWGQObjectWrapper<SWGPet*> (output); auto wrapper = new OAIQObjectWrapper<OAIPet*> (output);
wrapper->deleteLater(); wrapper->deleteLater();
worker->deleteLater(); worker->deleteLater();
@ -405,18 +405,18 @@ SWGPetApi::getPetByIdCallback(SWGHttpRequestWorker * worker) {
} }
void void
SWGPetApi::updatePet(std::shared_ptr<SWGSWGPet>& swg_pet) { OAIPetApi::updatePet(std::shared_ptr<OAIOAIPet>& oai_pet) {
QString fullPath; QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/pet"); fullPath.append(this->host).append(this->basePath).append("/pet");
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker(); OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
SWGHttpRequestInput input(fullPath, "PUT"); OAIHttpRequestInput input(fullPath, "PUT");
QString output = swg_pet.asJson(); QString output = oai_pet.asJson();
input.request_body.append(output); input.request_body.append(output);
@ -426,15 +426,15 @@ SWGPetApi::updatePet(std::shared_ptr<SWGSWGPet>& swg_pet) {
} }
connect(worker, connect(worker,
&SWGHttpRequestWorker::on_execution_finished, &OAIHttpRequestWorker::on_execution_finished,
this, this,
&SWGPetApi::updatePetCallback); &OAIPetApi::updatePetCallback);
worker->execute(&input); worker->execute(&input);
} }
void void
SWGPetApi::updatePetCallback(SWGHttpRequestWorker * worker) { OAIPetApi::updatePetCallback(OAIHttpRequestWorker * worker) {
QString msg; QString msg;
QString error_str = worker->error_str; QString error_str = worker->error_str;
QNetworkReply::NetworkError error_type = worker->error_type; QNetworkReply::NetworkError error_type = worker->error_type;
@ -457,7 +457,7 @@ SWGPetApi::updatePetCallback(SWGHttpRequestWorker * worker) {
} }
void void
SWGPetApi::updatePetWithForm(qint64 pet_id, QString* name, QString* status) { OAIPetApi::updatePetWithForm(qint64 pet_id, QString* name, QString* status) {
QString fullPath; QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/pet/{petId}"); 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)); fullPath.replace(pet_idPathParam, stringValue(pet_id));
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker(); OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
SWGHttpRequestInput input(fullPath, "POST"); OAIHttpRequestInput input(fullPath, "POST");
if (name != nullptr) { if (name != nullptr) {
input.add_var("name", *name); input.add_var("name", *name);
@ -483,15 +483,15 @@ SWGPetApi::updatePetWithForm(qint64 pet_id, QString* name, QString* status) {
} }
connect(worker, connect(worker,
&SWGHttpRequestWorker::on_execution_finished, &OAIHttpRequestWorker::on_execution_finished,
this, this,
&SWGPetApi::updatePetWithFormCallback); &OAIPetApi::updatePetWithFormCallback);
worker->execute(&input); worker->execute(&input);
} }
void void
SWGPetApi::updatePetWithFormCallback(SWGHttpRequestWorker * worker) { OAIPetApi::updatePetWithFormCallback(OAIHttpRequestWorker * worker) {
QString msg; QString msg;
QString error_str = worker->error_str; QString error_str = worker->error_str;
QNetworkReply::NetworkError error_type = worker->error_type; QNetworkReply::NetworkError error_type = worker->error_type;
@ -514,7 +514,7 @@ SWGPetApi::updatePetWithFormCallback(SWGHttpRequestWorker * worker) {
} }
void void
SWGPetApi::uploadFile(qint64 pet_id, QString* additional_metadata, SWGHttpRequestInputFileElement* file) { OAIPetApi::uploadFile(qint64 pet_id, QString* additional_metadata, OAIHttpRequestInputFileElement* file) {
QString fullPath; QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/pet/{petId}/uploadImage"); 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)); fullPath.replace(pet_idPathParam, stringValue(pet_id));
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker(); OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
SWGHttpRequestInput input(fullPath, "POST"); OAIHttpRequestInput input(fullPath, "POST");
if (additional_metadata != nullptr) { if (additional_metadata != nullptr) {
input.add_var("additionalMetadata", *additional_metadata); input.add_var("additionalMetadata", *additional_metadata);
@ -540,15 +540,15 @@ SWGPetApi::uploadFile(qint64 pet_id, QString* additional_metadata, SWGHttpReques
} }
connect(worker, connect(worker,
&SWGHttpRequestWorker::on_execution_finished, &OAIHttpRequestWorker::on_execution_finished,
this, this,
&SWGPetApi::uploadFileCallback); &OAIPetApi::uploadFileCallback);
worker->execute(&input); worker->execute(&input);
} }
void void
SWGPetApi::uploadFileCallback(SWGHttpRequestWorker * worker) { OAIPetApi::uploadFileCallback(OAIHttpRequestWorker * worker) {
QString msg; QString msg;
QString error_str = worker->error_str; QString error_str = worker->error_str;
QNetworkReply::NetworkError error_type = worker->error_type; QNetworkReply::NetworkError error_type = worker->error_type;
@ -561,8 +561,8 @@ SWGPetApi::uploadFileCallback(SWGHttpRequestWorker * worker) {
} }
QString json(worker->response); QString json(worker->response);
SWGApiResponse* output = static_cast<SWGApiResponse*>(create(json, QString("SWGApiResponse"))); OAIApiResponse* output = static_cast<OAIApiResponse*>(create(json, QString("OAIApiResponse")));
auto wrapper = new SWGQObjectWrapper<SWGApiResponse*> (output); auto wrapper = new OAIQObjectWrapper<OAIApiResponse*> (output);
wrapper->deleteLater(); wrapper->deleteLater();
worker->deleteLater(); worker->deleteLater();

View File

@ -10,78 +10,78 @@
* Do not edit the class manually. * Do not edit the class manually.
*/ */
#ifndef _SWG_SWGPetApi_H_ #ifndef _OAI_OAIPetApi_H_
#define _SWG_SWGPetApi_H_ #define _OAI_OAIPetApi_H_
#include "SWGHttpRequest.h" #include "OAIHttpRequest.h"
#include "OAIApiResponse.h"
#include "OAIHttpRequest.h"
#include "OAIPet.h"
#include <QString> #include <QString>
#include "SWGApiResponse.h"
#include "SWGHttpRequest.h"
#include "SWGPet.h"
#include <QObject> #include <QObject>
namespace Swagger { namespace OpenAPI {
class SWGPetApi: public QObject { class OAIPetApi: public QObject {
Q_OBJECT Q_OBJECT
public: public:
SWGPetApi(); OAIPetApi();
SWGPetApi(QString host, QString basePath); OAIPetApi(QString host, QString basePath);
~SWGPetApi(); ~OAIPetApi();
QString host; QString host;
QString basePath; QString basePath;
QMap<QString, QString> defaultHeaders; 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 deletePet(qint64 pet_id, QString* api_key);
void findPetsByStatus(QList<QString*>* status); void findPetsByStatus(QList<QString*>* status);
void findPetsByTags(QList<QString*>* tags); void findPetsByTags(QList<QString*>* tags);
void getPetById(qint64 pet_id); 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 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: private:
void addPetCallback (SWGHttpRequestWorker * worker); void addPetCallback (OAIHttpRequestWorker * worker);
void deletePetCallback (SWGHttpRequestWorker * worker); void deletePetCallback (OAIHttpRequestWorker * worker);
void findPetsByStatusCallback (SWGHttpRequestWorker * worker); void findPetsByStatusCallback (OAIHttpRequestWorker * worker);
void findPetsByTagsCallback (SWGHttpRequestWorker * worker); void findPetsByTagsCallback (OAIHttpRequestWorker * worker);
void getPetByIdCallback (SWGHttpRequestWorker * worker); void getPetByIdCallback (OAIHttpRequestWorker * worker);
void updatePetCallback (SWGHttpRequestWorker * worker); void updatePetCallback (OAIHttpRequestWorker * worker);
void updatePetWithFormCallback (SWGHttpRequestWorker * worker); void updatePetWithFormCallback (OAIHttpRequestWorker * worker);
void uploadFileCallback (SWGHttpRequestWorker * worker); void uploadFileCallback (OAIHttpRequestWorker * worker);
signals: signals:
void addPetSignal(); void addPetSignal();
void deletePetSignal(); void deletePetSignal();
void findPetsByStatusSignal(QList<SWGPet*>* summary); void findPetsByStatusSignal(QList<OAIPet*>* summary);
void findPetsByTagsSignal(QList<SWGPet*>* summary); void findPetsByTagsSignal(QList<OAIPet*>* summary);
void getPetByIdSignal(SWGPet* summary); void getPetByIdSignal(OAIPet* summary);
void updatePetSignal(); void updatePetSignal();
void updatePetWithFormSignal(); void updatePetWithFormSignal();
void uploadFileSignal(SWGApiResponse* summary); void uploadFileSignal(OAIApiResponse* summary);
void addPetSignalE(QNetworkReply::NetworkError error_type, QString& error_str); void addPetSignalE(QNetworkReply::NetworkError error_type, QString& error_str);
void deletePetSignalE(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 findPetsByStatusSignalE(QList<OAIPet*>* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void findPetsByTagsSignalE(QList<SWGPet*>* summary, QNetworkReply::NetworkError error_type, QString& error_str); void findPetsByTagsSignalE(QList<OAIPet*>* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void getPetByIdSignalE(SWGPet* 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 updatePetSignalE(QNetworkReply::NetworkError error_type, QString& error_str);
void updatePetWithFormSignalE(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 addPetSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void deletePetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); void deletePetSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void findPetsByStatusSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); void findPetsByStatusSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void findPetsByTagsSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); void findPetsByTagsSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void getPetByIdSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); void getPetByIdSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void updatePetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); void updatePetSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void updatePetWithFormSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); void updatePetWithFormSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void uploadFileSignalEFull(SWGHttpRequestWorker* 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. * Do not edit the class manually.
*/ */
#ifndef SWG_QOBJECT_WRAPPER_H #ifndef OAI_QOBJECT_WRAPPER_H
#define SWG_QOBJECT_WRAPPER_H #define OAI_QOBJECT_WRAPPER_H
#include <QObject> #include <QObject>
namespace Swagger { namespace OpenAPI {
template <typename ObjectPtrT> template <typename ObjectPtrT>
class SWGQObjectWrapper : public QObject { class OAIQObjectWrapper : public QObject {
public: public:
SWGQObjectWrapper(ObjectPtrT ptr){ OAIQObjectWrapper(ObjectPtrT ptr){
data = ptr; data = ptr;
} }
~SWGQObjectWrapper(){ ~OAIQObjectWrapper(){
delete data; delete data;
} }
private : 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. * Do not edit the class manually.
*/ */
#include "SWGStoreApi.h" #include "OAIStoreApi.h"
#include "SWGHelpers.h" #include "OAIHelpers.h"
#include "SWGModelFactory.h" #include "OAIModelFactory.h"
#include "SWGQObjectWrapper.h" #include "OAIQObjectWrapper.h"
#include <QJsonArray> #include <QJsonArray>
#include <QJsonDocument> #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->host = host;
this->basePath = basePath; this->basePath = basePath;
} }
void void
SWGStoreApi::deleteOrder(QString* order_id) { OAIStoreApi::deleteOrder(QString* order_id) {
QString fullPath; QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/store/order/{orderId}"); 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)); fullPath.replace(order_idPathParam, stringValue(order_id));
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker(); OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
SWGHttpRequestInput input(fullPath, "DELETE"); OAIHttpRequestInput input(fullPath, "DELETE");
@ -50,15 +50,15 @@ SWGStoreApi::deleteOrder(QString* order_id) {
} }
connect(worker, connect(worker,
&SWGHttpRequestWorker::on_execution_finished, &OAIHttpRequestWorker::on_execution_finished,
this, this,
&SWGStoreApi::deleteOrderCallback); &OAIStoreApi::deleteOrderCallback);
worker->execute(&input); worker->execute(&input);
} }
void void
SWGStoreApi::deleteOrderCallback(SWGHttpRequestWorker * worker) { OAIStoreApi::deleteOrderCallback(OAIHttpRequestWorker * worker) {
QString msg; QString msg;
QString error_str = worker->error_str; QString error_str = worker->error_str;
QNetworkReply::NetworkError error_type = worker->error_type; QNetworkReply::NetworkError error_type = worker->error_type;
@ -81,14 +81,14 @@ SWGStoreApi::deleteOrderCallback(SWGHttpRequestWorker * worker) {
} }
void void
SWGStoreApi::getInventory() { OAIStoreApi::getInventory() {
QString fullPath; QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/store/inventory"); fullPath.append(this->host).append(this->basePath).append("/store/inventory");
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker(); OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
SWGHttpRequestInput input(fullPath, "GET"); OAIHttpRequestInput input(fullPath, "GET");
@ -99,15 +99,15 @@ SWGStoreApi::getInventory() {
} }
connect(worker, connect(worker,
&SWGHttpRequestWorker::on_execution_finished, &OAIHttpRequestWorker::on_execution_finished,
this, this,
&SWGStoreApi::getInventoryCallback); &OAIStoreApi::getInventoryCallback);
worker->execute(&input); worker->execute(&input);
} }
void void
SWGStoreApi::getInventoryCallback(SWGHttpRequestWorker * worker) { OAIStoreApi::getInventoryCallback(OAIHttpRequestWorker * worker) {
QString msg; QString msg;
QString error_str = worker->error_str; QString error_str = worker->error_str;
QNetworkReply::NetworkError error_type = worker->error_type; QNetworkReply::NetworkError error_type = worker->error_type;
@ -141,7 +141,7 @@ SWGStoreApi::getInventoryCallback(SWGHttpRequestWorker * worker) {
} }
void void
SWGStoreApi::getOrderById(qint64 order_id) { OAIStoreApi::getOrderById(qint64 order_id) {
QString fullPath; QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/store/order/{orderId}"); 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)); fullPath.replace(order_idPathParam, stringValue(order_id));
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker(); OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
SWGHttpRequestInput input(fullPath, "GET"); OAIHttpRequestInput input(fullPath, "GET");
@ -161,15 +161,15 @@ SWGStoreApi::getOrderById(qint64 order_id) {
} }
connect(worker, connect(worker,
&SWGHttpRequestWorker::on_execution_finished, &OAIHttpRequestWorker::on_execution_finished,
this, this,
&SWGStoreApi::getOrderByIdCallback); &OAIStoreApi::getOrderByIdCallback);
worker->execute(&input); worker->execute(&input);
} }
void void
SWGStoreApi::getOrderByIdCallback(SWGHttpRequestWorker * worker) { OAIStoreApi::getOrderByIdCallback(OAIHttpRequestWorker * worker) {
QString msg; QString msg;
QString error_str = worker->error_str; QString error_str = worker->error_str;
QNetworkReply::NetworkError error_type = worker->error_type; QNetworkReply::NetworkError error_type = worker->error_type;
@ -182,8 +182,8 @@ SWGStoreApi::getOrderByIdCallback(SWGHttpRequestWorker * worker) {
} }
QString json(worker->response); QString json(worker->response);
SWGOrder* output = static_cast<SWGOrder*>(create(json, QString("SWGOrder"))); OAIOrder* output = static_cast<OAIOrder*>(create(json, QString("OAIOrder")));
auto wrapper = new SWGQObjectWrapper<SWGOrder*> (output); auto wrapper = new OAIQObjectWrapper<OAIOrder*> (output);
wrapper->deleteLater(); wrapper->deleteLater();
worker->deleteLater(); worker->deleteLater();
@ -196,18 +196,18 @@ SWGStoreApi::getOrderByIdCallback(SWGHttpRequestWorker * worker) {
} }
void void
SWGStoreApi::placeOrder(std::shared_ptr<SWGSWGOrder>& swg_order) { OAIStoreApi::placeOrder(std::shared_ptr<OAIOAIOrder>& oai_order) {
QString fullPath; QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/store/order"); fullPath.append(this->host).append(this->basePath).append("/store/order");
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker(); OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
SWGHttpRequestInput input(fullPath, "POST"); OAIHttpRequestInput input(fullPath, "POST");
QString output = swg_order.asJson(); QString output = oai_order.asJson();
input.request_body.append(output); input.request_body.append(output);
@ -217,15 +217,15 @@ SWGStoreApi::placeOrder(std::shared_ptr<SWGSWGOrder>& swg_order) {
} }
connect(worker, connect(worker,
&SWGHttpRequestWorker::on_execution_finished, &OAIHttpRequestWorker::on_execution_finished,
this, this,
&SWGStoreApi::placeOrderCallback); &OAIStoreApi::placeOrderCallback);
worker->execute(&input); worker->execute(&input);
} }
void void
SWGStoreApi::placeOrderCallback(SWGHttpRequestWorker * worker) { OAIStoreApi::placeOrderCallback(OAIHttpRequestWorker * worker) {
QString msg; QString msg;
QString error_str = worker->error_str; QString error_str = worker->error_str;
QNetworkReply::NetworkError error_type = worker->error_type; QNetworkReply::NetworkError error_type = worker->error_type;
@ -238,8 +238,8 @@ SWGStoreApi::placeOrderCallback(SWGHttpRequestWorker * worker) {
} }
QString json(worker->response); QString json(worker->response);
SWGOrder* output = static_cast<SWGOrder*>(create(json, QString("SWGOrder"))); OAIOrder* output = static_cast<OAIOrder*>(create(json, QString("OAIOrder")));
auto wrapper = new SWGQObjectWrapper<SWGOrder*> (output); auto wrapper = new OAIQObjectWrapper<OAIOrder*> (output);
wrapper->deleteLater(); wrapper->deleteLater();
worker->deleteLater(); worker->deleteLater();

View File

@ -10,26 +10,26 @@
* Do not edit the class manually. * Do not edit the class manually.
*/ */
#ifndef _SWG_SWGStoreApi_H_ #ifndef _OAI_OAIStoreApi_H_
#define _SWG_SWGStoreApi_H_ #define _OAI_OAIStoreApi_H_
#include "SWGHttpRequest.h" #include "OAIHttpRequest.h"
#include "OAIOrder.h"
#include <QMap> #include <QMap>
#include <QString> #include <QString>
#include "SWGOrder.h"
#include <QObject> #include <QObject>
namespace Swagger { namespace OpenAPI {
class SWGStoreApi: public QObject { class OAIStoreApi: public QObject {
Q_OBJECT Q_OBJECT
public: public:
SWGStoreApi(); OAIStoreApi();
SWGStoreApi(QString host, QString basePath); OAIStoreApi(QString host, QString basePath);
~SWGStoreApi(); ~OAIStoreApi();
QString host; QString host;
QString basePath; QString basePath;
@ -38,29 +38,29 @@ public:
void deleteOrder(QString* order_id); void deleteOrder(QString* order_id);
void getInventory(); void getInventory();
void getOrderById(qint64 order_id); void getOrderById(qint64 order_id);
void placeOrder(std::shared_ptr<SWGSWGOrder>& swg_order); void placeOrder(std::shared_ptr<OAIOAIOrder>& oai_order);
private: private:
void deleteOrderCallback (SWGHttpRequestWorker * worker); void deleteOrderCallback (OAIHttpRequestWorker * worker);
void getInventoryCallback (SWGHttpRequestWorker * worker); void getInventoryCallback (OAIHttpRequestWorker * worker);
void getOrderByIdCallback (SWGHttpRequestWorker * worker); void getOrderByIdCallback (OAIHttpRequestWorker * worker);
void placeOrderCallback (SWGHttpRequestWorker * worker); void placeOrderCallback (OAIHttpRequestWorker * worker);
signals: signals:
void deleteOrderSignal(); void deleteOrderSignal();
void getInventorySignal(QMap<QString, qint32>* summary); void getInventorySignal(QMap<QString, qint32>* summary);
void getOrderByIdSignal(SWGOrder* summary); void getOrderByIdSignal(OAIOrder* summary);
void placeOrderSignal(SWGOrder* summary); void placeOrderSignal(OAIOrder* summary);
void deleteOrderSignalE(QNetworkReply::NetworkError error_type, QString& error_str); void deleteOrderSignalE(QNetworkReply::NetworkError error_type, QString& error_str);
void getInventorySignalE(QMap<QString, qint32>* summary, 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 getOrderByIdSignalE(OAIOrder* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void placeOrderSignalE(SWGOrder* 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 deleteOrderSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void getInventorySignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); void getInventorySignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void getOrderByIdSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); void getOrderByIdSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void placeOrderSignalEFull(SWGHttpRequestWorker* 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 <QJsonDocument>
#include <QJsonArray> #include <QJsonArray>
#include <QObject> #include <QObject>
#include <QDebug> #include <QDebug>
namespace Swagger { namespace OpenAPI {
SWGTag::SWGTag(QString json) { OAITag::OAITag(QString json) {
init(); init();
this->fromJson(json); this->fromJson(json);
} }
SWGTag::SWGTag() { OAITag::OAITag() {
init(); init();
} }
SWGTag::~SWGTag() { OAITag::~OAITag() {
this->cleanup(); this->cleanup();
} }
void void
SWGTag::init() { OAITag::init() {
id = 0L; id = 0L;
m_id_isSet = false; m_id_isSet = false;
name = new QString(""); name = new QString("");
@ -44,15 +44,15 @@ SWGTag::init() {
} }
void void
SWGTag::cleanup() { OAITag::cleanup() {
if(name != nullptr) { if(name != nullptr) {
delete name; delete name;
} }
} }
SWGTag* OAITag*
SWGTag::fromJson(QString json) { OAITag::fromJson(QString json) {
QByteArray array (json.toStdString().c_str()); QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array); QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object(); QJsonObject jsonObject = doc.object();
@ -61,15 +61,15 @@ SWGTag::fromJson(QString json) {
} }
void void
SWGTag::fromJsonObject(QJsonObject pJson) { OAITag::fromJsonObject(QJsonObject pJson) {
::Swagger::setValue(&id, pJson["id"], "qint64", ""); ::OpenAPI::setValue(&id, pJson["id"], "qint64", "");
::Swagger::setValue(&name, pJson["name"], "QString", "QString"); ::OpenAPI::setValue(&name, pJson["name"], "QString", "QString");
} }
QString QString
SWGTag::asJson () OAITag::asJson ()
{ {
QJsonObject obj = this->asJsonObject(); QJsonObject obj = this->asJsonObject();
QJsonDocument doc(obj); QJsonDocument doc(obj);
@ -78,7 +78,7 @@ SWGTag::asJson ()
} }
QJsonObject QJsonObject
SWGTag::asJsonObject() { OAITag::asJsonObject() {
QJsonObject obj; QJsonObject obj;
if(m_id_isSet){ if(m_id_isSet){
obj.insert("id", QJsonValue(id)); obj.insert("id", QJsonValue(id));
@ -91,28 +91,28 @@ SWGTag::asJsonObject() {
} }
qint64 qint64
SWGTag::getId() { OAITag::getId() {
return id; return id;
} }
void void
SWGTag::setId(qint64 id) { OAITag::setId(qint64 id) {
this->id = id; this->id = id;
this->m_id_isSet = true; this->m_id_isSet = true;
} }
QString* QString*
SWGTag::getName() { OAITag::getName() {
return name; return name;
} }
void void
SWGTag::setName(QString* name) { OAITag::setName(QString* name) {
this->name = name; this->name = name;
this->m_name_isSet = true; this->m_name_isSet = true;
} }
bool bool
SWGTag::isSet(){ OAITag::isSet(){
bool isObjectUpdated = false; bool isObjectUpdated = false;
do{ do{
if(m_id_isSet){ isObjectUpdated = true; break;} if(m_id_isSet){ isObjectUpdated = true; break;}

View File

@ -11,35 +11,35 @@
*/ */
/* /*
* SWGTag.h * OAITag.h
* *
* A tag for a pet * A tag for a pet
*/ */
#ifndef SWGTag_H_ #ifndef OAITag_H_
#define SWGTag_H_ #define OAITag_H_
#include <QJsonObject> #include <QJsonObject>
#include <QString> #include <QString>
#include "SWGObject.h" #include "OAIObject.h"
namespace Swagger { namespace OpenAPI {
class SWGTag: public SWGObject { class OAITag: public OAIObject {
public: public:
SWGTag(); OAITag();
SWGTag(QString json); OAITag(QString json);
~SWGTag(); ~OAITag();
void init(); void init();
void cleanup(); void cleanup();
QString asJson () override; QString asJson () override;
QJsonObject asJsonObject() override; QJsonObject asJsonObject() override;
void fromJsonObject(QJsonObject json) override; void fromJsonObject(QJsonObject json) override;
SWGTag* fromJson(QString jsonString) override; OAITag* fromJson(QString jsonString) override;
qint64 getId(); qint64 getId();
void setId(qint64 id); 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 <QJsonDocument>
#include <QJsonArray> #include <QJsonArray>
#include <QObject> #include <QObject>
#include <QDebug> #include <QDebug>
namespace Swagger { namespace OpenAPI {
SWGUser::SWGUser(QString json) { OAIUser::OAIUser(QString json) {
init(); init();
this->fromJson(json); this->fromJson(json);
} }
SWGUser::SWGUser() { OAIUser::OAIUser() {
init(); init();
} }
SWGUser::~SWGUser() { OAIUser::~OAIUser() {
this->cleanup(); this->cleanup();
} }
void void
SWGUser::init() { OAIUser::init() {
id = 0L; id = 0L;
m_id_isSet = false; m_id_isSet = false;
username = new QString(""); username = new QString("");
@ -56,7 +56,7 @@ SWGUser::init() {
} }
void void
SWGUser::cleanup() { OAIUser::cleanup() {
if(username != nullptr) { if(username != nullptr) {
delete username; delete username;
@ -79,8 +79,8 @@ SWGUser::cleanup() {
} }
SWGUser* OAIUser*
SWGUser::fromJson(QString json) { OAIUser::fromJson(QString json) {
QByteArray array (json.toStdString().c_str()); QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array); QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object(); QJsonObject jsonObject = doc.object();
@ -89,27 +89,27 @@ SWGUser::fromJson(QString json) {
} }
void void
SWGUser::fromJsonObject(QJsonObject pJson) { OAIUser::fromJsonObject(QJsonObject pJson) {
::Swagger::setValue(&id, pJson["id"], "qint64", ""); ::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 QString
SWGUser::asJson () OAIUser::asJson ()
{ {
QJsonObject obj = this->asJsonObject(); QJsonObject obj = this->asJsonObject();
QJsonDocument doc(obj); QJsonDocument doc(obj);
@ -118,7 +118,7 @@ SWGUser::asJson ()
} }
QJsonObject QJsonObject
SWGUser::asJsonObject() { OAIUser::asJsonObject() {
QJsonObject obj; QJsonObject obj;
if(m_id_isSet){ if(m_id_isSet){
obj.insert("id", QJsonValue(id)); obj.insert("id", QJsonValue(id));
@ -149,88 +149,88 @@ SWGUser::asJsonObject() {
} }
qint64 qint64
SWGUser::getId() { OAIUser::getId() {
return id; return id;
} }
void void
SWGUser::setId(qint64 id) { OAIUser::setId(qint64 id) {
this->id = id; this->id = id;
this->m_id_isSet = true; this->m_id_isSet = true;
} }
QString* QString*
SWGUser::getUsername() { OAIUser::getUsername() {
return username; return username;
} }
void void
SWGUser::setUsername(QString* username) { OAIUser::setUsername(QString* username) {
this->username = username; this->username = username;
this->m_username_isSet = true; this->m_username_isSet = true;
} }
QString* QString*
SWGUser::getFirstName() { OAIUser::getFirstName() {
return first_name; return first_name;
} }
void void
SWGUser::setFirstName(QString* first_name) { OAIUser::setFirstName(QString* first_name) {
this->first_name = first_name; this->first_name = first_name;
this->m_first_name_isSet = true; this->m_first_name_isSet = true;
} }
QString* QString*
SWGUser::getLastName() { OAIUser::getLastName() {
return last_name; return last_name;
} }
void void
SWGUser::setLastName(QString* last_name) { OAIUser::setLastName(QString* last_name) {
this->last_name = last_name; this->last_name = last_name;
this->m_last_name_isSet = true; this->m_last_name_isSet = true;
} }
QString* QString*
SWGUser::getEmail() { OAIUser::getEmail() {
return email; return email;
} }
void void
SWGUser::setEmail(QString* email) { OAIUser::setEmail(QString* email) {
this->email = email; this->email = email;
this->m_email_isSet = true; this->m_email_isSet = true;
} }
QString* QString*
SWGUser::getPassword() { OAIUser::getPassword() {
return password; return password;
} }
void void
SWGUser::setPassword(QString* password) { OAIUser::setPassword(QString* password) {
this->password = password; this->password = password;
this->m_password_isSet = true; this->m_password_isSet = true;
} }
QString* QString*
SWGUser::getPhone() { OAIUser::getPhone() {
return phone; return phone;
} }
void void
SWGUser::setPhone(QString* phone) { OAIUser::setPhone(QString* phone) {
this->phone = phone; this->phone = phone;
this->m_phone_isSet = true; this->m_phone_isSet = true;
} }
qint32 qint32
SWGUser::getUserStatus() { OAIUser::getUserStatus() {
return user_status; return user_status;
} }
void void
SWGUser::setUserStatus(qint32 user_status) { OAIUser::setUserStatus(qint32 user_status) {
this->user_status = user_status; this->user_status = user_status;
this->m_user_status_isSet = true; this->m_user_status_isSet = true;
} }
bool bool
SWGUser::isSet(){ OAIUser::isSet(){
bool isObjectUpdated = false; bool isObjectUpdated = false;
do{ do{
if(m_id_isSet){ isObjectUpdated = true; break;} 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 * A User who is purchasing from the pet store
*/ */
#ifndef SWGUser_H_ #ifndef OAIUser_H_
#define SWGUser_H_ #define OAIUser_H_
#include <QJsonObject> #include <QJsonObject>
#include <QString> #include <QString>
#include "SWGObject.h" #include "OAIObject.h"
namespace Swagger { namespace OpenAPI {
class SWGUser: public SWGObject { class OAIUser: public OAIObject {
public: public:
SWGUser(); OAIUser();
SWGUser(QString json); OAIUser(QString json);
~SWGUser(); ~OAIUser();
void init(); void init();
void cleanup(); void cleanup();
QString asJson () override; QString asJson () override;
QJsonObject asJsonObject() override; QJsonObject asJsonObject() override;
void fromJsonObject(QJsonObject json) override; void fromJsonObject(QJsonObject json) override;
SWGUser* fromJson(QString jsonString) override; OAIUser* fromJson(QString jsonString) override;
qint64 getId(); qint64 getId();
void setId(qint64 id); 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. * Do not edit the class manually.
*/ */
#include "SWGUserApi.h" #include "OAIUserApi.h"
#include "SWGHelpers.h" #include "OAIHelpers.h"
#include "SWGModelFactory.h" #include "OAIModelFactory.h"
#include "SWGQObjectWrapper.h" #include "OAIQObjectWrapper.h"
#include <QJsonArray> #include <QJsonArray>
#include <QJsonDocument> #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->host = host;
this->basePath = basePath; this->basePath = basePath;
} }
void void
SWGUserApi::createUser(std::shared_ptr<SWGSWGUser>& swg_user) { OAIUserApi::createUser(std::shared_ptr<OAIOAIUser>& oai_user) {
QString fullPath; QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/user"); fullPath.append(this->host).append(this->basePath).append("/user");
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker(); OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
SWGHttpRequestInput input(fullPath, "POST"); OAIHttpRequestInput input(fullPath, "POST");
QString output = swg_user.asJson(); QString output = oai_user.asJson();
input.request_body.append(output); input.request_body.append(output);
@ -51,15 +51,15 @@ SWGUserApi::createUser(std::shared_ptr<SWGSWGUser>& swg_user) {
} }
connect(worker, connect(worker,
&SWGHttpRequestWorker::on_execution_finished, &OAIHttpRequestWorker::on_execution_finished,
this, this,
&SWGUserApi::createUserCallback); &OAIUserApi::createUserCallback);
worker->execute(&input); worker->execute(&input);
} }
void void
SWGUserApi::createUserCallback(SWGHttpRequestWorker * worker) { OAIUserApi::createUserCallback(OAIHttpRequestWorker * worker) {
QString msg; QString msg;
QString error_str = worker->error_str; QString error_str = worker->error_str;
QNetworkReply::NetworkError error_type = worker->error_type; QNetworkReply::NetworkError error_type = worker->error_type;
@ -82,20 +82,20 @@ SWGUserApi::createUserCallback(SWGHttpRequestWorker * worker) {
} }
void void
SWGUserApi::createUsersWithArrayInput(QList<SWGUser*>*& swg_user) { OAIUserApi::createUsersWithArrayInput(QList<OAIUser*>*& oai_user) {
QString fullPath; QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/user/createWithArray"); fullPath.append(this->host).append(this->basePath).append("/user/createWithArray");
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker(); OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
SWGHttpRequestInput input(fullPath, "POST"); OAIHttpRequestInput input(fullPath, "POST");
QJsonObject swg_user_jobj; QJsonObject oai_user_jobj;
toJsonArray((QList<void*>*)swg_user, swg_user_jobj, QString("body"), QString("SWGUser*")); 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(); QByteArray bytes = doc.toJson();
input.request_body.append(bytes); input.request_body.append(bytes);
@ -107,15 +107,15 @@ SWGUserApi::createUsersWithArrayInput(QList<SWGUser*>*& swg_user) {
} }
connect(worker, connect(worker,
&SWGHttpRequestWorker::on_execution_finished, &OAIHttpRequestWorker::on_execution_finished,
this, this,
&SWGUserApi::createUsersWithArrayInputCallback); &OAIUserApi::createUsersWithArrayInputCallback);
worker->execute(&input); worker->execute(&input);
} }
void void
SWGUserApi::createUsersWithArrayInputCallback(SWGHttpRequestWorker * worker) { OAIUserApi::createUsersWithArrayInputCallback(OAIHttpRequestWorker * worker) {
QString msg; QString msg;
QString error_str = worker->error_str; QString error_str = worker->error_str;
QNetworkReply::NetworkError error_type = worker->error_type; QNetworkReply::NetworkError error_type = worker->error_type;
@ -138,20 +138,20 @@ SWGUserApi::createUsersWithArrayInputCallback(SWGHttpRequestWorker * worker) {
} }
void void
SWGUserApi::createUsersWithListInput(QList<SWGUser*>*& swg_user) { OAIUserApi::createUsersWithListInput(QList<OAIUser*>*& oai_user) {
QString fullPath; QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/user/createWithList"); fullPath.append(this->host).append(this->basePath).append("/user/createWithList");
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker(); OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
SWGHttpRequestInput input(fullPath, "POST"); OAIHttpRequestInput input(fullPath, "POST");
QJsonObject swg_user_jobj; QJsonObject oai_user_jobj;
toJsonArray((QList<void*>*)swg_user, swg_user_jobj, QString("body"), QString("SWGUser*")); 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(); QByteArray bytes = doc.toJson();
input.request_body.append(bytes); input.request_body.append(bytes);
@ -163,15 +163,15 @@ SWGUserApi::createUsersWithListInput(QList<SWGUser*>*& swg_user) {
} }
connect(worker, connect(worker,
&SWGHttpRequestWorker::on_execution_finished, &OAIHttpRequestWorker::on_execution_finished,
this, this,
&SWGUserApi::createUsersWithListInputCallback); &OAIUserApi::createUsersWithListInputCallback);
worker->execute(&input); worker->execute(&input);
} }
void void
SWGUserApi::createUsersWithListInputCallback(SWGHttpRequestWorker * worker) { OAIUserApi::createUsersWithListInputCallback(OAIHttpRequestWorker * worker) {
QString msg; QString msg;
QString error_str = worker->error_str; QString error_str = worker->error_str;
QNetworkReply::NetworkError error_type = worker->error_type; QNetworkReply::NetworkError error_type = worker->error_type;
@ -194,7 +194,7 @@ SWGUserApi::createUsersWithListInputCallback(SWGHttpRequestWorker * worker) {
} }
void void
SWGUserApi::deleteUser(QString* username) { OAIUserApi::deleteUser(QString* username) {
QString fullPath; QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/user/{username}"); fullPath.append(this->host).append(this->basePath).append("/user/{username}");
@ -202,8 +202,8 @@ SWGUserApi::deleteUser(QString* username) {
fullPath.replace(usernamePathParam, stringValue(username)); fullPath.replace(usernamePathParam, stringValue(username));
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker(); OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
SWGHttpRequestInput input(fullPath, "DELETE"); OAIHttpRequestInput input(fullPath, "DELETE");
@ -214,15 +214,15 @@ SWGUserApi::deleteUser(QString* username) {
} }
connect(worker, connect(worker,
&SWGHttpRequestWorker::on_execution_finished, &OAIHttpRequestWorker::on_execution_finished,
this, this,
&SWGUserApi::deleteUserCallback); &OAIUserApi::deleteUserCallback);
worker->execute(&input); worker->execute(&input);
} }
void void
SWGUserApi::deleteUserCallback(SWGHttpRequestWorker * worker) { OAIUserApi::deleteUserCallback(OAIHttpRequestWorker * worker) {
QString msg; QString msg;
QString error_str = worker->error_str; QString error_str = worker->error_str;
QNetworkReply::NetworkError error_type = worker->error_type; QNetworkReply::NetworkError error_type = worker->error_type;
@ -245,7 +245,7 @@ SWGUserApi::deleteUserCallback(SWGHttpRequestWorker * worker) {
} }
void void
SWGUserApi::getUserByName(QString* username) { OAIUserApi::getUserByName(QString* username) {
QString fullPath; QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/user/{username}"); fullPath.append(this->host).append(this->basePath).append("/user/{username}");
@ -253,8 +253,8 @@ SWGUserApi::getUserByName(QString* username) {
fullPath.replace(usernamePathParam, stringValue(username)); fullPath.replace(usernamePathParam, stringValue(username));
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker(); OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
SWGHttpRequestInput input(fullPath, "GET"); OAIHttpRequestInput input(fullPath, "GET");
@ -265,15 +265,15 @@ SWGUserApi::getUserByName(QString* username) {
} }
connect(worker, connect(worker,
&SWGHttpRequestWorker::on_execution_finished, &OAIHttpRequestWorker::on_execution_finished,
this, this,
&SWGUserApi::getUserByNameCallback); &OAIUserApi::getUserByNameCallback);
worker->execute(&input); worker->execute(&input);
} }
void void
SWGUserApi::getUserByNameCallback(SWGHttpRequestWorker * worker) { OAIUserApi::getUserByNameCallback(OAIHttpRequestWorker * worker) {
QString msg; QString msg;
QString error_str = worker->error_str; QString error_str = worker->error_str;
QNetworkReply::NetworkError error_type = worker->error_type; QNetworkReply::NetworkError error_type = worker->error_type;
@ -286,8 +286,8 @@ SWGUserApi::getUserByNameCallback(SWGHttpRequestWorker * worker) {
} }
QString json(worker->response); QString json(worker->response);
SWGUser* output = static_cast<SWGUser*>(create(json, QString("SWGUser"))); OAIUser* output = static_cast<OAIUser*>(create(json, QString("OAIUser")));
auto wrapper = new SWGQObjectWrapper<SWGUser*> (output); auto wrapper = new OAIQObjectWrapper<OAIUser*> (output);
wrapper->deleteLater(); wrapper->deleteLater();
worker->deleteLater(); worker->deleteLater();
@ -300,7 +300,7 @@ SWGUserApi::getUserByNameCallback(SWGHttpRequestWorker * worker) {
} }
void void
SWGUserApi::loginUser(QString* username, QString* password) { OAIUserApi::loginUser(QString* username, QString* password) {
QString fullPath; QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/user/login"); 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))); .append(QUrl::toPercentEncoding(stringValue(password)));
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker(); OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
SWGHttpRequestInput input(fullPath, "GET"); OAIHttpRequestInput input(fullPath, "GET");
@ -334,15 +334,15 @@ SWGUserApi::loginUser(QString* username, QString* password) {
} }
connect(worker, connect(worker,
&SWGHttpRequestWorker::on_execution_finished, &OAIHttpRequestWorker::on_execution_finished,
this, this,
&SWGUserApi::loginUserCallback); &OAIUserApi::loginUserCallback);
worker->execute(&input); worker->execute(&input);
} }
void void
SWGUserApi::loginUserCallback(SWGHttpRequestWorker * worker) { OAIUserApi::loginUserCallback(OAIHttpRequestWorker * worker) {
QString msg; QString msg;
QString error_str = worker->error_str; QString error_str = worker->error_str;
QNetworkReply::NetworkError error_type = worker->error_type; QNetworkReply::NetworkError error_type = worker->error_type;
@ -356,7 +356,7 @@ SWGUserApi::loginUserCallback(SWGHttpRequestWorker * worker) {
QString json(worker->response); QString json(worker->response);
QString* output = static_cast<QString*>(create(json, QString("QString"))); QString* output = static_cast<QString*>(create(json, QString("QString")));
auto wrapper = new SWGQObjectWrapper<QString*> (output); auto wrapper = new OAIQObjectWrapper<QString*> (output);
wrapper->deleteLater(); wrapper->deleteLater();
worker->deleteLater(); worker->deleteLater();
@ -369,14 +369,14 @@ SWGUserApi::loginUserCallback(SWGHttpRequestWorker * worker) {
} }
void void
SWGUserApi::logoutUser() { OAIUserApi::logoutUser() {
QString fullPath; QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/user/logout"); fullPath.append(this->host).append(this->basePath).append("/user/logout");
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker(); OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
SWGHttpRequestInput input(fullPath, "GET"); OAIHttpRequestInput input(fullPath, "GET");
@ -387,15 +387,15 @@ SWGUserApi::logoutUser() {
} }
connect(worker, connect(worker,
&SWGHttpRequestWorker::on_execution_finished, &OAIHttpRequestWorker::on_execution_finished,
this, this,
&SWGUserApi::logoutUserCallback); &OAIUserApi::logoutUserCallback);
worker->execute(&input); worker->execute(&input);
} }
void void
SWGUserApi::logoutUserCallback(SWGHttpRequestWorker * worker) { OAIUserApi::logoutUserCallback(OAIHttpRequestWorker * worker) {
QString msg; QString msg;
QString error_str = worker->error_str; QString error_str = worker->error_str;
QNetworkReply::NetworkError error_type = worker->error_type; QNetworkReply::NetworkError error_type = worker->error_type;
@ -418,7 +418,7 @@ SWGUserApi::logoutUserCallback(SWGHttpRequestWorker * worker) {
} }
void void
SWGUserApi::updateUser(QString* username, std::shared_ptr<SWGSWGUser>& swg_user) { OAIUserApi::updateUser(QString* username, std::shared_ptr<OAIOAIUser>& oai_user) {
QString fullPath; QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/user/{username}"); 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)); fullPath.replace(usernamePathParam, stringValue(username));
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker(); OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
SWGHttpRequestInput input(fullPath, "PUT"); OAIHttpRequestInput input(fullPath, "PUT");
QString output = swg_user.asJson(); QString output = oai_user.asJson();
input.request_body.append(output); input.request_body.append(output);
@ -441,15 +441,15 @@ SWGUserApi::updateUser(QString* username, std::shared_ptr<SWGSWGUser>& swg_user)
} }
connect(worker, connect(worker,
&SWGHttpRequestWorker::on_execution_finished, &OAIHttpRequestWorker::on_execution_finished,
this, this,
&SWGUserApi::updateUserCallback); &OAIUserApi::updateUserCallback);
worker->execute(&input); worker->execute(&input);
} }
void void
SWGUserApi::updateUserCallback(SWGHttpRequestWorker * worker) { OAIUserApi::updateUserCallback(OAIHttpRequestWorker * worker) {
QString msg; QString msg;
QString error_str = worker->error_str; QString error_str = worker->error_str;
QNetworkReply::NetworkError error_type = worker->error_type; QNetworkReply::NetworkError error_type = worker->error_type;

View File

@ -10,56 +10,56 @@
* Do not edit the class manually. * Do not edit the class manually.
*/ */
#ifndef _SWG_SWGUserApi_H_ #ifndef _OAI_OAIUserApi_H_
#define _SWG_SWGUserApi_H_ #define _OAI_OAIUserApi_H_
#include "SWGHttpRequest.h" #include "OAIHttpRequest.h"
#include "OAIUser.h"
#include <QList> #include <QList>
#include <QString> #include <QString>
#include "SWGUser.h"
#include <QObject> #include <QObject>
namespace Swagger { namespace OpenAPI {
class SWGUserApi: public QObject { class OAIUserApi: public QObject {
Q_OBJECT Q_OBJECT
public: public:
SWGUserApi(); OAIUserApi();
SWGUserApi(QString host, QString basePath); OAIUserApi(QString host, QString basePath);
~SWGUserApi(); ~OAIUserApi();
QString host; QString host;
QString basePath; QString basePath;
QMap<QString, QString> defaultHeaders; QMap<QString, QString> defaultHeaders;
void createUser(std::shared_ptr<SWGSWGUser>& swg_user); void createUser(std::shared_ptr<OAIOAIUser>& oai_user);
void createUsersWithArrayInput(QList<SWGUser*>*& swg_user); void createUsersWithArrayInput(QList<OAIUser*>*& oai_user);
void createUsersWithListInput(QList<SWGUser*>*& swg_user); void createUsersWithListInput(QList<OAIUser*>*& oai_user);
void deleteUser(QString* username); void deleteUser(QString* username);
void getUserByName(QString* username); void getUserByName(QString* username);
void loginUser(QString* username, QString* password); void loginUser(QString* username, QString* password);
void logoutUser(); void logoutUser();
void updateUser(QString* username, std::shared_ptr<SWGSWGUser>& swg_user); void updateUser(QString* username, std::shared_ptr<OAIOAIUser>& oai_user);
private: private:
void createUserCallback (SWGHttpRequestWorker * worker); void createUserCallback (OAIHttpRequestWorker * worker);
void createUsersWithArrayInputCallback (SWGHttpRequestWorker * worker); void createUsersWithArrayInputCallback (OAIHttpRequestWorker * worker);
void createUsersWithListInputCallback (SWGHttpRequestWorker * worker); void createUsersWithListInputCallback (OAIHttpRequestWorker * worker);
void deleteUserCallback (SWGHttpRequestWorker * worker); void deleteUserCallback (OAIHttpRequestWorker * worker);
void getUserByNameCallback (SWGHttpRequestWorker * worker); void getUserByNameCallback (OAIHttpRequestWorker * worker);
void loginUserCallback (SWGHttpRequestWorker * worker); void loginUserCallback (OAIHttpRequestWorker * worker);
void logoutUserCallback (SWGHttpRequestWorker * worker); void logoutUserCallback (OAIHttpRequestWorker * worker);
void updateUserCallback (SWGHttpRequestWorker * worker); void updateUserCallback (OAIHttpRequestWorker * worker);
signals: signals:
void createUserSignal(); void createUserSignal();
void createUsersWithArrayInputSignal(); void createUsersWithArrayInputSignal();
void createUsersWithListInputSignal(); void createUsersWithListInputSignal();
void deleteUserSignal(); void deleteUserSignal();
void getUserByNameSignal(SWGUser* summary); void getUserByNameSignal(OAIUser* summary);
void loginUserSignal(QString* summary); void loginUserSignal(QString* summary);
void logoutUserSignal(); void logoutUserSignal();
void updateUserSignal(); void updateUserSignal();
@ -68,19 +68,19 @@ signals:
void createUsersWithArrayInputSignalE(QNetworkReply::NetworkError error_type, QString& error_str); void createUsersWithArrayInputSignalE(QNetworkReply::NetworkError error_type, QString& error_str);
void createUsersWithListInputSignalE(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 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 loginUserSignalE(QString* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void logoutUserSignalE(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 updateUserSignalE(QNetworkReply::NetworkError error_type, QString& error_str);
void createUserSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); void createUserSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void createUsersWithArrayInputSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); void createUsersWithArrayInputSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void createUsersWithListInputSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); void createUsersWithListInputSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void deleteUserSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); void deleteUserSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void getUserByNameSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); void getUserByNameSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void loginUserSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); void loginUserSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void logoutUserSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); void logoutUserSignalEFull(OAIHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void updateUserSignalEFull(SWGHttpRequestWorker* 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 += \ HEADERS += \
# Models # Models
$${PWD}/SWGApiResponse.h \ $${PWD}/OAIApiResponse.h \
$${PWD}/SWGCategory.h \ $${PWD}/OAICategory.h \
$${PWD}/SWGOrder.h \ $${PWD}/OAIOrder.h \
$${PWD}/SWGPet.h \ $${PWD}/OAIPet.h \
$${PWD}/SWGTag.h \ $${PWD}/OAITag.h \
$${PWD}/SWGUser.h \ $${PWD}/OAIUser.h \
# APIs # APIs
$${PWD}/SWGPetApi.h \ $${PWD}/OAIPetApi.h \
$${PWD}/SWGStoreApi.h \ $${PWD}/OAIStoreApi.h \
$${PWD}/SWGUserApi.h \ $${PWD}/OAIUserApi.h \
# Others # Others
$${PWD}/SWGHelpers.h \ $${PWD}/OAIHelpers.h \
$${PWD}/SWGHttpRequest.h \ $${PWD}/OAIHttpRequest.h \
$${PWD}/SWGModelFactory.h \ $${PWD}/OAIModelFactory.h \
$${PWD}/SWGObject.h \ $${PWD}/OAIObject.h \
$${PWD}/SWGQObjectWrapper.h $${PWD}/OAIQObjectWrapper.h
SOURCES += \ SOURCES += \
# Models # Models
$${PWD}/SWGApiResponse.cpp \ $${PWD}/OAIApiResponse.cpp \
$${PWD}/SWGCategory.cpp \ $${PWD}/OAICategory.cpp \
$${PWD}/SWGOrder.cpp \ $${PWD}/OAIOrder.cpp \
$${PWD}/SWGPet.cpp \ $${PWD}/OAIPet.cpp \
$${PWD}/SWGTag.cpp \ $${PWD}/OAITag.cpp \
$${PWD}/SWGUser.cpp \ $${PWD}/OAIUser.cpp \
# APIs # APIs
$${PWD}/SWGPetApi.cpp \ $${PWD}/OAIPetApi.cpp \
$${PWD}/SWGStoreApi.cpp \ $${PWD}/OAIStoreApi.cpp \
$${PWD}/SWGUserApi.cpp \ $${PWD}/OAIUserApi.cpp \
# Others # Others
$${PWD}/SWGHelpers.cpp \ $${PWD}/OAIHelpers.cpp \
$${PWD}/SWGHttpRequest.cpp $${PWD}/OAIHttpRequest.cpp

View File

@ -15,7 +15,7 @@
#include "pistache/router.h" #include "pistache/router.h"
#include "PetApiImpl.h" #include "PetApiImpl.h"
using namespace io::swagger::server::api; using namespace org::openapitools::server::api;
int main() { int main() {
Pistache::Address addr(Pistache::Ipv4::any(), Pistache::Port(8080)); 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. This API Server was generated by the [OpenAPI Generator](https://openapi-generator.tech) project.
It uses the [Pistache](https://github.com/oktal/pistache) Framework. It uses the [Pistache](https://github.com/oktal/pistache) Framework.
## Files organization ## Files organization
The Pistache C++ REST server generator creates three folders: 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 - `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 put it under the model folder
## Namespaces ## Namespaces
io::swagger::server::api org.openapitools.server.api
org.openapitools.server.model
io::swagger::server::model

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -31,14 +31,14 @@
#include "Pet.h" #include "Pet.h"
#include <string> #include <string>
namespace io { namespace org {
namespace swagger { namespace openapitools {
namespace server { namespace server {
namespace api { 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: public:
PetApiImpl(Pistache::Address addr); PetApiImpl(Pistache::Address addr);
~PetApiImpl() { }; ~PetApiImpl() { };

View File

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

View File

@ -31,14 +31,14 @@
#include <map> #include <map>
#include <string> #include <string>
namespace io { namespace org {
namespace swagger { namespace openapitools {
namespace server { namespace server {
namespace api { 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: public:
StoreApiImpl(Pistache::Address addr); StoreApiImpl(Pistache::Address addr);
~StoreApiImpl() { }; ~StoreApiImpl() { };

View File

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

View File

@ -31,14 +31,14 @@
#include <string> #include <string>
#include <vector> #include <vector>
namespace io { namespace org {
namespace swagger { namespace openapitools {
namespace server { namespace server {
namespace api { 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: public:
UserApiImpl(Pistache::Address addr); UserApiImpl(Pistache::Address addr);
~UserApiImpl() { }; ~UserApiImpl() { };

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