diff --git a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/model-header.mustache b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/model-header.mustache index c5a91c0e1641..48859cf019e3 100644 --- a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/model-header.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/model-header.mustache @@ -28,18 +28,16 @@ namespace {{this}} { #include class {{declspec}} {{classname}} - : public {{{parent}}}{{^parent}}ModelBase{{/parent}} { public: - {{classname}}(); - virtual ~{{classname}}(); + {{classname}}() = default; + ~{{classname}}() = default; ///////////////////////////////////////////// - /// ModelBase overrides - void validate() override; + void validate(); - web::json::value toJson() const override; + web::json::value toJson() const; template bool fromJson(const web::json::value& json) { @@ -53,7 +51,7 @@ public: return true; } - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; + void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const; template bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) { diff --git a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/model-source.mustache b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/model-source.mustache index 4c3c1abbcfe7..49e9894da568 100644 --- a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/model-source.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/model-source.mustache @@ -7,6 +7,12 @@ namespace {{this}} { {{/modelNamespaceDeclarations}} {{#oneOf}}{{#-first}} + +void {{classname}}::validate() +{ + // TODO: implement validation +} + const {{classname}}::VariantType& {{classname}}::getVariant() const { return m_variantValue;