mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-21 10:17:09 +00:00
[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:
committed by
GitHub
parent
0b6d70d351
commit
bb6785ad70
@@ -38,23 +38,6 @@ namespace api {
|
||||
|
||||
using namespace org::openapitools::server::model;
|
||||
|
||||
class PetApi: public restbed::Service
|
||||
{
|
||||
public:
|
||||
PetApi();
|
||||
~PetApi();
|
||||
void startService(int const& port);
|
||||
void stopService();
|
||||
|
||||
protected:
|
||||
std::shared_ptr<PetApiPetResource> m_spPetApiPetResource;
|
||||
std::shared_ptr<PetApiPetPetIdResource> m_spPetApiPetPetIdResource;
|
||||
std::shared_ptr<PetApiPetFindByStatusResource> m_spPetApiPetFindByStatusResource;
|
||||
std::shared_ptr<PetApiPetFindByTagsResource> m_spPetApiPetFindByTagsResource;
|
||||
std::shared_ptr<PetApiPetPetIdUploadImageResource> m_spPetApiPetPetIdUploadImageResource;
|
||||
};
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Add a new pet to the store
|
||||
/// </summary>
|
||||
@@ -222,6 +205,26 @@ private:
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// The restbed service to actually implement the REST server
|
||||
//
|
||||
class PetApi: public restbed::Service
|
||||
{
|
||||
public:
|
||||
PetApi();
|
||||
~PetApi();
|
||||
void startService(int const& port);
|
||||
void stopService();
|
||||
|
||||
protected:
|
||||
std::shared_ptr<PetApiPetResource> m_spPetApiPetResource;
|
||||
std::shared_ptr<PetApiPetPetIdResource> m_spPetApiPetPetIdResource;
|
||||
std::shared_ptr<PetApiPetFindByStatusResource> m_spPetApiPetFindByStatusResource;
|
||||
std::shared_ptr<PetApiPetFindByTagsResource> m_spPetApiPetFindByTagsResource;
|
||||
std::shared_ptr<PetApiPetPetIdUploadImageResource> m_spPetApiPetPetIdUploadImageResource;
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user