39
39
#include " dto/service_create.hpp"
40
40
#include " dto/stream.hpp"
41
41
#include " dto/resource.hpp"
42
+ #include " documentation.hpp"
42
43
43
44
#include OATPP_CODEGEN_BEGIN(ApiController)
44
45
@@ -64,7 +65,8 @@ class DedeController : public oatpp::web::server::api::ApiController
64
65
65
66
ENDPOINT_INFO (get_info)
66
67
{
67
- info->summary = " Retrieve server information" ;
68
+ info->summary = " Returns general information about the deepdetect server, "
69
+ " including the list of existing services." ;
68
70
info->addResponse <Object<dd::DTO::InfoResponse>>(Status::CODE_200,
69
71
" application/json" );
70
72
}
@@ -100,7 +102,7 @@ class DedeController : public oatpp::web::server::api::ApiController
100
102
101
103
ENDPOINT_INFO (get_service)
102
104
{
103
- info->summary = " Retrieve a service detail " ;
105
+ info->summary = " Returns information on an existing service " ;
104
106
}
105
107
ENDPOINT (" GET" , " services/{service-name}" , get_service,
106
108
PATH (oatpp::String, service_name, " service-name" ),
@@ -138,7 +140,7 @@ class DedeController : public oatpp::web::server::api::ApiController
138
140
139
141
ENDPOINT_INFO (create_service)
140
142
{
141
- info->summary = " Create a service" ;
143
+ info->summary = " Create a new machine learning service" ;
142
144
info->addConsumes <Object<dd::DTO::ServiceCreate>>(" application/json" );
143
145
}
144
146
ENDPOINT (" POST" , " services/{service-name}" , create_service,
@@ -164,6 +166,13 @@ class DedeController : public oatpp::web::server::api::ApiController
164
166
ENDPOINT_INFO (delete_service)
165
167
{
166
168
info->summary = " Delete a service" ;
169
+ info->queryParams .add (" clear" , String::Class::getType ()).description
170
+ = " `full`, `lib`, `mem`, `dir` or `index`. `full` clears the model "
171
+ " and service repository, `lib` removes model files only according "
172
+ " to the behavior specified by the service's ML library, `mem` "
173
+ " removes the service from memory without affecting the files, `dir` "
174
+ " removes the whole directory, `index` removes the index when using "
175
+ " similarity search. default=`mem`" ;
167
176
}
168
177
ENDPOINT (" DELETE" , " services/{service-name}" , delete_service,
169
178
PATH (oatpp::String, service_name, " service-name" ),
@@ -199,7 +208,9 @@ class DedeController : public oatpp::web::server::api::ApiController
199
208
200
209
ENDPOINT_INFO (post_train)
201
210
{
202
- info->summary = " Do a training" ;
211
+ info->summary
212
+ = " Launches a blocking or asynchronous training job from a service." ;
213
+ info->body .description = dd::GET_TRAIN_PARAMETERS ();
203
214
}
204
215
ENDPOINT (" POST" , " train" , post_train, BODY_STRING(oatpp::String, train_data))
205
216
{
@@ -219,7 +230,7 @@ class DedeController : public oatpp::web::server::api::ApiController
219
230
}
220
231
ENDPOINT_INFO (delete_train)
221
232
{
222
- info->summary = " Delete a training" ;
233
+ info->summary = " Stop and delete a training job " ;
223
234
}
224
235
ENDPOINT (" DELETE" , " train" , delete_train, QUERIES(QueryParams, queryParams))
225
236
{
@@ -230,7 +241,8 @@ class DedeController : public oatpp::web::server::api::ApiController
230
241
231
242
ENDPOINT_INFO (create_chain)
232
243
{
233
- info->summary = " Run a chain" ;
244
+ info->summary = " Run a chain call, that allows to call multiple models "
245
+ " sequentially" ;
234
246
}
235
247
ENDPOINT (" POST" , " chain/{chain-name}" , create_chain,
236
248
PATH (oatpp::String, chain_name, " chain-name" ),
0 commit comments