forked from loafle/openapi-generator-original
Supports: All OpenAPI 3.x data types: primitives, arrays, enums, nullable/optional fields, nested objects All parameter types: path, query, header, cookie, and combinations Schema composition: allOf (inheritance), oneOf (discriminated unions), anyOf (flexible unions) Security schemes: API key and bearer token authentication Discriminator-based polymorphic deserialization and error handling Provides: Error handling for invalid JSON, type mismatches, missing/unknown discriminator, and parameter validation Build system integration (CMake) for easy compilation and linking with required dependencies Clear build and run instructions for local development and testing Enables comprehensive, real-world validation of generated C++ server code against OpenAPI specifications
68 lines
1.1 KiB
C++
68 lines
1.1 KiB
C++
|
|
/**
|
|
* This file is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
* https://openapi-generator.tech
|
|
* Do not edit the class manually.
|
|
*/
|
|
#include "Address.h"
|
|
|
|
namespace models {
|
|
|
|
Address::Address()
|
|
: street("")
|
|
, city("")
|
|
, zipCode("")
|
|
, country("USA")
|
|
{
|
|
}
|
|
// =========================================
|
|
// ===== Getters/Setters =====
|
|
// =========================================
|
|
// ===================
|
|
// ===== Getters =====
|
|
// ===================
|
|
std::string Address::getStreet() const
|
|
{
|
|
return street;
|
|
}
|
|
std::string Address::getCity() const
|
|
{
|
|
return city;
|
|
}
|
|
std::string Address::getZipCode() const
|
|
{
|
|
return zipCode;
|
|
}
|
|
std::string Address::getCountry() const
|
|
{
|
|
return country;
|
|
}
|
|
|
|
// ===================
|
|
// ===== Setters =====
|
|
// ===================
|
|
void Address::setStreet(const std::string& streetObj)
|
|
{
|
|
street = streetObj;
|
|
}
|
|
void Address::setCity(const std::string& cityObj)
|
|
{
|
|
city = cityObj;
|
|
}
|
|
void Address::setZipCode(const std::string& zipCodeObj)
|
|
{
|
|
zipCode = zipCodeObj;
|
|
}
|
|
void Address::setCountry(const std::string& countryObj)
|
|
{
|
|
country = countryObj;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace models
|
|
|