@@ -210,12 +210,10 @@ async fn get_config(State(state): State<ServerState>) -> ServerResult<Json<Confi
210210 put,
211211 path = "/config" ,
212212 context_path = "/api/v2" ,
213+ request_body( content = Value , description = "Configuration to apply." ) ,
213214 responses(
214215 ( status = 200 , description = "The configuration was replaced. Other operations can be running in background." ) ,
215216 ( status = 400 , description = "Not possible to replace the configuration." )
216- ) ,
217- params(
218- ( "config" = Value , description = "Configuration to apply." )
219217 )
220218) ]
221219async fn put_config ( State ( state) : State < ServerState > , Json ( json) : Json < Value > ) -> ServerResult < ( ) > {
@@ -232,12 +230,10 @@ async fn put_config(State(state): State<ServerState>, Json(json): Json<Value>) -
232230 patch,
233231 path = "/config" ,
234232 context_path = "/api/v2" ,
233+ request_body( content = Patch , description = "Changes in the configuration." ) ,
235234 responses(
236235 ( status = 200 , description = "The configuration was patched. Other operations can be running in background." ) ,
237236 ( status = 400 , description = "Not possible to patch the configuration." )
238- ) ,
239- params(
240- ( "patch" = Patch , description = "Changes in the configuration." )
241237 )
242238) ]
243239async fn patch_config (
@@ -410,13 +406,11 @@ async fn get_license(
410406 post,
411407 path = "/action" ,
412408 context_path = "/api/v2" ,
409+ request_body( content = Action , description = "Description of the action to run." ) ,
413410 responses(
414411 ( status = 200 , description = "Action successfully ran." ) ,
415412 ( status = 400 , description = "Not possible to run the action." , body = Object ) ,
416413 ( status = 422 , description = "Action blocked by backend state" , body = Object )
417- ) ,
418- params(
419- ( "action" = Action , description = "Description of the action to run." ) ,
420414 )
421415) ]
422416async fn run_action (
0 commit comments