mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-08 03:18:53 +00:00
fix object type declaration in cpprest
This commit is contained in:
parent
6d88edb336
commit
070b5c00b8
@ -292,6 +292,11 @@ public class CppRestClientCodegen extends AbstractCppCodegen {
|
||||
return "std::shared_ptr<" + openAPIType + ">";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTypeDeclaration(String str) {
|
||||
return "std::shared_ptr<" + toModelName(str) + ">";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toDefaultValue(Schema p) {
|
||||
if (p instanceof StringSchema) {
|
||||
|
@ -36,7 +36,7 @@ PetApi::~PetApi()
|
||||
{
|
||||
}
|
||||
|
||||
pplx::task<void> PetApi::addPet(Pet pet)
|
||||
pplx::task<void> PetApi::addPet(std::shared_ptr<Pet> pet)
|
||||
{
|
||||
|
||||
// verify the required parameter 'pet' is set
|
||||
@ -631,7 +631,7 @@ pplx::task<std::shared_ptr<Pet>> PetApi::getPetById(int64_t petId)
|
||||
return result;
|
||||
});
|
||||
}
|
||||
pplx::task<void> PetApi::updatePet(Pet pet)
|
||||
pplx::task<void> PetApi::updatePet(std::shared_ptr<Pet> pet)
|
||||
{
|
||||
|
||||
// verify the required parameter 'pet' is set
|
||||
|
@ -49,7 +49,7 @@ public:
|
||||
/// </remarks>
|
||||
/// <param name="pet">Pet object that needs to be added to the store</param>
|
||||
pplx::task<void> addPet(
|
||||
Pet pet
|
||||
std::shared_ptr<Pet> pet
|
||||
);
|
||||
/// <summary>
|
||||
/// Deletes a pet
|
||||
@ -101,7 +101,7 @@ public:
|
||||
/// </remarks>
|
||||
/// <param name="pet">Pet object that needs to be added to the store</param>
|
||||
pplx::task<void> updatePet(
|
||||
Pet pet
|
||||
std::shared_ptr<Pet> pet
|
||||
);
|
||||
/// <summary>
|
||||
/// Updates a pet in the store with form data
|
||||
|
@ -372,7 +372,7 @@ pplx::task<std::shared_ptr<Order>> StoreApi::getOrderById(int64_t orderId)
|
||||
return result;
|
||||
});
|
||||
}
|
||||
pplx::task<std::shared_ptr<Order>> StoreApi::placeOrder(Order order)
|
||||
pplx::task<std::shared_ptr<Order>> StoreApi::placeOrder(std::shared_ptr<Order> order)
|
||||
{
|
||||
|
||||
// verify the required parameter 'order' is set
|
||||
|
@ -76,7 +76,7 @@ public:
|
||||
/// </remarks>
|
||||
/// <param name="order">order placed for purchasing the pet</param>
|
||||
pplx::task<std::shared_ptr<Order>> placeOrder(
|
||||
Order order
|
||||
std::shared_ptr<Order> order
|
||||
);
|
||||
|
||||
protected:
|
||||
|
@ -36,7 +36,7 @@ UserApi::~UserApi()
|
||||
{
|
||||
}
|
||||
|
||||
pplx::task<void> UserApi::createUser(User user)
|
||||
pplx::task<void> UserApi::createUser(std::shared_ptr<User> user)
|
||||
{
|
||||
|
||||
// verify the required parameter 'user' is set
|
||||
@ -828,7 +828,7 @@ pplx::task<void> UserApi::logoutUser()
|
||||
return void();
|
||||
});
|
||||
}
|
||||
pplx::task<void> UserApi::updateUser(utility::string_t username, User user)
|
||||
pplx::task<void> UserApi::updateUser(utility::string_t username, std::shared_ptr<User> user)
|
||||
{
|
||||
|
||||
// verify the required parameter 'user' is set
|
||||
|
@ -47,7 +47,7 @@ public:
|
||||
/// </remarks>
|
||||
/// <param name="user">Created user object</param>
|
||||
pplx::task<void> createUser(
|
||||
User user
|
||||
std::shared_ptr<User> user
|
||||
);
|
||||
/// <summary>
|
||||
/// Creates list of users with given input array
|
||||
@ -119,7 +119,7 @@ public:
|
||||
/// <param name="user">Updated user object</param>
|
||||
pplx::task<void> updateUser(
|
||||
utility::string_t username,
|
||||
User user
|
||||
std::shared_ptr<User> user
|
||||
);
|
||||
|
||||
protected:
|
||||
|
Loading…
Reference in New Issue
Block a user