diff --git a/modules/openapi-generator/src/main/resources/cpp-restbed-server/api-header.mustache b/modules/openapi-generator/src/main/resources/cpp-restbed-server/api-header.mustache index 22d1f330378f..fe966c1d9886 100644 --- a/modules/openapi-generator/src/main/resources/cpp-restbed-server/api-header.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-restbed-server/api-header.mustache @@ -10,6 +10,8 @@ {{{defaultInclude}}} #include +#include + #include #include #include @@ -49,6 +51,31 @@ public: {{#vendorExtensions.x-codegen-otherMethods}} void {{httpMethod}}_method_handler(const std::shared_ptr session); {{/vendorExtensions.x-codegen-otherMethods}} + + void set_handler_{{httpMethod}}( + std::function( + {{#allParams}}{{{dataType}}} const &{{#hasMore}}, {{/hasMore}}{{/allParams}} + )> handler + ); + + {{#vendorExtensions.x-codegen-otherMethods}} + void set_handler_{{httpMethod}}( + std::function( + {{#allParams}}{{{dataType}}} const &{{#hasMore}}, {{/hasMore}}{{/allParams}} + )> handler + ); + {{/vendorExtensions.x-codegen-otherMethods}} + +private: + std::function( + {{#allParams}}{{{dataType}}} const &{{#hasMore}}, {{/hasMore}}{{/allParams}} + )> handler_{{httpMethod}}_; + + {{#vendorExtensions.x-codegen-otherMethods}} + std::function( + {{#allParams}}{{{dataType}}} const &{{#hasMore}}, {{/hasMore}}{{/allParams}} + )> handler_{{httpMethod}}_; + {{/vendorExtensions.x-codegen-otherMethods}} }; {{/operation}} diff --git a/modules/openapi-generator/src/main/resources/cpp-restbed-server/api-source.mustache b/modules/openapi-generator/src/main/resources/cpp-restbed-server/api-source.mustache index ccd81ee02efe..9523774984fc 100644 --- a/modules/openapi-generator/src/main/resources/cpp-restbed-server/api-source.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-restbed-server/api-source.mustache @@ -54,6 +54,22 @@ void {{classname}}::stopService() { { } +void {{classname}}{{vendorExtensions.x-codegen-resourceName}}Resource::set_handler_{{httpMethod}}( + std::function( + {{#allParams}}{{{dataType}}} const &{{#hasMore}}, {{/hasMore}}{{/allParams}} + )> handler) { + handler_{{httpMethod}}_ = std::move(handler); +} + +{{#vendorExtensions.x-codegen-otherMethods}} +void {{classname}}{{vendorExtensions.x-codegen-resourceName}}Resource::set_handler_{{httpMethod}}( + std::function( + {{#allParams}}{{{dataType}}} const &{{#hasMore}}, {{/hasMore}}{{/allParams}} + )> handler) { + handler_{{httpMethod}}_ = std::move(handler); +} +{{/vendorExtensions.x-codegen-otherMethods}} + void {{classname}}{{vendorExtensions.x-codegen-resourceName}}Resource::{{httpMethod}}_method_handler(const std::shared_ptr session) { const auto request = session->get_request(); @@ -65,12 +81,12 @@ void {{classname}}{{vendorExtensions.x-codegen-resourceName}}Resource::{{httpMet { const auto request = session->get_request(); - std::string requestBody = restbed::String::format("%.*s\n", ( int ) body.size( ), body.data( )); + std::string file = restbed::String::format("%.*s\n", ( int ) body.size( ), body.data( )); /** - * Get body params or form params here from the requestBody string + * Get body params or form params here from the file string */ {{/hasBodyParam}} - + {{#hasPathParams}} // Getting the path params {{#pathParams}} @@ -79,7 +95,7 @@ void {{classname}}{{vendorExtensions.x-codegen-resourceName}}Resource::{{httpMet {{/isPrimitiveType}} {{/pathParams}} {{/hasPathParams}} - + {{#hasQueryParams}} // Getting the query params {{#queryParams}} @@ -97,21 +113,25 @@ void {{classname}}{{vendorExtensions.x-codegen-resourceName}}Resource::{{httpMet {{/isPrimitiveType}} {{/headerParams}} {{/hasHeaderParams}} - + // Change the value of this variable to the appropriate response before sending the response int status_code = 200; - - /** - * Process the received information here - */ - + std::string result = "successful operation"; + + if (handler_{{httpMethod}}_) + { + std::tie(status_code, result) = handler_{{httpMethod}}_( + {{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}} + ); + } + {{#responses}} if (status_code == {{code}}) { {{#headers}} // Description: {{description}} session->set_header("{{baseName}}", ""); // Change second param to your header value {{/headers}} - session->close({{code}}, "{{message}}", { {"Connection", "close"} }); + session->close({{code}}, result.empty() ? "{{message}}" : std::move(result), { {"Connection", "close"} }); return; } {{/responses}} @@ -133,7 +153,7 @@ void {{classname}}{{vendorExtensions.x-codegen-resourceName}}Resource::{{httpMet { const auto request = session->get_request(); - std::string requestBody = restbed::String::format("%.*s\n", ( int ) body.size( ), body.data( )); + std::string file = restbed::String::format("%.*s\n", ( int ) body.size( ), body.data( )); {{/hasBodyParam}} {{#hasPathParams}} @@ -144,7 +164,7 @@ void {{classname}}{{vendorExtensions.x-codegen-resourceName}}Resource::{{httpMet {{/isPrimitiveType}} {{/pathParams}} {{/hasPathParams}} - + {{#hasQueryParams}} // Getting the query params {{#queryParams}} @@ -162,14 +182,18 @@ void {{classname}}{{vendorExtensions.x-codegen-resourceName}}Resource::{{httpMet {{/isPrimitiveType}} {{/headerParams}} {{/hasHeaderParams}} - + // Change the value of this variable to the appropriate response before sending the response int status_code = 200; - - /** - * Process the received information here - */ - + std::string result = "successful operation"; + + if (handler_{{httpMethod}}_) + { + std::tie(status_code, result) = handler_{{httpMethod}}_( + {{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}} + ); + } + {{#responses}} if (status_code == {{code}}) { {{#baseType}} @@ -179,7 +203,7 @@ void {{classname}}{{vendorExtensions.x-codegen-resourceName}}Resource::{{httpMet // Description: {{description}} session->set_header("{{baseName}}", ""); // Change second param to your header value {{/headers}} - session->close({{code}}, "{{message}}", { {"Connection", "close"} }); + session->close({{code}}, result.empty() ? "{{message}}" : std::move(result), { {"Connection", "close"} }); return; } {{/responses}} diff --git a/samples/server/petstore/cpp-restbed/.openapi-generator/VERSION b/samples/server/petstore/cpp-restbed/.openapi-generator/VERSION index f4cb97d56ce2..06b5019af3f4 100644 --- a/samples/server/petstore/cpp-restbed/.openapi-generator/VERSION +++ b/samples/server/petstore/cpp-restbed/.openapi-generator/VERSION @@ -1 +1 @@ -3.3.1-SNAPSHOT \ No newline at end of file +4.0.1-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/cpp-restbed/api/PetApi.cpp b/samples/server/petstore/cpp-restbed/api/PetApi.cpp index 0922b3890aaa..fb5612d1fcf1 100644 --- a/samples/server/petstore/cpp-restbed/api/PetApi.cpp +++ b/samples/server/petstore/cpp-restbed/api/PetApi.cpp @@ -2,10 +2,10 @@ * 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 4.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.0.1-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ @@ -72,6 +72,20 @@ PetApiPetResource::~PetApiPetResource() { } +void PetApiPetResource::set_handler_POST( + std::function( + std::shared_ptr const & + )> handler) { + handler_POST_ = std::move(handler); +} + +void PetApiPetResource::set_handler_PUT( + std::function( + std::shared_ptr const & + )> handler) { + handler_PUT_ = std::move(handler); +} + void PetApiPetResource::POST_method_handler(const std::shared_ptr session) { const auto request = session->get_request(); @@ -82,23 +96,27 @@ void PetApiPetResource::POST_method_handler(const std::shared_ptrget_request(); - std::string requestBody = restbed::String::format("%.*s\n", ( int ) body.size( ), body.data( )); + std::string file = restbed::String::format("%.*s\n", ( int ) body.size( ), body.data( )); /** - * Get body params or form params here from the requestBody string + * Get body params or form params here from the file string */ - - - + + + // Change the value of this variable to the appropriate response before sending the response int status_code = 200; - - /** - * Process the received information here - */ - + std::string result = "successful operation"; + + if (handler_POST_) + { + std::tie(status_code, result) = handler_POST_( + body + ); + } + if (status_code == 405) { - session->close(405, "Invalid input", { {"Connection", "close"} }); + session->close(405, result.empty() ? "Invalid input" : std::move(result), { {"Connection", "close"} }); return; } @@ -115,28 +133,32 @@ void PetApiPetResource::PUT_method_handler(const std::shared_ptrget_request(); - std::string requestBody = restbed::String::format("%.*s\n", ( int ) body.size( ), body.data( )); + std::string file = restbed::String::format("%.*s\n", ( int ) body.size( ), body.data( )); + + - - // Change the value of this variable to the appropriate response before sending the response int status_code = 200; - - /** - * Process the received information here - */ - + std::string result = "successful operation"; + + if (handler_PUT_) + { + std::tie(status_code, result) = handler_PUT_( + body + ); + } + if (status_code == 400) { - session->close(400, "Invalid ID supplied", { {"Connection", "close"} }); + session->close(400, result.empty() ? "Invalid ID supplied" : std::move(result), { {"Connection", "close"} }); return; } if (status_code == 404) { - session->close(404, "Pet not found", { {"Connection", "close"} }); + session->close(404, result.empty() ? "Pet not found" : std::move(result), { {"Connection", "close"} }); return; } if (status_code == 405) { - session->close(405, "Validation exception", { {"Connection", "close"} }); + session->close(405, result.empty() ? "Validation exception" : std::move(result), { {"Connection", "close"} }); return; } @@ -162,26 +184,50 @@ PetApiPetPetIdResource::~PetApiPetPetIdResource() { } +void PetApiPetPetIdResource::set_handler_DELETE( + std::function( + int64_t const &, std::string const & + )> handler) { + handler_DELETE_ = std::move(handler); +} + +void PetApiPetPetIdResource::set_handler_GET( + std::function( + int64_t const & + )> handler) { + handler_GET_ = std::move(handler); +} +void PetApiPetPetIdResource::set_handler_POST( + std::function( + int64_t const &, std::string const &, std::string const & + )> handler) { + handler_POST_ = std::move(handler); +} + void PetApiPetPetIdResource::DELETE_method_handler(const std::shared_ptr session) { const auto request = session->get_request(); - + // Getting the path params const int64_t petId = request->get_path_parameter("petId", 0L); - + // Getting the headers const std::string apiKey = request->get_header("apiKey", ""); - + // Change the value of this variable to the appropriate response before sending the response int status_code = 200; - - /** - * Process the received information here - */ - + std::string result = "successful operation"; + + if (handler_DELETE_) + { + std::tie(status_code, result) = handler_DELETE_( + petId, apiKey + ); + } + if (status_code == 400) { - session->close(400, "Invalid pet value", { {"Connection", "close"} }); + session->close(400, result.empty() ? "Invalid pet value" : std::move(result), { {"Connection", "close"} }); return; } @@ -193,27 +239,31 @@ void PetApiPetPetIdResource::GET_method_handler(const std::shared_ptrget_path_parameter("petId", 0L); - - + + // Change the value of this variable to the appropriate response before sending the response int status_code = 200; - - /** - * Process the received information here - */ - + std::string result = "successful operation"; + + if (handler_GET_) + { + std::tie(status_code, result) = handler_GET_( + petId + ); + } + if (status_code == 200) { std::shared_ptr response = NULL; - session->close(200, "successful operation", { {"Connection", "close"} }); + session->close(200, result.empty() ? "successful operation" : std::move(result), { {"Connection", "close"} }); return; } if (status_code == 400) { - session->close(400, "Invalid ID supplied", { {"Connection", "close"} }); + session->close(400, result.empty() ? "Invalid ID supplied" : std::move(result), { {"Connection", "close"} }); return; } if (status_code == 404) { - session->close(404, "Pet not found", { {"Connection", "close"} }); + session->close(404, result.empty() ? "Pet not found" : std::move(result), { {"Connection", "close"} }); return; } @@ -224,18 +274,22 @@ void PetApiPetPetIdResource::POST_method_handler(const std::shared_ptrget_path_parameter("petId", 0L); - - + + // Change the value of this variable to the appropriate response before sending the response int status_code = 200; - - /** - * Process the received information here - */ - + std::string result = "successful operation"; + + if (handler_POST_) + { + std::tie(status_code, result) = handler_POST_( + petId, name, status + ); + } + if (status_code == 405) { - session->close(405, "Invalid input", { {"Connection", "close"} }); + session->close(405, result.empty() ? "Invalid input" : std::move(result), { {"Connection", "close"} }); return; } @@ -254,27 +308,39 @@ PetApiPetFindByStatusResource::~PetApiPetFindByStatusResource() { } +void PetApiPetFindByStatusResource::set_handler_GET( + std::function( + std::vector const & + )> handler) { + handler_GET_ = std::move(handler); +} + + void PetApiPetFindByStatusResource::GET_method_handler(const std::shared_ptr session) { const auto request = session->get_request(); - - + + // Getting the query params - + // Change the value of this variable to the appropriate response before sending the response int status_code = 200; - - /** - * Process the received information here - */ - + std::string result = "successful operation"; + + if (handler_GET_) + { + std::tie(status_code, result) = handler_GET_( + status + ); + } + if (status_code == 200) { - session->close(200, "successful operation", { {"Connection", "close"} }); + session->close(200, result.empty() ? "successful operation" : std::move(result), { {"Connection", "close"} }); return; } if (status_code == 400) { - session->close(400, "Invalid status value", { {"Connection", "close"} }); + session->close(400, result.empty() ? "Invalid status value" : std::move(result), { {"Connection", "close"} }); return; } @@ -294,27 +360,39 @@ PetApiPetFindByTagsResource::~PetApiPetFindByTagsResource() { } +void PetApiPetFindByTagsResource::set_handler_GET( + std::function( + std::vector const & + )> handler) { + handler_GET_ = std::move(handler); +} + + void PetApiPetFindByTagsResource::GET_method_handler(const std::shared_ptr session) { const auto request = session->get_request(); - - + + // Getting the query params - + // Change the value of this variable to the appropriate response before sending the response int status_code = 200; - - /** - * Process the received information here - */ - + std::string result = "successful operation"; + + if (handler_GET_) + { + std::tie(status_code, result) = handler_GET_( + tags + ); + } + if (status_code == 200) { - session->close(200, "successful operation", { {"Connection", "close"} }); + session->close(200, result.empty() ? "successful operation" : std::move(result), { {"Connection", "close"} }); return; } if (status_code == 400) { - session->close(400, "Invalid tag value", { {"Connection", "close"} }); + session->close(400, result.empty() ? "Invalid tag value" : std::move(result), { {"Connection", "close"} }); return; } @@ -334,24 +412,36 @@ PetApiPetPetIdUploadImageResource::~PetApiPetPetIdUploadImageResource() { } +void PetApiPetPetIdUploadImageResource::set_handler_POST( + std::function( + int64_t const &, std::string const &, std::string const & + )> handler) { + handler_POST_ = std::move(handler); +} + + void PetApiPetPetIdUploadImageResource::POST_method_handler(const std::shared_ptr session) { const auto request = session->get_request(); - + // Getting the path params const int64_t petId = request->get_path_parameter("petId", 0L); - - + + // Change the value of this variable to the appropriate response before sending the response int status_code = 200; - - /** - * Process the received information here - */ - + std::string result = "successful operation"; + + if (handler_POST_) + { + std::tie(status_code, result) = handler_POST_( + petId, additionalMetadata, file + ); + } + if (status_code == 200) { - session->close(200, "successful operation", { {"Connection", "close"} }); + session->close(200, result.empty() ? "successful operation" : std::move(result), { {"Connection", "close"} }); return; } diff --git a/samples/server/petstore/cpp-restbed/api/PetApi.h b/samples/server/petstore/cpp-restbed/api/PetApi.h index e9b654e73577..c51b0b872810 100644 --- a/samples/server/petstore/cpp-restbed/api/PetApi.h +++ b/samples/server/petstore/cpp-restbed/api/PetApi.h @@ -2,10 +2,10 @@ * 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 4.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.0.1-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ @@ -21,6 +21,8 @@ #include +#include + #include #include #include @@ -59,6 +61,27 @@ class PetApiPetResource: public restbed::Resource virtual ~PetApiPetResource(); void POST_method_handler(const std::shared_ptr session); void PUT_method_handler(const std::shared_ptr session); + + void set_handler_POST( + std::function( + std::shared_ptr const & + )> handler + ); + + void set_handler_PUT( + std::function( + std::shared_ptr const & + )> handler + ); + +private: + std::function( + std::shared_ptr const & + )> handler_POST_; + + std::function( + std::shared_ptr const & + )> handler_PUT_; }; /// @@ -75,6 +98,35 @@ class PetApiPetPetIdResource: public restbed::Resource void DELETE_method_handler(const std::shared_ptr session); void GET_method_handler(const std::shared_ptr session); void POST_method_handler(const std::shared_ptr session); + + void set_handler_DELETE( + std::function( + int64_t const &, std::string const & + )> handler + ); + + void set_handler_GET( + std::function( + int64_t const & + )> handler + ); + void set_handler_POST( + std::function( + int64_t const &, std::string const &, std::string const & + )> handler + ); + +private: + std::function( + int64_t const &, std::string const & + )> handler_DELETE_; + + std::function( + int64_t const & + )> handler_GET_; + std::function( + int64_t const &, std::string const &, std::string const & + )> handler_POST_; }; /// @@ -89,6 +141,19 @@ class PetApiPetFindByStatusResource: public restbed::Resource PetApiPetFindByStatusResource(); virtual ~PetApiPetFindByStatusResource(); void GET_method_handler(const std::shared_ptr session); + + void set_handler_GET( + std::function( + std::vector const & + )> handler + ); + + +private: + std::function( + std::vector const & + )> handler_GET_; + }; /// @@ -103,6 +168,19 @@ class PetApiPetFindByTagsResource: public restbed::Resource PetApiPetFindByTagsResource(); virtual ~PetApiPetFindByTagsResource(); void GET_method_handler(const std::shared_ptr session); + + void set_handler_GET( + std::function( + std::vector const & + )> handler + ); + + +private: + std::function( + std::vector const & + )> handler_GET_; + }; /// @@ -117,6 +195,19 @@ class PetApiPetPetIdUploadImageResource: public restbed::Resource PetApiPetPetIdUploadImageResource(); virtual ~PetApiPetPetIdUploadImageResource(); void POST_method_handler(const std::shared_ptr session); + + void set_handler_POST( + std::function( + int64_t const &, std::string const &, std::string const & + )> handler + ); + + +private: + std::function( + int64_t const &, std::string const &, std::string const & + )> handler_POST_; + }; diff --git a/samples/server/petstore/cpp-restbed/api/StoreApi.cpp b/samples/server/petstore/cpp-restbed/api/StoreApi.cpp index 12c5974f3cb0..8d381eab26e7 100644 --- a/samples/server/petstore/cpp-restbed/api/StoreApi.cpp +++ b/samples/server/petstore/cpp-restbed/api/StoreApi.cpp @@ -2,10 +2,10 @@ * 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 4.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.0.1-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ @@ -66,28 +66,46 @@ StoreApiStoreOrderOrderIdResource::~StoreApiStoreOrderOrderIdResource() { } +void StoreApiStoreOrderOrderIdResource::set_handler_DELETE( + std::function( + std::string const & + )> handler) { + handler_DELETE_ = std::move(handler); +} + +void StoreApiStoreOrderOrderIdResource::set_handler_GET( + std::function( + int64_t const & + )> handler) { + handler_GET_ = std::move(handler); +} + void StoreApiStoreOrderOrderIdResource::DELETE_method_handler(const std::shared_ptr session) { const auto request = session->get_request(); - + // Getting the path params const std::string orderId = request->get_path_parameter("orderId", ""); - - + + // Change the value of this variable to the appropriate response before sending the response int status_code = 200; - - /** - * Process the received information here - */ - + std::string result = "successful operation"; + + if (handler_DELETE_) + { + std::tie(status_code, result) = handler_DELETE_( + orderId + ); + } + if (status_code == 400) { - session->close(400, "Invalid ID supplied", { {"Connection", "close"} }); + session->close(400, result.empty() ? "Invalid ID supplied" : std::move(result), { {"Connection", "close"} }); return; } if (status_code == 404) { - session->close(404, "Order not found", { {"Connection", "close"} }); + session->close(404, result.empty() ? "Order not found" : std::move(result), { {"Connection", "close"} }); return; } @@ -99,27 +117,31 @@ void StoreApiStoreOrderOrderIdResource::GET_method_handler(const std::shared_ptr // Getting the path params const int64_t orderId = request->get_path_parameter("orderId", 0L); - - + + // Change the value of this variable to the appropriate response before sending the response int status_code = 200; - - /** - * Process the received information here - */ - + std::string result = "successful operation"; + + if (handler_GET_) + { + std::tie(status_code, result) = handler_GET_( + orderId + ); + } + if (status_code == 200) { std::shared_ptr response = NULL; - session->close(200, "successful operation", { {"Connection", "close"} }); + session->close(200, result.empty() ? "successful operation" : std::move(result), { {"Connection", "close"} }); return; } if (status_code == 400) { - session->close(400, "Invalid ID supplied", { {"Connection", "close"} }); + session->close(400, result.empty() ? "Invalid ID supplied" : std::move(result), { {"Connection", "close"} }); return; } if (status_code == 404) { - session->close(404, "Order not found", { {"Connection", "close"} }); + session->close(404, result.empty() ? "Order not found" : std::move(result), { {"Connection", "close"} }); return; } @@ -138,22 +160,34 @@ StoreApiStoreInventoryResource::~StoreApiStoreInventoryResource() { } +void StoreApiStoreInventoryResource::set_handler_GET( + std::function( + + )> handler) { + handler_GET_ = std::move(handler); +} + + void StoreApiStoreInventoryResource::GET_method_handler(const std::shared_ptr session) { const auto request = session->get_request(); - - - + + + // Change the value of this variable to the appropriate response before sending the response int status_code = 200; - - /** - * Process the received information here - */ - + std::string result = "successful operation"; + + if (handler_GET_) + { + std::tie(status_code, result) = handler_GET_( + + ); + } + if (status_code == 200) { - session->close(200, "successful operation", { {"Connection", "close"} }); + session->close(200, result.empty() ? "successful operation" : std::move(result), { {"Connection", "close"} }); return; } @@ -173,6 +207,14 @@ StoreApiStoreOrderResource::~StoreApiStoreOrderResource() { } +void StoreApiStoreOrderResource::set_handler_POST( + std::function( + std::shared_ptr const & + )> handler) { + handler_POST_ = std::move(handler); +} + + void StoreApiStoreOrderResource::POST_method_handler(const std::shared_ptr session) { const auto request = session->get_request(); @@ -183,27 +225,31 @@ void StoreApiStoreOrderResource::POST_method_handler(const std::shared_ptrget_request(); - std::string requestBody = restbed::String::format("%.*s\n", ( int ) body.size( ), body.data( )); + std::string file = restbed::String::format("%.*s\n", ( int ) body.size( ), body.data( )); /** - * Get body params or form params here from the requestBody string + * Get body params or form params here from the file string */ - - - + + + // Change the value of this variable to the appropriate response before sending the response int status_code = 200; - - /** - * Process the received information here - */ - + std::string result = "successful operation"; + + if (handler_POST_) + { + std::tie(status_code, result) = handler_POST_( + body + ); + } + if (status_code == 200) { - session->close(200, "successful operation", { {"Connection", "close"} }); + session->close(200, result.empty() ? "successful operation" : std::move(result), { {"Connection", "close"} }); return; } if (status_code == 400) { - session->close(400, "Invalid Order", { {"Connection", "close"} }); + session->close(400, result.empty() ? "Invalid Order" : std::move(result), { {"Connection", "close"} }); return; } diff --git a/samples/server/petstore/cpp-restbed/api/StoreApi.h b/samples/server/petstore/cpp-restbed/api/StoreApi.h index 469b04643afe..a5c1817138ac 100644 --- a/samples/server/petstore/cpp-restbed/api/StoreApi.h +++ b/samples/server/petstore/cpp-restbed/api/StoreApi.h @@ -2,10 +2,10 @@ * 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 4.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.0.1-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ @@ -21,6 +21,8 @@ #include +#include + #include #include #include @@ -59,6 +61,27 @@ class StoreApiStoreOrderOrderIdResource: public restbed::Resource virtual ~StoreApiStoreOrderOrderIdResource(); void DELETE_method_handler(const std::shared_ptr session); void GET_method_handler(const std::shared_ptr session); + + void set_handler_DELETE( + std::function( + std::string const & + )> handler + ); + + void set_handler_GET( + std::function( + int64_t const & + )> handler + ); + +private: + std::function( + std::string const & + )> handler_DELETE_; + + std::function( + int64_t const & + )> handler_GET_; }; /// @@ -73,6 +96,19 @@ class StoreApiStoreInventoryResource: public restbed::Resource StoreApiStoreInventoryResource(); virtual ~StoreApiStoreInventoryResource(); void GET_method_handler(const std::shared_ptr session); + + void set_handler_GET( + std::function( + + )> handler + ); + + +private: + std::function( + + )> handler_GET_; + }; /// @@ -87,6 +123,19 @@ class StoreApiStoreOrderResource: public restbed::Resource StoreApiStoreOrderResource(); virtual ~StoreApiStoreOrderResource(); void POST_method_handler(const std::shared_ptr session); + + void set_handler_POST( + std::function( + std::shared_ptr const & + )> handler + ); + + +private: + std::function( + std::shared_ptr const & + )> handler_POST_; + }; diff --git a/samples/server/petstore/cpp-restbed/api/UserApi.cpp b/samples/server/petstore/cpp-restbed/api/UserApi.cpp index 6b0d309571c6..7501ca20bd03 100644 --- a/samples/server/petstore/cpp-restbed/api/UserApi.cpp +++ b/samples/server/petstore/cpp-restbed/api/UserApi.cpp @@ -2,10 +2,10 @@ * 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 4.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.0.1-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ @@ -72,6 +72,14 @@ UserApiUserResource::~UserApiUserResource() { } +void UserApiUserResource::set_handler_POST( + std::function( + std::shared_ptr const & + )> handler) { + handler_POST_ = std::move(handler); +} + + void UserApiUserResource::POST_method_handler(const std::shared_ptr session) { const auto request = session->get_request(); @@ -82,23 +90,27 @@ void UserApiUserResource::POST_method_handler(const std::shared_ptrget_request(); - std::string requestBody = restbed::String::format("%.*s\n", ( int ) body.size( ), body.data( )); + std::string file = restbed::String::format("%.*s\n", ( int ) body.size( ), body.data( )); /** - * Get body params or form params here from the requestBody string + * Get body params or form params here from the file string */ - - - + + + // Change the value of this variable to the appropriate response before sending the response int status_code = 200; - - /** - * Process the received information here - */ - + std::string result = "successful operation"; + + if (handler_POST_) + { + std::tie(status_code, result) = handler_POST_( + body + ); + } + if (status_code == 0) { - session->close(0, "successful operation", { {"Connection", "close"} }); + session->close(0, result.empty() ? "successful operation" : std::move(result), { {"Connection", "close"} }); return; } @@ -119,6 +131,14 @@ UserApiUserCreateWithArrayResource::~UserApiUserCreateWithArrayResource() { } +void UserApiUserCreateWithArrayResource::set_handler_POST( + std::function( + std::vector> const & + )> handler) { + handler_POST_ = std::move(handler); +} + + void UserApiUserCreateWithArrayResource::POST_method_handler(const std::shared_ptr session) { const auto request = session->get_request(); @@ -129,23 +149,27 @@ void UserApiUserCreateWithArrayResource::POST_method_handler(const std::shared_p { const auto request = session->get_request(); - std::string requestBody = restbed::String::format("%.*s\n", ( int ) body.size( ), body.data( )); + std::string file = restbed::String::format("%.*s\n", ( int ) body.size( ), body.data( )); /** - * Get body params or form params here from the requestBody string + * Get body params or form params here from the file string */ - - - + + + // Change the value of this variable to the appropriate response before sending the response int status_code = 200; - - /** - * Process the received information here - */ - + std::string result = "successful operation"; + + if (handler_POST_) + { + std::tie(status_code, result) = handler_POST_( + body + ); + } + if (status_code == 0) { - session->close(0, "successful operation", { {"Connection", "close"} }); + session->close(0, result.empty() ? "successful operation" : std::move(result), { {"Connection", "close"} }); return; } @@ -166,6 +190,14 @@ UserApiUserCreateWithListResource::~UserApiUserCreateWithListResource() { } +void UserApiUserCreateWithListResource::set_handler_POST( + std::function( + std::vector> const & + )> handler) { + handler_POST_ = std::move(handler); +} + + void UserApiUserCreateWithListResource::POST_method_handler(const std::shared_ptr session) { const auto request = session->get_request(); @@ -176,23 +208,27 @@ void UserApiUserCreateWithListResource::POST_method_handler(const std::shared_pt { const auto request = session->get_request(); - std::string requestBody = restbed::String::format("%.*s\n", ( int ) body.size( ), body.data( )); + std::string file = restbed::String::format("%.*s\n", ( int ) body.size( ), body.data( )); /** - * Get body params or form params here from the requestBody string + * Get body params or form params here from the file string */ - - - + + + // Change the value of this variable to the appropriate response before sending the response int status_code = 200; - - /** - * Process the received information here - */ - + std::string result = "successful operation"; + + if (handler_POST_) + { + std::tie(status_code, result) = handler_POST_( + body + ); + } + if (status_code == 0) { - session->close(0, "successful operation", { {"Connection", "close"} }); + session->close(0, result.empty() ? "successful operation" : std::move(result), { {"Connection", "close"} }); return; } @@ -219,28 +255,52 @@ UserApiUserUsernameResource::~UserApiUserUsernameResource() { } +void UserApiUserUsernameResource::set_handler_DELETE( + std::function( + std::string const & + )> handler) { + handler_DELETE_ = std::move(handler); +} + +void UserApiUserUsernameResource::set_handler_GET( + std::function( + std::string const & + )> handler) { + handler_GET_ = std::move(handler); +} +void UserApiUserUsernameResource::set_handler_PUT( + std::function( + std::string const &, std::shared_ptr const & + )> handler) { + handler_PUT_ = std::move(handler); +} + void UserApiUserUsernameResource::DELETE_method_handler(const std::shared_ptr session) { const auto request = session->get_request(); - + // Getting the path params const std::string username = request->get_path_parameter("username", ""); - - + + // Change the value of this variable to the appropriate response before sending the response int status_code = 200; - - /** - * Process the received information here - */ - + std::string result = "successful operation"; + + if (handler_DELETE_) + { + std::tie(status_code, result) = handler_DELETE_( + username + ); + } + if (status_code == 400) { - session->close(400, "Invalid username supplied", { {"Connection", "close"} }); + session->close(400, result.empty() ? "Invalid username supplied" : std::move(result), { {"Connection", "close"} }); return; } if (status_code == 404) { - session->close(404, "User not found", { {"Connection", "close"} }); + session->close(404, result.empty() ? "User not found" : std::move(result), { {"Connection", "close"} }); return; } @@ -252,27 +312,31 @@ void UserApiUserUsernameResource::GET_method_handler(const std::shared_ptrget_path_parameter("username", ""); - - + + // Change the value of this variable to the appropriate response before sending the response int status_code = 200; - - /** - * Process the received information here - */ - + std::string result = "successful operation"; + + if (handler_GET_) + { + std::tie(status_code, result) = handler_GET_( + username + ); + } + if (status_code == 200) { std::shared_ptr response = NULL; - session->close(200, "successful operation", { {"Connection", "close"} }); + session->close(200, result.empty() ? "successful operation" : std::move(result), { {"Connection", "close"} }); return; } if (status_code == 400) { - session->close(400, "Invalid username supplied", { {"Connection", "close"} }); + session->close(400, result.empty() ? "Invalid username supplied" : std::move(result), { {"Connection", "close"} }); return; } if (status_code == 404) { - session->close(404, "User not found", { {"Connection", "close"} }); + session->close(404, result.empty() ? "User not found" : std::move(result), { {"Connection", "close"} }); return; } @@ -287,26 +351,30 @@ void UserApiUserUsernameResource::PUT_method_handler(const std::shared_ptrget_request(); - std::string requestBody = restbed::String::format("%.*s\n", ( int ) body.size( ), body.data( )); + std::string file = restbed::String::format("%.*s\n", ( int ) body.size( ), body.data( )); // Getting the path params const std::string username = request->get_path_parameter("username", ""); - - + + // Change the value of this variable to the appropriate response before sending the response int status_code = 200; - - /** - * Process the received information here - */ - + std::string result = "successful operation"; + + if (handler_PUT_) + { + std::tie(status_code, result) = handler_PUT_( + username, body + ); + } + if (status_code == 400) { - session->close(400, "Invalid user supplied", { {"Connection", "close"} }); + session->close(400, result.empty() ? "Invalid user supplied" : std::move(result), { {"Connection", "close"} }); return; } if (status_code == 404) { - session->close(404, "User not found", { {"Connection", "close"} }); + session->close(404, result.empty() ? "User not found" : std::move(result), { {"Connection", "close"} }); return; } @@ -326,33 +394,45 @@ UserApiUserLoginResource::~UserApiUserLoginResource() { } +void UserApiUserLoginResource::set_handler_GET( + std::function( + std::string const &, std::string const & + )> handler) { + handler_GET_ = std::move(handler); +} + + void UserApiUserLoginResource::GET_method_handler(const std::shared_ptr session) { const auto request = session->get_request(); - - + + // Getting the query params const std::string username = request->get_query_parameter("username", ""); const std::string password = request->get_query_parameter("password", ""); - + // Change the value of this variable to the appropriate response before sending the response int status_code = 200; - - /** - * Process the received information here - */ - + std::string result = "successful operation"; + + if (handler_GET_) + { + std::tie(status_code, result) = handler_GET_( + username, password + ); + } + if (status_code == 200) { // Description: calls per hour allowed by the user session->set_header("X-Rate-Limit", ""); // Change second param to your header value // Description: date in UTC when toekn expires session->set_header("X-Expires-After", ""); // Change second param to your header value - session->close(200, "successful operation", { {"Connection", "close"} }); + session->close(200, result.empty() ? "successful operation" : std::move(result), { {"Connection", "close"} }); return; } if (status_code == 400) { - session->close(400, "Invalid username/password supplied", { {"Connection", "close"} }); + session->close(400, result.empty() ? "Invalid username/password supplied" : std::move(result), { {"Connection", "close"} }); return; } @@ -372,22 +452,34 @@ UserApiUserLogoutResource::~UserApiUserLogoutResource() { } +void UserApiUserLogoutResource::set_handler_GET( + std::function( + + )> handler) { + handler_GET_ = std::move(handler); +} + + void UserApiUserLogoutResource::GET_method_handler(const std::shared_ptr session) { const auto request = session->get_request(); - - - + + + // Change the value of this variable to the appropriate response before sending the response int status_code = 200; - - /** - * Process the received information here - */ - + std::string result = "successful operation"; + + if (handler_GET_) + { + std::tie(status_code, result) = handler_GET_( + + ); + } + if (status_code == 0) { - session->close(0, "successful operation", { {"Connection", "close"} }); + session->close(0, result.empty() ? "successful operation" : std::move(result), { {"Connection", "close"} }); return; } diff --git a/samples/server/petstore/cpp-restbed/api/UserApi.h b/samples/server/petstore/cpp-restbed/api/UserApi.h index fcb3dc1dd55a..0750da000fb0 100644 --- a/samples/server/petstore/cpp-restbed/api/UserApi.h +++ b/samples/server/petstore/cpp-restbed/api/UserApi.h @@ -2,10 +2,10 @@ * 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 4.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.0.1-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ @@ -21,6 +21,8 @@ #include +#include + #include #include #include @@ -58,6 +60,19 @@ class UserApiUserResource: public restbed::Resource UserApiUserResource(); virtual ~UserApiUserResource(); void POST_method_handler(const std::shared_ptr session); + + void set_handler_POST( + std::function( + std::shared_ptr const & + )> handler + ); + + +private: + std::function( + std::shared_ptr const & + )> handler_POST_; + }; /// @@ -72,6 +87,19 @@ class UserApiUserCreateWithArrayResource: public restbed::Resource UserApiUserCreateWithArrayResource(); virtual ~UserApiUserCreateWithArrayResource(); void POST_method_handler(const std::shared_ptr session); + + void set_handler_POST( + std::function( + std::vector> const & + )> handler + ); + + +private: + std::function( + std::vector> const & + )> handler_POST_; + }; /// @@ -86,6 +114,19 @@ class UserApiUserCreateWithListResource: public restbed::Resource UserApiUserCreateWithListResource(); virtual ~UserApiUserCreateWithListResource(); void POST_method_handler(const std::shared_ptr session); + + void set_handler_POST( + std::function( + std::vector> const & + )> handler + ); + + +private: + std::function( + std::vector> const & + )> handler_POST_; + }; /// @@ -102,6 +143,35 @@ class UserApiUserUsernameResource: public restbed::Resource void DELETE_method_handler(const std::shared_ptr session); void GET_method_handler(const std::shared_ptr session); void PUT_method_handler(const std::shared_ptr session); + + void set_handler_DELETE( + std::function( + std::string const & + )> handler + ); + + void set_handler_GET( + std::function( + std::string const & + )> handler + ); + void set_handler_PUT( + std::function( + std::string const &, std::shared_ptr const & + )> handler + ); + +private: + std::function( + std::string const & + )> handler_DELETE_; + + std::function( + std::string const & + )> handler_GET_; + std::function( + std::string const &, std::shared_ptr const & + )> handler_PUT_; }; /// @@ -116,6 +186,19 @@ class UserApiUserLoginResource: public restbed::Resource UserApiUserLoginResource(); virtual ~UserApiUserLoginResource(); void GET_method_handler(const std::shared_ptr session); + + void set_handler_GET( + std::function( + std::string const &, std::string const & + )> handler + ); + + +private: + std::function( + std::string const &, std::string const & + )> handler_GET_; + }; /// @@ -130,6 +213,19 @@ class UserApiUserLogoutResource: public restbed::Resource UserApiUserLogoutResource(); virtual ~UserApiUserLogoutResource(); void GET_method_handler(const std::shared_ptr session); + + void set_handler_GET( + std::function( + + )> handler + ); + + +private: + std::function( + + )> handler_GET_; + }; diff --git a/samples/server/petstore/cpp-restbed/model/ApiResponse.cpp b/samples/server/petstore/cpp-restbed/model/ApiResponse.cpp index 588b26391a97..15bf9dd81701 100644 --- a/samples/server/petstore/cpp-restbed/model/ApiResponse.cpp +++ b/samples/server/petstore/cpp-restbed/model/ApiResponse.cpp @@ -2,10 +2,10 @@ * 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 4.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.0.1-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/model/ApiResponse.h b/samples/server/petstore/cpp-restbed/model/ApiResponse.h index 3ea3993ff52b..f0c0a9034d85 100644 --- a/samples/server/petstore/cpp-restbed/model/ApiResponse.h +++ b/samples/server/petstore/cpp-restbed/model/ApiResponse.h @@ -2,10 +2,10 @@ * 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 4.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.0.1-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/model/Category.cpp b/samples/server/petstore/cpp-restbed/model/Category.cpp index 6dadb6b13a8b..eca17e71bd5f 100644 --- a/samples/server/petstore/cpp-restbed/model/Category.cpp +++ b/samples/server/petstore/cpp-restbed/model/Category.cpp @@ -2,10 +2,10 @@ * 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 4.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.0.1-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/model/Category.h b/samples/server/petstore/cpp-restbed/model/Category.h index 988c7e2abbd1..1dd7a111e027 100644 --- a/samples/server/petstore/cpp-restbed/model/Category.h +++ b/samples/server/petstore/cpp-restbed/model/Category.h @@ -2,10 +2,10 @@ * 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 4.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.0.1-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/model/Order.cpp b/samples/server/petstore/cpp-restbed/model/Order.cpp index 532491168923..835d6787dcb9 100644 --- a/samples/server/petstore/cpp-restbed/model/Order.cpp +++ b/samples/server/petstore/cpp-restbed/model/Order.cpp @@ -2,10 +2,10 @@ * 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 4.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.0.1-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/model/Order.h b/samples/server/petstore/cpp-restbed/model/Order.h index 4a98b0e92c4d..ad2dcab33194 100644 --- a/samples/server/petstore/cpp-restbed/model/Order.h +++ b/samples/server/petstore/cpp-restbed/model/Order.h @@ -2,10 +2,10 @@ * 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 4.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.0.1-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/model/Pet.cpp b/samples/server/petstore/cpp-restbed/model/Pet.cpp index 5f3a3cd94dc8..cd4b8a5b0514 100644 --- a/samples/server/petstore/cpp-restbed/model/Pet.cpp +++ b/samples/server/petstore/cpp-restbed/model/Pet.cpp @@ -2,10 +2,10 @@ * 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 4.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.0.1-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/model/Pet.h b/samples/server/petstore/cpp-restbed/model/Pet.h index 201a33113de4..eeda96ced075 100644 --- a/samples/server/petstore/cpp-restbed/model/Pet.h +++ b/samples/server/petstore/cpp-restbed/model/Pet.h @@ -2,10 +2,10 @@ * 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 4.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.0.1-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/model/Tag.cpp b/samples/server/petstore/cpp-restbed/model/Tag.cpp index 823bd8cc874b..55b77ea7b9ec 100644 --- a/samples/server/petstore/cpp-restbed/model/Tag.cpp +++ b/samples/server/petstore/cpp-restbed/model/Tag.cpp @@ -2,10 +2,10 @@ * 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 4.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.0.1-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/model/Tag.h b/samples/server/petstore/cpp-restbed/model/Tag.h index 74efa22c6276..f1fa71239206 100644 --- a/samples/server/petstore/cpp-restbed/model/Tag.h +++ b/samples/server/petstore/cpp-restbed/model/Tag.h @@ -2,10 +2,10 @@ * 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 4.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.0.1-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/model/User.cpp b/samples/server/petstore/cpp-restbed/model/User.cpp index 8df4aed92b50..805306a5d7aa 100644 --- a/samples/server/petstore/cpp-restbed/model/User.cpp +++ b/samples/server/petstore/cpp-restbed/model/User.cpp @@ -2,10 +2,10 @@ * 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 4.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.0.1-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/model/User.h b/samples/server/petstore/cpp-restbed/model/User.h index 4d4c040831be..f2792886c9b2 100644 --- a/samples/server/petstore/cpp-restbed/model/User.h +++ b/samples/server/petstore/cpp-restbed/model/User.h @@ -2,10 +2,10 @@ * 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 4.0.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 4.0.1-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */