Set default base path and change constructor to const ref (#2973)

This commit is contained in:
sunn 2019-05-26 11:03:48 +02:00 committed by William Cheng
parent 2bc9592bd5
commit 2e6b911022
68 changed files with 457 additions and 121 deletions

View File

@ -19,6 +19,8 @@ package org.openapitools.codegen.languages;
import com.google.common.collect.ImmutableMap;
import com.samskivert.mustache.Mustache;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.media.Schema;
import org.apache.commons.io.FilenameUtils;
import org.apache.commons.lang3.StringUtils;
@ -26,10 +28,12 @@ import org.openapitools.codegen.CodegenConfig;
import org.openapitools.codegen.CodegenProperty;
import org.openapitools.codegen.DefaultCodegen;
import org.openapitools.codegen.templating.mustache.IndentedLambda;
import org.openapitools.codegen.utils.URLPathUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.File;
import java.net.URL;
import java.util.Arrays;
import java.util.Map;
@ -300,4 +304,17 @@ abstract public class AbstractCppCodegen extends DefaultCodegen implements Codeg
}
}
}
@Override
public void preprocessOpenAPI(OpenAPI openAPI) {
URL url = URLPathUtils.getServerURL(openAPI);
String port = URLPathUtils.getPort(url, "");
String host = url.getHost();
if(!port.isEmpty()) {
this.additionalProperties.put("serverPort", port);
}
if(!host.isEmpty()) {
this.additionalProperties.put("serverHost", host);
}
}
}

View File

