[cpp-restbed-server] Allow to implement validation of input data for enumerations (#7717)

* Allow to implement validation of input data for enumerations

* Regen petstore sample
This commit is contained in:
Francesco Montorsi
2020-12-08 17:34:35 +01:00
committed by GitHub
parent 0b6d70d351
commit bb6785ad70
6 changed files with 65 additions and 50 deletions

View File

@@ -38,24 +38,6 @@ namespace api {
using namespace org::openapitools::server::model;
class UserApi: public restbed::Service
{
public:
UserApi();
~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;
};
/// <summary>
/// Create user
/// </summary>
@@ -240,6 +222,27 @@ private:
};
//
// The restbed service to actually implement the REST server
//
class UserApi: public restbed::Service
{
public:
UserApi();
~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;
};
}
}
}