forked from loafle/openapi-generator-original
[cpp-restbed-server] make the restbed SERVER generator more extensible (#7679)
* Simple fix to allow users to override the Api class and set handlers * fix definition order * Regen petstore example files
This commit is contained in:
committed by
GitHub
parent
3d6bd48b67
commit
4860eb65e1
@@ -5,7 +5,7 @@
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI-Generator unset.
|
||||
* NOTE: This class is auto generated by OpenAPI-Generator 5.0.0-SNAPSHOT.
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
@@ -45,6 +45,14 @@ public:
|
||||
~UserApi();
|
||||
void startService(int const& port);
|
||||
void stopService();
|
||||
|
||||
protected:
|
||||
std::shared_ptr<UserApiUserResource> m_spUserApiUserResource;
|
||||
std::shared_ptr<UserApiUserCreateWithArrayResource> m_spUserApiUserCreateWithArrayResource;
|
||||
std::shared_ptr<UserApiUserCreateWithListResource> m_spUserApiUserCreateWithListResource;
|
||||
std::shared_ptr<UserApiUserUsernameResource> m_spUserApiUserUsernameResource;
|
||||
std::shared_ptr<UserApiUserLoginResource> m_spUserApiUserLoginResource;
|
||||
std::shared_ptr<UserApiUserLogoutResource> m_spUserApiUserLogoutResource;
|
||||
};
|
||||
|
||||
|
||||
@@ -74,7 +82,7 @@ private:
|
||||
)> handler_POST_;
|
||||
|
||||
|
||||
std::shared_ptr<User> body;
|
||||
std::shared_ptr<User> body{};
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
@@ -103,7 +111,7 @@ private:
|
||||
)> handler_POST_;
|
||||
|
||||
|
||||
std::vector<std::shared_ptr<User>> body;
|
||||
std::vector<std::shared_ptr<User>> body{};
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
@@ -132,7 +140,7 @@ private:
|
||||
)> handler_POST_;
|
||||
|
||||
|
||||
std::vector<std::shared_ptr<User>> body;
|
||||
std::vector<std::shared_ptr<User>> body{};
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
@@ -147,7 +155,6 @@ public:
|
||||
UserApiUserUsernameResource();
|
||||
virtual ~UserApiUserUsernameResource();
|
||||
void DELETE_method_handler(const std::shared_ptr<restbed::Session> session);
|
||||
void GET_method_handler(const std::shared_ptr<restbed::Session> session);
|
||||
void PUT_method_handler(const std::shared_ptr<restbed::Session> session);
|
||||
|
||||
void set_handler_DELETE(
|
||||
@@ -156,11 +163,6 @@ public:
|
||||
)> handler
|
||||
);
|
||||
|
||||
void set_handler_GET(
|
||||
std::function<std::pair<int, std::string>(
|
||||
std::string const &
|
||||
)> handler
|
||||
);
|
||||
void set_handler_PUT(
|
||||
std::function<std::pair<int, std::string>(
|
||||
std::string const &, std::shared_ptr<User> const &
|
||||
@@ -172,14 +174,11 @@ private:
|
||||
std::string const &
|
||||
)> handler_DELETE_;
|
||||
|
||||
std::function<std::pair<int, std::string>(
|
||||
std::string const &
|
||||
)> handler_GET_;
|
||||
std::function<std::pair<int, std::string>(
|
||||
std::string const &, std::shared_ptr<User> const &
|
||||
)> handler_PUT_;
|
||||
|
||||
std::string username;
|
||||
std::string username{};
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
@@ -208,8 +207,8 @@ private:
|
||||
)> handler_GET_;
|
||||
|
||||
|
||||
std::string username;
|
||||
std::string password;
|
||||
std::string username{};
|
||||
std::string password{};
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user