verion which did not include the handling in RTService wth creating the
Json file
This commit is contained in:
48
vrpmdvaotserver/test/app/TestClient.hpp
Normal file
48
vrpmdvaotserver/test/app/TestClient.hpp
Normal file
@@ -0,0 +1,48 @@
|
||||
#ifndef DatabaseTestClient_hpp
|
||||
#define DatabaseTestClient_hpp
|
||||
|
||||
#include "oatpp/web/client/ApiClient.hpp"
|
||||
#include "oatpp/core/macro/codegen.hpp"
|
||||
|
||||
#include "dto/UserDto.hpp"
|
||||
#include "dto/MonitoringDto.hpp"
|
||||
|
||||
/* Begin Api Client code generation */
|
||||
#include OATPP_CODEGEN_BEGIN(ApiClient)
|
||||
|
||||
/**
|
||||
* Test API client.
|
||||
* Use this client to call application APIs.
|
||||
*/
|
||||
class TestClient : public oatpp::web::client::ApiClient {
|
||||
|
||||
API_CLIENT_INIT(TestClient)
|
||||
|
||||
/*****************************************************************
|
||||
* UserController
|
||||
*****************************************************************/
|
||||
|
||||
API_CALL("POST", "/users", addUser, BODY_DTO(Object<UserDto>, userDto))
|
||||
API_CALL("GET", "/users/{userId}", getUser, PATH(Int32, userId))
|
||||
API_CALL("DELETE", "/users/{userId}", deleteUser, PATH(Int32, userId))
|
||||
|
||||
/*****************************************************************/
|
||||
|
||||
// TODO - add more client API calls here
|
||||
/*****************************************************************
|
||||
* MonitoringController
|
||||
*****************************************************************/
|
||||
|
||||
API_CALL("POST", "/monitorings", addMonitoring, BODY_DTO(Object<MonitoringDto>, monitoringDto))
|
||||
API_CALL("GET", "/monitorings/{id}", getMonitoring, PATH(Int32, id))
|
||||
API_CALL("DELETE", "/monitorings/{id}", deleteMonitoring, PATH(Int32, id))
|
||||
|
||||
/*****************************************************************/
|
||||
|
||||
|
||||
};
|
||||
|
||||
/* End Api Client code generation */
|
||||
#include OATPP_CODEGEN_END(ApiClient)
|
||||
|
||||
#endif // DatabaseTestClient_hpp
|
||||
Reference in New Issue
Block a user