@ -404,14 +404,7 @@ public class CppPistacheServerCodegen extends AbstractCppCodegen {
public String getTypeDeclaration(String str) {
return toModelName(str);
}
@Override
public void preprocessOpenAPI(OpenAPI openAPI) {
URL url = URLPathUtils.getServerURL(openAPI);
String port = URLPathUtils.getPort(url, "8080");
this.additionalProperties.put("serverPort", port);
}
/**
* Specify whether external libraries will be added during the generation
* @param value the value to be set

View File

@ -194,13 +194,6 @@ public class CppQt5QHttpEngineServerCodegen extends CppQt5AbstractCodegen implem
return result;
}
@Override
public void preprocessOpenAPI(OpenAPI openAPI) {
URL url = URLPathUtils.getServerURL(openAPI);
String port = URLPathUtils.getPort(url, "8080");
this.additionalProperties.put("serverPort", port);
}
@Override
public String toApiFilename(String name) {
return modelNamePrefix + sanitizeName(camelize(name)) + "ApiHandler";

View File

@ -53,7 +53,7 @@ int main() {
std::vector<int> sigs{SIGQUIT, SIGINT, SIGTERM, SIGHUP};
setUpUnixSignals(sigs);
#endif
Pistache::Address addr(Pistache::Ipv4::any(), Pistache::Port({{serverPort}}));
Pistache::Address addr(Pistache::Ipv4::any(), Pistache::Port({{#serverPort}}{{serverPort}}{{/serverPort}}{{^serverPort}}8080{{/serverPort}}));
httpEndpoint = new Pistache::Http::Endpoint((addr));
auto router = std::make_shared<Pistache::Rest::Router>();

View File

@ -9,7 +9,8 @@
namespace {{this}} {
{{/cppNamespaceDeclarations}}
{{classname}}::{{classname}}() {
{{classname}}::{{classname}}() : basePath("{{{basePathWithoutHost}}}"),
host("{{#serverHost}}{{#scheme}}{{scheme}}://{{/scheme}}{{serverHost}}{{#serverPort}}:{{serverPort}}{{/serverPort}}{{/serverHost}}") {
}
@ -17,11 +18,24 @@ namespace {{this}} {
}
{{classname}}::{{classname}}(QString host, QString basePath) {
{{classname}}::{{classname}}(const QString& host, const QString& basePath) {
this->host = host;
this->basePath = basePath;
}
void {{classname}}::setBasePath(const QString& basePath){
this->basePath = basePath;
}
void {{classname}}::setHost(const QString& host){
this->host = host;
}
void {{classname}}::addHeaders(const QString& key, const QString& value){
defaultHeaders.insert(key, value);
}
{{#operations}}
{{#operation}}
void

View File

@ -18,16 +18,19 @@ class {{classname}}: public QObject {
public:
{{classname}}();
{{classname}}(QString host, QString basePath);
{{classname}}(const QString& host, const QString& basePath);
~{{classname}}();
QString host;
QString basePath;
QMap<QString, QString> defaultHeaders;
void setBasePath(const QString& basePath);
void setHost(const QString& host);
void addHeaders(const QString& key, const QString& value);
{{#operations}}{{#operation}}void {{nickname}}({{#allParams}}const {{{dataType}}}& {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});
{{/operation}}{{/operations}}
private:
QString basePath;
QString host;
QMap<QString, QString> defaultHeaders;
{{#operations}}{{#operation}}void {{nickname}}Callback ({{prefix}}HttpRequestWorker * worker);
{{/operation}}{{/operations}}
signals:

View File

@ -58,7 +58,7 @@ int main(int argc, char * argv[])
QStringList() << "p" << "port",
"port to listen on",
"port",
"{{serverPort}}"
"{{#serverPort}}{{serverPort}}{{/serverPort}}{{^serverPort}}8080{{/serverPort}}"
);
parser.addOption(portOption);
parser.addHelpOption();

View File

@ -1 +1 @@
3.0.1-SNAPSHOT
4.0.1-SNAPSHOT

View File

@ -13,8 +13,7 @@ PetApiTests::~PetApiTests () {
OAIPetApi* PetApiTests::getApi() {
auto api = new OAIPetApi();
api->host = "http://petstore.swagger.io";
api->basePath = "/v2";
api->setHost("http://petstore.swagger.io");
return api;
}

View File

@ -13,8 +13,7 @@ StoreApiTests::~StoreApiTests () {
OAIStoreApi* StoreApiTests::getApi() {
auto api = new OAIStoreApi();
api->host = "http://petstore.swagger.io";
api->basePath = "/v2";
api->setHost("http://petstore.swagger.io");
return api;
}
@ -43,6 +42,7 @@ void StoreApiTests::placeOrderTest() {
};
connect(this, &StoreApiTests::quit, finalizer);
connect(api, &OAIStoreApi::placeOrderSignal, this, validator);
connect(api, &OAIStoreApi::placeOrderSignalE, this, finalizer);
connect(&timer, &QTimer::timeout, &loop, finalizer);
OAIOrder order;

View File

@ -13,8 +13,7 @@ UserApiTests::~UserApiTests () {
OAIUserApi* UserApiTests::getApi() {
auto api = new OAIUserApi();
api->host = "http://petstore.swagger.io";
api->basePath = "/v2";
api->setHost("http://petstore.swagger.io");
return api;
}

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore
* 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
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore
* 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
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore
* 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
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore
* 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
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore
* 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
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore
* 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
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore
* 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
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore
* 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
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore
* 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
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore
* 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
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore
* 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
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore
* 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
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore
* 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
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore
* 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
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore
* 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
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -18,7 +18,8 @@
namespace OpenAPI {
OAIPetApi::OAIPetApi() {
OAIPetApi::OAIPetApi() : basePath("/v2"),
host("petstore.swagger.io") {
}
@ -26,11 +27,24 @@ OAIPetApi::~OAIPetApi() {
}
OAIPetApi::OAIPetApi(QString host, QString basePath) {
OAIPetApi::OAIPetApi(const QString& host, const QString& basePath) {
this->host = host;
this->basePath = basePath;
}
void OAIPetApi::setBasePath(const QString& basePath){
this->basePath = basePath;
}
void OAIPetApi::setHost(const QString& host){
this->host = host;
}
void OAIPetApi::addHeaders(const QString& key, const QString& value){
defaultHeaders.insert(key, value);
}
void
OAIPetApi::addPet(const OAIPet& body) {
QString fullPath;
@ -91,7 +105,7 @@ OAIPetApi::deletePet(const qint64& pet_id, const QString& api_key) {
OAIHttpRequestInput input(fullPath, "DELETE");
if (api_key != nullptr) {
input.headers.insert("api_key", "api_key");
input.headers.insert("api_key", api_key);
}
foreach(QString key, this->defaultHeaders.keys()) {

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore
* 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
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -29,13 +29,13 @@ class OAIPetApi: public QObject {
public:
OAIPetApi();
OAIPetApi(QString host, QString basePath);
OAIPetApi(const QString& host, const QString& basePath);
~OAIPetApi();
QString host;
QString basePath;
QMap<QString, QString> defaultHeaders;
void setBasePath(const QString& basePath);
void setHost(const QString& host);
void addHeaders(const QString& key, const QString& value);
void addPet(const OAIPet& body);
void deletePet(const qint64& pet_id, const QString& api_key);
void findPetsByStatus(const QList<QString>& status);
@ -46,6 +46,9 @@ public:
void uploadFile(const qint64& pet_id, const QString& additional_metadata, const OAIHttpRequestInputFileElement*& file);
private:
QString basePath;
QString host;
QMap<QString, QString> defaultHeaders;
void addPetCallback (OAIHttpRequestWorker * worker);
void deletePetCallback (OAIHttpRequestWorker * worker);
void findPetsByStatusCallback (OAIHttpRequestWorker * worker);

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore
* 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
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -18,7 +18,8 @@
namespace OpenAPI {
OAIStoreApi::OAIStoreApi() {
OAIStoreApi::OAIStoreApi() : basePath("/v2"),
host("petstore.swagger.io") {
}
@ -26,11 +27,24 @@ OAIStoreApi::~OAIStoreApi() {
}
OAIStoreApi::OAIStoreApi(QString host, QString basePath) {
OAIStoreApi::OAIStoreApi(const QString& host, const QString& basePath) {
this->host = host;
this->basePath = basePath;
}
void OAIStoreApi::setBasePath(const QString& basePath){
this->basePath = basePath;
}
void OAIStoreApi::setHost(const QString& host){
this->host = host;
}
void OAIStoreApi::addHeaders(const QString& key, const QString& value){
defaultHeaders.insert(key, value);
}
void
OAIStoreApi::deleteOrder(const QString& order_id) {
QString fullPath;

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore
* 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
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -28,19 +28,22 @@ class OAIStoreApi: public QObject {
public:
OAIStoreApi();
OAIStoreApi(QString host, QString basePath);
OAIStoreApi(const QString& host, const QString& basePath);
~OAIStoreApi();
QString host;
QString basePath;
QMap<QString, QString> defaultHeaders;
void setBasePath(const QString& basePath);
void setHost(const QString& host);
void addHeaders(const QString& key, const QString& value);
void deleteOrder(const QString& order_id);
void getInventory();
void getOrderById(const qint64& order_id);
void placeOrder(const OAIOrder& body);
private:
QString basePath;
QString host;
QMap<QString, QString> defaultHeaders;
void deleteOrderCallback (OAIHttpRequestWorker * worker);
void getInventoryCallback (OAIHttpRequestWorker * worker);
void getOrderByIdCallback (OAIHttpRequestWorker * worker);

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore
* 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
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore
* 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
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore
* 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
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore
* 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
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore
* 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
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -18,7 +18,8 @@
namespace OpenAPI {
OAIUserApi::OAIUserApi() {
OAIUserApi::OAIUserApi() : basePath("/v2"),
host("petstore.swagger.io") {
}
@ -26,11 +27,24 @@ OAIUserApi::~OAIUserApi() {
}
OAIUserApi::OAIUserApi(QString host, QString basePath) {
OAIUserApi::OAIUserApi(const QString& host, const QString& basePath) {
this->host = host;
this->basePath = basePath;
}
void OAIUserApi::setBasePath(const QString& basePath){
this->basePath = basePath;
}
void OAIUserApi::setHost(const QString& host){
this->host = host;
}
void OAIUserApi::addHeaders(const QString& key, const QString& value){
defaultHeaders.insert(key, value);
}
void
OAIUserApi::createUser(const OAIUser& body) {
QString fullPath;

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore
* 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
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -28,13 +28,13 @@ class OAIUserApi: public QObject {
public:
OAIUserApi();
OAIUserApi(QString host, QString basePath);
OAIUserApi(const QString& host, const QString& basePath);
~OAIUserApi();
QString host;
QString basePath;
QMap<QString, QString> defaultHeaders;
void setBasePath(const QString& basePath);
void setHost(const QString& host);
void addHeaders(const QString& key, const QString& value);
void createUser(const OAIUser& body);
void createUsersWithArrayInput(const QList<OAIUser>& body);
void createUsersWithListInput(const QList<OAIUser>& body);
@ -45,6 +45,9 @@ public:
void updateUser(const QString& username, const OAIUser& body);
private:
QString basePath;
QString host;
QMap<QString, QString> defaultHeaders;
void createUserCallback (OAIHttpRequestWorker * worker);
void createUsersWithArrayInputCallback (OAIHttpRequestWorker * worker);
void createUsersWithListInputCallback (OAIHttpRequestWorker * worker);

View File

@ -1 +1 @@
4.0.0-SNAPSHOT
4.0.1-SNAPSHOT

View File

@ -49,6 +49,17 @@ To run the server
./build/src/cpp-qt5-qhttpengine-server &
```
To override the default port via the command line, provide the parameters `port` and `address` like below
```shell
cpp-qt5-qhttpengine-server --port 9080 --address 127.17.0.1
```
or
```shell
cpp-qt5-qhttpengine-server -p 9080 -a 127.17.0.1
```
#### Invoke an API
```shell

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore
* 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
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore
* 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
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore
* 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
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore
* 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
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore
* 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
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore
* 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
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore
* 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
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore
* 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
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore
* 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
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore
* 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
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -37,13 +37,16 @@ OAIApiResponse::~OAIApiResponse() {
void
OAIApiResponse::init() {
m_code_isSet = false;
m_code_isValid = false;
m_type_isSet = false;
m_type_isValid = false;
m_message_isSet = false;
m_message_isValid = false;
}
}
void
OAIApiResponse::fromJson(QString jsonString) {
@ -55,12 +58,16 @@ OAIApiResponse::fromJson(QString jsonString) {
void
OAIApiResponse::fromJsonObject(QJsonObject json) {
m_code_isValid = ::OpenAPI::fromJsonValue(code, json[QString("code")]);
m_type_isValid = ::OpenAPI::fromJsonValue(type, json[QString("type")]);
m_message_isValid = ::OpenAPI::fromJsonValue(message, json[QString("message")]);
}
QString
@ -86,6 +93,7 @@ OAIApiResponse::asJsonObject() const {
return obj;
}
qint32
OAIApiResponse::getCode() const {
return code;
@ -96,6 +104,7 @@ OAIApiResponse::setCode(const qint32 &code) {
this->m_code_isSet = true;
}
QString
OAIApiResponse::getType() const {
return type;
@ -106,6 +115,7 @@ OAIApiResponse::setType(const QString &type) {
this->m_type_isSet = true;
}
QString
OAIApiResponse::getMessage() const {
return message;

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore
* 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
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -25,6 +25,7 @@
#include <QString>
#include "OAIObject.h"
#include "OAIEnum.h"
namespace OpenAPI {
@ -39,30 +40,39 @@ public:
void fromJsonObject(QJsonObject json) override;
void fromJson(QString jsonString) override;
qint32 getCode() const;
void setCode(const qint32 &code);
QString getType() const;
void setType(const QString &type);
QString getMessage() const;
void setMessage(const QString &message);
virtual bool isSet() const override;
virtual bool isValid() const override;
private:
void init();
qint32 code;
bool m_code_isSet;
bool m_code_isValid;
QString type;
bool m_type_isSet;
bool m_type_isValid;
QString message;
bool m_message_isSet;
bool m_message_isValid;
};
};
}

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore
* 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
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -37,11 +37,13 @@ OAICategory::~OAICategory() {
void
OAICategory::init() {
m_id_isSet = false;
m_id_isValid = false;
m_name_isSet = false;
m_name_isValid = false;
}
}
void
OAICategory::fromJson(QString jsonString) {
@ -53,10 +55,13 @@ OAICategory::fromJson(QString jsonString) {
void
OAICategory::fromJsonObject(QJsonObject json) {
m_id_isValid = ::OpenAPI::fromJsonValue(id, json[QString("id")]);
m_name_isValid = ::OpenAPI::fromJsonValue(name, json[QString("name")]);
}
QString
@ -79,6 +84,7 @@ OAICategory::asJsonObject() const {
return obj;
}
qint64
OAICategory::getId() const {
return id;
@ -89,6 +95,7 @@ OAICategory::setId(const qint64 &id) {
this->m_id_isSet = true;
}
QString
OAICategory::getName() const {
return name;

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore
* 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
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -25,6 +25,7 @@
#include <QString>
#include "OAIObject.h"
#include "OAIEnum.h"
namespace OpenAPI {
@ -39,24 +40,31 @@ public:
void fromJsonObject(QJsonObject json) override;
void fromJson(QString jsonString) override;
qint64 getId() const;
void setId(const qint64 &id);
QString getName() const;
void setName(const QString &name);
virtual bool isSet() const override;
virtual bool isValid() const override;
private:
void init();
qint64 id;
bool m_id_isSet;
bool m_id_isValid;
QString name;
bool m_name_isSet;
bool m_name_isValid;
};
};
}

View File

@ -0,0 +1,64 @@
/**
* OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
#ifndef OAI_ENUM_H
#define OAI_ENUM_H
#include <QString>
#include <QJsonValue>
namespace OpenAPI {
class OAIEnum {
public:
OAIEnum() {
}
OAIEnum(QString jsonString) {
fromJson(jsonString);
}
virtual ~OAIEnum(){
}
virtual QJsonValue asJsonValue() const {
return QJsonValue(jstr);
}
virtual QString asJson() const {
return jstr;
}
virtual void fromJson(QString jsonString) {
jstr = jsonString;
}
virtual void fromJsonValue(QJsonValue jval) {
jstr = jval.toString();
}
virtual bool isSet() const {
return false;
}
virtual bool isValid() const {
return true;
}
private :
QString jstr;
};
}
#endif // OAI_ENUM_H

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore
* 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
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -12,7 +12,7 @@
#include <QDebug>
#include "OAIHelpers.h"
#include "OAIObject.h"
namespace OpenAPI {
@ -64,6 +64,11 @@ toStringValue(const double &value){
return QString::number(value);
}
QString
toStringValue(const OAIEnum &value){
return value.asJson();
}
QJsonValue
toJsonValue(const QString &value){
return QJsonValue(value);
@ -114,6 +119,11 @@ toJsonValue(const OAIObject &value){
return value.asJsonObject();
}
QJsonValue
toJsonValue(const OAIEnum &value){
return value.asJsonValue();
}
bool
fromStringValue(const QString &inStr, QString &value){
value.clear();
@ -202,6 +212,12 @@ fromStringValue(const QString &inStr, double &value){
return ok;
}
bool
fromStringValue(const QString &inStr, OAIEnum &value){
value.fromJson(inStr);
return true;
}
bool
fromJsonValue(QString &value, const QJsonValue &jval){
bool ok = true;
@ -324,4 +340,10 @@ fromJsonValue(OAIObject &value, const QJsonValue &jval){
return ok;
}
bool
fromJsonValue(OAIEnum &value, const QJsonValue &jval){
value.fromJsonValue(jval);
return true;
}
}

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore
* 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
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -23,6 +23,7 @@
#include <QDate>
#include <QVariant>
#include "OAIObject.h"
#include "OAIEnum.h"
namespace OpenAPI {
@ -35,6 +36,7 @@ namespace OpenAPI {
QString toStringValue(const bool &value);
QString toStringValue(const float &value);
QString toStringValue(const double &value);
QString toStringValue(const OAIEnum &value);
template <typename T>
QString toStringValue(const QList<T> &val) {
@ -58,6 +60,7 @@ namespace OpenAPI {
QJsonValue toJsonValue(const float &value);
QJsonValue toJsonValue(const double &value);
QJsonValue toJsonValue(const OAIObject &value);
QJsonValue toJsonValue(const OAIEnum &value);
template <typename T>
QJsonValue toJsonValue(const QList<T> &val) {
@ -86,6 +89,7 @@ namespace OpenAPI {
bool fromStringValue(const QString &inStr, bool &value);
bool fromStringValue(const QString &inStr, float &value);
bool fromStringValue(const QString &inStr, double &value);
bool fromStringValue(const QString &inStr, OAIEnum &value);
template <typename T>
bool fromStringValue(const QList<QString> &inStr, QList<T> &val) {
@ -119,6 +123,7 @@ namespace OpenAPI {
bool fromJsonValue(float &value, const QJsonValue &jval);
bool fromJsonValue(double &value, const QJsonValue &jval);
bool fromJsonValue(OAIObject &value, const QJsonValue &jval);
bool fromJsonValue(OAIEnum &value, const QJsonValue &jval);
template <typename T>
bool fromJsonValue(QList<T> &val, const QJsonValue &jval) {

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore
* 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
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore
* 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
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -37,19 +37,25 @@ OAIOrder::~OAIOrder() {
void
OAIOrder::init() {
m_id_isSet = false;
m_id_isValid = false;
m_pet_id_isSet = false;
m_pet_id_isValid = false;
m_quantity_isSet = false;
m_quantity_isValid = false;
m_ship_date_isSet = false;
m_ship_date_isValid = false;
m_status_isSet = false;
m_status_isValid = false;
m_complete_isSet = false;
m_complete_isValid = false;
}
}
void
OAIOrder::fromJson(QString jsonString) {
@ -61,18 +67,25 @@ OAIOrder::fromJson(QString jsonString) {
void
OAIOrder::fromJsonObject(QJsonObject json) {
m_id_isValid = ::OpenAPI::fromJsonValue(id, json[QString("id")]);
m_pet_id_isValid = ::OpenAPI::fromJsonValue(pet_id, json[QString("petId")]);
m_quantity_isValid = ::OpenAPI::fromJsonValue(quantity, json[QString("quantity")]);
m_ship_date_isValid = ::OpenAPI::fromJsonValue(ship_date, json[QString("shipDate")]);
m_status_isValid = ::OpenAPI::fromJsonValue(status, json[QString("status")]);
m_complete_isValid = ::OpenAPI::fromJsonValue(complete, json[QString("complete")]);
}
QString
@ -107,6 +120,7 @@ OAIOrder::asJsonObject() const {
return obj;
}
qint64
OAIOrder::getId() const {
return id;
@ -117,6 +131,7 @@ OAIOrder::setId(const qint64 &id) {
this->m_id_isSet = true;
}
qint64
OAIOrder::getPetId() const {
return pet_id;
@ -127,6 +142,7 @@ OAIOrder::setPetId(const qint64 &pet_id) {
this->m_pet_id_isSet = true;
}
qint32
OAIOrder::getQuantity() const {
return quantity;
@ -137,6 +153,7 @@ OAIOrder::setQuantity(const qint32 &quantity) {
this->m_quantity_isSet = true;
}
QDateTime
OAIOrder::getShipDate() const {
return ship_date;
@ -147,6 +164,7 @@ OAIOrder::setShipDate(const QDateTime &ship_date) {
this->m_ship_date_isSet = true;
}
QString
OAIOrder::getStatus() const {
return status;
@ -157,6 +175,7 @@ OAIOrder::setStatus(const QString &status) {
this->m_status_isSet = true;
}
bool
OAIOrder::isComplete() const {
return complete;

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore
* 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
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -26,6 +26,7 @@
#include <QString>
#include "OAIObject.h"
#include "OAIEnum.h"
namespace OpenAPI {
@ -40,48 +41,63 @@ public:
void fromJsonObject(QJsonObject json) override;
void fromJson(QString jsonString) override;
qint64 getId() const;
void setId(const qint64 &id);
qint64 getPetId() const;
void setPetId(const qint64 &pet_id);
qint32 getQuantity() const;
void setQuantity(const qint32 &quantity);
QDateTime getShipDate() const;
void setShipDate(const QDateTime &ship_date);
QString getStatus() const;
void setStatus(const QString &status);
bool isComplete() const;
void setComplete(const bool &complete);
virtual bool isSet() const override;
virtual bool isValid() const override;
private:
void init();
qint64 id;
bool m_id_isSet;
bool m_id_isValid;
qint64 pet_id;
bool m_pet_id_isSet;
bool m_pet_id_isValid;
qint32 quantity;
bool m_quantity_isSet;
bool m_quantity_isValid;
QDateTime ship_date;
bool m_ship_date_isSet;
bool m_ship_date_isValid;
QString status;
bool m_status_isSet;
bool m_status_isValid;
bool complete;
bool m_complete_isSet;
bool m_complete_isValid;
};
};
}

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore
* 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
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -37,19 +37,25 @@ OAIPet::~OAIPet() {
void
OAIPet::init() {
m_id_isSet = false;
m_id_isValid = false;
m_category_isSet = false;
m_category_isValid = false;
m_name_isSet = false;
m_name_isValid = false;
m_photo_urls_isSet = false;
m_photo_urls_isValid = false;
m_tags_isSet = false;
m_tags_isValid = false;
m_status_isSet = false;
m_status_isValid = false;
}
}
void
OAIPet::fromJson(QString jsonString) {
@ -61,18 +67,25 @@ OAIPet::fromJson(QString jsonString) {
void
OAIPet::fromJsonObject(QJsonObject json) {
m_id_isValid = ::OpenAPI::fromJsonValue(id, json[QString("id")]);
m_category_isValid = ::OpenAPI::fromJsonValue(category, json[QString("category")]);
m_name_isValid = ::OpenAPI::fromJsonValue(name, json[QString("name")]);
m_photo_urls_isValid = ::OpenAPI::fromJsonValue(photo_urls, json[QString("photoUrls")]);
m_tags_isValid = ::OpenAPI::fromJsonValue(tags, json[QString("tags")]);
m_status_isValid = ::OpenAPI::fromJsonValue(status, json[QString("status")]);
}
QString
@ -109,6 +122,7 @@ OAIPet::asJsonObject() const {
return obj;
}
qint64
OAIPet::getId() const {
return id;
@ -119,6 +133,7 @@ OAIPet::setId(const qint64 &id) {
this->m_id_isSet = true;
}
OAICategory
OAIPet::getCategory() const {
return category;
@ -129,6 +144,7 @@ OAIPet::setCategory(const OAICategory &category) {
this->m_category_isSet = true;
}
QString
OAIPet::getName() const {
return name;
@ -139,6 +155,7 @@ OAIPet::setName(const QString &name) {
this->m_name_isSet = true;
}
QList<QString>
OAIPet::getPhotoUrls() const {
return photo_urls;
@ -149,6 +166,7 @@ OAIPet::setPhotoUrls(const QList<QString> &photo_urls) {
this->m_photo_urls_isSet = true;
}
QList<OAITag>
OAIPet::getTags() const {
return tags;
@ -159,6 +177,7 @@ OAIPet::setTags(const QList<OAITag> &tags) {
this->m_tags_isSet = true;
}
QString
OAIPet::getStatus() const {
return status;

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore
* 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
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -28,6 +28,7 @@
#include <QString>
#include "OAIObject.h"
#include "OAIEnum.h"
namespace OpenAPI {
@ -42,48 +43,63 @@ public:
void fromJsonObject(QJsonObject json) override;
void fromJson(QString jsonString) override;
qint64 getId() const;
void setId(const qint64 &id);
OAICategory getCategory() const;
void setCategory(const OAICategory &category);
QString getName() const;
void setName(const QString &name);
QList<QString> getPhotoUrls() const;
void setPhotoUrls(const QList<QString> &photo_urls);
QList<OAITag> getTags() const;
void setTags(const QList<OAITag> &tags);
QString getStatus() const;
void setStatus(const QString &status);
virtual bool isSet() const override;
virtual bool isValid() const override;
private:
void init();
qint64 id;
bool m_id_isSet;
bool m_id_isValid;
OAICategory category;
bool m_category_isSet;
bool m_category_isValid;
QString name;
bool m_name_isSet;
bool m_name_isValid;
QList<QString> photo_urls;
bool m_photo_urls_isSet;
bool m_photo_urls_isValid;
QList<OAITag> tags;
bool m_tags_isSet;
bool m_tags_isValid;
QString status;
bool m_status_isSet;
bool m_status_isValid;
};
};
}

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore
* 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
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -37,11 +37,13 @@ OAITag::~OAITag() {
void
OAITag::init() {
m_id_isSet = false;
m_id_isValid = false;
m_name_isSet = false;
m_name_isValid = false;
}
}
void
OAITag::fromJson(QString jsonString) {
@ -53,10 +55,13 @@ OAITag::fromJson(QString jsonString) {
void
OAITag::fromJsonObject(QJsonObject json) {
m_id_isValid = ::OpenAPI::fromJsonValue(id, json[QString("id")]);
m_name_isValid = ::OpenAPI::fromJsonValue(name, json[QString("name")]);
}
QString
@ -79,6 +84,7 @@ OAITag::asJsonObject() const {
return obj;
}
qint64
OAITag::getId() const {
return id;
@ -89,6 +95,7 @@ OAITag::setId(const qint64 &id) {
this->m_id_isSet = true;
}
QString
OAITag::getName() const {
return name;

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore
* 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
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -25,6 +25,7 @@
#include <QString>
#include "OAIObject.h"
#include "OAIEnum.h"
namespace OpenAPI {
@ -39,24 +40,31 @@ public:
void fromJsonObject(QJsonObject json) override;
void fromJson(QString jsonString) override;
qint64 getId() const;
void setId(const qint64 &id);
QString getName() const;
void setName(const QString &name);
virtual bool isSet() const override;
virtual bool isValid() const override;
private:
void init();
qint64 id;
bool m_id_isSet;
bool m_id_isValid;
QString name;
bool m_name_isSet;
bool m_name_isValid;
};
};
}

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore
* 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
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -37,23 +37,31 @@ OAIUser::~OAIUser() {
void
OAIUser::init() {
m_id_isSet = false;
m_id_isValid = false;
m_username_isSet = false;
m_username_isValid = false;
m_first_name_isSet = false;
m_first_name_isValid = false;
m_last_name_isSet = false;
m_last_name_isValid = false;
m_email_isSet = false;
m_email_isValid = false;
m_password_isSet = false;
m_password_isValid = false;
m_phone_isSet = false;
m_phone_isValid = false;
m_user_status_isSet = false;
m_user_status_isValid = false;
}
}
void
OAIUser::fromJson(QString jsonString) {
@ -65,22 +73,31 @@ OAIUser::fromJson(QString jsonString) {
void
OAIUser::fromJsonObject(QJsonObject json) {
m_id_isValid = ::OpenAPI::fromJsonValue(id, json[QString("id")]);
m_username_isValid = ::OpenAPI::fromJsonValue(username, json[QString("username")]);
m_first_name_isValid = ::OpenAPI::fromJsonValue(first_name, json[QString("firstName")]);
m_last_name_isValid = ::OpenAPI::fromJsonValue(last_name, json[QString("lastName")]);
m_email_isValid = ::OpenAPI::fromJsonValue(email, json[QString("email")]);
m_password_isValid = ::OpenAPI::fromJsonValue(password, json[QString("password")]);
m_phone_isValid = ::OpenAPI::fromJsonValue(phone, json[QString("phone")]);
m_user_status_isValid = ::OpenAPI::fromJsonValue(user_status, json[QString("userStatus")]);
}
QString
@ -121,6 +138,7 @@ OAIUser::asJsonObject() const {
return obj;
}
qint64
OAIUser::getId() const {
return id;
@ -131,6 +149,7 @@ OAIUser::setId(const qint64 &id) {
this->m_id_isSet = true;
}
QString
OAIUser::getUsername() const {
return username;
@ -141,6 +160,7 @@ OAIUser::setUsername(const QString &username) {
this->m_username_isSet = true;
}
QString
OAIUser::getFirstName() const {
return first_name;
@ -151,6 +171,7 @@ OAIUser::setFirstName(const QString &first_name) {
this->m_first_name_isSet = true;
}
QString
OAIUser::getLastName() const {
return last_name;
@ -161,6 +182,7 @@ OAIUser::setLastName(const QString &last_name) {
this->m_last_name_isSet = true;
}
QString
OAIUser::getEmail() const {
return email;
@ -171,6 +193,7 @@ OAIUser::setEmail(const QString &email) {
this->m_email_isSet = true;
}
QString
OAIUser::getPassword() const {
return password;
@ -181,6 +204,7 @@ OAIUser::setPassword(const QString &password) {
this->m_password_isSet = true;
}
QString
OAIUser::getPhone() const {
return phone;
@ -191,6 +215,7 @@ OAIUser::setPhone(const QString &phone) {
this->m_phone_isSet = true;
}
qint32
OAIUser::getUserStatus() const {
return user_status;

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore
* 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
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -25,6 +25,7 @@
#include <QString>
#include "OAIObject.h"
#include "OAIEnum.h"
namespace OpenAPI {
@ -39,60 +40,79 @@ public:
void fromJsonObject(QJsonObject json) override;
void fromJson(QString jsonString) override;
qint64 getId() const;
void setId(const qint64 &id);
QString getUsername() const;
void setUsername(const QString &username);
QString getFirstName() const;
void setFirstName(const QString &first_name);
QString getLastName() const;
void setLastName(const QString &last_name);
QString getEmail() const;
void setEmail(const QString &email);
QString getPassword() const;
void setPassword(const QString &password);
QString getPhone() const;
void setPhone(const QString &phone);
qint32 getUserStatus() const;
void setUserStatus(const qint32 &user_status);
virtual bool isSet() const override;
virtual bool isValid() const override;
private:
void init();
qint64 id;
bool m_id_isSet;
bool m_id_isValid;
QString username;
bool m_username_isSet;
bool m_username_isValid;
QString first_name;
bool m_first_name_isSet;
bool m_first_name_isValid;
QString last_name;
bool m_last_name_isSet;
bool m_last_name_isValid;
QString email;
bool m_email_isSet;
bool m_email_isValid;
QString password;
bool m_password_isSet;
bool m_password_isValid;
QString phone;
bool m_phone_isSet;
bool m_phone_isValid;
qint32 user_status;
bool m_user_status_isSet;
bool m_user_status_isValid;
};
};
}

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore
* 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
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore
* 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
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore
* 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
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore
* 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
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore
* 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
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@ -2,7 +2,7 @@
* OpenAPI Petstore
* 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
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).